Update ProjectEditorViewModel.Shape.cs

Update ProjectEditorViewModel.Shape.cs

--- src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Shape.cs
+++ src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Shape.cs
@@ -508,7 +508,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -539,7 +539,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -603,7 +603,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -650,7 +650,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -714,7 +714,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -761,7 +761,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -825,7 +825,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -872,7 +872,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -933,7 +933,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -977,7 +977,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -1037,7 +1037,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(result));
@@ -1094,7 +1094,7 @@

         var previous = layer.Shapes;
         var next = shapesBuilder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -1118,7 +1118,7 @@

         var previous = layer.Shapes;
         var next = source.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;

         return group;
@@ -1149,7 +1149,7 @@

         var previous = layer.Shapes;
         var next = source.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+        project.History?.Snapshot(previous, next, p => layer.Shapes = p);
         layer.Shapes = next;
     }

@@ -1326,12 +1326,8 @@

         var previous = new { DeltaX = -dx, DeltaY = -dy, Shapes = shapes };
         var next = new { DeltaX = dx, DeltaY = dy, Shapes = shapes };
-        project.History?.Snapshot(previous, next, (s) =>
-        {
-            if (s is null)
-            {
-                return;
-            }
+        project.History?.Snapshot(previous, next, s =>
+        {
             MoveShapesBy(s.Shapes, s.DeltaX, s.DeltaY);
         });
     }
@@ -1393,7 +1389,7 @@

             var previous = libraryViewModel.Items;
             var next = builder.ToImmutable();
-            project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+            project.History?.Snapshot(previous, next, p => libraryViewModel.Items = p);
             libraryViewModel.Items = next;
         }
         else
@@ -1408,7 +1404,7 @@

                 var previous = libraryViewModel.Items;
                 var next = builder.ToImmutable();
-                project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+                project.History?.Snapshot(previous, next, p => libraryViewModel.Items = p);
                 libraryViewModel.Items = next;
             }
         }
@@ -1430,7 +1426,7 @@

         var previous = libraryViewModel.Items;
         var next = builder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+        project.History?.Snapshot(previous, next, p => libraryViewModel.Items = p);
         libraryViewModel.Items = next;
     }

@@ -1447,7 +1443,7 @@

         var previous = libraryViewModel.Items;
         var next = builder.ToImmutable();
-        project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+        project.History?.Snapshot(previous, next, p => libraryViewModel.Items = p);
         libraryViewModel.Items = next;
     }
 }


Update ConformSAComponent.cs

Update ConformSAComponent.cs

--- src/IntraLattice/CORE/Components/Frame/ConformSAComponent.cs
+++ src/IntraLattice/CORE/Components/Frame/ConformSAComponent.cs
@@ -90,8 +90,9 @@

             // 2. Initialize the lattice
             var lattice = new Lattice();
-            var spaceTree = new DataTree<GeometryBase>(); // will contain the morphed uv spaces (as surface-surface, surface-axis or surface-point)
-
+            // Will contain the morphed uv spaces (as surface-axis)
+            var spaceTree = new DataTree<GeometryBase>();
+
             // 3. Package the number of cells in each direction into an array
             float[] N = new float[3] { nU, nV, nW };


deleted param lattice component

deleted param lattice component

--- src/IntraLattice/CORE/Data/GH_Goo/LatticeCellGooComponent.cs
+++ src/IntraLattice/CORE/Data/GH_Goo/LatticeCellGooComponent.cs
@@ -132,72 +132,7 @@
     }

-    public class LatticeCellParameter : GH_PersistentGeometryParam<LatticeCellGoo>, IGH_PreviewObject
-    {
-        public LatticeCellParameter() : base(new GH_InstanceDescription("LatticeCell","cell","Lattice cell data","Intralattice","Data"))
-        {
-        }
-
-        protected override System.Drawing.Bitmap Icon
-        {
-            get
-            {
-                return null;
-            }
-        }
-
-        protected override GH_GetterResult Prompt_Plural(ref List<LatticeCellGoo> values)
-        {
-            return GH_GetterResult.cancel;
-        }
-        protected override GH_GetterResult Prompt_Singular(ref LatticeCellGoo value)
-        {
-            return GH_GetterResult.cancel;
-        }
-
-
-        public override GH_Exposure Exposure
-        {
-            get
-            {
-                return GH_Exposure.primary;
-            }
-        }
-
-        public override Guid ComponentGuid
-        {
-            get { return new Guid("{4bd10f65-fe3e-48e0-a6be-745c32ee3351}"); }
-        }
-        public BoundingBox ClippingBox
-        {
-            get
-            {
-                return Preview_ComputeClippingBox();
-            }
-        }
-        public void DrawViewportMeshes(IGH_PreviewArgs args)
-        {
-            //Meshes aren't drawn.
-        }
-        public void DrawViewportWires(IGH_PreviewArgs args)
-        {
-            //Use a standard method to draw gunk, you don't have to specifically implement this.
-            Preview_DrawWires(args);
-        }
-
-        private bool m_hidden = false;
-        public bool Hidden
-        {
-            get { return m_hidden; }
-            set { m_hidden = value; }
-        }
-        public bool IsPreviewCapable
-        {
-            get { return true; }
-        }

-    }
-

     public class LatticeCellGooComponent : GH_Component
     {
@@ -207,7 +142,7 @@
         public LatticeCellGooComponent()
             : base("LatticeCellGoo", "LattiCell",
                 "Lattice Cell data structure",
-                "IntraLattice", "Data")
+                "IntraLattice2", "Cell")
         {
         }

@@ -229,7 +164,7 @@
         /// </summary>
         protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
         {
-            pManager.AddParameter(new LatticeCellParameter(),"LatticeCell", "LC","data rep of LatticeCell",GH_ParamAccess.item);
+            pManager.AddGenericParameter("latticeCell", "LaCell", "Lattice Cell representation in form of data structure", GH_ParamAccess.item);
         }

         /// <summary>
@@ -254,7 +189,7 @@

             if (ListCurve == null && ListCurve.Count == 0) { return; }

-            //polygonize curve
+
             foreach (var element in ListCurve)
             {
                 if (element.IsValid)


And forgot to make the mod bonus check insensitive for DoM.

--- BrawlSetup.cs
+++ BrawlSetup.cs
@@ -64,7 +64,8 @@

 		// Makes various widgets insensitive if DoM is selected.
 		private void CheckSport (object sender, EventArgs args)
-			{ mpSpin.Sensitive = fullFancyCheck.Sensitive = sportCombo.ActiveText != "Magic"; }
+			{ mpSpin.Sensitive = fullFancyCheck.Sensitive =
+			  gainModCheck.Sensitive = sportCombo.ActiveText != "Magic"; }

 		// Cancels the brawl and returns to the main dueling window.
 		private void CancelBrawl (object sender, EventArgs args)


Throwing on set, regardless of condition, which is bad.

--- src/MassTransit/Context/HttpContextContextStorageProvider.cs
+++ src/MassTransit/Context/HttpContextContextStorageProvider.cs
@@ -38,12 +38,10 @@
 			set
 			{
 				HttpContext httpContext = HttpContext.Current;
-				if (httpContext != null)
-				{
-					httpContext.Items[SendContextKey] = value;
-				}
+				if (httpContext == null)
+					throw new InvalidOperationException("HttpContext.Current is not available to set the current SendContext");

-				throw new InvalidOperationException("HttpContext.Current is not available to set the current SendContext");
+				httpContext.Items[SendContextKey] = value;
 			}
 		}

@@ -64,12 +62,10 @@
 			set
 			{
 				HttpContext httpContext = HttpContext.Current;
-				if (httpContext != null)
-				{
-					httpContext.Items[ReceiveContextKey] = value;
-				}
-
-				throw new InvalidOperationException("HttpContext.Current is not available to set the current SendContext");
+				if (httpContext == null)
+					throw new InvalidOperationException("HttpContext.Current is not available to set the current SendContext");
+
+				httpContext.Items[ReceiveContextKey] = value;
 			}
 		}
 	}


Update TypeFieldElement.cs

Update TypeFieldElement.cs

If you add a custom type field definition in merchello.config you get an exception because the configuration property is missing.

--- src/Merchello.Core/Configuration/Outline/TypeFieldElement.cs
+++ src/Merchello.Core/Configuration/Outline/TypeFieldElement.cs
@@ -16,6 +16,7 @@
         /// <remarks>
         /// This corresponds to the alias field in the "merchDbTypeField" table
         /// </remarks>
+        [ConfigurationProperty("alias", IsKey = true)]
         public string Alias
         {
             get { return (string)this["alias"]; }


refactor: prime cache formatter beautify

--- src/Microsoft.AspNetCore.AngularServices/PrimeCacheHelper.cs
+++ src/Microsoft.AspNetCore.AngularServices/PrimeCacheHelper.cs
@@ -50,9 +50,9 @@
         private static string FormatAsScript(string url, HttpStatusCode responseStatusCode, string responseBody)
             =>
                 "<script>" +
-                "window.__preCachedResponses = window.__preCachedResponses || {{}}; " +
-                $"window.__preCachedResponses[{JsonConvert.SerializeObject(url)}] " +
-                $"= {JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody })};" +
+                    "window.__preCachedResponses = window.__preCachedResponses || {}; " +
+                    $"window.__preCachedResponses[{JsonConvert.SerializeObject(url)}] " +
+                        $"= {JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody })};" +
                 "</script>";
     }
 }


Keep random generated Cryptonote instance id and just replace the fist byte with the user supplied value

--- src/Miningcore/Blockchain/Cryptonote/CryptonoteJobManager.cs
+++ src/Miningcore/Blockchain/Cryptonote/CryptonoteJobManager.cs
@@ -627,15 +627,13 @@
         {
             instanceId = new byte[CryptonoteConstants.InstanceIdSize];

+            using(var rng = RandomNumberGenerator.Create())
+            {
+                rng.GetNonZeroBytes(instanceId);
+            }
+
             if(clusterConfig.InstanceId.HasValue)
                 instanceId[0] = clusterConfig.InstanceId.Value;
-            else
-            {
-                using(var rng = RandomNumberGenerator.Create())
-                {
-                    rng.GetNonZeroBytes(instanceId);
-                }
-            }
         }

         private void ConfigureRewards()


NH-3222 - Add unit tests

NH-3222 - Add unit tests

--- src/NHibernate.Test/SqlTest/Query/NativeSQLQueriesFixture.cs
+++ src/NHibernate.Test/SqlTest/Query/NativeSQLQueriesFixture.cs
@@ -1,4 +1,5 @@
 using System.Collections;
+using System.Linq;
 using NHibernate.Transform;
 using NUnit.Framework;
 using NHibernate.Criterion;
@@ -596,5 +597,66 @@
 			              target.FullName + ">"
 				);
 		}
+
+		class TestResultSetTransformer : IResultTransformer
+		{
+			public bool TransformTupleCalled { get; set; }
+			public bool TransformListCalled { get; set; }
+			public object TransformTuple(object[] tuple, string[] aliases)
+			{
+				this.TransformTupleCalled = true;
+				return tuple;
+			}
+			public IList TransformList(IList collection)
+			{
+				this.TransformListCalled = true;
+				return collection;
+			}
+		}
+
+		[Test]
+		public void CanSetResultTransformerOnFutureQuery()
+		{
+			using (var s = this.OpenSession())
+			using (s.BeginTransaction())
+			{
+				s.Save(new Person("Ricardo"));
+				s.Flush();
+
+				var transformer = new TestResultSetTransformer();
+				var l = s
+					.CreateSQLQuery("select Name from Person")
+					.SetResultTransformer(transformer)
+					.Future<object[]>();
+
+				Assert.AreEqual(l.Count(), 1);
+				Assert.AreEqual("Ricardo", l.ElementAt(0)[0]);
+				Assert.IsTrue(transformer.TransformListCalled);
+				Assert.IsTrue(transformer.TransformTupleCalled);
+			}
+		}
+
+		[Test]
+		public void CanSetResultTransformerOnFutureValue()
+		{
+			using (var s = this.OpenSession())
+			using (s.BeginTransaction())
+			{
+				s.Save(new Person("Ricardo"));
+				s.Flush();
+
+				var transformer = new TestResultSetTransformer();
+				var l = s
+					.CreateSQLQuery("select Name from Person")
+					.SetResultTransformer(transformer)
+					.FutureValue<object[]>();
+
+				var v = l.Value;
+
+				Assert.AreEqual("Ricardo", v[0]);
+				Assert.IsTrue(transformer.TransformListCalled);
+				Assert.IsTrue(transformer.TransformTupleCalled);
+			}
+		}
 	}
 }


Updated version to 0.1.2

Updated version to 0.1.2

--- src/NUnit.Framework.Helpers/Properties/CommonAssemblyInfo.cs
+++ src/NUnit.Framework.Helpers/Properties/CommonAssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCompany("Martin Buberl")]
 [assembly: AssemblyCopyright("Copyright (c) 2012, Martin Buberl")]

-[assembly: AssemblyVersion("0.1.1.0")]
-[assembly: AssemblyFileVersion("0.1.1.0")]
+[assembly: AssemblyVersion("0.1.2.0")]
+[assembly: AssemblyFileVersion("0.1.2.0")]


converte um ModelStateDictionary em uma lista de string

--- src/main/Thunder.Web.Mvc/Extensions/ModelStateDictionaryExtensions.cs
+++ src/main/Thunder.Web.Mvc/Extensions/ModelStateDictionaryExtensions.cs
@@ -67,5 +67,15 @@
         {
             source.AddModelError(key, string.Format(errorMessage, args));
         }
+
+        /// <summary>
+        /// Cast for list of string
+        /// </summary>
+        /// <param name="source"><see cref="ModelStateDictionary"/></param>
+        /// <returns>List of string</returns>
+        public static IList<string> ToListOfString(this ModelStateDictionary source)
+        {
+            return (from key in source.Keys where source[key].Errors.Any() from error in source[key].Errors select error.ErrorMessage).ToList();
+        }
     }
 }


Patch 1.8.4.7

Patch 1.8.4.7

Small fixs

--- Chat/NewChat_frm.cs
+++ Chat/NewChat_frm.cs
@@ -270,6 +270,7 @@
                     window = new ChatWindow(message.Type.ToString(), true) { issystemtab = true};
                     ChannelTabs.TabPages.Add(window);
                 }
+                else window.WriteMessage(message, autoscroll);
             }
             else if (message.Type == MessageType.Join || message.Type == MessageType.Leave || message.Channel == null)
             {
@@ -303,15 +304,17 @@
                     ChannelTabs.TabPages.Add(window);
                 }
             }
-
-            window = window ?? GetChatWindow(message.Channel);
-            if(window == null)
-            {
-                window = new ChatWindow(message.Channel, message.Type == MessageType.PrivateMessage);
-                ChannelTabs.TabPages.Add(window);
-            }
-
-            window.WriteMessage(message, autoscroll);
+            else
+            {
+                window = window ?? GetChatWindow(message.Channel);
+                if (window == null)
+                {
+                    window = new ChatWindow(message.Channel, message.Type == MessageType.PrivateMessage);
+                    ChannelTabs.TabPages.Add(window);
+                }
+
+                window.WriteMessage(message, autoscroll);
+            }
         }

         private ChatWindow GetChatWindow(string name)
@@ -390,14 +393,11 @@

             string[] info = parts[0].Split(',');

-            // _userData[info[0]] = new UserData() and _userData.Add(info[0], new UserData()) will behave exactly the same if the key doesn't already
-            // exists, so the below check is unnecessary.
-            ////if (!_userData.ContainsKey(info[0]))
-            ////    _userData.Add(info[0], new UserData { Username = info[0], Rank = Int32.Parse(info[1]), LoginID = Int32.Parse(info[2]), UserColor = Color.FromArgb(255, Convert.ToInt32(info[3]), Convert.ToInt32(info[4]), Convert.ToInt32(info[5])) });
-            ////else
-            ////    _userData[info[0]] = new UserData { Username = info[0], Rank = Int32.Parse(info[1]), LoginID = Int32.Parse(info[2]), UserColor = Color.FromArgb(255, Convert.ToInt32(info[3]), Convert.ToInt32(info[4]), Convert.ToInt32(info[5])) };
-            _userData.Add(info[0], new UserData { Username = info[0], Rank = int.Parse(info[1]), LoginID = int.Parse(info[2]), UserColor = Color.FromArgb(255, Convert.ToInt32(info[3]), Convert.ToInt32(info[4]), Convert.ToInt32(info[5])) });
-
+            if (!_userData.ContainsKey(info[0]))
+                _userData.Add(info[0], new UserData { Username = info[0], Rank = Int32.Parse(info[1]), LoginID = Int32.Parse(info[2]), UserColor = Color.FromArgb(255, Convert.ToInt32(info[3]), Convert.ToInt32(info[4]), Convert.ToInt32(info[5])) });
+            else
+                _userData[info[0]] = new UserData { Username = info[0], Rank = Int32.Parse(info[1]), LoginID = Int32.Parse(info[2]), UserColor = Color.FromArgb(255, Convert.ToInt32(info[3]), Convert.ToInt32(info[4]), Convert.ToInt32(info[5])) };
+
             if (info[0] == Program.UserInfo.Username)
             {
                 var user = _userData[info[0]];


Fix 'Error handling HANDSHAKE_REPLY' when there are duplicate entries in DMPModControl.txt

--- Client/ModWorker.cs
+++ Client/ModWorker.cs
@@ -138,19 +138,28 @@
                                         string[] splitLine = lowerFixedLine.Split('=');
                                         if (splitLine.Length == 2)
                                         {
-                                            parseRequired.Add(splitLine[0], splitLine[1].ToLowerInvariant());
+                                            if (!parseRequired.ContainsKey(splitLine[0]))
+                                            {
+                                                parseRequired.Add(splitLine[0], splitLine[1].ToLowerInvariant());
+                                            }
                                         }
                                         else
                                         {
                                             if (splitLine.Length == 1)
                                             {
-                                                parseRequired.Add(splitLine[0], "");
+                                                if (!parseRequired.ContainsKey(splitLine[0]))
+                                                {
+                                                    parseRequired.Add(splitLine[0], "");
+                                                }
                                             }
                                         }
                                     }
                                     else
                                     {
-                                        parseRequired.Add(lowerFixedLine, "");
+                                        if (!parseRequired.ContainsKey(lowerFixedLine))
+                                        {
+                                            parseRequired.Add(lowerFixedLine, "");
+                                        }
                                     }
                                 }
                                 break;
@@ -162,19 +171,28 @@
                                         string[] splitLine = lowerFixedLine.Split('=');
                                         if (splitLine.Length == 2)
                                         {
-                                            parseOptional.Add(splitLine[0], splitLine[1]);
+                                            if (!parseOptional.ContainsKey(splitLine[0]))
+                                            {
+                                                parseOptional.Add(splitLine[0], splitLine[1]);
+                                            }
                                         }
                                         else
                                         {
                                             if (splitLine.Length == 1)
                                             {
-                                                parseOptional.Add(splitLine[0], "");
+                                                if (!parseOptional.ContainsKey(splitLine[0]))
+                                                {
+                                                    parseOptional.Add(splitLine[0], "");
+                                                }
                                             }
                                         }
                                     }
                                     else
                                     {
-                                        parseOptional.Add(lowerFixedLine, "");
+                                        if (!parseOptional.ContainsKey(lowerFixedLine))
+                                        {
+                                            parseOptional.Add(lowerFixedLine, "");
+                                        }
                                     }
                                 }
                                 break;
@@ -185,12 +203,18 @@
                                     //Resource is dll's only.
                                     if (lowerFixedLine.ToLowerInvariant().EndsWith(".dll"))
                                     {
-                                        parseWhiteBlackList.Add(lowerFixedLine);
+                                        if (parseWhiteBlackList.Contains(lowerFixedLine))
+                                        {
+                                            parseWhiteBlackList.Add(lowerFixedLine);
+                                        }
                                     }
                                 }
                                 break;
                             case "partslist":
-                                parsePartsList.Add(trimmedLine);
+                                if (!parsePartsList.Contains(trimmedLine))
+                                {
+                                    parsePartsList.Add(trimmedLine);
+                                }
                                 break;
                         }
                     }


Try all existing alternative addresses that may exist for the same bus.

--- Connection.cs
+++ Connection.cs
@@ -116,8 +116,21 @@
 			if (entries.Length == 0)
 				throw new Exception ("No addresses were found");

-			//TODO: try alternative addresses if needed
-			AddressEntry entry = entries[0];
+			int index = 0;
+			while (index < entries.Length) {
+				AddressEntry entry = entries[index++];
+
+				Id = entry.GUID;
+				try {
+					Transport = Transport.Create (entry);
+				} catch {
+					if (index < entries.Length)
+						continue;
+					throw;
+				}
+
+				break;
+			}

 			isConnected = true;
 		}


small performance optimizations for GenerateSamples function

--- DistantTerrain/Scripts/ImprovedTerrainSampler.cs
+++ DistantTerrain/Scripts/ImprovedTerrainSampler.cs
@@ -102,7 +102,7 @@
             byte[,] shm = dfUnity.ContentReader.WoodsFileReader.GetHeightMapValuesRange(mx - 2, my - 2, 4);
             byte[,] lhm = dfUnity.ContentReader.WoodsFileReader.GetLargeHeightMapValuesRange(mx - 1, my, 3);

-            float[,] multiplierValue = new float[4, 4];
+            float[,] baseHeightValue = new float[4, 4];
             for (int y = 0; y < 4; y++)
             {
                 for (int x = 0; x < 4; x++)
@@ -110,7 +110,7 @@
                     int mapPixelX = Math.Max(0, Math.Min(mx + x - 2, WoodsFile.mapWidthValue));
                     int mapPixelY = Math.Max(0, Math.Min(my + y - 2, WoodsFile.mapHeightValue));

-                    multiplierValue[x, y] = ImprovedWorldTerrain.computeHeightMultiplier(mapPixelX, mapPixelY);
+                    baseHeightValue[x, y] = shm[x,y] * ImprovedWorldTerrain.computeHeightMultiplier(mapPixelX, mapPixelY);
                 }
             }

@@ -161,6 +161,33 @@
                     noiseHeightMultiplierMap[x, y] = waterMap[x, y] * climateMap[x, y] * multFact;
                 }
             }
+
+            //float[,] noiseHeightMultiplierMap = new float[4, 4];
+            //for (int y = 0; y < 4; y++)
+            //{
+            //    for (int x = 0; x < 4; x++)
+            //    {
+            //        int mapPixelX = Math.Max(0, Math.Min(mx + x - 2, WoodsFile.mapWidthValue));
+            //        int mapPixelY = Math.Max(0, Math.Min(my + y - 2, WoodsFile.mapHeightValue));
+
+            //        float climateValue = GetNoiseMapScaleBasedOnClimate(mapPixelX, mapPixelY);
+
+            //        float waterDistance = (float)Math.Sqrt(ImprovedWorldTerrain.MapDistanceSquaredFromWater[mapPixelY * WoodsFile.mapWidthValue + mapPixelX]);
+
+            //        float waterValue;
+            //        if (shm[x, y] <= 2) // mappixel is water
+            //            waterValue = 0.0f;
+            //        else
+            //            waterValue = 1.0f;
+
+            //        // interpolation multiplier taking near coast map pixels into account
+            //        // (multiply with 0 at coast line and 1 at interpolationEndDistanceFromWaterForNoiseScaleMultiplier)
+            //        float multFact = (Mathf.Min(interpolationEndDistanceFromWaterForNoiseScaleMultiplier, waterDistance) / interpolationEndDistanceFromWaterForNoiseScaleMultiplier);
+
+            //        // blend watermap with climatemap taking into account multFact
+            //        noiseHeightMultiplierMap[x, y] = waterValue * climateValue * multFact;
+            //    }
+            //}

             float extraNoiseScaleBasedOnClimate = GetExtraNoiseScaleBasedOnClimate(mx, my);

@@ -186,10 +213,10 @@
                     float scaledHeight = 0;

                     // Bicubic sample small height map for base terrain elevation
-                    x1 = TerrainHelper.CubicInterpolator(shm[0, 3] * multiplierValue[0, 3], shm[1, 3] * multiplierValue[1, 3], shm[2, 3] * multiplierValue[2, 3], shm[3, 3] * multiplierValue[3, 3], sfracx);
-                    x2 = TerrainHelper.CubicInterpolator(shm[0, 2] * multiplierValue[0, 2], shm[1, 2] * multiplierValue[1, 2], shm[2, 2] * multiplierValue[2, 2], shm[3, 2] * multiplierValue[3, 2], sfracx);
-                    x3 = TerrainHelper.CubicInterpolator(shm[0, 1] * multiplierValue[0, 1], shm[1, 1] * multiplierValue[1, 1], shm[2, 1] * multiplierValue[2, 1], shm[3, 1] * multiplierValue[3, 1], sfracx);
-                    x4 = TerrainHelper.CubicInterpolator(shm[0, 0] * multiplierValue[0, 0], shm[1, 0] * multiplierValue[1, 0], shm[2, 0] * multiplierValue[2, 0], shm[3, 0] * multiplierValue[3, 0], sfracx);
+                    x1 = TerrainHelper.CubicInterpolator(baseHeightValue[0, 3], baseHeightValue[1, 3], baseHeightValue[2, 3], baseHeightValue[3, 3], sfracx);
+                    x2 = TerrainHelper.CubicInterpolator(baseHeightValue[0, 2], baseHeightValue[1, 2], baseHeightValue[2, 2], baseHeightValue[3, 2], sfracx);
+                    x3 = TerrainHelper.CubicInterpolator(baseHeightValue[0, 1], baseHeightValue[1, 1], baseHeightValue[2, 1], baseHeightValue[3, 1], sfracx);
+                    x4 = TerrainHelper.CubicInterpolator(baseHeightValue[0, 0], baseHeightValue[1, 0], baseHeightValue[2, 0], baseHeightValue[3, 0], sfracx);
                     baseHeight = TerrainHelper.CubicInterpolator(x1, x2, x3, x4, sfracy);
                     scaledHeight += baseHeight * baseHeightScale;


catch exceptions

catch exceptions

--- Colours/MainForm.cs
+++ Colours/MainForm.cs
@@ -569,7 +569,12 @@
                     appPal.NewFromPalette(p);
                 }
             }
-            catch (EncoderFallbackException)
+            catch (NotImplementedException)
+            {
+                MessageBox.Show(this, "The Photoshop palette has an unsupported colourspace..",
+                    "Colours", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+            catch (Exception)
             {
                 MessageBox.Show(this, "The Photoshop palette could not be converted.",
                     "Colours", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -586,7 +591,7 @@
                         AcoConverter.ToPhotoshopPalette(appPal.Palette));
                 }
             }
-            catch (EncoderFallbackException)
+            catch (Exception)
             {
                 MessageBox.Show(this, "The Photoshop palette could not be converted.",
                     "Colours", MessageBoxButtons.OK, MessageBoxIcon.Error);


Consensus: send AppendEntries RPC upon election

--- Consensus.cs
+++ Consensus.cs
@@ -239,6 +239,19 @@
             // send AppendEntries RPCs to each server
             // if that server's nextIndex <= log index, send w/ log entries starting at nextIndex
             // else send empty AppendEntries RPC
+
+            IEnumerable<Task<IPeerResponse>> responses =
+                _config.Peers.Where(id => id.N != Id.N).Select(id => _peerRpc(id, new AppendEntriesRequest<TWriteOp>()
+                    {
+                        Term = _currentTerm,
+                        LeaderId = Id,
+                        PrevLogIndex = _lastApplied,
+                        PrevLogTerm = _currentTerm,
+                        Entries = new List<ILogEntry<TWriteOp>>(),
+                        LeaderCommit = _lastApplied,
+                    }));
+
+            // await responses
         }

         private void SendAppendEntriesRpc()


Remove Unnecessary BindingFlag

Remove Unnecessary BindingFlag

--- src/SFA.DAS.Commitments.Infrastructure/Logging/NLogLogger.cs
+++ src/SFA.DAS.Commitments.Infrastructure/Logging/NLogLogger.cs
@@ -141,7 +141,7 @@
         {
             if (entry == null) return null;

-            var entryProperties = entry.GetType().GetProperties(BindingFlags.Public);
+            var entryProperties = entry.GetType().GetProperties();
             var properties = new Dictionary<string, object>(entryProperties.Length);

             foreach (var property in entryProperties)


рефакторинг: разделены проверка типов и работа со свойствами

--- src/ScriptEngine.HostedScript/Library/SystemGlobalContext.cs
+++ src/ScriptEngine.HostedScript/Library/SystemGlobalContext.cs
@@ -500,9 +500,43 @@
         [ContextMethod("ЗаполнитьЗначенияСвойств","FillPropertyValues")]
         public void FillPropertyValues(IRuntimeContextInstance acceptor, IRuntimeContextInstance source, IValue filledProperties = null, IValue ignoredProperties = null)
         {
+            string strFilled;
+            string strIgnored;
+
+            if (filledProperties == null || filledProperties.DataType == DataType.Undefined)
+            {
+                strFilled = null;
+            }
+            else if (filledProperties.DataType == DataType.String)
+            {
+                strFilled = filledProperties.AsString();
+            }
+            else
+            {
+                throw RuntimeException.InvalidArgumentType(3, nameof(filledProperties));
+            }
+
+            if (ignoredProperties == null || ignoredProperties.DataType == DataType.Undefined)
+            {
+                strIgnored = null;
+            }
+            else if (ignoredProperties.DataType == DataType.String)
+            {
+                strIgnored = ignoredProperties.AsString();
+            }
+            else
+            {
+                throw RuntimeException.InvalidArgumentType(4, nameof(ignoredProperties));
+            }
+
+            FillPropertyValuesStr(acceptor, source, strFilled, strIgnored);
+        }
+
+        public void FillPropertyValuesStr(IRuntimeContextInstance acceptor, IRuntimeContextInstance source, string filledProperties = null, string ignoredProperties = null)
+        {
             IEnumerable<string> sourceProperties;

-            if (filledProperties == null || filledProperties.DataType == DataType.Undefined)
+            if (filledProperties == null)
             {
                 string[] names = new string[source.GetPropCount()];
                 for (int i = 0; i < names.Length; i++)
@@ -510,42 +544,22 @@
                     names[i] = source.GetPropName(i);
                 }

-
-                if (ignoredProperties == null || ignoredProperties.DataType == DataType.Undefined)
+                if (ignoredProperties == null)
                 {
                     sourceProperties = names;
                 }
-                else if ( ignoredProperties.DataType == DataType.String)
-                {
-                    IEnumerable<string> ignoredPropCollection = ignoredProperties.AsString()
-                        .Split(',')
+                else
+                {
+                    IEnumerable<string> ignoredPropCollection = ignoredProperties.Split(',')
                         .Select(x => x.Trim())
                         .Where(x => x.Length > 0);

                     sourceProperties = names.Where(x => !ignoredPropCollection.Contains(x));
                 }
-                else
-                {
-                    throw RuntimeException.InvalidArgumentType(4, nameof(ignoredProperties));
-                }
             }
             else
             {
-                if( filledProperties.DataType != DataType.String )
-                {
-                    throw RuntimeException.InvalidArgumentType(3, nameof(filledProperties));
-                }
-
-                if (ignoredProperties != null
-                    && ignoredProperties.DataType != DataType.Undefined
-                    && ignoredProperties.DataType != DataType.String
-                   )
-                {
-                    throw RuntimeException.InvalidArgumentType(4, nameof(ignoredProperties));
-                }
-
-                sourceProperties = filledProperties.AsString()
-                    .Split(',')
+                sourceProperties = filledProperties.Split(',')
                     .Select(x => x.Trim())
                     .Where(x => x.Length > 0);

@@ -555,21 +569,22 @@
                     acceptor.FindProperty(item); // бросает PropertyAccessException если свойства нет
                 }
             }
-
+
+
             foreach (var srcProperty in sourceProperties)
             {
                 try
                 {
-                    var accPropIdx = acceptor.FindProperty(srcProperty);
                     var srcPropIdx = source.FindProperty(srcProperty);
-
-                    if(source.IsPropReadable(srcPropIdx) && acceptor.IsPropWritable(accPropIdx))
+                    var accPropIdx = acceptor.FindProperty(srcProperty); // бросает PropertyAccessException если свойства нет
+
+                    if (source.IsPropReadable(srcPropIdx) && acceptor.IsPropWritable(accPropIdx))
                         acceptor.SetPropValue(accPropIdx, source.GetPropValue(srcPropIdx));

                 }
-                catch(PropertyAccessException)
-                {
-                    // игнорировать свойства Источника, которых нет в Приемнике, если не задано явно
+                catch (PropertyAccessException)
+                {
+                    // игнорировать свойства Источника, которых нет в Приемнике
                 }
             }
         }


Neil - added version to css

Neil - added version to css

--- src/StockportWebapp/Views/stockportgov/Shared/_Layout.cshtml
+++ src/StockportWebapp/Views/stockportgov/Shared/_Layout.cshtml
@@ -30,8 +30,8 @@
     }
     <link href="//customer.cludo.com/css/112/1144/cludo-search-default.min.css" type="text/css" rel="stylesheet">
     <link rel="stylesheet" href="/assets/stylesheets/vendor/unsemantic-grid-responsive-tablet-min.css"/>
-    <link rel="stylesheet" href="~/assets/stylesheets/styleguide-sg.min.css"/>
-    <link rel="stylesheet" href="~/assets/stylesheets/site-sg.min.css"/>
+    <link rel="stylesheet" href="~/assets/stylesheets/styleguide-sg.min.css" asp-append-version="true" />
+    <link rel="stylesheet" href="~/assets/stylesheets/site-sg.min.css" asp-append-version="true" />
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" integrity="sha256-AIodEDkC8V/bHBkfyxzolUMw57jeQ9CauwhVW6YJ9CA= sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1 sha512-4uGZHpbDliNxiAv/QzZNo/yb2FtAX+qiDb7ypBWiEdJQX8Pugp8M6il5SRkN8jQrDLWsh3rrPDSXRf3DwFYM6g==" crossorigin="anonymous">
     <link rel="stylesheet" href="~/assets/stylesheets/vendor/slick.min.css"/>
     <link rel="stylesheet" href="~/assets/stylesheets/vendor/jquery-ui-1.12.1.custom/jquery-ui.min.css"/>