BaseAbiquoClient

BaseAbiquoClient

* Method summaries adjusted

--- src/biz.dfch.CS.Abiquo.Client/BaseAbiquoClient.cs
+++ src/biz.dfch.CS.Abiquo.Client/BaseAbiquoClient.cs
@@ -368,7 +368,7 @@
         /// <summary>
         /// Retrieve the list of enterprises/tenants
         /// </summary>
-        /// <returns>Collection of Enterprises/tenants</returns>
+        /// <returns>Enterprises/tenants</returns>
         public abstract Enterprises GetEnterprises();

         /// <summary>
@@ -392,21 +392,21 @@
         /// <summary>
         /// Retrieve users with roles of the enterprise/tenant specified in the authentication information
         /// </summary>
-        /// <returns>Collection of UsersWithRoles</returns>
+        /// <returns>UsersWithRoles</returns>
         public abstract UsersWithRoles GetUsersWithRolesOfCurrentEnterprise();

         /// <summary>
         /// Retrieve users with roles of a specific enterprise/tenant
         /// </summary>
         /// <param name="enterprise">Enterprise/Tenant</param>
-        /// <returns>Collection of UsersWithRoles</returns>
+        /// <returns>UsersWithRoles</returns>
         public abstract UsersWithRoles GetUsersWithRoles(Enterprise enterprise);

         /// <summary>
         /// Retrieve users with roles of a specific enterprise/tenant
         /// </summary>
         /// <param name="enterpriseId">Id of the enterprise/tenant</param>
-        /// <returns>Collection of UsersWithRoles</returns>
+        /// <returns>UsersWithRoles</returns>
         public abstract UsersWithRoles GetUsersWithRoles(int enterpriseId);

         /// <summary>
@@ -500,21 +500,21 @@
         /// <summary>
         /// Retrieve datacenters limits of the enterprise/tenant specified in the authentication information
         /// </summary>
-        /// <returns>Collection of DataCentersLimits</returns>
+        /// <returns>DataCentersLimits</returns>
         public abstract DataCentersLimits GetDataCentersLimitsOfCurrentEnterprise();

         /// <summary>
         /// Retrieve datacenters limits of a specific enterprise/tenant
         /// </summary>
         /// <param name="enterprise">Enterprise/Tenant</param>
-        /// <returns>Collection of DataCentersLimits</returns>
+        /// <returns>DataCentersLimits</returns>
         public abstract DataCentersLimits GetDataCentersLimits(Enterprise enterprise);

         /// <summary>
         /// Retrieve datacenters limits of a specific enterprise/tenant
         /// </summary>
         /// <param name="enterpriseId">Id of the enterprise/tenant</param>
-        /// <returns>Collection of DataCentersLimits</returns>
+        /// <returns>DataCentersLimits</returns>
         public abstract DataCentersLimits GetDataCentersLimits(int enterpriseId);

         /// <summary>
@@ -548,14 +548,14 @@
         /// <summary>
         /// Retrieve all virtual machines across all virtual datacenters the current user has access to
         /// </summary>
-        /// <returns>Collection of VirtualMachines</returns>
+        /// <returns>VirtualMachines</returns>
         public abstract VirtualMachines GetAllVirtualMachines();

         /// <summary>
         /// Retrieve all virtual machines of a specific virtual appliance
         /// </summary>
         /// <param name="virtualAppliance">Virtual appliance</param>
-        /// <returns>Collection of VirtualMachines</returns>
+        /// <returns>VirtualMachines</returns>
         public abstract VirtualMachines GetVirtualMachines(VirtualAppliance virtualAppliance);

         /// <summary>
@@ -563,7 +563,7 @@
         /// </summary>
         /// <param name="virtualDataCenterId">Id of the virtual datacenter</param>
         /// <param name="virtualApplianceId">Id of the virtual appliance</param>
-        /// <returns>Collection of VirtualMachines</returns>
+        /// <returns>VirtualMachines</returns>
         public abstract VirtualMachines GetVirtualMachines(int virtualDataCenterId, int virtualApplianceId);

         /// <summary>
@@ -810,10 +810,10 @@
         public abstract bool DeleteVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId, bool force);

         /// <summary>
-        /// Retrieve a possible virtual machine network configuration by Id of a specific virtual machine
+        /// Retrieve the possible virtual machine network configurations of a specific virtual machine
         /// </summary>
         /// <param name="virtualMachine">Virtual machine</param>
-        /// <returns>VmNetworkConfiguration</returns>
+        /// <returns>VmNetworkConfigurations</returns>
         public abstract VmNetworkConfigurations GetNetworkConfigurationsForVm(VirtualMachine virtualMachine);

         /// <summary>
@@ -849,7 +849,7 @@
         /// Retrieve NICs attached to a specific virtual machine
         /// </summary>
         /// <param name="virtualMachine">Virtual machine</param>
-        /// <returns>Collection of Nics</returns>
+        /// <returns>Nics</returns>
         public abstract Nics GetNicsOfVirtualMachine(VirtualMachine virtualMachine);

         /// <summary>
@@ -858,14 +858,14 @@
         /// <param name="virtualDataCenterId">Id of the virtual datacenter the virtual appliance belongs to</param>
         /// <param name="virtualApplianceId">Id of the virtual appliance the virtual machine belongs to</param>
         /// <param name="virtualMachineId">Id of the virtual machine</param>
-        /// <returns>Collection of Nics</returns>
+        /// <returns>Nics</returns>
         public abstract Nics GetNicsOfVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId);

         /// <summary>
         ///Retrieve tasks of a specific virtual machine
         /// </summary>
         /// <param name="virtualMachine">Virtual machine</param>
-        /// <returns>Collection of Tasks</returns>
+        /// <returns>Tasks</returns>
         public abstract Tasks GetAllTasksOfVirtualMachine(VirtualMachine virtualMachine);

         /// <summary>
@@ -874,14 +874,14 @@
         /// <param name="virtualDataCenterId">Id of the virtual datacenter the virtual appliance belongs to</param>
         /// <param name="virtualApplianceId">Id of the virtual appliance the virtual machine belongs to</param>
         /// <param name="virtualMachineId">Id of the virtual mahcine</param>
-        /// <returns>Collection of Tasks</returns>
+        /// <returns>Tasks</returns>
         public abstract Tasks GetAllTasksOfVirtualMachine(int virtualDataCenterId, int virtualApplianceId, int virtualMachineId);

         /// <summary>
         ///  Retrieve a task by Id of a specific virtual machine
         /// </summary>
         /// <param name="virtualMachine">Virtual machine</param>
-        /// <param name="taskId">id of the task</param>
+        /// <param name="taskId">Id of the task</param>
         /// <returns>Task</returns>
         public abstract Task GetTaskOfVirtualMachine(VirtualMachine virtualMachine, string taskId);

@@ -903,8 +903,8 @@
         /// <summary>
         /// Get all virtual machine templaes of a specific specific datacenter repository
         /// </summary>
-        /// <param name="dataCenterRepository">datacenter repository</param>
-        /// <returns>Collection of VirtualMachineTemplates</returns>
+        /// <param name="dataCenterRepository">Datacenter repository</param>
+        /// <returns>VirtualMachineTemplates</returns>
         public abstract VirtualMachineTemplates GetVirtualMachineTemplates(DataCenterRepository dataCenterRepository);

         /// <summary>
@@ -912,11 +912,11 @@
         /// </summary>
         /// <param name="enterpriseId">Id of the entperise/tenant</param>
         /// <param name="dataCenterRepositoryId">Id of the datacenter repository</param>
-        /// <returns>Collection of VirtualMachineTemplates</returns>
+        /// <returns>VirtualMachineTemplates</returns>
         public abstract VirtualMachineTemplates GetVirtualMachineTemplates(int enterpriseId, int dataCenterRepositoryId);

         /// <summary>
-        /// Get a virtual machine template by id of a specific specific datacenter repository of a specific enterprise/tenant
+        /// Get a virtual machine template by id of a specific specific datacenter repository
         /// </summary>
         /// <param name="dataCenterRepository">Datacenter repository</param>
         /// <param name="id">Id of the virtual machine template</param>
@@ -940,7 +940,7 @@
         /// <summary>
         /// Retrieve all available virtual datacenters
         /// </summary>
-        /// <returns>Collection of VirtualDataCenters</returns>
+        /// <returns>VirtualDataCenters</returns>
         public abstract VirtualDataCenters GetVirtualDataCenters();

         /// <summary>
@@ -958,23 +958,23 @@
         /// <summary>
         /// Retrieve all available virtual applicance of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter">Virtualdatacenter</param>
-        /// <returns>Collection of VirtualApplicances</returns>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
+        /// <returns>VirtualApplicances</returns>
         public abstract VirtualAppliances GetVirtualAppliances(VirtualDataCenter virtualDataCenter);

         /// <summary>
         /// Retrieve all available virtual applicance of a specific virtual datacenter
         /// </summary>
         /// <param name="virtualDataCenterId">Id of the virtual datacenter</param>
-        /// <returns>Collection of VirtualApplicances</returns>
+        /// <returns>VirtualApplicances</returns>
         public abstract VirtualAppliances GetVirtualAppliances(int virtualDataCenterId);

         /// <summary>
         /// Retrieve a specific virtual appliance by id of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter"></param>
-        /// <param name="id"></param>
-        /// <returns></returns>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
+        /// <param name="id">Id of the virtual appliance</param>
+        /// <returns>VirtualAppliance</returns>
         public abstract VirtualAppliance GetVirtualAppliance(VirtualDataCenter virtualDataCenter, int id);

         /// <summary>
@@ -999,7 +999,7 @@
         /// <summary>
         /// Retrieve all datacenter repositories of an enterprise/tenant
         /// </summary>
-        /// <param name="enterprise">Enterprise</param>
+        /// <param name="enterprise">Entreprise/Tenant</param>
         /// <returns>DataCenterRepositories</returns>
         public abstract DataCenterRepositories GetDataCenterRepositories(Enterprise enterprise);

@@ -1020,7 +1020,7 @@
         /// <summary>
         /// Retrieve a specific datacenter repository by id of a specific enterprise/tenant
         /// </summary>
-        /// <param name="enterprise">Entreprise</param>
+        /// <param name="enterprise">Entreprise/Tenant</param>
         /// <param name="id">Id of the datacenter repository</param>
         /// <returns>DataCenterRepository</returns>
         public abstract DataCenterRepository GetDataCenterRepository(Enterprise enterprise, int id);
@@ -1055,23 +1055,23 @@
         /// <summary>
         /// Retrieve all private networks of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter">virtual datacenter</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetPrivateNetworks(VirtualDataCenter virtualDataCenter);

         /// <summary>
         /// Retrieve all private networks of a specific virtual datacenter
         /// </summary>
         /// <param name="virtualDataCenterId">Id of the virtual datacenter the network belongs to</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetPrivateNetworks(int virtualDataCenterId);

         /// <summary>
         /// Retrieve a private network by Id of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter">virtual datacenter</param>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
         /// <param name="id">Id of the private network</param>
-        /// <returns></returns>
+        /// <returns>VlanNetwork</returns>
         public abstract VlanNetwork GetPrivateNetwork(VirtualDataCenter virtualDataCenter, int id);

         /// <summary>
@@ -1087,7 +1087,7 @@
         /// </summary>
         /// <param name="vlan">Vlan</param>
         /// <param name="free">If true, return only the available IPs not used by any virtual machine; if false, return all IPs</param>
-        /// <returns></returns>
+        /// <returns>PrivateIps</returns>
         public abstract PrivateIps GetIpsOfPrivateNetwork(VlanNetwork vlan, bool free);

         /// <summary>
@@ -1096,14 +1096,14 @@
         /// <param name="virtualDataCenterId">Id of the virtual datacenter the network belongs to</param>
         /// <param name="privateNetworkId">Id of the private network</param>
         /// <param name="free">If true, return only the available IPs not used by any virtual machine; if false, return all IPs</param>
-        /// <returns>Collection of PrivateIps</returns>
+        /// <returns>PrivateIps</returns>
         public abstract PrivateIps GetIpsOfPrivateNetwork(int virtualDataCenterId, int privateNetworkId, bool free);

         /// <summary>
         /// Retrieve all external networks available for a specific limit of the enterprise/tenant specified in the authentication information
         /// </summary>
         /// <param name="dataCenterLimitsId">Id of the datacenter limits</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetExternalNetworksOfCurrentEnterprise(int dataCenterLimitsId);

         /// <summary>
@@ -1111,7 +1111,7 @@
         /// </summary>
         /// <param name="enterpriseId">Id of the enterprise/tenant</param>
         /// <param name="dataCenterLimitsId">Id of the datacenter limits</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetExternalNetworks(int enterpriseId, int dataCenterLimitsId);

         /// <summary>
@@ -1136,7 +1136,7 @@
         /// </summary>
         /// <param name="vlan">Vlan</param>
         /// <param name="free">If true, return only the available IPs not used by any virtual machine; if false, return all IPs</param>
-        /// <returns></returns>
+        /// <returns>ExternalIps</returns>
         public abstract ExternalIps GetIpsOfExternalNetworkOfCurrentEnterprise(VlanNetwork vlan, bool free);

         /// <summary>
@@ -1161,21 +1161,21 @@
         /// <summary>
         /// Retrieve all public networks of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter">virtual data center</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetPublicNetworks(VirtualDataCenter virtualDataCenter);

         /// <summary>
         /// Retrieve all public networks of a specific virtual datacenter
         /// </summary>
         /// <param name="virtualDataCenterId">Id of the virtual datacenter the network belongs to</param>
-        /// <returns>Collection of VlanNetworks</returns>
+        /// <returns>VlanNetworks</returns>
         public abstract VlanNetworks GetPublicNetworks(int virtualDataCenterId);

         /// <summary>
         /// Retrieve a public network by Id of a specific virtual datacenter
         /// </summary>
-        /// <param name="virtualDataCenter">virtual data center</param>
+        /// <param name="virtualDataCenter">Virtual datacenter</param>
         /// <param name="id">Id of the public network</param>
         /// <returns>VlanNetwork</returns>
         public abstract VlanNetwork GetPublicNetwork(VirtualDataCenter virtualDataCenter, int id);
@@ -1191,7 +1191,7 @@
         /// <summary>
         /// Retrieve all public IPs of a specific public network that can be purchased
         /// </summary>
-        /// <param name="vlan">public network</param>
+        /// <param name="vlan">Public network</param>
         /// <returns>ExternalIps</returns>
         public abstract PublicIps GetPublicIpsToPurchaseOfPublicNetwork(VlanNetwork vlan);

@@ -1206,7 +1206,7 @@
         /// <summary>
         /// Purchase a public IP to be used in a virtual machine
         /// </summary>
-        /// <param name="vlan">virtual data center</param>
+        /// <param name="vlan">Virtual datacenter</param>
         /// <param name="publicIp">Id of the public IP to be purchased</param>
         /// <returns>PublicIp</returns>
         public abstract PublicIp PurchasePublicIp(VlanNetwork vlan, PublicIp publicIp);
@@ -1222,7 +1222,7 @@
         /// <summary>
         /// Release a public IP
         /// </summary>
-        /// <param name="vlan">virtual data center</param>
+        /// <param name="vlan">Virtual datacenter</param>
         /// <param name="publicIpid">Id of the public IP to be released</param>
         /// <returns>PublicIp</returns>
         public abstract PublicIp ReleasePublicIp(VlanNetwork vlan, PublicIp publicIpid);


Corrected SP: it's Sport, not Spanisch

Corrected SP: it's Sport, not Spanisch

--- vplan/Data.cs
+++ vplan/Data.cs
@@ -151,9 +151,9 @@
                     fach = "Französich";
                     break;
                 case "SP":
-                    fach = "Spanisch";
-                    break;
-                case "SP3":
+                    fach = "Sport";
+                    break;
+                case "SPA":
                     fach = "Spanisch";
                     break;
                 case "DS":


fix stream may not be closed when reading crash occured

--- C3D/C3DFile.cs
+++ C3D/C3DFile.cs
@@ -75,21 +75,28 @@

         private C3DFile(Stream stream)
         {
-            C3DReader reader = new C3DReader(stream);
+            C3DReader reader = null;

-            this._processorType = reader.CreateProcessorType;
-            this._header = reader.ReadHeader();
-            this._parameterDictionary = reader.ReadParameters();
-            this._frameCollection = new C3DFrameCollection();
+            try
+            {
+                reader = new C3DReader(stream);

-            C3DParameterCache paramCache = C3DParameterCache.CreateCache(this);
-            C3DFrame frame = null;
-            while ((frame = reader.ReadNextFrame(paramCache)) != null)
+                this._processorType = reader.CreateProcessorType;
+                this._header = reader.ReadHeader();
+                this._parameterDictionary = reader.ReadParameters();
+                this._frameCollection = new C3DFrameCollection();
+
+                C3DParameterCache paramCache = C3DParameterCache.CreateCache(this);
+                C3DFrame frame = null;
+                while ((frame = reader.ReadNextFrame(paramCache)) != null)
+                {
+                    this._frameCollection.Add(frame);
+                }
+            }
+            finally
             {
-                this._frameCollection.Add(frame);
+                reader.Close();
             }
-
-            reader.Close();
         }
         #endregion


- Untabified test file

- Untabified test file

--- src/dotless.Test/Unit/Engine/PathAggregatorBug.cs
+++ src/dotless.Test/Unit/Engine/PathAggregatorBug.cs
@@ -16,13 +16,13 @@
             Assert.AreEqual(@"../site.less", aggregatePaths);
         }

-		[Test]
-		public void StringExtension_AggregatePath_CantGoUpMultipleLevels()
-		{
+        [Test]
+        public void StringExtension_AggregatePath_CantGoUpMultipleLevels()
+        {
             var foo = new [] { @"../../site.less" };
             var aggregatePaths = foo.AggregatePaths();

             Assert.AreEqual(@"../../site.less", aggregatePaths);
-		}
+        }
     }
 }


debugging

debugging

--- src/double/Edge.js/dotnetcore/coreclrembedding.cs
+++ src/double/Edge.js/dotnetcore/coreclrembedding.cs
@@ -254,13 +254,14 @@

             foreach (CompilationLibrary compileLibrary in dependencyContext.CompileLibraries)
             {
+				Console.WriteLine("Processing compile library {0}", compileLibrary.Name);
+				Console.WriteLine("Processing compile library {0}", compileLibrary.Assemblies == null);

                 if (compileLibrary.Assemblies == null || compileLibrary.Assemblies.Count == 0)
                 {
                     continue;
                 }

-				Console.WriteLine("Processing compile dependency {0}", compileLibrary.Name);

                 DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing compile dependency {0}", compileLibrary.Name);

@@ -290,6 +291,7 @@
             {

                 DebugMessage("EdgeAssemblyResolver::AddDependencies (CLR) - Processing runtime dependency {1} {0}", runtimeLibrary.Name, runtimeLibrary.Type);
+                Console.WriteLine("EdgeAssemblyResolver::AddDependencies (CLR) - Processing runtime dependency {1} {0}", runtimeLibrary.Name, runtimeLibrary.Type);

                 List<string> assets = runtimeLibrary.RuntimeAssemblyGroups.GetRuntimeAssets(DotNetRuntimeEnvironment.GetRuntimeIdentifier()).ToList();


Fix incorrect acronym

Fix incorrect acronym

--- osu.Game/Rulesets/Mods/IMod.cs
+++ osu.Game/Rulesets/Mods/IMod.cs
@@ -10,7 +10,7 @@
         /// <summary>
         /// The shortened name of this mod.
         /// </summary>
-        [JsonProperty]
+        [JsonProperty("acronym")]
         string Acronym { get; }
     }
 }


Fix game not exiting

Fix game not exiting

--- osu.Game/Screens/Menu/Intro.cs
+++ osu.Game/Screens/Menu/Intro.cs
@@ -159,8 +159,7 @@

         public override void OnResuming(IScreen last)
         {
-            if (!(last is MainMenu))
-                this.FadeIn(300);
+            this.FadeIn(300);

             double fadeOutTime = EXIT_DELAY;
             //we also handle the exit transition.


Correct disposal.

Correct disposal.

--- osu.Game/Utils/SentryLogger.cs
+++ osu.Game/Utils/SentryLogger.cs
@@ -16,13 +16,13 @@
     /// </summary>
     public class SentryLogger : IDisposable
     {
-        private readonly List<Task> tasks = new List<Task>();
+        private IDisposable sentry;

         public SentryLogger(OsuGame game)
         {
             if (!game.IsDeployedBuild) return;

-            SentrySdk.Init(new SentryOptions
+            sentry = SentrySdk.Init(new SentryOptions
             {
                 Dsn = new Dsn("https://5e342cd55f294edebdc9ad604d28bbd3@sentry.io/1255255"),
                 Release = game.Version
@@ -81,16 +81,6 @@
             return true;
         }

-        private void queuePendingTask(Task<string> task)
-        {
-            lock (tasks) tasks.Add(task);
-            task.ContinueWith(_ =>
-            {
-                lock (tasks)
-                    tasks.Remove(task);
-            });
-        }
-
         #region Disposal

         ~SentryLogger()
@@ -112,7 +102,8 @@
                 return;

             isDisposed = true;
-            lock (tasks) Task.WaitAll(tasks.ToArray(), 5000);
+            sentry.Dispose();
+            sentry = null;
         }

         #endregion


PropertyEditor Bugfixes, Tweaks #FIX: Fixed a bug where a specialized PropertyEditor was selected for an object that didn't have the matching type. #CHANGE: Improved performance of PropertyEditor lookups.

--- DualityEditor/Controls/PropertyEditors/Provider.cs
+++ DualityEditor/Controls/PropertyEditors/Provider.cs
@@ -10,53 +10,102 @@

 namespace Duality.Editor.Controls.PropertyEditors
 {
+	/// <summary>
+	/// The <see cref="DualityPropertyEditorProvider"/> is responsible for selecting a
+	/// matching <see cref="PropertyEditor"/> for each edited type inside a <see cref="DualitorPropertyGrid"/>,
+	/// such as the one used by the defautl Object Inspector. It uses reflection to retrieve all
+	/// available <see cref="PropertyEditor"/> classes as well as their <see cref="PropertyEditorAssignmentAttribute"/>
+	/// values, which are then used to determine the priority of the assignment.
+	/// </summary>
 	public class DualityPropertyEditorProvider : IPropertyEditorProvider
 	{
+		private struct EditorItem
+		{
+			public TypeInfo EditorType;
+			public PropertyEditorAssignmentAttribute Assignment;
+		}
+
+		private List<EditorItem> propertyEditorAssignments = null;
+
+		/// <summary>
+		/// Determines whether this provider is responsible for creating a <see cref="PropertyEditor"/>
+		/// that is able to edit objects of the specified base type.
+		/// </summary>
+		/// <param name="baseType"></param>
+		/// <param name="context"></param>
+		/// <returns></returns>
 		public int IsResponsibleFor(Type baseType, ProviderContext context)
 		{
-			IEnumerable<TypeInfo> propertyEditorTypes = DualityEditorApp.GetAvailDualityEditorTypes(typeof(PropertyEditor));
-			if (propertyEditorTypes.Any())
+			if (this.propertyEditorAssignments == null)
+				this.RetrieveAssignments();
+
+			int bestScore = PropertyGrid.EditorPriority_None;
+			foreach (EditorItem item in this.propertyEditorAssignments)
 			{
-				int bestScore = PropertyGrid.EditorPriority_None;
-				foreach (TypeInfo editorType in propertyEditorTypes)
+				int score = item.Assignment.MatchToProperty(baseType, context);
+				if (score > bestScore)
 				{
-					var assignment = editorType.GetAttributesCached<PropertyEditorAssignmentAttribute>().FirstOrDefault();
-					if (assignment == null) continue;
-					int score = assignment.MatchToProperty(baseType, context);
-					if (score > bestScore)
-					{
-						bestScore = score;
-					}
+					bestScore = score;
 				}
-				return bestScore;
 			}
-			else
-			{
-				return PropertyGrid.EditorPriority_None;
-			}
+			return bestScore;
 		}
+		/// <summary>
+		/// Creates a <see cref="PropertyEditor"/> that is able to edit objects
+		/// of the specified base type.
+		/// </summary>
+		/// <param name="baseType"></param>
+		/// <param name="context"></param>
+		/// <returns></returns>
 		public PropertyEditor CreateEditor(Type baseType, ProviderContext context)
 		{
-			IEnumerable<TypeInfo> propertyEditorTypes = DualityEditorApp.GetAvailDualityEditorTypes(typeof(PropertyEditor));
-			if (propertyEditorTypes.Any())
+			if (this.propertyEditorAssignments == null)
+				this.RetrieveAssignments();
+
+			int bestScore = PropertyGrid.EditorPriority_None;
+			TypeInfo bestType = null;
+			foreach (EditorItem item in this.propertyEditorAssignments)
 			{
-				int bestScore = PropertyGrid.EditorPriority_None;
-				TypeInfo bestType = null;
-				foreach (TypeInfo editorType in propertyEditorTypes)
+				int score = item.Assignment.MatchToProperty(baseType, context);
+				if (score > bestScore)
 				{
-					var assignment = editorType.GetAttributesCached<PropertyEditorAssignmentAttribute>().FirstOrDefault();
-					if (assignment == null) continue;
-					int score = assignment.MatchToProperty(baseType, context);
-					if (score > bestScore)
-					{
-						bestScore = score;
-						bestType = editorType;
-					}
+					bestScore = score;
+					bestType = item.EditorType;
 				}
-				if (bestType != null) return bestType.CreateInstanceOf() as PropertyEditor;
 			}

-			return null;
+			if (bestType != null)
+				return bestType.CreateInstanceOf() as PropertyEditor;
+			else
+				return null;
+		}
+
+		/// <summary>
+		/// Aggregates the cached list of all available <see cref="PropertyEditor"/>
+		/// instances, as well as their matching <see cref="PropertyEditorAssignmentAttribute"/>.
+		///
+		/// Unlike cached core plugin type data, this list doesn't have to be cleared
+		/// when reloading plugins, since <see cref="PropertyEditor"/> classes can only be defined
+		/// in editor plugins - which require an editor restart anyway.
+		/// </summary>
+		private void RetrieveAssignments()
+		{
+			this.propertyEditorAssignments = new List<EditorItem>();
+
+			IEnumerable<TypeInfo> propertyEditorTypes = DualityEditorApp.GetAvailDualityEditorTypes(typeof(PropertyEditor));
+			foreach (TypeInfo editorType in propertyEditorTypes)
+			{
+				// Note: We don't want inherited attributes here!
+				var assignment = editorType.GetCustomAttribute<PropertyEditorAssignmentAttribute>(false);
+				if (assignment != null)
+				{
+					this.propertyEditorAssignments.Add(new EditorItem
+					{
+						EditorType = editorType,
+						Assignment = assignment
+					});
+				}
+			}
 		}
 	}
 }


Disable warning about unused constructors.

--- Duplicati/Library/Backend/CloudFiles/CloudFiles.cs
+++ Duplicati/Library/Backend/CloudFiles/CloudFiles.cs
@@ -52,10 +52,14 @@

         private readonly byte[] m_copybuffer = new byte[Duplicati.Library.Utility.Utility.DEFAULT_BUFFER_SIZE];

+        // ReSharper disable once UnusedMember.Global
+        // This constructor is needed by the BackendLoader.
         public CloudFiles()
         {
         }

+        // ReSharper disable once UnusedMember.Global
+        // This constructor is needed by the BackendLoader.
         public CloudFiles(string url, Dictionary<string, string> options)
         {
             var uri = new Utility.Uri(url);


And sort the materials filter list...

And sort the materials filter list...

--- EDDiscovery/UserControls/UserControlEngineering.cs
+++ EDDiscovery/UserControls/UserControlEngineering.cs
@@ -99,6 +99,7 @@
             List<string> matShortNames = Recipes.SelectMany(r => r.ingredients.ToList()).Distinct().ToList();
             matLookUp = matShortNames.Select(sn => Tuple.Create<string,string>(sn, MaterialCommodityDB.GetCachedMaterialByShortName(sn).name)).ToList();
             List<string> matLongNames = matLookUp.Select(lu => lu.Item2).ToList();
+            matLongNames.Sort();
             matfs = new EngineeringFilterSelector(matLongNames);
             matfs.Changed += FilterChanged;

@@ -162,7 +163,7 @@
                 string[] upgArray = upgrades.Split(';');
                 string materials = SQLiteDBClass.GetSettingString(DbMaterialFilterSave, "All");
                 List<string> matList;
-                if (materials == "All") { matList = new List<string>(); }
+                if (materials == "All" || materials == "None") { matList = new List<string>(); }
                 else { matList = materials.Split(';').Where(x => !string.IsNullOrEmpty(x)).Select(m => matLookUp.Where(u => u.Item2 == m).First().Item1).ToList(); }

                 for (int i = 0; i < Recipes.Count; i++)


Code CleanUp

Code CleanUp

--- EFCore.BulkExtensions/IQueryableBatchExtensions.cs
+++ EFCore.BulkExtensions/IQueryableBatchExtensions.cs
@@ -97,13 +97,16 @@
         public static string ReplaceLetterInBracketsWithA(string sql)
         {
             sql = sql.Replace("[i]", "[a]");
-            for (char letter = 'a'; letter <= 'z'; letter++)
+            if (!sql.Contains("[a]"))
             {
-                string letterInBracket = $"[{letter}]";
-                if (sql.Contains(letterInBracket))
+                for (char letter = 'b'; letter <= 'z'; letter++)
                 {
-                    sql = sql.Replace(letterInBracket, "[a]");
-                    break;
+                    string letterInBracket = $"[{letter}]";
+                    if (sql.Contains(letterInBracket))
+                    {
+                        sql = sql.Replace(letterInBracket, "[a]");
+                        break;
+                    }
                 }
             }
             return sql;


Specify token request uri

Specify token request uri

--- EPiServer.ServiceApi.Client/Client/OAuth2Client.cs
+++ EPiServer.ServiceApi.Client/Client/OAuth2Client.cs
@@ -129,7 +129,7 @@
                 fields.Add(OAuth2Constants.Scope, scope);
             }

-            return Request(Merge(fields, additionalValues));
+            return RequestAccessToken(Merge(fields, additionalValues));
         }

         public Task<TokenResponse> RequestAuthorizationCodeAsync(string code, string redirectUri, Dictionary<string, string> additionalValues = null)
@@ -201,6 +201,21 @@
             }
         }

+        private async Task<TokenResponse> RequestAccessToken(Dictionary<string, string> form, string requestUri = "")
+        {
+            var response = await _client.PostAsync("/episerverapi/token", new FormUrlEncodedContent(form)).ConfigureAwait(false);
+
+            if (response.StatusCode == HttpStatusCode.OK || response.StatusCode == HttpStatusCode.BadRequest)
+            {
+                var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+                return new TokenResponse(content);
+            }
+            else
+            {
+                return new TokenResponse(response.StatusCode, response.ReasonPhrase);
+            }
+        }
+
         private Dictionary<string, string> Merge(Dictionary<string, string> explicitValues, Dictionary<string, string> additionalValues = null)
         {
             var merged = explicitValues;


Wireframe no-longer causes crashes when viewing components that have a null value for width/height.

--- Gum/Wireframe/WireframeObjectManager.RepresentationCreation.cs
+++ Gum/Wireframe/WireframeObjectManager.RepresentationCreation.cs
@@ -711,6 +711,9 @@
             object heightAsObjects = stateSave.GetValue("Height");
             object widthUnits = stateSave.GetValue("Width Units");

+            object xAsObject = stateSave.GetValue("X");
+            object yAsObject = stateSave.GetValue("Y");
+
             object xUnits = stateSave.GetValue("X Units");
 #if DEBUG
             if (xUnits is int)
@@ -722,7 +725,16 @@
                 throw new Exception("Width Units must not be an int - must be an enum");
             }
 #endif
-
+            float xAsFloat = 0;
+            if (xAsObject != null)
+            {
+                xAsFloat = (float)xAsObject;
+            }
+            float yAsFloat = 0;
+            if (xAsObject != null)
+            {
+                yAsFloat = (float)yAsObject;
+            }

             SetIpsoWidthAndPositionAccordingToUnitValueAndTypes(
@@ -734,8 +746,8 @@
                 stateSave.GetValue("Height Units"),
                 (HorizontalAlignment)stateSave.GetValue("X Origin"),
                 (VerticalAlignment)stateSave.GetValue("Y Origin"),
-                (float)stateSave.GetValue("X"),
-                (float)stateSave.GetValue("Y"),
+                xAsFloat,
+                yAsFloat,
                 xUnits,
                 stateSave.GetValue("Y Units")


fixed Drop for CachedMongoStorage when nitro is on

--- Jarvis.Framework.Kernel/ProjectionEngine/CachedMongoStorage.cs
+++ Jarvis.Framework.Kernel/ProjectionEngine/CachedMongoStorage.cs
@@ -133,6 +133,10 @@

         public void Drop()
         {
+            if (_inmemoryCollection.IsActive)
+            {
+                _inmemoryCollection.Clear();
+            }
             _storage.Drop();
         }


pragma GU0036

pragma GU0036

--- Gu.Reactive/Collections/WeakCompositeDisposable.cs
+++ Gu.Reactive/Collections/WeakCompositeDisposable.cs
@@ -19,7 +19,9 @@
         {
             if (this.disposed)
             {
+#pragma warning disable GU0036 // Don't dispose injected.
                 disposable.Dispose();
+#pragma warning restore GU0036 // Don't dispose injected.
                 return;
             }

@@ -27,7 +29,9 @@
             {
                 if (this.disposed)
                 {
+#pragma warning disable GU0036 // Don't dispose injected.
                     disposable.Dispose();
+#pragma warning restore GU0036 // Don't dispose injected.
                     return;
                 }

@@ -53,7 +57,7 @@
             this.ThrowIfDisposed();
             lock (this.gate)
             {
-                for (int i = 0; i < this.disposables.Count; i++)
+                for (var i = 0; i < this.disposables.Count; i++)
                 {
                     var wr = this.disposables[i];
                     IDisposable temp;


v5.12.0 - Tweaked dialogue icon position

--- HamstarHelpers/Services/Dialogue/DialogueEditor.cs
+++ HamstarHelpers/Services/Dialogue/DialogueEditor.cs
@@ -47,8 +47,8 @@

 					MapMarkers.SetFullScreenMapMarker(
 						id: alertId,
-						tileX: ((int)npc.position.X / 16) + 8,
-						tileY: ((int)npc.position.Y / 16) - 1,
+						tileX: ((int)npc.position.X / 16) + 12,
+						tileY: ((int)npc.position.Y / 16) - 6,
 						icon: Main.chatTexture,
 						scale: 1.35f
 					);


use simple syntax

use simple syntax

--- HarshPoint/Provisioning/HarshProvisionerContext.cs
+++ HarshPoint/Provisioning/HarshProvisionerContext.cs
@@ -21,14 +21,8 @@
             private set;
         }

-        public Site Site
-        {
-            get { return ClientContext?.Site; }
-        }
+        public Site Site => ClientContext?.Site;

-        public Web Web
-        {
-            get { return ClientContext?.Web; }
-        }
+        public Web Web => ClientContext?.Web;
     }
 }


RecordDefinitionNode: добавлено поле Name.

--- Lens.SyntaxTree/SyntaxTree/ControlFlow/RecordDefinitionNode.cs
+++ Lens.SyntaxTree/SyntaxTree/ControlFlow/RecordDefinitionNode.cs
@@ -13,6 +13,11 @@
 		{
 			Fields = new List<RecordEntry>();
 		}
+
+		/// <summary>
+		/// Record name.
+		/// </summary>
+		public string Name { get; set; }

 		/// <summary>
 		/// The fields in the record.


bug fixing

bug fixing

--- LCardAPI/LCard.Manager/ViewModels/DataViewModel.cs
+++ LCardAPI/LCard.Manager/ViewModels/DataViewModel.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Drawing;
 using System.Linq;
 using System.Text;
@@ -86,7 +87,15 @@
             }
             _deviceManager.StopDetectionLoop();
             LastUpdateTime = DateTime.MinValue;
-
+            Settings.Default.PropertyChanged += DefaultOnPropertyChanged;
+        }
+
+        private void DefaultOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
+        {
+            if (propertyChangedEventArgs.PropertyName.Contains("IsChannel"))
+            {
+                UpdateCurveList();
+            }
         }

         #region Graph Data
@@ -300,27 +309,41 @@
             windowsFormsHostGrapData.Visibility = SettingsViewModel.NumberSelectedChannels > 0 ? Visibility.Visible : Visibility.Hidden;
             // Получим панель для рисования
             var pane = zedGraphControlData.GraphPane;
-                pane.Title.Text = "";
-                pane.YAxis.Title.Text = "Напряжение, В";
-                pane.XAxis.Title.Text = "Время, с";
-                // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
-                pane.CurveList.Clear();
-                if (IsChannelEnabled(0))
-                    pane.AddCurve("Канал " + 1, datas[0], Color.Red, SymbolType.None);
-                if (IsChannelEnabled(1))
-                    pane.AddCurve("Канал " + 2, datas[1], Color.Green, SymbolType.None);
-                if (IsChannelEnabled(2))
-                    pane.AddCurve("Канал " + 3, datas[2], Color.Blue, SymbolType.None);
-                if (IsChannelEnabled(3))
-                    pane.AddCurve("Канал " + 4, datas[3], Color.Indigo, SymbolType.None);
-
-                // Вызываем метод AxisChange (), чтобы обновить данные об осях.
-                zedGraphControlData.AxisChange();
-
-                // Обновляем график
-                zedGraphControlData.Invalidate();
-
-
+            pane.Title.Text = "";
+            pane.YAxis.Title.Text = "Напряжение, В";
+            pane.XAxis.Title.Text = "Время, с";
+            // Очистим список кривых на тот случай, если до этого сигналы уже были нарисованы
+            pane.CurveList.Clear();
+            pane.AddCurve("Канал " + 1, datas[0], Color.Red, SymbolType.None);
+            pane.AddCurve("Канал " + 2, datas[1], Color.Green, SymbolType.None);
+            pane.AddCurve("Канал " + 3, datas[2], Color.Blue, SymbolType.None);
+            pane.AddCurve("Канал " + 4, datas[3], Color.Indigo, SymbolType.None);
+            UpdateCurveList();
+            // Вызываем метод AxisChange (), чтобы обновить данные об осях.
+            zedGraphControlData.AxisChange();
+
+            // Обновляем график
+            zedGraphControlData.Invalidate();
+
+
+        }
+
+        private void UpdateCurveList()
+        {
+            int j = 0;
+            foreach (var curve in zedGraphControlData.GraphPane.CurveList)
+            {
+                if (IsChannelEnabled(j))
+                {
+                    curve.IsVisible = true;
+                }
+                else
+                {
+                    curve.IsVisible = false;
+                }
+                j++;
+            }
+
         }

         private bool IsChannelEnabled(int nChannel)


BUG: CanRender didn't handle the predicate being null.

--- Masb.Mvc.TableBuilder/Templates/HelperResultTemplateSection.cs
+++ Masb.Mvc.TableBuilder/Templates/HelperResultTemplateSection.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Web.WebPages;
+using JetBrains.Annotations;

 namespace Masb.Mvc.TableBuilder
 {
@@ -7,10 +8,13 @@
         ITemplateSection<TInput, HelperResult>
         where TInput : ITemplateArgs
     {
+        [CanBeNull]
         private readonly Func<TInput, bool> predicate;
+
+        [NotNull]
         private readonly Func<TInput, HelperResult> helper;

-        public HelperResultTemplateSection(Func<TInput, HelperResult> helper, Func<TInput, bool> predicate)
+        public HelperResultTemplateSection([NotNull] Func<TInput, HelperResult> helper, [CanBeNull] Func<TInput, bool> predicate)
         {
             this.predicate = predicate;
             this.helper = helper;
@@ -25,7 +29,7 @@
         /// </returns>
         public virtual bool CanRender(TInput input)
         {
-            return this.predicate(input);
+            return this.predicate == null || this.predicate(input);
         }

         /// <summary>


caret index jumping, might be from the typing timer

Former-commit-id: 2b6eeacb4f165178be43b11fa45639f0982aa926

--- MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
@@ -140,6 +140,7 @@
             wireInPublicHandlers();
             strokeChecksums = new List<StrokeChecksum>();
             contentBuffer = new ContentBuffer();
+            UndoHistory.ShowVisualiser(Window.GetWindow(this));
             this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Delete, deleteSelectedElements, canExecute));
             Commands.SetPrivacy.RegisterCommand(new DelegateCommand<string>(SetPrivacy));
             Commands.SetInkCanvasMode.RegisterCommandToDispatcher<string>(new DelegateCommand<string>(setInkCanvasMode));
@@ -1661,9 +1662,12 @@
                                               var box = UpdateTextBoxWithId(targettedBox);
                                               //RemoveTextBoxWithMatchingId(targettedBox.identity);
                                               //AddTextBoxToCanvas(box);
-                                              if (!(targettedBox.author == me && _focusable))
-                                                  box.Focusable = false;
-                                              ApplyPrivacyStylingToElement(box, targettedBox.privacy);
+                                              if (box != null)
+                                              {
+                                                  if (!(targettedBox.author == me && _focusable))
+                                                      box.Focusable = false;
+                                                  ApplyPrivacyStylingToElement(box, targettedBox.privacy);
+                                              }
                                           }
                                       });

@@ -1694,7 +1698,11 @@
             box.TextDecorations = oldBox.TextDecorations;
             box.FontSize = oldBox.FontSize;
             box.Foreground = oldBox.Foreground;
+            box.TextChanged -= SendNewText;
+            var caret = box.CaretIndex;
             box.Text = oldBox.Text;
+            box.CaretIndex = caret;
+            box.TextChanged += SendNewText;
             box.Width = oldBox.Width;
             //box.Height = OldBox.Height;
             InkCanvas.SetLeft(box, InkCanvas.GetLeft(oldBox));
@@ -1749,8 +1757,10 @@
                 var myText = undoText.Clone().ToString();
                 mybox.TextChanged -= SendNewText;
                 mybox.Text = myText;
-                //dirtyTextBoxWithoutHistory(mybox);
-                sendTextWithoutHistory(mybox, mybox.tag().privacy);
+                /*if (String.IsNullOrEmpty(myText))
+                    dirtyTextBoxWithoutHistory(mybox);
+                else*/
+                    sendTextWithoutHistory(mybox, mybox.tag().privacy);
                 mybox.TextChanged += SendNewText;
             };
             Action redo = () =>
@@ -1759,8 +1769,10 @@
                 var myText = redoText;
                 mybox.TextChanged -= SendNewText;
                 mybox.Text = myText;
-                //dirtyTextBoxWithoutHistory(mybox);
-                sendTextWithoutHistory(mybox, mybox.tag().privacy);
+                /*if (String.IsNullOrEmpty(myText))
+                    dirtyTextBoxWithoutHistory(mybox);
+                else*/
+                    sendTextWithoutHistory(mybox, mybox.tag().privacy);
                 mybox.TextChanged += SendNewText;
             };
             UndoHistory.Queue(undo, redo, String.Format("Added text [{0}]", redoText));


image undo

image undo

Former-commit-id: e2e4f184fed3baffc3760b64262e0f7a441a5aad

--- MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
@@ -2144,8 +2144,9 @@
                 }
             }
         }
-        private void HandleImagePasteRedo(List<BitmapSource> selectedImages)
-        {
+        private List<Image> createImages(List<BitmapSource> selectedImages)
+        {
+            var images = new List<Image>();
             foreach (var imageSource in selectedImages)
             {
                 var tmpFile = "tmpImage.jpg";
@@ -2169,22 +2170,20 @@
                     image.tag(new ImageTag(Globals.me, privacy, generateId(), false, -1));
                     InkCanvas.SetLeft(image, 15);
                     InkCanvas.SetTop(image, 15);
-                    Commands.SendImage.ExecuteAsync(new TargettedImage(Globals.slide, Globals.me, _target, privacy, image));
-                }
-                else
-                    MeTLMessage.Information("Sorry, your file could not be pasted.  Try dragging and dropping, or selecting with the add image button.");
-            }
-        }
-        private void HandleImagePasteUndo(List<BitmapSource> selectedImages)
-        {
-            var imagesToDelete = new List<UIElement>();
+                    images.Add(image);
+                }
+            }
+            return images;
+        }
+        private void HandleImagePasteRedo(List<Image> selectedImages)
+        {
+            foreach (var image in selectedImages)
+                Commands.SendImage.ExecuteAsync(new TargettedImage(Globals.slide, Globals.me, _target, privacy, image));
+        }
+        private void HandleImagePasteUndo(List<Image> selectedImages)
+        {
             foreach(var image in selectedImages)
-            {
-                var matchingImages = Work.Children.ToList().Where(i => i is Image).Where(i => ((Image) (i)).Source.ToString() == image.ToString()).ToList();
-                if(matchingImages.Count > 0)
-                    imagesToDelete.AddRange(matchingImages);
-            }
-            deleteSelectedImages(imagesToDelete);
+                dirtyThisElement(image);
         }
         private MeTLTextBox setWidthOf(MeTLTextBox box)
         {
@@ -2267,11 +2266,12 @@
                 var currentChecksums = Work.Strokes.Select(s => s.sum().checksum);
                 var ink = data.Ink.Where(s => !currentChecksums.Contains(s.sum().checksum));
                 var boxes = createPastedBoxes(data.Text.ToList());
+                var images = createImages(data.Images.ToList());
                 Action undo = () =>
                                   {
                                       ClearAdorners();
                                       HandleInkPasteUndo(ink.ToList());
-                                      HandleImagePasteUndo(data.Images.ToList());
+                                      HandleImagePasteUndo(images);
                                       HandleTextPasteUndo(boxes, currentBox);
                                       AddAdorners();
                                   };
@@ -2279,7 +2279,7 @@
                                   {
                                       ClearAdorners();
                                       HandleInkPasteRedo(ink.ToList());
-                                      HandleImagePasteRedo(data.Images.ToList());
+                                      HandleImagePasteRedo(images);
                                       HandleTextPasteRedo(boxes, currentBox);
                                       AddAdorners();
                                   };
@@ -2298,8 +2298,8 @@
                 }
                 else if(Clipboard.ContainsImage())
                 {
-                    Action undo = () => HandleImagePasteUndo(new List<BitmapSource>{Clipboard.GetImage()});
-                    Action redo = () =>  HandleImagePasteRedo(new List<BitmapSource>{Clipboard.GetImage()});
+                    Action undo = () => HandleImagePasteUndo(createImages(new List<BitmapSource>{Clipboard.GetImage()}));
+                    Action redo = () =>  HandleImagePasteRedo(createImages(new List<BitmapSource>{Clipboard.GetImage()}));
                     UndoHistory.Queue(undo, redo);
                     redo();
                 }


Canvas leak?

Canvas leak?

--- tests/Avalonia.LeakTests/ControlTests.cs
+++ tests/Avalonia.LeakTests/ControlTests.cs
@@ -75,6 +75,7 @@
                             Name = "foo"
                         }.RegisterInNameScope(scope)
                     };
+                    NameScope.SetNameScope(window, scope);

                     window.Show();

@@ -85,6 +86,7 @@

                     // Clear the content and ensure the Canvas is removed.
                     window.Content = null;
+                    NameScope.SetNameScope(window, null);

                     window.LayoutManager.ExecuteLayoutPass();
                     Assert.Null(window.Presenter.Child);


String now uses the new functions

String now uses the new functions

--- NiL.JS/BaseLibrary/String.cs
+++ NiL.JS/BaseLibrary/String.cs
@@ -34,7 +34,7 @@
                 return new String();

             JSValue n;
-            uint ucs = 0;
+            int ucs = 0;
             string res = "";
             for (int i = 0; i < args.Length; i++)
             {
@@ -43,26 +43,16 @@
                 {
                     if (n._iValue < 0 || n._iValue > 0x10FFFF)
                         ExceptionHelper.Throw(new RangeError("Invalid code point " + Tools.Int32ToString(n._iValue)));
-                    ucs = (uint)n._iValue;
+                    ucs = n._iValue;
                 }
                 else if (n._valueType == JSValueType.Double)
                 {
                     if (n._dValue < 0 || n._dValue > 0x10FFFF || double.IsInfinity(n._dValue) || double.IsNaN(n._dValue) || n._dValue % 1.0 != 0.0)
                         ExceptionHelper.Throw(new RangeError("Invalid code point " + Tools.DoubleToString(n._dValue)));
-                    ucs = (uint)n._dValue;
-                }
-
-                if (ucs >= 0 && ucs <= 0xFFFF)
-                    res += ((char)ucs).ToString();
-                else if (ucs > 0xFFFF && ucs <= 0x10FFFF)
-                {
-                    ucs -= 0x10000;
-                    char h = (char)((ucs >> 10) + 0xD800);
-                    char l = (char)((ucs % 0x400) + 0xDC00);
-                    res += h.ToString() + l.ToString();
-                }
-                else
-                    ExceptionHelper.Throw(new RangeError("Invalid code point " + ucs.ToString()));
+                    ucs = (int)n._dValue;
+                }
+
+                res += Tools.CodePointToString(ucs);
             }
             return res;
         }
@@ -148,19 +138,7 @@
             if (p < 0 || p >= selfStr.Length)
                 return JSValue.undefined;

-            // look here in section 3.7 Surrogates for more information.
-            // http://unicode.org/versions/Unicode3.0.0/ch03.pdf
-
-            int code = selfStr[p];
-            if (p + 1 < selfStr.Length && code >= 0xD800 && code <= 0xDBFF)
-            {
-                // code is the high part
-                int low = selfStr[p + 1];
-                if (low >= 0xDC00 && low <= 0xDFFF)
-                    code = (code - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;
-            }
-
-            return code;
+            return Tools.NextCodePoint(selfStr, ref p);
         }

         [DoNotEnumerate]


Added NONE tag.

Added NONE tag.

--- NtApiDotNet/ReparseBuffer.cs
+++ NtApiDotNet/ReparseBuffer.cs
@@ -24,6 +24,7 @@
     /// </summary>
     public enum ReparseTag : uint
     {
+        NONE = 0,
         MOUNT_POINT = 0xA0000003,
         HSM = 0xC0000004,
         DRIVE_EXTENDER = 0x80000005,


Add more debug logs to tumbler

Add more debug logs to tumbler

--- NTumbleBit/ClassicTumbler/Server/Controllers/MainController.cs
+++ NTumbleBit/ClassicTumbler/Server/Controllers/MainController.cs
@@ -182,8 +182,9 @@
 				throw new ActionResultException(BadRequest("invalid-transaction"));
 			}

-
+			Logs.Tumbler.LogDebug("Getting key");
 			var key = Repository.GetKey(cycle.Start, request.KeyReference);
+			Logs.Tumbler.LogDebug("Gotten key");

 			var expectedEscrow = new EscrowScriptPubKeyParameters(request.ClientEscrowKey, key.PubKey, cycle.GetClientLockTime());

@@ -207,11 +208,12 @@
 			{
 				var solverServerSession = new SolverServerSession(Runtime.TumblerKey, Parameters.CreateSolverParamaters());
 				solverServerSession.ConfigureEscrowedCoin(escrowedCoin, key);
-
+				Logs.Tumbler.LogDebug("Tracking escrow...");
 				await Services.BlockExplorerService.TrackAsync(escrowedCoin.ScriptPubKey);
+				Logs.Tumbler.LogDebug("Tracking pruned funds...");
 				if(! await Services.BlockExplorerService.TrackPrunedTransactionAsync(request.Transaction, request.MerkleProof))
 					throw new ActionResultException(BadRequest("invalid-merkleproof"));
-
+				Logs.Tumbler.LogDebug("Pruned funds tracked...");
 				if(!Repository.MarkUsedNonce(cycle.Start, new uint160(key.PubKey.Hash.ToBytes())))
 				{
 					Logs.Tumbler.LogDebug("Nonce already marked");


added new integration tests

added new integration tests

--- Octokit.Tests.Integration/Clients/IssueReactionsClientTests.cs
+++ Octokit.Tests.Integration/Clients/IssueReactionsClientTests.cs
@@ -1,8 +1,8 @@
-using Octokit;
+using System;
+using System.Threading.Tasks;
+using Octokit;
 using Octokit.Tests.Integration;
 using Octokit.Tests.Integration.Helpers;
-using System;
-using System.Threading.Tasks;
 using Xunit;

 public class IssueReactionsClientTests
@@ -16,9 +16,47 @@
         public TheCreateReactionMethod()
         {
             _github = Helper.GetAuthenticatedClient();
+
+            _issuesClient = _github.Issue;
+
             var repoName = Helper.MakeNameWithTimestamp("public-repo");
-            _issuesClient = _github.Issue;
             _context = _github.CreateRepositoryContext(new NewRepository(repoName)).Result;
+        }
+
+        [IntegrationTest]
+        public async Task CanListReactions()
+        {
+            var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" };
+            var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue);
+
+            Assert.NotNull(issue);
+
+            var issueReaction = await _github.Reaction.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new NewReaction(ReactionType.Heart));
+
+            var issueReactions = await _github.Reaction.Issue.GetAll(_context.RepositoryOwner, _context.RepositoryName, issue.Number);
+
+            Assert.NotEmpty(issueReactions);
+
+            Assert.Equal(issueReaction.Id, issueReactions[0].Id);
+            Assert.Equal(issueReaction.Content, issueReactions[0].Content);
+        }
+
+        [IntegrationTest]
+        public async Task CanListReactionsWithRepositoryId()
+        {
+            var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" };
+            var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue);
+
+            Assert.NotNull(issue);
+
+            var issueReaction = await _github.Reaction.Issue.Create(_context.RepositoryOwner, _context.RepositoryName, issue.Number, new NewReaction(ReactionType.Heart));
+
+            var issueReactions = await _github.Reaction.Issue.GetAll(_context.Repository.Id, issue.Number);
+
+            Assert.NotEmpty(issueReactions);
+
+            Assert.Equal(issueReaction.Id, issueReactions[0].Id);
+            Assert.Equal(issueReaction.Content, issueReactions[0].Content);
         }

         [IntegrationTest]
@@ -40,10 +78,28 @@
             Assert.Equal(issue.User.Id, issueReaction.User.Id);
         }

+        [IntegrationTest]
+        public async Task CanCreateReactionWithRepositoryId()
+        {
+            var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" };
+            var issue = await _issuesClient.Create(_context.RepositoryOwner, _context.RepositoryName, newIssue);
+
+            Assert.NotNull(issue);
+
+            var issueReaction = await _github.Reaction.Issue.Create(_context.Repository.Id, issue.Number, new NewReaction(ReactionType.Heart));
+
+            Assert.NotNull(issueReaction);
+
+            Assert.IsType<Reaction>(issueReaction);
+
+            Assert.Equal(ReactionType.Heart, issueReaction.Content);
+
+            Assert.Equal(issue.User.Id, issueReaction.User.Id);
+        }
+
         public void Dispose()
         {
             _context.Dispose();
         }
     }
 }
-


fix: gc.DrawTextureが正しく描画されない不具合の修正 #173

--- Packages/GameCanvas/Runtime/Scripts/Engine/GcGraphicsEngine.cs
+++ Packages/GameCanvas/Runtime/Scripts/Engine/GcGraphicsEngine.cs
@@ -782,6 +782,7 @@
             var vertices = new NativeArray<float3>(4, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
             var indices = new NativeArray<ushort>(6, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
             var uvs = new NativeArray<float2>(4, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
+            var colors = new NativeArray<Color32>(4, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
             {
                 vertices[0] = new float3(0f, 0f, 0f); // 左上
                 vertices[1] = new float3(1f, 0f, 0f); // 右上
@@ -800,12 +801,19 @@
                 uvs[2] = new float2(1f, 0f); // 右下
                 uvs[3] = new float2(0f, 0f); // 左下

+                colors[0] = new Color32(0, 0, 0, 1);
+                colors[1] = new Color32(0, 0, 0, 1);
+                colors[2] = new Color32(0, 0, 0, 1);
+                colors[3] = new Color32(0, 0, 0, 1);
+
                 mesh.name = "FilledRect";
                 mesh.SetVertices(vertices);
                 mesh.SetIndices(indices, MeshTopology.Triangles, 0);
                 mesh.SetUVs(0, uvs);
+                mesh.SetColors(colors);
                 mesh.RecalculateBounds();
             }
+            colors.Dispose();
             uvs.Dispose();
             indices.Dispose();
             vertices.Dispose();


Fixed food killing you.

Fixed food killing you.

--- Pandaros.Settlers/Pandaros.Settlers/Managers/MonsterManager.cs
+++ Pandaros.Settlers/Pandaros.Settlers/Managers/MonsterManager.cs
@@ -51,8 +51,11 @@
         [ModLoader.ModCallback(ModLoader.EModCallbackType.OnPlayerHit, GameLoader.NAMESPACE + ".Managers.MonsterManager.OnPlayerHit")]
         public static void OnPlayerHit(Players.Player player, Pipliz.Box<float> box)
         {
-            var state = PlayerState.GetPlayerState(player);
-            box.Set(box.item1 + state.Difficulty.MonsterDamage);
+            if (box.item1 > 0)
+            {
+                var state = PlayerState.GetPlayerState(player);
+                box.Set(box.item1 + state.Difficulty.MonsterDamage);
+            }
         }

         [ModLoader.ModCallback(ModLoader.EModCallbackType.OnNPCHit, GameLoader.NAMESPACE + ".Managers.MonsterManager.OnNPCHit")]


Change LongCallTime on WebUtil to 3000, to match the time where request handling is considered "slow".

This may be the wrong thing to do but stops lots of log spam in HG setups now that the monitoring is extended to other outgoing calls.
LongCallTime may need to be made configurable.

--- OpenSim/Framework/WebUtil.cs
+++ OpenSim/Framework/WebUtil.cs
@@ -68,7 +68,7 @@
         /// Number of milliseconds a call can take before it is considered
         /// a "long" call for warning & debugging purposes
         /// </summary>
-        public const int LongCallTime = 500;
+        public const int LongCallTime = 3000;

         /// <summary>
         /// The maximum length of any data logged because of a long request time.


add Put, Patch, and Delete to Dispatcher

--- OwinDispatcher/Dispatcher.cs
+++ OwinDispatcher/Dispatcher.cs
@@ -32,6 +32,17 @@
         static Regex CreateRegexForUrlPattern(string urlPattern)
         {
             return new Regex(String.Concat("^", urlPattern, "$"));
+        }
+
+        public void Delete(
+            string urlPattern,
+            Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task> handler)
+        {
+            AddHandler(
+                "DELETE",
+                new Tuple<Regex, Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task>>(
+                    CreateRegexForUrlPattern(urlPattern),
+                    handler));
         }

         void EnsureHandlersHaveMethodKey(string method)
@@ -80,6 +91,17 @@
             return handler(environment, _next);
         }

+        public void Patch(
+            string urlPattern,
+            Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task> handler)
+        {
+            AddHandler(
+                "PATCH",
+                new Tuple<Regex, Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task>>(
+                    CreateRegexForUrlPattern(urlPattern),
+                    handler));
+        }
+
         public void Post(
             string urlPattern,
             Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task> handler)
@@ -90,5 +112,16 @@
                     CreateRegexForUrlPattern(urlPattern),
                     handler));
         }
+
+        public void Put(
+            string urlPattern,
+            Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task> handler)
+        {
+            AddHandler(
+                "PUT",
+                new Tuple<Regex, Func<IDictionary<string, object>, Func<IDictionary<string, object>, Task>, Task>>(
+                    CreateRegexForUrlPattern(urlPattern),
+                    handler));
+        }
     }
 }


Added SafeMibEntryBase<T>.TableAsSpan property and SafeMibTableHandle.AsReadOnlySpan method (for supported platforms)

--- PInvoke/IpHlpApi/NetIOApi.cs
+++ PInvoke/IpHlpApi/NetIOApi.cs
@@ -7816,8 +7816,13 @@
 			/// Gets the array of <typeparamref name="T"/> structures containing interface entries.
 			public virtual T[] Table => ToArray<T>((int)NumEntries, Marshal.SizeOf(typeof(ulong)));

+#if ALLOWSPAN
+			/// Gets the <see cref="Span{T}"/> containing interface entries.
+			public virtual ReadOnlySpan<T> TableAsSpan => AsReadOnlySpan<T>((int)NumEntries, Marshal.SizeOf(typeof(ulong)));
+#endif
+
 			/// Gets the enumerator.
-			public IEnumerator<T> GetEnumerator() => ((IEnumerable<T>)Table).GetEnumerator();
+			public IEnumerator<T> GetEnumerator() => ((IEnumerable<T>) Table).GetEnumerator();

 			/// Gets the enumerator.
 			IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
@@ -7839,6 +7844,14 @@
 			{
 			}

+#if ALLOWSPAN
+			/// Exposes a <see cref="ReadOnlySpan{T}"/> from the pointer.
+			/// <typeparam name="T">The structure type of the array.</typeparam>
+			/// <param name="length">The number of span elements.</param>
+			/// <param name="prefixBytes">The number of bytes to skip before processing the array.</param>
+			public ReadOnlySpan<T> AsReadOnlySpan<T>(int length, int prefixBytes = 0) => IsInvalid ? null : handle.AsReadOnlySpan<T>(length, prefixBytes);
+#endif
+
 			/// Extracts the array from the pointer.
 			/// <typeparam name="T">The structure type of the array.</typeparam>
 			/// <param name="count">The number of items.</param>


Add list of size

Add list of size

--- Pinta.Core/Tools/TextTool.cs
+++ Pinta.Core/Tools/TextTool.cs
@@ -225,9 +225,9 @@

 		#region ToolBar

-		private ToolBarLabel font_label;
-		private ToolBarComboBox font_combo;
-		private ToolBarComboBox size_combo;
+		private ToolBarLabel font_label = null;
+		private ToolBarComboBox font_combo = null;
+		private ToolBarComboBox size_combo = null;

 		protected override void OnBuildToolBar (Gtk.Toolbar tb)
 		{
@@ -250,26 +250,51 @@
 			List<Pango.FontFamily> fonts = new List<Pango.FontFamily> (PintaCore.Chrome.DrawingArea.PangoContext.Families);
 			List<string> entries = new List<string> ();
 			fonts.ForEach( f => entries.Add(f.Name));
-
+			//by default Arial!
+			int index = entries.IndexOf("Arial");
+			if (index < 0)
+				index = 0;
 			if (font_combo == null)
-				font_combo = new ToolBarComboBox (100, 0, false, entries.ToArray());
+				font_combo = new ToolBarComboBox (100, index, false, entries.ToArray());

 			tb.AppendItem (font_combo);

 			//size depend on font and modifier (italic, bold,...)
-			int sizes;
-			int nsizes;
-			fonts.Find(f => f.Name == font_combo.ComboBox.ActiveText ).Faces[0].ListSizes(out sizes, out nsizes);
+			Pango.FontFamily fam = fonts.Find(f => f.Name == font_combo.ComboBox.ActiveText);
+
 			entries.Clear ();
-			for (int i = sizes; i< nsizes ; i++) //TODO find the good use of nsize
+			foreach (int i in GetSizeList(fam.Faces[0])) {
 				entries.Add (i.ToString());
+			}
+			//by default 11!
+			index = entries.IndexOf("11");
+			if (index < 0)
+				index = 0;

+			//TODO combobox editable if font is scalable
 			if (size_combo == null)
-				size_combo = new ToolBarComboBox (20, 0, false, entries.ToArray());
+				size_combo = new ToolBarComboBox (30, index, true, entries.ToArray());

 			tb.AppendItem (size_combo);
 		}
+
+		private unsafe List<int> GetSizeList (Pango.FontFace fontFace)
+		{
+			List<int> result = new List<int> ();
+			int sizes;
+			int nsizes;
+			fontFace.ListSizes(out sizes, out nsizes);
+			if (nsizes == 0)
+				result.AddRange(new int[]{6,7,8,9,10,11,12,14,15, 16,18,20,22,24,26,28,32,36,40,44,48,54,60,66,72,80,88,96});
+			else {
+				for (int i = 0; i < nsizes; i++) {
+					result.Add(* (& sizes + 4 * i));
+				}
+			}
+			return result;
+		}
+
 		#endregion

         protected override void OnDeactivated()


Added static GetAll() method that returns NamedEnum instances for all possible values of a given Enum type. Use the assembly-specific version I18N.GetText() to get the enum names from the assembly that defines the enum's type.

--- PlayOnline.Core/NamedEnum.cs
+++ PlayOnline.Core/NamedEnum.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Globalization;
 using System.Reflection;
 using System.Resources;
@@ -12,8 +13,9 @@

     public NamedEnum(object EnumValue) {
       this.EnumValue_ = EnumValue;
+      // TODO: Maybe use FullName?
     string MessageName = String.Format("E:{0}.{1}", EnumValue.GetType().Name, EnumValue);
-      this.EnumValueName_ = I18N.GetText(MessageName);
+      this.EnumValueName_ = I18N.GetText(MessageName, EnumValue.GetType().Assembly);
       if (this.EnumValueName_ == MessageName)
 	this.EnumValueName_ = EnumValue.ToString();
     }
@@ -30,6 +32,15 @@
       }
     }

+    public static NamedEnum[] GetAll(Type T) {
+      if (!T.IsEnum)
+	return null;
+    ArrayList Values = new ArrayList();
+      foreach (FieldInfo FI in T.GetFields(BindingFlags.Public | BindingFlags.Static))
+	Values.Add(new NamedEnum(FI.GetValue(null)));
+      return (NamedEnum[]) Values.ToArray(typeof(NamedEnum));
+    }
+
   }

 }


Download HL2 and OpenVR binaries

Download HL2 and OpenVR binaries

--- Processors/FileDownloader.cs
+++ Processors/FileDownloader.cs
@@ -123,6 +123,14 @@
                     "hl2/hl2_textures_dir.vpk"
                 }
             },
+            {
+                223,
+                new List<string>
+                {
+                    "hl2/bin/client.dylib",
+                    "hl2/bin/server.dylib"
+                }
+            },
             // Half-Life 2: Episode One
             {
                 389,
@@ -237,6 +245,15 @@
                 {
                     "left4dead2/bin/client.dylib",
                     "left4dead2/bin/server.dylib"
+                }
+            },
+            // OpenVR
+            {
+                250822,
+                new List<string>
+                {
+                    "bin/openvr.dylib",
+                    "bin/vrclient.dylib"
                 }
             },
         };


add OpenInNotepad, uppercase

add OpenInNotepad, uppercase

--- google-code-jam/SolutionTemplate.cs
+++ google-code-jam/SolutionTemplate.cs
@@ -28,7 +28,7 @@
             System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-US");
         }

-        static String getLatestInput(String inputFolder, String problem, String size)
+        static String GetLatestInput(String inputFolder, String problem, String size)
         {
             // This may be a little slow, so ideally the inputFolder should only contain the actual input files.
             DirectoryInfo directory = new DirectoryInfo(inputFolder);
@@ -39,6 +39,14 @@
                 .Last().FullName;
             Console.WriteLine("Using {0} as input.", file);
             return file;
+        }
+
+        static void OpenInNotepad(String path)
+        {
+            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
+            startInfo.FileName = @"C:\Program Files (x86)\Notepad++\notepad++.exe";
+            startInfo.Arguments = path;
+            System.Diagnostics.Process.Start(startInfo);
         }
         #endregion

@@ -73,10 +81,11 @@

             }

+            Console.WriteLine("DONE - press any key to escape");
+            Console.ReadKey();
+            OpenInNotepad(((FileStream)(sw.BaseStream)).Name);
             sr.Close();
             sw.Close();
-            Console.WriteLine("DONE - press any key to escape");
-            Console.ReadKey();
         }
     }
 }


PG-1402: Check for null ReportingClauses before adding new one

--- GlyssenEngine/Project.cs
+++ GlyssenEngine/Project.cs
@@ -531,6 +531,8 @@
 		public bool AddNewReportingClauses(IEnumerable<string> reportingClauses)
 		{
 			var retVal = false;
+			if (m_metadata.Language.ReportingClauses == null)
+				m_metadata.Language.ReportingClauses = new HashSet<string>();
 			foreach (var reportingClause in reportingClauses)
 				retVal |= m_metadata.Language.ReportingClauses.Add(reportingClause);
 			return retVal;


build: Incremented patch version,

build: Incremented patch version,

to indicate that this fixes some bugs.

--- build/CommonAssemblyInfo.cs
+++ build/CommonAssemblyInfo.cs
@@ -10,13 +10,16 @@
 [assembly: ComVisible(false)]
 [assembly: NeutralResourcesLanguage("en-US")]
 [assembly: AssemblyProduct("")]
-[assembly: AssemblyVersion("2.0.2")]
-[assembly: AssemblyInformationalVersion("2.0.2")]
+[assembly: AssemblyVersion("2.0.3")]
+[assembly: AssemblyInformationalVersion("2.0.3")]

 /*
- * Version 2.0.2
+ * Version 2.0.3
  *
- * - The release does not have any changes, but rather is to publish symbol and
- *   source to the server("https://www.symbolsource.org/") because when
- *   publishing the previous release to it, the server was unavailable.
+ * - [Patch] Provided default constructor of TestFixture.
+ *
+ * - [Patch] Supported passing auto-data to methods of first-class-test style.
+ *
+ * - [Patch] Fixed auto-data requests of test methods weren't ParameterInfo(s),
+ *   but rather types of the parameters.
  */


Ajout get<Type>

Ajout get<Type>

--- projTut/Variable.cs
+++ projTut/Variable.cs
@@ -18,6 +18,7 @@
         public Variable (string nom)
         {
             this.nom = nom;
+            contentKnown = false;
             type = new Type();
         }

@@ -85,6 +86,32 @@
                 throw new Exception("Valeur non connu");
         }

+        public bool getBool()
+        {
+            if (isKnown())
+            {
+                if (getType().type == Type.types.BOOLEAN)
+                    return contentBool;
+                else
+                    throw new Exception("Erreur de type");
+            }
+            else
+                throw new Exception("Valeur non connu");
+        }
+
+        public float getFloat()
+        {
+            if (isKnown())
+            {
+                if (getType().type == Type.types.REEL)
+                    return contentFloat;
+                else
+                    throw new Exception("Erreur de type");
+            }
+            else
+                throw new Exception("Valeur non connu");
+        }
+
         public Type getType()
         {
             return type;


Fix tests

Fix tests

--- test/Microsoft.AspNet.Hosting.Tests/HostingEngineTests.cs
+++ test/Microsoft.AspNet.Hosting.Tests/HostingEngineTests.cs
@@ -466,7 +466,7 @@
                 var env = engine.ApplicationServices.GetRequiredService<IHostingEnvironment>();
                 // MapPath requires webroot to be set, we don't care
                 // about file provider so  just set it here
-                env.WebRootPath = "";
+                env.WebRootPath = ".";
                 var mappedPath = env.MapPath(virtualPath);
                 expectedSuffix = expectedSuffix.Replace('/', Path.DirectorySeparatorChar);
                 Assert.Equal(Path.Combine(env.WebRootPath, expectedSuffix), mappedPath);


Adding a few tests around the changes to metrics only bulkheads

--- tests/unit/Hudl.Mjolnir.Tests/Command/BulkheadInvokerTests.cs
+++ tests/unit/Hudl.Mjolnir.Tests/Command/BulkheadInvokerTests.cs
@@ -143,7 +143,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };

                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it.
@@ -175,7 +175,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };
                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it. Pass a "false" value for useCircuitBreakers to help
                 // ensure that.
@@ -210,7 +210,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };

                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it. Pass a "false" value for useCircuitBreakers to help
@@ -244,7 +244,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };

                 // Pass false for useCircuitBreakers to bypass the breaker; we're testing that here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
@@ -277,7 +277,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };

                 // Pass false for useCircuitBreakers to bypass the breaker; we're testing that here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
@@ -315,7 +315,7 @@
                 mockBreakerInvoker.Setup(m => m.ExecuteWithBreakerAsync(command, It.IsAny<CancellationToken>()))
                     .Returns(Task.FromResult(true));

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };

                 // Pass true for useCircuitBreakers, we need to test that behavior here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
@@ -354,7 +354,7 @@
                 mockBreakerInvoker.Setup(m => m.ExecuteWithBreakerAsync(command, It.IsAny<CancellationToken>()))
                     .Throws(new ExpectedTestException(command.Name));

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };

                 // Pass true for useCircuitBreakers, we need to test that behavior here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
@@ -491,7 +491,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };
                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
@@ -522,7 +522,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };

                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it. Pass a "false" value for useCircuitBreakers to help
@@ -558,7 +558,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };
                 // The breaker invoker behavior doesn't matter here, we shouldn't get to the point
                 // where we try to use it. Pass a "false" value for useCircuitBreakers to help
                 // ensure that.
@@ -591,7 +591,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };
                 // Pass false for useCircuitBreakers to bypass the breaker; we're testing that here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
                 var command = new ConfigurableKeyCommand(key);
@@ -623,7 +623,7 @@
                 var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
                 mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = false};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = false };
                 // Pass false for useCircuitBreakers to bypass the breaker; we're testing that here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);
                 var command = new ConfigurableKeyThrowingCommand(key);
@@ -660,7 +660,7 @@
                 mockBreakerInvoker.Setup(m => m.ExecuteWithBreaker(command, It.IsAny<CancellationToken>()))
                     .Returns(true);

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };
                 // Pass true for useCircuitBreakers, we need to test that behavior here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);

@@ -698,7 +698,7 @@
                 mockBreakerInvoker.Setup(m => m.ExecuteWithBreaker(command, It.IsAny<CancellationToken>()))
                     .Throws(new ExpectedTestException(command.Name));

-                var mockConfig = new MjolnirConfiguration {UseCircuitBreakers = true};
+                var mockConfig = new MjolnirConfiguration { UseCircuitBreakers = true };
                 // Pass true for useCircuitBreakers, we need to test that behavior here.
                 var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, mockConfig);

@@ -707,6 +707,80 @@
                 Assert.Throws<ExpectedTestException>(() => invoker.ExecuteWithBulkhead(command, CancellationToken.None));

                 Assert.Equal(0, command.ExecutionTimeMillis);
+            }
+
+            [Fact]
+            public async Task DoesntThrowRejectionException_When_BulkheadInMetricsMode()
+            {
+                var mockBreakerInvoker = new Mock<IBreakerInvoker>();
+                var mockMetricEvents = new Mock<IMetricEvents>();
+                var key = "key";
+                var groupKey = GroupKey.Named(key);
+                var mockBulkhead = new Mock<ISemaphoreBulkhead>();
+                mockBulkhead.Setup(m => m.TryEnter()).Returns(false);
+                mockBulkhead.SetupGet(m => m.Name).Returns(key);
+                var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
+                mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);
+                var command = new ConfigurableKeyAsyncCommand(key);
+                var config = new MjolnirConfiguration()
+                {
+                    BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration> { { key, new BulkheadConfiguration { MetricsOnly = true } } }
+                };
+                var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, config);
+                var result = await invoker.ExecuteWithBulkheadAsync(command, CancellationToken.None);
+                mockBulkhead.Verify(i => i.TryEnter(), Times.Once);
+                // Make sure that we don't Release in this case otherwise this would increase the semaphore count too much.
+                mockBulkhead.Verify(i => i.Release(), Times.Never);
+            }
+
+            [Fact]
+            public async Task DoesntThrowRejectionException_When_GlobalBulkheadInMetricsMode()
+            {
+                var mockBreakerInvoker = new Mock<IBreakerInvoker>();
+                var mockMetricEvents = new Mock<IMetricEvents>();
+                var key = "key";
+                var groupKey = GroupKey.Named(key);
+                var mockBulkhead = new Mock<ISemaphoreBulkhead>();
+                mockBulkhead.Setup(m => m.TryEnter()).Returns(false);
+                mockBulkhead.SetupGet(m => m.Name).Returns(key);
+                var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
+                mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);
+                var command = new ConfigurableKeyAsyncCommand(key);
+                var config = new MjolnirConfiguration()
+                {
+                    BulkheadMetricsOnly = true,
+                    BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration> { { key, new BulkheadConfiguration { MetricsOnly = false } } }
+                };
+                var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, config);
+                var result = await invoker.ExecuteWithBulkheadAsync(command, CancellationToken.None);
+                mockBulkhead.Verify(i => i.TryEnter(), Times.Once);
+                // Make sure that we don't Release in this case otherwise this would increase the semaphore count too much.
+                mockBulkhead.Verify(i => i.Release(), Times.Never);
+            }
+
+            [Fact]
+            public async Task CallsMetricsEvents_When_GlobalBulkheadInMetricsMode()
+            {
+                var mockBreakerInvoker = new Mock<IBreakerInvoker>();
+                var mockMetricEvents = new Mock<IMetricEvents>();
+                var key = "key";
+                var groupKey = GroupKey.Named(key);
+                var mockBulkhead = new Mock<ISemaphoreBulkhead>();
+                mockBulkhead.Setup(m => m.TryEnter()).Returns(false);
+                mockBulkhead.SetupGet(m => m.Name).Returns(key);
+                var mockBulkheadFactory = new Mock<IBulkheadFactory>(MockBehavior.Strict);
+                mockBulkheadFactory.Setup(m => m.GetBulkhead(groupKey)).Returns(mockBulkhead.Object);
+                var command = new ConfigurableKeyAsyncCommand(key);
+                var config = new MjolnirConfiguration()
+                {
+                    BulkheadMetricsOnly = true,
+                    BulkheadConfigurations = new Dictionary<string, BulkheadConfiguration> { { key, new BulkheadConfiguration { MetricsOnly = false } } }
+                };
+                var invoker = new BulkheadInvoker(mockBreakerInvoker.Object, mockBulkheadFactory.Object, mockMetricEvents.Object, config);
+                var result = await invoker.ExecuteWithBulkheadAsync(command, CancellationToken.None);
+                mockMetricEvents.Verify(i => i.RejectedByBulkhead(key, $"{key}.{nameof(ConfigurableKeyAsyncCommand)}"));
+                mockMetricEvents.Verify(i => i.EnterBulkhead(key, $"{key}.{nameof(ConfigurableKeyAsyncCommand)}"));
+                mockMetricEvents.Verify(i => i.LeaveBulkhead(key, $"{key}.{nameof(ConfigurableKeyAsyncCommand)}"));
             }
         }


Fix unhandled chat characters

Fix unhandled chat characters

--- src/Alex/Gamestates/PlayingState.cs
+++ src/Alex/Gamestates/PlayingState.cs
@@ -74,7 +74,7 @@
         private void Client_OnStartGame(MiNET.Worlds.GameMode gamemode, MiNET.Utils.Vector3 spawnPoint, long entityId)
         {
             McpeRequestChunkRadius request = McpeRequestChunkRadius.CreateObject();
-            request.chunkRadius = 4;
+            request.chunkRadius = 12;
             Client.SendPackage(request);
             Game.GetCamera().Position = new Vector3((float) spawnPoint.X, (float) spawnPoint.Y, (float) spawnPoint.Z);
         }
@@ -145,7 +145,10 @@
 		    var count = 2;
 		    foreach (var msg in ChatMessages.TakeLast(5).Reverse())
 		    {
-		        var heightCalc = Alex.Font.MeasureString(msg);
+		        var amsg = msg.ToArray()
+		            .Where(i => !Alex.Font.Characters.Contains(i))
+		            .Aggregate(msg, (current, i) => current.Replace(i.ToString(), ""));
+		        var heightCalc = Alex.Font.MeasureString(amsg);

 		        int extra = 0;
 		        if (heightCalc.X > args.GraphicsDevice.Viewport.Width/2f)
@@ -157,7 +160,7 @@
 		            new Rectangle(0, (int) (args.GraphicsDevice.Viewport.Height - ((heightCalc.Y*count) + 10)),
                         (args.GraphicsDevice.Viewport.Width / 2) + extra, (int) heightCalc.Y),
 		            new Color(Color.Black, 64));
-		        args.SpriteBatch.DrawString(Alex.Font, msg,
+		        args.SpriteBatch.DrawString(Alex.Font, amsg,
 		            new Vector2(5, (int) (args.GraphicsDevice.Viewport.Height - ((heightCalc.Y*count) + 10))), Color.White);
 		        count++;
 		    }


Fix typo in BlendMode.cs

Fix typo in BlendMode.cs

Change "Substracts" to "Subtracts".

--- src/AngleSharp.Css/Dom/BlendMode.cs
+++ src/AngleSharp.Css/Dom/BlendMode.cs
@@ -67,7 +67,7 @@
         /// </summary>
         SoftLight,
         /// <summary>
-        /// Substracts the darker color to the lighter one. Black on the foreground
+        /// Subtracts the darker color to the lighter one. Black on the foreground
         /// has therefore no effect, white leads to the color of the backdrop, inverted.
         /// </summary>
         Difference,


Hmm.. Am I talking to the git repo? \o/

Hmm.. Am I talking to the git repo? \o/

--- tests/NetIRC.Tests/Connection/TcpClientConnectionTests.cs
+++ tests/NetIRC.Tests/Connection/TcpClientConnectionTests.cs
@@ -113,7 +113,7 @@
                 }
             }

-            Assert.True(pause.WaitOne(5000)); // Is this enough to make Appveyor happy? Let's see
+            Assert.True(pause.WaitOne(60000)); // Are you kiddin me? Let's see

             Assert.True(disconnected);
         }


Fix for failing Linux tests on TeamCity (20190417)

--- src/BloomExe/Book/BookCompressor.cs
+++ src/BloomExe/Book/BookCompressor.cs
@@ -306,13 +306,14 @@
 			var currentCulture = CultureInfo.CurrentCulture;
 			try
 			{
-				if (entry.Name.EndsWith(".txt"))
+				if (SIL.PlatformUtilities.Platform.IsWindows && entry.Name.EndsWith(".txt"))
 					CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
 				zipStream.PutNextEntry(entry);
 			}
 			finally
 			{
-				CultureInfo.CurrentCulture = currentCulture;
+				if (SIL.PlatformUtilities.Platform.IsWindows && entry.Name.EndsWith(".txt"))
+					CultureInfo.CurrentCulture = currentCulture;
 			}
 		}


Cosmetic

Cosmetic

--- trunk/Solutions/CslaGenFork/Metadata/CriteriaUsageParameter.cs
+++ trunk/Solutions/CslaGenFork/Metadata/CriteriaUsageParameter.cs
@@ -44,7 +44,7 @@
             }
         }

-        [Description("Defines whether you want to generate the collection Add/Remove method or not.\r\n" +
+        [Description("Defines whether you want to generate the collection Add/Remove method for this criteria.\r\n" +
             "This property is set on the collection item although the method is generated in the collection class.")]
         [UserFriendlyName("Add/Remove")]
         public bool AddRemove
@@ -72,7 +72,8 @@
             set { _runLocal = value; }
         }

-        [Description("Defines whether you want to generate the stored procedure or not.")]
+        [Description("Defines whether you want to generate the stored procedure or not.\r\n" +
+            "You might need to specify the stored procedure name, as the DataPortal method will use.")]
         public bool Procedure
         {
             get { return _procedure; }


Revert "Ignore comments and whitespace when parsing read-only XML files (#6232)" (#6669)

This reverts commit 1d1fec7c49795b247fc45fac0fb1fdd736c6a368.

--- src/Build/Xml/XmlReaderExtension.cs
+++ src/Build/Xml/XmlReaderExtension.cs
@@ -1,11 +1,8 @@
 using System;
-using System.Diagnostics;
 using System.IO;
-using System.Reflection;
 using System.Text;
 using System.Xml;
 using Microsoft.Build.Shared;
-using Microsoft.Build.Utilities;

 namespace Microsoft.Build.Internal
 {
@@ -28,16 +25,6 @@
         private static readonly Encoding s_utf8NoBom = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
         private readonly Stream _stream;
         private readonly StreamReader _streamReader;
-
-        /// <summary>
-        /// Caches a <see cref="PropertyInfo"/> representing the "Normalization" internal property on the <see cref="XmlReader"/>-derived
-        /// type returned from <see cref="XmlReader.Create(TextReader, XmlReaderSettings, string)"/>. The cache is process/AppDomain-wide
-        /// and lock-free, so we use volatile access for thread safety, i.e. to ensure that when the field is updated the PropertyInfo
-        /// it's pointing to is seen as fully initialized by all CPUs.
-        /// </summary>
-        private static volatile PropertyInfo _normalizationPropertyInfo;
-
-        private static bool _disableReadOnlyLoad;

         private XmlReaderExtension(string file, bool loadAsReadOnly)
         {
@@ -84,61 +71,15 @@
             _stream?.Dispose();
         }

-        /// <summary>
-        /// Returns <see cref="PropertyInfo"/> of the "Normalization" internal property on the given <see cref="XmlReader"/>-derived type.
-        /// </summary>
-        private static PropertyInfo GetNormalizationPropertyInfo(Type xmlReaderType)
-        {
-            PropertyInfo propertyInfo = _normalizationPropertyInfo;
-            if (propertyInfo == null)
-            {
-                BindingFlags bindingFlags = BindingFlags.NonPublic | BindingFlags.SetProperty | BindingFlags.Instance;
-                propertyInfo = xmlReaderType.GetProperty("Normalization", bindingFlags);
-                _normalizationPropertyInfo = propertyInfo;
-            }
-
-            return propertyInfo;
-        }
-
         private static XmlReader GetXmlReader(string file, StreamReader input, bool loadAsReadOnly, out Encoding encoding)
         {
             string uri = new UriBuilder(Uri.UriSchemeFile, string.Empty) { Path = file }.ToString();

-            XmlReader reader = null;
-            if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave16_10) && loadAsReadOnly && !_disableReadOnlyLoad)
-            {
-                // Create an XML reader with IgnoreComments and IgnoreWhitespace set if we know that we won't be asked
-                // to write the DOM back to a file. This is a performance optimization.
-                XmlReaderSettings settings = new XmlReaderSettings
-                {
-                    DtdProcessing = DtdProcessing.Ignore,
-                    IgnoreComments = true,
-                    IgnoreWhitespace = true,
-                };
-                reader = XmlReader.Create(input, settings, uri);
-
-                // Try to set Normalization to false. We do this to remain compatible with earlier versions of MSBuild
-                // where we constructed the reader with 'new XmlTextReader()' which has normalization enabled by default.
-                PropertyInfo normalizationPropertyInfo = GetNormalizationPropertyInfo(reader.GetType());
-                if (normalizationPropertyInfo != null)
-                {
-                    normalizationPropertyInfo.SetValue(reader, false);
-                }
-                else
-                {
-                    // Fall back to using XmlTextReader if the prop could not be bound.
-                    Debug.Fail("Could not set Normalization to false on the result of XmlReader.Create");
-                    _disableReadOnlyLoad = true;
-
-                    reader.Dispose();
-                    reader = null;
-                }
-            }
-
-            if (reader == null)
-            {
-                reader = new XmlTextReader(uri, input) { DtdProcessing = DtdProcessing.Ignore };
-            }
+
+            // Ignore loadAsReadOnly for now; using XmlReader.Create results in whitespace changes
+            // of attribute text, specifically newline removal.
+            // https://github.com/Microsoft/msbuild/issues/4210
+            XmlReader reader = new XmlTextReader(uri, input) { DtdProcessing = DtdProcessing.Ignore };

             reader.Read();
             encoding = input.CurrentEncoding;