correct some errors in decoding of mesh asset convex decomposition data

--- OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -386,61 +386,57 @@

                 if (map.ContainsKey("physics_convex"))
                 { // pull this out also in case physics engine can use it
+                    OSD convexBlockOsd = null;
                     try
                     {
                         OSDMap convexBlock = (OSDMap)map["physics_convex"];
-
-                        Vector3 min = new Vector3(-0.5f, -0.5f, -0.5f);
-                        if (convexBlock.ContainsKey("Min")) min = convexBlock["Min"].AsVector3();
-                        Vector3 max = new Vector3(0.5f, 0.5f, 0.5f);
-                        if (convexBlock.ContainsKey("Max")) max = convexBlock["Max"].AsVector3();
-
-                        List<Vector3> boundingHull = null;
-
-                        if (convexBlock.ContainsKey("BoundingVerts"))
                         {
-                            // decompress and decode bounding hull points
-                            byte[] boundingVertsBytes = DecompressOsd(convexBlock["BoundingVerts"].AsBinary()).AsBinary();
-                            boundingHull = new List<Vector3>();
-                            for (int i = 0; i < boundingVertsBytes.Length;)
+                            int convexOffset = convexBlock["offset"].AsInteger() + (int)start;
+                            int convexSize = convexBlock["size"].AsInteger();
+
+                            byte[] convexBytes = new byte[convexSize];
+
+                            System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize);
+
+                            try
                             {
-                                ushort uX = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;
-                                ushort uY = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;
-                                ushort uZ = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;
-
-                                Vector3 pos = new Vector3(
-                                    Utils.UInt16ToFloat(uX, min.X, max.X),
-                                    Utils.UInt16ToFloat(uY, min.Y, max.Y),
-                                    Utils.UInt16ToFloat(uZ, min.Z, max.Z)
-                                );
-
-                                boundingHull.Add(pos);
+                                convexBlockOsd = DecompressOsd(convexBytes);
                             }
-
-                            mBoundingHull = boundingHull;
-                            if (debugDetail) m_log.DebugFormat("{0} prim='{1}': parsed bounding hull. nHulls={2}", LogHeader, primName, mBoundingHull.Count);
+                            catch (Exception e)
+                            {
+                                m_log.ErrorFormat("{0} prim='{1}': exception decoding convex block: {2}", LogHeader, primName, e);
+                                //return false;
+                            }
                         }
-
-                        if (convexBlock.ContainsKey("HullList"))
+
+                        if (convexBlockOsd != null && convexBlockOsd is OSDMap)
                         {
-                            byte[] hullList = convexBlock["HullList"].AsBinary();
-
-                            // decompress and decode hull points
-                            byte[] posBytes = DecompressOsd(convexBlock["Positions"].AsBinary()).AsBinary();
-
-                            List<List<Vector3>> hulls = new List<List<Vector3>>();
-                            int posNdx = 0;
-
-                            foreach (byte cnt in hullList)
+                            convexBlock = convexBlockOsd as OSDMap;
+
+                            if (debugDetail)
                             {
-                                int count = cnt == 0 ? 256 : cnt;
-                                List<Vector3> hull = new List<Vector3>();
-
-                                for (int i = 0; i < count; i++)
+                                string keys = "[MESH]: keys found in convexBlock: ";
+                                foreach (KeyValuePair<string, OSD> kvp in convexBlock)
+                                    keys += "'" + kvp.Key + "' ";
+                                m_log.Info(keys);
+                            }
+
+                            Vector3 min = new Vector3(-0.5f, -0.5f, -0.5f);
+                            if (convexBlock.ContainsKey("Min")) min = convexBlock["Min"].AsVector3();
+                            Vector3 max = new Vector3(0.5f, 0.5f, 0.5f);
+                            if (convexBlock.ContainsKey("Max")) max = convexBlock["Max"].AsVector3();
+
+                            List<Vector3> boundingHull = null;
+
+                            if (convexBlock.ContainsKey("BoundingVerts"))
+                            {
+                                byte[] boundingVertsBytes = convexBlock["BoundingVerts"].AsBinary();
+                                boundingHull = new List<Vector3>();
+                                for (int i = 0; i < boundingVertsBytes.Length; )
                                 {
-                                    ushort uX = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
-                                    ushort uY = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
-                                    ushort uZ = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
+                                    ushort uX = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;
+                                    ushort uY = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;
+                                    ushort uZ = Utils.BytesToUInt16(boundingVertsBytes, i); i += 2;

                                     Vector3 pos = new Vector3(
                                         Utils.UInt16ToFloat(uX, min.X, max.X),
@@ -448,18 +444,52 @@
                                         Utils.UInt16ToFloat(uZ, min.Z, max.Z)
                                     );

-                                    hull.Add(pos);
+                                    boundingHull.Add(pos);
                                 }

-                                hulls.Add(hull);
+                                mBoundingHull = boundingHull;
+                                if (debugDetail) m_log.DebugFormat("{0} prim='{1}': parsed bounding hull. nVerts={2}", LogHeader, primName, mBoundingHull.Count);
                             }

-                            mConvexHulls = hulls;
-                            if (debugDetail) m_log.DebugFormat("{0} prim='{1}': parsed hulls. nHulls={2}", LogHeader, primName, mConvexHulls.Count);
-                        }
-                        else
-                        {
-                            if (debugDetail) m_log.DebugFormat("{0} prim='{1}' has physics_convex but no HullList", LogHeader, primName);
+                            if (convexBlock.ContainsKey("HullList"))
+                            {
+                                byte[] hullList = convexBlock["HullList"].AsBinary();
+
+                                byte[] posBytes = convexBlock["Positions"].AsBinary();
+
+                                List<List<Vector3>> hulls = new List<List<Vector3>>();
+                                int posNdx = 0;
+
+                                foreach (byte cnt in hullList)
+                                {
+                                    int count = cnt == 0 ? 256 : cnt;
+                                    List<Vector3> hull = new List<Vector3>();
+
+                                    for (int i = 0; i < count; i++)
+                                    {
+                                        ushort uX = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
+                                        ushort uY = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
+                                        ushort uZ = Utils.BytesToUInt16(posBytes, posNdx); posNdx += 2;
+
+                                        Vector3 pos = new Vector3(
+                                            Utils.UInt16ToFloat(uX, min.X, max.X),
+                                            Utils.UInt16ToFloat(uY, min.Y, max.Y),
+                                            Utils.UInt16ToFloat(uZ, min.Z, max.Z)
+                                        );
+
+                                        hull.Add(pos);
+                                    }
+
+                                    hulls.Add(hull);
+                                }
+
+                                mConvexHulls = hulls;
+                                if (debugDetail) m_log.DebugFormat("{0} prim='{1}': parsed hulls. nHulls={2}", LogHeader, primName, mConvexHulls.Count);
+                            }
+                            else
+                            {
+                                if (debugDetail) m_log.DebugFormat("{0} prim='{1}' has physics_convex but no HullList", LogHeader, primName);
+                            }
                         }
                     }
                     catch (Exception e)
@@ -483,7 +513,7 @@
                 OSD decodedMeshOsd = new OSD();
                 byte[] meshBytes = new byte[physSize];
                 System.Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
-//                        byte[] decompressed = new byte[physSize * 5];
+                //                        byte[] decompressed = new byte[physSize * 5];
                 try
                 {
                     decodedMeshOsd = DecompressOsd(meshBytes);
@@ -499,7 +529,7 @@
                 // physics_shape is an array of OSDMaps, one for each submesh
                 if (decodedMeshOsd is OSDArray)
                 {
-//                            Console.WriteLine("decodedMeshOsd for {0} - {1}", primName, Util.GetFormattedXml(decodedMeshOsd));
+                    //                            Console.WriteLine("decodedMeshOsd for {0} - {1}", primName, Util.GetFormattedXml(decodedMeshOsd));

                     decodedMeshOsdArray = (OSDArray)decodedMeshOsd;
                     foreach (OSD subMeshOsd in decodedMeshOsdArray)


reduce verbosity of sculpt map cache messages to reporting cache failures only

--- OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -199,8 +199,8 @@
                         m_log.Error("[SCULPT]: unable to load cached sculpt map " + decodedSculptFileName + " " + e.Message);

                     }
-                    if (idata != null)
-                        m_log.Debug("[SCULPT]: loaded cached map asset for map ID: " + primShape.SculptTexture.ToString());
+                    //if (idata != null)
+                    //    m_log.Debug("[SCULPT]: loaded cached map asset for map ID: " + primShape.SculptTexture.ToString());
                 }

                 if (idata == null)


Added the return value NO_CONTENT to the StadardReturType class.

--- PART/Source/Core/Schemas/StandardReturType.cs
+++ PART/Source/Core/Schemas/StandardReturType.cs
@@ -56,6 +56,7 @@
     {
         OK = 200,
         PARTIAL_SUCCESS = 206,
+        NO_CONTENT = 204, /* Empty record */
         UNSPECIFIED = 500, /* Server */
         DATASOURCE_UNAVAILABLE = 503, /* Server unavailable*/
         BAD_CLIENT_REQUEST = 400, /* Client */
@@ -113,6 +114,24 @@
             return Create(HttpErrorCode.PARTIAL_SUCCESS, text);
         }

+        public static StandardReturType NoContent(string[] failedInputs)
+        {
+            string text = "These records contain no data: " + string.Join(",", failedInputs);
+            return Create(HttpErrorCode.NO_CONTENT, text);
+        }
+
+        public static StandardReturType NoContent(Dictionary<string, IEnumerable<string>> failures)
+        {
+            var allReasons = failures.Select(ff => string.Format("{0} : {1}", ff.Key, string.Join(",", ff.Value.ToArray()))).ToArray();
+            string text = "These records contain no data: " + string.Join(";", allReasons);
+            return Create(HttpErrorCode.NO_CONTENT, text);
+        }
+
+        public static StandardReturType EmptyRecord(string text)
+        {
+            return Create(HttpErrorCode.NOT_FOUND, text);
+        }
+
         public static StandardReturType UnspecifiedError()
         {
             return Create(HttpErrorCode.UNSPECIFIED);


Added Logout clean up code

Added Logout clean up code

--- Particle.Common/ViewModel/ViewModelLocator.cs
+++ Particle.Common/ViewModel/ViewModelLocator.cs
@@ -53,7 +53,7 @@
 			}
 			cloud = new ParticleCloud();
 			Messenger.Register<LoggedInMessage>(cloud, loggedIn);
-			//Messenger.Register<LoggedOutMessage>(cloud, loggedOut);
+			Messenger.Register<LoggedOutMessage>(cloud, loggedOut);
 		}

 		private static ParticleEventManager yourEvents;
@@ -67,9 +67,11 @@
 			if(cloud.IsAuthenticated)
 			{
 				var accessToken = cloud.AccessToken;
-				yourEvents = new ParticleEventManager(cloud.YourEventUri, accessToken);
+				UriBuilder builder = new UriBuilder(cloud.YourEventUri);
+				builder.Path = $"{builder.Path}/spark";
+				yourEvents = new ParticleEventManager(builder.Uri, accessToken);
 				yourEvents.Events += YourEvents_Events;
-				Task.Run(() => yourEvents.Start());
+				Task.Run(() => yourEvents.Start()); // With out the Task.Run the app freezes up not sure why
 			}
 		}


Documented ItemsPresenter.

Documented ItemsPresenter.

And tidied up a couple of things.

--- Perspex.Controls/Presenters/ItemsPresenter.cs
+++ Perspex.Controls/Presenters/ItemsPresenter.cs
@@ -6,60 +6,90 @@

 namespace Perspex.Controls.Presenters
 {
+    using System.Collections;
+    using System.Collections.Specialized;
     using Perspex.Controls.Generators;
     using Perspex.Input;
     using Perspex.Styling;
-    using System;
-    using System.Collections;
-    using System.Collections.Specialized;
-    using System.Reactive.Linq;
-
+
+    /// <summary>
+    /// Displays items inside an <see cref="ItemsControl"/>.
+    /// </summary>
     public class ItemsPresenter : Control, IItemsPresenter, ITemplatedControl
     {
+        /// <summary>
+        /// Defines the <see cref="Items"/> property.
+        /// </summary>
         public static readonly PerspexProperty<IEnumerable> ItemsProperty =
             ItemsControl.ItemsProperty.AddOwner<ItemsPresenter>();

+        /// <summary>
+        /// Defines the <see cref="ItemsPanel"/> property.
+        /// </summary>
         public static readonly PerspexProperty<ItemsPanelTemplate> ItemsPanelProperty =
             ItemsControl.ItemsPanelProperty.AddOwner<ItemsPresenter>();

         private bool createdPanel;

+        private IItemContainerGenerator generator;
+
+        /// <summary>
+        /// Initializes static members of the <see cref="ItemsPresenter"/> class.
+        /// </summary>
         static ItemsPresenter()
         {
             KeyboardNavigation.TabNavigationProperty.OverrideDefaultValue(
                 typeof(ItemsPresenter),
                 KeyboardNavigationMode.Once);
-        }
-
-        public ItemsPresenter()
-        {
-            this.GetObservableWithHistory(ItemsProperty).Subscribe(this.ItemsChanged);
-        }
-
-        public ItemContainerGenerator ItemContainerGenerator
+            ItemsProperty.Changed.AddClassHandler<ItemsPresenter>(x => x.ItemsChanged);
+        }
+
+        /// <summary>
+        /// Gets the <see cref="IItemContainerGenerator"/> used to generate item container
+        /// controls.
+        /// </summary>
+        public IItemContainerGenerator ItemContainerGenerator
+        {
+            get
+            {
+                if (this.generator == null)
+                {
+                    var i = this.TemplatedParent as ItemsControl;
+                    this.generator = i?.ItemContainerGenerator ?? new ItemContainerGenerator(this);
+                }
+
+                return this.generator;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the items to be displayed.
+        /// </summary>
+        public IEnumerable Items
+        {
+            get { return this.GetValue(ItemsProperty); }
+            set { this.SetValue(ItemsProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets or sets a template which creates the <see cref="Panel"/> used to display the items.
+        /// </summary>
+        public ItemsPanelTemplate ItemsPanel
+        {
+            get { return this.GetValue(ItemsPanelProperty); }
+            set { this.SetValue(ItemsPanelProperty, value); }
+        }
+
+        /// <summary>
+        /// Gets the panel used to display the items.
+        /// </summary>
+        public Panel Panel
         {
             get;
             private set;
         }

-        public IEnumerable Items
-        {
-            get { return this.GetValue(ItemsProperty); }
-            set { this.SetValue(ItemsProperty, value); }
-        }
-
-        public ItemsPanelTemplate ItemsPanel
-        {
-            get { return this.GetValue(ItemsPanelProperty); }
-            set { this.SetValue(ItemsPanelProperty, value); }
-        }
-
-        public Panel Panel
-        {
-            get;
-            private set;
-        }
-
+        /// <inheritdoc/>
         public override sealed void ApplyTemplate()
         {
             if (!this.createdPanel)
@@ -68,18 +98,24 @@
             }
         }

+        /// <inheritdoc/>
         protected override Size MeasureOverride(Size availableSize)
         {
             this.Panel.Measure(availableSize);
             return this.Panel.DesiredSize;
         }

+        /// <inheritdoc/>
         protected override Size ArrangeOverride(Size finalSize)
         {
             this.Panel.Arrange(new Rect(finalSize));
             return finalSize;
         }

+        /// <summary>
+        /// Creates the <see cref="Panel"/> when <see cref="ApplyTemplate"/> is called for the first
+        /// time.
+        /// </summary>
         private void CreatePanel()
         {
             this.ClearVisualChildren();
@@ -89,32 +125,44 @@
             ((IItemsPanel)this.Panel).ChildLogicalParent = this.TemplatedParent as ILogical;
             this.AddVisualChild(this.Panel);
             this.createdPanel = true;
-            this.ItemsChanged(Tuple.Create(default(IEnumerable), this.Items));
-        }
-
-        private IItemContainerGenerator GetGenerator()
-        {
-            if (this.ItemContainerGenerator == null)
-            {
-                ItemsControl i = this.TemplatedParent as ItemsControl;
-                this.ItemContainerGenerator = i?.ItemContainerGenerator ?? new ItemContainerGenerator(this);
-            }
-
-            return this.ItemContainerGenerator;
-        }
-
-        private void ItemsChanged(Tuple<IEnumerable, IEnumerable> value)
+            this.CreateItemsAndListenForChanges(this.Items);
+        }
+
+        /// <summary>
+        /// Creates the items for a collection and starts listening for changes on the collection.
+        /// </summary>
+        /// <param name="items">The items, may be null.</param>
+        private void CreateItemsAndListenForChanges(IEnumerable items)
+        {
+            if (items != null)
+            {
+                this.Panel.Children.AddRange(this.ItemContainerGenerator.Generate(this.Items));
+
+                INotifyCollectionChanged incc = items as INotifyCollectionChanged;
+
+                if (incc != null)
+                {
+                    incc.CollectionChanged += this.ItemsCollectionChanged;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Called when the <see cref="Items"/> property changes.
+        /// </summary>
+        /// <param name="e">The event args.</param>
+        private void ItemsChanged(PerspexPropertyChangedEventArgs e)
         {
             if (this.createdPanel)
             {
-                var generator = this.GetGenerator();
-
-                if (value.Item1 != null)
+                var generator = this.ItemContainerGenerator;
+
+                if (e.OldValue != null)
                 {
                     generator.RemoveAll();
                     this.Panel.Children.Clear();

-                    INotifyCollectionChanged incc = value.Item1 as INotifyCollectionChanged;
+                    INotifyCollectionChanged incc = e.OldValue as INotifyCollectionChanged;

                     if (incc != null)
                     {
@@ -124,26 +172,21 @@

                 if (this.Panel != null)
                 {
-                    if (value.Item2 != null)
-                    {
-                        this.Panel.Children.AddRange(generator.Generate(this.Items));
-
-                        INotifyCollectionChanged incc = value.Item2 as INotifyCollectionChanged;
-
-                        if (incc != null)
-                        {
-                            incc.CollectionChanged += this.ItemsCollectionChanged;
-                        }
-                    }
-                }
-            }
-        }
-
+                    this.CreateItemsAndListenForChanges((IEnumerable)e.NewValue);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Called when the <see cref="Items"/> collection changes.
+        /// </summary>
+        /// <param name="sender">The sender.</param>
+        /// <param name="e">The event args.</param>
         private void ItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
         {
             if (this.createdPanel)
             {
-                var generator = this.GetGenerator();
+                var generator = this.ItemContainerGenerator;

                 // TODO: Handle Move and Replace etc.
                 switch (e.Action)


Added hid for logitech G560-speakers

Added hid for logitech G560-speakers

--- RGB.NET.Devices.Logitech/HID/DeviceChecker.cs
+++ RGB.NET.Devices.Logitech/HID/DeviceChecker.cs
@@ -50,6 +50,7 @@
                   ("G Pro", RGBDeviceType.Mouse, 0xC085, 1, "default", @"Mice\GPro"),
                   ("G633", RGBDeviceType.Headset, 0x0A5C, 2, "default", @"Headsets\G633"),
                   ("G933", RGBDeviceType.Headset, 0x0A5B, 2, "default", @"Headsets\G933"),
+                  ("G560", RGBDeviceType.Speaker, 0x0A78, 2, "default", @"Speakers\G560"),
               };

         #endregion


Enclode filename in quotes for SCP operation as recomended

--- Renci.SshClient/Renci.SshNet/ScpClient.NET.cs
+++ Renci.SshClient/Renci.SshNet/ScpClient.NET.cs
@@ -45,7 +45,8 @@
                 channel.Open();

                 //  Send channel command request
-                channel.SendExecRequest(string.Format("scp -qt {0}", filename));
+                channel.SendExecRequest(string.Format("scp -qt \"{0}\"", filename));
+
                 this.CheckReturnCode(input);

                 this.InternalUpload(channel, input, fileInfo, filename);
@@ -82,7 +83,7 @@
                 channel.Open();

                 //  Send channel command request
-                channel.SendExecRequest(string.Format("scp -qrt {0}", filename));
+                channel.SendExecRequest(string.Format("scp -qrt \"{0}\"", filename));
                 this.CheckReturnCode(input);

                 this.InternalUpload(channel, input, directoryInfo, filename);
@@ -156,7 +157,7 @@
                 channel.Open();

                 //  Send channel command request
-                channel.SendExecRequest(string.Format("scp -qprf {0}", directoryName));
+                channel.SendExecRequest(string.Format("scp -qprf \"{0}\"", directoryName));
                 this.SendConfirmation(channel); //  Send reply

                 this.InternalDownload(channel, input, directoryInfo);


Add "Open in Git Bash" to the context menu

--- RepoZ.Api.Win/IO/WindowsPathActionProvider.cs
+++ RepoZ.Api.Win/IO/WindowsPathActionProvider.cs
@@ -17,18 +17,21 @@
 			yield return createPathAction("Open in Windows Command Prompt (cmd.exe)", "cmd.exe", $"/K \"cd /d {path}\"");
 			yield return createPathAction("Open in Windows PowerShell", "powershell.exe ", $"-noexit -command \"cd '{path}'\"");

-			// TODO
-			string folder = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
-			folder = @"C:\Program Files";
-			string exec = Path.Combine(folder, @"Git\bin\sh.exe");
-			if (File.Exists(exec))
-				yield return createPathAction("Open in Git Bash", "cmd.exe", $"/c (start /b /i *C:\\* *{exec}*) && exit".Replace("*", "\""));
-			else
+			string bashSubpath = @"Git\git-bash.exe";
+			string folder = Environment.ExpandEnvironmentVariables("%ProgramW6432%");
+			string gitbash = Path.Combine(folder, bashSubpath);
+
+			if (!File.Exists(gitbash))
 			{
-				folder = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
-				exec = Path.Combine(folder, @"Git\bin\sh.exe");
-				if (File.Exists(exec))
-					yield return createPathAction("Open in Git Bash", "cmd.exe", $"/c (start /b /i *%cd%* *{exec}*) && exit".Replace("*", "\""));
+				folder = Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%");
+				gitbash = Path.Combine(folder, bashSubpath);
+			}
+
+			if (File.Exists(gitbash))
+			{
+				if (path.EndsWith("\\", StringComparison.OrdinalIgnoreCase))
+					path = path.Substring(0, path.Length - 1);
+				yield return createPathAction("Open in Git Bash", gitbash, $"\"--cd={path}\"");
 			}
 		}


Bumped version to 1.3

Bumped version to 1.3

--- src/resharper-template-compiler/Properties/AssemblyInfo.cs
+++ src/resharper-template-compiler/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]
+[assembly: AssemblyVersion("1.3.0.0")]
+[assembly: AssemblyFileVersion("1.3.0.0")]


Fixed a small metadata issue in bit change set manager app

--- Apps/BitChangeSetManager/Metadata/ChangeSetsViewMetadata.cs
+++ Apps/BitChangeSetManager/Metadata/ChangeSetsViewMetadata.cs
@@ -24,7 +24,7 @@
                             new EnvironmentCultureValue { Name = "AddEditChangeSet" , Title = "Add/Edit change set" },
                             new EnvironmentCultureValue { Name = "ChangeSetDataIsInvalid" , Title = "Your change set's data is invalid" },
                             new EnvironmentCultureValue { Name = "EditChangeSet" , Title = "Edit change set" },
-                            new EnvironmentCultureValue { Name = "ChangeSets" , Title = "ChangeSets" },
+                            new EnvironmentCultureValue { Name = "ChangeSets" , Title = "Change Sets" },
                             new EnvironmentCultureValue { Name = "DeliveriesOf" , Title = "Deliveries of" },
                             new EnvironmentCultureValue { Name = "ChangeSetHasBeenInsertedByUser" , Title = "Change set {{title}} has been inserted by {{userName}}" }
                         }
@@ -49,4 +49,4 @@
             return await base.BuildMetadata();
         }
     }
-}+}


rework subscription list in publisher

rework subscription list in publisher

--- SharpChannels.Core/Communication/Publisher.cs
+++ SharpChannels.Core/Communication/Publisher.cs
@@ -15,15 +15,9 @@
     {
         private readonly INewChannelRequestAcceptor _newChannelRequestAcceptor;
         private readonly bool _stopAcceptorOnClose;
-        private readonly List<SubscriptionRecord> _subscriptions = new List<SubscriptionRecord>();
+        private readonly Dictionary<string, List<IChannel>> _subscriptions = new Dictionary<string, List<IChannel>>();

         private bool _isDisposed;
-
-        private class SubscriptionRecord
-        {
-            public IChannel Channel { get; set; }
-            public string[] Topics { get; set; }
-        }

         private readonly object _locker = new object();
         private readonly SubscribeMessageSerializer _subscribeMessageSerializer;
@@ -49,7 +43,10 @@

         private void RemoveClosedChannels()
         {
-            _subscriptions.RemoveAll(subscription => !subscription.Channel.IsOpened);
+            foreach (var key in _subscriptions.Keys)
+            {
+                _subscriptions[key].RemoveAll(channel => !channel.IsOpened);
+            }
         }

         public int SubscriprionNumber
@@ -58,7 +55,7 @@
             {
                 lock (_locker)
                 {
-                    return _subscriptions.Count(subscription => subscription.Channel.IsOpened);
+                    return _subscriptions.Keys.Sum(key => _subscriptions[key].Count(channel => channel.IsOpened));
                 }
             }
         }
@@ -70,8 +67,7 @@
             lock (_locker)
             {
                 RemoveClosedChannels();
-                return _subscriptions.Where(subscription => subscription.Channel.IsOpened)
-                                     .Select(subscription => subscription.Channel).ToArray();
+                return _subscriptions.Keys.SelectMany(key => _subscriptions[key]).ToArray();
             }
         }

@@ -80,8 +76,10 @@
             lock (_locker)
             {
                 RemoveClosedChannels();
-                return _subscriptions.Where(subscription => subscription.Topics.Contains(topic))
-                                     .Select(subscription => subscription.Channel).ToArray();
+
+                return !_subscriptions.ContainsKey(topic)
+                    ? new IChannel[] {}
+                    : _subscriptions[topic].ToArray();
             }
         }

@@ -171,18 +169,24 @@

         private void ClientAccepted(object sender, ClientAcceptedEventArgs args)
         {
-            lock (_locker)
-            {
-                Task.Run(() =>
+            Task.Run(() =>
+            {
+                var subscription = (SubscribeMessage)args.Channel.Receive(_subscribeMessageSerializer);
+                lock (_locker)
                 {
-                    var subscription = (SubscribeMessage)args.Channel.Receive(_subscribeMessageSerializer);
-                    _subscriptions.Add(new SubscriptionRecord
+                    foreach (var topic in subscription.Topics)
                     {
-                        Channel =  args.Channel,
-                        Topics = subscription.Topics
-                    });
-                });
-            }
+                        EnsureListExists(topic);
+                        _subscriptions[topic].Add(args.Channel);
+                    }
+                }
+            });
+        }
+
+        private void EnsureListExists(string topic)
+        {
+            if(!_subscriptions.ContainsKey(topic))
+                _subscriptions.Add(topic, new List<IChannel>());
         }

         public Publisher(INewChannelRequestAcceptor newChannelRequestAcceptor, bool stopAcceptorOnClose)


Version -> 1.0.0-beta3

Version -> 1.0.0-beta3

--- SharpRouting/Properties/SharedAssemblyInfo.cs
+++ SharpRouting/Properties/SharedAssemblyInfo.cs
@@ -10,7 +10,7 @@

 // Version
 [assembly: AssemblyVersion              ("1.0.*")]        // Assembly
-[assembly: AssemblyInformationalVersion ("1.0.0-beta2")]  // NuGet Package
+[assembly: AssemblyInformationalVersion ("1.0.0-beta3")]  // NuGet Package

 // Compliance
 [assembly: CLSCompliant(true)]


Add StdResponse.ShortHtml

Add StdResponse.ShortHtml

--- Sharper.C.HttpValues/Data/Http/StdResponse.cs
+++ Sharper.C.HttpValues/Data/Http/StdResponse.cs
@@ -32,5 +32,12 @@
               , contentType: "text/plain"
               , body: new[] { UTF8.GetBytes(s).ToImmutableArray() }
               );
+
+        public static HttpResponse ShortHtml(string html)
+        =>  HttpResponse.MkReplace
+              ( statusCode: 200
+              , contentType: "text/html"
+              , body: new[] { UTF8.GetBytes(html).ToImmutableArray() }
+              );
     }
 }


Cant send money to yourself anymore

Cant send money to yourself anymore

--- SoraBot-v2/SoraBot-v2/Services/CoinService.cs
+++ SoraBot-v2/SoraBot-v2/Services/CoinService.cs
@@ -15,6 +15,13 @@

         public async Task SendMoney(SocketCommandContext context, int amount, ulong userId)
         {
+            if (context.User.Id == userId)
+            {
+                await context.Channel.SendMessageAsync("",
+                    embed: Utility.ResultFeedback(Utility.RedFailiureEmbed, Utility.SuccessLevelEmoji[2],
+                        "You can't send money to yourself... Because... Why would you?").Build());
+                return;
+            }
             if (amount < 1)
             {
                 await context.Channel.SendMessageAsync("",


Removed the AceObject property from WorldObject.

--- Source/ACE.Server/WorldObjects/WorldObject.cs
+++ Source/ACE.Server/WorldObjects/WorldObject.cs
@@ -199,8 +199,8 @@
         public static float MaxObjectTrackingRange { get; } = 20000f;

-        [Obsolete]
-        protected AceObject AceObject { get; set; }
+        //[Obsolete]
+        //protected AceObject AceObject { get; set; }
         [Obsolete]
         protected internal Dictionary<ObjectGuid, WorldObject> WieldedObjects { get; set; } = new Dictionary<ObjectGuid, WorldObject>();

@@ -745,15 +745,17 @@

         public AceObject SnapShotOfAceObject(bool clearDirtyFlags = false)
         {
-            AceObject snapshot = (AceObject)AceObject.Clone();
+            throw new NotSupportedException();
+            /*AceObject snapshot = (AceObject)AceObject.Clone();
             if (clearDirtyFlags)
                 AceObject.ClearDirtyFlags();
-            return snapshot;
+            return snapshot;*/
         }

         public void InitializeAceObjectForSave()
         {
-            AceObject.SetDirtyFlags();
+            throw new NotSupportedException();
+            //AceObject.SetDirtyFlags();
         }


added code from issue #718 (Symbology.IndexSelection.RemoveRegion is working slow) closes #718

--- Source/DotSpatial.Symbology/IndexSelection.cs
+++ Source/DotSpatial.Symbology/IndexSelection.cs
@@ -44,7 +44,7 @@
         {
             foreach (int index in indices)
             {
-                _layer.DrawnStates[index].Selected = _selectionState;
+                _layer.DrawnStates[index].Selected = SelectionState;
             }
             OnChanged();
         }
@@ -61,51 +61,50 @@
             SuspendChanges();
             Extent affected = new Extent();
             IPolygon reg = region.ToPolygon();
-            //ProgressMeter pm = new ProgressMeter(ProgressHandler, "Selecting shapes", _layer.DrawnStates.Length);
+
             for (int shp = 0; shp < _layer.DrawnStates.Length; shp++)
             {
-                //pm.Next();
-                if (_regionCategory != null && _layer.DrawnStates[shp].Category != _regionCategory) continue;
+                if (RegionCategory != null && _layer.DrawnStates[shp].Category != RegionCategory) continue;
                 bool doAdd = false;
                 ShapeRange shape = _shapes[shp];

-                if (_selectionMode == SelectionMode.Intersects)
+                if (SelectionMode == SelectionMode.Intersects)
                 {
                     // Prevent geometry creation (which is slow) and use ShapeRange instead
                     ShapeRange env = new ShapeRange(region);
                     if (env.Intersects(shape))
                     {
-                        _layer.DrawnStates[shp].Selected = _selectionState;
+                        _layer.DrawnStates[shp].Selected = SelectionState;
                         affected.ExpandToInclude(shape.Extent);
                         added = true;
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.IntersectsExtent)
+                else if (SelectionMode == SelectionMode.IntersectsExtent)
                 {
                     if (shape.Extent.Intersects(region))
                     {
-                        _layer.DrawnStates[shp].Selected = _selectionState;
+                        _layer.DrawnStates[shp].Selected = SelectionState;
                         affected.ExpandToInclude(shape.Extent);
                         added = true;
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.ContainsExtent)
+                else if (SelectionMode == SelectionMode.ContainsExtent)
                 {
                     if (shape.Extent.Within(region))
                     {
-                        _layer.DrawnStates[shp].Selected = _selectionState;
+                        _layer.DrawnStates[shp].Selected = SelectionState;
                         affected.ExpandToInclude(shape.Extent);
                         added = true;
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.Disjoint)
+                else if (SelectionMode == SelectionMode.Disjoint)
                 {
                     if (shape.Extent.Intersects(region))
                     {
-                        IGeometry g = _layer.DataSet.Features[shp].Geometry;
+                        IGeometry g = _layer.DataSet.GetFeature(shp).Geometry;
                         if (reg.Disjoint(g)) doAdd = true;
                     }
                     else
@@ -117,7 +116,7 @@
                 {
                     if (!shape.Extent.Intersects(region)) continue;
                     IGeometry geom = _layer.DataSet.GetFeature(shp).Geometry;
-                    switch (_selectionMode)
+                    switch (SelectionMode)
                     {
                         case SelectionMode.Contains:
                             if (shape.Extent.Within(region))
@@ -158,11 +157,11 @@
                 }
                 if (!doAdd) continue;
                 OnChanged();
-                _layer.DrawnStates[shp].Selected = _selectionState;
+                _layer.DrawnStates[shp].Selected = SelectionState;
                 affected.ExpandToInclude(shape.Extent);
                 added = true;
             }
-            //pm.Reset();
+
             ResumeChanges();
             affectedArea = affected.ToEnvelope();
             return added;
@@ -182,10 +181,10 @@
             IPolygon reg = region.ToPolygon();
             for (int shp = 0; shp < _layer.DrawnStates.Length; shp++)
             {
-                if (_regionCategory != null && _layer.DrawnStates[shp].Category != _regionCategory) continue;
+                if (RegionCategory != null && _layer.DrawnStates[shp].Category != RegionCategory) continue;
                 bool doFlip = false;
                 ShapeRange shape = _shapes[shp];
-                if (_selectionMode == SelectionMode.Intersects)
+                if (SelectionMode == SelectionMode.Intersects)
                 {
                     // Prevent geometry creation (which is slow) and use ShapeRange instead
                     ShapeRange env = new ShapeRange(region);
@@ -197,7 +196,7 @@
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.IntersectsExtent)
+                else if (SelectionMode == SelectionMode.IntersectsExtent)
                 {
                     if (shape.Extent.Intersects(region))
                     {
@@ -207,7 +206,7 @@
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.ContainsExtent)
+                else if (SelectionMode == SelectionMode.ContainsExtent)
                 {
                     if (shape.Extent.Within(region))
                     {
@@ -217,11 +216,11 @@
                         OnChanged();
                     }
                 }
-                else if (_selectionMode == SelectionMode.Disjoint)
+                else if (SelectionMode == SelectionMode.Disjoint)
                 {
                     if (shape.Extent.Intersects(region))
                     {
-                        IGeometry g = _layer.DataSet.Features[shp].Geometry;
+                        IGeometry g = _layer.DataSet.GetFeature(shp).Geometry;
                         if (reg.Disjoint(g)) doFlip = true;
                     }
                     else
@@ -232,12 +231,11 @@
                 else
                 {
                     if (!shape.Extent.Intersects(region)) continue;
-                    IFeature f = _layer.DataSet.Features[shp]; // only get this if envelopes intersect
-                    IGeometry geom = f.Geometry;
+                    IGeometry geom = _layer.DataSet.GetFeature(shp).Geometry;  // only get this if envelopes intersect
                     switch (SelectionMode)
                     {
                         case SelectionMode.Contains:
-                            if (region.Intersects(f.Geometry.EnvelopeInternal))
+                            if (region.Intersects(geom.EnvelopeInternal))
                             {
                                 if (reg.Contains(geom)) doFlip = true;
                             }
@@ -249,7 +247,7 @@
                             if (reg.Covers(geom)) doFlip = true;
                             break;
                         case SelectionMode.Intersects:
-                            if (region.Intersects(f.Geometry.EnvelopeInternal))
+                            if (region.Intersects(geom.EnvelopeInternal))
                             {
                                 if (reg.Intersects(geom)) doFlip = true;
                             }
@@ -267,6 +265,7 @@
                 }
                 if (!doFlip) continue;
                 flipped = true;
+                OnChanged();
                 _layer.DrawnStates[shp].Selected = !_layer.DrawnStates[shp].Selected;
                 affected.ExpandToInclude(shape.Extent);
             }
@@ -296,8 +295,8 @@
                 }
                 else
                 {
-                    if (drawnStates[index].Selected != !_selectionState) changed = true;
-                    drawnStates[index].Selected = !_selectionState;
+                    if (drawnStates[index].Selected != !SelectionState) changed = true;
+                    drawnStates[index].Selected = !SelectionState;
                 }
             }
             return !problem && changed;
@@ -316,31 +315,42 @@

             Extent affected = new Extent();
             IPolygon reg = region.ToPolygon();
-            FastDrawnState[] drawnStates = _layer.DrawnStates;
-            for (int shp = 0; shp < drawnStates.Length; shp++)
-            {
-                if (_regionCategory != null && drawnStates[shp].Category != _regionCategory) continue;
+
+            for (int shp = 0; shp < _layer.DrawnStates.Length; shp++)
+            {
+                if (RegionCategory != null && _layer.DrawnStates[shp].Category != RegionCategory) continue;
                 bool doRemove = false;
                 ShapeRange shape = _shapes[shp];
-                if (_selectionMode == SelectionMode.IntersectsExtent)
-                {
-                    if (shape.Extent.Intersects(region))
-                    {
-                        drawnStates[shp].Selected = !_selectionState;
+                if (SelectionMode == SelectionMode.Intersects)
+                {
+                    // Prevent geometry creation (which is slow) and use ShapeRange instead
+                    ShapeRange env = new ShapeRange(region);
+                    if (env.Intersects(shape))
+                    {
+                        _layer.DrawnStates[shp].Selected = !SelectionState;
                         affected.ExpandToInclude(shape.Extent);
                         removed = true;
                     }
                 }
-                else if (_selectionMode == SelectionMode.ContainsExtent)
-                {
-                    if (shape.Extent.Within(region))
-                    {
-                        drawnStates[shp].Selected = !_selectionState;
+                else if (SelectionMode == SelectionMode.IntersectsExtent)
+                {
+                    if (shape.Extent.Intersects(region))
+                    {
+                        _layer.DrawnStates[shp].Selected = !SelectionState;
                         affected.ExpandToInclude(shape.Extent);
                         removed = true;
                     }
                 }
-                if (_selectionMode == SelectionMode.Disjoint)
+                else if (SelectionMode == SelectionMode.ContainsExtent)
+                {
+                    if (shape.Extent.Within(region))
+                    {
+                        _layer.DrawnStates[shp].Selected = !SelectionState;
+                        affected.ExpandToInclude(shape.Extent);
+                        removed = true;
+                    }
+                }
+                else if (SelectionMode == SelectionMode.Disjoint)
                 {
                     if (shape.Extent.Intersects(region))
                     {
@@ -356,7 +366,7 @@
                 {
                     if (!shape.Extent.Intersects(region)) continue;
                     IGeometry geom = _layer.DataSet.Features[shp].Geometry;
-                    switch (_selectionMode)
+                    switch (SelectionMode)
                     {
                         case SelectionMode.Contains:
                             if (shape.Extent.Within(region))
@@ -396,7 +406,8 @@
                     }
                 }
                 if (!doRemove) continue;
-                drawnStates[shp].Selected = !_selectionState;
+                OnChanged();
+                _layer.DrawnStates[shp].Selected = !SelectionState;
                 affected.ExpandToInclude(shape.Extent);
                 removed = true;
             }
@@ -426,7 +437,7 @@
             FastDrawnState[] drawnStates = _layer.DrawnStates;
             for (int shp = 0; shp < drawnStates.Length; shp++)
             {
-                if (drawnStates[shp].Selected == _selectionState)
+                if (drawnStates[shp].Selected == SelectionState)
                 {
                     result.Add(_layer.DataSet.GetFeature(shp));
                 }
@@ -441,12 +452,12 @@
         {
             get
             {
-                if (_layer.DrawnStatesNeeded == false) return new Envelope();
+                if (!_layer.DrawnStatesNeeded) return new Envelope();
                 Extent ext = new Extent();
                 FastDrawnState[] drawnStates = _layer.DrawnStates;
                 for (int shp = 0; shp < drawnStates.Length; shp++)
                 {
-                    if (drawnStates[shp].Selected == _selectionState)
+                    if (drawnStates[shp].Selected == SelectionState)
                     {
                         ext.ExpandToInclude(_shapes[shp].Extent);
                     }
@@ -458,27 +469,13 @@
         /// <summary>
         /// Selection Mode controls how envelopes are treated when working with geometries.
         /// </summary>
-        public SelectionMode SelectionMode
-        {
-            get
-            {
-                return _selectionMode;
-            }
-            set
-            {
-                _selectionMode = value;
-            }
-        }
+        public SelectionMode SelectionMode { get; set; }

         /// <summary>
         /// Gets or sets whether this should work as "Selected" indices (true) or
         /// "UnSelected" indices (false).
         /// </summary>
-        public bool SelectionState
-        {
-            get { return _selectionState; }
-            set { _selectionState = value; }
-        }
+        public bool SelectionState { get; set; }

         /// <inheritdoc />
         public DataTable GetAttributes(int startIndex, int numRows)
@@ -571,8 +568,8 @@
         public void Add(int index)
         {
             if (index < 0 || index >= _layer.DrawnStates.Length) return;
-            if (_layer.DrawnStates[index].Selected == _selectionState) return;
-            _layer.DrawnStates[index].Selected = _selectionState;
+            if (_layer.DrawnStates[index].Selected == SelectionState) return;
+            _layer.DrawnStates[index].Selected = SelectionState;
             OnChanged();
         }

@@ -581,7 +578,7 @@
         {
             for (int shp = 0; shp < _layer.DrawnStates.Length; shp++)
             {
-                _layer.DrawnStates[shp].Selected = !_selectionState;
+                _layer.DrawnStates[shp].Selected = !SelectionState;
             }
             OnChanged();
         }
@@ -589,7 +586,7 @@
         /// <inheritdoc />
         public bool Contains(int index)
         {
-            return (_layer.DrawnStates[index].Selected == _selectionState);
+            return _layer.DrawnStates[index].Selected == SelectionState;
         }

         /// <inheritdoc />
@@ -612,7 +609,7 @@
                 if (_layer.DrawnStates == null) return 0;
                 for (int i = 0; i < _layer.DrawnStates.Length; i++)
                 {
-                    if (_layer.DrawnStates[i].Selected == _selectionState) count++;
+                    if (_layer.DrawnStates[i].Selected == SelectionState) count++;
                 }
                 return count;
             }
@@ -628,8 +625,8 @@
         public bool Remove(int index)
         {
             if (index < 0 || index >= _layer.DrawnStates.Length) return false;
-            if (_layer.DrawnStates[index].Selected != _selectionState) return false;
-            _layer.DrawnStates[index].Selected = !_selectionState;
+            if (_layer.DrawnStates[index].Selected != SelectionState) return false;
+            _layer.DrawnStates[index].Selected = !SelectionState;
             OnChanged();
             return true;
         }
@@ -638,16 +635,12 @@
         /// Setting this to a specific category will only allow selection by
         /// region to affect the features that are within the specified category.
         /// </summary>
-        public IFeatureCategory RegionCategory
-        {
-            get { return _regionCategory; }
-            set { _regionCategory = value; }
-        }
+        public IFeatureCategory RegionCategory { get; set; }

         /// <inheritdoc />
         public IEnumerator<int> GetEnumerator()
         {
-            return new IndexSelectionEnumerator(_layer.DrawnStates, _selectionState);
+            return new IndexSelectionEnumerator(_layer.DrawnStates, SelectionState);
         }

         IEnumerator IEnumerable.GetEnumerator()
@@ -814,9 +807,6 @@

         private readonly IFeatureLayer _layer;
         private readonly List<ShapeRange> _shapes;
-        private IFeatureCategory _regionCategory;
-        private SelectionMode _selectionMode;
-        private bool _selectionState;

         #endregion

@@ -830,7 +820,7 @@
             _layer = layer;
             _shapes = layer.DataSet.ShapeIndices;
             SelectionMode = SelectionMode.IntersectsExtent;
-            _selectionState = true;
+            SelectionState = true;
         }

         #endregion


fix output with nondeterministic fault activation

--- Source/SafetySharp/Analysis/SafetyAnalysis.cs
+++ Source/SafetySharp/Analysis/SafetyAnalysis.cs
@@ -229,15 +229,17 @@
 				// do not add to criticalSets: non-minimal, and all supersets are supersets of criticalSet as well
 				return false;

+			// if configured to do so, check with forced fault activation
 			if (FaultActivationBehaviour == FaultActivationBehaviour.ForceOnly
 				|| FaultActivationBehaviour == FaultActivationBehaviour.ForceThenFallback)
 				isSafe = CheckSet(set, nondeterministicFaults, allFaults, cardinality, serializer, invariantChecker, Activation.Forced);

-			if (FaultActivationBehaviour != FaultActivationBehaviour.ForceOnly && isSafe)
-			{
+			if (isSafe && FaultActivationBehaviour == FaultActivationBehaviour.ForceThenFallback)
 				ConsoleHelpers.WriteLine("    Checking again with nondeterministic activation...");
+
+			// check with nondeterministic fault activation
+			if (isSafe && FaultActivationBehaviour != FaultActivationBehaviour.ForceOnly)
 				isSafe = CheckSet(set, nondeterministicFaults, allFaults, cardinality, serializer, invariantChecker, Activation.Nondeterministic);
-			}

 			if (isSafe)
 				safeSets.Add(set);


refactor UrlGeneratorTests to remove dependency on WebApiHelper

--- tests/Core.Tests/UrlGeneratorTests.cs
+++ tests/Core.Tests/UrlGeneratorTests.cs
@@ -7,35 +7,39 @@
 {
     public class UrlGeneratorTests
     {
-        public UrlGeneratorTests()
-        {
-            Generator = InitializeGenerator();
-        }
-
-        private readonly UrlGenerator Generator;
-
-        private static UrlGenerator InitializeGenerator(SupurlativeOptions options = null)
-        {
-            var request = WebApiHelper.GetRequest();
-            return new UrlGenerator(request);
-        }
+        const string _baseUrl = "http://localhost:8000/";

         [Fact]
         public void Can_generate_a_fully_qualified_path()
         {
-            var expected = "http://localhost:8000/foo/1";
-            var actual = Generator.Generate("foo.show", new { Id = 1 });
+            string expected = _baseUrl + "foo/1";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate)
+                .Generate(routeName, new { Id = 1 });
+            Assert.Equal(expected, actual);
+        }

+        [Fact]
+        public void Can_generate_a_relative_path()
+        {
+            string expected = "/foo/1";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate,
+                supurlativeOptions: new SupurlativeOptions { UriKind = UriKind.Relative })
+                .Generate(routeName, new { Id = 1 });
             Assert.Equal(expected, actual);
         }

         [Fact]
         public void Can_generate_a_path_with_anonymous_complex_route_properties()
         {
-            var expected = "http://localhost:8000/foo/1?bar.abc=abc&bar.def=def";
-
-            var actual = Generator.Generate("foo.show", new { Id = 1, Bar = new { Abc = "abc", Def = "def" } });
-
+            string expected = _baseUrl + "foo/1?bar.abc=abc&bar.def=def";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate)
+                .Generate(routeName, new { Id = 1, Bar = new { Abc = "abc", Def = "def" } });
             Assert.Equal(expected, actual);
         }

@@ -43,27 +47,69 @@
         public void Cannot_generate_a_path_with_invalid_constraints()
         {
             string expected = null;
-            var actual = Generator.Generate("constraint", new { Id = "abc" });
-
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id:int}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate,
+                routeConstraints: new { id = @"\d+" })
+                .Generate(routeName, new { Id = "abc" });
             Assert.Equal(expected, actual);
         }

         [Fact]
         public void Can_generate_two_optional_path_items_template()
         {
-            var expected = "http://localhost:8000/bar/1";
-            var actual = Generator.Generate("bar.one.two", new { one = 1 });
+            string expected = _baseUrl + "foo/1";
+            const string routeName = "foo.one.two";
+            const string routeTemplate = "foo/{one}/{two}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate,
+                routeDefaults: new { one = RouteParameter.Optional, two = RouteParameter.Optional })
+                .Generate(routeName, new { one = 1 });
+            Assert.Equal(expected, actual);
+        }

+        [Fact]
+        public void Can_generate_two_optional_path_items_template_two()
+        {
+            string expected = _baseUrl + "foo/1/2";
+            const string routeName = "foo.one.two";
+            const string routeTemplate = "foo/{one}/{two}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate,
+                routeDefaults: new { one = RouteParameter.Optional, two = RouteParameter.Optional })
+                .Generate(routeName, new { one = 1, two = 2 });
             Assert.Equal(expected, actual);
         }

         [Fact]
         public void Make_sure_null_nested_class_property_values_do_not_show_in_url()
         {
-            var request = new TestNestedClass { Id = 1 };
-            var result = Generator.Generate("foo.show", request);
+            string expected = _baseUrl + "foo/1";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate)
+                .Generate(routeName, new TestNestedClass { Id = 1 });
+            Assert.Equal(expected, actual);
+        }

-            Assert.Equal("http://localhost:8000/foo/1", result);
+        [Fact]
+        public void Make_sure_nested_class_property_values_do_show_in_url()
+        {
+            string expected = _baseUrl + "foo/1?filter.level=33";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate)
+                .Generate(routeName, new TestNestedClass { Id = 1, Filter = new TestNestedClass.NestedClass { Level = 33 } });
+            Assert.Equal(expected, actual);
+        }
+
+        [Fact]
+        public void Make_sure_generic_nested_class_property_values_do_show_in_url()
+        {
+            string expected = _baseUrl + "foo/1?filter.level=42";
+            const string routeName = "foo.show";
+            const string routeTemplate = "foo/{id}";
+            string actual = TestHelper.CreateAUrlGenerator(_baseUrl, routeName, routeTemplate)
+                .Generate(routeName, new { Id = 1, Filter = new { Level = 42 } });
+            Assert.Equal(expected, actual);
         }

         public class TestNestedClass


Fixed missing } from merge

Fixed missing } from merge

--- Chraft/Entity/LivingEntity.cs
+++ Chraft/Entity/LivingEntity.cs
@@ -565,12 +565,15 @@

         protected void SendMetadataUpdate(bool notifyYourself = true)
         {
-            foreach (Client c in World.Server.GetNearbyPlayers(World, new AbsWorldCoords(Position.X, Position.Y, Position.Z)))
+            foreach (
+                Client c in World.Server.GetNearbyPlayers(World, new AbsWorldCoords(Position.X, Position.Y, Position.Z))
+                )
             {
                 if (ToSkip(c) && !notifyYourself)
                     continue;
                 c.SendEntityMetadata(this);
             }
+        }

         internal void MountEntity(EntityBase entity)
         {


Removed redundand div from contact page

Removed redundand div from contact page

--- SpaceBlog/SpaceBlog/Views/Home/Contact.cshtml
+++ SpaceBlog/SpaceBlog/Views/Home/Contact.cshtml
@@ -50,10 +50,7 @@

-

-
-

-

+

                                 <input type="submit" value="Send" class=" btn btn-success" />


CSharpParser keyword-identifiers support ("var", "assembly" etc.)

--- Src/Sandbox/CSharpParser/Grammar/CsScanner.cs
+++ Src/Sandbox/CSharpParser/Grammar/CsScanner.cs
@@ -26,7 +26,22 @@
                 ('_' | Lu | Ll | Lt | Lm | Lo | Nl)
                 (Pc | Lu | Ll | Lt | Lm | Lo | Nl | Nd | Mn | Mc | Cf)*
                ")]
-        public CsIdentifier Identifier(string text) { return null; }
+        public string Identifier(string text) { return text; }
+
+        [Parse]
+        public CsIdentifier NameIdentifier(string name) { return null; }
+
+        [Parse("var")]
+        [Parse("assembly")]
+        [Parse("module")]
+        [Parse("field")]
+        [Parse("event")]
+        [Parse("method")]
+        [Parse("param")]
+        [Parse("property")]
+        [Parse("return")]
+        [Parse("type")]
+        public CsIdentifier KeywordIdentifier() { return null; }

         [Literal("true")]
         public CsBoolean BooleanTrue(string text) { return null; }


Fixed assembly info

Fixed assembly info

--- SteamBulkActivator/Properties/AssemblyInfo.cs
+++ SteamBulkActivator/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.3")]
-[assembly: AssemblyFileVersion("1.0.3")]
+[assembly: AssemblyVersion("1.0.4")]
+[assembly: AssemblyFileVersion("1.0.4")]


fixed null parameter exception

fixed null parameter exception

--- TCC.Core/Converters/FactorToAngleConverter.cs
+++ TCC.Core/Converters/FactorToAngleConverter.cs
@@ -10,7 +10,7 @@
         {
             var val = System.Convert.ToDouble(value);
             double mult = 1;
-            if (parameter != null) mult = System.Convert.ToDouble(parameter);
+            if (parameter != null && parameter != "") mult = System.Convert.ToDouble(parameter, CultureInfo.InvariantCulture);

             return val * (359.99/mult);
         }


Add temp dummy impl of IContext.WithDeleted and WithFunction

--- Test/AdventureWorksFunctionalModel/Helpers.cs
+++ Test/AdventureWorksFunctionalModel/Helpers.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
 using NakedFunctions;

 namespace AW
@@ -16,5 +17,13 @@
             return instances.Skip(context.RandomSeed().ValueInRange(instances.Count())).FirstOrDefault();
         }

+        //TODO: Temporary DUMMY extension method, pending native new method on IContext.
+        public static IContext WithFunction(this IContext context, Func<IContext, IContext> func) =>
+            context.WithInformUser($"Registered function {func.ToString()} NOT called.");
+
+        //TODO: Temporary DUMMY extension method, pending native new method on IContext.
+        public static IContext WithDeleted(this IContext context, object toDelete) =>
+            context.WithInformUser($"object {toDelete} scheduled for deletion.");
+
     }
 }


Add CreateNewObject method that can accept a list of tuples.  Will implement later to use to construct products that don't use a zero arguement constructor.

--- TestObjectBuilder/TestObjectBuilderBuilder.cs
+++ TestObjectBuilder/TestObjectBuilderBuilder.cs
@@ -18,6 +18,16 @@
     {

         public static ITestObjBuilder<T> CreateNewObject()
+        {
+            return CreateNewObject(null);
+        }
+
+        /**
+         * TODO:
+         * - Create additional properties on the builder for ctorArgs.
+         * - Have build method use these args to build the product.
+         */
+        public static ITestObjBuilder<T> CreateNewObject(List<Tuple<object, string>> ctorArgs)
         {
             Type finalProductType = typeof(T);
             var myType = CompileResultType();


Meerdere lagen

Meerdere lagen

--- The_Binding_Of_ROB/The_Binding_Of_ROB/Game.cs
+++ The_Binding_Of_ROB/The_Binding_Of_ROB/Game.cs
@@ -17,12 +17,17 @@
             window.Closed += Window_Closed;

             //hier gaan we alles in laden en instellen
+            Map map = new Map();
+

             while(window.IsOpen)
                 {
                 window.DispatchEvents();

                 //hier gaan we elk frame logica en tekencode aanroepen
+                map.Draw(window, 1);
+                map.Draw(window, 2);
+                map.Draw(window, 3);

                 window.Display();
                 }


Fix tests

Fix tests

--- src/EditorFeatures/CSharpTest/Completion/CompletionProviders/DeclarationNameCompletionProviderTests.cs
+++ src/EditorFeatures/CSharpTest/Completion/CompletionProviders/DeclarationNameCompletionProviderTests.cs
@@ -303,11 +303,11 @@

             if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8)
             {
-                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
             }
             else
             {
-                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
             }
         }

@@ -335,11 +335,11 @@

             if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8)
             {
-                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
             }
             else
             {
-                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
             }
         }

@@ -367,11 +367,11 @@

             if (languageVersion.MapSpecifiedToEffectiveVersion() >= LanguageVersion.CSharp8)
             {
-                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
             }
             else
             {
-                await VerifyItemExistsAsync(markup, "context", glyph: (int)Glyph.Parameter);
+                await VerifyItemExistsAsync(markup, "context1", glyph: (int)Glyph.Parameter);
             }
         }


feat(content): remove codeplex badge

feat(content): remove codeplex badge

Removed codeplex badge from top-right & reordered badges.

--- Themes/AndrewConnell-v1.0/Views/Layout.cshtml
+++ Themes/AndrewConnell-v1.0/Views/Layout.cshtml
@@ -12,7 +12,7 @@
   Style.Include("all.min.css").SetAttribute("media", "screen");
   Style.Include("print.min.css").SetAttribute("media", "print");

-  /* Google code prettify (https://github.com/google/code-prettify) */
+/* Google code prettify (https://github.com/google/code-prettify) */
   Style.Include("prettify.min.css").AtHead();
   Script.Include("https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js").AtFoot();

@@ -65,20 +65,18 @@

+

+

-

-

-
-

-
-
+
+


add warmup to test fixure

add warmup to test fixure


Formatting.

Formatting.

--- Dasher.Tests/ContractTests.cs
+++ Dasher.Tests/ContractTests.cs
@@ -256,7 +256,7 @@
             }
         }

-            #endregion
+        #endregion

         #region Enums


web socket test working

web socket test working


Point copy constructor now handles null references

--- GeometryClassLibrary/Coordinates/Point.cs
+++ GeometryClassLibrary/Coordinates/Point.cs
@@ -92,9 +92,12 @@
         /// </summary>
         public Point(Point toCopy)
         {
-            X = toCopy.X;
-            Y = toCopy.Y;
-            Z = toCopy.Z;
+            if (toCopy != null)
+            {
+                X = toCopy.X;
+                Y = toCopy.Y;
+                Z = toCopy.Z;
+            }
         }

         #endregion


workaround potencial memory leak

workaround potencial memory leak

--- ThirdParty/SmartThreadPool/SmartThreadPool.cs
+++ ThirdParty/SmartThreadPool/SmartThreadPool.cs
@@ -1684,6 +1684,7 @@
             }
 	        workItemsGroup.Start();
             anActionCompleted.WaitOne();
+            anActionCompleted.Dispose();

             return choiceIndex._index;
         }


Don't try to use the performance panel if it is not ready.

--- Gui/PerformanceTimer/PerformancePannel.cs
+++ Gui/PerformanceTimer/PerformancePannel.cs
@@ -110,9 +110,12 @@
                 pannels.Visible = false; // start out not visible
                 UiThread.RunOnIdle(() =>
                 {
-                    GuiWidget parentWindow = PerformanceTimer.GetParentWindowFunction();
-                    parentWindow.AddChild(pannels);
-                    parentWindow.KeyDown += ParentWindow_KeyDown;
+					if (PerformanceTimer.GetParentWindowFunction != null)
+					{
+						GuiWidget parentWindow = PerformanceTimer.GetParentWindowFunction();
+						parentWindow.AddChild(pannels);
+						parentWindow.KeyDown += ParentWindow_KeyDown;
+					}
                 });
             }


Keep text field focused in the chat simulator when pressing enter

--- TwitchPlaysAssembly/Src/TwitchPlaysService.cs
+++ TwitchPlaysAssembly/Src/TwitchPlaysService.cs
@@ -170,7 +170,10 @@
 		messageInput.onEndEdit.AddListener(_ =>
 		{
 			if (Input.GetKey(KeyCode.Return))
+			{
 				sendButton.onClick.Invoke();
+				messageInput.ActivateInputField();
+			}
 		});

 		sendButton.onClick.AddListener(() =>


added UID.IsNotNull() method

added UID.IsNotNull() method

--- Unity/Assets/GameFramework/Modules/ECS/UID.cs
+++ Unity/Assets/GameFramework/Modules/ECS/UID.cs
@@ -40,6 +40,10 @@

         public bool IsNull() {
             return ID == 0;
+        }
+
+        public bool IsNotNull() {
+            return ID != 0;
         }

         public void SetNull() {


После сборки обновления плагинов увеличена версия файлов

--- VKT5_RemoteConsole/Properties/AssemblyInfo.cs
+++ VKT5_RemoteConsole/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
 // Т.к. мы можем забыть это сделать, то лучше чтобы версия увеличивалась сама. Звездочку можно задать только для версии сборки,
 // для версии файла она не работает. Но если не указать версию файла, то она будет равна версии сборки.

-[assembly: AssemblyVersion("3.22.28")]
+[assembly: AssemblyVersion("3.23.29")]
 //[assembly: AssemblyFileVersion("1.0.0.0")]


Properly redirecting the user if he's already logged in

--- webchat/Controllers/IndexController.cs
+++ webchat/Controllers/IndexController.cs
@@ -16,8 +16,11 @@
         //
         // GET: /Index/

-        public ActionResult Index()
-        {
+        public ActionResult Index(){
+            if(Session["nick"] != null) {
+                return RedirectToAction("Index", "Chat");
+            }
+
             return View();
         }

@@ -25,10 +28,6 @@
         [ValidateAntiForgeryToken]
         [RecaptchaControlMvc.CaptchaValidator]
         public ActionResult Index(IndexModel indexModel, bool captchaValid, string captchaErrorMessage) {
-            if(Session["nick"] != null) {
-                return RedirectToAction("Index", "Chat"); // TODO: implement this action/controller
-            }
-
             if(!captchaValid) {
                 ModelState.AddModelError("captcha", Resources.Strings.CaptchaError);
             }


Remove more message

Remove more message

--- WalletWasabi.Tests/UnitTests/PasswordTests.cs
+++ WalletWasabi.Tests/UnitTests/PasswordTests.cs
@@ -116,8 +116,10 @@
 			string emptyPw = "";
 			string nullPw = null;

+			Logger.TurnOff();
 			var emptyPws = PasswordHelper.GetPossiblePasswords(emptyPw);
 			var nullPws = PasswordHelper.GetPossiblePasswords(nullPw);
+			Logger.TurnOn();

 			var emptyPwRes = Assert.Single(emptyPws);
 			var nullPwRes = Assert.Single(nullPws);


RouteLinkHeaderAttribute: Improved error handling

--- WebApi.LinkHeader/RouteLinkHeaderAttribute.cs
+++ WebApi.LinkHeader/RouteLinkHeaderAttribute.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Net.Http;
 using System.Web.Http.Filters;

@@ -44,6 +45,7 @@

             string href = actionExecutedContext.Request.GetUrlHelper().Link(RouteName,
                 PassThroughRouteParameters ? actionExecutedContext.Request.GetRouteData().Values : null);
+            if (string.IsNullOrEmpty(href)) throw new InvalidOperationException($"Unable to resolve route {RouteName}.");
             actionExecutedContext.Response.Headers.AddLink(href, Rel, Title);
         }
     }


[Gtk/Markdown] Uniformize spacing

[Gtk/Markdown] Uniformize spacing

--- Xwt.Gtk/Xwt.GtkBackend/MarkdownViewBackend.cs
+++ Xwt.Gtk/Xwt.GtkBackend/MarkdownViewBackend.cs
@@ -80,12 +80,6 @@
 				Family = "Monospace",
 				Indent = 14
 			});
-			var atag = new Gtk.TextTag ("a") {
-				Foreground = "#0000FF",
-				Underline = Pango.Underline.Single
-			};
-			atag.TextEvent += (o, args) => Console.WriteLine ("Clicked");
-			table.Add (atag);
 		}

 		protected new Gtk.TextView Widget {
@@ -135,6 +129,7 @@
 		{
 			var b = ((Gtk.TextBuffer)buffer);
 			var iter = b.EndIter;
+			b.Insert (ref iter, NewLine);
 			b.InsertWithTagsByName (ref iter, title, "h" + level);
 			b.Insert (ref iter, NewLine);
 		}
@@ -168,7 +163,7 @@

 		public void EmitCloseList (object buffer)
 		{
-			EmitText (buffer, NewLine);
+
 		}

 		public void EmitLink (object buffer, string href, string text)
@@ -189,6 +184,7 @@
 		{
 			var b = ((Gtk.TextBuffer)buffer);
 			var iter = b.EndIter;
+			b.Insert (ref iter, NewLine);
 			b.InsertWithTagsByName (ref iter, code, "pre");
 		}


Handle ldlen.

Handle ldlen.

--- IIS.SLSharp.Core/Reflection/Decompiler.cs
+++ IIS.SLSharp.Core/Reflection/Decompiler.cs
@@ -403,6 +403,12 @@
             _handlers[OpCodes.Stelem_R4] = InstStelem;

             _handlers[OpCodes.Stelem_R8] = InstStelem;
+
+            _handlers[OpCodes.Ldlen] = _ =>
+            {
+                var array = Pop();
+                Push(Expression.ArrayLength(array));
+            };

             _handlers[OpCodes.Clt] = InstClt;


copyright がデフォルトのままになっていたバグを修正。

copyright がデフォルトのままになっていたバグを修正。

--- YKToolkit.Controls/Properties/AssemblyInfo.cs
+++ YKToolkit.Controls/Properties/AssemblyInfo.cs
@@ -10,9 +10,9 @@
 [assembly: AssemblyTitle("YKToolkit.Controls")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("YKSoftware")]
 [assembly: AssemblyProduct("YKToolkit.Controls")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
+[assembly: AssemblyCopyright("Copyright © YKSoftware 2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -51,5 +51,5 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyVersion("2.0.1.1")]
 //[assembly: AssemblyFileVersion("1.0.0.0")]


Fix parameter error when EDSM returns an error

--- EDDiscovery/EDSM/EDSMClass.cs
+++ EDDiscovery/EDSM/EDSMClass.cs
@@ -481,13 +481,14 @@

             JObject msg = JObject.Parse(json);
             int msgnr = msg["msgnum"].Value<int>();
-            DateTime.TryParseExact(msg["startDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logstarttime);
-            DateTime.TryParseExact(msg["endDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logendtime);

             JArray logs = (JArray)msg["logs"];

             if (logs != null)
             {
+                DateTime.TryParseExact(msg["startDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logstarttime);
+                DateTime.TryParseExact(msg["endDateTime"].Value<string>(), "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out logendtime);
+
                 using (SQLiteConnectionSystem cn = new SQLiteConnectionSystem())
                 {
                     foreach (JObject jo in logs)


using more explicit Expression types

using more explicit Expression types

--- EPS.Utility/MemberComparer.cs
+++ EPS.Utility/MemberComparer.cs
@@ -136,7 +136,7 @@
 						typeof(IEqualityComparer<>).MakeGenericType(memberType)), "Equals", null, xPropertyOrField, yPropertyOrField));
 			}

-			private static BinaryExpression CallExpressionIfNoComparer(Expression comparison, Expression comparers, Type memberType, Expression xPropertyOrField, Expression yPropertyOrField)
+			private static BinaryExpression CallExpressionIfNoComparer(Expression comparison, ParameterExpression comparers, Type memberType, Expression xPropertyOrField, Expression yPropertyOrField)
 			{
 				return BinaryExpression.Or(
 					CallComparerIfAvailable(comparers, memberType, xPropertyOrField, yPropertyOrField),
@@ -171,7 +171,7 @@
 				if (members.Length == 0)
 					return body;

-				Expression propertyEqualities = null;
+				BinaryExpression propertyEqualities = null;
 				BinaryExpression recursiveProperties = null;

 				for (int i = 0; i < members.Length; i++)
@@ -208,7 +208,7 @@
 				}

 				//to make it this far we either had simple properties or nested recursive stuff
-				Expression depthCheck = null != propertyEqualities && null != recursiveProperties ? Expression.AndAlso(propertyEqualities, recursiveProperties)
+				BinaryExpression depthCheck = null != propertyEqualities && null != recursiveProperties ? Expression.AndAlso(propertyEqualities, recursiveProperties)
 					: propertyEqualities ?? recursiveProperties;

 				//combine that with our main running expression if there is one


Fix updated equipment connection type not applying during import

--- Import/OCM.Import.Common/ImportManager.cs
+++ Import/OCM.Import.Common/ImportManager.cs
@@ -594,6 +594,9 @@
                         foreach (var conn in sourceItem.Connections)
                         {
                             //imported equipment info is replaced in order they appear in the import
+                            //TODO: if the connection type/power rating has changed we need to create new equipment
+                            // rather than update existing as this is probably a physically different equipment installation
+
                             ConnectionInfo existingConnection = null;

                             existingConnection = destItem.Connections.FirstOrDefault(d => d.Reference == conn.Reference && !String.IsNullOrEmpty(conn.Reference));
@@ -608,8 +611,9 @@

                             if (existingConnection != null)
                             {
-                                //update existing
-                                if (conn.ConnectionType != null) existingConnection.ConnectionType = conn.ConnectionType;
+                                //update existing- updates can be either object base reference data or use ID values
+                                existingConnection.ConnectionType = conn.ConnectionType;
+                                existingConnection.ConnectionTypeID = conn.ConnectionTypeID;
                                 existingConnection.Quantity = conn.Quantity;
                                 existingConnection.LevelID = conn.LevelID;
                                 existingConnection.Level = conn.Level;
@@ -620,7 +624,7 @@
                                 existingConnection.Amps = conn.Amps;
                                 existingConnection.PowerKW = conn.PowerKW;
                                 existingConnection.Comments = conn.Comments;
-                                if (conn.CurrentType != null) existingConnection.CurrentType = conn.CurrentType;
+                                existingConnection.CurrentType = conn.CurrentType;
                                 existingConnection.CurrentTypeID = conn.CurrentTypeID;
                             }
                             else


Removed duplicates

Removed duplicates


All members of QUERY_SERVICE_CONFIG are now public

--- winsvc/Structs/QUERY_SERVICE_CONFIG.cs
+++ winsvc/Structs/QUERY_SERVICE_CONFIG.cs
@@ -10,14 +10,14 @@
 {
     [StructLayout(LayoutKind.Sequential, Pack = 0, CharSet = CharSet.Unicode)]
     public struct QUERY_SERVICE_CONFIG {
-        UInt32 ServiceType;
-        UInt32 StartType;
-        UInt32 ErrorControl;
-        string BinaryPathName;
-        string LoadOrderGroup;
-        UInt32 TagId;
-        string Dependencies;
-        string ServiceStartName;
+        public UInt32 ServiceType;
+        public UInt32 StartType;
+        public UInt32 ErrorControl;
+        public string BinaryPathName;
+        public string LoadOrderGroup;
+        public UInt32 TagId;
+        public string Dependencies;
+        public string ServiceStartName;
         public string DisplayName;
     }
 }


Fix hotfix/release stashing

Fix hotfix/release stashing

--- build/Build.GitFlow.cs
+++ build/Build.GitFlow.cs
@@ -72,12 +72,14 @@

     void Checkout(string branch, string start)
     {
-        if (AutoStash)
+        var hasCleanWorkingCopy = GitHasCleanWorkingCopy();
+
+        if (!hasCleanWorkingCopy && AutoStash)
             Git("stash");

         Git($"checkout -b {branch} {start}");

-        if (AutoStash)
+        if (!hasCleanWorkingCopy && AutoStash)
             Git("stash apply");
     }
 }


Fix awaits in test project

Fix awaits in test project

--- samples/Samples.AspNetCore/Controllers/TestController.cs
+++ samples/Samples.AspNetCore/Controllers/TestController.cs
@@ -53,16 +53,16 @@
                 return Content(string.Format("Duplicated Queries (N+1) completed {0}", total));
             }
         }
-
+
         public async Task<IActionResult> DuplicatedQueriesAsync()
         {
-            using (var conn = await GetConnectionAsync())
+            using (var conn = await GetConnectionAsync().ConfigureAwait(false))
             {
                 long total = 0;

                 for (int i = 0; i < 20; i++)
                 {
-                    total += await conn.QueryFirstAsync<long>("select count(1) from RouteHits where HitCount = @i", new { i });
+                    total += await conn.QueryFirstAsync<long>("select count(1) from RouteHits where HitCount = @i", new { i }).ConfigureAwait(false);
                 }
                 return Content(string.Format("Duplicated Queries (N+1) completed {0}", total));
             }
@@ -289,7 +289,7 @@
                     cnn = new ProfiledDbConnection(cnn, MiniProfiler.Current);
                 }

-                await cnn.OpenAsync();
+                await cnn.OpenAsync().ConfigureAwait(false);
                 return cnn;
             }
         }


Fix NamedArgumentInParameterOrderWithDefaultValue test for new IOperation output.

--- src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IArgument.cs
+++ src/Compilers/CSharp/Test/Semantic/IOperation/IOperationTests_IArgument.cs
@@ -166,6 +166,7 @@
             VerifyOperationTreeAndDiagnosticsForTest<InvocationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
         }

+        [CompilerTrait(CompilerFeature.IOperation)]
         [Fact]
         public void NamedArgumentInParameterOrderWithDefaultValue()
         {
@@ -181,14 +182,21 @@
 }
 ";
             string expectedOperationTree = @"
-IInvocationExpression (static void P.M2([System.Int32 x = 1], [System.Int32 y = 2], [System.Int32 z = 3])) (OperationKind.InvocationExpression, Type: System.Void) (Syntax: 'M2(y: 0, z: 2)')
+IInvocationExpression (void P.M2([System.Int32 x = 1], [System.Int32 y = 2], [System.Int32 z = 3])) (OperationKind.InvocationExpression, Type: System.Void) (Syntax: 'M2(y: 0, z: 2)')
+  Instance Receiver: null
   Arguments(3):
-IArgument (ArgumentKind.Explicit, Matching Parameter: y) (OperationKind.Argument) (Syntax: '0')
-      ILiteralExpression (Text: 0) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0')
-    IArgument (ArgumentKind.Explicit, Matching Parameter: z) (OperationKind.Argument) (Syntax: '2')
-      ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
-    IArgument (ArgumentKind.DefaultValue, Matching Parameter: x) (OperationKind.Argument) (Syntax: 'M2(y: 0, z: 2)')
-      ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: 'M2(y: 0, z: 2)')
+      IArgument (ArgumentKind.Explicit, Matching Parameter: y) (OperationKind.Argument) (Syntax: '0')
+        ILiteralExpression (Text: 0) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0')
+        InConversion: null
+        OutConversion: null
+      IArgument (ArgumentKind.Explicit, Matching Parameter: z) (OperationKind.Argument) (Syntax: '2')
+        ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
+        InConversion: null
+        OutConversion: null
+      IArgument (ArgumentKind.DefaultValue, Matching Parameter: x) (OperationKind.Argument) (Syntax: 'M2(y: 0, z: 2)')
+        ILiteralExpression (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: 'M2(y: 0, z: 2)')
+        InConversion: null
+        OutConversion: null
 ";
             var expectedDiagnostics = DiagnosticDescription.None;


Updated a test after merge

Updated a test after merge

--- src/Compilers/CSharp/Test/Semantic/Semantics/StackAllocInitializerTests.cs
+++ src/Compilers/CSharp/Test/Semantic/Semantics/StackAllocInitializerTests.cs
@@ -1249,15 +1249,15 @@
 }
 ";
             CreateCompilationWithMscorlibAndSpan(test, options: TestOptions.ReleaseDll.WithAllowUnsafe(true)).VerifyDiagnostics(
-                // (6,26): error CS0213: You cannot use the fixed statement to take the address of an already fixed expression
+                // (6,26): error CS9365: The given expression cannot be used in a fixed statement
                 //         fixed (int* v1 = stackalloc int [3] { 1, 2, 3 })
-                Diagnostic(ErrorCode.ERR_FixedNotNeeded, "stackalloc int [3] { 1, 2, 3 }").WithLocation(6, 26),
-                // (7,26): error CS0213: You cannot use the fixed statement to take the address of an already fixed expression
+                Diagnostic(ErrorCode.ERR_ExprCannotBeFixed, "stackalloc int [3] { 1, 2, 3 }").WithLocation(6, 26),
+                // (7,26): error CS9365: The given expression cannot be used in a fixed statement
                 //         fixed (int* v2 = stackalloc int [ ] { 1, 2, 3 })
-                Diagnostic(ErrorCode.ERR_FixedNotNeeded, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(7, 26),
-                // (8,26): error CS0213: You cannot use the fixed statement to take the address of an already fixed expression
+                Diagnostic(ErrorCode.ERR_ExprCannotBeFixed, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(7, 26),
+                // (8,26): error CS9365: The given expression cannot be used in a fixed statement
                 //         fixed (int* v3 = stackalloc     [ ] { 1, 2, 3 })
-                Diagnostic(ErrorCode.ERR_FixedNotNeeded, "stackalloc     [ ] { 1, 2, 3 }").WithLocation(8, 26)
+                Diagnostic(ErrorCode.ERR_ExprCannotBeFixed, "stackalloc     [ ] { 1, 2, 3 }").WithLocation(8, 26)
                 );
         }


Remove using

Remove using

--- src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs
+++ src/EditorFeatures/Core.Wpf/InlineHints/InlineHintsKeyProcessorProvider.cs
@@ -5,7 +5,6 @@
 using System;
 using System.ComponentModel.Composition;
 using System.Linq;
-using System.Runtime.CompilerServices;
 using System.Windows.Input;
 using Microsoft.CodeAnalysis.Host.Mef;
 using Microsoft.CodeAnalysis.InlineHints;


Be more defensive in BufferingDisabled test (#12278)

Fixes https://github.com/aspnet/AspNetCore-Internal/issues/2826

We [use `?.` in `master`](https://github.com/aspnet/AspNetCore/blob/f56cb72b7fa01ea09c3d3b128aaeb9cee937b371/src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs#L103) and it seems like the test can end up in this state (by the linked issue) so back-porting that defensive measure seems reasonable.

--- src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs
+++ src/Hosting/Server.IntegrationTesting/src/Deployers/ApplicationDeployer.cs
@@ -97,7 +97,7 @@
                 }
                 else
                 {
-                    _publishedApplication.Dispose();
+                    _publishedApplication?.Dispose();
                 }
             }
         }


Setting default concurrency check property

--- src/Ilaro.Admin/Ilaro.Admin/Configuration/Customizers/CustomizersHolder.cs
+++ src/Ilaro.Admin/Ilaro.Admin/Configuration/Customizers/CustomizersHolder.cs
@@ -5,6 +5,7 @@
 using Ilaro.Admin.Extensions;
 using System.Linq;
 using Ilaro.Admin.Models;
+using Ilaro.Admin.Core.Data;

 namespace Ilaro.Admin.Configuration.Customizers
 {
@@ -192,6 +193,7 @@
         public void CustomizeProperties(Entity entity, IIlaroAdmin admin)
         {
             SetForeignKeysReferences(entity, admin);
+            SetDefaultConcurrencyCheckProperty(entity);

             foreach (var customizerPair in _propertyCustomizers)
             {
@@ -323,5 +325,23 @@
                 SearchProperties(entity.GetDefaultSearchProperties().Select(x => x.PropertyInfo));
             }
         }
+
+        private void SetDefaultConcurrencyCheckProperty(Entity entity)
+        {
+            if (_propertyCustomizers.Any(x => x.Value.IsConcurrencyCheck))
+                return;
+
+            var concurrencyCheckProperty = entity.Properties
+                .Where(x => x.OnUpdateDefaultValue != null)
+                .Where(x => x.OnUpdateDefaultValue is ValueBehavior)
+                .FirstOrDefault(x => (x.OnUpdateDefaultValue as ValueBehavior?)
+                    .In(ValueBehavior.Now, ValueBehavior.UtcNow, ValueBehavior.Guid));
+
+            if (concurrencyCheckProperty != null)
+            {
+                GetPropertyCustomizer(concurrencyCheckProperty.PropertyInfo)
+                    .IsConcurrencyCheck = true;
+            }
+        }
     }
 }


Updated code template for delete with confirmation with message.

--- src/Intellitect.Extensions.CodeGenerators.Mvc/Templates/KoViewModel.cshtml
+++ src/Intellitect.Extensions.CodeGenerators.Mvc/Templates/KoViewModel.cshtml
@@ -520,7 +520,9 @@

 			// Deletes the object after a confirmation box.
 			self.deleteItemWithConfirmation = function(callback, message) {
-                message = message || "Delete this item?";
+                if (typeof message != 'string') {
+                    message = "Delete this item?";
+                }
                 if (confirm(message)) {
 					self.deleteItem(callback);
 				}


Byte ranges no longer fail when they end on a boundary

--- src/NUnitFramework/framework/Internal/ValueGenerator.ByteValueGenerator.cs
+++ src/NUnitFramework/framework/Internal/ValueGenerator.ByteValueGenerator.cs
@@ -31,7 +31,7 @@
             {
                 if (value is byte)
                 {
-                    step = new ComparableStep<byte>((byte)value, (prev, stepValue) => unchecked((byte)(prev + stepValue)));
+                    step = new ComparableStep<byte>((byte)value, (prev, stepValue) => checked((byte)(prev + stepValue)));
                     return true;
                 }

@@ -40,7 +40,7 @@
                 // -1 can be converted natively to Int16, SByte and Decimal, so we can fall back on the automatic conversion for them.
                 if (value is int)
                 {
-                    step = new ComparableStep<int>((int)value, (prev, stepValue) => unchecked((byte)(prev + stepValue)));
+                    step = new ComparableStep<int>((int)value, (prev, stepValue) => checked((byte)(prev + stepValue)));
                     return true;
                 }


Remove duplicate null check (#4548)

Remove duplicate null check (#4548)

--- src/OrchardCore.Modules/OrchardCore.Tenants/Controllers/AdminController.cs
+++ src/OrchardCore.Modules/OrchardCore.Tenants/Controllers/AdminController.cs
@@ -106,9 +106,9 @@
             if (!string.IsNullOrWhiteSpace(options.Search))
             {
                 entries = entries.Where(t => t.Name.IndexOf(options.Search, StringComparison.OrdinalIgnoreCase) > -1 ||
-                    (t.ShellSettings != null && t.ShellSettings != null &&
-                    ((t.ShellSettings.RequestUrlHost != null && t.ShellSettings.RequestUrlHost.IndexOf(options.Search, StringComparison.OrdinalIgnoreCase) > -1) ||
-                    (t.ShellSettings.RequestUrlPrefix != null && t.ShellSettings.RequestUrlPrefix.IndexOf(options.Search, StringComparison.OrdinalIgnoreCase) > -1)))).ToList();
+                    (t.ShellSettings != null &&
+                     ((t.ShellSettings.RequestUrlHost != null && t.ShellSettings.RequestUrlHost.IndexOf(options.Search, StringComparison.OrdinalIgnoreCase) > -1) ||
+                     (t.ShellSettings.RequestUrlPrefix != null && t.ShellSettings.RequestUrlPrefix.IndexOf(options.Search, StringComparison.OrdinalIgnoreCase) > -1)))).ToList();
             }

             switch (options.Filter)


Increased message lock and renewal durations

--- src/SFA.DAS.NServiceBus/AzureServiceBus/EndpointConfigurationExtensions.cs
+++ src/SFA.DAS.NServiceBus/AzureServiceBus/EndpointConfigurationExtensions.cs
@@ -18,11 +18,19 @@
             else
             {
                 var transport = config.UseTransport<AzureServiceBusTransport>();
-
+
                 transport.ConnectionString(connectionStringBuilder);
                 transport.Transactions(TransportTransactionMode.ReceiveOnly);
                 transport.UseForwardingTopology();
-
+
+                var messageReceiver = transport.MessageReceivers();
+
+                messageReceiver.AutoRenewTimeout(TimeSpan.FromMinutes(10));
+
+                var queues = transport.Queues();
+
+                queues.LockDuration(TimeSpan.FromMinutes(1));
+
                 routing(transport.Routing());
             }


解决死锁问题

解决死锁问题

当利用Senparc.Weixin.MP.Containers.Register或Senparc.Weixin.MP.Containers.RegisterAsync进行公众号注册时，如再未验证公众号是否已注册的情况下进行重复注册会引起无线等待的死锁问题，更改为await Task.WhenAll后可解决，并且作用跟之前无差别。

--- src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs
+++ src/Senparc.Weixin.MP/Senparc.Weixin.MP/Containers/AccessTokenContainer.cs
@@ -299,7 +299,7 @@
             //OAuthAccessTokenContainer进行自动注册
             var registerOAuthTask = OAuthAccessTokenContainer.RegisterAsync(appId, appSecret, name);

-            Task.WaitAll(new[] { registerTask, registerJsApiTask, registerOAuthTask });//等待所有任务完成
+            await Task.WhenAll(new[] { registerTask, registerJsApiTask, registerOAuthTask });//等待所有任务完成
         }

         #region AccessToken


同步版本号

同步版本号

--- src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Properties/AssemblyInfo.cs
+++ src/Senparc.Weixin.WxOpen/Senparc.Weixin.WxOpen/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 //可以指定所有这些值，也可以使用“生成号”和“修订号”的默认值，
 // 方法是按如下所示使用“*”: :
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.3.0.*")]
+[assembly: AssemblyVersion("3.0.1.*")]
 //[assembly: AssemblyFileVersion("1.0.0.0")]


fix pingpong benchmark

fix pingpong benchmark

--- benchmarks/InprocessBenchmark/Program.cs
+++ benchmarks/InprocessBenchmark/Program.cs
@@ -25,7 +25,7 @@
         const int batchSize = 100;

         Console.WriteLine("Dispatcher\t\tElapsed\t\tMsg/sec");
-        var tps = new[] { 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 3000 };
+        var tps = new[] { 50,100,200,300, 400, 500, 600, 700, 800, 900 };
         foreach (var t in tps)
         {
             var d = new ThreadPoolDispatcher { Throughput = t };
@@ -75,12 +75,12 @@

 public class Msg
 {
-    public Msg(PID sender)
+    public Msg(PID pingActor)
     {
-        Sender = sender;
+        PingActor = pingActor;
     }

-    public PID Sender { get; }
+    public PID PingActor { get; }
 }

 public class Start
@@ -100,7 +100,7 @@
         switch (context.Message)
         {
             case Msg msg:
-                context.Send(msg.Sender, msg);
+                context.Send(msg.PingActor, msg);
                 break;
         }
         return Done;
@@ -132,14 +132,16 @@
                 SendBatch(context);
                 break;
             case Msg m:
-                _batch--;
+                _messageCount--;

                 if (_batch > 0)
                 {
                     break;
                 }
+
+                context.Send(_targetPid,m);

-                if (!SendBatch(context))
+                if (_messageCount <= 0)
                 {
                     _wgStop.SetResult(true);
                 }
@@ -148,13 +150,8 @@
         return Done;
     }

-    private bool SendBatch(IContext context)
+    private void SendBatch(IContext context)
     {
-        if (_messageCount <= 0)
-        {
-            return false;
-        }
-
         var m = new Msg(context.Self);

         for (var i = 0; i < _batchSize; i++)
@@ -163,7 +160,5 @@
         }

         _messageCount -= _batchSize;
-        _batch = _batchSize;
-        return true;
     }
 }


Fix assignment

Fix assignment

--- src/System.Drawing.Common/src/System/Drawing/Text/PrivateFontCollection.cs
+++ src/System.Drawing.Common/src/System/Drawing/Text/PrivateFontCollection.cs
@@ -57,7 +57,7 @@
         /// </summary>
         public void AddFontFile(string filename)
         {
-            filename = Path.GetFullPath(filename);
+            Path.GetFullPath(filename);

             int status = SafeNativeMethods.Gdip.GdipPrivateAddFontFile(new HandleRef(this, _nativeFontCollection), filename);
             SafeNativeMethods.Gdip.CheckStatus(status);


Reduce allocations in Enumerable.Block

Reduce allocations in Enumerable.Block

Don't call `ToArray()` in `GetOptimizedBlockExpression()` if the argument is
a `ReadOnlyCollection`, to work with the attempts throughout the project to
reduce allocations of such collections.

Conversely, don't call `ToReadOnlyCollection()` in one of the `Block()`
overloads if the source already implements `IReadOnlyList` to allow lighter
array objects to be used more often.

--- src/System.Linq.Expressions/src/System/Linq/Expressions/BlockExpression.cs
+++ src/System.Linq.Expressions/src/System/Linq/Expressions/BlockExpression.cs
@@ -847,14 +847,14 @@
         public static BlockExpression Block(IEnumerable<ParameterExpression> variables, IEnumerable<Expression> expressions)
         {
             ContractUtils.RequiresNotNull(expressions, "expressions");
+            var variableList = variables.ToReadOnly();
+
+            if (variableList.Count == 0)
+            {
+                return GetOptimizedBlockExpression(expressions as IReadOnlyList<Expression> ?? expressions.ToReadOnly());
+            }
+
             var expressionList = expressions.ToReadOnly();
-            var variableList = variables.ToReadOnly();
-
-            if (variableList.Count == 0)
-            {
-                return GetOptimizedBlockExpression(expressionList);
-            }
-
             return BlockCore(expressionList.Last().Type, variableList, expressionList);
         }

@@ -967,7 +967,7 @@
                 default:
                     ContractUtils.RequiresNotEmptyList(expressions, "expressions");
                     RequiresCanRead(expressions, "expressions");
-                    return new BlockN(expressions.ToArray());
+                    return new BlockN(expressions as ReadOnlyCollection<Expression> ?? (IList<Expression>)expressions.ToArray());
             }
         }
     }