Revert "Fix DOC101 by wrapping remark in para element" (only an issue before the incorrect code block usages were fixed)

This reverts commit 98f811336918f921941a8e6f52efb7eb21202416.

--- src/NUnitFramework/framework/Assert.Conditions.cs
+++ src/NUnitFramework/framework/Assert.Conditions.cs
@@ -209,8 +209,8 @@
         #region NotNull

         /// <summary>
-        /// <para>Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -221,8 +221,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         public static void NotNull(object? anObject)
@@ -231,8 +231,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -243,8 +243,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is not equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         public static void IsNotNull(object? anObject)
@@ -257,8 +257,8 @@
         #region Null

         /// <summary>
-        /// <para>Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -269,8 +269,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         public static void Null(object? anObject)
@@ -279,8 +279,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -291,8 +291,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the object that is passed in is equal to <see langword="null"/> . Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the object that is passed in is equal to <see langword="null"/>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="anObject">The object that is to be tested</param>
         public static void IsNull(object? anObject)
@@ -305,8 +305,8 @@
         #region IsNaN

         /// <summary>
-        /// <para>Verifies that the double that is passed in is an <c>NaN</c>. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the double that is passed in is an <c>NaN</c>. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="aDouble">The value that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -317,8 +317,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="aDouble">The value that is to be tested</param>
         public static void IsNaN(double aDouble)
@@ -327,8 +327,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="aDouble">The value that is to be tested</param>
         /// <param name="message">The message to display in case of failure</param>
@@ -339,8 +339,8 @@
         }

         /// <summary>
-        /// <para>Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
-        /// exception when inside a multiple assert block.</para>
+        /// Verifies that the double that is passed in is an <c>NaN</c> value. Returns without throwing an
+        /// exception when inside a multiple assert block.
         /// </summary>
         /// <param name="aDouble">The value that is to be tested</param>
         public static void IsNaN(double? aDouble)


callsite - explicitly System.DateTime can be boxed into PhpValue

- when passed from C#, the value needs to be stored in PHP scope
- TODO: enable for all ValueTypes in general, create a generic wrapper in order to be able to call methods with sideeffects

--- src/Peachpie.Runtime/Dynamic/ConvertExpression.cs
+++ src/Peachpie.Runtime/Dynamic/ConvertExpression.cs
@@ -531,6 +531,11 @@
                     return BindToValue(Expression.Convert(expr, source.GetEnumUnderlyingType()));
                 }

+                if (source == typeof(System.DateTime))
+                {
+                    return BindToValue(Expression.Convert(expr, typeof(object)));
+                }
+
                 throw new NotImplementedException(source.FullName);
             }
             else if (


Normalize line endings

Normalize line endings

--- src/PowerBridge/Internal/IPowerShellHostOutput.cs
+++ src/PowerBridge/Internal/IPowerShellHostOutput.cs
@@ -1,78 +1,78 @@
 using System.Management.Automation;
-using Microsoft.Build.Framework;
-
-namespace PowerBridge.Internal
-{
-    internal interface IPowerShellHostOutput
-    {
-        void WriteDebugLine(string message);
-
-        void WriteVerboseLine(string message);
-
-        void Write(string message);
-
-        void WriteLine(string value);
-
-        void WriteWarningLine(string value);
-
-        void WriteErrorLine(string value);
-
-        void WriteError(ErrorRecord errorRecord);
-    }
-
-    internal sealed class PowerShellHostOutput : IPowerShellHostOutput
-    {
-        private readonly IBuildTaskLog _log;
-
-        public PowerShellHostOutput(IBuildTaskLog log)
-        {
-            _log = log;
-        }
-
-        public void WriteDebugLine(string message)
-        {
-            _log.LogMessage(MessageImportance.Low, message);
-        }
-
-        public void WriteVerboseLine(string message)
-        {
-            _log.LogMessage(MessageImportance.Low, message);
-        }
-
-        public void Write(string message)
-        {
-            _log.LogMessage(MessageImportance.High, message);
-        }
-
-        public void WriteLine(string value)
-        {
-            Write(value);
-        }
-
-        public void WriteWarningLine(string value)
-        {
-            _log.LogWarning(value);
-        }
-
-        public void WriteErrorLine(string value)
-        {
-            _log.LogError(value);
-        }
-
+using Microsoft.Build.Framework;
+
+namespace PowerBridge.Internal
+{
+    internal interface IPowerShellHostOutput
+    {
+        void WriteDebugLine(string message);
+
+        void WriteVerboseLine(string message);
+
+        void Write(string message);
+
+        void WriteLine(string value);
+
+        void WriteWarningLine(string value);
+
+        void WriteErrorLine(string value);
+
+        void WriteError(ErrorRecord errorRecord);
+    }
+
+    internal sealed class PowerShellHostOutput : IPowerShellHostOutput
+    {
+        private readonly IBuildTaskLog _log;
+
+        public PowerShellHostOutput(IBuildTaskLog log)
+        {
+            _log = log;
+        }
+
+        public void WriteDebugLine(string message)
+        {
+            _log.LogMessage(MessageImportance.Low, message);
+        }
+
+        public void WriteVerboseLine(string message)
+        {
+            _log.LogMessage(MessageImportance.Low, message);
+        }
+
+        public void Write(string message)
+        {
+            _log.LogMessage(MessageImportance.High, message);
+        }
+
+        public void WriteLine(string value)
+        {
+            Write(value);
+        }
+
+        public void WriteWarningLine(string value)
+        {
+            _log.LogWarning(value);
+        }
+
+        public void WriteErrorLine(string value)
+        {
+            _log.LogError(value);
+        }
+
         public void WriteError(ErrorRecord errorRecord)
         {
-            var info = errorRecord.GetErrorInfo();
-
-            _log.LogError(
-                subcategory: null,
-                errorCode: null,
+            var info = errorRecord.GetErrorInfo();
+
+            _log.LogError(
+                subcategory: null,
+                errorCode: null,
                 helpKeyword: null,
-                file: info.File,
+                file: info.File,
                 lineNumber: info.LineNumber,
-                columnNumber: info.ColumnNumber,
-                endLineNumber: 0,
-                endColumnNumber: 0,
-                message: info.Message);
-        }
-    }
+                columnNumber: info.ColumnNumber,
+                endLineNumber: 0,
+                endColumnNumber: 0,
+                message: info.Message);
+        }
+    }
 }


Reverted changes around logout as fix didn;t solve the issue in test

--- src/SFA.DAS.EAS.Web/Controllers/HomeController.cs
+++ src/SFA.DAS.EAS.Web/Controllers/HomeController.cs
@@ -217,9 +217,6 @@
         [Route("signOut")]
         public ActionResult SignOut()
         {
-            if (!OwinWrapper.IsUserAuthenticated())
-                RedirectToAction("Index");
-
             OwinWrapper.SignOutUser();

             var owinContext = HttpContext.GetOwinContext();


Refactor GetOrAddProject

Refactor GetOrAddProject

--- src/StructuredLogger/Construction/Construction.cs
+++ src/StructuredLogger/Construction/Construction.cs
@@ -149,7 +149,8 @@
                         parent = GetOrAddProject(parentProjectId);
                     }

-                    var project = GetOrAddProject(args.BuildEventContext.ProjectContextId, args, parent);
+
+                    var project = GetOrAddProject(args, parent);

                     if (parent != null)
                     {
@@ -430,16 +431,20 @@
         /// <param name="args">The <see cref="ProjectStartedEventArgs"/> instance containing the event data.</param>
         /// <param name="parentProject">The parent project, if any.</param>
         /// <returns>Project object</returns>
-        public Project GetOrAddProject(int projectId, ProjectStartedEventArgs args = null, Project parentProject = null)
-        {
+        public Project GetOrAddProject(ProjectStartedEventArgs args, Project parentProject = null)
+        {
+            var projectId = args.BuildEventContext.ProjectContextId;
             Project result = _projectIdToProjectMap.GetOrAdd(projectId,
                 id => CreateProject(id));

-            if (args != null)
-            {
-                UpdateProject(result, args);
-            }
-
+            UpdateProject(result, args);
+
+            return result;
+        }
+
+        public Project GetOrAddProject(int projectId)
+        {
+            Project result = _projectIdToProjectMap.GetOrAdd(projectId, id => CreateProject(id));
             return result;
         }


- Small fix (ReadValue throws Exception when Tag not exist! This should not happen, it should set the ItemDoesNotExist Property of the PLCTag)

--- LibNoDaveConnectionLibrary/Communication/PLCConnection.cs
+++ LibNoDaveConnectionLibrary/Communication/PLCConnection.cs
@@ -1948,13 +1948,16 @@
                     int buffPos = 0;
                     if (res == 0)
                     {
-                        value._readValueFromBuffer(myBuff, buffPos);
+                        value._readValueFromBuffer(myBuff, buffPos);
+                        value.ItemDoesNotExist = false;
                     }
                     else if (res == -1025)
                     {
                         this.Disconnect();
                         return;
                     }
+                    else if (res == 5 || res == 10)
+                        value.ItemDoesNotExist = true;
                     else
                         throw new Exception("Error: " + libnodave.daveStrerror(res));
                 }


Removed unused using clause that snuck in

--- src/Unicorn/ControlPanel/Controls/AccessDenied.cs
+++ src/Unicorn/ControlPanel/Controls/AccessDenied.cs
@@ -1,5 +1,4 @@
-using System.Management.Automation.Remoting;
-using System.Web;
+using System.Web;
 using System.Web.UI;

 namespace Unicorn.ControlPanel.Controls


Webresource dependency bug correction

Webresource dependency bug correction

--- src/XrmFramework.DeployUtils/Model/WebResource.cs
+++ src/XrmFramework.DeployUtils/Model/WebResource.cs
@@ -23,7 +23,7 @@
             if (Extension.ToLowerInvariant() == ".js")
             {
                 var allLines = File.ReadAllLines(fi.FullName);
-
+
                 foreach (var line in allLines)
                 {
                     var match = ReferenceRegex.Match(line);
@@ -42,7 +42,7 @@
             Id = wr.Id;

             Base64Content = wr.GetAttributeValue<string>("content");
-
+
             FullName = wr.GetAttributeValue<string>("name");

             var registeredDependencies = wr.GetAttributeValue<string>("dependencyxml");
@@ -65,23 +65,23 @@
         public string FullName { get; set; }

         public string Extension => Path.GetExtension(FullName);
-
+
         public string Base64Content { get; }

         private SortedSet<string> Dependencies { get; } = new();

         public string GetDependenciesXml()
             => Dependencies.Any() ? new XElement("Dependencies",
+            new XElement("Dependency", new XAttribute("componentType", "WebResource"),
             Dependencies.Select(d =>
-            new XElement("Dependency", new XAttribute("componentType", "WebResource"),
                 new XElement("Library",
                     new XAttribute("name", d),
                     new XAttribute("displayName", d),
                     new XAttribute("languagecode", string.Empty),
                     new XAttribute("description", string.Empty),
                     new XAttribute("libraryUniqueId", Guid.NewGuid())
-                ))).Cast<object>().ToArray()
-            ).ToString() : null;
+                )).Cast<object>().ToArray()
+            )).ToString() : null;

         private static string GetRelativePath(string fileFullName, string folderName, string prefix)
         {


Fix WFS 1.0.0 request when using a filter

--- Mapsui/Providers/Wfs/Utilities/WFS_1_0_0_TextResources.cs
+++ Mapsui/Providers/Wfs/Utilities/WFS_1_0_0_TextResources.cs
@@ -107,6 +107,7 @@
                     if (!string.IsNullOrEmpty(labelProperty))
                         xWriter.WriteElementString("PropertyName", qualification + labelProperty);
                     xWriter.WriteStartElement("Filter", NSOGC);
+                    if (filter != null) xWriter.WriteStartElement("And");
                     xWriter.WriteStartElement("BBOX");
                     xWriter.WriteElementString("PropertyName", featureTypeInfo.Geometry.GeometryName);
                     xWriter.WriteStartElement("gml", "Box", NSGML);


#410. Not fixing this issue, but added comments to code.

--- MileageStats.Domain/Handlers/GetFleetSummaryStatistics.cs
+++ MileageStats.Domain/Handlers/GetFleetSummaryStatistics.cs
@@ -42,6 +42,10 @@
                         let statistics = CalculateStatistics.Calculate(fillups, includeFirst: false)
                         select statistics;

+            // These statistic calculations are for illustrative purposes only.
+            // If you were to build this application for real, you probably want to calculate this
+            // data more accurately and cache the results.
+
             return new FleetStatistics(stats);
         }
     }


Return empty list if HttpContext.Current is null

--- Mindscape.Raygun4Net/Breadcrumbs/HttpBreadcrumbStorage.cs
+++ Mindscape.Raygun4Net/Breadcrumbs/HttpBreadcrumbStorage.cs
@@ -30,6 +30,11 @@

     private List<RaygunBreadcrumb> GetList()
     {
+      if (HttpContext.Current == null)
+      {
+        return new List<RaygunBreadcrumb>();
+      }
+
       SetupStorage();

       return (List<RaygunBreadcrumb>) HttpContext.Current.Items[ItemsKey];


Added Locale in EnvironmentMessage, deprecated Location

--- Mindscape.Raygun4Net/Messages/RaygunEnvironmentMessage.cs
+++ Mindscape.Raygun4Net/Messages/RaygunEnvironmentMessage.cs
@@ -30,19 +30,19 @@

 #if !WINRT
       OSVersion = Environment.OSVersion.VersionString;
-      Architecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
+      Architecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
       WindowBoundsWidth = SystemInformation.VirtualScreen.Height;
-      WindowBoundsHeight = SystemInformation.VirtualScreen.Width;
+      WindowBoundsHeight = SystemInformation.VirtualScreen.Width;
       ComputerInfo info = new ComputerInfo();
-      TotalPhysicalMemory = (ulong)info.TotalPhysicalMemory / 0x100000; // in MB
-      AvailablePhysicalMemory = (ulong)info.AvailablePhysicalMemory / 0x100000;
-      TotalVirtualMemory = info.TotalVirtualMemory / 0x100000;
-      AvailableVirtualMemory = info.AvailableVirtualMemory / 0x100000;
+      TotalPhysicalMemory = (ulong) info.TotalPhysicalMemory/0x100000; // in MB
+      AvailablePhysicalMemory = (ulong) info.AvailablePhysicalMemory/0x100000;
+      TotalVirtualMemory = info.TotalVirtualMemory/0x100000;
+      AvailableVirtualMemory = info.AvailableVirtualMemory/0x100000;

-      Location = CultureInfo.CurrentCulture.DisplayName;
+      Locale = CultureInfo.CurrentCulture.DisplayName;
       OSVersion = info.OSVersion;
       GetDiskSpace();
-
+
       Cpu = GetCpu();
 #else
   //WindowBoundsHeight = Windows.UI.Xaml.Window.Current.Bounds.Height;
@@ -59,11 +59,11 @@
 #endif
     }

-#if !WINRT
+#if !WINRT
     private string GetCpu()
     {
       ManagementClass wmiManagementProcessorClass = new ManagementClass("Win32_Processor");
-      ManagementObjectCollection wmiProcessorCollection = wmiManagementProcessorClass.GetInstances();
+      ManagementObjectCollection wmiProcessorCollection = wmiManagementProcessorClass.GetInstances();

       foreach (ManagementObject wmiProcessorObject in wmiProcessorCollection)
       {
@@ -85,9 +85,9 @@
       {
         if (drive.IsReady)
         {
-          DiskSpaceFree.Add((double)drive.AvailableFreeSpace / 0x40000000); // in GB
+          DiskSpaceFree.Add((double) drive.AvailableFreeSpace/0x40000000); // in GB
         }
-      }
+      }
     }
 #else
     private async Task<PnpObjectCollection> GetDevices()
@@ -120,25 +120,27 @@

     public string Architecture { get; private set; }

+    [Obsolete("Use Locale instead")]
     public string Location { get; private set; }

     public ulong TotalPhysicalMemory { get; private set; }

     public ulong AvailablePhysicalMemory { get; private set; }

-    public ulong TotalVirtualMemory { get; set; }
+    public ulong TotalVirtualMemory { get; private set; }

-    public ulong AvailableVirtualMemory { get; set; }
+    public ulong AvailableVirtualMemory { get; private set; }

     public List<double> DiskSpaceFree
     {
-      get
-      {
-        return _diskSpaceFree;
-      }
+      get { return _diskSpaceFree; }
       set { _diskSpaceFree = value; }
     }

     public string DeviceName { get; private set; }
-  }
+
+    // Refactored properties
+
+    public string Locale { get; private set; }
+}
 }


Added parse methods.

Added parse methods.

--- NtApiDotNet/Utilities/ASN1/Builder/DERObjectIdentifier.cs
+++ NtApiDotNet/Utilities/ASN1/Builder/DERObjectIdentifier.cs
@@ -49,10 +49,9 @@
         /// Constructor.
         /// </summary>
         /// <param name="oid">The object identifier as a string.</param>
-        /// <exception cref="ArgumentException">Thrown if less than 2 components.</exception>
-        public DERObjectIdentifier(string oid)
+        /// <exception cref="ArgumentException">Thrown if less than 2 components or invalid.</exception>
+        public DERObjectIdentifier(string oid) : this(Parse(oid).ObjectIdentifier)
         {
-            ObjectIdentifier = oid.Split('.').Select(i => int.Parse(i)).ToList().AsReadOnly();
         }

         /// <summary>
@@ -64,6 +63,44 @@
             return string.Join(".", ObjectIdentifier);
         }

+        /// <summary>
+        /// Try and parse a string to an OID.
+        /// </summary>
+        /// <param name="value">The OID as a string.</param>
+        /// <param name="oid">The parsed OID.</param>
+        /// <returns>Returns true if successful.</returns>
+        public static bool TryParse(string value, out DERObjectIdentifier oid)
+        {
+            if (string.IsNullOrWhiteSpace(value))
+            {
+                throw new ArgumentException($"'{nameof(value)}' cannot be null or whitespace.", nameof(value));
+            }
+
+            oid = null;
+            List<int> values = new List<int>();
+            foreach (var part in value.Split('.'))
+            {
+                if (!int.TryParse(part, out int v))
+                    return false;
+                values.Add(v);
+            }
+            oid = new DERObjectIdentifier(values);
+            return true;
+        }
+
+        /// <summary>
+        /// Parse a string to an OID.
+        /// </summary>
+        /// <param name="value">The string to parse.</param>
+        /// <returns>The parsed OID.</returns>
+        /// <exception cref="ArgumentException">Thrown if the string is invalid.</exception>
+        public static DERObjectIdentifier Parse(string value)
+        {
+            if (!TryParse(value, out DERObjectIdentifier oid))
+                throw new ArgumentException("Value is not a valid OID.", nameof(value));
+            return oid;
+        }
+
         void IDERObject.Write(DERBuilder builder)
         {
             builder.WriteObjectId(ObjectIdentifier);


test commit

test commit

--- NugetReferencesExplorer/ViewModel/ApplicationViewModel.cs
+++ NugetReferencesExplorer/ViewModel/ApplicationViewModel.cs
@@ -29,8 +29,14 @@
         private async void LoadPackageItemsAsync()
         {
             IsBusy = true;
-            this.PackageItems = await Task.Run(() => LocalPackageRepositoryFactory.Create().GetPackages(Properties.Settings.Default.sourcePath).Where(p => p.HasDifferentVersion).ToList());//.ForEach(x => x.LoadPackageInfos()));
-            IsBusy = false;
+            try
+            {
+                this.PackageItems = await Task.Run(() => LocalPackageRepositoryFactory.Create().GetPackages(Properties.Settings.Default.sourcePath).Where(p => p.HasDifferentVersion).ToList());//.ForEach(x => x.LoadPackageInfos()));
+            }
+            finally
+            {
+                IsBusy = false;
+            }
         }

         private IEnumerable<Package> _packageItems;


refactor(model)

refactor(model)

order properties alphabetically

--- src/skadisteam.login/Models/Json/TransferParameters.cs
+++ src/skadisteam.login/Models/Json/TransferParameters.cs
@@ -4,17 +4,17 @@
 {
     public class TransferParameters
     {
+        [JsonProperty(PropertyName = "auth")]
+        public string Auth { get; set; }
+        [JsonProperty(PropertyName = "remember_login")]
+        public bool RememberLogin { get; set; }
         [JsonProperty(PropertyName = "steamid")]
         public string SteamId { get; set; }
         [JsonProperty(PropertyName = "token")]
         public string Token { get; set; }
-        [JsonProperty(PropertyName = "auth")]
-        public string Auth { get; set; }
-        [JsonProperty(PropertyName = "remember_login")]
-        public bool RememberLogin { get; set; }
+        [JsonProperty(PropertyName = "token_secure")]
+        public string TokenSecure { get; set; }
         [JsonProperty(PropertyName = "webcookie")]
         public string WebCookie { get; set; }
-        [JsonProperty(PropertyName = "token_secure")]
-        public string TokenSecure { get; set; }
     }
 }


added command line arguments for outputting the version

--- Calc2/Program.cs
+++ Calc2/Program.cs
@@ -17,9 +17,35 @@
         private static void Main(string[] args)
         {
             if (args.Length > 0)
+            {
+                switch (args[0])
+                {
+                    case "-h":
+                    case "/?":
+                        Help();
+                        break;
+                    case "-v":
+                        Version();
+                        break;
+                    default:
                         DoFile(args[0], args.Skip(1).ToArray());
+                        break;
+                }
+            }
             else
+            {
                 LiveInterpreter();
+            }
+        }
+
+        private static void Help()
+        {
+
+        }
+
+        private static void Version()
+        {
+            Console.WriteLine($"{System.Reflection.Assembly.GetExecutingAssembly().GetName().Name} V{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}");
         }

         private static void DoFile(string file, string[] args)


Add support for binding mousewheel actions

--- osu.Game/Overlays/KeyBinding/KeyBindingRow.cs
+++ osu.Game/Overlays/KeyBinding/KeyBindingRow.cs
@@ -170,6 +170,21 @@
             }

             return base.OnMouseUp(state, args);
+        }
+
+        protected override bool OnWheel(InputState state)
+        {
+            if (HasFocus)
+            {
+                if (bindTarget.IsHovered)
+                {
+                    bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
+                    finalise();
+                    return true;
+                }
+            }
+
+            return base.OnWheel(state);
         }

         protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)


Add padding and avoid using invalidation (triggers too often when toolbar is being toggled)

--- osu.Game/Skinning/Editor/SkinEditorOverlay.cs
+++ osu.Game/Skinning/Editor/SkinEditorOverlay.cs
@@ -15,6 +15,7 @@
 using osu.Game.Input.Bindings;
 using osu.Game.Screens;
 using osu.Game.Screens.Edit.Components;
+using osuTK;

 namespace osu.Game.Skinning.Editor
 {
@@ -35,6 +36,8 @@
         private OsuGame game { get; set; }

         private OsuScreen lastTargetScreen;
+
+        private Vector2 lastDrawSize;

         public SkinEditorOverlay(ScalingContainer scalingContainer)
         {
@@ -92,18 +95,31 @@
             return base.OnInvalidate(invalidation, source);
         }

+        protected override void Update()
+        {
+            base.Update();
+
+            if (game.DrawSize != lastDrawSize)
+            {
+                lastDrawSize = game.DrawSize;
+                updateScreenSizing();
+            }
+        }
+
         private void updateScreenSizing()
         {
             if (skinEditor?.State.Value != Visibility.Visible) return;

-            float relativeSidebarWidth = EditorSidebar.WIDTH / DrawWidth;
-            float relativeToolbarHeight = (SkinEditorSceneLibrary.HEIGHT + SkinEditor.MENU_HEIGHT) / DrawHeight;
+            const float padding = 10;
+
+            float relativeSidebarWidth = (EditorSidebar.WIDTH + padding) / DrawWidth;
+            float relativeToolbarHeight = (SkinEditorSceneLibrary.HEIGHT + SkinEditor.MENU_HEIGHT + padding) / DrawHeight;

             var rect = new RectangleF(
                 relativeSidebarWidth,
                 relativeToolbarHeight,
                 1 - relativeSidebarWidth * 2,
-                1f - relativeToolbarHeight);
+                1f - relativeToolbarHeight - padding / DrawHeight);

             scalingContainer.SetCustomRect(rect, true);
         }


Extend the testcase to test short breaks

--- osu.Game/Tests/Visual/TestCaseBreakOverlay.cs
+++ osu.Game/Tests/Visual/TestCaseBreakOverlay.cs
@@ -20,11 +20,12 @@

             Child = breakOverlay = new BreakOverlay(true);

-            AddStep("Add 2s break", () => startBreak(2000));
-            AddStep("Add 5s break", () => startBreak(5000));
-            AddStep("Add 10s break", () => startBreak(10000));
-            AddStep("Add 15s break", () => startBreak(15000));
-            AddStep("Add 2 breaks (2s each)", startMultipleBreaks);
+            AddStep("2s break", () => startBreak(2000));
+            AddStep("5s break", () => startBreak(5000));
+            AddStep("10s break", () => startBreak(10000));
+            AddStep("15s break", () => startBreak(15000));
+            AddStep("2s, 2s", startMultipleBreaks);
+            AddStep("0.5s, 0.7s, 1s, 2s", startAnotherMultipleBreaks);
         }

         private void startBreak(double duration)
@@ -57,5 +58,34 @@
                 }
             };
         }
+
+        private void startAnotherMultipleBreaks()
+        {
+            double currentTime = Clock.CurrentTime;
+
+            breakOverlay.Breaks = new List<BreakPeriod>
+            {
+                new BreakPeriod // Duration is less than 650 - too short to appear
+                {
+                    StartTime = currentTime,
+                    EndTime = currentTime + 500,
+                },
+                new BreakPeriod
+                {
+                    StartTime = currentTime + 1500,
+                    EndTime = currentTime + 2200,
+                },
+                new BreakPeriod
+                {
+                    StartTime = currentTime + 3200,
+                    EndTime = currentTime + 4200,
+                },
+                new BreakPeriod
+                {
+                    StartTime = currentTime + 5200,
+                    EndTime = currentTime + 7200,
+                }
+            };
+        }
     }
 }


and fuel...

and fuel...

--- pWingsMerged/UpgradeModules/WingProcedural.cs
+++ pWingsMerged/UpgradeModules/WingProcedural.cs
@@ -164,6 +164,7 @@
                 ((B9_ProceduralControl)wing).RootOffset = sharedBaseOffsetRoot;
             }

+            wing.fuelSelectedTankSetup = fuelSelectedTankSetup;
         }
     }
 }


[V2] Enabling more uses of the hack of pre-generating an Xcode's project metadata before the policy is run

--- packages/C/dev/XCodeBuilder/CStaticLibrary.cs
+++ packages/C/dev/XCodeBuilder/CStaticLibrary.cs
@@ -42,7 +42,17 @@
             System.Collections.ObjectModel.ReadOnlyCollection<Bam.Core.V2.Module> objectFiles,
             System.Collections.ObjectModel.ReadOnlyCollection<Bam.Core.V2.Module> headers)
         {
-            var library = new XcodeBuilder.V2.XcodeStaticLibrary(sender, libraryPath);
+            XcodeBuilder.V2.XcodeCommonProject library;
+            // TODO: this is a hack, so that modules earlier in the graph can add pre/post build commands
+            // to the project for this module
+            if (null == sender.MetaData)
+            {
+                library = new XcodeBuilder.V2.XcodeStaticLibrary(sender, libraryPath);
+            }
+            else
+            {
+                library = sender.MetaData as XcodeBuilder.V2.XcodeCommonProject;
+            }

             if (objectFiles.Count > 1)
             {


Handle another interpolated string edge case.

--- CodeFormatter.cs
+++ CodeFormatter.cs
@@ -257,14 +257,16 @@
 				// braced lambda body, or whether it begins the format string.
 				else if (firstChar == '{' && contexts.Count > 1) {
 					i++;
-					currentContext.BlockDepth++;
+					currentContext.BraceDepth++;
 				}
 				// Close brace
 				else if (firstChar == '}' && contexts.Count > 1) {
-					currentContext.BlockDepth--;
-					if (currentContext.BlockDepth == -1 && PreviousContext() is IInterpolatedStringContext) {
+					currentContext.BraceDepth--;
+					if (currentContext.BraceDepth == -1 && PreviousContext() is IInterpolatedStringContext) {
 						if (currentContext.ParenDepth != 0)
-							throw new Exception("Detected parentheses mismatch.");
+							throw new Exception("Detected mismatched parentheses.");
+						if (currentContext.BracketDepth != 0)
+							throw new Exception("Detected mismatched brackets.");
 						PopContext();
 						if (currentContext is RawInterpolatedStringContext risContext) {
 							int charCount = PeekWhile(c => c == '}').Count();
@@ -279,6 +281,8 @@
 					else i++;
 				}
 				// Open parenthesis. Like braces, these must be tracked sometimes to determine context.
+				// Example in which the colon does not begin a format string:
+				// string s = $"{(true ? 1 : 2)}";
 				else if (firstChar == '(' && contexts.Count > 1) {
 					i++;
 					currentContext.ParenDepth++;
@@ -287,12 +291,26 @@
 				else if (firstChar == ')' && contexts.Count > 1) {
 					i++;
 					if (--currentContext.ParenDepth == -1)
-						throw new Exception("Detected parentheses mismatch.");
+						throw new Exception("Detected mismatched parentheses.");
+				}
+				// Open bracket. Like braces, these must be tracked sometimes to determine context.
+				// Example in which the colon does not begin a format string:
+				// string s = $"{"abc"[true ? 1 : 2]}";
+				else if (firstChar == '[' && contexts.Count > 1) {
+					i++;
+					currentContext.BracketDepth++;
+				}
+				// Close bracket
+				else if (firstChar == ']' && contexts.Count > 1) {
+					i++;
+					if (--currentContext.BracketDepth == -1)
+						throw new Exception("Detected mismatched brackets.");
 				}
 				// Format section of interpolated string
 				else if (firstChar == ':' &&
-					currentContext.BlockDepth == 0 &&
+					currentContext.BraceDepth == 0 &&
 					currentContext.ParenDepth == 0 &&
+					currentContext.BracketDepth == 0 &&
 					PreviousContext() is IInterpolatedStringContext)
 				{
 					i++;
@@ -622,8 +640,9 @@
 	}

 	private abstract class Context {
-		public int BlockDepth { get; set; }
+		public int BraceDepth { get; set; }
 		public int ParenDepth { get; set; }
+		public int BracketDepth { get; set; }
 	}

 	private class NormalContext : Context { }


Fix ability to remove multiple empty lines in certain cases.

--- CodeFormatter.cs
+++ CodeFormatter.cs
@@ -297,7 +297,13 @@
 			Line prevLine = peekLine(-1);
 			Line nextLine = peekLine(1);

+			int nextLineOffset = 1;
+			void GetNextLine() { nextLine = peekLine(++nextLineOffset); }
+
 			if (!LeaveEmptyLines && line.IsEmpty) {
+				while (nextLine != null && nextLine.IsEmpty) {
+					GetNextLine();
+				}
 				bool isDuplicate = prevLine?.IsEmpty ?? false;
 				bool isAfterXmlDocComment = prevLine?.EndsWithXmlDocComment ?? false;
 				bool isAfterOpenBrace = prevLine?.CodeEndsWith('{') ?? false;
@@ -318,9 +324,8 @@
 				flagCurrentLineForRemoval();
 			}
 			else if (OpenBraceStyle == OpenBraceStyle.MoveDown && line.Substance.Length > 1 && line.CodeEndsWith('{')) {
-				int nextLineOffset = 1;
 				while (nextLine != null && (nextLine.IsEmpty || nextLine.IsPreprocessorDirective)) {
-					nextLine = peekLine(++nextLineOffset);
+					GetNextLine();
 				}
 				if (nextLine != null) {
 					line.SetSubstanceRaw(line.Substance.Substring(0, line.Substance.Length - 1).TrimEnd(' ', '\t'));


Set sandbox mode on testing

Set sandbox mode on testing

--- test/FluentEmail.SendGrid.Tests/SendGridSenderTests.cs
+++ test/FluentEmail.SendGrid.Tests/SendGridSenderTests.cs
@@ -20,7 +20,7 @@
         [SetUp]
         public void SetUp()
         {
-            var sender = new SendGridSender(apiKey, false);
+            var sender = new SendGridSender(apiKey, true);
             Email.DefaultSender = sender;
         }


Fixed build failure. Property change is taking effect globally causing other unit tests to fail

--- test/Microsoft.IdentityModel.Logging.Tests/PIITests.cs
+++ test/Microsoft.IdentityModel.Logging.Tests/PIITests.cs
@@ -199,23 +199,11 @@

             string algorithm = null;

-            // Testset 1 with PII logging off
-            IdentityModelEventSource.ShowPII = false;
-
             LogHelper.LogExceptionMessage(new NotSupportedException(LogHelper.FormatInvariant("Algorithm not supported exception 1: {0}", algorithm)));
             LogHelper.LogExceptionMessage(new NotSupportedException(LogHelper.FormatInvariant("Algorithm not supported exception 2: {0}", LogHelper.MarkAsNonPII(algorithm))));

             Assert.Contains("Algorithm not supported exception 1: [PII of type 'Null' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]", listener.TraceBuffer);
             Assert.Contains("Algorithm not supported exception 2: Null", listener.TraceBuffer);
-
-            // Testset 2 with PII logging on
-            IdentityModelEventSource.ShowPII = true;
-
-            LogHelper.LogExceptionMessage(new NotSupportedException(LogHelper.FormatInvariant("Algorithm not supported exception 3: {0}", algorithm)));
-            LogHelper.LogExceptionMessage(new NotSupportedException(LogHelper.FormatInvariant("Algorithm not supported exception 4: {0}", LogHelper.MarkAsNonPII(algorithm))));
-
-            Assert.Contains("Algorithm not supported exception 3: ", listener.TraceBuffer);
-            Assert.Contains("Algorithm not supported exception 4: Null", listener.TraceBuffer);
         }

@@ -225,24 +213,12 @@
             SampleListener listener = new SampleListener();
             IdentityModelEventSource.Logger.LogLevel = EventLevel.Error;
             listener.EnableEvents(IdentityModelEventSource.Logger, EventLevel.Error);
-
-            // Testset 1 with PII logging off
-            IdentityModelEventSource.ShowPII = false;

             LogHelper.LogExceptionMessage(EventLevel.Error, new ArgumentException(LogHelper.FormatInvariant("Main exception 1: {0}", new SecurityTokenCompressionFailedException("custom inner exception"))));
             LogHelper.LogExceptionMessage(EventLevel.Error, new ArgumentException(LogHelper.FormatInvariant("Main exception 2: {0}", new InvalidOperationException("system exception"))));

             Assert.Contains("Main exception 1: Microsoft.IdentityModel.Tokens.SecurityTokenCompressionFailedException: custom inner exception", listener.TraceBuffer);
             Assert.Contains("Main exception 2: [PII of type 'System.InvalidOperationException' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]", listener.TraceBuffer);
-
-            // Testset 2 with PII logging on
-            IdentityModelEventSource.ShowPII = true;
-
-            LogHelper.LogExceptionMessage(EventLevel.Error, new ArgumentException(LogHelper.FormatInvariant("Main exception 3: {0}", new SecurityTokenCompressionFailedException("custom inner exception"))));
-            LogHelper.LogExceptionMessage(EventLevel.Error, new ArgumentException(LogHelper.FormatInvariant("Main exception 4: {0}", new InvalidOperationException("system exception"))));
-
-            Assert.Contains("Main exception 3: Microsoft.IdentityModel.Tokens.SecurityTokenCompressionFailedException: custom inner exception", listener.TraceBuffer);
-            Assert.Contains("Main exception 4: System.InvalidOperationException: system exception", listener.TraceBuffer);
         }
     }
 }


Hibernation technique does NOT work.

Hibernation technique does NOT work.

--- PS3Remote.cs
+++ PS3Remote.cs
@@ -238,14 +238,14 @@

         private void timerHibernation_Elapsed(object sender, ElapsedEventArgs e)
         {
-            if (DebugLog.isLogging) DebugLog.write("Attempting to hibernate remote");
+            /*if (DebugLog.isLogging) DebugLog.write("Attempting to hibernate remote");

             try
             {
                 HardwareAPI.DisableDevice(n => n.ToUpperInvariant().Contains
                     ("_VID&0002054C_PID&0306"), true);

-                System.Threading.Thread.Sleep(500);
+                System.Threading.Thread.Sleep(1500);

                 HardwareAPI.DisableDevice(n => n.ToUpperInvariant().Contains
                     ("_VID&0002054C_PID&0306"), false);
@@ -255,7 +255,7 @@
                 if (DebugLog.isLogging) DebugLog.write("Unable to hibernate remote:" + ex.Message);
             }

-            timerFindRemote.Enabled = true;
+            timerFindRemote.Enabled = true;*/
             timerHibernation.Enabled = false;
         }


Make header consistent across samples

Make header consistent across samples

--- src/React.Sample.Mvc4/Views/Home/Index.cshtml
+++ src/React.Sample.Mvc4/Views/Home/Index.cshtml
@@ -10,13 +10,13 @@

-
Hello, ReactJS.NET!

+
ASP.NET MVC Sample

+

 				This is an example of ReactJS.NET's server-side rendering. The initial state of this
 				comments box is rendered server-side, and additional data is loaded via AJAX and rendered
 				client-side.

-

 			@Html.React("CommentsBox", new { initialComments = Model.Comments, page = Model.Page })


Remove supernumerary space.

Remove supernumerary space.

--- src/Gui/Widgets.cs
+++ src/Gui/Widgets.cs
@@ -111,7 +111,6 @@
             return selected && !flag;
         }

-
         public static bool MinimizeButtonFor(Rect rectToMinimize, bool hasCloseButton)
         {
             const float buttonWidthAndHeight = 18f;


Add some explicit tests for column letter to/from number conversion

--- testcases/main/HSSF/Util/TestCellReference.cs
+++ testcases/main/HSSF/Util/TestCellReference.cs
@@ -29,6 +29,28 @@
     [TestFixture]
     public class TestCellReference
     {
+        [Test]
+        public void TestColNumConversion()
+        {
+            Assert.AreEqual(0, CellReference.ConvertColStringToIndex("A"));
+            Assert.AreEqual(1, CellReference.ConvertColStringToIndex("B"));
+            Assert.AreEqual(25, CellReference.ConvertColStringToIndex("Z"));
+            Assert.AreEqual(26, CellReference.ConvertColStringToIndex("AA"));
+            Assert.AreEqual(27, CellReference.ConvertColStringToIndex("AB"));
+            Assert.AreEqual(51, CellReference.ConvertColStringToIndex("AZ"));
+            Assert.AreEqual(701, CellReference.ConvertColStringToIndex("ZZ"));
+            Assert.AreEqual(702, CellReference.ConvertColStringToIndex("AAA"));
+            Assert.AreEqual(18277, CellReference.ConvertColStringToIndex("ZZZ"));
+
+            Assert.AreEqual("A", CellReference.ConvertNumToColString(0));
+            Assert.AreEqual("B", CellReference.ConvertNumToColString(1));
+            Assert.AreEqual("Z", CellReference.ConvertNumToColString(25));
+            Assert.AreEqual("AA", CellReference.ConvertNumToColString(26));
+            Assert.AreEqual("ZZ", CellReference.ConvertNumToColString(701));
+            Assert.AreEqual("AAA", CellReference.ConvertNumToColString(702));
+            Assert.AreEqual("ZZZ", CellReference.ConvertNumToColString(18277));
+        }
+
         [Test]
         public void TestAbsRef1()
         {


Update methods that create URIs to use the already created ones

--- src/SiteScraper.cs
+++ src/SiteScraper.cs
@@ -130,30 +130,29 @@
 					Directory.CreateDirectory(siteDirectory);
 				}

-				Scrape(scrapePair.Url.AbsoluteUri, siteDirectory);
+				Scrape(scrapePair.Url, siteDirectory);
 			}
 		}

-		void Scrape(string url, string path)
+		void Scrape(Uri url, string path)
 		{
 			try
 			{
-				Uri uri = new Uri(url);
 				int depth = 0;
 				string dataPath = null;
-				if (uri.AbsolutePath == "/")
+				if (url.AbsolutePath == "/")
 				{
 					dataPath = Path.Combine(path, "base");
 					if (File.Exists(dataPath))
 						return;
 					else
 					{
-						dataPath = GetUrl(uri.AbsoluteUri, dataPath);
-					}
-				}
-				else
-				{
-					string[] directory = uri.AbsolutePath.Split('/').Where(x => x != "").ToArray();
+						dataPath = GetUrl(url, dataPath);
+					}
+				}
+				else
+				{
+					string[] directory = url.AbsolutePath.Split('/').Where(x => x != "").ToArray();
 					depth = directory.Length;
 					dataPath = dataPath ?? "";
 					foreach (string dir in directory.Reverse().Skip(1).Reverse())
@@ -189,9 +188,17 @@
 				{
 					if (resource.First() == '/')
 					{
-						string nextUrl = String.Format("{0}{1}{2}{3}", uri.Scheme, Uri.SchemeDelimiter, uri.Authority, resource);
-						//Console.WriteLine("nextUrl:{0}", nextUrl);
-						Scrape(nextUrl, path);
+						Uri nextUrl;
+						string urlInput = string.Format("{0}{1}{2}{3}", url.Scheme, Uri.SchemeDelimiter, url.Authority, resource);
+						if (Uri.TryCreate(urlInput, UriKind.Absolute, out nextUrl))
+						{
+							Scrape(nextUrl, path);
+						}
+						else
+						{
+							Console.Error.WriteLine("Link '{0}' was of incorrect form.", urlInput);
+							continue;
+						}
 					}
 					else
 					{
@@ -210,12 +217,12 @@
 			}
 		}

-		string GetUrl(string url, string path)
+		string GetUrl(Uri url, string path)
 		{
 			HttpWebResponse response;
 			try
 			{
-				HttpWebRequest request = HttpWebRequest.Create(new UriBuilder(url).Uri) as HttpWebRequest;
+				HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
 				request.UserAgent = "TurtleSpider/0.1";
 				using (response = request.GetResponse() as HttpWebResponse)
 				{
@@ -241,10 +248,10 @@
 			catch (WebException ex)
 			{
 				response = ex.Response as HttpWebResponse;
-				if (response.StatusCode == HttpStatusCode.NotFound && response.ResponseUri.AbsoluteUri.EndsWith("index.html"))
-				{
-					return GetUrl(response.ResponseUri.Authority + "/index.php", path.Remove(path.Length - 4) + "php");
-				}
+				if (response.StatusCode == HttpStatusCode.NotFound)
+					Console.Error.WriteLine("Link '{0}' not found.", url.AbsoluteUri);
+				else
+					throw ex;
 			}
 			return default(string);
 		}


プロパティの型名を名前空間を省略して表示可能に。

プロパティの型名を名前空間を省略して表示可能に。

--- Enumeration.cs
+++ Enumeration.cs
@@ -46,6 +46,9 @@
         private const bool DefaultUseOverriddenToString = false;
         private static bool useOverriddenToString;

+        private const bool DefaultShowTypeNameOnly = false;
+        private static bool showTypeNameOnly;
+
         private static List<Type> typesAsString;

         static Enumeration()
@@ -100,6 +103,17 @@
         {
             get { return showPropertyType; }
             set { showPropertyType = value; }
+        }
+
+        /// <summary>
+        /// プロパティの型情報を表示する時、型の名前空間を省略し、
+        /// 型名のみを表示するかを取得または設定する。
+        /// デフォルト値はfalse。
+        /// </summary>
+        public static bool ShowTypeNameOnly
+        {
+            get { return showTypeNameOnly; }
+            set { showTypeNameOnly = value; }
         }

         /// <summary>
@@ -348,11 +362,13 @@

             if (ShowPropertyType)
             {
-                str += " (" + type + ")";
-            }
+                str += " (" + (ShowTypeNameOnly ? type.Name : type.ToString()) + ")";
+            }
+

             return str;
         }
+

         /// <summary>
         /// 指定した型のToStringメソッドがオーバーライドされているかどうかを判定する。


Quick fix

Quick fix

--- FTPizza/Ftp.cs
+++ FTPizza/Ftp.cs
@@ -166,7 +166,7 @@

                     using (Stream responseStream = response.GetResponseStream())
                     {
-                        using (FileStream writer = new FileStream(downloadList[i], FileMode.Create))
+                        using (FileStream writer = new FileStream(remoteFile, FileMode.Create))
                         {
                             byte[] buffer = new byte[2048];
                             int bytesRead = responseStream.Read(buffer, 0, buffer.Length);


Tolerate 0-value (missing) local size headers.

Some rogue zip creators fail to set a non-zero local header size in
Extra Data causing SharpZLib to reject them, this patch causes the
library to tolerate that particular oversight like most other libraries.

--- src/Zip/ZipFile.cs
+++ src/Zip/ZipFile.cs
@@ -1249,16 +1249,17 @@
 				// Size can be verified only if it is known in the local header.
 				// it will always be known in the central header.
 				if (((localFlags & (int)GeneralBitFlags.Descriptor) == 0) ||
-					((size > 0) || (compressedSize > 0))) {
-
-					if (size != entry.Size) {
+					((size > 0 || compressedSize > 0) && entry.Size > 0)) {
+
+					if ((size != 0)
+						&& (size != entry.Size)) {
 						throw new ZipException(
 							string.Format("Size mismatch between central header({0}) and local header({1})",
 								entry.Size, size));
 					}

-					if (compressedSize != entry.CompressedSize &&
-						compressedSize != 0xFFFFFFFF && compressedSize != -1) {
+					if ((compressedSize != 0)
+						&& (compressedSize != entry.CompressedSize && compressedSize != 0xFFFFFFFF && compressedSize != -1)) {
 						throw new ZipException(
 							string.Format("Compressed size mismatch between central header({0}) and local header({1})",
 							entry.CompressedSize, compressedSize));


Fixing where Expression Call in JoeQuerable Filter

--- Queryable.cs
+++ Queryable.cs
@@ -499,19 +499,16 @@

         private Expression BuildFilterExpression()
         {
-            Expression ex = null;
+            Expression ex = Expression.Constant(_iquery);
             if (!String.IsNullOrEmpty(_filter))
             {
                 Expression filterEx = Expression.Lambda(_odataFilter.BuildExpression(), new ParameterExpression[] { _parameterExpression });
-                ex = Expression.Call(typeof(Queryable), "Where", new[] { _queryType }, Expression.Constant(_iquery), filterEx);
+                ex = Expression.Call(typeof(Queryable), "Where", new[] { _queryType }, ex, filterEx);
             }
             if (this._hasWhere)
                 ex = Expression.Call(typeof(FilterExtensions), "Filter", new[] { _queryType }, ex, Expression.Constant(_where), Expression.Constant(null, typeof(Object)));

-            if (ex.NotNull())
-                return ex;
-            else
-                return Expression.Constant(_iquery);
+            return ex;
         }

         private Expression BuildGroupByExpression(Expression ex)


Renumber Figures and Tables

Renumber Figures and Tables

--- IfcDocUtils.cs
+++ IfcDocUtils.cs
@@ -477,6 +477,7 @@
 		{
 			HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
 			string documentation = Regex.Replace(html, @"
"\s+", "
"").Replace("
\r\n", "
");
+			documentation = DocumentationISO.UpdateNumbering(documentation, new List<DocumentationISO.ContentRef>(), new List<DocumentationISO.ContentRef>(), null);
 			doc.LoadHtml(documentation);
 			HtmlNode node = doc.DocumentNode;
 			return convertToMarkdown(node, new ConvertMarkdownOptions());
@@ -664,43 +665,7 @@
 					return node.OuterHtml;
 				else if (string.Compare(name, "table", true) == 0)
 				{
-					return node.OuterHtml + "\r\n\r\n";
-					//List<string> headerRow = new List<string>();
-					//List<string> delimiterRow = new List<string>();
-					//string body = "";
-					//if (node.ChildNodes.Count > 0)
-					//{
-					//	foreach (HtmlNode tr in node.FirstChild.ChildNodes)
-					//	{
-					//		extractTableHeader(tr, childOptions, ref headerRow, ref delimiterRow);
-					//	}
-
-					//	result += string.Join(" | ", headerRow) + "\r\n";
-					//	result += string.Join(" | ", delimiterRow) + "\r\n";
-					//	foreach (HtmlNode hn in node.ChildNodes.Skip(1))
-					//	{
-					//		List<string> row = new List<string>();
-					//		if (string.Compare(hn.Name, "tr", true) == 0)
-					//		{
-					//			extractTableRow(hn, childOptions, ref row);
-					//			if (row.Count > 0)
-					//				body +=  string.Join(" | ", row) + "\r\n";
-					//		}
-					//		else if (string.Compare(hn.Name, "tbody", true) == 0)
-					//		{
-					//			foreach (HtmlNode tr in hn.ChildNodes)
-					//			{
-					//				if (string.Compare(tr.Name, "tr", true) == 0)
-					//				{
-					//					extractTableRow(tr, options, ref row);
-					//					if (row.Count > 0)
-					//						body += "| " + string.Join(" | ", row) + " |\r\n";
-					//				}
-					//			}
-					//		}
-					//	}
-					//	return result + body + "\r\n\r\n";
-					//}
+					return convertTable(node, options);
 				}
 				else if (string.Compare(name, "u", true) == 0)
 					return node.OuterHtml;
@@ -733,6 +698,50 @@
 			return result + inner + suffix;
 		}

+		private static string convertTable(HtmlNode node, ConvertMarkdownOptions options)
+		{
+			if(node.ChildNodes.Count == 2)
+			{
+
+			}
+			return node.OuterHtml + "\r\n\r\n";
+			//List<string> headerRow = new List<string>();
+			//List<string> delimiterRow = new List<string>();
+			//string body = "";
+			//if (node.ChildNodes.Count > 0)
+			//{
+			//	foreach (HtmlNode tr in node.FirstChild.ChildNodes)
+			//	{
+			//		extractTableHeader(tr, childOptions, ref headerRow, ref delimiterRow);
+			//	}
+
+			//	result += string.Join(" | ", headerRow) + "\r\n";
+			//	result += string.Join(" | ", delimiterRow) + "\r\n";
+			//	foreach (HtmlNode hn in node.ChildNodes.Skip(1))
+			//	{
+			//		List<string> row = new List<string>();
+			//		if (string.Compare(hn.Name, "tr", true) == 0)
+			//		{
+			//			extractTableRow(hn, childOptions, ref row);
+			//			if (row.Count > 0)
+			//				body +=  string.Join(" | ", row) + "\r\n";
+			//		}
+			//		else if (string.Compare(hn.Name, "tbody", true) == 0)
+			//		{
+			//			foreach (HtmlNode tr in hn.ChildNodes)
+			//			{
+			//				if (string.Compare(tr.Name, "tr", true) == 0)
+			//				{
+			//					extractTableRow(tr, options, ref row);
+			//					if (row.Count > 0)
+			//						body += "| " + string.Join(" | ", row) + " |\r\n";
+			//				}
+			//			}
+			//		}
+			//	}
+			//	return result + body + "\r\n\r\n";
+			//}
+		}
 		private static void extractTableHeader(HtmlNode node, ConvertMarkdownOptions options, ref List<string> headerRow, ref List<string> delimiterRow)
 		{
 			if (string.Compare(node.Name, "td", true) == 0 || string.Compare(node.Name, "th", true) == 0)


Delete Targeting.cs

Delete Targeting.cs

--- Targeting.cs
+++ Targeting.cs
@@ -1,318 +0,0 @@
-// Copyright (C) 2011-2016 Bossland GmbH
-// See the file LICENSE for the source code's detailed license
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.InteropServices;
-using JetBrains.Annotations;
-
-
-using Buddy.BehaviorTree;
-using Buddy.Common;
-using Buddy.CommonBot;
-using Buddy.Swtor;
-using Buddy.Swtor.Objects;
-using Buddy.Swtor.Objects.Containers;
-using Buddy.Navigation;
-using Buddywing;
-using Buddy.CommonBot.Settings;
-using Buddy.Common.Math;
-using DefaultCombat.Helpers;
-
-
-using Action = Buddy.BehaviorTree.Action;
-
-
-namespace DefaultCombat.Core
-{
-
-    public static class Targeting
-    {
-        //Collections
-        public static List<TorCharacter> HealCandidates;
-        public static List<TorCharacter> Tanks;
-        public static List<Vector3> HealCandidatePoints;
-        public static List<TorCharacter> Enemies = new List<TorCharacter>();
-        public static List<Vector3> EnemyPoints = new List<Vector3>();
-
-        //Static Points and People
-        public static string TankName = "";
-        public static string TankNameStart;
-        public static string TankNameCheck;
-        public static TorCharacter Tank;
-        public static TorCharacter HealTarget;
-        public static TorCharacter AoeHealTarget;
-        public static TorCharacter AoeDpsTarget;
-        public static TorCharacter DispelTarget;
-        private static TorPlayer Me
-        {
-            get { return BuddyTor.Me; }
-        }
-        private const int AoedpsCountNeeded = 3;
-
-        public static Vector3 AoeDpsPoint = Vector3.Zero;
-
-        //Counts
-        public static int AoeHealCount;
-        private const int AoeHealCountNeeded = 2;
-        public static int AoeDpsCount;
-        public static int AoePeanutButterCount;
-        private static int _aoepbCountNeeded = 3;
-        public static bool ShouldAoeHeal;
-        public static bool ShouldAoe;
-        public static bool ShouldPbaoe;
-
-        //Settings for making target queries
-        private const int MaxHealth = Health.Max;
-        private const float HealingDistance = Distance.Ranged;
-        private const float AoeHealDist = Distance.HealAoe;
-        private const int AoeHealHp = Health.High;
-        public static Vector3 AoeHealPoint = Vector3.Zero;
-
-        //Determine if we should use the tank's target.
-        private static bool UseTankTarget
-        {
-            get
-            {
-                return Me.CurrentTarget == null && Tank != null && Tank.Guid != Me.Guid && Tank.InCombat && Tank.CurrentTarget != null;
-            }
-        }
-
-
-        //Caching shit
-        public static int cacheCount = 75;
-        public static int maxCacheCount = 2;
-        public static List<TorCharacter> Objects;
-        public static List<TorCharacter> objects;
-        public static Composite ScanTargets
-        {
-            get
-            {
-                return new Action(delegate
-                {
-                    //increment shit!
-                    cacheCount++;
-
-                    //Reset counts
-                    AoeHealCount = 0;
-                    AoeDpsCount = 0;
-                    AoePeanutButterCount = 0;
-                    //Reset Targets
-               //     Tank = null;
-                    HealTarget = null;
-                    AoeHealTarget = null;
-                    AoeHealPoint = Vector3.Zero;
-                    DispelTarget = null;
-
-
-                    //Reset Lists and shit
-                    HealCandidates = new List<TorCharacter>();
-                    HealCandidatePoints = new List<Vector3>();
-                    EnemyPoints = new List<Vector3>();
-                    Tanks = new List<TorCharacter>();
-                    ShouldAoeHeal = false;
-                    var objects = GetTorCharacters();
-
-
-                    //update the cache when we feel like it
-                    if (cacheCount >= maxCacheCount)
-                        updateObjects();
-
-                    if (DefaultCombat.IsHealer)
-                    {
-
-                        foreach (TorCharacter p in Objects)
-                        {
-                            //Doing this shit early
-
-                            //    Logger.Write(p.Name);
-                            if (Tank != null && Tank == p)
-                                Tank = p;
-
-                            if (Tank == null && p.Name == TankName && !p.IsDead)
-                                Tank = p;
-
-                            // Got a Focus Tank?
-                            if (Tank == null && Me.FocusTargetIsActive && p.Guid == Me.FocusTargetID && !p.IsDead)
-                                Tank = p;
-
-                            if (p.IsPartyRoleTank())
-                                Tanks.Add(p);
-
-                            // Damn couldnt find a tank ima be the boss!
-
-                            if (Tank == null && Me.Companion != null)
-                                Tank = Me.Companion;
-
-                            if (Tank == null && Me.Companion == null)
-                                Tank = Me;
-
-                            //Check for HealTarget
-                            if (p.HealthPercent <= MaxHealth && !p.IsDead)
-                            {
-                                if (HealTarget == null || p.HealthPercent < HealTarget.HealthPercent)
-                                    HealTarget = p;
-
-                                //Add to candidtates list
-                                HealCandidates.Add(p);
-                                HealCandidatePoints.Add(p.Position);
-
-                                //increment our AOEHealCount
-                                if (p.HealthPercent <= AoeHealHp)
-                                    AoeHealCount++;
-                            }
-
-                            if (p.NeedsCleanse())
-                            {
-
-                                if (DispelTarget != null && p.HealthPercent < DispelTarget.HealthPercent)
-                                    DispelTarget = p;
-
-                                if (DispelTarget == null)
-                                    DispelTarget = p;
-                            }
-
-                        }
-
-
-                        //We have checked everyone out, lets set AOE stuff
-                        if (AoeHealCount >= AoeHealCountNeeded)
-                        {
-                            ShouldAoeHeal = true;
-                            //AOEHealTarget
-                            AoeHealTarget = AoeHealLocation(AoeHealDist);
-
-                            //AOEHealPoint
-                            if (AoeHealTarget != null)
-                                AoeHealPoint = AoeHealLocation(AoeHealTarget);
-                        }
-                    }
-
-                    foreach (var c in objects)
-                    {
-
-
-                        //Dps
-                        if (c.IsValidTarget())
-                        {
-                            //Enemies.Add(c);
-                            EnemyPoints.Add(c.Position);
-                        }
-
-                        if (Me.CurrentTarget != null)
-                            ShouldAoe = CheckDpsAoe(AoedpsCountNeeded, Distance.MeleeAoE, Me.CurrentTarget.Position);
-
-                        ShouldPbaoe = CheckDpsAoe(AoedpsCountNeeded, Distance.MeleeAoE, Me.Position);
-                    }
-
-
-
-
-
-                    return RunStatus.Failure;
-                });
-            }
-        }
-
-        public static void SetTank()
-        {
-            TankNameStart = Me.CurrentTarget.ToString();
-            TankNameCheck = TankNameStart.Substring(0, TankNameStart.IndexOf(','));
-
-            if (Me.CurrentTarget != null && Me.CurrentTarget.IsFriendly && !TankName.Equals(TankNameCheck))
-            {
-                TankName = TankNameStart.Substring(0, TankNameStart.IndexOf(','));
-                Logger.Write("Tank set to : " + TankName);
-                Tank = null;
-            }
-            else
-            {
-                TankName = "";
-                Tank = null;
-                Logger.Write("Cleared Tank");
-            }
-        }
-
-        private static void updateObjects()
-        {
-            if (DefaultCombat.IsHealer)
-            {
-                Objects = Me.PartyMembers(false).ToList().FindAll(p =>
-                !p.IsDead
-                && p.DistanceSqr < HealingDistance * HealingDistance
-                && p.InLineOfSight);
-
-                if (!Objects.Contains(Me))
-                    Objects.Add(Me);
-
-                if (Me.Companion != null && !Objects.Contains(Me.Companion))
-                    Objects.Add(Me.Companion);
-            }
-
-            //Reset dat count
-            cacheCount = 0;
-        }
-
-        public static List<TorCharacter> GetTorCharacters()
-        {
-            using (BuddyTor.Memory.AcquireFrame())
-            {
-                //List<TorCharacter> objects = ObjectManager.GetObjects<TorCharacter>().ToList();
-
-                /*
-                if (Me.Companion != null)
-                    objects.Add(Me.Companion);
-                */
-                var npcs = ObjectManager.GetObjects<TorNpc>();
-                var objects = npcs.Cast<TorCharacter>().ToList();
-
-                return objects;
-            }
-        }
-
-        private static Vector3 AoeHealLocation(TorCharacter p)
-        {
-            return p != null ? p.Position : Vector3.Zero;
-        }
-
-        private static TorCharacter AoeHealLocation(float dist)
-        {
-            using (BuddyTor.Memory.AcquireFrame())
-            {
-                TorCharacter pt = Me;
-
-                if (Tank != null)
-                    pt = Tank;
-
-                var currentPtCount = PointsAroundPoint(pt.Position, HealCandidatePoints, dist);
-                var tempCount = 0;
-                foreach (var p in HealCandidates)
-                {
-                    tempCount = PointsAroundPoint(p.Position, HealCandidatePoints, dist);
-                    if (p.Guid != Me.Guid && tempCount > currentPtCount)
-                    {
-                        pt = p;
-                        currentPtCount = tempCount;
-                    }
-                }
-
-                return tempCount >= AoeHealCountNeeded ? pt : null;
-            }
-        }
-
-        public static bool CheckDpsAoe(int minMobs, float distance, Vector3 center)
-        {
-            return PointsAroundPoint(center, EnemyPoints, distance) >= minMobs;
-        }
-
-        private static int PointsAroundPoint(Vector3 pt, List<Vector3> l, float dist)
-        {
-            using (BuddyTor.Memory.AcquireFrame())
-            {
-                var maxDistance = dist * dist;
-                return l.Count(p => p.DistanceSqr(pt) <= maxDistance);
-            }
-        }
-    }
-}


Added more Curry overloads - up to 10 parameters


環境変数が小文字になっているのを修正

環境変数が小文字になっているのを修正

--- PlayService.cs
+++ PlayService.cs
@@ -126,7 +126,7 @@
                     }
                 }

-                foreach (DictionaryEntry env in envs) {
+                foreach (var env in envs) {
                     if (psi.EnvironmentVariables.ContainsKey((string)env.Key)) {
                         psi.EnvironmentVariables.Remove((string)env.Key);
                     }
@@ -481,9 +481,9 @@
         /// </summary>
         /// <param name="config"></param>
         /// <returns></returns>
-        private StringDictionary GetEnv(Config config)
-        {
-            var result = new StringDictionary();
+        private Dictionary<string,string> GetEnv(Config config)
+        {
+            var result = new Dictionary<string,string>();
             if (Program.Param.Env != null) {

                 Program.Param.Env.Split(',')
@@ -567,14 +567,14 @@
             return result;
         }

-        private string GenerateTrialLauncher(string appHome, string launcher, StringDictionary envs, Encoding outputEncoding)
+        private string GenerateTrialLauncher(string appHome, string launcher, Dictionary<string,string> envs, Encoding outputEncoding)
         {
             var builder = new StringBuilder();
             builder.AppendLine(@"set local");
             builder.AppendLine($@"chcp {outputEncoding.CodePage}");
             builder.AppendLine($@"cd {appHome}");
             builder.AppendLine(@"@echo.");
-            foreach (DictionaryEntry env in envs) {
+            foreach (var env in envs) {
                 builder.AppendLine($@"set {env.Key}={Utils.BatchEscape((string)env.Value)}");
             }
             builder.AppendLine(@"@echo.");


added comments to Edge's ToString method

--- YAGL/Edge.cs
+++ YAGL/Edge.cs
@@ -115,6 +115,10 @@
             return hash;
         }

+        /// <summary>
+        /// Return the <see cref="string"/> representation of the current <see cref="Edge{TVertex}"/>instance.
+        /// </summary>
+        /// <returns>The <see cref="string"/> representation of the current <see cref="Edge{TVertex}"/>instance.</returns>
         public override string ToString()
         {
             return string.Format("{{ {0}, {1} }}", _end1, _end2);


Refactor Color helper names

Refactor Color helper names

--- agg/Color.cs
+++ agg/Color.cs
@@ -1097,7 +1097,7 @@

 	public static class ColorExtensionMethods
 	{
-		public static IColorType AdjustContrast(this IColorType colorToAdjust, IColorType fixedColor, double minimumRequiredContrast = 3)
+		public static IColorType WithContrast(this IColorType colorToAdjust, IColorType fixedColor, double minimumRequiredContrast = 3)
 		{
 			var contrast = colorToAdjust.Contrast(fixedColor);
 			int tries = 0;
@@ -1106,11 +1106,11 @@
 			{
 				if (fixedColor.Luminance0To1() < .5)
 				{
-					colorToAdjust = colorToAdjust.AdjustLightness(1.05).ToColor();
+					colorToAdjust = colorToAdjust.WithLightnessAdjustment(1.05).ToColor();
 				}
 				else
 				{
-					colorToAdjust = colorToAdjust.AdjustLightness(.95).ToColor();
+					colorToAdjust = colorToAdjust.WithLightnessAdjustment(.95).ToColor();
 				}
 				contrast = colorToAdjust.Contrast(fixedColor);
 			}
@@ -1118,7 +1118,12 @@
 			return colorToAdjust;
 		}

-		public static IColorType AdjustSaturation(this IColorType original, double saturationMultiplier)
+		public static Color WithAlpha(this Color color, int alpha)
+		{
+			return new Color(color, alpha);
+		}
+
+		public static ColorF WithSaturationAdjustemnt(this IColorType original, double saturationMultiplier)
 		{
 			double hue0To1;
 			double saturation0To1;
@@ -1236,7 +1241,7 @@
 			return Math.Round((min + max) / 2, 2);
 		}

-		public static IColorType SetLightness(this IColorType original, double lightness)
+		public static ColorF WithLightness(this IColorType original, double lightness)
 		{
 			double hue0To1;
 			double saturation0To1;
@@ -1249,7 +1254,7 @@
 			return ColorF.FromHSL(hue0To1, saturation0To1, lightness);
 		}

-		public static IColorType AdjustLightness(this IColorType original, double lightnessMultiplier)
+		public static ColorF WithLightnessAdjustment(this IColorType original, double lightnessMultiplier)
 		{
 			double hue0To1;
 			double saturation0To1;


Add support of display board of White's "San-San" and "Shi-Shi"

--- Shioi/Form1.cs
+++ Shioi/Form1.cs
@@ -230,7 +230,7 @@
 				}
 			}
 			// Draw other object
-			string[] moveTypeString = { "５", "□", "４", "３", "禁" , "43" };
+			string[] moveTypeString = { "５", "□", "４", "３", "禁" , "43" , "33", "44"};
 			for(int y = 0; y < BoardSize; ++y) {
 				for(int x = 0; x < BoardSize; ++x) {
 					if(FormRenju.Point(x, y) != Stone.None) continue;
@@ -865,9 +865,9 @@
 					}
 				}
 				// If you make some Quadruplex of black, it's Prohibited move(Kinsyu) "Shi-Shi".
-				if(count4_1 + count4_2 >= 2 && myStone == Stone.Black) return 4;
+				if(count4_1 + count4_2 >= 2) return (myStone == Stone.Black ? 4 : 7);
 				// If you make some Triplex of black, it's Prohibited move(Kinsyu) "San-San".
-				if(count3 >= 2 && myStone == Stone.Black) return 4;
+				if(count3 >= 2) return (myStone == Stone.Black ? 4 : 6);

 				// Other Judge
 				if(count4_1 + count4_2 == 1 && count3 == 1) return 5;


-added some illusions and reworded some effects

--- SpellParser.cs
+++ SpellParser.cs
@@ -79,6 +79,7 @@
         Damage_Shield = 59,
         Memory_Blur = 63,
         Summon_Skeleton_Pet = 71,
+        Feign_Death = 74,
         Current_HP_Non_Repeating = 79,
         Resurrect = 81,
         Summon_Player = 82,
@@ -118,7 +119,7 @@
         Endurance_Repeating = 189,
         Hate_Repeating = 192,
         Skill_Attack = 193,
-        Hate_Reset = 194,
+        Cancel_All_Aggro = 194,
         Taunt = 199,
         Proc_Rate = 200,
         Weapon_Damage_Bonus = 220,
@@ -139,6 +140,7 @@
         Cast_On_Spell = 383,
         Twincast_Chance = 399,
         Heal_From_Mana = 400,
+        Song_Effectiveness = 413,
         Teleport_to_Caster_Anchor = 437,
         Teleport_to_Player_Anchor = 438
     }
@@ -381,6 +383,7 @@
         Spirit_Wolf = 120,
         Iksar = 128,
         Vah_Shir = 130,
+        Mosquito = 134,
         Kunark_Goblin = 137,
         Nearby_Object = 142,
         Tree = 143,
@@ -397,6 +400,7 @@
         Golem = 374,
         Pyrilen = 411,
         Dragorn = 413,
+        Rat = 415,
         Gelidran = 417,
         Goblin = 433,
         Kirin = 434,
@@ -445,7 +449,8 @@
         Flame_Telmira = 653,
         Amygdalan = 663,
         Royal_Guardian = 667,
-        Bunny = 668
+        Bunny = 668,
+        Undead_Thelasa = 695,
     }

     public enum SpellFaction
@@ -901,7 +906,7 @@
                 case 57:
                     return "Levitate";
                 case 58:
-                    return String.Format("Illusion: {0}", Spell.FormatEnum((SpellIllusion)base1), base2);
+                    return String.Format("Illusion: {0} ({1})", Spell.FormatEnum((SpellIllusion)base1), base2);
                 case 59:
                     return Spell.FormatCount("Damage Shield", -value);
                 case 61:
@@ -1179,8 +1184,8 @@
                     return String.Format("{0} Attack for {1} with {2}% Accuracy Mod", Spell.FormatEnum(Skill), base1, base2);
                 case 194:
                     if (value < 100)
-                        return String.Format("Hate Reset (Success: {0}%)", value);
-                    return "Hate Reset";
+                        return String.Format("Cancel All Aggro (Success: {0}%)", value);
+                    return "Cancel All Aggro";
                 case 195:
                     // 100 is full resist. not sure why some spells have more
                     return String.Format("Stun Resist ({0})", value);
@@ -1469,7 +1474,7 @@
                 case 411:
                     return String.Format("Limit Class: {0}", (SpellClassesMask)(value >> 1));
                 case 413:
-                    return Spell.FormatPercent("Spell Effectiveness", value);
+                    return Spell.FormatPercent("Song Effectiveness", value);
                 case 414:
                     return String.Format("Limit Bard Skill: {0}", Spell.FormatEnum((SpellSkill)base1));
                 case 416:
@@ -1487,7 +1492,8 @@
                         return String.Format("Add Proc: [Spell {0}] with {1}% Rate Mod", base1, base2);
                     return String.Format("Add Proc: [Spell {0}]", base1);
                 case 424:
-                    return String.Format("Gradual {2} for {0} (Unknown: {1})", Math.Abs(base1), base2, base1 > 0 ? "Push" : "Pull");
+                    // base1 is probably velocity. base2 might be range?
+                    return String.Format("Gradual {0}: Base1={1} Base2={2}", base1 > 0 ? "Push" : "Pull", Math.Abs(base1), base2);
                 case 427:
                     return String.Format("Cast on Skill Use: [Spell {0}] Chance: {1}%", base1, base2 / 10);
                 case 428:
@@ -1984,7 +1990,7 @@

             // debug stuff
-            //spell.Unknown = ParseFloat(fields[159]);
+            //spell.Unknown = ParseFloat(fields[184]);

             // each spell has a different casting level for all 16 classes
             for (int i = 0; i < spell.Levels.Length; i++)


TurboGather Update

TurboGather Update

- Fix for node rewards
- Some code cleanup (I think?)

--- TurboGather.cs
+++ TurboGather.cs
@@ -15,7 +15,7 @@

 namespace Oxide.Plugins
 {
-    [Info("TurboGather", "redBDGR", "1.1.10", ResourceId = 2221)]
+    [Info("TurboGather", "redBDGR", "1.1.11", ResourceId = 2221)]
     [Description("Lets players activate a resouce gather boost for a certain amount of time")]

     class TurboGather : RustPlugin
@@ -368,6 +368,12 @@
                 DoGather(player, item);
             }
         }
+
+        void OnDispenserBonus(ResourceDispenser dispenser, BasePlayer player, Item item)
+        {
+            if (dispenserEnabled)
+                DoGather(player, item);
+        }
         #endregion

         #region Command


Updated version number to 0.0.17 for development.

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -13,6 +13,6 @@
 // An odd patch number is a development version, an even patch number is
 // a released version.

-[assembly: AssemblyVersion("0.0.16")]
-[assembly: AssemblyFileVersion("0.0.16")]
-[assembly: AssemblyInformationalVersion("0.0.16")]
+[assembly: AssemblyVersion("0.0.17")]
+[assembly: AssemblyFileVersion("0.0.17")]
+[assembly: AssemblyInformationalVersion("0.0.17")]


V3.2.9

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -26,5 +26,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("3.2.8.0")]
-[assembly: AssemblyFileVersion("3.2.8.0")]
+[assembly: AssemblyVersion("3.2.9.0")]
+[assembly: AssemblyFileVersion("3.2.9.0")]


updated server for threadpool

updated server for threadpool

--- Wire/Server.cs
+++ Wire/Server.cs
@@ -10,27 +10,23 @@
     {
         private readonly HttpListener _listener;
         private readonly Thread _listenerThread;
-        private readonly Thread[] _workers;
-        private readonly ManualResetEvent _stop, _ready;
-        private Queue<HttpListenerContext> _queue;
+        private readonly ManualResetEvent _stop;

         public int Port { get; private set; }

         public WireHTTPServer(int port = 80, int maxThreads = 8)
         {
-            _workers = new Thread[maxThreads];
-            _queue = new Queue<HttpListenerContext>();
             _stop = new ManualResetEvent(false);
-            _ready = new ManualResetEvent(false);
             _listener = new HttpListener();
             _listenerThread = new Thread(() => {
                 while (_listener.IsListening) {
                     var context = _listener.BeginGetContext((x) => {
                         try {
-                            lock (_queue) {
-                                _queue.Enqueue(_listener.EndGetContext(x));
-                                _ready.Set();
-                            }
+                            var _context = _listener.EndGetContext(x);
+                            ThreadPool.QueueUserWorkItem(new WaitCallback(async x => {
+                                await API.Resolve(API.FromHttpListener(_context));
+                                _context.Response.Close();
+                            }));
                         }
                         catch { return; }
                     }, null);
@@ -41,28 +37,6 @@
             _listener.Prefixes.Add(String.Format(@"http://+:{0}/", Port));
             _listener.Start();
             _listenerThread.Start();
-            for (int i = 0; i < _workers.Length; i++) {
-                _workers[i] = new Thread(async () => {
-                    WaitHandle[] wait = new[] { _ready, _stop };
-                    while (0 == WaitHandle.WaitAny(wait)) {
-                        HttpListenerContext context;
-                        lock (_queue) {
-                            if (_queue.Count > 0)
-                                context = _queue.Dequeue();
-                            else {
-                                _ready.Reset();
-                                continue;
-                            }
-                        }
-                        try {
-                            await API.Resolve(API.FromHttpListener(context));
-                            context.Response.Close();
-                        }
-                        catch (Exception e) { Console.Error.WriteLine(e); }
-                    }
-                });
-                _workers[i].Start();
-            }
         }

         public void Wait()
@@ -75,8 +49,6 @@
         {
             _stop.Set();
             _listenerThread.Join();
-            foreach (Thread worker in _workers)
-                worker.Join();
             _listener.Stop();
         }


Prepare release 4.5.1 - increase CslaGenFork version. Work Item #1907

--- trunk/Solutions/CslaGenFork/Properties/AssemblyInfo.cs
+++ trunk/Solutions/CslaGenFork/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("4.5.0.*")]
+[assembly: AssemblyVersion("4.5.1.*")]

 //
 // In order to sign your assembly you must specify a key to use. Refer to the
@@ -58,6 +58,6 @@
 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]
 [assembly: AssemblyKeyName("")]
-[assembly: AssemblyFileVersionAttribute("4.5.0")]
+[assembly: AssemblyFileVersionAttribute("4.5.1")]
 [assembly: GuidAttribute("5c019c4f-d2ab-40dd-9860-70bd603b6017")]
 [assembly: ComVisibleAttribute(false)]


Fixed wire rendering bug in edit mode when the wire was only one segment making it impossible to change name of objects.

--- AGXUnity/Rendering/SegmentSpawner.cs
+++ AGXUnity/Rendering/SegmentSpawner.cs
@@ -180,25 +180,29 @@
         }
       }

-      if ( m_separateFirstObjectPrefabPath != string.Empty && m_firstSegmentInstance == null ) {
-        m_firstSegmentInstance = PrefabLoader.Instantiate<GameObject>( m_separateFirstObjectPrefabPath );
-        m_firstSegmentInstance.hideFlags = HideFlags.DontSaveInEditor;
-        setMaterialFunc( m_firstSegmentInstance, Material );
-        AddSelectionProxy( m_firstSegmentInstance );
-        Add( m_firstSegmentInstance );
-      }
-      else if ( m_segmentInstance == null ) {
-        m_segmentInstance = PrefabLoader.Instantiate<GameObject>( m_prefabObjectPath );
-        m_segmentInstance.hideFlags = HideFlags.DontSaveInEditor;
-        setMaterialFunc( m_segmentInstance, Material );
-        AddSelectionProxy( m_segmentInstance );
-        Add( m_segmentInstance );
+      if ( m_separateFirstObjectPrefabPath != string.Empty ) {
+        if ( m_firstSegmentInstance == null ) {
+          m_firstSegmentInstance = PrefabLoader.Instantiate<GameObject>( m_separateFirstObjectPrefabPath );
+          m_firstSegmentInstance.hideFlags = HideFlags.DontSaveInEditor;
+          setMaterialFunc( m_firstSegmentInstance, Material );
+          AddSelectionProxy( m_firstSegmentInstance );
+          Add( m_firstSegmentInstance );
+        }
       }

       // Push back new segment if there aren't enough segments already created.
       int currentChildCount = m_segments.transform.childCount;
-      if ( m_counter == currentChildCount )
-        Add( GameObject.Instantiate( m_segmentInstance ) );
+      if ( m_counter == currentChildCount ) {
+        if ( m_segmentInstance == null ) {
+          m_segmentInstance = PrefabLoader.Instantiate<GameObject>( m_prefabObjectPath );
+          m_segmentInstance.hideFlags = HideFlags.DontSaveInEditor;
+          setMaterialFunc( m_segmentInstance, Material );
+          AddSelectionProxy( m_segmentInstance );
+          Add( m_segmentInstance );
+        }
+        else
+          Add( GameObject.Instantiate( m_segmentInstance ) );
+      }
       else if ( m_counter > currentChildCount )
         throw new Exception( "Internal counter is not in sync. Counter = " + m_counter + ", #children = " + currentChildCount );


Flooding

Flooding

Fix a bug causing out of bound exception (as out of bound is not
accessible, returns false anyway).

--- meilleur-dev-itec-2015/Flooding/Program.cs
+++ meilleur-dev-itec-2015/Flooding/Program.cs
@@ -17,7 +17,14 @@

         static bool GetPosition(int x, int y)
         {
-            return map[x * l + y];
+            try
+            {
+                return map[x * l + y];
+            }
+            catch
+            {
+                return false;
+            }
         }

         static bool Process(int x, int y)


Added documentation for IServiceControlManager.GetServiceKeyName

--- winsvc/IServiceControlManager.cs
+++ winsvc/IServiceControlManager.cs
@@ -163,7 +163,23 @@
         /// <exception cref="Win32Exception">Thrown if the underlying API call fails.</exception>
         IEnumerable<ENUM_SERVICE_STATUS_PROCESS> EnumServicesStatusEx(SERVICE_TYPE serviceType, SERVICE_STATE_FLAGS serviceStateFlags);

+        /// <summary>
+        /// Retrieves the service name of the specified service.
+        ///
+        /// There are two names for a service: the service name and the display name. The service name is the name of the service's key
+        /// in the registry. The display name is a user-friendly name that appears in the Services control panel application, and is
+        /// used with the NET START command. Both names are specified with the CreateService function and can be modified with the
+        /// ChangeServiceConfig function. Information specified for a service is stored in a key with the same name as the service
+        /// name under the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ServiceName registry key.
+        ///
+        /// To map the service name to the display name, use the GetServiceDisplayName function.To map the display name to the service
+        /// name, use the GetServiceKeyName function.
+        /// </summary>
+        /// <param name="displayName">The service display name.</param>
+        /// <returns>The service name</returns>
+        /// <exception cref="Win32Exception">Thrown if the underlying API call fails.</exception>
         string GetServiceKeyName(string displayName);
+
         string GetServiceDisplayName(string serviceName);
     }
 }


Fix backup buffer bug

Fix backup buffer bug

--- Apps/Audiotica.Shared/AutcpHelper.cs
+++ Apps/Audiotica.Shared/AutcpHelper.cs
@@ -8,9 +8,13 @@
 using System.Runtime.InteropServices.WindowsRuntime;
 using System.Text;
 using System.Threading.Tasks;
+
+using Audiotica.Core.Utils;
+
+using PCLStorage;
+
 using Windows.Storage;
-using Audiotica.Core.Utils;
-using PCLStorage;
+
 using CreationCollisionOption = PCLStorage.CreationCollisionOption;

 #endregion
@@ -20,8 +24,115 @@
     public static class AutcpFormatHelper
     {
         public const int FormatVersion = 2;
+
         public const int FormatCompatabilityVersion = 2;
+
         private const int FileHeaderSize = 37;
+
+        public static bool AddHeader(Stream stream)
+        {
+            var fileHeader = new AutcpFileHeader
+            {
+                signature = Encoding.UTF8.GetBytes("AUTCP"),
+                version = FormatVersion,
+                compatability = FormatCompatabilityVersion
+            };
+
+            return WriteFileHeader(stream, fileHeader);
+        }
+
+        public static async Task<byte[]> CreateBackup(StorageFolder folder)
+        {
+            using (var autcpStream = new MemoryStream())
+            {
+                // add header now
+                AddHeader(autcpStream);
+
+                using (var zipArchive = new ZipArchive(autcpStream, ZipArchiveMode.Create))
+                {
+                    var filesToCompress = await folder.GetItemsAsync();
+
+                    foreach (var item in filesToCompress)
+                    {
+                        var files = new List<StorageFile>();
+
+                        if (item is StorageFile)
+                        {
+                            var file = item as StorageFile;
+                            if (file.FileType == ".autcp" || file.Name.ToLower().StartsWith("xam")
+                                || file.Name.StartsWith("_"))
+                            {
+                                continue;
+                            }
+
+                            files.Add(file);
+                        }
+                        else if (item is StorageFolder)
+                        {
+                            var name = (item as StorageFolder).Name;
+                            if (name == "SOMA" || name == "Logs" || name == "AdMediator" || name == "artists")
+                            {
+                                continue;
+                            }
+
+                            files.AddRange(await (item as StorageFolder).GetFilesAsync());
+                        }
+
+                        foreach (var file in files)
+                        {
+                            var buffer = await FileIO.ReadBufferAsync(file);
+
+                            if (buffer.Length == 0)
+                            {
+                                continue;
+                            }
+
+                            var bytes = buffer.ToArray();
+
+                            var path = file.Path.Replace(folder.Path + "\\", string.Empty).Replace("\\", "/");
+
+                            var entry = zipArchive.CreateEntry(path, CompressionLevel.Optimal);
+                            using (var entryStream = entry.Open())
+                            {
+                                await entryStream.WriteAsync(bytes, 0, bytes.Length);
+                                await entryStream.FlushAsync();
+                            }
+                        }
+                    }
+                }
+
+
+
+                return autcpStream.ToArray();
+            }
+        }
+
+        public static bool ReadFileHeader(Stream stream, out AutcpFileHeader fileHeader)
+        {
+            try
+            {
+                var buffer = new byte[FileHeaderSize];
+
+                stream.Seek(0, SeekOrigin.Begin);
+                stream.Read(buffer, 0, FileHeaderSize);
+
+                var gch = GCHandle.Alloc(buffer, GCHandleType.Pinned);
+                fileHeader = Marshal.PtrToStructure<AutcpFileHeader>(gch.AddrOfPinnedObject());
+
+                gch.Free();
+
+                // test for valid data
+                var sig = Encoding.UTF8.GetString(fileHeader.signature, 0, fileHeader.signature.Length);
+                var isSuccessful = sig == "AUTCP";
+
+                return isSuccessful;
+            }
+            catch (Exception ex)
+            {
+                fileHeader = new AutcpFileHeader();
+                return false;
+            }
+        }

         public static async Task UnpackBackup(StorageFolder folder, Stream backupStream)
         {
@@ -33,14 +144,14 @@
                     {
                         var name = entry.FullName;

-                        //compatability with Autcp v1
+                        // compatability with Autcp v1
                         if (name.Contains(".bksqldb"))
+                        {
                             name = name.Replace(".bksqldb", ".sqldb");
+                        }

                         var file =
-                            await
-                                StorageHelper.CreateFileAsync(name,
-                                    option: CreationCollisionOption.ReplaceExisting);
+                            await StorageHelper.CreateFileAsync(name, option: CreationCollisionOption.ReplaceExisting);
                         using (var stream = await file.OpenAsync(FileAccess.ReadAndWrite))
                         {
                             using (var original = entry.Open())
@@ -56,76 +167,6 @@
             }
         }

-        public static async Task<byte[]> CreateBackup(StorageFolder folder)
-        {
-            using (var autcpStream = new MemoryStream())
-            {
-                //add header now
-                AddHeader(autcpStream);
-
-                #region Compress everything
-
-                using (var zipArchive = new ZipArchive(autcpStream, ZipArchiveMode.Create))
-                {
-                    var filesToCompress = await folder.GetItemsAsync();
-
-                    foreach (var item in filesToCompress)
-                    {
-                        var files = new List<StorageFile>();
-
-                        if (item is StorageFile)
-                        {
-                            var file = (item as StorageFile);
-                            if (file.FileType == ".autcp"
-                                || file.Name.ToLower().StartsWith("xam")
-                                || file.Name.StartsWith("_"))
-                                continue;
-                            files.Add(file);
-                        }
-                        else if (item is StorageFolder)
-                        {
-                            var name = (item as StorageFolder).Name;
-                            if (name == "SOMA" || name == "Logs" || name == "AdMediator"
-                                || name == "artists")
-                                continue;
-
-                            files.AddRange(await (item as StorageFolder).GetFilesAsync());
-                        }
-
-                        foreach (var file in files)
-                        {
-                            var buffer = (await FileIO.ReadBufferAsync(file)).ToArray();
-
-                            var path = file.Path.Replace(folder.Path + "\\", "").Replace("\\", "/");
-
-                            var entry = zipArchive.CreateEntry(path, CompressionLevel.Optimal);
-                            using (var entryStream = entry.Open())
-                            {
-                                await entryStream.WriteAsync(buffer, 0, buffer.Length);
-                                await entryStream.FlushAsync();
-                            }
-                        }
-                    }
-                }
-
-                #endregion
-
-                return autcpStream.ToArray();
-            }
-        }
-
-        public static bool AddHeader(Stream stream)
-        {
-            var fileHeader = new AutcpFileHeader
-            {
-                signature = Encoding.UTF8.GetBytes("AUTCP"),
-                version = FormatVersion,
-                compatability = FormatCompatabilityVersion
-            };
-
-            return WriteFileHeader(stream, fileHeader);
-        }
-
         public static bool ValidateHeader(Stream stream)
         {
             AutcpFileHeader header;
@@ -134,6 +175,7 @@
             {
                 valid = FormatVersion >= header.compatability;
             }
+
             return valid;
         }

@@ -157,40 +199,16 @@
                 return false;
             }
         }
-
-        public static bool ReadFileHeader(Stream stream, out AutcpFileHeader fileHeader)
-        {
-            try
-            {
-                var buffer = new byte[FileHeaderSize];
-
-                stream.Seek(0, SeekOrigin.Begin);
-                stream.Read(buffer, 0, FileHeaderSize);
-
-                var gch = GCHandle.Alloc(buffer, GCHandleType.Pinned);
-                fileHeader = Marshal.PtrToStructure<AutcpFileHeader>(gch.AddrOfPinnedObject());
-
-                gch.Free();
-
-                // test for valid data
-                var sig = Encoding.UTF8.GetString(fileHeader.signature, 0, fileHeader.signature.Length);
-                var isSuccessful = sig == "AUTCP";
-
-                return isSuccessful;
-            }
-            catch (Exception ex)
-            {
-                fileHeader = new AutcpFileHeader();
-                return false;
-            }
-        }
     }

     [StructLayout(LayoutKind.Sequential, Pack = 1, Size = 37)]
     public struct AutcpFileHeader
     {
-        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public byte[] signature;
-        public UInt16 version;
-        public UInt16 compatability;
+        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
+        public byte[] signature;
+
+        public ushort version;
+
+        public ushort compatability;
     }
 }


Update UserAuthentication.cs

Update UserAuthentication.cs


minor bugfix

minor bugfix

--- BlurryWindow/Windows/BlurryWindow.cs
+++ BlurryWindow/Windows/BlurryWindow.cs
@@ -28,6 +28,7 @@
         private bool _customBackground;

         private WindowState _lastState;
+        private bool _lastIsResizable;
         private bool _isFullScreen;

         #endregion
@@ -199,22 +200,21 @@
         private void OnKeyDown(object sender, KeyEventArgs keyEventArgs)
         {
             if (keyEventArgs.Key != Key.F11) return;
-            if (!IsResizable) return;

             if (_isFullScreen)
             {
                 _isFullScreen = false;
                 WindowState = _lastState;
+                IsResizable = _lastIsResizable;
                 IsMenuBarVisible = true;
-                Topmost = false;
-            }
-            else
+            }
+            else if (IsResizable)
             {
                 _isFullScreen = true;
                 _lastState = WindowState;
-                IsMenuBarVisible = false;
+                _lastIsResizable = IsResizable;
+                IsMenuBarVisible = false; //overrides IsResizable
                 WindowState = WindowState.Maximized;
-                Topmost = true;
             }
         }


refs #206. remove BOM

refs #206. remove BOM


Fixing Bug That we have made on showing RevealDigit

--- BullsAndCowsGame/BullsAndCowsGame.cs
+++ BullsAndCowsGame/BullsAndCowsGame.cs
@@ -77,11 +77,9 @@
         public void RevealDigit()
         {
             bool reveald = false;
-            this.CheatAttemptCounter++;
-
-            while (!reveald && this.CheatAttemptCounter <= 4)
+
+            while (!reveald && this.CheatAttemptCounter < 4)
             {
-
                 int digitForReveal = this.RandomNumberProvider.GenerateNumber(0, 3);

                 if (this.helpingNumber[digitForReveal] == 'X')
@@ -99,23 +97,5 @@
         {
             this.Initialize();
         }
-
-        // private bool IsValidNumber(string input)
-        // {
-        //     if (input.Length != GuessNumberLength)
-        //     {
-        //         return false;
-        //     }
-
-        //     for (int i = 0; i < GuessNumberLength; i++)
-        //     {
-        //         if (!char.IsDigit(input[i]))
-        //         {
-        //             return false;
-        //         }
-        //     }
-
-        //     return true;
-        // }
     }
 }