pool changes.

pool changes.

--- src/TWCore.Serialization.PWSerializer/PWSerializerCore.cs
+++ src/TWCore.Serialization.PWSerializer/PWSerializerCore.cs
@@ -41,63 +41,83 @@
         private static readonly Encoding DefaultUtf8Encoding = new UTF8Encoding(false);
         private static readonly ArrayEqualityComparer<string> StringArrayComparer = new ArrayEqualityComparer<string>(StringComparer.Ordinal);

-        private static readonly ObjectPool<(SerializerCache<string[]>, SerializerCache<object>, StringSerializer), OPoolAllocator> OPool = new ObjectPool<(SerializerCache<string[]>, SerializerCache<object>, StringSerializer), OPoolAllocator>();
-
         #region Allocators
-        private struct OPoolAllocator : IPoolObjectLifecycle<(SerializerCache<string[]>, SerializerCache<object>, StringSerializer)>
+        private class SerPoolItem
+        {
+            public readonly SerializerCache<string[]> TypesCache;
+            public readonly SerializerCache<object> ObjectCache;
+            public StringSerializer PropertiesSerializer;
+            //
+            public readonly HashSet<Type> CurrentSerializerPlanTypes;
+            public readonly Stack<SerializerScope> ScopeStack;
+
+            public SerPoolItem()
+            {
+                TypesCache = new SerializerCache<string[]>(SerializerMode.CachedUShort, StringArrayComparer);
+                ObjectCache = new SerializerCache<object>(SerializerMode.CachedUShort);
+                PropertiesSerializer = new StringSerializer();
+                PropertiesSerializer.Init(SerializerMode.CachedUShort);
+                //
+                CurrentSerializerPlanTypes = new HashSet<Type>();
+                ScopeStack = new Stack<SerializerScope>();
+            }
+
+            public void Clear()
+            {
+                TypesCache.Clear(SerializerMode.CachedUShort);
+                ObjectCache.Clear(SerializerMode.CachedUShort);
+                PropertiesSerializer.Init(SerializerMode.CachedUShort);
+                CurrentSerializerPlanTypes.Clear();
+                ScopeStack.Clear();
+            }
+        }
+        private class DesPoolItem
+        {
+            public readonly SerializerCache<string[]> TypesCache;
+            public readonly SerializerCache<object> ObjectCache;
+            public StringSerializer PropertiesSerializer;
+            //
+            public readonly Dictionary<Type, Type[]> PropertiesTypes;
+            public readonly Stack<DeserializerType> DeserializerStack;
+
+            public DesPoolItem()
+            {
+                TypesCache = new SerializerCache<string[]>(SerializerMode.CachedUShort, StringArrayComparer);
+                ObjectCache = new SerializerCache<object>(SerializerMode.CachedUShort);
+                PropertiesSerializer = new StringSerializer();
+                PropertiesSerializer.Init(SerializerMode.CachedUShort);
+                //
+                PropertiesTypes = new Dictionary<Type, Type[]>();
+                DeserializerStack = new Stack<DeserializerType>();
+            }
+
+            public void Clear()
+            {
+                TypesCache.Clear(SerializerMode.CachedUShort);
+                ObjectCache.Clear(SerializerMode.CachedUShort);
+                PropertiesSerializer.Init(SerializerMode.CachedUShort);
+                PropertiesTypes.Clear();
+                DeserializerStack.Clear();
+            }
+        }
+
+        private struct SerPoolAllocator : IPoolObjectLifecycle<SerPoolItem>
         {
             public int InitialSize => Environment.ProcessorCount;
             public PoolResetMode ResetMode => PoolResetMode.AfterUse;
-
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public (SerializerCache<string[]>, SerializerCache<object>, StringSerializer) New()
-            {
-                var serCacheArr = new SerializerCache<string[]>(SerializerMode.CachedUShort, StringArrayComparer);
-                var serCacheObj = new SerializerCache<object>(SerializerMode.CachedUShort);
-                var serString = new StringSerializer();
-                serString.Init(SerializerMode.CachedUShort);
-                return (serCacheArr, serCacheObj, serString);
-            }
-
+            public SerPoolItem New() => new SerPoolItem();
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public void Reset((SerializerCache<string[]>, SerializerCache<object>, StringSerializer) value)
-            {
-                value.Item1.Clear(SerializerMode.CachedUShort);
-                value.Item2.Clear(SerializerMode.CachedUShort);
-                value.Item3.Init(SerializerMode.CachedUShort);
-            }
+            public void Reset(SerPoolItem value) => value.Clear();
         }
-        private struct SerPoolAllocator : IPoolObjectLifecycle<(HashSet<Type>, Stack<SerializerScope>)>
+        private struct DesPoolAllocator : IPoolObjectLifecycle<DesPoolItem>
         {
             public int InitialSize => Environment.ProcessorCount;
             public PoolResetMode ResetMode => PoolResetMode.AfterUse;
-
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public (HashSet<Type>, Stack<SerializerScope>) New()
-                => (new HashSet<Type>(), new Stack<SerializerScope>());
-
+            public DesPoolItem New() => new DesPoolItem();
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public void Reset((HashSet<Type>, Stack<SerializerScope>) value)
-            {
-                value.Item1.Clear();
-                value.Item2.Clear();
-            }
-        }
-        private struct DesPoolAllocator : IPoolObjectLifecycle<(Dictionary<Type, Type[]>, Stack<DeserializerType>)>
-        {
-            public int InitialSize => Environment.ProcessorCount;
-            public PoolResetMode ResetMode => PoolResetMode.AfterUse;
-
-            [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public (Dictionary<Type, Type[]>, Stack<DeserializerType>) New()
-                => (new Dictionary<Type, Type[]>(), new Stack<DeserializerType>());
-
-            [MethodImpl(MethodImplOptions.AggressiveInlining)]
-            public void Reset((Dictionary<Type, Type[]>, Stack<DeserializerType>) value)
-            {
-                value.Item1.Clear();
-                value.Item2.Clear();
-            }
+            public void Reset(DesPoolItem value) => value.Clear();
         }
         #endregion

@@ -115,7 +135,7 @@
         #region Serializer
         private static readonly NonBlocking.ConcurrentDictionary<Type, SerializerPlan> SerializationPlans = new NonBlocking.ConcurrentDictionary<Type, SerializerPlan>();
         private static readonly SerializerPlanItem[] EndPlan = { new SerializerPlanItem.WriteBytes(new[] { DataType.TypeEnd }) };
-        private static readonly ObjectPool<(HashSet<Type>, Stack<SerializerScope>), SerPoolAllocator> SerPool = new ObjectPool<(HashSet<Type>, Stack<SerializerScope>), SerPoolAllocator>();
+        private static readonly ObjectPool<SerPoolItem, SerPoolAllocator> SerPool = new ObjectPool<SerPoolItem, SerPoolAllocator>();
         private static readonly ReferencePool<SerializerScope> SerializerScopePool = new ReferencePool<SerializerScope>(10, scope => scope.Init());
         private static readonly ReferencePool<SerializerPlanItem.RuntimeValue> SerializerRuntimePool = new ReferencePool<SerializerPlanItem.RuntimeValue>(20);
         private readonly byte[] _bufferSer = new byte[3];
@@ -131,16 +151,14 @@
         {
             var type = value?.GetType() ?? typeof(object);
             var serPool = SerPool.New();
-            var currentSerializerPlanTypes = serPool.Item1;
+            var currentSerializerPlanTypes = serPool.CurrentSerializerPlanTypes;
             var serializersTable = SerializersTable.GetTable(Mode);
             var numberSerializer = serializersTable.NumberSerializer;
-            var tuple = OPool.New();
-            var typesCache = tuple.Item1;
-            var objectCache = tuple.Item2;
-            var propertySerializer = tuple.Item3;
-
+            var typesCache = serPool.TypesCache;
+            var objectCache = serPool.ObjectCache;
+            var propertySerializer = serPool.PropertiesSerializer;
             var plan = GetSerializerPlan(currentSerializerPlanTypes, serializersTable, type);
-            var scopeStack = serPool.Item2;
+            var scopeStack = serPool.ScopeStack;
             var scope = SerializerScopePool.New();
             scope.Init(plan, typeof(object), value);
             scopeStack.Push(scope);
@@ -613,7 +631,6 @@
             } while (scope != null);
             SerPool.Store(serPool);
             SerializersTable.ReturnTable(serializersTable);
-            OPool.Store(tuple);
         }
         #endregion

@@ -787,7 +804,7 @@
         #endregion

         #region Deserializer
-        private static readonly ObjectPool<(Dictionary<Type, Type[]>, Stack<DeserializerType>), DesPoolAllocator> DesPool = new ObjectPool<(Dictionary<Type, Type[]>, Stack<DeserializerType>), DesPoolAllocator>();
+        private static readonly ObjectPool<DesPoolItem, DesPoolAllocator> DesPool = new ObjectPool<DesPoolItem, DesPoolAllocator>();
         private static readonly ReferencePool<DeserializerType> DesarializerTypePool = new ReferencePool<DeserializerType>(Environment.ProcessorCount, d => d.Clear());
         private static readonly ReferencePool<Stack<DynamicDeserializedType>> GdStackPool = new ReferencePool<Stack<DynamicDeserializedType>>(Environment.ProcessorCount, s => s.Clear());
         private readonly byte[] _bufferDes = new byte[8];
@@ -815,12 +832,11 @@
             var desPool = DesPool.New();
             var serializersTable = DeserializersTable.GetTable(sMode);
             var numberSerializer = serializersTable.NumberSerializer;
-            var tuple = OPool.New();
-            var typesCache = tuple.Item1;
-            var objectCache = tuple.Item2;
-            var propertySerializer = tuple.Item3;
-            var propertiesTypes = desPool.Item1;
-            var desStack = desPool.Item2;
+            var typesCache = desPool.TypesCache;
+            var objectCache = desPool.ObjectCache;
+            var propertySerializer = desPool.PropertiesSerializer;
+            var propertiesTypes = desPool.PropertiesTypes;
+            var desStack = desPool.DeserializerStack;
             DeserializerType typeItem = null;
             Type valueType = null;

@@ -1065,8 +1081,6 @@
                 }
             }
             while (desStack.Count > 0 || valueType != null);
-
-            OPool.Store(tuple);
             DesPool.Store(desPool);
             DeserializersTable.ReturnTable(serializersTable);
             return typeItem?.Value;
@@ -1091,10 +1105,10 @@

             var serializersTable = DeserializersTable.GetTable(sMode);
             var numberSerializer = serializersTable.NumberSerializer;
-            var tuple = OPool.New();
-            var typesCache = tuple.Item1;
-            var objectCache = tuple.Item2;
-            var propertySerializer = tuple.Item3;
+            var serPool = SerPool.New();
+            var typesCache = serPool.TypesCache;
+            var objectCache = serPool.ObjectCache;
+            var propertySerializer = serPool.PropertiesSerializer;

             var desStack = GdStackPool.New();
             DynamicDeserializedType typeItem = null;
@@ -1350,8 +1364,6 @@
                 }
             }
             while (desStack.Count > 0 || valueType != null);
-
-            OPool.Store(tuple);
             GdStackPool.Store(desStack);
             DeserializersTable.ReturnTable(serializersTable);
             return typeItem;


reordering

reordering

--- Assets/BitStrap/Plugins/Editor/ShortcutsWindow/ShortcutsWindow.cs
+++ Assets/BitStrap/Plugins/Editor/ShortcutsWindow/ShortcutsWindow.cs
@@ -56,8 +56,6 @@
 				var y = ( i / columnCount ) * height + padding * 0.5f;

 				var totalRect = new Rect( x, y, width, height );
-				var totalRectAbsolute = new Rect( totalRect );
-				totalRectAbsolute.position = position.position;

 				// Click item
 				if( clickCount > 0 && totalRect.Contains( mousePosition ) )
@@ -139,12 +137,26 @@
 				if( eventType == EventType.DragPerform )
 				{
 					DragAndDrop.AcceptDrag();
+
+					var x = Mathf.FloorToInt( mousePosition.x / width );
+					var y = Mathf.FloorToInt( mousePosition.y / height );
+					var index = y * columnCount + x;
+
 					Undo.RecordObject( references, UndoString );

 					foreach( var o in DragAndDrop.objectReferences )
 					{
-						if( !string.IsNullOrEmpty( AssetDatabase.GetAssetPath( o ) ) && !ArrayUtility.Contains( references.assets, o ) )
+						if( string.IsNullOrEmpty( AssetDatabase.GetAssetPath( o ) ) )
+							continue;
+
+						if( ArrayUtility.Contains( references.assets, o ) )
+							ArrayUtility.Remove( ref references.assets, o );
+
+						if( index >= references.assets.Length )
 							ArrayUtility.Add( ref references.assets, o );
+						else
+							ArrayUtility.Insert( ref references.assets, index, o );
+						index++;
 					}
 				}


Fixed forms adder bug caused by recent RFS changes for performance.

--- FRBDK/Glue/GumPlugin/GumPlugin/DataGeneration/FormsControlAdder.cs
+++ FRBDK/Glue/GumPlugin/GumPlugin/DataGeneration/FormsControlAdder.cs
@@ -39,7 +39,7 @@

         public static async Task SaveElements(Assembly assembly, bool askToOverwrite = true)
         {
-            var gumDirectory = GumProjectManager.Self.GetGumProjectFileName().FullPath;
+            var gumDirectory = GumProjectManager.Self.GetGumProjectFileName().GetDirectoryContainingThis();

             Dictionary<string, FilePath> resourceToFileDestinations = new Dictionary<string, FilePath>();
@@ -138,17 +138,17 @@

         }

-        private static void AddContentItemsToResourceFileDestinations(string gumDirectory, Dictionary<string, FilePath> resourceToFileDestinations)
+        private static void AddContentItemsToResourceFileDestinations(FilePath gumDirectory, Dictionary<string, FilePath> resourceToFileDestinations)
         {
             var contentDestination = gumDirectory;
             foreach (var file in ContentItems)
             {
                 var resourceName = EmbeddedProjectRoot + "/" + file;
-                resourceToFileDestinations[resourceName.Replace("/", ".")] = contentDestination + file;
-            }
-        }
-
-        private static void AddElementsToResourceFileDestinations(string componentDestination, Dictionary<string, FilePath> resourceToFileDestinations, string[] resourcesInAssembly, string defaultFormsPrefix, string extensionWithDot)
+                resourceToFileDestinations[resourceName.Replace("/", ".")] = contentDestination.FullPath + file;
+            }
+        }
+
+        private static void AddElementsToResourceFileDestinations(FilePath componentDestination, Dictionary<string, FilePath> resourceToFileDestinations, string[] resourcesInAssembly, string defaultFormsPrefix, string extensionWithDot)
         {
             foreach (var resourceSource in resourcesInAssembly)
             {
@@ -159,7 +159,7 @@
                     var noPrefixName = resourceSource.Substring(defaultFormsPrefix.Length);
                     var withoutExtension = noPrefixName.Substring(0, noPrefixName.Length - extensionWithDot.Length);
                     var split = withoutExtension.Split('.');
-                    var destination = componentDestination + String.Join('/', split) + extensionWithDot;
+                    var destination = componentDestination.FullPath + String.Join('/', split) + extensionWithDot;
                     resourceToFileDestinations[resourceSource] = destination;
                 }
             }


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Net/WebSockets/WebSocketContext.cs
+++ websocket-sharp/Net/WebSockets/WebSocketContext.cs
@@ -195,8 +195,8 @@
     public abstract System.Net.IPEndPoint UserEndPoint { get; }

     /// <summary>
-    /// Gets the <see cref="WebSocketSharp.WebSocket"/> instance used for two-way communication
-    /// between client and server.
+    /// Gets the <see cref="WebSocketSharp.WebSocket"/> instance used for
+    /// two-way communication between client and server.
     /// </summary>
     /// <value>
     /// A <see cref="WebSocketSharp.WebSocket"/>.


implemented methods:

implemented methods:

- GetNetworkConfigurationsForVm(VirtualMachine virtualMachine)
- GetNetworkConfigurationsForVm(VirtualMachine virtualMachine, int id)
- GetNicsOfVirtualMachine(VirtualMachine virtualMachine)
- GetAllTasksOfVirtualMachine(VirtualMachine virtualMachine)
- GetTaskOfVirtualMachine(VirtualMachine virtualMachine, string taskId)

--- src/biz.dfch.CS.Abiquo.Client/v1/AbiquoClient.cs
+++ src/biz.dfch.CS.Abiquo.Client/v1/AbiquoClient.cs
@@ -634,6 +634,19 @@
             return true;
         }

+        public override VmNetworkConfigurations GetNetworkConfigurationsForVm(VirtualMachine virtualMachine)
+        {
+            var virtualDataCenterLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALDATACENTER);
+            var virtualDataCenterId = UriHelper.ExtractIdAsInt(virtualDataCenterLink.Href);
+
+            var virtualApplianceLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALAPPLIANCE);
+            var virtualApplianceId = UriHelper.ExtractIdAsInt(virtualApplianceLink.Href);
+
+            var virtualMachineId = virtualMachine.Id.GetValueOrDefault();
+
+            return GetNetworkConfigurationsForVm(virtualDataCenterId, virtualApplianceId, virtualMachineId);
+        }
+
         public override VmNetworkConfigurations GetNetworkConfigurationsForVm(int virtualDataCenterId, int virtualApplianceId,
             int virtualMachineId)
         {
@@ -645,6 +658,19 @@
             return Invoke<VmNetworkConfigurations>(uriSuffix, headers);
         }

+        public override VmNetworkConfiguration GetNetworkConfigurationForVm(VirtualMachine virtualMachine, int id)
+        {
+            var virtualDataCenterLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALDATACENTER);
+            var virtualDataCenterId = UriHelper.ExtractIdAsInt(virtualDataCenterLink.Href);
+
+            var virtualApplianceLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALAPPLIANCE);
+            var virtualApplianceId = UriHelper.ExtractIdAsInt(virtualApplianceLink.Href);
+
+            var virtualMachineId = virtualMachine.Id.GetValueOrDefault();
+
+            return GetNetworkConfigurationForVm(virtualDataCenterId, virtualApplianceId, virtualMachineId, id);
+        }
+
         public override VmNetworkConfiguration GetNetworkConfigurationForVm(int virtualDataCenterId, int virtualApplianceId,
             int virtualMachineId, int id)
         {
@@ -656,6 +682,19 @@
             return Invoke<VmNetworkConfiguration>(uriSuffix, headers);
         }

+        public override Nics GetNicsOfVirtualMachine(VirtualMachine virtualMachine)
+        {
+            var virtualDataCenterLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALDATACENTER);
+            var virtualDataCenterId = UriHelper.ExtractIdAsInt(virtualDataCenterLink.Href);
+
+            var virtualApplianceLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALAPPLIANCE);
+            var virtualApplianceId = UriHelper.ExtractIdAsInt(virtualApplianceLink.Href);
+
+            var virtualMachineId = virtualMachine.Id.GetValueOrDefault();
+
+            return GetNicsOfVirtualMachine(virtualDataCenterId, virtualApplianceId, virtualMachineId);
+        }
+
         public override Nics GetNicsOfVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId)
         {
             var headers = new HeaderBuilder().BuildAccept(VersionedAbiquoMediaDataTypes.VND_ABIQUO_NICS).GetHeaders();
@@ -666,12 +705,38 @@
             return Invoke<Nics>(uriSuffix, headers);
         }

+        public override Tasks GetAllTasksOfVirtualMachine(VirtualMachine virtualMachine)
+        {
+            var virtualDataCenterLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALDATACENTER);
+            var virtualDataCenterId = UriHelper.ExtractIdAsInt(virtualDataCenterLink.Href);
+
+            var virtualApplianceLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALAPPLIANCE);
+            var virtualApplianceId = UriHelper.ExtractIdAsInt(virtualApplianceLink.Href);
+
+            var virtualMachineId = virtualMachine.Id.GetValueOrDefault();
+
+            return GetAllTasksOfVirtualMachine(virtualDataCenterId, virtualApplianceId, virtualMachineId);
+        }
+
         public override Tasks GetAllTasksOfVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId)
         {
             var headers = new HeaderBuilder().BuildAccept(VersionedAbiquoMediaDataTypes.VND_ABIQUO_TASKS).GetHeaders();

             var uriSuffix = string.Format(AbiquoUriSuffixes.VIRTUALMACHINETASKS_BY_VIRTUALDATACENTER_ID_AND_VIRTUALAPPLIANCE_ID_AND_VIRTUALMACHINE_ID, virtualDataCenterId, virtualApplianceId, virtualMachineId);
             return Invoke<Tasks>(uriSuffix, headers);
+        }
+
+        public override Task GetTaskOfVirtualMachine(VirtualMachine virtualMachine, string taskId)
+        {
+            var virtualDataCenterLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALDATACENTER);
+            var virtualDataCenterId = UriHelper.ExtractIdAsInt(virtualDataCenterLink.Href);
+
+            var virtualApplianceLink = virtualMachine.GetLinkByRel(AbiquoRelations.VIRTUALAPPLIANCE);
+            var virtualApplianceId = UriHelper.ExtractIdAsInt(virtualApplianceLink.Href);
+
+            var virtualMachineId = virtualMachine.Id.GetValueOrDefault();
+
+            return GetTaskOfVirtualMachine(virtualDataCenterId, virtualApplianceId, virtualMachineId, taskId);
         }

         public override Task GetTaskOfVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId, string taskId)


Spelling

Spelling

--- Assets/MixedRealityToolkit.Providers/UnityAR/UnityARCameraSettingsProfile.cs
+++ Assets/MixedRealityToolkit.Providers/UnityAR/UnityARCameraSettingsProfile.cs
@@ -8,7 +8,7 @@
 namespace Microsoft.MixedReality.Toolkit.CameraSystem
 {
     /// <summary>
-    /// Configuration profile for the XR Camera setttings provider.
+    /// Configuration profile for the XR Camera settings provider.
     /// </summary>
     [CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Unity AR Foundation Camera Settings Profile", fileName = "DefaultUnityARCameraSettingsProfile", order = 100)]
     [MixedRealityServiceProfile(typeof(UnityARCameraSettings))]
@@ -37,11 +37,11 @@
         public TrackedPoseDriver.TrackingType TrackingType => trackingType;

         [SerializeField]
-        [Tooltip("Specfies when (during Update and/or just before rendering) to update the tracking of the pose.")]
+        [Tooltip("Specifies when (during Update and/or just before rendering) to update the tracking of the pose.")]
         private TrackedPoseDriver.UpdateType updateType = TrackedPoseDriver.UpdateType.UpdateAndBeforeRender;

         /// <summary>
-        /// Specfies when (during Update and/or just before rendering) to update the tracking of the pose.
+        /// Specifies when (during Update and/or just before rendering) to update the tracking of the pose.
         /// </summary>
         public TrackedPoseDriver.UpdateType UpdateType => updateType;


Fixed the "Like", "Edit" and "Delete" button on the comments. Only the view has to be adjusted to look good! :)

--- Blog-GreenFluffyBites/Blog-GreenFluffyBites/Controllers/CommentController.cs
+++ Blog-GreenFluffyBites/Blog-GreenFluffyBites/Controllers/CommentController.cs
@@ -61,7 +61,7 @@
                     database.SaveChanges();
                     this.AddNotification("Comment edited.", NotificationType.INFO);

-                    return RedirectToAction("Details", "TextPost", new { id = comment.ArticleId });
+                    return RedirectToAction("Details", "Article", new { id = comment.ArticleId });
                 }
             }
             return View(model);
@@ -111,7 +111,7 @@
                 database.SaveChanges();
                 this.AddNotification("Comment deleted.", NotificationType.INFO);

-                return RedirectToAction("Details", "TextPost", new { id = comment.ArticleId });
+                return RedirectToAction("Details", "Article", new { id = comment.ArticleId });

             }
         }
@@ -141,7 +141,7 @@
                     this.AddNotification("Comment liked!", NotificationType.SUCCESS);

                 }
-                return RedirectToAction("Details", "TextPost", new { id = TextPostId });
+                return RedirectToAction("Details", "Article", new { id = TextPostId });
             }


Disabling a forms element will push the disabled state to the visual object.

--- Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.Shared/FrameworkElement.cs
+++ Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.Shared/FrameworkElement.cs
@@ -166,11 +166,19 @@
             set { Visual.Y = value; }
         }

+        bool isEnabled = true;
         public virtual bool IsEnabled
         {
-            get;
-            set;
-        } = true;
+            get => isEnabled;
+            set
+            {
+                if(isEnabled != value)
+                {
+                    isEnabled = value;
+                    Visual.Enabled = value;
+                }
+            }
+        }

         public bool IsMouseOver { get; set; }


Test happy path suggest use nameof when doing ResourceManager.GetObject. #55

--- Gu.Localization.Analyzers.Tests/GULOC02UseNameOfTests/HappyPath.cs
+++ Gu.Localization.Analyzers.Tests/GULOC02UseNameOfTests/HappyPath.cs
@@ -195,5 +195,149 @@
 }";
             AnalyzerAssert.Valid(Analyzer, ResourcesCode, TranslateCode, testCode);
         }
+
+        [Test]
+        public void ResourceManagerGetObjectNameofPropertyWithUsing()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    using RoslynSandbox.Properties;
+
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Resources.ResourceManager.GetObject(nameof(Resources.Key));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetObjectNameofPropertyFullyQualified()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Properties.Resources.ResourceManager.GetObject(nameof(Properties.Resources.Key));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetObjectWithCultureNameofPropertyWithUsing()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    using RoslynSandbox.Properties;
+
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Resources.ResourceManager.GetObject(nameof(Resources.Key), System.Globalization.CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetObjectWithCultureNameofPropertyFullyQualified()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Properties.Resources.ResourceManager.GetObject(nameof(Properties.Resources.Key), System.Globalization.CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetStringNameofPropertyWithUsing()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    using RoslynSandbox.Properties;
+
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Resources.ResourceManager.GetString(nameof(Resources.Key));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetStringNameofPropertyFullyQualified()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Properties.Resources.ResourceManager.GetString(nameof(Properties.Resources.Key));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetStringWithCultureNameofPropertyWithUsing()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    using RoslynSandbox.Properties;
+
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Resources.ResourceManager.GetString(nameof(Resources.Key), System.Globalization.CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
+
+        [Test]
+        public void ResourceManagerGetStringWithCultureNameofPropertyFullyQualified()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    public class Foo
+    {
+        public Foo()
+        {
+            var translate = Properties.Resources.ResourceManager.GetString(nameof(Properties.Resources.Key), System.Globalization.CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
+        }
     }
 }


update

update

--- CSharpGL/GLObjects/GLBuffers/DrawCommands/MultiDrawElementsCmd.cs
+++ CSharpGL/GLObjects/GLBuffers/DrawCommands/MultiDrawElementsCmd.cs
@@ -28,11 +28,7 @@
         /// </summary>
         public DrawMode Mode { get; set; }

-        /// <summary>
-        ///
-        /// </summary>
-        public int[] Count { get; private set; }
-
+        private int[] count;
         private Array allIndices;
         private IndexBufferElementType type;
         private int[] baseVertex;
@@ -91,7 +87,7 @@
         private MultiDrawElementsCmd(DrawMode mode, int[] count, IndexBufferElementType type, int[] baseVertex = null)
         {
             this.Mode = mode;
-            this.Count = count;
+            this.count = count;
             this.type = type;
             this.baseVertex = baseVertex;
         }
@@ -103,7 +99,7 @@
         {
             //GLBuffer.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, indexBuffer.BufferId);
             GCHandle pinAll = GCHandle.Alloc(this.allIndices, GCHandleType.Pinned);
-            var count = this.Count;
+            var count = this.count;
             var indices = new IntPtr[count.Length];
             int current = 0;
             for (int i = 0; i < indices.Length; i++)
@@ -115,11 +111,11 @@
             IntPtr header = pinIndices.AddrOfPinnedObject();
             if (this.baseVertex == null)
             {
-                glMultiDrawElements((uint)this.Mode, this.Count, (uint)this.type, header, this.Count.Length);
+                glMultiDrawElements((uint)this.Mode, this.count, (uint)this.type, header, this.count.Length);
             }
             else
             {
-                glMultiDrawElementsBaseVertex((uint)this.Mode, this.Count, (uint)this.type, header, this.Count.Length, this.baseVertex);
+                glMultiDrawElementsBaseVertex((uint)this.Mode, this.count, (uint)this.type, header, this.count.Length, this.baseVertex);
             }
             pinIndices.Free();
             pinAll.Free();


Implemented IL code for parametric curve type 2

--- ColorManager/Converter/ConversionCreator/ConversionCreator_ICC.cs
+++ ColorManager/Converter/ConversionCreator/ConversionCreator_ICC.cs
@@ -536,10 +536,8 @@
             else if (curve.IsGamma)
             {
                 //outColor[index] = Math.Pow(inColor[index], curve[0]);
-                WriteLdOutput();
-                WriteLdPtr(index);
-                WriteLdInput();
-                WriteLdPtr(index);
+                WriteLdOutput(index);
+                WriteLdInput(index);
                 CMIL.Emit(OpCodes.Ldind_R8);
                 CMIL.Emit(OpCodes.Ldc_R8, curve.CurveData[0]);
                 WriteCallPow();
@@ -548,12 +546,9 @@
             else
             {
                 //outColor[index] = curve[(int)((inColor[index] * curve.Length - 1) + 0.5)];
-                WriteLdOutput();
-                WriteLdPtr(index);
+                WriteLdOutput(index);
                 WriteLdICCData(DataPos);
-                WriteLdInput();
-                WriteLdPtr(index);
-
+                WriteLdInput(index);
                 CMIL.Emit(OpCodes.Ldind_R8);
                 CMIL.Emit(OpCodes.Ldc_R8, curve.CurveData.Length - 1d);
                 CMIL.Emit(OpCodes.Mul);
@@ -582,10 +577,8 @@
             else if (curve.IsGamma)
             {
                 //outColor[index] = Math.Pow(inColor[index], 1 / curve[0]);
-                WriteLdOutput();
-                WriteLdPtr(index);
-                WriteLdInput();
-                WriteLdPtr(index);
+                WriteLdOutput(index);
+                WriteLdInput(index);
                 CMIL.Emit(OpCodes.Ldind_R8);
                 CMIL.Emit(OpCodes.Ldc_R8, 1d / curve.CurveData[0]);
                 WriteCallPow();
@@ -634,8 +627,7 @@
                 WriteStloc(foundIndex);

                 //if (inColor[index] > curve[index])
-                WriteLdInput();
-                WriteLdPtr(index);
+                WriteLdInput(index);
                 CMIL.Emit(OpCodes.Ldind_R8);
                 WriteLdICCData(DataPos);
                 WriteLdloc(foundIndex);
@@ -667,8 +659,7 @@
                 CMIL.Emit(OpCodes.Bgt, whileStartLabel);

                 //outColor[index] = curve[foundIndex];
-                WriteLdOutput();
-                WriteLdPtr(index);
+                WriteLdOutput(index);
                 WriteLdICCData(DataPos);
                 WriteLdloc(foundIndex);
                 CMIL.Emit(OpCodes.Conv_I);
@@ -715,6 +706,8 @@
                 default:
                     throw new CorruptProfileException("ParametricCurve");
             }
+
+            ICCData.Add(new double[] { curve.g, curve.a, curve.b, curve.c, curve.d, curve.e, curve.f });
         }

         /// <summary>
@@ -747,25 +740,47 @@
                 default:
                     throw new CorruptProfileException("ParametricCurve");
             }
+
+            ICCData.Add(new double[] { curve.g, curve.a, curve.b, curve.c, curve.d, curve.e, curve.f });
         }

         #region Parametric Curve

+        /// <summary>
+        /// Parametric curve parameter array positions
+        /// </summary>
+        private enum PC_Pos
+        {
+            g = 0,
+            a = 1,
+            b = 2,
+            c = 3,
+            d = 4,
+            e = 5,
+            f = 6,
+        }
+
+        /// <summary>
+        /// Writes the IL code to load a specific parametric curve value
+        /// </summary>
+        /// <param name="value">The wanted value</param>
+        private void WriteLdPC(PC_Pos value)
+        {
+            WriteLdICCData(DataPos);
+            WriteLdPtr((int)value);
+        }
+
+
         private void WriteParametricCurve_Type0(ParametricCurve curve, int index)
         {
             //outColor[index] = Math.Pow(inColor[index], curve.g);
-
-            WriteLdOutput();
-            WriteLdPtr(index);
-            WriteLdInput();
-            WriteLdPtr(index);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);
+
+            WriteLdOutput(index);
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.g);
             WriteCallPow();
             CMIL.Emit(OpCodes.Stind_R8);
-
-            ICCData.Add(new double[] { curve.g });
         }

         private void WriteParametricCurve_Type1(ParametricCurve curve, int index)
@@ -777,80 +792,96 @@
             var elseLabel = CMIL.DefineLabel();

             //if (inColor[index] >= -curve.b / curve.a)
-            WriteLdInput();
-            WriteLdPtr(index);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(1);//curve.b
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.b);
             CMIL.Emit(OpCodes.Neg);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);//curve.a
+            WriteLdPC(PC_Pos.a);
             CMIL.Emit(OpCodes.Div);
             CMIL.Emit(OpCodes.Blt_Un, ifLabel);

             //outColor[index] = Math.Pow(curve.a * inColor[index] + curve.b, curve.g);
-            WriteLdOutput();
-            WriteLdPtr(index);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);//curve.a
-            WriteLdInput();
-            WriteLdPtr(index);
+            WriteLdOutput(index);
+            WriteLdPC(PC_Pos.a);
+            WriteLdInput(index);
             CMIL.Emit(OpCodes.Mul);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(1);//curve.b
+            WriteLdPC(PC_Pos.b);
             CMIL.Emit(OpCodes.Add);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(2);//curve.g
+            WriteLdPC(PC_Pos.g);
             WriteCallPow();
             CMIL.Emit(OpCodes.Stind_R8);
             CMIL.Emit(OpCodes.Br, elseLabel);

             //else outColor[index] = 0;
             CMIL.MarkLabel(ifLabel);
-            WriteLdOutput();
-            WriteLdPtr(index);
+            WriteLdOutput(index);
             CMIL.Emit(OpCodes.Ldc_R8, 0.0);
             CMIL.Emit(OpCodes.Stind_R8);
             CMIL.MarkLabel(elseLabel);
-
-            ICCData.Add(new double[] { curve.a, curve.b, curve.g });
         }

         private void WriteParametricCurve_Type2(ParametricCurve curve, int index)
         {
             //if (inColor[index] >= -curve.b / curve.a) outColor[index] = Math.Pow(curve.a * inColor[index] + curve.b, curve.g) + curve.c;
-            //else outColor[index] = curve.c;
+            //else outColor[index] = curve.c;
+
+            var ifLabel = CMIL.DefineLabel();
+            var elseLabel = CMIL.DefineLabel();
+
+            //if (inColor[index] >= -curve.b / curve.a)
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.b);
+            CMIL.Emit(OpCodes.Neg);
+            WriteLdPC(PC_Pos.a);
+            CMIL.Emit(OpCodes.Div);
+            CMIL.Emit(OpCodes.Blt_Un, ifLabel);
+
+            //outColor[index] = Math.Pow(curve.a * inColor[index] + curve.b, curve.g) + curve.c;
+            WriteLdOutput(index);
+            WriteLdPC(PC_Pos.a);
+            WriteLdInput(index);
+            CMIL.Emit(OpCodes.Mul);
+            WriteLdPC(PC_Pos.b);
+            CMIL.Emit(OpCodes.Add);
+            WriteLdPC(PC_Pos.g);
+            WriteCallPow();
+            WriteLdPC(PC_Pos.c);
+            CMIL.Emit(OpCodes.Add);
+            CMIL.Emit(OpCodes.Stind_R8);
+            CMIL.Emit(OpCodes.Br, elseLabel);
+
+            //else outColor[index] = curve.c;
+            CMIL.MarkLabel(ifLabel);
+            WriteLdOutput(index);
+            WriteLdPC(PC_Pos.c);
+            CMIL.Emit(OpCodes.Stind_R8);
+            CMIL.MarkLabel(elseLabel);
         }

         private void WriteParametricCurve_Type3(ParametricCurve curve, int index)
         {
             //if (inColor[index] >= curve.d) outColor[index] = Math.Pow(curve.a * inColor[index] + curve.b, curve.g);
-            //else outColor[index] = curve.c * inColor[index];
+            //else outColor[index] = curve.c * inColor[index];
         }

         private void WriteParametricCurve_Type4(ParametricCurve curve, int index)
         {
             //if (inColor[index] >= curve.d) outColor[index] = Math.Pow(curve.a * inColor[index] + curve.b, curve.g) + curve.c;
-            //else outColor[index] = curve.c * inColor[index] + curve.f;
+            //else outColor[index] = curve.c * inColor[index] + curve.f;
         }

         private void WriteParametricCurveInverted_Type0(ParametricCurve curve, int index)
         {
             //outColor[index] = Math.Pow(inColor[index], 1 / curve.g);
-
-            WriteLdOutput();
-            WriteLdPtr(index);
-            WriteLdInput();
-            WriteLdPtr(index);
+
+            WriteLdOutput(index);
+            WriteLdInput(index);
             CMIL.Emit(OpCodes.Ldind_R8);
             CMIL.Emit(OpCodes.Ldc_R8, 1.0);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);//curve.g
+            WriteLdPC(PC_Pos.g);
             CMIL.Emit(OpCodes.Div);
             WriteCallPow();
             CMIL.Emit(OpCodes.Stind_R8);
-
-            ICCData.Add(new double[] { curve.g });
         }

         private void WriteParametricCurveInverted_Type1(ParametricCurve curve, int index)
@@ -862,53 +893,74 @@
             var elseLabel = CMIL.DefineLabel();

             //if (inColor[index] >= -curve.b / curve.a)
-            WriteLdInput();
-            WriteLdPtr(index);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(1);//curve.b
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.b);
             CMIL.Emit(OpCodes.Neg);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);//curve.a
+            WriteLdPC(PC_Pos.a);
             CMIL.Emit(OpCodes.Div);
             CMIL.Emit(OpCodes.Blt_Un, ifLabel);

             //outColor[index] = (Math.Pow(curve.a, 1 / curve.g) - curve.b) / inColor[index];
-            WriteLdOutput();
-            WriteLdPtr(index);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(0);//curve.a
+            WriteLdOutput(index);
+            WriteLdPC(PC_Pos.a);
             CMIL.Emit(OpCodes.Ldc_R8, 1.0);
-            WriteLdICCData(DataPos);
-            WriteLdPtr(2);//curve.g
+            WriteLdPC(PC_Pos.g);
             CMIL.Emit(OpCodes.Div);
             WriteCallPow();
-
-            WriteLdICCData(DataPos);
-            WriteLdPtr(1);//curve.b
+            WriteLdPC(PC_Pos.b);
             CMIL.Emit(OpCodes.Sub);
-
-            WriteLdInput();
-            WriteLdPtr(index);
+            WriteLdInput(index);
             CMIL.Emit(OpCodes.Div);
             CMIL.Emit(OpCodes.Stind_R8);
-
             CMIL.Emit(OpCodes.Br, elseLabel);

             //else outColor[index] = 0;
             CMIL.MarkLabel(ifLabel);
-            WriteLdOutput();
-            WriteLdPtr(index);
+            WriteLdOutput(index);
             CMIL.Emit(OpCodes.Ldc_R8, 0.0);
             CMIL.Emit(OpCodes.Stind_R8);
             CMIL.MarkLabel(elseLabel);
-
-            ICCData.Add(new double[] { curve.a, curve.b, curve.g });
         }

         private void WriteParametricCurveInverted_Type2(ParametricCurve curve, int index)
         {
             //if (inColor[index] >= -curve.b / curve.a) outColor[index] = (Math.Pow(inColor[index] - curve.c, 1 / curve.g) - curve.b) / curve.a;
             //else outColor[index] = curve.c;
+
+            var ifLabel = CMIL.DefineLabel();
+            var elseLabel = CMIL.DefineLabel();
+
+            //if (inColor[index] >= -curve.b / curve.a)
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.b);
+            CMIL.Emit(OpCodes.Neg);
+            WriteLdPC(PC_Pos.a);
+            CMIL.Emit(OpCodes.Div);
+            CMIL.Emit(OpCodes.Blt_Un, ifLabel);
+
+            //outColor[index] = outColor[index] = (Math.Pow(inColor[index] - curve.c, 1 / curve.g) - curve.b) / curve.a;
+            WriteLdOutput(index);
+
+            WriteLdInput(index);
+            WriteLdPC(PC_Pos.c);
+            CMIL.Emit(OpCodes.Sub);
+            CMIL.Emit(OpCodes.Ldc_R8, 1.0);
+            WriteLdPC(PC_Pos.g);
+            CMIL.Emit(OpCodes.Div);
+            WriteCallPow();
+            WriteLdPC(PC_Pos.b);
+            CMIL.Emit(OpCodes.Sub);
+            WriteLdPC(PC_Pos.a);
+            CMIL.Emit(OpCodes.Div);
+            CMIL.Emit(OpCodes.Stind_R8);
+            CMIL.Emit(OpCodes.Br, elseLabel);
+
+            //else outColor[index] = 0;
+            CMIL.MarkLabel(ifLabel);
+            WriteLdOutput(index);
+            WriteLdPC(PC_Pos.c);
+            CMIL.Emit(OpCodes.Stind_R8);
+            CMIL.MarkLabel(elseLabel);
         }

         private void WriteParametricCurveInverted_Type3(ParametricCurve curve, int index)
@@ -1214,12 +1266,9 @@
         private void WriteLUT(int length, int index)
         {
             //outColor[index] = lut.Values[(int)((inColor[index] * lut.Length - 1) + 0.5)];
-            WriteLdOutput();
-            WriteLdPtr(index);
+            WriteLdOutput(index);
             WriteLdICCData(DataPos);
-            WriteLdInput();
-            WriteLdPtr(index);
-
+            WriteLdInput(index);
             CMIL.Emit(OpCodes.Ldind_R8);
             CMIL.Emit(OpCodes.Ldc_R8, length - 1d);
             CMIL.Emit(OpCodes.Mul);
@@ -1255,8 +1304,7 @@
             int c = lut.InputChannelCount;
             for (int i = 0; i < lut.InputChannelCount; i++, c--)
             {
-                WriteLdInput();
-                WriteLdPtr(i);
+                WriteLdInput(i);
                 CMIL.Emit(OpCodes.Ldind_R8);
                 CMIL.Emit(OpCodes.Ldc_R8, Math.Pow(lut.GridPointCount[i], c));
                 CMIL.Emit(OpCodes.Mul);
@@ -1270,8 +1318,7 @@

             for (int i = 0; i < lut.OutputChannelCount; i++)
             {
-                WriteLdOutput();
-                WriteLdPtr(i);
+                WriteLdOutput(i);
                 WriteLdICCData(DataPos + i);
                 WriteLdloc(idx);
                 CMIL.Emit(OpCodes.Conv_I);


More Auth manager tweaks

More Auth manager tweaks

--- Core/NakedObjects.Metamodel/Authorization/AuthorizationManager.cs
+++ Core/NakedObjects.Metamodel/Authorization/AuthorizationManager.cs
@@ -6,6 +6,7 @@
 // See the License for the specific language governing permissions and limitations under the License.

 using System;
+using System.Collections.Generic;
 using System.Collections.Immutable;
 using System.Linq;
 using System.Security.Principal;
@@ -22,11 +23,10 @@
     public class AuthorizationManager : IAuthorizationManager, IFacetDecorator {
         private readonly Type defaultAuthorizer;
         private readonly Type[] forFacetTypes = {typeof (IHideForSessionFacet), typeof (IDisableForSessionFacet)};
+        private readonly ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>> isEditableDelegates = ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>>.Empty;
+        private readonly ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>> isVisibleDelegates = ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>>.Empty;
         private readonly ImmutableDictionary<string, Type> namespaceAuthorizers = ImmutableDictionary<string, Type>.Empty;
         private readonly ImmutableDictionary<string, Type> typeAuthorizers = ImmutableDictionary<string, Type>.Empty;
-        private readonly ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>> isVisibleDelegates = ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>>.Empty;
-        private readonly ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>> isEditableDelegates = ImmutableDictionary<Type, Func<object, IPrincipal, object, string, bool>>.Empty;
-

         #region IAuthorizationManager Members

@@ -81,14 +81,29 @@

         public AuthorizationManager(IAuthorizationConfiguration authorizationConfiguration) {
             defaultAuthorizer = authorizationConfiguration.DefaultAuthorizer;
-            if (defaultAuthorizer == null) throw new InitialisationException("Default Authorizer cannot be null");
+            if (defaultAuthorizer == null) {
+                throw new InitialisationException("Default Authorizer cannot be null");
+            }
+
+            var isVisibleDict = new Dictionary<Type, Func<object, IPrincipal, object, string, bool>>() {
+                {defaultAuthorizer, DelegateUtils.CreateTypeAuthorizerDelegate(defaultAuthorizer.GetMethod("IsVisible"))}
+            };
+
+            var isEditableDict = new Dictionary<Type, Func<object, IPrincipal, object, string, bool>>() {
+                {defaultAuthorizer, DelegateUtils.CreateTypeAuthorizerDelegate(defaultAuthorizer.GetMethod("IsEditable"))}
+            };
+
             if (authorizationConfiguration.NamespaceAuthorizers.Any()) {
                 namespaceAuthorizers = authorizationConfiguration.NamespaceAuthorizers.ToImmutableDictionary();
             }
             if (authorizationConfiguration.TypeAuthorizers.Any()) {
+                if (authorizationConfiguration.TypeAuthorizers.Values.Any(t => typeof (ITypeAuthorizer<object>).IsAssignableFrom(t))) {
+                    throw new InitialisationException("Only Default Authorizer can be ITypeAuthorizer<object>");
+                }
+
                 typeAuthorizers = authorizationConfiguration.TypeAuthorizers.ToImmutableDictionary();
-                isVisibleDelegates = authorizationConfiguration.TypeAuthorizers.Values.ToDictionary(type => type, type => DelegateUtils.CreateTypeAuthorizerDelegate(type.GetMethod("IsVisible"))).ToImmutableDictionary();
-                isEditableDelegates = authorizationConfiguration.TypeAuthorizers.Values.ToDictionary(type => type, type => DelegateUtils.CreateTypeAuthorizerDelegate(type.GetMethod("IsEditable"))).ToImmutableDictionary();
+                isVisibleDelegates = isVisibleDict.Union(authorizationConfiguration.TypeAuthorizers.Values.ToDictionary(type => type, type => DelegateUtils.CreateTypeAuthorizerDelegate(type.GetMethod("IsVisible")))).ToImmutableDictionary();
+                isEditableDelegates = isEditableDict.Union(authorizationConfiguration.TypeAuthorizers.Values.ToDictionary(type => type, type => DelegateUtils.CreateTypeAuthorizerDelegate(type.GetMethod("IsEditable")))).ToImmutableDictionary();
             }
         }


* Reverted to Cache instead of using directly the static BlobCache

--- Ets.Mobile/Ets.Mobile.ViewModel/Pages/Main/MainViewModel.Grade.cs
+++ Ets.Mobile/Ets.Mobile.ViewModel/Pages/Main/MainViewModel.Grade.cs
@@ -40,7 +40,7 @@

             LoadGrades = ReactiveDeferedCommand.CreateAsyncObservable(() =>
             {
-                return BlobCache.UserAccount.GetAndFetchLatest(ViewModelKeys.Courses, async () =>
+                return Cache.GetAndFetchLatest(ViewModelKeys.Courses, async () =>
                 {
                     var courses = await ClientServices().SignetsService.Courses();
                     foreach(var course in courses.Where(x => x.Semester != "s.o.")


Don't ignore space after elided subexpression

--- ExpressionToCodeLib/Internal/SubExpressionPerLineCodeAnnotator.cs
+++ ExpressionToCodeLib/Internal/SubExpressionPerLineCodeAnnotator.cs
@@ -82,6 +82,7 @@
                     foreach (var kid in node.Children) {
                         if (kid.IsConceptualChild && unfoldToDepth == 0) {
                             sb.Append("...");
+                            ignoreInitialSpace = false;
                         } else {
                             AppendNodeWithLimitedDepth(sb, kid, ref ignoreInitialSpace, unfoldToDepth - (kid.IsConceptualChild ? 1 : 0));
                         }


Added StrippedText property to DialogTree

--- FRBDK/Glue/DialogTreePlugin/Generators/RootObjectCodeGenerator.cs
+++ FRBDK/Glue/DialogTreePlugin/Generators/RootObjectCodeGenerator.cs
@@ -59,6 +59,24 @@
         public class Passage
         {
             public string text { get; set; }
+
+            public string StrippedText
+            {
+                get
+                {
+                    if(text.Contains(""\n[[""))
+                    {
+                        var index = text.IndexOf(""\n[["");
+
+                        return text.Substring(0, index);
+                    }
+                    else
+                    {
+                        return text;
+                    }
+                }
+            }
+
             public Link[] links { get; set; }
             public string name { get; set; }
             public string pid { get; set; }


Bumped to Version 1.2.0

Bumped to Version 1.2.0

--- src/SharedAssemblyInfo.cs
+++ src/SharedAssemblyInfo.cs
@@ -6,5 +6,5 @@
 [assembly: AssemblyCopyright("Copyright  Stefan Ossendorf 2014")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.1.0.0")]
-[assembly: AssemblyFileVersion("1.1.0.0")]+[assembly: AssemblyVersion("1.2.0")]
+[assembly: AssemblyFileVersion("1.2.0")]


Stub in a delete method.

Stub in a delete method.

--- src/SparkPost/Webhooks.cs
+++ src/SparkPost/Webhooks.cs
@@ -12,6 +12,7 @@
     {
         Task<ListWebhookResponse> List(object query = null);
         Task<Response> Create(Webhook webhook);
+        Task<bool> Delete(string id);
     }

     public class Webhooks : IWebhooks
@@ -59,5 +60,17 @@
             LeftRight.SetValuesToMatch(updateSuppressionResponse, response);
             return updateSuppressionResponse;
         }
+
+        public async Task<bool> Delete(string id)
+        {
+            var request = new Request
+            {
+                Url = $"/api/{client.Version}/webhooks/{id}",
+                Method = "DELETE"
+            };
+
+            var response = await requestSender.Send(request);
+            return response.StatusCode == HttpStatusCode.NoContent;
+        }
     }
 }


#548 Debugger retry logic continues attempting to connect even though the user has already forcefully closed the process

--- Nodejs/Product/Nodejs/Debugger/Communication/DebuggerConnection.cs
+++ Nodejs/Product/Nodejs/Debugger/Communication/DebuggerConnection.cs
@@ -36,7 +36,8 @@
         private readonly INetworkClientFactory _networkClientFactory;
         private INetworkClient _networkClient;
         private readonly object _networkClientLock = new object();
-        private volatile Version _nodeVersion;
+        private volatile Version _nodeVersion;
+        private bool _isClosed = false;

         public DebuggerConnection(INetworkClientFactory networkClientFactory) {
             Utilities.ArgumentNotNull("networkClientFactory", networkClientFactory);
@@ -51,8 +52,10 @@
         /// <summary>
         /// Close connection.
         /// </summary>
-        public void Close() {
-            lock (_networkClientLock) {
+        public void Close() {
+            _isClosed = true;
+
+            lock (_networkClientLock) {
                 if (_networkClient != null) {
                     _networkClient.Dispose();
                     _networkClient = null;
@@ -119,7 +122,7 @@
             lock (_networkClientLock) {
                 int connection_attempts = 0;
                 const int MAX_ATTEMPTS = 5;
-                while (true) {
+                while (!_isClosed) {
                     connection_attempts++;
                     try {
                         // TODO: This currently results in a call to the synchronous TcpClient


code maid clean

code maid clean

--- MatterControlLib/DesignTools/EditorTools/ScaleControls/ScaleHeightControl.cs
+++ MatterControlLib/DesignTools/EditorTools/ScaleControls/ScaleHeightControl.cs
@@ -27,7 +27,6 @@
 either expressed or implied, of the FreeBSD Project.
 */

-using System.Collections.Generic;
 using MatterHackers.Agg;
 using MatterHackers.Agg.UI;
 using MatterHackers.DataConverters3D;
@@ -41,26 +40,31 @@
 using MatterHackers.RayTracer;
 using MatterHackers.RenderOpenGl;
 using MatterHackers.VectorMath;
+using System.Collections.Generic;

 namespace MatterHackers.Plugins.EditorTools
 {
 	public class ScaleHeightControl : Object3DControl
 	{
+		private readonly double arrowSize = 7 * GuiWidget.DeviceScale;
+
+		private readonly InlineEditControl heightValueDisplayInfo;
+
+		private readonly ThemeConfig theme;
+
+		private readonly Mesh topScaleMesh;
+
 		private IObject3D activeSelectedItem;
+
+		private bool hadClickOnControl;
+
+		private double heightOnMouseDown = 0;
+
 		private PlaneShape hitPlane;
+
 		private Vector3 initialHitPosition;
-		private readonly Mesh topScaleMesh;
-		private double heightOnMouseDown = 0;
-
-		private double DistToStart => 5 * GuiWidget.DeviceScale;
-
-		private double LineLength => 55 * GuiWidget.DeviceScale;

 		private Vector3 originalPointToMove;
-		private readonly double arrowSize = 7 * GuiWidget.DeviceScale;
-		private readonly ThemeConfig theme;
-		private readonly InlineEditControl heightValueDisplayInfo;
-		private bool hadClickOnControl;

 		public ScaleHeightControl(IObject3DControlContext context)
 			: base(context)
@@ -129,6 +133,37 @@
 			Object3DControlContext.GuiSurface.BeforeDraw += Object3DControl_BeforeDraw;
 		}

+		private double DistToStart => 5 * GuiWidget.DeviceScale;
+
+		private double LineLength => 55 * GuiWidget.DeviceScale;
+
+		public override void CancelOperation()
+		{
+			IObject3D selectedItem = RootSelection;
+			if (selectedItem != null
+				&& MouseDownOnControl)
+			{
+				if (activeSelectedItem is IObjectWithHeight heightObject)
+				{
+					heightObject.Height = heightOnMouseDown;
+				}
+
+				MouseDownOnControl = false;
+				MouseIsOver = false;
+
+				Object3DControlContext.Scene.DrawSelection = true;
+				Object3DControlContext.Scene.ShowSelectionShadow = true;
+			}
+
+			base.CancelOperation();
+		}
+
+		public override void Dispose()
+		{
+			heightValueDisplayInfo.Close();
+			Object3DControlContext.GuiSurface.BeforeDraw -= Object3DControl_BeforeDraw;
+		}
+
 		public override void Draw(DrawGlContentEventArgs e)
 		{
 			bool shouldDrawScaleControls = true;
@@ -186,6 +221,15 @@
 			base.Draw(e);
 		}

+		public Vector3 GetBottomPosition(IObject3D selectedItem)
+		{
+			var meshBounds = selectedItem.GetAxisAlignedBoundingBox(selectedItem.Matrix.Inverted);
+			var bottom = new Vector3(meshBounds.Center.X, meshBounds.Center.Y, meshBounds.MinXYZ.Z);
+
+			var worldBottom = bottom.Transform(selectedItem.Matrix);
+			return worldBottom;
+		}
+
 		public Vector3 GetTopPosition(IObject3D selectedItem)
 		{
 			var meshBounds = selectedItem.GetAxisAlignedBoundingBox(selectedItem.Matrix.Inverted);
@@ -195,18 +239,11 @@
 			return worldTop;
 		}

-		public Vector3 GetBottomPosition(IObject3D selectedItem)
-		{
-			var meshBounds = selectedItem.GetAxisAlignedBoundingBox(selectedItem.Matrix.Inverted);
-			var bottom = new Vector3(meshBounds.Center.X, meshBounds.Center.Y, meshBounds.MinXYZ.Z);
-
-			var worldBottom = bottom.Transform(selectedItem.Matrix);
-			return worldBottom;
-		}
-
 		public override void OnMouseDown(Mouse3DEventArgs mouseEvent3D)
 		{
-			if (mouseEvent3D.info != null && Object3DControlContext.Scene.SelectedItem != null)
+			if (mouseEvent3D.info != null
+				&& mouseEvent3D.MouseEvent2D.Button == MouseButtons.Left
+				&& Object3DControlContext.Scene.SelectedItem != null)
 			{
 				hadClickOnControl = true;
 				activeSelectedItem = RootSelection;
@@ -313,6 +350,75 @@
 			base.OnMouseUp(mouseEvent3D);
 		}

+		public override void SetPosition(IObject3D selectedItem, MeshSelectInfo selectInfo)
+		{
+			var topPosition = GetTopPosition(selectedItem);
+			double distBetweenPixelsWorldSpace = Object3DControlContext.World.GetWorldUnitsPerScreenPixelAtPosition(topPosition);
+
+			Vector3 arrowCenter = topPosition;
+			arrowCenter.Z += arrowSize / 2 * distBetweenPixelsWorldSpace;
+
+			var centerMatrix = Matrix4X4.CreateTranslation(arrowCenter);
+			centerMatrix = Matrix4X4.CreateScale(distBetweenPixelsWorldSpace) * centerMatrix;
+			TotalTransform = centerMatrix;
+		}
+
+		private void Object3DControl_BeforeDraw(object sender, DrawEventArgs drawEvent)
+		{
+			var selectedItem = RootSelection;
+
+			if (selectedItem != null)
+			{
+				if (heightValueDisplayInfo.Visible)
+				{
+					var topPosition = GetTopPosition(selectedItem);
+					double distBetweenPixelsWorldSpace = Object3DControlContext.World.GetWorldUnitsPerScreenPixelAtPosition(topPosition);
+					var topScreen = Object3DControlContext.World.GetScreenPosition(topPosition + new Vector3(DistToStart * distBetweenPixelsWorldSpace, 0, 0));
+
+					var bottomPosition = GetBottomPosition(selectedItem);
+					var bottomScreen = Object3DControlContext.World.GetScreenPosition(bottomPosition + new Vector3(DistToStart * distBetweenPixelsWorldSpace, 0, 0));
+
+					var perpRight = (topScreen - bottomScreen).GetPerpendicularRight().GetNormal() * LineLength;
+					if (perpRight.X < 0)
+					{
+						perpRight = -perpRight;
+					}
+
+					var lines = new List<Vector2>();
+					// left lines
+					lines.Add(topScreen);
+					lines.Add(topScreen + perpRight);
+
+					lines.Add(bottomScreen);
+					lines.Add(bottomScreen + perpRight);
+
+					for (int i = 0; i < lines.Count; i += 2)
+					{
+						// draw the measure line
+						drawEvent.Graphics2D.Line(lines[i], lines[i + 1], theme.TextColor);
+					}
+
+					for (int i = 0; i < lines.Count; i += 4)
+					{
+						drawEvent.Graphics2D.DrawMeasureLine((lines[i] + lines[i + 1]) / 2,
+							(lines[i + 2] + lines[i + 3]) / 2,
+							LineArrows.Both,
+							theme);
+					}
+
+					int j = 0;
+
+					Vector2 heightDisplayCenter = (((lines[j] + lines[j + 1]) / 2) + ((lines[j + 2] + lines[j + 3]) / 2)) / 2;
+					if (activeSelectedItem is IObjectWithHeight heightObject)
+					{
+						heightValueDisplayInfo.Value = heightObject.Height;
+					}
+
+					heightValueDisplayInfo.OriginRelativeParent = heightDisplayCenter + new Vector2(10, -heightValueDisplayInfo.LocalBounds.Center.Y);
+				}
+			}
+		}
+
 		private void SetHeightUndo(double doHeight, double undoHeight)
 		{
 			if (activeSelectedItem is IObjectWithHeight heightObject)
@@ -330,101 +436,5 @@
 				}));
 			}
 		}
-
-		public override void CancelOperation()
-		{
-			IObject3D selectedItem = RootSelection;
-			if (selectedItem != null
-				&& MouseDownOnControl)
-			{
-				if (activeSelectedItem is IObjectWithHeight heightObject)
-				{
-					heightObject.Height = heightOnMouseDown;
-				}
-
-				MouseDownOnControl = false;
-				MouseIsOver = false;
-
-				Object3DControlContext.Scene.DrawSelection = true;
-				Object3DControlContext.Scene.ShowSelectionShadow = true;
-			}
-
-			base.CancelOperation();
-		}
-
-		public override void SetPosition(IObject3D selectedItem, MeshSelectInfo selectInfo)
-		{
-			var topPosition = GetTopPosition(selectedItem);
-			double distBetweenPixelsWorldSpace = Object3DControlContext.World.GetWorldUnitsPerScreenPixelAtPosition(topPosition);
-
-			Vector3 arrowCenter = topPosition;
-			arrowCenter.Z += arrowSize / 2 * distBetweenPixelsWorldSpace;
-
-			var centerMatrix = Matrix4X4.CreateTranslation(arrowCenter);
-			centerMatrix = Matrix4X4.CreateScale(distBetweenPixelsWorldSpace) * centerMatrix;
-			TotalTransform = centerMatrix;
-		}
-
-		private void Object3DControl_BeforeDraw(object sender, DrawEventArgs drawEvent)
-		{
-			var selectedItem = RootSelection;
-
-			if (selectedItem != null)
-			{
-				if (heightValueDisplayInfo.Visible)
-				{
-					var topPosition = GetTopPosition(selectedItem);
-					double distBetweenPixelsWorldSpace = Object3DControlContext.World.GetWorldUnitsPerScreenPixelAtPosition(topPosition);
-					var topScreen = Object3DControlContext.World.GetScreenPosition(topPosition + new Vector3(DistToStart * distBetweenPixelsWorldSpace, 0, 0));
-
-					var bottomPosition = GetBottomPosition(selectedItem);
-					var bottomScreen = Object3DControlContext.World.GetScreenPosition(bottomPosition + new Vector3(DistToStart * distBetweenPixelsWorldSpace, 0, 0));
-
-					var perpRight = (topScreen - bottomScreen).GetPerpendicularRight().GetNormal() * LineLength;
-					if (perpRight.X < 0)
-					{
-						perpRight = -perpRight;
-					}
-
-					var lines = new List<Vector2>();
-					// left lines
-					lines.Add(topScreen);
-					lines.Add(topScreen + perpRight);
-
-					lines.Add(bottomScreen);
-					lines.Add(bottomScreen + perpRight);
-
-					for (int i = 0; i < lines.Count; i += 2)
-					{
-						// draw the measure line
-						drawEvent.Graphics2D.Line(lines[i], lines[i + 1], theme.TextColor);
-					}
-
-					for (int i = 0; i < lines.Count; i += 4)
-					{
-						drawEvent.Graphics2D.DrawMeasureLine((lines[i] + lines[i + 1]) / 2,
-							(lines[i + 2] + lines[i + 3]) / 2,
-							LineArrows.Both,
-							theme);
-					}
-
-					int j = 0;
-
-					Vector2 heightDisplayCenter = (((lines[j] + lines[j + 1]) / 2) + ((lines[j + 2] + lines[j + 3]) / 2)) / 2;
-					if (activeSelectedItem is IObjectWithHeight heightObject)
-					{
-						heightValueDisplayInfo.Value = heightObject.Height;
-					}
-
-					heightValueDisplayInfo.OriginRelativeParent = heightDisplayCenter + new Vector2(10, -heightValueDisplayInfo.LocalBounds.Center.Y);
-				}
-			}
-		}
-
-		public override void Dispose()
-		{
-			heightValueDisplayInfo.Close();
-			Object3DControlContext.GuiSurface.BeforeDraw -= Object3DControl_BeforeDraw;
-		}
 	}
 }


[Nodes] Fix SetSlice not building slice targets

--- Nodes/VVVV.DX11.Nodes/Nodes/Textures/Array/TextureArraySetSlice.cs
+++ Nodes/VVVV.DX11.Nodes/Nodes/Textures/Array/TextureArraySetSlice.cs
@@ -38,7 +38,7 @@
         {
             format = format == SlimDX.DXGI.Format.Unknown ? texture.Format : format;
             this.rtarr.Dispose();
-            this.rtarr = new DX11RenderTextureArray(this.context, w, h, d, format, false, 1);
+            this.rtarr = new DX11RenderTextureArray(this.context, w, h, d, format, true, 1);
         }

         public void Apply(DX11Texture2D texture, int w, int h, int d, SlimDX.DXGI.Format format, int slice)
@@ -56,7 +56,7 @@

             if (this.rtarr == null)
             {
-                this.rtarr = new DX11RenderTextureArray(this.context, w, h, d, format, false, 1);
+                this.rtarr = new DX11RenderTextureArray(this.context, w, h, d, format, true, 1);
             }

             this.shader.SelectTechnique("Render");


fix aa resolve

fix aa resolve

--- Nodes/VVVV.DX11.Nodes/Nodes/Renderers/Graphics/DX11TempTargetRendererNode.cs
+++ Nodes/VVVV.DX11.Nodes/Nodes/Renderers/Graphics/DX11TempTargetRendererNode.cs
@@ -97,7 +97,8 @@

             TexInfo ti = this.rtm.GetRenderTarget(context);

-            if (ti.w != this.width || ti.h != this.height || !this.targets.ContainsKey(context))
+            if (ti.w != this.width || ti.h != this.height || !this.targets.ContainsKey(context) || this.FInAASamplesPerPixel.IsChanged
+                || this.FInAAQuality.IsChanged)
             {
                 this.width = ti.w;
                 this.height = ti.h;
@@ -120,7 +121,7 @@
                 if (aacount > 1)
                 {
                     DX11RenderTarget2D temptarget = context.ResourcePool.LockRenderTarget(this.width, this.height, ti.format, new SampleDescription(aacount,aaquality), this.FInDoMipMaps[0], this.FInMipLevel[0]).Element;
-                    DX11RenderTarget2D temptargetresolve = context.ResourcePool.LockRenderTarget(this.width, this.height, ti.format, new SampleDescription(aacount, aaquality), this.FInDoMipMaps[0], this.FInMipLevel[0]).Element;
+                    DX11RenderTarget2D temptargetresolve = context.ResourcePool.LockRenderTarget(this.width, this.height, ti.format, new SampleDescription(1, 0), this.FInDoMipMaps[0], this.FInMipLevel[0]).Element;

                     targets[context] = temptarget;
                     targetresolve[context] = temptargetresolve;


Fix GValue as a value type, thanks to a patch from Peter Johanson

2004-04-29  Larry Ewing  <lewing@ximian.com>

	* src/TagSelectionWidget.cs: Fix GValue as a value type, thanks to
	a patch from Peter Johanson <latexer@gentoo.org>.

2004-04-09  Larry Ewing  <lewing@ximian.com>

	* src/ImageView.cs: fixup constructor.

--- src/TagSelectionWidget.cs
+++ src/TagSelectionWidget.cs
@@ -107,7 +107,7 @@
 		foreach (TreePath path in rows) {
 			GLib.Value value = new GLib.Value ();
 			Model.GetIter (out iter, path);
-			Model.GetValue (iter, 0, value);
+			Model.GetValue (iter, 0, ref value);
 			uint tag_id = (uint) value;
 			tags[i] = tag_store.Get (tag_id) as Tag;
 			i++;
@@ -141,7 +141,7 @@
 		Model.GetIter (out iter, path);

 		GLib.Value value = new GLib.Value ();
-		Model.GetValue (iter, 0, value);
+		Model.GetValue (iter, 0, ref value);
 		uint tag_id = (uint) value;
 		Tag tag = tag_store.Get (tag_id) as Tag;

@@ -183,7 +183,7 @@
 				       TreeIter iter)
 	{
 		GLib.Value value = new GLib.Value ();
-		Model.GetValue (iter, 0, value);
+		Model.GetValue (iter, 0, ref value);
 		uint tag_id = (uint) value;
 		Tag tag = tag_store.Get (tag_id) as Tag;

@@ -197,7 +197,7 @@
 				   TreeIter iter)
 	{
 		GLib.Value value = new GLib.Value ();
-		Model.GetValue (iter, 0, value);
+		Model.GetValue (iter, 0, ref value);
 		uint tag_id = (uint) value;
 		Tag tag = tag_store.Get (tag_id) as Tag;

@@ -220,7 +220,7 @@
 			return;

 		GLib.Value value = new GLib.Value ();
-		Model.GetValue (iter, 0, value);
+		Model.GetValue (iter, 0, ref value);
 		uint tag_id = (uint) value;

 		Tag tag = tag_store.Get (tag_id) as Tag;


revert

revert

--- OfficeDevPnP.Core/OfficeDevPnP.Core/AppModelExtensions/BrandingExtensions.cs
+++ OfficeDevPnP.Core/OfficeDevPnP.Core/AppModelExtensions/BrandingExtensions.cs
@@ -961,7 +961,7 @@
         /// <param name="web"></param>
         public static void SetSiteToInheritPageLayouts(this Web web)
         {
-            web.SetPropertyBagValue(DefaultPageLayout, Inherit);
+            web.SetPropertyBagValue(DefaultPageLayout, Inherit);
         }

         public static void SetAvailablePageLayouts(this Web web, Web rootWeb, IEnumerable<string> pageLayouts)


Make atachment state load work again

Make atachment state load work again

--- OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -363,7 +363,7 @@
                     // inventory right now.
                     SceneObjectGroup objatt
                         = RezSingleAttachmentFromInventoryInternal(
-                        sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, attachmentPt, true, null);
+                        sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, attachmentPt, true, d);

                     if (ThrottlePer100PrimsRezzed > 0)


Implemented #59

Implemented #59

--- src/dotnetplugins/Bari.Plugins.VsCore/cs/Tools/MSBuild.cs
+++ src/dotnetplugins/Bari.Plugins.VsCore/cs/Tools/MSBuild.cs
@@ -37,7 +37,7 @@
             if (localRoot != null)
             {
                 var absPath = Path.Combine(localRoot.AbsolutePath, relativePath);
-                if (!Run(root, (Path.GetFileName(absPath) ?? String.Empty), "/nologo", "/verbosity:" + Verbosity, "/consoleloggerparameters:" + ConsoleLoggerParameters))
+                if (!Run(root, (Path.GetFileName(absPath) ?? String.Empty), "/m", "/nologo", "/verbosity:" + Verbosity, "/consoleloggerparameters:" + ConsoleLoggerParameters))
                     throw new MSBuildFailedException();
             }
             else


Small fix to TaskCompletionSource.

Small fix to TaskCompletionSource.

--- ActorHelpers/ActorTaskCompletionSource.cs
+++ ActorHelpers/ActorTaskCompletionSource.cs
@@ -23,8 +23,7 @@
                     (TaskCompletionSourceHelper.Msg)
                         runtime.CurrentMailbox().Receive();

-                if(res.state == TaskStatus.Canceled)
-                    throw new TaskCanceledException();
+                runtime.CancelSelf();

                 return (T) res.result;
             });


Fixed key cloning in razer chroma layer

Fixed key cloning in razer chroma layer

--- Project-Aurora/Project-Aurora/Settings/Layers/RazerLayerHandler.cs
+++ Project-Aurora/Project-Aurora/Settings/Layers/RazerLayerHandler.cs
@@ -165,27 +165,36 @@

             foreach (var key in (DeviceKeys[])Enum.GetValues(typeof(DeviceKeys)))
             {
-                Color color;
-                if (RazerLayoutMap.GenericKeyboard.TryGetValue(key, out var position))
-                    color = _keyboardColors[position[1] + position[0] * 22];
-                else if (key >= DeviceKeys.MOUSEPADLIGHT1 && key <= DeviceKeys.MOUSEPADLIGHT15)
-                    color = _mousepadColors[DeviceKeys.MOUSEPADLIGHT15 - key];
-                else if (key == DeviceKeys.Peripheral)
-                    color = _mouseColor;
-                else
+                if (!TryGetColor(key, out Color color))
                     continue;
-
-                if (Properties.ColorPostProcessEnabled)
-                    color = PostProcessColor(color);
-
+
                 layer.Set(key, color);
-
-                if (Properties.KeyCloneMap != null)
-                    foreach (var target in Properties.KeyCloneMap.Where(x => x.Value == key).Select(x => x.Key))
-                        layer.Set(target, color);
-            }
+            }
+
+            if (Properties.KeyCloneMap != null)
+                foreach (var target in Properties.KeyCloneMap)
+                    if(TryGetColor(target.Value, out var clr))
+                        layer.Set(target.Key, clr);

             return layer;
+        }
+
+        private bool TryGetColor(DeviceKeys key, out Color color)
+        {
+            color = Color.Transparent;
+            if (RazerLayoutMap.GenericKeyboard.TryGetValue(key, out var position))
+                color = _keyboardColors[position[1] + position[0] * 22];
+            else if (key >= DeviceKeys.MOUSEPADLIGHT1 && key <= DeviceKeys.MOUSEPADLIGHT15)
+                color = _mousepadColors[DeviceKeys.MOUSEPADLIGHT15 - key];
+            else if (key == DeviceKeys.Peripheral)
+                color = _mouseColor;
+            else
+                return false;
+
+            if (Properties.ColorPostProcessEnabled)
+                color = PostProcessColor(color);
+
+            return true;
         }

         private bool IsCurrentAppValid()


Fix build issue in XkbKeyboardAdapterTests

--- SIL.WritingSystems.WindowsForms.Tests/Keyboarding/XkbKeyboardAdapterTests.cs
+++ SIL.WritingSystems.WindowsForms.Tests/Keyboarding/XkbKeyboardAdapterTests.cs
@@ -376,7 +376,8 @@
 		{
 			XklEngineResponder.SetGroupNames = new string[] { KeyboardUSA };

-			KeyboardController.Initialize(new XkbKeyboardAdaptor(new XklEngineResponder()));
+			var adaptor = new XkbKeyboardAdaptor(new XklEngineResponder());
+			KeyboardController.Initialize(adaptor);
 			adaptor.ActivateKeyboard(KeyboardController.Instance.Keyboards.First());
 			KeyboardController.Shutdown();
 		}
@@ -389,11 +390,13 @@
 		{
 			XklEngineResponder.SetGroupNames = new string[] { KeyboardUSA };

-			KeyboardController.Initialize(new XkbKeyboardAdaptor(new XklEngineResponder()));
+			var adaptor = new XkbKeyboardAdaptor(new XklEngineResponder());
+			KeyboardController.Initialize(adaptor);
 			adaptor.ActivateKeyboard(KeyboardController.Instance.Keyboards.First());
 			KeyboardController.Shutdown();

-			KeyboardController.Initialize(new XkbKeyboardAdaptor(new XklEngineResponder()));
+			adaptor = new XkbKeyboardAdaptor(new XklEngineResponder());
+			KeyboardController.Initialize(adaptor);
 			adaptor.ActivateKeyboard(KeyboardController.Instance.Keyboards.First());
 			KeyboardController.Shutdown();
 		}


Rank A: Alectryon name fix

Rank A: Alectryon name fix


Optimize the old th algorithm of China ID Validation.

--- Masuit.Tools.Abstractions/Extensions/BaseType/StringExtensions.cs
+++ Masuit.Tools.Abstractions/Extensions/BaseType/StringExtensions.cs
@@ -1,8 +1,9 @@
-using DnsClient;
+using DnsClient;
 using Masuit.Tools.Strings;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Globalization;
 using System.Linq;
 using System.Net;
 using System.Net.Sockets;
@@ -247,57 +248,93 @@
         /// <returns>是否匹配成功</returns>
         public static bool MatchIdentifyCard(this string s)
         {
-            string address = "11x22x35x44x53x12x23x36x45x54x13x31x37x46x61x14x32x41x50x62x15x33x42x51x63x21x34x43x52x64x65x71x81x82x91";
-            if (s.Length == 18)
-            {
-                if (long.TryParse(s.Remove(17), out var n) == false || n < Math.Pow(10, 16) || long.TryParse(s.Replace('x', '0').Replace('X', '0'), out n) == false)
-                {
-                    return false; //数字验证
-                }
-
-                if (address.IndexOf(s.Remove(2), StringComparison.Ordinal) == -1)
-                {
-                    return false; //省份验证
-                }
-
-                string birth = s.Substring(6, 8).Insert(6, "-").Insert(4, "-");
-                if (!DateTime.TryParse(birth, out _))
-                {
-                    return false; //生日验证
-                }
-
-                string[] arrVarifyCode = ("1,0,x,9,8,7,6,5,4,3,2").Split(',');
-                string[] wi = ("7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2").Split(',');
-                char[] ai = s.Remove(17).ToCharArray();
-                int sum = 0;
-                for (int i = 0; i < 17; i++)
-                {
-                    sum += wi[i].ToInt32() * ai[i].ToString().ToInt32();
-                }
-
-                Math.DivRem(sum, 11, out var y);
-                return arrVarifyCode[y] == s.Substring(17, 1).ToLower();
-            }
-
-            if (s.Length == 15)
-            {
-                if (long.TryParse(s, out var n) == false || n < Math.Pow(10, 14))
-                {
-                    return false; //数字验证
-                }
-
-                if (address.IndexOf(s.Remove(2), StringComparison.Ordinal) == -1)
-                {
-                    return false; //省份验证
-                }
-
-                string birth = s.Substring(6, 6).Insert(4, "-").Insert(2, "-");
-                return DateTime.TryParse(birth, out _);
-            }
-
-            return false;
-        }
-
+            string ID = s;
+            switch (ID.Length)
+            {
+                case 18:
+                    return CheckChinaID18(ID);
+                case 15:
+                    return CheckChinaID15(ID);
+                default:
+                    return false;
+            }
+        }
+        private static readonly string[] ChinaIDProvinceCodes = {
+             "11", "12", "13", "14", "15",
+             "21", "22", "23",
+             "31", "32", "33", "34", "35", "36", "37",
+             "41", "42", "43", "44", "45", "46",
+             "50", "51", "52", "53", "54",
+             "61", "62", "63", "64", "65",
+             "71",
+             "81", "82",
+             "91"
+        };
+        private static bool CheckChinaID18(string ID)
+        {
+            ID = ID.ToUpper();
+            Match m = Regex.Match(ID, @"\d{17}[\dX]", RegexOptions.IgnoreCase);
+            if (!m.Success)
+            {
+                return false;
+            }
+            if (!ChinaIDProvinceCodes.Contains(ID.Substring(0, 2)))
+            {
+                return false;
+            }
+            CultureInfo zhCN = new CultureInfo("zh-CN", true);
+            DateTime birthday;
+            if (!DateTime.TryParseExact(ID.Substring(6, 8), "yyyyMMdd", zhCN, DateTimeStyles.None, out birthday))
+            {
+                return false;
+            }
+            DateTime dateStart = new DateTime(1800, 1, 1);
+            DateTime dateEnd = DateTime.Today;
+            if (birthday < dateStart || dateEnd < birthday)
+            {
+                return false;
+            }
+            int[] factors = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
+            int sum = 0;
+            for (int i = 0; i < 17; i++)
+            {
+                sum += (ID[i] - '0') * factors[i];
+            }
+            int n = (12 - (sum % 11)) % 11;
+            if (n < 10)
+            {
+                return (ID[17] - '0') == n;
+            }
+            else
+            {
+                return ID[17].Equals('X');
+            }
+        }
+        private static bool CheckChinaID15(string ID)
+        {
+            Match m = Regex.Match(ID, @"\d{15}", RegexOptions.IgnoreCase);
+            if (!m.Success)
+            {
+                return false;
+            }
+            if (!ChinaIDProvinceCodes.Contains(ID.Substring(0, 2)))
+            {
+                return false;
+            }
+            CultureInfo zhCN = new CultureInfo("zh-CN", true);
+            DateTime birthday;
+            if (!DateTime.TryParseExact("19" + ID.Substring(6, 6), "yyyyMMdd", zhCN, DateTimeStyles.None, out birthday))
+            {
+                return false;
+            }
+            DateTime dateStart = new DateTime(1800, 1, 1);
+            DateTime dateEnd = new DateTime(2000, 1, 1);
+            if (birthday < dateStart || dateEnd < birthday)
+            {
+                return false;
+            }
+            return true;
+        }
         #endregion 权威校验身份证号码

         #region IP地址


Dynamic version info

Dynamic version info

--- Microsoft.IdentityModel.Extensions/src/Properties/AssemblyInfo.cs
+++ Microsoft.IdentityModel.Extensions/src/Properties/AssemblyInfo.cs
@@ -17,5 +17,4 @@
 [assembly: ComVisible(false)]
 [assembly: Guid("9a39d780-04a2-48f7-bba2-2b744cfd4332")]
 [assembly: CLSCompliant(true)]
-[assembly: NeutralResourcesLanguage("en-US")]
-[assembly: AssemblyFileVersion("1.0.10304.1702")]
+[assembly: NeutralResourcesLanguage("en-US")]


fix fullExplore MList with nulls

fix fullExplore MList with nulls


SportsStore.WebUI -> Implemented functionality to add the image in the product summary view.

--- SportsStore/SportsStore/SportsStore.WebUI/Views/Shared/ProductSummary.cshtml
+++ SportsStore/SportsStore/SportsStore.WebUI/Views/Shared/ProductSummary.cshtml
@@ -1,6 +1,13 @@
 @model SportsStore.Domain.Entities.Product

+    @if (Model.ImageData != null)
+    {
+

+
+

+    }
+

         @Model.Name
         @Model.Price.ToString("c")


Optimize Nonce operations

Optimize Nonce operations

--- src/Cryptography/Nonce.cs
+++ src/Cryptography/Nonce.cs
@@ -90,23 +90,26 @@
                 throw Error.ArgumentOutOfRange_NonceAddend(nameof(addend));
             }

-            int offset = nonce.Size - 1;
-            int size = nonce.CounterFieldSize;
             uint carry = (uint)addend;
-
-            for (int i = 0; i < size; i++)
-            {
-                Debug.Assert(offset - i >= 0 && offset - i < MaxSize);
-                ref byte n = ref Unsafe.Add(ref nonce._value0, offset - i);
-                carry += n;
-                n = unchecked((byte)carry);
-                carry >>= 8;
-            }
-
-            if (carry != 0)
-            {
-                nonce = default;
-                return false;
+            int end = nonce.FixedFieldSize;
+            int pos = nonce.Size;
+
+            while (carry != 0)
+            {
+                if (pos > end)
+                {
+                    pos--;
+                    Debug.Assert(pos >= 0 && pos < MaxSize);
+                    ref byte n = ref Unsafe.Add(ref nonce._value0, pos);
+                    carry += n;
+                    n = unchecked((byte)carry);
+                    carry >>= 8;
+                }
+                else
+                {
+                    nonce = default;
+                    return false;
+                }
             }

             return true;
@@ -136,10 +139,26 @@

             nonce._size = (byte)(bytes.Length << 4);

-            for (int i = 0; i < bytes.Length; i++)
+            ref byte first = ref nonce._value0;
+            ref byte second = ref bytes.DangerousGetPinnableReference();
+
+            int length = bytes.Length;
+            int i = 0;
+
+            while (length - i >= sizeof(int))
+            {
+                ref byte x = ref Unsafe.Add(ref first, i);
+                ref byte y = ref Unsafe.Add(ref second, i);
+
+                Unsafe.WriteUnaligned(ref x, Unsafe.ReadUnaligned<int>(ref x) ^ Unsafe.ReadUnaligned<int>(ref y));
+                i += sizeof(int);
+            }
+
+            while (i != length)
             {
                 Debug.Assert(i >= 0 && i < MaxSize);
-                Unsafe.Add(ref nonce._value0, i) ^= bytes[i];
+                Unsafe.Add(ref first, i) ^= Unsafe.Add(ref second, i);
+                i++;
             }

             return nonce;
@@ -204,18 +223,18 @@
         public int CompareTo(
             Nonce other)
         {
-            int gt = ((other._size - _size) >> 31) & 1;
-            int eq = (((other._size ^ _size) - 1) >> 31) & 1;
-
-            for (int i = 0; i < MaxSize; i++)
-            {
-                int x = Unsafe.Add(ref _value0, i);
-                int y = Unsafe.Add(ref other._value0, i);
-                gt |= ((y - x) >> 31) & eq;
-                eq &= ((y ^ x) - 1) >> 31;
-            }
-
-            return gt + gt + eq - 1;
+            Debug.Assert(Unsafe.SizeOf<Nonce>() % sizeof(uint) == 0);
+
+            uint x = _size;
+            uint y = other._size;
+
+            for (int i = 0; x == y && i < Unsafe.SizeOf<Nonce>(); i += sizeof(uint))
+            {
+                x = Utilities.FromBigEndian(Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref _value0, i)));
+                y = Utilities.FromBigEndian(Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref other._value0, i)));
+            }
+
+            return x.CompareTo(y);
         }

         public int CopyTo(
@@ -234,16 +253,12 @@
         public bool Equals(
             Nonce other)
         {
-            int eq = other._size ^ _size;
-
-            for (int i = 0; i < MaxSize; i++)
-            {
-                int x = Unsafe.Add(ref _value0, i);
-                int y = Unsafe.Add(ref other._value0, i);
-                eq |= y ^ x;
-            }
-
-            return (((eq - 1) >> 31) & 1) - 1 == 0;
+            Debug.Assert(Unsafe.SizeOf<Nonce>() == 16);
+
+            return Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref _value0, 0x0)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref other._value0, 0x0))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref _value0, 0x4)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref other._value0, 0x4))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref _value0, 0x8)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref other._value0, 0x8))
+                && Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref _value0, 0xC)) == Unsafe.ReadUnaligned<uint>(ref Unsafe.Add(ref other._value0, 0xC));
         }

         public override bool Equals(
@@ -254,23 +269,14 @@

         public override int GetHashCode()
         {
-            unchecked
-            {
-                // FNV-1a
-                const uint FNV32Prime = 0x01000193U;
-                const uint FNV32Basis = 0x811C9DC5U;
-
-                uint hashCode = FNV32Basis;
-
-                hashCode = (hashCode ^ _size) * FNV32Prime;
-
-                for (int i = 0; i < MaxSize; i++)
-                {
-                    hashCode = (hashCode ^ Unsafe.Add(ref _value0, i)) * FNV32Prime;
-                }
-
-                return (int)hashCode;
-            }
+            Debug.Assert(Unsafe.SizeOf<Nonce>() == 16);
+
+            int hashCode = 0;
+            hashCode = Utilities.CombineHash(Unsafe.ReadUnaligned<int>(ref Unsafe.Add(ref _value0, 0x0)), hashCode);
+            hashCode = Utilities.CombineHash(Unsafe.ReadUnaligned<int>(ref Unsafe.Add(ref _value0, 0x4)), hashCode);
+            hashCode = Utilities.CombineHash(Unsafe.ReadUnaligned<int>(ref Unsafe.Add(ref _value0, 0x8)), hashCode);
+            hashCode = Utilities.CombineHash(Unsafe.ReadUnaligned<int>(ref Unsafe.Add(ref _value0, 0xC)), hashCode);
+            return hashCode;
         }

         public byte[] ToArray()


Fix Adapter Set e Data Adapter configured

--- src/StocklistClient.cs
+++ src/StocklistClient.cs
@@ -53,7 +53,7 @@
             cInfo = new ConnectionInfo
             {
                 PushServerUrl = pushServerUrl,
-                Adapter = "WELCOME",
+                Adapter = "DEMO",
                 ConnectTimeoutMillis = 500,
                 ReadTimeoutMillis = 8000
             };
@@ -158,7 +158,7 @@
                     "stock_name last_price time pct_change bid_quantity bid ask ask_quantity min max ref_price open_price",
                     true)
                 {
-                    DataAdapter = "STOCKS"
+                    DataAdapter = "QUOTE_ADAPTER"
                 };

                 client.SubscribeTable(


fix for nuget restore (previously didn't function on some people's machines)

--- Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs
+++ Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs
@@ -90,8 +90,9 @@
             // this breaks the build in VS RTM
             var nugetPInfo = new System.Diagnostics.ProcessStartInfo();
             nugetPInfo.FileName = nugetPath;
+            nugetPInfo.WorkingDirectory = buildDirectory;
             nugetPInfo.UseShellExecute = false;
-            nugetPInfo.Arguments = string.Format("Restore {0} -NonInteractive", solutionProjectPath);
+            nugetPInfo.Arguments = @"restore " + PlayerSettings.productName + "/project.json";
             using (var nugetP = new System.Diagnostics.Process())
             {
                 Debug.Log(nugetPath + " " + nugetPInfo.Arguments);


make the parent of AddWindow work

make the parent of AddWindow work

--- src/Summa/AddWindow.cs
+++ src/Summa/AddWindow.cs
@@ -41,6 +41,7 @@
             Title = "Add subscription";
             IconName = "add";
             browser = browse;
+            TransientFor = browser;

             DeleteEvent += OnCancel;


Added Server documentation

Added Server documentation

--- src/Discord.Net/Server.cs
+++ src/Discord.Net/Server.cs
@@ -9,32 +9,56 @@
 	{
 		private readonly DiscordClient _client;

+		/// <summary> Returns the unique identifier for this server. </summary>
 		public string Id { get; }
+		/// <summary> Returns the name of this channel. </summary>
 		public string Name { get; internal set; }

+		/// <summary> Returns the amount of time (in seconds) a user must be inactive for until they are automatically moved to the AFK channel (see AFKChannel). </summary>
+		public int AFKTimeout { get; internal set; }
+		/// <summary> Returns the date and time your joined this server. </summary>
+		public DateTime JoinedAt { get; internal set; }
+		/// <summary> Returns the region for this server (see Regions). </summary>
+		public string Region { get; internal set; }
+
+		/// <summary> Returns the id of the user that first created this server. </summary>
+		public string OwnerId { get; internal set; }
+		/// <summary> Returns the user that first created this server. </summary>
+		public User Owner => _client.GetUser(OwnerId);
+		/// <summary> Returns true if the current user created this server. </summary>
+		public bool IsOwner => _client.UserId == OwnerId;
+
+		/// <summary> Returns the id of the AFK voice channel for this server (see AFKTimeout). </summary>
 		public string AFKChannelId { get; internal set; }
-		public int AFKTimeout { get; internal set; }
-		public DateTime JoinedAt { get; internal set; }
-		public string Region { get; internal set; }
-
-		public string OwnerId { get; internal set; }
-		public User Owner => _client.GetUser(OwnerId);
-		public bool IsOwner => _client.UserId == OwnerId;
-
+		/// <summary> Returns the AFK voice channel for this server (see AFKTimeout). </summary>
+		public Channel AFKChannel => _client.GetChannel(AFKChannelId);
+
+		/// <summary> Returns the id of the default channel for this server. </summary>
 		public string DefaultChannelId => Id;
+		/// <summary> Returns the default channel for this server. </summary>
 		public Channel DefaultChannel =>_client.GetChannel(DefaultChannelId);

 		internal ConcurrentDictionary<string, Membership> _members;
+		/// <summary> Returns a collection of all channels within this server. </summary>
 		public IEnumerable<Membership> Members => _members.Values;

 		internal ConcurrentDictionary<string, bool> _bans;
+		/// <summary> Returns a collection of all users banned on this server. </summary>
+		/// <remarks> Only users seen in other servers will be returned. To get a list of all users, use BanIds. </remarks>
 		public IEnumerable<User> Bans => _bans.Keys.Select(x => _client.GetUser(x));
+		/// <summary> Returns a collection of the ids of all users banned on this server. </summary>
+		public IEnumerable<string> BanIds => _bans.Keys;

+		/// <summary> Returns a collection of all channels within this server. </summary>
 		public IEnumerable<Channel> Channels => _client.Channels.Where(x => x.ServerId == Id);
+		/// <summary> Returns a collection of all roles within this server. </summary>
 		public IEnumerable<Role> Roles => _client.Roles.Where(x => x.ServerId == Id);

-		//Not Implemented
+		//TODO: Not Implemented
+		/// <summary> Not implemented, stored for reference. </summary>
 		public object Presence { get; internal set; }
+		//TODO: Not Implemented
+		/// <summary> Not implemented, stored for reference. </summary>
 		public object[] VoiceStates { get; internal set; }

 		internal Server(string id, DiscordClient client)
@@ -43,11 +67,6 @@
 			_client = client;
 			_members = new ConcurrentDictionary<string, Membership>();
 			_bans = new ConcurrentDictionary<string, bool>();
-		}
-
-		public override string ToString()
-		{
-			return Name;
 		}

 		internal void AddMember(Membership membership)
@@ -78,5 +97,10 @@
 			bool ignored;
 			return _bans.TryRemove(banId, out ignored);
 		}
+
+		public override string ToString()
+		{
+			return Name;
+		}
 	}
 }


Update GetMemberRefs() XML doc comments

Update GetMemberRefs() XML doc comments

--- src/DotNet/ModuleDefMD.cs
+++ src/DotNet/ModuleDefMD.cs
@@ -1782,14 +1782,16 @@
 		}

 		/// <summary>
-		/// Gets all <see cref="MemberRef"/>s
+		/// Gets all <see cref="MemberRef"/>s. <see cref="MemberRef"/>s with generic parameters
+		/// aren't cached and a new copy is always returned.
 		/// </summary>
 		public IEnumerable<MemberRef> GetMemberRefs() {
 			return GetMemberRefs(new GenericParamContext());
 		}

 		/// <summary>
-		/// Gets all <see cref="MemberRef"/>s
+		/// Gets all <see cref="MemberRef"/>s. <see cref="MemberRef"/>s with generic parameters
+		/// aren't cached and a new copy is always returned.
 		/// </summary>
 		/// <param name="gpContext">Generic parameter context</param>
 		public IEnumerable<MemberRef> GetMemberRefs(GenericParamContext gpContext) {


Improve the comments (#151)

Improve the comments (#151)

--- src/WpfMath/SourceSpan.cs
+++ src/WpfMath/SourceSpan.cs
@@ -23,6 +23,11 @@
         public string Source { get; }

         /// <summary>A name identifying the source (e.g. a user input, or some sort of macro body).</summary>
+        /// <remarks>
+        /// The name stored here is purely informative, and included to better distinguish various sources in case of
+        /// complex formulas, when the resulting formula is composed of multiple text sources (where body of any macro
+        /// or a macro-like construct is considered as a separate text source).
+        /// </remarks>
         public string SourceName { get; }

         public char this[int index] => this.Source[this.Start + index];


Make GetHashCode() faster

Make GetHashCode() faster

--- src/TurkishIdNumber.cs
+++ src/TurkishIdNumber.cs
@@ -115,7 +115,7 @@

         public override int GetHashCode()
         {
-            return Value.GetHashCode();
+            return numericValue.GetHashCode();
         }

         public override bool Equals(object obj)


Add TwilioRestClient overload for apiVersion and baseUrl

--- src/Twilio.Api/Core.cs
+++ src/Twilio.Api/Core.cs
@@ -160,5 +160,17 @@
         public TwilioRestClient(string accountSid, string authToken, string accountResourceSid) : base(accountSid, authToken, accountResourceSid, "2010-04-01", "https://api.twilio.com/")
         {
         }
+
+        /// <summary>
+        /// Initializes a new client with the specified credentials.
+        /// </summary>
+        /// <param name="accountSid">The AccountSid to authenticate with</param>
+        /// <param name="authToken">The AuthToken to authenticate with</param>
+        /// <param name="accountResourceSid">The AccountSid for the account you want to use</param>
+        /// <param name="apiVersion">The version of the Twilio API to use</param>
+        /// <param name="baseUrl">The base URL of the Twilio API</param>
+        public TwilioRestClient(string accountSid, string authToken, string accountResourceSid, string apiVersion, string baseUrl) : base(accountSid, authToken, accountResourceSid, apiVersion, baseUrl)
+        {
+        }
     }
 }


Hit up other MessageServers for messages as well, they might have interesting info, such as friend online statuses.

--- OpenSim/Services/MessagingService/AsyncMessageRequesterService.cs
+++ OpenSim/Services/MessagingService/AsyncMessageRequesterService.cs
@@ -116,7 +116,7 @@
                 return;
             m_locked = true;
             OSDMap message = CreateWebRequest();
-            List<string> serverURIs = m_scenes[0].RequestModuleInterface<IConfigurationService>().FindValueOf(m_scenes[0].RegionInfo.RegionHandle.ToString(), "MessagingServerURI");
+            List<string> serverURIs = m_scenes[0].RequestModuleInterface<IConfigurationService>().FindValueOf("MessagingServerURI");
             foreach (string host in serverURIs)
             {
                 OSDMap retval = WebUtils.PostToService (host, message, true, false);


Apparently these are supposed to be commas

--- Battery-Commander.Web/Views/Soldiers/Details.cshtml
+++ Battery-Commander.Web/Views/Soldiers/Details.cshtml
@@ -254,7 +254,7 @@
             chart.draw(data, {
                 title: 'APFT - Scores',
                 legend: { position: 'bottom' },
-                vAxis: { minValue: 0; maxValue: 300; }
+                vAxis: { minValue: 0, maxValue: 300 }
             });
         }

@@ -274,7 +274,7 @@
             chart.draw(data, {
                 title: 'ACBP - Weight',
                 legend: { position: 'bottom' },
-                vAxis: { minValue: 150; maxValue: 300; }
+                vAxis: { minValue: 150, maxValue: 300 }
             });
         }
     </script>


PERSIST

PERSIST

--- BlackJackSolution/BlackJackSolution/DAL/DBAccess.cs
+++ BlackJackSolution/BlackJackSolution/DAL/DBAccess.cs
@@ -36,7 +36,7 @@
             }
             **/
         }
-        public static List<string[]> CreateDeck()
+        public static List<string[]> CreateDeck()
         {
             try {
                 List<string[]> newDeck = new List<string[]>();