Make both sides of payment request table look same

fix #1488

--- BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml
+++ BTCPayServer/Views/PaymentRequest/ViewPaymentRequest.cshtml
@@ -89,9 +89,9 @@
                                     class="w-100 px-3 pt-4 pb-3"
                                 >

-

+

-

+

                                             Invoice #
@@ -105,13 +105,13 @@
                                             No payments made yet

                                         <template v-else v-for="invoice of srvModel.invoices" :key="invoice.id">
-

+

                                                 {{invoice.id}}
                                                 {{invoice.amountFormatted}}
                                                 {{moment(invoice.expiryDate).format('L HH:mm')}}
                                                 {{invoice.status}}

-
 0">
+
 0">


Second attempt - still broken

Second attempt - still broken

--- LeetCode/remote/create_maximum_number.cs
+++ LeetCode/remote/create_maximum_number.cs
@@ -29,9 +29,12 @@
 public class Solution {
     public int[] MaxNumber(int[] nums1, int[] nums2, int k) {
         var dp = new int [nums1.Length + 1, nums2.Length + 1, k + 1];
+        var result = new int[k];

+        var prevMax = 0;
         for (var i = 0; i <= k; i++)
         {
+            var max = 0;
             for (var a = 0; a <= nums1.Length; a++)
             {
                 for (var b = 0; b <= nums2.Length; b++)
@@ -39,35 +42,52 @@
                     if (i == 0 || a == 0 && b == 0)
                     {
                         dp[a, b, i] = 0;
-                        continue;
                     }
-
+                    else
                     if (a == 0)
                     {
-                        dp[a, b, i] = Math.Max(nums2[b - 1] + dp[0, b - 1, i - 1] * 10, dp[0, b - 1, i]);
-                        continue;
+                        dp[a, b, i] = Math.Max(nums2[b - 1] + dp[0, b - 1, i - 1], dp[0, b - 1, i]);
+                    }
+                    else
+                    if (b == 0)
+                    {
+                        dp[a, b, i] = Math.Max(nums1[a - 1] + dp[a - 1, 0, i - 1], dp[a - 1, 0, i]);
+                    }
+                    else
+                    {
+                        dp[a, b, i] = Math.Max(
+                                        dp[a - 1, b - 1, i],
+                                        Math.Max(
+                                            nums1[a - 1] + dp[a - 1, b, i - 1],
+                                            nums2[b - 1] + dp[a, b - 1, i - 1]));
                     }

-                    if (b == 0)
-                    {
-                        dp[a, b, i] = Math.Max(nums1[a - 1] + dp[a - 1, 0, i - 1] * 10, dp[a - 1, 0, i]);
-                        continue;
-                    }
+                    max = Math.Max(max, dp[a, b, i]);
+                }
+            }

-                    dp[a, b, i] = Math.Max(
-                                    dp[a - 1, b - 1, i] * 10,
-                                    Math.Max(
-                                        nums1[a - 1] + dp[a - 1, b, i - 1] * 10,
-                                        nums2[b - 1] + dp[a, b - 1, i - 1] * 10));
-                }
+            if (i > 0)
+            {
+                result[i - 1] = max - prevMax;
+                prevMax = max;
             }
         }

-        return dp[nums1.Length, nums2.Length, k]
-               .ToString()
-               .Select(x => x - '0')
-               .Take(k)
-               .ToArray();
+        for (var i = 0; i <= k; i++)
+        {
+            Console.WriteLine(i);
+            for (var a = 0; a <= nums1.Length; a++)
+            {
+                for (var b = 0; b <= nums2.Length; b++)
+                {
+                    Console.Write(dp[a, b, i] + " ");
+                }
+                Console.WriteLine();
+            }
+            Console.WriteLine();
+        }
+
+        return result;
     }

     static void Main()


Handling cancellation

Handling cancellation

--- src/Firebase/Streaming/FirebaseSubscription.cs
+++ src/Firebase/Streaming/FirebaseSubscription.cs
@@ -79,7 +79,7 @@
                     // initialize network connection
                     var serverEvent = FirebaseServerEventType.KeepAlive;
                     var request = new HttpRequestMessage(HttpMethod.Get, await this.query.BuildUrlAsync().ConfigureAwait(false));
-                    var response = await this.httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
+                    var response = await this.httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, this.cancel.Token).ConfigureAwait(false);

                     response.EnsureSuccessStatusCode();

@@ -88,9 +88,9 @@
                     {
                         while (true)
                         {
+                            var line = reader.ReadLine();
+
                             this.cancel.Token.ThrowIfCancellationRequested();
-
-                            var line = reader.ReadLine();

                             if (string.IsNullOrWhiteSpace(line))
                             {


Fixed a concurrency error.

Fixed a concurrency error.

--- src/Gribble/Mapping/EntityMappingCollection.cs
+++ src/Gribble/Mapping/EntityMappingCollection.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using Gribble.Extensions;
@@ -7,7 +8,7 @@
 {
     public class EntityMappingCollection
     {
-        private readonly IDictionary<Type, IClassMap> _classMappings = new Dictionary<Type, IClassMap>();
+        private readonly ConcurrentDictionary<Type, IClassMap> _classMappings = new ConcurrentDictionary<Type, IClassMap>();

         public EntityMappingCollection(IEnumerable<IClassMap> classMappings)
         {
@@ -15,7 +16,7 @@
             {
                 if (_classMappings.ContainsKey(classMap.Type))
                     throw new Exception($"Duplicate class mapping found for type {classMap.Type.Name}.");
-                _classMappings.Add(classMap.Type, classMap);
+                _classMappings.TryAdd(classMap.Type, classMap);
             }
         }

@@ -37,9 +38,9 @@
         private IClassMap GetMappingOrDefault<TEntity>()
         {
             var type = typeof (TEntity);
-            return _classMappings.ContainsKey(type)
-                ? _classMappings[type]
-                : _classMappings.AddItem(type, new AutoClassMap<TEntity>());
+            if (!_classMappings.ContainsKey(type))
+                _classMappings.TryAdd(type, new AutoClassMap<TEntity>());
+            return _classMappings[type];
         }
     }
 }


Fix canceling of signal background process

--- src/Hangfire.Mongo/Signal/Mongo/MongoSignal.cs
+++ src/Hangfire.Mongo/Signal/Mongo/MongoSignal.cs
@@ -72,7 +72,7 @@
                         var messages = string.Join(Environment.NewLine, t.Exception.InnerExceptions.Select(e => e.Message));
                         Logger.Debug($@"*** FAULT: {messages} ({Thread.CurrentThread.ManagedThreadId})");
                     }
-                }).Wait();
+                }).Wait(cancellationToken);
             }
         }


Changes needed after merge

Changes needed after merge

--- src/IntegrationTests/BaseGitIntegrationTest.cs
+++ src/IntegrationTests/BaseGitIntegrationTest.cs
@@ -19,6 +19,7 @@
             Platform = new Platform(Environment, FileSystem, new TestUIDispatcher());
             GitEnvironment = Platform.GitEnvironment;
             ProcessManager = new ProcessManager(Environment, GitEnvironment);
+            Platform.Initialize(ProcessManager);

             Environment.UnityProjectPath = TestRepoPath;
             Environment.GitExecutablePath = GitEnvironment.FindGitInstallationPath(ProcessManager).Result;
@@ -40,8 +41,8 @@

         private static string TestZipFilePath => Path.Combine(SolutionDirectory, "IOTestsRepo.zip");

-        protected ProcessManager ProcessManager { get; set; }
+        protected ProcessManager ProcessManager { get; private set; }

-        protected IProcessEnvironment GitEnvironment { get; set; }
+        protected IProcessEnvironment GitEnvironment { get; private set; }
     }
 }


Preparing 0.1.0

Preparing 0.1.0

--- src/Kyrodan.HiDrive/Properties/AssemblyInfo.cs
+++ src/Kyrodan.HiDrive/Properties/AssemblyInfo.cs
@@ -28,5 +28,5 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
-[assembly: AssemblyInformationalVersion("0.1.0-unstable")]
+[assembly: AssemblyInformationalVersion("0.1.0")]


Forgot to rebuild xml (#721)

Forgot to rebuild xml (#721)

--- src/MICore/LaunchOptions.xsd.types.designer.cs
+++ src/MICore/LaunchOptions.xsd.types.designer.cs
@@ -9,14 +9,14 @@
 //------------------------------------------------------------------------------

 //
-// This source code was auto-generated by xsd, Version=4.6.81.0.
+// This source code was auto-generated by xsd, Version=4.6.1055.0.
 //
 namespace MICore.Xml.LaunchOptions {
     using System.Xml.Serialization;

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -109,7 +109,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public enum TargetArchitecture {

@@ -157,7 +157,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public enum MIMode {

@@ -172,7 +172,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class ServerOptions {
@@ -187,11 +187,15 @@

         /// <remarks/>
         [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string MIDebuggerArgs;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
         public string ExePath;
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class AttachOptionsForConnection {
@@ -245,7 +249,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class Command {
@@ -268,7 +272,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class SourceMapEntry {
@@ -296,7 +300,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class EnvironmentEntry {
@@ -315,7 +319,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public partial class BaseLaunchOptions {
@@ -418,7 +422,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public enum BaseLaunchOptionsLaunchCompleteCommand {

@@ -435,7 +439,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -500,7 +504,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public enum IOSLaunchOptionsIOSDebugTarget {

@@ -512,7 +516,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     public enum IOSLaunchOptionsSecure {

@@ -524,7 +528,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -540,6 +544,10 @@

         /// <remarks/>
         [System.Xml.Serialization.XmlAttributeAttribute()]
+        public string MIDebuggerArgs;
+
+        /// <remarks/>
+        [System.Xml.Serialization.XmlAttributeAttribute()]
         public string MIDebuggerServerAddress;

         /// <remarks/>
@@ -588,7 +596,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -616,7 +624,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -640,7 +648,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]
@@ -656,7 +664,7 @@
     }

     /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.81.0")]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace="http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014", IsNullable=false)]


Generate config only on desktop

Generate config only on desktop

--- src/Microsoft.DotNet.Tools.Compiler/Program.cs
+++ src/Microsoft.DotNet.Tools.Compiler/Program.cs
@@ -354,7 +354,7 @@
                     .WriteDepsTo(Path.Combine(outputPath, projectContext.ProjectFile.Name + FileNameSuffixes.Deps));
             }

-            if (generateBindingRedirects)
+            if (generateBindingRedirects && context.TargetFramework.IsDesktop())
             {
                 context.GenerateBindingRedirects(exporter, outputName);
             }


Added Bitfield (bool[]) constructor.
Fixed bug in FromArray (found in Nunit test).

svn path=/trunk/bitsharp/; revision=94664

--- src/MonoTorrent/MonoTorrent.Common/BitField.cs
+++ src/MonoTorrent/MonoTorrent.Common/BitField.cs
@@ -86,6 +86,15 @@
             this.length = length;
             this.array = new int[(length + 31) / 32];
         }
+
+        public BitField(bool[] array)
+        {
+            this.length = array.Length;
+            this.array = new int[(array.Length + 31) / 32];
+            for (int i = 0; i < array.Length; i++)
+                Set(i, array[i]);
+        }
+
         #endregion

@@ -262,7 +271,6 @@
                 if ((this.array[index >> 5] & (1 << (index & 31))) == 0)// If it's not already true
                     trueCount++;                                        // Increase true count
                 this.array[index >> 5] |= (1 << (index & 31));
-
             }
             else
             {
@@ -432,7 +440,7 @@
             }

             // Make sure all extra bits are set to zero
-            for (int i = this.length; i < this.length + this.length % 8; i++)
+            for (int i = this.length; i < this.length + (8 - this.length % 8); i++)
             {
                 temp = ((buffer[offset] & p) != 0);
                 if (temp)


add documentation to MongoDB serializers

--- src/NMoneys.Serialization/Mongo_DB/Mongo_DB.cs
+++ src/NMoneys.Serialization/Mongo_DB/Mongo_DB.cs
@@ -1,13 +1,30 @@
 using System;
 using System.Text;
+using MongoDB.Bson;
 using MongoDB.Bson.IO;
 using MongoDB.Bson.Serialization;
+using MongoDB.Bson.Serialization.Conventions;
 using MongoDB.Bson.Serialization.Options;

 namespace NMoneys.Serialization.Mongo_DB
 {
 	#region serializers

+
+	///
+	/// Converts a <see cref="Money"/> (or <see cref="Nullable{T}"/>) instance to and from JSON in the canonical way.
+	///
+	/// <remarks>The canonical way is the one implemented in NMoneys itself, with an <c>Amount</c>
+	/// numeric property and a <c>Currency</c> object with a three-letter code <c>IsoCode"</c> property.
+	/// <para>
+	/// Property casing must be configured apart from this serializer using, for instance, another set of
+	/// <see cref="IConvention"/>
+	/// </para>
+	/// </remarks>
+	/// <example>
+	/// {"Amount" : 123.4, "Currency" : {"IsoCode" : "XXX"}}
+	/// {"amount" : 123.4, "currency" : {"isoCode" : "XXX"}}
+	/// </example>
 	public class CanonicalMoneySerializer : MoneySerializer
 	{
 		public CanonicalMoneySerializer() : base(
@@ -15,6 +32,22 @@
 			m => new CanonicalMoneyWriter(m)) { }
 	}

+	///
+	/// Converts a <see cref="Money"/> (or <see cref="Nullable{Money}"/>) instance to and from JSON in a default (standard) way.
+	///
+	/// <remarks>The default (standard) way is the one that a normal serializer would do for a money instance,
+	/// with an <c>Amount</c> numeric property and a <c>Currency</c> code. The <c>Currency</c> property can be
+	/// serialized either as a number (the default or using a <see cref="EnumRepresentationConvention"/> with <see cref="BsonType.Int32"/>) or as
+	/// a string (using a <see cref="EnumRepresentationConvention"/> with <see cref="BsonType.String"/>).
+	/// <para>
+	/// Property casing must be configured apart from this serializer using, for instance, another set of
+	/// <see cref="IConvention"/>
+	/// </para>
+	/// </remarks>
+	/// <example>
+	/// {"Amount" : 123.4, "Currency" : "XXX"}
+	/// {"amount" : 123.4, "currency" : 999}
+	/// </example>
 	public class DefaultMoneySerializer : MoneySerializer
 	{
 		public DefaultMoneySerializer()
@@ -23,6 +56,9 @@
 				m => new DefaultMoneyWriter(m)) { }
 	}

+	///
+	/// Base class for custom <see cref="Money"/> serializers
+	///
 	public abstract class MoneySerializer : IBsonSerializer
 	{
 		private readonly Lazy<IMoneyReader> _reader;
@@ -44,22 +80,51 @@
 			});
 		}

+
+		///
+		/// Deserializes an object from a BsonReader.
+		///
+		/// <param name="bsonReader">The BsonReader.</param>
+		/// <param name="nominalType">The nominal type of the object.</param>
+		/// <param name="options">The serialization options.</param>
+		/// <returns>An object.</returns>
 		public object Deserialize(BsonReader bsonReader, Type nominalType, IBsonSerializationOptions options)
 		{
 			Money money = _reader.Value.ReadFrom(bsonReader);
 			return money;
 		}

+		///
+		/// Deserializes an object from a BsonReader.
+		///
+		/// <param name="bsonReader">The BsonReader.</param>
+		/// <param name="nominalType">The nominal type of the object.</param>
+		/// <param name="actualType">The actual type of the object.</param>
+		/// <param name="options">The serialization options.</param>
+		/// <returns>An object.</returns>
 		public object Deserialize(BsonReader bsonReader, Type nominalType, Type actualType, IBsonSerializationOptions options)
 		{
 			return Deserialize(bsonReader, nominalType, options);
 		}

+		///
+		/// Gets the default serialization options for this serializer.
+		///
+		/// <returns>
+		/// The default serialization options for this serializer.
+		/// </returns>
 		public IBsonSerializationOptions GetDefaultSerializationOptions()
 		{
 			return new DocumentSerializationOptions();
 		}

+		///
+		/// Serializes an object to a BsonWriter.
+		///
+		/// <param name="bsonWriter">The BsonWriter.</param>
+		/// <param name="nominalType">The nominal type.</param>
+		/// <param name="value">The object.</param>
+		/// <param name="options">The serialization options.</param>
 		public void Serialize(BsonWriter bsonWriter, Type nominalType, object value, IBsonSerializationOptions options)
 		{
 			var money = (Money)value;


Remove unused test code

Remove unused test code

--- src/NServiceMVC/Metadata/MetadataController.cs
+++ src/NServiceMVC/Metadata/MetadataController.cs
@@ -17,7 +17,6 @@
                     {
                         Routes = MetadataReflector.GetRouteDetails(),
                         Models = MetadataReflector.GetModelTypes(),
-                        Test = new List<string>(new string[] { "one", "two", "three"})
                     },
                     BaseUrl = NServiceMVC.Configuration.GetMetadataUrl(true)
                 }


[corlib] Disable optimized comparer for byte, ushort enums

--- mscorlib/system/collections/generic/equalitycomparer.cs
+++ mscorlib/system/collections/generic/equalitycomparer.cs
@@ -100,8 +100,10 @@
 #endif
                     case TypeCode.Int32:
                     case TypeCode.UInt32:
+#if !MONO // Workaroud for JIT limitation
                     case TypeCode.Byte:
                     case TypeCode.UInt16: //ushort
+#endif
 #if MONO
                         return (EqualityComparer<T>)RuntimeType.CreateInstanceForAnotherGenericParameter (typeof(EnumEqualityComparer<>), t);
 #else


Handle serialization error for Data (#535)

--- MailChimp.Net/Core/MailChimpException.cs
+++ MailChimp.Net/Core/MailChimpException.cs
@@ -45,7 +45,7 @@
             builder.AppendLine($"Detail: {apierror.Detail}");
             builder.AppendLine("Errors: " + string.Join(" : ", apierror.Errors.Select(x => x.Field + " " + x.Message)));
             if (rawHttpResponseMessage != null)
-                builder.AppendLine("Request URI:" + rawHttpResponseMessage.RequestMessage.RequestUri);
+                builder.AppendLine("Request URI:" + rawHttpResponseMessage.RequestMessage?.RequestUri);
             return builder.ToString();
         }

@@ -97,7 +97,9 @@
                 data.Add("status", Status);
                 data.Add("instance", Instance);
                 data.Add("errors", Errors);
+#if NET_CORE || NETSTANDARD
                 data.Add("rawhttpresponsemessage", RawHttpResponseMessage);
+#endif

                 _data = data;
                 return _data;


(GH-106) fault tolerance xml docs

(GH-106) fault tolerance xml docs

--- src/chocolatey/infrastructure/tolerance/FaultTolerance.cs
+++ src/chocolatey/infrastructure/tolerance/FaultTolerance.cs
@@ -19,6 +19,9 @@
     using System.Threading;
     using configuration;

+    /// <summary>
+    /// Provides methods that are able to tolerate faults and recover
+    /// </summary>
     public class FaultTolerance
     {
         private static bool log_is_in_debug_mode()
@@ -36,6 +39,13 @@
             return debugging;
         }

+        /// <summary>
+        /// Tries an action the specified number of tries, warning on each failure and erroring on the last.
+        /// </summary>
+        /// <param name="numberOfTries">The number of tries.</param>
+        /// <param name="action">The action.</param>
+        /// <param name="waitDurationMilliseconds">The wait duration in milliseconds.</param>
+        /// <param name="increaseRetryByMilliseconds">The time for each try to increase the wait duration by in milliseconds.</param>
         public static void retry(int numberOfTries, Action action, int waitDurationMilliseconds = 100, int increaseRetryByMilliseconds = 0)
         {
             if (action == null) return;
@@ -51,6 +61,16 @@
                 increaseRetryByMilliseconds);
         }

+        /// <summary>
+        /// Tries a function the specified number of tries, warning on each failure and erroring on the last.
+        /// </summary>
+        /// <typeparam name="T">The type of the return value from the function.</typeparam>
+        /// <param name="numberOfTries">The number of tries.</param>
+        /// <param name="function">The function.</param>
+        /// <param name="waitDurationMilliseconds">The wait duration in milliseconds.</param>
+        /// <param name="increaseRetryByMilliseconds">The time for each try to increase the wait duration by in milliseconds.</param>
+        /// <returns>The return value from the function</returns>
+        /// <exception cref="System.ApplicationException">You must specify a number of retries greater than zero.</exception>
         public static T retry<T>(int numberOfTries, Func<T> function, int waitDurationMilliseconds = 100, int increaseRetryByMilliseconds = 0)
         {
             if (function == null) return default(T);
@@ -91,6 +111,13 @@
             return returnValue;
         }

+        /// <summary>
+        /// Wraps an action with a try/catch, logging an error when it fails.
+        /// </summary>
+        /// <param name="action">The action.</param>
+        /// <param name="errorMessage">The error message.</param>
+        /// <param name="throwError">if set to <c>true</c> [throw error].</param>
+        /// <param name="logWarningInsteadOfError">if set to <c>true</c> log as warning instead of error.</param>
         public static void try_catch_with_logging_exception(Action action, string errorMessage, bool throwError = false, bool logWarningInsteadOfError = false)
         {
             if (action == null) return;
@@ -107,6 +134,15 @@
                 );
         }

+        /// <summary>
+        /// Wraps a function with a try/catch, logging an error when it fails.
+        /// </summary>
+        /// <typeparam name="T">The type of the return value from the function.</typeparam>
+        /// <param name="function">The function.</param>
+        /// <param name="errorMessage">The error message.</param>
+        /// <param name="throwError">if set to <c>true</c> [throw error].</param>
+        /// <param name="logWarningInsteadOfError">if set to <c>true</c> log as warning instead of error.</param>
+        /// <returns>The return value from the function</returns>
         public static T try_catch_with_logging_exception<T>(Func<T> function, string errorMessage, bool throwError = false, bool logWarningInsteadOfError = false)
         {
             if (function == null) return default(T);


mannually added @lukapor 's thrift connection fixes #361

--- src/Nest.Connection.Thrift/ThriftConnection.cs
+++ src/Nest.Connection.Thrift/ThriftConnection.cs
@@ -24,7 +24,7 @@
 		{
 			this._connectionSettings = connectionSettings;
 			this._timeout = connectionSettings.Timeout;
-			this._poolSize = connectionSettings.MaximumAsyncConnections;
+			this._poolSize = Math.Max(1, connectionSettings.MaximumAsyncConnections);

 			this._resourceLock = new Semaphore(_poolSize, _poolSize);


ANother tifx

ANother tifx

--- src/OctopusWrapper/DeploymentPackageCreator.cs
+++ src/OctopusWrapper/DeploymentPackageCreator.cs
@@ -63,7 +63,7 @@
                 }
             }
         }
-
+
         void CreateDeployPackage(string id, string description)
         {
             var packageBuilder = new PackageBuilder
@@ -94,13 +94,33 @@

         void AddContent(PackageBuilder packageBuilder)
         {
-            foreach (var nupkg in Directory.GetFiles(nugetsFolderFullPath, "*.nzip"))
+            if (Directory.Exists(nugetsFolderFullPath))
             {
-                packageBuilder.PopulateFiles("", new[] { new ManifestFile { Source = nupkg, Target = "content" } });
+                foreach (var nupkg in Directory.GetFiles(nugetsFolderFullPath, "*.nzip"))
+                {
+                    packageBuilder.PopulateFiles("", new[]
+                    {
+                        new ManifestFile
+                        {
+                            Source = nupkg,
+                            Target = "content"
+                        }
+                    });
+                }
             }
-            foreach (var nupkg in Directory.GetFiles(chocosFolderFullPath, "*.czip"))
+            if (Directory.Exists(chocosFolderFullPath))
             {
-                packageBuilder.PopulateFiles("", new[] { new ManifestFile { Source = nupkg, Target = "content" } });
+                foreach (var nupkg in Directory.GetFiles(chocosFolderFullPath, "*.czip"))
+                {
+                    packageBuilder.PopulateFiles("", new[]
+                    {
+                        new ManifestFile
+                        {
+                            Source = nupkg,
+                            Target = "content"
+                        }
+                    });
+                }
             }
         }

@@ -114,11 +134,12 @@
         void SavePackage(PackageBuilder packageBuilder, string destinationFolder, string filenameSuffix, string logMessage)
         {
             var filename = Path.Combine(destinationFolder, packageBuilder.GetFullName()) + filenameSuffix;
+            if (Directory.Exists(destinationFolder))
+            {
+                Directory.Delete(destinationFolder, true);
+            }
+            Directory.CreateDirectory(destinationFolder);

-            if (!Directory.Exists(destinationFolder))
-            {
-                Directory.CreateDirectory(destinationFolder);
-            }
             using (var file = new FileStream(filename, FileMode.Create))
             {
                 packageBuilder.Save(file);


Fixed the query used to search for files. This fixes #2471

--- Duplicati/Library/Main/Database/LocalListChangesDatabase.cs
+++ Duplicati/Library/Main/Database/LocalListChangesDatabase.cs
@@ -173,7 +173,7 @@
                             cmd2.AddParameters(5);
                             cmd2.Transaction = m_transaction;

-                            using(var rd = cmd.ExecuteReader(@"SELECT ""Path"", ""FileHash"", ""MetaHash"", ""Size"", ""Type"" FROM {1} A WHERE ""A"".""FilesetID"" = ?", filesetId))
+                            using(var rd = cmd.ExecuteReader(string.Format(@"SELECT ""A"".""Path"", ""A"".""FileHash"", ""A"".""MetaHash"", ""A"".""Size"", ""A"".""Type"" FROM ""{0}"" A WHERE ""A"".""FilesetID"" = ?", combined), filesetId))
                                 while (rd.Read())
                                 {
                                     rd.GetValues(values);


Fixed wildcard files deep into the file system not being added to content.

--- FRBDK/Glue/Glue/Managers/WildcardReferencedFileSaveLogic.cs
+++ FRBDK/Glue/Glue/Managers/WildcardReferencedFileSaveLogic.cs
@@ -115,7 +115,7 @@
                     }
                     else
                     {
-                        GetFilesForWildcard(directory, remainderSuffix, files);
+                        GetFilesForWildcard(directory, "**/" + remainderSuffix, files);
                     }
                 }
             }


slight refactor of controller, document it some

--- Colours.Core/AppController.cs
+++ Colours.Core/AppController.cs
@@ -27,57 +27,123 @@
         }
     }

+    /// <summary>
+    /// Represents the backend of the application.
+    /// </summary>
     public class AppController
     {
+        /// <summary>
+        /// The current color, in HSV form. Use
+        /// <see cref="Colours.AppController.SetColor(Color, bool)"/>
+        /// to change the color.
+        /// </summary>
         public HsvColor HsvColor { get; private set; }
+        /// <summary>
+        /// The current color, in GDI form. Use
+        /// <see cref="Colours.AppController.SetColor(HsvColor, bool)"/>
+        /// to change the color.
+        /// </summary>
         public Color Color { get; private set; }

+        /// <summary>
+        /// The current colour scheme. Use
+        /// <see cref="Colours.AppController.SetSchemeType(Colours.SchemeType, bool)"/>
+        /// to change the scheme.
+        /// </summary>
         public SchemeType SchemeType { get; private set; }

+        /// <summary>
+        /// The undo history. This will be set for you by the functions in this object.
+        /// </summary>
         public Stack<UndoState> UndoHistory { get; private set; }
+        /// <summary>
+        /// The redo history. This will be set for you by the functions in this object.
+        /// </summary>
         public Stack<UndoState> RedoHistory { get; private set; }

+        /// <summary>
+        /// The current resulting colour scheme. This will be generated by
+        /// <see cref="Colours.AppController.GetSchemeResults"/> whenever
+        /// the colour or scheme is set.
+        /// </summary>
         public List<HsvColor> Results { get; private set; }

+        /// <summary>
+        /// Creates a new application controller.
+        /// </summary>
+        /// <param name="c">The initial colour to use.</param>
+        /// <param name="scheme">The initial scheme to use.</param>
         public AppController(HsvColor c, SchemeType scheme)
         {
             UndoHistory = new Stack<UndoState>();
             RedoHistory = new Stack<UndoState>();

             SchemeType = scheme;
-            SetColor(c, false);
-            GetSchemeResults();
-        }
-
+            SetColor(c, false); // this will set Results
+        }
+
+        /// <summary>
+        /// Pushes the current state of the application to the undo stack.
+        /// </summary>
+        private void PushUndo()
+        {
+            UndoHistory.Push(new UndoState(HsvColor, SchemeType));
+            RedoHistory.Clear();
+        }
+
+        /// <summary>
+        /// Set the current scheme type and generate the Results in the
+        /// Results property.
+        /// </summary>
+        /// <param name="t">The new scheme type.</param>
+        /// <param name="keepHistory">
+        /// If you want to update the undo stack. Note that it will only update it if
+        /// the current scheme and new scheme are different.
+        /// </param>
         public void SetSchemeType(SchemeType t, bool keepHistory)
         {
             if (keepHistory && SchemeType != t)
             {
-                UndoHistory.Push(new UndoState(HsvColor, SchemeType));
-                RedoHistory.Clear();
+                PushUndo();
             }
             SchemeType = t;
             GetSchemeResults();
         }

+        /// <summary>
+        /// Set the current colour (in HSV form) and generate the Results in the
+        /// Results property.
+        /// </summary>
+        /// <param name="c">The new colour.</param>
+        /// <param name="keepHistory">
+        /// If you want to update the undo stack. Note that it will only update it if
+        /// the current colour and new colour are different.
+        /// </param>
         public void SetColor(HsvColor c, bool keepHistory)
         {
             if (keepHistory && c.ToString() != HsvColor.ToString())
             {
-                UndoHistory.Push(new UndoState(HsvColor, SchemeType));
-                RedoHistory.Clear();
+                PushUndo();
             }
             HsvColor = c;
             Color = c.ToRgb();
             GetSchemeResults();
         }
-
+
+        /// <summary>
+        /// Set the current colour (in GDI form) and generate the Results in the
+        /// Results property.
+        /// </summary>
+        /// <param name="c">The new colour.</param>
+        /// <param name="keepHistory">
+        /// If you want to update the undo stack. Note that it will only update it if
+        /// the current colour and new colour are different.
+        /// </param>
         public void SetColor(Color c, bool keepHistory)
         {
             if (keepHistory && c.ToString() != Color.ToString())
             {
-                UndoHistory.Push(new UndoState(HsvColor, SchemeType));
-                RedoHistory.Clear();
+                PushUndo();
             }
             Color = c;
             HsvColor = new HsvColor(c);
@@ -140,7 +206,11 @@
             return HsvColor.Saturation - 0.05d > 0d;
         }

-        public void GetSchemeResults()
+        /// <summary>
+        /// Get the results of the colour and scheme combination.
+        /// This will be called by the varioous set properties in the function.
+        /// </summary>
+        private void GetSchemeResults()
         {
             switch (SchemeType)
             {


Fix namespace

Fix namespace

--- Mapsui/Extensions/ByteArrayExtensions.cs
+++ Mapsui/Extensions/ByteArrayExtensions.cs
@@ -1,4 +1,6 @@
 using System.Text;
+
+namespace Mapsui.Extensions;

 /// <summary> Byte Array Extensions </summary>
 public static class ByteArrayExtensions
@@ -38,4 +40,4 @@

         return false;
     }
-}
+}


Play game

Play game

--- MathSample/NumberGuessConsole/Program.cs
+++ MathSample/NumberGuessConsole/Program.cs
@@ -1,15 +1,42 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using Blaze.Propositions;
+using static System.Console;
 using static Blaze.Propositions.Formula;

 namespace NumberGuessConsole
 {
-    class Program
+    static class Program
     {
         static void Main(string[] args)
         {
+            var master = new GameMaster();
+
+            master.Start(1, 2).WriteLines();
+            WriteLine();
+            master.Start(2, 3).WriteLines();
+            WriteLine();
+            master.Start(3, 4).WriteLines();
+            WriteLine();
+
+            master.Start(2, 1).WriteLines();
+            WriteLine();
+            master.Start(3, 2).WriteLines();
+            WriteLine();
+            master.Start(4, 3).WriteLines();
+            WriteLine();
+
+            master.Start(100, 101).WriteLines();
+            WriteLine();
+        }
+
+        [DebuggerHidden]
+        static void WriteLines(this IEnumerable<VariableFormula> source)
+        {
+            foreach (var v in source)
+                WriteLine($"{v}: {v.Value}");
         }
     }


Fixes User selector for owner menu

Fixes User selector for owner menu

--- GrowCreate.PipelineCRM/Controllers/PipelineApiController.cs
+++ GrowCreate.PipelineCRM/Controllers/PipelineApiController.cs
@@ -69,7 +69,7 @@
         {
             int allUsers;
             var userService = ApplicationContext.Current.Services.UserService;
-            return userService.GetAll(0, 1000, out allUsers).Where(x => x.AllowedSections.Contains("pipeline"));
+            return userService.GetAll(0, 1000, out allUsers).Where(x => x.AllowedSections.Contains("pipelineCrm"));
         }

         public IEnumerable<Pipeline> GetByStatusId(int id, bool getLinks = false)


Whitespace

Whitespace

--- Framework.Core/Theraot/Collections/ThreadSafe/BucketCore.cs
+++ Framework.Core/Theraot/Collections/ThreadSafe/BucketCore.cs
@@ -6,7 +6,6 @@
 using System.Threading;
 using Theraot.Core;
 using Theraot.Threading;
-
 using System.Runtime.Serialization;

 namespace Theraot.Collections.ThreadSafe
@@ -43,7 +42,7 @@
                 throw new SerializationException();
             }

-             _childFactory = childFactory;
+            _childFactory = childFactory;
             _level = level;
             _arrayFirst = ArrayReservoir<object>.GetArray(_capacity);
             _arraySecond = ArrayReservoir<object>.GetArray(_capacity);


Removed link to create an edition (for later...)

--- src/PronoFoot/Views/Competition/Details.cshtml
+++ src/PronoFoot/Views/Competition/Details.cshtml
@@ -12,9 +12,4 @@

@Html.ActionLink(edition.Name, "Details", "Edition", new { id = edition.EditionId }, null)

         }

-
-    @if (Request.IsAuthenticated && User.IsInRole("Administrators"))
-    {
-
@Html.ActionLink("Ajouter une édition...", "Create", "Edition", new { competitionId = Model.Competition.CompetitionId }, null)

-    }


Remove unused log parameter (#1535)

Remove unused log parameter (#1535)

--- src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs
+++ src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs
@@ -505,7 +505,7 @@
                         if (SelectWithLockSQL == null)
                         {
                             const string DefaultLockSql = "SELECT * FROM {0}LOCKS WITH (UPDLOCK,ROWLOCK) WHERE " + ColumnSchedulerName + " = @schedulerName AND LOCK_NAME = @lockName";
-                            Log.InfoFormat("Detected usage of SqlServerDelegate - defaulting 'selectWithLockSQL' to '" + DefaultLockSql + "'.", TablePrefix, "'" + InstanceName + "'");
+                            Log.InfoFormat("Detected usage of SqlServerDelegate - defaulting 'selectWithLockSQL' to '" + DefaultLockSql + "'.", TablePrefix);
                             SelectWithLockSQL = DefaultLockSql;
                         }
                     }
@@ -3937,4 +3937,4 @@
             }
         }
     }
-}+}


Cosmetics

Cosmetics

--- GoogleApi/Entities/Places/Search/Find/Response/Candidate.cs
+++ GoogleApi/Entities/Places/Search/Find/Response/Candidate.cs
@@ -105,6 +105,6 @@
         /// An array of types for this place
         /// </summary>
         [JsonProperty("types")]
-        public IEnumerable<PlaceLocationType> Types { get; set; }
+        public virtual IEnumerable<PlaceLocationType> Types { get; set; } = new List<PlaceLocationType>();
     }
 }


Order Fragments

Order Fragments

--- LCIAToolAPI/CalRecycleLCA.Services/ResourceServiceFacade.cs
+++ LCIAToolAPI/CalRecycleLCA.Services/ResourceServiceFacade.cs
@@ -495,7 +495,7 @@
             if (fragmentId == null)
                 return _FragmentService.Query()
                     .Include(k => k.ILCDEntity)
-                    .Select().Select(f => Transform(f)).ToList();
+                    .Select().Select(f => Transform(f)).OrderBy(f => f.FragmentID).ToList();
             else
                 return _FragmentService.Query(f => f.FragmentID == fragmentId)
                     .Include(k => k.ILCDEntity)


closes #507 ensure logging when RecoverJobs fails

--- src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs
+++ src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs
@@ -500,6 +500,7 @@
                 }
                 catch (SchedulerException se)
                 {
+                    Log.ErrorException("Failure occurred during job recovery: " + se.Message, se);
                     throw new SchedulerConfigException("Failure occurred during job recovery.", se);
                 }
             }


Fix bug in how we check PROOF returns.

Fix bug in how we check PROOF returns.

--- LINQToTTree/LINQToTTreeLib/ExecutionCommon/ProofExecutor.cs
+++ LINQToTTree/LINQToTTreeLib/ExecutionCommon/ProofExecutor.cs
@@ -176,7 +176,7 @@

             bool runOK = true;
             string failReason = "";
-            var tstatus = pc.GetOutputList().Cast<ROOTNET.Interface.NTStatus>().Where(i => i != null).Where(i => i.Name == "PROOF_Status").FirstOrDefault();
+            var tstatus = pc.GetOutputList().Where(i => i is ROOTNET.Interface.NTStatus).Cast<ROOTNET.Interface.NTStatus>().Where(i => i.Name == "PROOF_Status").FirstOrDefault();
             if (tstatus == null)
             {
                 runOK = false;


初期命中率の変更

初期命中率の変更

--- Inferno/ChaosMode/ChaosSettingLoader/ChaosModeSettingDTO.cs
+++ Inferno/ChaosMode/ChaosSettingLoader/ChaosModeSettingDTO.cs
@@ -14,7 +14,7 @@
         public string[] WeaponList { get; set; } = new[] { "" };
         public string[] WeaponListForDriveBy { get; set; } = new[] { "" };
         public bool IsStupidShooting { get; set; } = true;
-        public int ShootAccuracy { get; set; } = 15;
+        public int ShootAccuracy { get; set; } = 30;
         public int WeaponChangeProbabillity { get; set; } = 30;
     }
 }


Fix nre. Closes #286

Fix nre. Closes #286

--- LmpClient/Systems/VesselPositionSys/VesselPositionUpdate.cs
+++ LmpClient/Systems/VesselPositionSys/VesselPositionUpdate.cs
@@ -156,7 +156,7 @@
                 if (Target != null)
                 {
                     Target.CopyFrom(targetUpdate);
-                    VesselPositionSystem.TargetVesselUpdateQueue[VesselId].Recycle(targetUpdate);
+                    queue.Recycle(targetUpdate);
                 }
                 else
                 {


Test Case Fix

Test Case Fix

--- King.Service.ServiceBus.Unit.Tests/BufferedRecieverTests.cs
+++ King.Service.ServiceBus.Unit.Tests/BufferedRecieverTests.cs
@@ -3,6 +3,7 @@
     using King.Service.ServiceBus.Models;
     using King.Service.ServiceBus.Timing;
     using Microsoft.ServiceBus.Messaging;
+    using Newtonsoft.Json;
     using NSubstitute;
     using NUnit.Framework;
     using System;
@@ -42,23 +43,24 @@
         [Test]
         public async Task OnMessageArrived()
         {
+            var g = Guid.NewGuid();
             var d = new BufferedMessage
             {
                 ReleaseAt = DateTime.UtcNow,
-                Data = Guid.NewGuid().ToString(),
+                Data = JsonConvert.SerializeObject(g),
             };
             var msg = new BrokeredMessage(d);

             var queue = Substitute.For<IBusQueueReciever>();
-            var handler = Substitute.For<IBusEventHandler<object>>();
-            handler.Process(d.Data).Returns(Task.FromResult(true));
+            var handler = Substitute.For<IBusEventHandler<Guid>>();
+            handler.Process(g).Returns(Task.FromResult(true));
             var sleep = Substitute.For<ISleep>();
             sleep.Until(d.ReleaseAt);

-            var br = new BufferedReciever<object>(queue, handler, sleep);
+            var br = new BufferedReciever<Guid>(queue, handler, sleep);
             await br.OnMessageArrived(msg);

-            handler.Received().Process(d.Data);
+            handler.Received().Process(g);
             sleep.Received().Until(d.ReleaseAt);
         }

@@ -66,20 +68,21 @@
         [ExpectedException(typeof(InvalidOperationException))]
         public async Task OnMessageArrivedNoSuccess()
         {
+            var g = Guid.NewGuid();
             var d = new BufferedMessage
             {
                 ReleaseAt = DateTime.UtcNow,
-                Data = Guid.NewGuid().ToString(),
+                Data = JsonConvert.SerializeObject(Guid.NewGuid()),
             };
             var msg = new BrokeredMessage(d);

             var queue = Substitute.For<IBusQueueReciever>();
-            var handler = Substitute.For<IBusEventHandler<object>>();
-            handler.Process(d.Data).Returns(Task.FromResult(false));
+            var handler = Substitute.For<IBusEventHandler<Guid>>();
+            handler.Process(g).Returns(Task.FromResult(false));
             var sleep = Substitute.For<ISleep>();
             sleep.Until(d.ReleaseAt);

-            var br = new BufferedReciever<object>(queue, handler, sleep);
+            var br = new BufferedReciever<Guid>(queue, handler, sleep);
             await br.OnMessageArrived(msg);

         }


Meet client expectations on lciaDetail. #257

--- LCIAToolAPI/CalRecycleLCA.Services/ResourceServiceFacade.cs
+++ LCIAToolAPI/CalRecycleLCA.Services/ResourceServiceFacade.cs
@@ -185,7 +185,8 @@
                     LCIAScore = new List<AggregateLCIAResource>() {
                         new AggregateLCIAResource() {
                             CumulativeResult = 0.0,
-                            ProcessID = processId
+                            ProcessID = processId,
+                            LCIADetail = new List<DetailedLCIAResource>() {}
                         }
                     }
                 }


sourceExtensions: add EnvironmentVariables dsl

--- src/Stronk/ConfigurationSourcing/Extensions.cs
+++ src/Stronk/ConfigurationSourcing/Extensions.cs
@@ -8,5 +8,10 @@
 		{
 			return self.Source(new AppConfigSource());
 		}
+
+		public static StronkConfig EnvironmentVariables(this SourceExpression self, string prefix = null)
+		{
+			return self.Source(new EnvironmentVariableSource(prefix));
+		}
 	}
 }


Updated tests to fix failing Linux Tests

--- src/System.Runtime/tests/System/StringTests.cs
+++ src/System.Runtime/tests/System/StringTests.cs
@@ -941,13 +941,20 @@
             Assert.Equal("0 = Test: : zero 1 = Test: : one 2 = Test: : two 3 = Test: : three 4 = Test: : four", s);
         }

-        [Theory]
-        [InlineData(StringComparison.CurrentCulture, false)]
-        [InlineData(StringComparison.CurrentCultureIgnoreCase, false)]
-        [InlineData(StringComparison.InvariantCulture, true)]
-        [InlineData(StringComparison.InvariantCultureIgnoreCase, true)]
-        [InlineData(StringComparison.Ordinal, false)]
-        [InlineData(StringComparison.OrdinalIgnoreCase, false)]
+        public static IEnumerable<object[]> Equals_EncyclopaediaData()
+        {
+            yield return new object[] { StringComparison.CurrentCulture, false };
+            yield return new object[] { StringComparison.CurrentCultureIgnoreCase, false };
+            yield return new object[] { StringComparison.Ordinal, false };
+            yield return new object[] { StringComparison.OrdinalIgnoreCase, false };
+
+            // Windows and ICU disagree about how these strings compare in the default locale.
+            yield return new object[] { StringComparison.InvariantCulture, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) };
+            yield return new object[] { StringComparison.InvariantCultureIgnoreCase, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) };
+        }
+
+        [Theory]
+        [MemberData(nameof(Equals_EncyclopaediaData))]
         public static void Equals_Encyclopaedia(StringComparison comparison, bool expected)
         {
             string source = "encyclop\u00e6dia";
@@ -1038,6 +1045,7 @@

             Assert.Equal(expected, s.IndexOf(target.ToString(), startIndex, count, StringComparison.CurrentCulture));
             Assert.Equal(expected, s.IndexOf(target.ToString(), startIndex, count, StringComparison.InvariantCulture));
+            Assert.Equal(expected, s.IndexOf(target.ToString(), startIndex, count, StringComparison.InvariantCultureIgnoreCase));
             Assert.Equal(expected, s.IndexOf(target.ToString(), startIndex, count, StringComparison.Ordinal));
             Assert.Equal(expected, s.IndexOf(target.ToString(), startIndex, count, StringComparison.OrdinalIgnoreCase));
         }
@@ -1925,6 +1933,7 @@
             // Value is null
             Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null));
             Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null, StringComparison.CurrentCultureIgnoreCase));
+            Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null, StringComparison.InvariantCulture));
             Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null, StringComparison.InvariantCultureIgnoreCase));
             Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null, StringComparison.Ordinal));
             Assert.Throws<ArgumentNullException>("value", () => s.StartsWith(null, StringComparison.OrdinalIgnoreCase));


Clarify test name / comments

Clarify test name / comments

--- src/Tests/Tests.Shared/Storage/StorageTests.cs
+++ src/Tests/Tests.Shared/Storage/StorageTests.cs
@@ -634,21 +634,26 @@
         }

         [Fact]
-        public unsafe void GetCompressed()
+        public unsafe void ReadWithOpenHandle()
         {
             using (var cleaner = new TestFileCleaner())
             {
                 string cursorPath = cleaner.GetTestPath() + ".cur";
+
+                // Create a handle with read only sharing and leave open
                 using (IO.FileStream file = new IO.FileStream(cursorPath, IO.FileMode.Create, IO.FileAccess.ReadWrite, IO.FileShare.Read))
                 {
+                    // Write out a valid file
                     using (IO.Stream data = TestFiles.GetTestCursor())
                     {
                         data.CopyTo(file);
                     }
                     file.Flush();

+                    // See that we can open a handle on it directly
                     using (IO.FileStream file2 = new IO.FileStream(cursorPath, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.ReadWrite)) { }

+                    // Try letting the OS read it in
                     using (ResourceMethods.LoadCursorFromFile(cursorPath)) { };
                 }
             }


Fix normals after mirror

Fix normals after mirror

--- MatterControlLib/DesignTools/Operations/MirrorObject3D_2.cs
+++ MatterControlLib/DesignTools/Operations/MirrorObject3D_2.cs
@@ -97,6 +97,8 @@

 							transformedMesh.ReverseFaces();

+							transformedMesh.CalculateNormals();
+
 							var newMesh = new Object3D()
 							{
 								Mesh = transformedMesh


add browse

add browse

Allow for standard browse

--- src/UntappedWidgetGenerator.Web/IndexModule.cs
+++ src/UntappedWidgetGenerator.Web/IndexModule.cs
@@ -10,6 +10,7 @@
         public IndexModule()
         {
             Get["/"] = x => { return View["Views/Index/Index.cshtml", "tparnell"]; };
+            Get["/{username}/browse"] = x => { return View["Views/Index/Index.cshtml", (string)x.username]; };
             Get["/{username}"] = parameters =>
             {
                 var info = new UntappedRepository().Get(parameters.username);
@@ -17,4 +18,4 @@
             };
         }
     }
-}+}


Handle mixtures of short and long argument names

--- src/Utility.CommandLine.Arguments/Arguments.cs
+++ src/Utility.CommandLine.Arguments/Arguments.cs
@@ -204,7 +204,8 @@
         {
             type = type ?? new StackFrame(1).GetMethod().DeclaringType;

-            return GetArgumentInfo(type).Select(i => new ArgumentHelp() {
+            return GetArgumentInfo(type).Select(i => new ArgumentHelp()
+            {
                 ShortName = i.ShortName,
                 LongName = i.LongName,
                 HelpText = i.HelpText,
@@ -245,12 +246,15 @@
         ///     started, keyed by argument name.
         /// </summary>
         /// <param name="commandLineString">The command line arguments with which the application was started.</param>
+        /// <param name="type">The <see cref="Type"/> for which the command line string is to be parsed.</param>
         /// <returns>
         ///     The dictionary containing the arguments and values specified in the command line arguments with which the
         ///     application was started.
         /// </returns>
-        public static Arguments Parse(string commandLineString = default(string))
-        {
+        public static Arguments Parse(string commandLineString = default(string), Type type = null)
+        {
+            type = type ?? new StackFrame(1).GetMethod().DeclaringType;
+
             commandLineString = commandLineString == default(string) || commandLineString == string.Empty ? Environment.CommandLine : commandLineString;

             Dictionary<string, object> argumentDictionary;
@@ -264,7 +268,7 @@
             {
                 // the first group of the first match will contain everything in the string prior to the strict operand delimiter,
                 // so extract the argument key/value pairs and list of operands from that string.
-                argumentDictionary = GetArgumentDictionary(matches[0].Groups[1].Value);
+                argumentDictionary = GetArgumentDictionary(matches[0].Groups[1].Value, type);
                 operandList = GetOperandList(matches[0].Groups[1].Value);

                 // the first group of the second match will contain everything in the string after the strict operand delimiter, so
@@ -279,7 +283,7 @@
             }
             else
             {
-                argumentDictionary = GetArgumentDictionary(commandLineString);
+                argumentDictionary = GetArgumentDictionary(commandLineString, type);
                 operandList = GetOperandList(commandLineString);
             }

@@ -509,12 +513,14 @@
         ///     application was started, keyed by argument name.
         /// </summary>
         /// <param name="commandLineString">The command line arguments with which the application was started.</param>
+        /// <param name="type">The <see cref="Type"/> for which the argument dictionary is to be created.</param>
         /// <returns>
         ///     The dictionary containing the arguments and values specified in the command line arguments with which the
         ///     application was started.
         /// </returns>
-        private static Dictionary<string, object> GetArgumentDictionary(string commandLineString)
-        {
+        private static Dictionary<string, object> GetArgumentDictionary(string commandLineString, Type type)
+        {
+            List<(string, string)> argumentList = new List<(string, string)>();
             Dictionary<string, object> argumentDictionary = new Dictionary<string, object>();

             foreach (Match match in Regex.Matches(commandLineString, ArgumentRegEx))
@@ -532,23 +538,68 @@
                 value = TrimOuterQuotes(value);

                 // check to see if the argument uses a single dash. if so, split the argument name into a char array and add each
-                // to the dictionary. if a value is specified, it belongs to the final character.
+                // to the list. if a value is specified, it belongs to the final character.
                 if (Regex.IsMatch(fullMatch, GroupRegEx))
                 {
                     char[] charArray = argument.ToCharArray();

-                    // iterate over the characters backwards to more easily assign the value
+                    // iterate over the characters and assign the value to the final character
                     for (int i = 0; i < charArray.Length; i++)
                     {
-                        argumentDictionary.ExclusiveAdd(charArray[i].ToString(), i == charArray.Length - 1 ? value : string.Empty);
+                        argumentList.Add((charArray[i].ToString(), i == charArray.Length - 1 ? value : string.Empty));
                     }
                 }
                 else
                 {
-                    // add the argument and value to the dictionary if it doesn't already exist.
-                    argumentDictionary.ExclusiveAdd(argument, value);
-                }
-            }
+                    // add the argument and value to the list.
+                    argumentList.Add((argument, value));
+                }
+            }
+
+            // get the short and long names for each argument
+            var nameInfo = GetArgumentInfo(type);
+
+            Dictionary<string, string> shortToLongNames = new Dictionary<string, string>();
+            Dictionary<string, string> longToShortNames = new Dictionary<string, string>();
+
+            foreach (ArgumentInfo info in nameInfo)
+            {
+                shortToLongNames.Add(info.ShortName.ToString(), info.LongName);
+                longToShortNames.Add(info.LongName, info.ShortName.ToString());
+            }
+
+            List<(string, string)> longArgumentList = new List<(string, string)>();
+
+            // populate a new list of argument names,
+            // converting short names to long and filtering out names for which no (short, long) pair exists
+            foreach ((string, string) argument in argumentList)
+            {
+                // convert short names to long
+                if (shortToLongNames.ContainsKey(argument.Item1))
+                {
+                    longArgumentList.Add((shortToLongNames[argument.Item1], argument.Item2));
+                }
+
+                // add long names directly
+                else if (longToShortNames.ContainsKey(argument.Item2))
+                {
+                    longArgumentList.Add(argument);
+                }
+
+                // if this name isn't listed in the argument info, just populate that key in the output dictionary
+                else
+                {
+                    argumentDictionary.ExclusiveAdd(argument.Item1, argument.Item2);
+                }
+            }
+
+            // populate a dictionary with the (key, value) pairs in the list
+            // convert each long name to the corresponding short name and populate that key as well for compatibility
+            longArgumentList.ForEach(argument =>
+            {
+                argumentDictionary.ExclusiveAdd(argument.Item1, argument.Item2);
+                argumentDictionary.ExclusiveAdd(longToShortNames[argument.Item1], argument.Item2);
+            });

             return argumentDictionary;
         }


Add a way to get the list of permanent variables from a set of assignments representing a clause

--- LogicalShift.Reason/Solvers/PermanentVariableAssignments.cs
+++ LogicalShift.Reason/Solvers/PermanentVariableAssignments.cs
@@ -34,5 +34,47 @@
             // Result is arguments followed by the list with the permanent variables first
             return arguments.Concat(permanentFirst);
         }
+
+        /// <summary>
+        /// Returns the names of the variables that get assigned in a list of assignments
+        /// </summary>
+        public static IEnumerable<ILiteral> VariablesAssigned(this IEnumerable<IAssignmentLiteral> assignments)
+        {
+            return assignments
+                .Where(assign => assign.Value.UnificationKey == null)
+                .Select(assign => assign.Value);
+        }
+
+        /// <summary>
+        /// Given a list of predicate assignment lists (representing the assignments for the initial predicate and
+        /// the clauses, in order), finds the names of the 'permanent' variables: that is, the list of variables
+        /// that are used in more than one clause.
+        /// </summary>
+        public static IEnumerable<ILiteral> PermanentVariables(this IEnumerable<PredicateAssignmentList> assignmentLists)
+        {
+            // The predicate and the first clause don't have a call between them, so variables used in both places
+            // aren't considered to be permanent
+            var usedVariables = new HashSet<ILiteral>();
+            var permanentVariabels = new HashSet<ILiteral>();
+            int pos = 0;
+
+            foreach (var assignmentList in assignmentLists)
+            {
+                var assignmentVariables = VariablesAssigned(assignmentList.Assignments).ToArray();
+
+                // After the predicate (pos = 0) and first clause (pos = 1), re-used variables need to be marked as permanent
+                if (pos > 1)
+                {
+                    permanentVariabels.UnionWith(assignmentVariables.Where(variable => usedVariables.Contains(variable)));
+                }
+
+                // Mark this set of variables as used
+                usedVariables.UnionWith(assignmentVariables);
+
+                ++pos;
+            }
+
+            return permanentVariabels;
+        }
     }
 }


Fixed incorrect path rendering after move command.

--- Mntone.SvgForXaml/Mntone.SvgForXaml.Shared/Win2dRenderer.cs
+++ Mntone.SvgForXaml/Mntone.SvgForXaml.Shared/Win2dRenderer.cs
@@ -239,9 +239,9 @@

 			var open = false;
 			var startPoint = new Vector2 { X = 0.0F, Y = 0.0F };
-			var prevC1 = new Vector2 { X = 0.0F, Y = 0.0F };
-			var prevC2 = new Vector2 { X = 0.0F, Y = 0.0F };
 			var v = new Vector2 { X = 0.0F, Y = 0.0F };
+			var prevC1 = v;
+			var prevC2 = v;

 			CanvasGeometry geometry;
 			using (var builder = new CanvasPathBuilder(this.ResourceCreator))
@@ -269,6 +269,8 @@
 						v.Y = casted.Y;
 						startPoint = v;
 						builder.BeginFigure(v);
+						prevC1 = v;
+						prevC2 = v;
 						open = true;
 						continue;
 					}
@@ -281,6 +283,8 @@
 						v.Y += casted.Y;
 						startPoint = v;
 						builder.BeginFigure(v);
+						prevC1 = v;
+						prevC2 = v;
 						open = true;
 						continue;
 					}
@@ -290,26 +294,14 @@
 						builder.BeginFigure(v);
 						open = true;
 					}
-					if (segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToCubicAbsolute
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToCubicRelative
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToCubicSmoothAbsolute
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToCubicSmoothRelative)
-					{
-						prevC2 = v;
-					}
-					if (segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToQuadraticAbsolute
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToQuadraticRelative
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToQuadraticSmoothAbsolute
-						&& segment.PathSegmentType != SvgPathSegment.SvgPathSegmentType.CurveToQuadraticSmoothRelative)
-					{
-						prevC1 = v;
-					}
 					if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToAbsolute)
 					{
 						var casted = (SvgPathSegmentLineToAbsolute)segment;
 						v.X = casted.X;
 						v.Y = casted.Y;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToRelative)
 					{
@@ -317,6 +309,8 @@
 						v.X += casted.X;
 						v.Y += casted.Y;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToCubicAbsolute)
 					{
@@ -325,6 +319,7 @@
 						v.X = casted.X;
 						v.Y = casted.Y;
 						builder.AddCubicBezier(new Vector2 { X = casted.X1, Y = casted.Y1 }, c2, v);
+						prevC1 = v;
 						prevC2 = c2;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToCubicRelative)
@@ -339,6 +334,7 @@
 						v.X += casted.X;
 						v.Y += casted.Y;
 						builder.AddCubicBezier(c1, c2, v);
+						prevC1 = v;
 						prevC2 = c2;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToQuadraticAbsolute)
@@ -349,6 +345,7 @@
 						v.Y = casted.Y;
 						builder.AddQuadraticBezier(c1, v);
 						prevC1 = c1;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToQuadraticRelative)
 					{
@@ -360,6 +357,7 @@
 						v.Y += casted.Y;
 						builder.AddQuadraticBezier(c1, v);
 						prevC1 = c1;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.ArcAbsolute)
 					{
@@ -369,6 +367,8 @@
 						var size = casted.LargeArcFlag ? CanvasArcSize.Large : CanvasArcSize.Small;
 						var sweepDirection = casted.SweepFlag ? CanvasSweepDirection.Clockwise : CanvasSweepDirection.CounterClockwise;
 						builder.AddArc(v, casted.RadiusX, casted.RadiusY, 180.0F * casted.Angle / (float)Math.PI, sweepDirection, size);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.ArcRelative)
 					{
@@ -378,30 +378,40 @@
 						var size = casted.LargeArcFlag ? CanvasArcSize.Large : CanvasArcSize.Small;
 						var sweepDirection = casted.SweepFlag ? CanvasSweepDirection.Clockwise : CanvasSweepDirection.CounterClockwise;
 						builder.AddArc(v, casted.RadiusX, casted.RadiusY, 180.0F * casted.Angle / (float)Math.PI, sweepDirection, size);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToHorizontalAbsolute)
 					{
 						var casted = (SvgPathSegmentLineToHorizontalAbsolute)segment;
 						v.X = casted.X;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToHorizontalRelative)
 					{
 						var casted = (SvgPathSegmentLineToHorizontalRelative)segment;
 						v.X += casted.X;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToVerticalAbsolute)
 					{
 						var casted = (SvgPathSegmentLineToVerticalAbsolute)segment;
 						v.Y = casted.Y;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.LineToVerticalRelative)
 					{
 						var casted = (SvgPathSegmentLineToVerticalRelative)segment;
 						v.Y += casted.Y;
 						builder.AddLine(v);
+						prevC1 = v;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToCubicSmoothAbsolute)
 					{
@@ -411,6 +421,7 @@
 						v.X = casted.X;
 						v.Y = casted.Y;
 						builder.AddCubicBezier(c1, c2, v);
+						prevC1 = v;
 						prevC2 = c2;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToCubicSmoothRelative)
@@ -423,6 +434,7 @@
 						v.X += casted.X;
 						v.Y += casted.Y;
 						builder.AddCubicBezier(c1, c2, v);
+						prevC1 = v;
 						prevC2 = c2;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToQuadraticSmoothAbsolute)
@@ -433,6 +445,7 @@
 						v.Y = casted.Y;
 						builder.AddQuadraticBezier(c1, v);
 						prevC1 = c1;
+						prevC2 = v;
 					}
 					else if (segment.PathSegmentType == SvgPathSegment.SvgPathSegmentType.CurveToQuadraticSmoothRelative)
 					{
@@ -442,6 +455,7 @@
 						v.Y += casted.Y;
 						builder.AddQuadraticBezier(c1, v);
 						prevC1 = c1;
+						prevC2 = v;
 					}
 				}
 				if (open)


Chang line feed

Chang line feed

--- src/coreDox.Core/Project/Pages/DoxPage.cs
+++ src/coreDox.Core/Project/Pages/DoxPage.cs
@@ -16,12 +16,12 @@
         {
             if (!doxPageFileInfo.Exists) throw new CoreDoxException($"No page file found at '{doxPageFileInfo.FullName}'!");

-            Content = File.ReadAllText(doxPageFileInfo.FullName);
+            Content = File.ReadAllText(doxPageFileInfo.FullName).Replace("\r\n", "\n");
             if (Content.StartsWith("---"))
             {
                 var splittedContent = Content.Split("---", StringSplitOptions.RemoveEmptyEntries);

-                ParseHeader(splittedContent[0].Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries), doxPageFileInfo);
+                ParseHeader(splittedContent[0].Split("\n", StringSplitOptions.RemoveEmptyEntries), doxPageFileInfo);
                 if (splittedContent.Length == 2)
                 {
                     Content = splittedContent[1].Trim();


adding apple native

adding apple native

--- NotificationHubAPIApp/Controllers/NotificationController.cs
+++ NotificationHubAPIApp/Controllers/NotificationController.cs
@@ -84,6 +84,24 @@
                 return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.BareMessage);
             }
         }
+
+        [HttpPost]
+        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(NotificationOutcome))]
+        [SwaggerResponse(HttpStatusCode.BadRequest, Type = typeof(ConfigurationErrorsException))]
+        [Metadata("Send Message (Apple Native)")]
+        public async System.Threading.Tasks.Task<HttpResponseMessage> SendAppleNativeNotification([Metadata("Connection String")]string connectionString, [Metadata("Hub Name")]string hubName, [Metadata("JSON Payload")]string message)
+        {
+            try
+            {
+                NotificationHubClient hub = NotificationHubClient.CreateClientFromConnectionString(connectionString, hubName);
+                var result = await hub.SendAppleNativeNotificationAsync(message);
+                return Request.CreateResponse<NotificationOutcome>(HttpStatusCode.OK, result);
+            }
+            catch (ConfigurationErrorsException ex)
+            {
+                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.BareMessage);
+            }
+        }

     }


make feed unresolved assembly list distinct

--- NuGet.Extensions/FeedAudit/FeedAuditResultsOutputManager.cs
+++ NuGet.Extensions/FeedAudit/FeedAuditResultsOutputManager.cs
@@ -54,7 +54,7 @@
                         outputList.AddRange(result.UnresolvedAssemblyReferences.Select(u => new AuditResultsOutput { PackageName = result.Package.Id, Category = "Feed Unresolvable Assembly", Item = unresolved.Name }));
                 }
             }
-            foreach (var output in outputList)
+            foreach (var output in outputList.GroupBy(a => a.Item, (key, group) => group.First()))
                 writer.WriteLine(output.ToString());
             writer.Close();
         }


Fix bad merge from the merge tool.

Fix bad merge from the merge tool.

--- NuPack.Dialog/PackageManagerUI/PackageManagerWindow.xaml.cs
+++ NuPack.Dialog/PackageManagerUI/PackageManagerWindow.xaml.cs
@@ -17,6 +17,7 @@
         private const string F1Keyword = "vs.ExtensionManager";
         private readonly DTEPackage _ownerPackage;
         private readonly OnlinePackagesProvider _installedPackagesProvider;
+        private readonly OnlinePackagesProvider _onlinePackagesProvider;

         ///// <summary>
         ///// Constructor for the Package Manager Window


update seed data

update seed data

--- Owpini.EntityFramework/SeedData/OwpiniDbContextExtension.cs
+++ Owpini.EntityFramework/SeedData/OwpiniDbContextExtension.cs
@@ -20,7 +20,12 @@
                 new Business{
                     Id = new Guid("a3749477-f823-4124-aa4a-fc9ad5e79cd6"),
                      Name = "In n Out"
+                },
+                new Business{
+                    Id = new Guid("a3749477-f823-4124-aa4a-fc9ad5e79cd6"),
+                     Name = "Panda Express"
                 }
+

             };


android building

android building

--- PartPreviewWindow/View3D/PrinterBar/PrinterConnectButton.cs
+++ PartPreviewWindow/View3D/PrinterBar/PrinterConnectButton.cs
@@ -34,6 +34,8 @@
 using MatterHackers.MatterControl.CustomWidgets;
 using MatterHackers.MatterControl.PrinterCommunication;
 using MatterHackers.MatterControl.PrinterControls.PrinterConnections;
+using MatterHackers.MatterControl.SlicerConfiguration;
+using MatterHackers.SerialPortCommunication.FrostedSerial;

 namespace MatterHackers.MatterControl.ActionBar
 {


completed test initialize

completed test initialize

--- RoomReservationSystem/Core.UnitTest/RoomRespositoryTests.cs
+++ RoomReservationSystem/Core.UnitTest/RoomRespositoryTests.cs
@@ -10,14 +10,36 @@
     {
         RoomRepository _repoRoom;

-        static IUser _student = new User("matt2694", "matt2694@edu.eal.dk", Permission.Student);
-        static IUser _teacher = new User("alhe", "alhe@eal.dk", Permission.Teacher);
-        static IUser _admin = new User("frje", "frje@eal.dk", Permission.Admin);
+        IUser _student;
+        IUser _teacher;
+        IUser _admin;
+
+        IRoom _room1;
+        IRoom _room2;
+        IRoom _room3;
+
+        Reservation _reservation1;
+        Reservation _reservation2;
+        Reservation _reservation3;
+
+        DateTime _dateFrom;
+        DateTime _dateTo;

         [TestInitialize]
         public void TestInitialize()
         {
             _repoRoom = new RoomRepository();
+            _student = new User("matt2694", "matt2694@edu.eal.dk", Permission.Student);
+            _teacher = new User("alhe", "alhe@eal.dk", Permission.Teacher);
+            _admin = new User("frje", "frje@eal.dk", Permission.Admin);
+            _room1 = new Room('A', 2, 9, 6, Permission.Student);
+            _room2 = new Room('A', 2, 15, 6, Permission.Teacher);
+            _room3 = new Room('A', 2, 115, 6, Permission.Admin);
+            _dateFrom = new DateTime(2016, 4, 29, 8, 0, 0);
+            _dateTo = new DateTime(2016, 4, 29, 16, 0, 0);
+            _reservation1 = new Reservation(_student, _room1, 6, _dateFrom, _dateTo);
+            _reservation2 = new Reservation(_teacher, _room2, 6, _dateFrom, _dateTo);
+            _reservation3 = new Reservation(_admin, _room3, 6, _dateFrom, _dateTo);
         }
     }
 }


Just comments

Just comments

--- Samples/Mapsui.Samples.Wpf.Editing/Samples/EditingSample.cs
+++ Samples/Mapsui.Samples.Wpf.Editing/Samples/EditingSample.cs
@@ -50,8 +50,6 @@

         private static IStyle CreateEditLayerBasicStyle()
         {
-            // Note: VectorStyle does not function in the current release Mapsui version.
-            // You need the package deployed from the build server.
             var editStyle = new VectorStyle
             {
                 Fill = new Brush(EditModeColor),
@@ -73,12 +71,13 @@
             Outline = new Pen(Color.Red, 3),
             Line = new Pen(Color.Red, 3)
         };
+
         private static readonly SymbolStyle DisableStyle = new SymbolStyle { Enabled = false };

         private static IStyle CreateSelectedStyle()
         {
-            // The selected style use a ThemeStyle which takes a method to determing the style based
-            // on the feature. In this case is checks it the "Selected" field is set to true.
+            // To show the selected style a ThemeStyle is used which switches on and off the SelectedStyle
+            // depending on a "Selected" attribute.
             return new ThemeStyle(f => (bool?)f["Selected"] == true ? SelectedStyle : DisableStyle);
         }


submission images now layer correctly

submission images now layer correctly

Former-commit-id: 64929d2eac3795339133db974736d75b43cff525

--- MeTLMeeting/SandRibbon/Components/PresentationSpace.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/PresentationSpace.xaml.cs
@@ -21,6 +21,7 @@
 using SandRibbon.Components.Canvas;
 using MeTLLib.DataTypes;
 using SandRibbon.Components.Pedagogicometry;
+using Image = System.Windows.Controls.Image;

 namespace SandRibbon.Components
 {
@@ -556,7 +557,17 @@
                 {
                     var fe = (FrameworkElement)child;
                     if (fe.privacy() == "public")
+                    {
+                      if(child is Image)
+                      {
+                        var image = (Image) child;
+                        var e = viewFor((FrameworkElement)child);
+                        Panel.SetZIndex(e, image.tag().author == Globals.me ? 3 : 1);
+                        clone.Children.Add(e);
+                      }
+                      else
                         clone.Children.Add(viewFor(fe));
+                    }
                 }
             var size = new Size(ActualWidth,ActualHeight);
             clone.Measure(size);
@@ -571,7 +582,15 @@
                 foreach (var child in canvas.Children)
                 {
                     var fe = (FrameworkElement)child;
-                    clone.Children.Add(viewFor(fe));
+                    if(child is Image)
+                    {
+                        var image = (Image) child;
+                        var e = viewFor((FrameworkElement)child);
+                        Panel.SetZIndex(e, image.tag().author == Globals.me ? 3 : 1);
+                        clone.Children.Add(e);
+                    }
+                    else
+                      clone.Children.Add(viewFor(fe));
                 }
             var size = new Size(ActualWidth,ActualHeight);
             clone.Measure(size);


(TFS CS 5946)

(TFS CS 5946)

--- Signum.Web.Extensions/ControllerFilters/FilterAttributes.cs
+++ Signum.Web.Extensions/ControllerFilters/FilterAttributes.cs
@@ -26,17 +26,22 @@
 {
     public class TrackTimeFilter : ActionFilterAttribute
     {
-        Stopwatch stopWatch;
         public override void OnActionExecuting(ActionExecutingContext filterContext)
         {
-            stopWatch = new Stopwatch();
+            Stopwatch stopWatch = new Stopwatch();
+            filterContext.Controller.ViewData["stopWatch"] = stopWatch;
             stopWatch.Start();
         }

         public override void OnResultExecuted(ResultExecutedContext filterContext)
         {
-            stopWatch.Stop();
-            Log(filterContext.RouteData, stopWatch.ElapsedMilliseconds);
+            Stopwatch stopWatch = (Stopwatch) filterContext.Controller.ViewData.TryGetC("stopWatch");
+            //It fails if a redirection has been made
+            if (stopWatch != null)
+            {
+                stopWatch.Stop();
+                Log(filterContext.RouteData, stopWatch.ElapsedMilliseconds);
+            }
         }

         private void Log(RouteData routeData, long time)


Added charset to contenttype of mail message.

--- SlackCommander/SlackCommander.Web/Mailgun/WebhooksModule.cs
+++ SlackCommander/SlackCommander.Web/Mailgun/WebhooksModule.cs
@@ -81,7 +81,7 @@
                 {
                     return HttpStatusCode.NotFound;
                 }
-                return new Nancy.Responses.TextResponse(htmlContents, "text/html", Encoding.UTF8);
+                return new Nancy.Responses.TextResponse(htmlContents, "text/html; charset=UTF-8", Encoding.UTF8);
             };
         }
     }


Cleanup constants.

Cleanup constants.

--- NtApiDotNet/Win32/DirectoryService/DirectoryServiceUtils.cs
+++ NtApiDotNet/Win32/DirectoryService/DirectoryServiceUtils.cs
@@ -99,6 +99,7 @@
         private const string kObjectSid = "objectSid";
         private const string kDefaultSecurityDescriptor = "defaultSecurityDescriptor";
         private const string kAdminDescription = "adminDescription";
+        private const string kObjectClassCategory = "objectClassCategory";

         private static string GuidToString(Guid guid)
         {
@@ -235,6 +236,15 @@
                 return;
             classes.AddRange(property.Select(p => new DirectoryServiceReferenceClass(p, system)));
         }
+
+        private const string kSystemAuxiliaryClass = "systemAuxiliaryClass";
+        private const string kAuxiliaryClass = "auxiliaryClass";
+        private const string kSystemPossSuperiors = "systemPossSuperiors";
+        private const string kPossSuperiors = "possSuperiors";
+        private const string kAttributeSyntax = "attributeSyntax";
+        private const string kOMSyntax = "oMSyntax";
+        private const string kOMObjectClass = "oMObjectClass";
+        private const string kAttributeSecurityGUID = "attributeSecurityGUID";

         private static DirectoryServiceSchemaObject ConvertToSchemaClass(string domain, Guid? schema_id, DirectoryEntry dir_entry)
         {
@@ -260,7 +270,7 @@
                 case "classschema":
                     {
                         string subclass_of = prop.GetPropertyValue<string>(kSubClassOf);
-                        int category = prop.GetPropertyValue<int>("objectClassCategory");
+                        int category = prop.GetPropertyValue<int>(kObjectClassCategory);

                         List <DirectoryServiceSchemaClassAttribute> attrs = new List<DirectoryServiceSchemaClassAttribute>();
                         AddAttributes(attrs, prop.GetPropertyValues<string>(kMustContain), true, false);
@@ -270,11 +280,11 @@
                         var default_security_desc = prop.GetPropertyValue<string>(kDefaultSecurityDescriptor);

                         List<DirectoryServiceReferenceClass> aux_classes = new List<DirectoryServiceReferenceClass>();
-                        AddClasses(aux_classes, prop.GetPropertyValues<string>("systemAuxiliaryClass"), true);
-                        AddClasses(aux_classes, prop.GetPropertyValues<string>("auxiliaryClass"), false);
+                        AddClasses(aux_classes, prop.GetPropertyValues<string>(kSystemAuxiliaryClass), true);
+                        AddClasses(aux_classes, prop.GetPropertyValues<string>(kAuxiliaryClass), false);
                         List<DirectoryServiceReferenceClass> superior_classes = new List<DirectoryServiceReferenceClass>();
-                        AddClasses(superior_classes, prop.GetPropertyValues<string>("systemPossSuperiors"), true);
-                        AddClasses(superior_classes, prop.GetPropertyValues<string>("possSuperiors"), false);
+                        AddClasses(superior_classes, prop.GetPropertyValues<string>(kSystemPossSuperiors), true);
+                        AddClasses(superior_classes, prop.GetPropertyValues<string>(kPossSuperiors), false);

                         return new DirectoryServiceSchemaClass(domain, dn, schema_id.Value, cn,
                             ldap_name, description, class_name, subclass_of, attrs, default_security_desc, aux_classes,
@@ -282,10 +292,10 @@
                     }
                 case "attributeschema":
                     {
-                        var attribute_syntax = prop.GetPropertyValue<string>("attributeSyntax") ?? string.Empty;
-                        var om_syntax = prop.GetPropertyValue<int>("oMSyntax");
-                        var om_object_class_bytes = prop.GetPropertyValue<byte[]>("oMObjectClass");
-                        var attribute_security_guid = prop.GetPropertyGuid("attributeSecurityGUID");
+                        var attribute_syntax = prop.GetPropertyValue<string>(kAttributeSyntax) ?? string.Empty;
+                        var om_syntax = prop.GetPropertyValue<int>(kOMSyntax);
+                        var om_object_class_bytes = prop.GetPropertyValue<byte[]>(kOMObjectClass);
+                        var attribute_security_guid = prop.GetPropertyGuid(kAttributeSecurityGUID);

                         string om_object_class_name = string.Empty;
                         if (om_object_class_bytes?.Length > 0)
@@ -315,7 +325,7 @@
             {
                 DirectoryEntry root_entry = GetRootEntry(domain, string.Empty, kSchemaNamingContext);
                 var schema_class = ConvertToSchemaClass(domain, guid, FindDirectoryEntry(root_entry,
-                    $"({kSchemaIDGUID}={GuidToString(guid)})", "cn")?.GetDirectoryEntry());
+                    $"({kSchemaIDGUID}={GuidToString(guid)})", kCommonName)?.GetDirectoryEntry());
                 return _schema_class.Get(domain).GetOrAdd(guid, schema_class);
             }
             catch
@@ -330,7 +340,7 @@
             {
                 DirectoryEntry root_entry = GetRootEntry(domain, string.Empty, kSchemaNamingContext);
                 var schema_class = ConvertToSchemaClass(domain, null, FindDirectoryEntry(root_entry,
-                    $"({kLDAPDisplayName}={name})", "cn")?.GetDirectoryEntry());
+                    $"({kLDAPDisplayName}={name})", kCommonName)?.GetDirectoryEntry());
                 if (schema_class == null)
                     return null;
                 return _schema_class.Get(domain).GetOrAdd(schema_class.SchemaId, schema_class);


Fixed recursive enumeration.

Fixed recursive enumeration.

--- NtObjectManager/Cmdlets/Accessible/GetAccessibleDsObject.cs
+++ NtObjectManager/Cmdlets/Accessible/GetAccessibleDsObject.cs
@@ -97,7 +97,7 @@
         public AuthZContext[] Context { get; set; }

         /// <summary>
-        /// <para type="description">Specify to avoid looking up groups for a domain user and just use what's on the local system. This might give inaccurant results. You should also use this if testing on the DC.</para>
+        /// <para type="description">Specify to avoid looking up groups for a domain user and just use what's on the local system. This might give inaccurate results. You should also use this if testing on the DC.</para>
         /// </summary>
         [Parameter]
         public SwitchParameter UseLocalGroup { get; set; }
@@ -203,11 +203,14 @@
         /// </summary>
         protected override void ProcessRecord()
         {
-            SearchScope scope = GetSearchScope();
             string filter = GetLdapFilter();
             foreach (var entry in GetRootEntries())
             {
-                RunAccessCheck(entry, scope, filter, Depth);
+                RunAccessCheck(entry, filter, false, 0);
+                if (Recurse)
+                {
+                    RunAccessCheck(entry, filter, true, Depth - 1);
+                }
             }
         }

@@ -374,9 +377,12 @@
             WriteProgress(new ProgressRecord(0, "Get Accessible DS Objects", str));
         }

-        private void RunAccessCheck(DirectoryEntry root, SearchScope scope, string filter, int current_depth)
-        {
-            foreach (var result in FindAllDirectoryEntries(root, scope, filter, kDistinguishedName, kObjectClass,
+        private void RunAccessCheck(DirectoryEntry root, string filter, bool recurse, int current_depth)
+        {
+            if (current_depth < 0)
+                return;
+
+            foreach (var result in FindAllDirectoryEntries(root, recurse ? SearchScope.OneLevel : SearchScope.Base, filter, kDistinguishedName, kObjectClass,
                 kStructuralObjectClass, kNTSecurityDescriptor, kObjectSid, kName))
             {
                 if (Stopping)
@@ -422,7 +428,7 @@
             if (Stopping)
                 return;

-            if (Recurse && current_depth > 0)
+            if (recurse)
             {
                 foreach (DirectoryEntry entry in root.Children)
                 {
@@ -431,7 +437,7 @@

                     using (entry)
                     {
-                        RunAccessCheck(entry, scope, filter, current_depth--);
+                        RunAccessCheck(entry, filter, recurse, current_depth - 1);
                     }
                 }
             }
@@ -613,11 +619,6 @@
             return "(&" + string.Join("", filters) + ")";
         }

-        private SearchScope GetSearchScope()
-        {
-            return Recurse ? SearchScope.OneLevel : SearchScope.Base;
-        }
-
         private Func<string, bool> CreateFilter(string filter)
         {
             if (PSUtils.HasGlobChars(filter))


* minor: Remove mono compiler warnings from WindModule

--- OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
+++ OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
@@ -37,7 +37,8 @@
 {
     public class WindModule : IWindModule
     {
-        private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+//        private static readonly log4net.ILog m_log
+//            = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

         private int m_frame = 0;
         private int m_frame_mod = 150;


Inspector- avoid recreating sub-tree if not needed

--- Source/Editor/AGS.Editor/GameView/Inspector/AGSInspector.cs
+++ Source/Editor/AGS.Editor/GameView/Inspector/AGSInspector.cs
@@ -181,18 +181,38 @@

         private void refreshNode(ITreeStringNode node, IProperty property)
         {
-            bool isExpanded = _treeView.IsCollapsed(node) == false;
-            if (isExpanded)
-                _treeView.Collapse(node);
             ObjectTypeDescriptor.RefreshChildrenProperties(property);
-            node.TreeNode.Children.Clear();
-            addChildrenToTree(node, property);
-
-            //todo: we'd like to enable expanding a node that was previously expanded however there's a bug that needs to be investigated before that, to reproduce:
-            //In the demo game, show the inspector for the character and expand its current room. Then move to another room.
-            //For some reason this results in endless boundin box/matrix changes until stack overflow is reached.
-            //if (isExpanded)
-            //  _treeView.Expand(node);
+            if (shouldRecreateTree(node, property))
+            {
+                node.TreeNode.Children.Clear();
+                addChildrenToTree(node, property);
+            }
+            else for(int i = 0; i < node.TreeNode.ChildrenCount; i++)
+            {
+                //todo: Do we really need to refresh the property and editor here? Not sure...
+                property.Children[i].Refresh();
+                if (node.TreeNode.Children[i] is InspectorTreeNode inspectorNode) inspectorNode.Editor.RefreshUI();
+
+                refreshNode(node.TreeNode.Children[i], property.Children[i]);
+            }
+        }
+
+        private bool shouldRecreateTree(ITreeStringNode node, IProperty property)
+        {
+            if (node.TreeNode.ChildrenCount != property.Children.Count)
+                return true;
+            for (int i = 0; i < node.TreeNode.ChildrenCount; i++)
+            {
+                if (node.TreeNode.Children[i].Text != property.Children[i].DisplayName)
+                {
+                    return true;
+                }
+                if (node is InspectorTreeNode inspectorNode && inspectorNode.Property != property.Children[i])
+                {
+                    return true;
+                }
+            }
+            return false;
         }

         private void cleanup()