Switch to using DirectoryInfo/DriveInfo

Switch to using DirectoryInfo/DriveInfo

--- osu.Game.Tests/Visual/Settings/TestSceneDirectorySelector.cs
+++ osu.Game.Tests/Visual/Settings/TestSceneDirectorySelector.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System;
 using System.IO;
 using System.Linq;
 using osu.Framework.Allocation;
@@ -8,11 +9,11 @@
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Sprites;
+using osu.Framework.Input.Events;
 using osu.Framework.Platform;
 using osu.Game.Graphics;
 using osu.Game.Graphics.Containers;
 using osu.Game.Graphics.Sprites;
-using osu.Game.Graphics.UserInterface;
 using osuTK;

 namespace osu.Game.Tests.Visual.Settings
@@ -28,18 +29,17 @@

     public class DirectorySelector : CompositeDrawable
     {
-        private Storage root;
         private FillFlowContainer directoryFlow;
-        private CurrentDirectoryDisplay current;

         [Resolved]
         private GameHost host { get; set; }

-        private readonly Bindable<string> currentDirectory = new Bindable<string>();
-
-        public DirectorySelector(Storage root = null)
-        {
-            this.root = root;
+        [Cached]
+        private readonly Bindable<DirectoryInfo> currentDirectory = new Bindable<DirectoryInfo>();
+
+        public DirectorySelector(string initialPath = null)
+        {
+            currentDirectory.Value = new DirectoryInfo(initialPath ??= Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
         }

         protected override void LoadComplete()
@@ -47,9 +47,6 @@
             base.LoadComplete();

             Padding = new MarginPadding(10);
-
-            if (root == null)
-                root = host.GetStorage("/Users/");

             InternalChildren = new Drawable[]
             {
@@ -59,9 +56,8 @@
                     Direction = FillDirection.Vertical,
                     Children = new Drawable[]
                     {
-                        current = new CurrentDirectoryDisplay
+                        new CurrentDirectoryDisplay
                         {
-                            CurrentDirectory = { BindTarget = currentDirectory },
                             RelativeSizeAxes = Axes.X,
                             Height = 50,
                         },
@@ -79,29 +75,39 @@
                 },
             };

-            currentDirectory.BindValueChanged(updateDisplay);
-            currentDirectory.Value = root.GetFullPath(string.Empty);
-        }
-
-        private void updateDisplay(ValueChangedEvent<string> directory)
-        {
-            root = host.GetStorage(directory.NewValue);
-
+            currentDirectory.BindValueChanged(updateDisplay, true);
+        }
+
+        private void updateDisplay(ValueChangedEvent<DirectoryInfo> directory)
+        {
             directoryFlow.Clear();

-            directoryFlow.Add(new ParentDirectoryRow(getParentPath()) { CurrentDirectory = { BindTarget = currentDirectory }, });
-
-            foreach (var dir in root.GetDirectories(string.Empty))
-                directoryFlow.Add(new DirectoryRow(dir, root.GetFullPath(dir)) { CurrentDirectory = { BindTarget = currentDirectory }, });
-        }
-
-        private string getParentPath() => Path.GetFullPath(Path.Combine(root.GetFullPath(string.Empty), ".."));
+            if (directory.NewValue == null)
+            {
+                // var drives = DriveInfo.GetDrives();
+                //
+                // foreach (var drive in drives)
+                //     directoryFlow.Add(new DirectoryRow(drive.RootDirectory));
+            }
+            else
+            {
+                directoryFlow.Add(new ParentDirectoryRow(currentDirectory.Value.Parent));
+
+                foreach (var dir in currentDirectory.Value.GetDirectories().OrderBy(d => d.Name))
+                {
+                    if ((dir.Attributes & FileAttributes.Hidden) == 0)
+                        directoryFlow.Add(new DirectoryRow(dir));
+                }
+            }
+        }

         public class CurrentDirectoryDisplay : CompositeDrawable
         {
-            public readonly Bindable<string> CurrentDirectory = new Bindable<string>();
-
-            public CurrentDirectoryDisplay()
+            [Resolved]
+            private Bindable<DirectoryInfo> currentDirectory { get; set; }
+
+            [BackgroundDependencyLoader]
+            private void load()
             {
                 FillFlowContainer flow;

@@ -118,75 +124,75 @@
                     },
                 };

-                CurrentDirectory.BindValueChanged(dir =>
+                currentDirectory.BindValueChanged(dir =>
                 {
                     flow.Clear();

-                    flow.Add(new OsuSpriteText { Text = "Current Directory: " });
-
-                    var pieces = dir.NewValue.Split(Path.DirectorySeparatorChar);
-
-                    pieces[0] = "/";
-
-                    for (int i = 0; i < pieces.Length; i++)
-                    {
-                        flow.Add(new DirectoryRow(pieces[i], Path.Combine(pieces.Take(i + 1).ToArray()))
-                        {
-                            CurrentDirectory = { BindTarget = CurrentDirectory },
-                            RelativeSizeAxes = Axes.Y,
-                            Size = new Vector2(100, 1)
-                        });
+                    flow.Add(new OsuSpriteText
+                    {
+                        Text = "Current Directory: ",
+                        Font = OsuFont.Default.With(size: DirectoryRow.HEIGHT),
+                    });
+
+                    flow.Add(new DirectoryRow(null, "Computer"));
+
+                    DirectoryInfo traverse = dir.NewValue;
+
+                    while (traverse != null)
+                    {
+                        flow.Add(new DirectoryRow(traverse));
+                        traverse = traverse.Parent;
+                    }
+                }, true);
+            }
+        }
+
+        private class ParentDirectoryRow : DirectoryRow
+        {
+            public override IconUsage Icon => FontAwesome.Solid.Folder;
+
+            public ParentDirectoryRow(DirectoryInfo directory)
+                : base(directory, "..")
+            {
+            }
+        }
+
+        private class DirectoryRow : CompositeDrawable
+        {
+            public const float HEIGHT = 20;
+
+            private readonly DirectoryInfo directory;
+
+            [Resolved]
+            private Bindable<DirectoryInfo> currentDirectory { get; set; }
+
+            public DirectoryRow(DirectoryInfo directory, string display = null)
+            {
+                this.directory = directory;
+
+                AutoSizeAxes = Axes.X;
+                Height = HEIGHT;
+
+                AddRangeInternal(new Drawable[]
+                {
+                    new SpriteIcon
+                    {
+                        Icon = Icon,
+                        Size = new Vector2(HEIGHT)
+                    },
+                    new OsuSpriteText
+                    {
+                        X = HEIGHT + 5,
+                        Text = display ?? directory.Name,
+                        Font = OsuFont.Default.With(size: HEIGHT)
                     }
                 });
             }
-        }
-
-        private class ParentDirectoryRow : DirectoryRow
-        {
-            public override IconUsage Icon => FontAwesome.Solid.Folder;
-
-            public ParentDirectoryRow(string fullPath)
-                : base("..", fullPath)
-            {
-            }
-        }
-
-        private class DirectoryRow : OsuButton
-        {
-            private readonly string fullPath;
-
-            public readonly Bindable<string> CurrentDirectory = new Bindable<string>();
-
-            public DirectoryRow(string display, string fullPath)
-            {
-                this.fullPath = fullPath;
-
-                RelativeSizeAxes = Axes.X;
-                Height = 20;
-
-                BackgroundColour = OsuColour.Gray(0.1f);
-
-                AddRange(new Drawable[]
-                {
-                    new SpriteIcon
-                    {
-                        Icon = Icon,
-                        Size = new Vector2(20)
-                    },
-                    new OsuSpriteText
-                    {
-                        X = 25,
-                        Text = display,
-                        Font = OsuFont.Default.With(size: 20)
-                    }
-                });
-
-                Action = PerformDirectoryTraversal;
-            }
-
-            protected virtual void PerformDirectoryTraversal()
-            {
-                CurrentDirectory.Value = fullPath;
+
+            protected override bool OnClick(ClickEvent e)
+            {
+                currentDirectory.Value = directory;
+                return true;
             }

             public virtual IconUsage Icon => FontAwesome.Regular.Folder;


Fix RDP cmdlet

Fix RDP cmdlet

--- src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs
+++ src/ResourceManager/Compute/Commands.Compute/RemoteDesktop/GetAzureRemoteDesktopFileCommand.cs
@@ -69,6 +69,10 @@
             set;
         }

+        const string PublicIPAddressResource = "publicIPAddresses";
+        const string NetworkInterfaceResouce = "networkInterfaces";
+        const string LoadBalancerResouce = "loadBalancers";
+
         public override void ExecuteCmdlet()
         {
             base.ExecuteCmdlet();
@@ -85,21 +89,19 @@
                 // Get Azure VM
                 var vmResponse = this.VirtualMachineClient.Get(this.ResourceGroupName, this.Name);

+                var nicId = vmResponse.VirtualMachine.NetworkProfile.NetworkInterfaces.First().ReferenceUri;
+
                 // Get the NIC
-                var nicResourceGroupName =
-                    this.GetResourceGroupName(vmResponse.VirtualMachine.NetworkProfile.NetworkInterfaces.First().ReferenceUri);
-
-                var nicName =
-                    this.GetResourceName(
-                        vmResponse.VirtualMachine.NetworkProfile.NetworkInterfaces.First().ReferenceUri, "networkInterfaces");
-
-                var nic =
-                    this.NetworkClient.NetworkManagementClient.NetworkInterfaces.Get(nicResourceGroupName, nicName);
-
-                if (nic.IpConfigurations.First().PublicIPAddress != null && !string.IsNullOrEmpty(nic.IpConfigurations.First().Id))
+                var nicResourceGroupName = this.GetResourceGroupName(nicId);
+
+                var nicName = this.GetResourceName(nicId, NetworkInterfaceResouce);
+
+                var nic = this.NetworkClient.NetworkManagementClient.NetworkInterfaces.Get(nicResourceGroupName, nicName);
+
+                if (nic.IpConfigurations.First().PublicIPAddress != null && !string.IsNullOrEmpty(nic.IpConfigurations.First().PublicIPAddress.Id))
                 {
                     // Get PublicIPAddress resource if present
-                    address = this.GetAddressFromPublicIPResource(nic.IpConfigurations.First().Id);
+                    address = this.GetAddressFromPublicIPResource(nic.IpConfigurations.First().PublicIPAddress.Id);
                 }
                 else if (nic.IpConfigurations.First().LoadBalancerInboundNatRules.Any())
                 {
@@ -108,7 +110,7 @@
                     // Get ipaddress and port from loadbalancer
                     foreach (var nicRuleRef in nic.IpConfigurations.First().LoadBalancerInboundNatRules)
                     {
-                        var lbName = this.GetResourceName(nicRuleRef.Id, "loadBalancers");
+                        var lbName = this.GetResourceName(nicRuleRef.Id, LoadBalancerResouce);
                         var lbResourceGroupName = this.GetResourceGroupName(nicRuleRef.Id);

                         var loadbalancer =
@@ -200,10 +202,10 @@
         private string GetAddressFromPublicIPResource(string resourceId)
         {
             string address = string.Empty;
-
+
             // Get IpAddress from public IPAddress resource
             var publicIPResourceGroupName = this.GetResourceGroupName(resourceId);
-            var publicIPName = this.GetResourceName(resourceId, "publicIPAddresses");
+            var publicIPName = this.GetResourceName(resourceId, PublicIPAddressResource);

             var publicIp =
                 this.NetworkClient.NetworkManagementClient.PublicIPAddresses.Get(
@@ -230,7 +232,16 @@

         private string GetResourceName(string resourceId, string resource)
         {
-            return resourceId.Split('/')[8];
+            int resourceTypeLocation = resourceId.IndexOf(resource, StringComparison.OrdinalIgnoreCase);
+
+            var resourceName = resourceId.Substring(resourceTypeLocation + resource.Length + 1);
+            if (resourceName.Contains("/"))
+            {
+                int resourceNameEnd = resourceName.IndexOf("/");
+                resourceName = resourceName.Substring(0, resourceNameEnd);
+            }
+
+            return resourceName;
         }
     }
 }


Add back `float` cast to distance spacing computation

--- osu.Game/Screens/Edit/Compose/Components/DistanceSnapGrid.cs
+++ osu.Game/Screens/Edit/Compose/Components/DistanceSnapGrid.cs
@@ -92,7 +92,7 @@

         private void updateSpacing()
         {
-            DistanceSpacing = SnapProvider.GetBeatSnapDistanceAt(ReferenceObject) * distanceSpacingMultiplier.Value;
+            DistanceSpacing = (float)(SnapProvider.GetBeatSnapDistanceAt(ReferenceObject) * distanceSpacingMultiplier.Value);

             if (endTime == null)
                 MaxIntervals = int.MaxValue;


[KMS] CharaSim: Fix imdR string (Fix #35)

--- WzComparerR2.Common/CharaSim/ItemStringHelper.cs
+++ WzComparerR2.Common/CharaSim/ItemStringHelper.cs
@@ -100,7 +100,7 @@
                 case GearPropType.incBDR:
                 case GearPropType.bdR: return "보스 몬스터 공격 시 데미지 +" + value + "%";
                 case GearPropType.incIMDR:
-                case GearPropType.imdR: return "몬스터 방어력 무시 : +" + value + "%";
+                case GearPropType.imdR: return "몬스터 방어율 무시 : +" + value + "%";
                 //case GearPropType.limitBreak: return "최대 데미지 제한 증가 : +" + value;
                 case GearPropType.reduceReq: return "착용 레벨 감소 : - " + value;
                 case GearPropType.nbdR: return "일반 몬스터 공격 시 데미지 : +" + value + "%";


Add a configurable time for the boss entrace animation.

--- Xmas-Hell/Xmas-Hell-Core/Entities/Bosses/Boss.cs
+++ Xmas-Hell/Xmas-Hell-Core/Entities/Bosses/Boss.cs
@@ -400,10 +400,11 @@

             CurrentBehaviourIndex = 0;
             PreviousBehaviourIndex = -1;
-            Direction = Vector2.UnitY;
+            Direction = Vector2.Zero;
             Speed = GameConfig.BossDefaultSpeed;

             CurrentAnimator.Play("Idle");
+            MoveToInitialPosition(GameConfig.BossEntranceAnimationTime, true);
         }

         private void RestoreDefaultState()


Added ignoreLineEndingDifferences: true.

--- test/Cuemon.Extensions.Xml.Tests/XmlReaderExtensionsTest.cs
+++ test/Cuemon.Extensions.Xml.Tests/XmlReaderExtensionsTest.cs
@@ -69,7 +69,7 @@
 			<Value>6.0.0</Value>
 		</Version>
 	</Cuemon>
-</HierarchyExample>", sut1.ToEncodedString());
+</HierarchyExample>", sut1.ToEncodedString(), ignoreLineEndingDifferences: true);
             Assert.Equal(3, sut3.Count());
             Assert.Equal(@"<HierarchyExample>
   <Animals>
@@ -83,7 +83,7 @@
       <Pig Output=""Oink"" />
     </Item>
   </Animals>
-</HierarchyExample>", sut3.First().ReadOuterXml());
+</HierarchyExample>", sut3.First().ReadOuterXml(), ignoreLineEndingDifferences: true);
             Assert.Equal(@"<HierarchyExample>
   <Owner Age=""42"">
     <Name>Gimlichael</Name>
@@ -92,7 +92,7 @@
       <PostalCode>3250</PostalCode>
     </Address>
   </Owner>
-</HierarchyExample>", sut3.Skip(1).First().ReadOuterXml());
+</HierarchyExample>", sut3.Skip(1).First().ReadOuterXml(), ignoreLineEndingDifferences: true);
             Assert.Equal(@"<HierarchyExample>
   <Cuemon Name=""Cuemon for .NET"" Tags=""* 42 Infinity"">
     <Version>
@@ -100,7 +100,7 @@
       <Value>6.0.0</Value>
     </Version>
   </Cuemon>
-</HierarchyExample>", sut3.Last().ReadOuterXml());
+</HierarchyExample>", sut3.Last().ReadOuterXml(), ignoreLineEndingDifferences: true);
         }

         [Fact]


Updating tests to try both endpoints

Updating tests to try both endpoints

--- tests/Microsoft.Fx.Portability.Tests/ApiPortServiceTests.cs
+++ tests/Microsoft.Fx.Portability.Tests/ApiPortServiceTests.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading.Tasks;
 using Xunit;

 namespace Microsoft.Fx.Portability.Tests
@@ -26,11 +27,21 @@

     public class ApiPortServiceTests
     {
-        private const string ServiceEndpoint = "http://portability.cloudapp.net";
+        private static readonly ApiPortService _apiPortService = new ApiPortService(
+            "http://portability.dot.net",
+            new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests)));
+        private static readonly ApiPortService _oldApiService = new ApiPortService(
+            "http://portability.cloudapp.net",
+            new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests)));

-        private readonly ApiPortService _apiPortService = new ApiPortService(
-            ServiceEndpoint,
-            new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests)));
+        public static IEnumerable<object[]> ApiPortServices
+        {
+            get
+            {
+                yield return new object[] { _apiPortService, EndpointStatus.Alive };
+                yield return new object[] { _oldApiService, EndpointStatus.Deprecated };
+            }
+        }

         [Fact]
         public void VerifyParameterChecks()
@@ -40,13 +51,10 @@
             Assert.Throws<ArgumentOutOfRangeException>(() => new ApiPortService(" \t", new ProductInformation("")));
         }

-        [Fact(Skip = "Skipping because this will ping the live service when running.")]
-        public void ApiPortService_GetDocIdsWithValidDocId()
+        [Theory(Skip = "Skipping because this will ping the live service when running.")]
+        [MemberData("ApiPortServices")]
+        public async Task ApiPortService_GetDocIdsWithValidDocIdAsync(ApiPortService apiPortService, EndpointStatus expectedStatus)
         {
-            var apiPortService = new ApiPortService(
-                ServiceEndpoint,
-                new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests)));
-
             var docIds = new List<string>
             {
                 "T:System.Console",
@@ -60,21 +68,26 @@
                 "M:System.Xml.Serialization.XmlSerializer.Serialize(System.Xml.XmlWriter,System.Object,System.Xml.Serialization.XmlSerializerNamespaces,System.String)"
             };

-            var result = apiPortService.QueryDocIdsAsync(docIds).Result.Response;
+            var serviceResponse = await apiPortService.QueryDocIdsAsync(docIds);
+            var headers = serviceResponse.Headers;
+            var result = serviceResponse.Response;
+
+            Assert.Equal(expectedStatus, headers.Status);
             Assert.Equal(docIds.Count(), result.Count());
             Assert.Equal(0, docIds.Except(result.Select(r => r.Definition.DocId)).Count());
         }

-        [Fact(Skip = "Skipping because this will ping the live service when running.")]
-        public void ApiPortService_GetAvailableFormats()
+        [Theory(Skip = "Skipping because this will ping the live service when running.")]
+        [MemberData("ApiPortServices")]
+        public async Task ApiPortService_GetAvailableFormatsAsync(ApiPortService apiPortService, EndpointStatus expectedStatus)
         {
             var expected = new List<string> { "Json", "HTML", "Excel" };

-            var apiPortService = new ApiPortService(
-                ServiceEndpoint,
-                new ProductInformation("ApiPort_Tests", typeof(ApiPortServiceTests)));
+            var serviceResponse = await apiPortService.GetResultFormatsAsync();
+            var headers = serviceResponse.Headers;
+            var result = serviceResponse.Response;

-            var result = apiPortService.GetResultFormatsAsync().Result.Response;
+            Assert.Equal(expectedStatus, headers.Status);
             Assert.Equal(expected.Count(), result.Count());
             Assert.Equal(0, expected.Except(result.Select(r => r.DisplayName)).Count());
         }


Fix For Broken Tests For CustomType List

--- tests/ServiceStack.Redis.Tests/Support/CustomTypeFactory.cs
+++ tests/ServiceStack.Redis.Tests/Support/CustomTypeFactory.cs
@@ -12,8 +12,8 @@

 		public override void AssertIsEqual(CustomType actual, CustomType expected)
 		{
-			Assert.AreEqual(actual.CustomId, Is.EqualTo(expected.CustomId));
-			Assert.AreEqual(actual.CustomName, Is.EqualTo(expected.CustomName));
+			Assert.AreEqual(actual.CustomId, expected.CustomId);
+			Assert.AreEqual(actual.CustomName, expected.CustomName);
 		}

 		public override CustomType CreateInstance(int i)


Updating ios PriceValue string correctly..

--- unity_plugin/unity_src/Assets/Plugins/OpenIAB/SkuDetails.cs
+++ unity_plugin/unity_src/Assets/Plugins/OpenIAB/SkuDetails.cs
@@ -40,7 +40,7 @@
             Description = json.ToString("description");
             Json = json.ToString("json");
 			CurrencyCode = json.ToString("currencyCode");
-			PriceValue = json.ToFloat("priceValue");
+			PriceValue = json.ToString("priceValue");

             Sku = OpenIAB_iOS.StoreSku2Sku(Sku);
         }


To prev. commit. A more fast code.

To prev. commit. A more fast code.

--- yafsrc/YAF.Classes/YAF.Classes.Core/Context/UserPageBase.cs
+++ yafsrc/YAF.Classes/YAF.Classes.Core/Context/UserPageBase.cs
@@ -771,12 +771,12 @@

           string browser = "{0} {1}".FormatWith(HttpContext.Current.Request.Browser.Browser, HttpContext.Current.Request.Browser.Version);
           string platform = HttpContext.Current.Request.Browser.Platform;
-          bool isMobileDevice = HttpContext.Current.Request.Browser.IsMobileDevice;
+
           bool isSearchEngine = false;
           bool dontTrack = false;

           string userAgent = HttpContext.Current.Request.UserAgent;
-
+          bool isMobileDevice = UserAgentHelper.IsMobileDevice(userAgent) || HttpContext.Current.Request.Browser.IsMobileDevice;

           // try and get more verbose platform name by ref and other parameters
           UserAgentHelper.Platform(userAgent, HttpContext.Current.Request.Browser.Crawler, ref platform, out isSearchEngine, out dontTrack);


[FIXED] hide if no recent users

[FIXED] hide if no recent users

--- yafsrc/YetAnotherForum.NET/Controls/ForumStatsUsers.ascx.cs
+++ yafsrc/YetAnotherForum.NET/Controls/ForumStatsUsers.ascx.cs
@@ -202,15 +202,17 @@
                         try
                         {
                             this.RecentUsers.ActiveUsersList = activeUsers1Day1;
-                            this.RecentUsers.Visible = true;
+                            this.RecentUsersPlaceHolder.Visible = true;
                         }
                         catch (Exception)
                         {
-                            this.RecentUsers.Visible = false;
+                            this.RecentUsersPlaceHolder.Visible = false;
                         }
                     }
-
-                    this.RecentUsersPlaceHolder.Visible = true;
+                    else
+                    {
+                        this.RecentUsersPlaceHolder.Visible = false;
+                    }
                 }
             }
             else


updated comments on requestController

updated comments on requestController

--- raspberry-uc-system/RaspberryUserControlSystem/RaspberryBackend/Components/RequestController.cs
+++ raspberry-uc-system/RaspberryUserControlSystem/RaspberryBackend/Components/RequestController.cs
@@ -26,7 +26,7 @@
         private RequestController() { }

         /// <summary>
-        /// handles received Requests from the Frontend by deciding what to do in dependency of the request
+        /// handles received Requests from the Frontend by deciding what to do in dependency of the request. This method does everything automated!.
         /// Note: At this point, only execution commands are content of the requests.
         /// </summary>
         /// <param name="request">the request information of the Frontend application</param>
@@ -48,6 +48,12 @@
                         command = createCommand(request);
                         Debug.Write(string.Format("Found the following Command in Request: '{0}' and instantiated it \n", command != null ? command.GetType().FullName : "none"));
                     }
+                    else
+                    {
+                        Debug.WriteLine("Requested command is already instantiated and the instance will be taken from the Dictonary" + "\n");
+                    }
+
+
                     //then, if gpioInterface is ready, execute command
                     if (RaspberryPi.Instance.GpioInterface.Initialized)
                     {
@@ -61,7 +67,7 @@
                 }
                 catch (ArgumentNullException e)
                 {
-                    throw new ArgumentNullException("The requested command was not found: " + request.command);
+                    throw new ArgumentNullException("Requested command was not found: " + request.command);
                 }
                 catch (Exception e)
                 {
@@ -96,12 +102,5 @@

             return (Command)Activator.CreateInstance(commandType, raspberryPi);
         }
-
-        /// <summary>
-        /// can be used to save requested commands by adding them to a Dictonary datatype.
-        /// </summary>
-        /// <param name="commandName">the name of the requested command</param>
-        /// <param name="command">the Command object of the requested command</param>
-
     }
 }


Add correct table mapping

Add correct table mapping

--- src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprenticeshipUpdateConfiguration.cs
+++ src/CommitmentsV2/SFA.DAS.CommitmentsV2/Data/Configuration/ApprenticeshipUpdateConfiguration.cs
@@ -8,6 +8,7 @@
     {
         public void Configure(EntityTypeBuilder<ApprenticeshipUpdate> builder)
         {
+            builder.ToTable("ApprenticeshipUpdate").HasKey(e => e.Id);
             builder.Property(e => e.Cost).HasColumnType("decimal(18, 0)");
             builder.Property(e => e.CreatedOn).HasColumnType("datetime");
             builder.Property(e => e.DateOfBirth).HasColumnType("datetime");


Addressing PR

Addressing PR

--- src/Microsoft.ApplicationInsights/Extensibility/Implementation/DictionarySerializationWriter.cs
+++ src/Microsoft.ApplicationInsights/Extensibility/Implementation/DictionarySerializationWriter.cs
@@ -4,6 +4,8 @@
     using System.Collections.Generic;
     using System.Globalization;

+    // This writer produces Dictionary<string, string> properties and Dictionary<string, double> metrics from the given ISerializableWithWriter implementation.
+    // Typical usage of this class is to flatten IExtension or unknown ITelemetry into the set of properties and metrics.
     internal class DictionarySerializationWriter : ISerializationWriter
     {
         internal const string DefaultKey = "Key";


Fix license dialog being displayed twice.

The license dialog is shown by the main NuGet addin after the
extensions addin has shown its version so the dialog is now
disabled in the extensions addin. It will still be shown by the
main NuGet addin.

--- src/MonoDevelop.PackageManagement.Extensions/MonoDevelop.PackageManagement/ManageUserPrompts.cs
+++ src/MonoDevelop.PackageManagement.Extensions/MonoDevelop.PackageManagement/ManageUserPrompts.cs
@@ -76,7 +76,7 @@

 		void SubscribeToEvents ()
 		{
-			packageManagementEvents.AcceptLicenses += AcceptLicenses;
+			//packageManagementEvents.AcceptLicenses += AcceptLicenses;
 			packageManagementEvents.SelectProjects += SelectProjects;
 			packageManagementEvents.ResolveFileConflict += ResolveFileConflict;
 			packageManagementEvents.PackageOperationsStarting += PackageOperationsStarting;
@@ -128,7 +128,7 @@
 		public void UnsubscribeFromEvents ()
 		{
 			packageManagementEvents.SelectProjects -= SelectProjects;
-			packageManagementEvents.AcceptLicenses -= AcceptLicenses;
+			//packageManagementEvents.AcceptLicenses -= AcceptLicenses;
 			packageManagementEvents.ResolveFileConflict -= ResolveFileConflict;
 			packageManagementEvents.PackageOperationsStarting -= PackageOperationsStarting;
 			packageManagementEvents.FileChanged -= FileChanged;


Fix db changes

Fix db changes

Remove reference to removed column CustomTag

--- src/Nether.Data.Sql/Leaderboard/Migrations/20170223114101_InitialLeaderboardContextMigration.cs
+++ src/Nether.Data.Sql/Leaderboard/Migrations/20170223114101_InitialLeaderboardContextMigration.cs
@@ -83,8 +83,7 @@
 		FROM (
 			SELECT
 				UserId,
-				MAX(Score) AS Score,
-				MAX(CustomTag) AS CustomTag
+				MAX(Score) AS Score
 			FROM Scores
 			GROUP BY UserId
 		) AS T


some cleanup

some cleanup

--- AddOns/DynamicRaceDetection/ThreadMonitor/Monitoring/Threads/ThreadExecutionMonitorDispatcher.cs
+++ AddOns/DynamicRaceDetection/ThreadMonitor/Monitoring/Threads/ThreadExecutionMonitorDispatcher.cs
@@ -44,14 +44,27 @@
         /// </summary>
         private Configuration Configuration;

+        /// <summary>
+        /// The thread index.
+        /// </summary>
         private readonly int ThreadIndex;
-        private readonly IThreadMonitor CallMonitor;
-        private readonly IEventLog Log;
-
-        private SafeList<string> trace = new SafeList<string>();
-        private List<ThreadTrace> thTrace = new List<ThreadTrace>();
-
-        private SafeStack<Method> callStack;
+
+        /// <summary>
+        /// The trace.
+        /// </summary>
+        private SafeList<string> Trace = new SafeList<string>();
+
+        /// <summary>
+        /// The thread trace.
+        /// </summary>
+        private List<ThreadTrace> ThreadTrace = new List<ThreadTrace>();
+
+        /// <summary>
+        /// The call stack.
+        /// </summary>
+        private SafeStack<Method> CallStack;
+
+
         private bool isDoCalled = false;
         private bool isEntryFuntionCalled = false;
         private bool isExitFuntionCalled = false;
@@ -82,14 +95,12 @@
             : base(threadIndex)
         {
             SafeDebug.AssertNotNull(callMonitor, "callMonitor");
-
-            this.Log = log;
+
             this.ThreadIndex = threadIndex;
-            this.CallMonitor = callMonitor;
             this.Configuration = configuration;

-            trace = new SafeList<string>();
-            callStack = new SafeStack<Method>();
+            this.Trace = new SafeList<string>();
+            this.CallStack = new SafeStack<Method>();

             testingEngine.RegisterPerIterationCallBack(EmitThreadTrace);
         }
@@ -98,26 +109,12 @@

         #region methods

-        [Conditional("DEBUG")]
-        protected void Trace(string arg)
-        {
-
-        }
-
-        /// <summary>
-        /// Log an exception
-        /// </summary>
-        protected void LogException(Exception e)
-        {
-            // throw e;
-        }
-
         /// <summary>
         /// Emits the thread trace.
         /// </summary>
         void EmitThreadTrace(int iteration)
         {
-            if (thTrace.Count > 0)
+            if (this.ThreadTrace.Count > 0)
             {
                 string directoryPath = Path.GetDirectoryName(this.Configuration.AssemblyToBeAnalyzed) +
                     Path.DirectorySeparatorChar + "Output";
@@ -136,7 +133,7 @@

                     try
                     {
-                        bformatter.Serialize(stream, thTrace);
+                        bformatter.Serialize(stream, this.ThreadTrace);
                     }
                     catch (Exception ex)
                     {
@@ -145,7 +142,7 @@
                 }
             }

-            thTrace.Clear();
+            this.ThreadTrace.Clear();
         }

         [DebuggerNonUserCodeAttribute]
@@ -154,92 +151,33 @@
             UIntPtr objH, objO;
             ObjectTracking.GetObjectHandle(location, out objH, out objO);

-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
+            if (recordRW && !this.CallStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
             {
                 //Hack
-                if (callStack.Peek().ToString().Contains("Monitor"))
-                {
-                    Console.WriteLine("Load in monitor: " + callStack.Peek().ToString());
+                if (this.CallStack.Peek().ToString().Contains("Monitor"))
+                {
+                    Console.WriteLine("Load in monitor: " + this.CallStack.Peek().ToString());
                     return;
                 }
                 //end hack

-                ThreadTrace obj = thTrace[thTrace.Count - 1];
+                ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];
                 obj.accesses.Add(new ActionInstr(false, location, objH, objO, GetSourceLocation(location)));
-                trace.Add("load: " + objH + " " + objO + " " + callStack.Peek() + " " + GetSourceLocation(location));
-            }
-            else if (!callStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
+                this.Trace.Add("load: " + objH + " " + objO + " " + this.CallStack.Peek() + " " + GetSourceLocation(location));
+            }
+            else if (!this.CallStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
             {
                 foreach (Tuple<Method, int> m in taskMethods)
                 {
                     //TODO: This is fragile (for tasks)
-                    if (callStack.Peek().ShortName.Contains(m.Item1.ShortName))
+                    if (this.CallStack.Peek().ShortName.Contains(m.Item1.ShortName))
                     {
                         ThreadTrace obj = new ThreadTrace(m.Item2, m.Item1.ShortName);
                         obj.accesses.Add(new ActionInstr(false, location, objH, objO, GetSourceLocation(location)));
-                        thTrace.Add(obj);
-                        //trace.Add("load: " + objH + " " + objO + " " + callStack.Peek());
-                    }
-                }
-            }
-        }
-
-        public override void LoadedValue<T>(T value)
-        {
-            /*if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";val:" + value;
-                //trace.Add("loaded value: " + value.GetType());
-                // thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }*/
-        }
-
-        public override void LoadedValueByRef<T>(ref T value)
-        {
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                /*trace.Add("loaded value by ref: " + value.GetType());
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";ref: " + value;*/
-                //trace.Add("loaded value: " + value.GetType());
-                // thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }
-        }
-
-        public override void LoadedValueObject(object value)
-        {
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                /*trace.Add("loaded value object: " + value.GetType());
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";obj: " + value;*/
-                //trace.Add("loaded value: " + value.GetType());
-                // thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }
-        }
-
-        public override void LoadedValuePtr(UIntPtr value, TypeEx pointerType)
-        {
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                /*trace.Add("loaded value pointer: " + value.GetType() + " " + pointerType.GetType());
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";ptr: " + value;*/
-                //trace.Add("loaded value: " + value.GetType());
-                // thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }
-        }
-
-        public override void LoadedValueTypedReference(TypedReference typedReference)
-        {
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp"))
-            {
-                /*trace.Add("loaded value typed reference: ");
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";typ_ref: ";*/
-                //trace.Add("loaded value: " + value.GetType());
-                // thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
+                        this.ThreadTrace.Add(obj);
+                        //trace.Add("load: " + objH + " " + objO + " " + this.CallStack.Peek());
+                    }
+                }
             }
         }

@@ -247,120 +185,42 @@
         public override void Store(UIntPtr location, uint size, int codeLabel, bool is_volatile)
         {
             //TODO: Do not record writes within a constructor (BoundedAsyncRacy)
-            if (callStack.Peek().IsConstructor)
+            if (this.CallStack.Peek().IsConstructor)
                 return;

             UIntPtr objH, objO;
             ObjectTracking.GetObjectHandle(location, out objH, out objO);

-            //trace.Add("storing outside: " + location + " " + objH + " " + objO + " " + callStack.Peek() + recordRW);
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
+            //trace.Add("storing outside: " + location + " " + objH + " " + objO + " " + this.CallStack.Peek() + recordRW);
+            if (recordRW && !this.CallStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
             {
                 //Hack
-                if (callStack.Peek().ToString().Contains("Monitor"))
-                {
-                    Console.WriteLine("store in monitor: " + callStack.Peek().ToString());
+                if (this.CallStack.Peek().ToString().Contains("Monitor"))
+                {
+                    Console.WriteLine("store in monitor: " + this.CallStack.Peek().ToString());
                     return;
                 }
                 //end hack

                 //trace.Add("got object handle: " + objH + " offset: " + objO);
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
+                ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];
                 obj.accesses.Add(new ActionInstr(true, location, objH, objO, GetSourceLocation(location)));
-                trace.Add("store: " + location + " " + objH + " " + objO + " " + callStack.Peek() + " " + GetSourceLocation(location));
-            }
-            else if(!callStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
+                this.Trace.Add("store: " + location + " " + objH + " " + objO + " " + this.CallStack.Peek() + " " + GetSourceLocation(location));
+            }
+            else if(!this.CallStack.Peek().FullName.Contains("Microsoft.PSharp") && objH != null)
             {
                 foreach(Tuple<Method, int> m in taskMethods)
                 {
                     //TODO: This is fragile
-                    if (callStack.Peek().ShortName.Contains(m.Item1.ShortName))
+                    if (this.CallStack.Peek().ShortName.Contains(m.Item1.ShortName))
                     {
                         ThreadTrace obj = new ThreadTrace(m.Item2, m.Item1.ShortName);
                         obj.accesses.Add(new ActionInstr(true, location, objH, objO, GetSourceLocation(location)));
-                        thTrace.Add(obj);
-                        //trace.Add("store: " + location + " " + objH + " " + objO + " " + callStack.Peek() + " " + m.Item2);
-                    }
-                }
-            }
-        }
-
-        public override void StoredValue<T>(T value)
-        {
-            //trace.Add("store value outside: " + value);
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                //ThreadTrace obj = thTrace[thTrace.Count - 1];
-                //obj.accesses[obj.accesses.Count - 1].srcLocation += ";val: " + value.Tostring() + " = " + value.GetHashCode();
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }
-        }
-
-        public override void StoredValueByRef<T>(ref T value)
-        {
-            /*if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";ref: " + value.Tostring() + " = " + value.GetHashCode();
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }*/
-        }
-
-        public override void StoredValueObject(object value)
-        {
-            /*if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";obj: " + value.Tostring() + " = " + value.GetHashCode();
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }*/
-        }
-
-        public override void StoredValuePtr(UIntPtr value, TypeEx pointerType)
-        {
-            /*if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";ptr: " + value.Tostring() + " = " + value.GetHashCode();
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }*/
-        }
-
-        public override void StoredValueTypedReference(TypedReference typedReference)
-        {
-            /*if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp"))
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";typ_ref: ";
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }*/
-        }
-
-        /*public override void StoredValueByRef<T>(ref T value)
-        {
-            if (recordRW && !callStack.Peek().FullName.Contains("Microsoft.PSharp") && value != null)
-            {
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
-                obj.accesses[obj.accesses.Count - 1].srcLocation += ";" + value.GetType() + " = " + value.Tostring();
-                //trace.Add("stored value: " + value + " " + value.GetHashCode());
-                //thTrace[thTrace.Count - 1].accesses[thTrace[thTrace.Count - 1].accesses.Count - 1].set(value.GetHashCode());
-            }
-        }*/
-
-        [DebuggerNonUserCodeAttribute]
-        public override void AfterNewobjObject(object newObject)
-        {
-            //trace.Add("new object: " + newObject.GetType() + " " + newObject.GetHashCode());
-        }
-
-        public override void AfterNewobj<T>(T newValue)
-        {
-            //trace.Add("new struct? " + newValue.GetType() + " " + newValue.GetHashCode());
+                        this.ThreadTrace.Add(obj);
+                        //trace.Add("store: " + location + " " + objH + " " + objO + " " + this.CallStack.Peek() + " " + m.Item2);
+                    }
+                }
+            }
         }

         /// <summary>
@@ -369,13 +229,13 @@
         /// <remarks>Only one to push on callstack.</remarks>
         public override bool EnterMethod(Method method)
         {
-            trace.Add("Entering: " + method.FullName);
-            callStack.Push(method);
+            this.Trace.Add("Entering: " + method.FullName);
+            this.CallStack.Push(method);
             if (isAction && !method.FullName.Contains("Microsoft.PSharp"))
             {
-                trace.Add("ACTION!!!!!!");
-                trace.Add("method: " + method.FullName);
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
+                this.Trace.Add("ACTION!!!!!!");
+                this.Trace.Add("method: " + method.FullName);
+                ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];
                 obj.set(method.FullName);
                 isAction = false;
                 recordRW = true;
@@ -385,43 +245,14 @@
             return false;
         }

-        /// <Summary>
-        /// Retrieve the arguments of a method
-        /// </Summary>
-        /// <remarks>EnterMethod must return true in order to get the arguments using this method.</remarks>
-        public override void Argument<T>(int index, T value)
-        {
-            //myTrace.add("arg: " + index);
-        }
-
-        public override void ArgumentByRef<T>(int index, ref T value)
-        {
-            //myTrace.add("arg ref: " + index);
-        }
-
-        public override void ArgumentPtr(int index, UIntPtr value, TypeEx pointerType)
-        {
-            //myTrace.add("arg ptr: " + index);
-        }
-
-        public override void ArgumentTypedReference(int index, TypedReference typedReference)
-        {
-            //myTrace.add("arg typRef: " + index);
-        }
-
-        public override void ArgumentNotSupported(int index)
-        {
-            //myTrace.add("arg: done; " + index);
-        }
-
         /// <summary>
         /// Just before returning from method body.
         /// </summary>
         /// <remarks>Only method allowed to pop from callstack.</remarks>
         public override void LeaveMethod()
         {
-            //trace.Add("Leaving: " + callStack.Peek());
-            Method leaving = callStack.Pop();
+            //trace.Add("Leaving: " + this.CallStack.Peek());
+            Method leaving = this.CallStack.Pop();
             if (leaving.FullName.Equals(currentAction))
             {
                 recordRW = false;
@@ -431,33 +262,24 @@
         }

         /// <summary>
-        /// Constructor call.
-        /// </summary>
-        /// <param name="method"></param>
-        public override void Newobj(Method method)
-        {
-
-        }
-
-        /// <summary>
         /// Regular instruction; <see cref="System.Reflection.Emit.OpCodes.Call"/>
         /// </summary>
         /// <param name="method">callee</param>
         public override void Call(Method method)
         {
-            trace.Add("Method Call: " + method.FullName);
+            this.Trace.Add("Method Call: " + method.FullName);
             if ((method.FullName.Contains("Microsoft.PSharp.Machine.CreateMachine") ||
                 method.FullName.Contains("Microsoft.PSharp.PSharpRuntime.CreateMachine")) &&
-                !callStack.Peek().FullName.Contains(".Main"))
+                !this.CallStack.Peek().FullName.Contains(".Main"))
             {
                 isCreateMachine = true;
-                trace.Add("call: " + method + " " + isCreateMachine);
+                this.Trace.Add("call: " + method + " " + isCreateMachine);
             }

             else if (method.FullName.Equals("Microsoft.PSharp.Machine.Do"))
             {
                 isDoCalled = true;
-                trace.Add("do called");
+                this.Trace.Add("do called");
             }

             else if (method.FullName.Equals("Microsoft.PSharp.Machine.ExecuteCurrentStateOnEntry"))
@@ -468,10 +290,10 @@

             else if ((method.FullName.Equals("Microsoft.PSharp.Machine.Send") ||
                 method.FullName.Equals("Microsoft.PSharp.PSharpRuntime.SendEvent")) &&
-                !callStack.Peek().FullName.Contains(".Main"))
-            {
-                trace.Add("send: " + method.FullName);
-                ThreadTrace obj = thTrace[thTrace.Count - 1];
+                !this.CallStack.Peek().FullName.Contains(".Main"))
+            {
+                this.Trace.Add("send: " + method.FullName);
+                ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];

                 if (sendIds.ContainsKey(currentMachineId))
                 {
@@ -497,7 +319,7 @@
                     //race.Add("call result object: " + isCreateMachine + " " + r.GetHashCode().Tostring());
                     isCreateMachine = false;

-                    ThreadTrace obj = thTrace[thTrace.Count - 1];
+                    ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];
                     obj.accesses.Add(new ActionInstr(r.GetHashCode(), true));
                 }
             }
@@ -506,12 +328,12 @@
                 try
                 {
                     Task tid = (Task)value;
-                    trace.Add("Task created: " + tid.Id);
+                    this.Trace.Add("Task created: " + tid.Id);
                     if(taskMethods.Count > 0)
                     {
                         Method m = taskMethods[taskMethods.Count - 1].Item1;
                         taskMethods[taskMethods.Count - 1] = new Tuple<Method, int>(m, tid.Id);
-                        ThreadTrace obj = thTrace[thTrace.Count - 1];
+                        ThreadTrace obj = this.ThreadTrace[this.ThreadTrace.Count - 1];
                         obj.accesses.Add(new ActionInstr(true, tid.Id));
                     }
                 }
@@ -530,7 +352,7 @@
                 {
                     //Console.WriteLine("iteration changed for {0} from {1} to {2}", threadIndex, localIter, Environment.GetEnvironmentVariable("ITERATION"));

-                    if (thTrace.Count > 0 && !localIter.Equals("-1"))
+                    if (this.ThreadTrace.Count > 0 && !localIter.Equals("-1"))
                     {
                         string path = Environment.GetEnvironmentVariable("DIRPATH") + "InstrTrace" + localIter + "\\";  //thTrace_" + threadIndex + ".osl";
                         if (!Directory.Exists(path))
@@ -544,7 +366,7 @@

                         try
                         {
-                            bformatter.Serialize(stream, thTrace);
+                            bformatter.Serialize(stream, this.ThreadTrace);
                         }
                         catch (Exception ex)
                         {
@@ -553,7 +375,7 @@
                         stream.Close();
                     }

-                    thTrace = new List<ThreadTrace>();
+                    this.ThreadTrace = new List<ThreadTrace>();
                     localIter = Environment.GetEnvironmentVariable("ITERATION");
                     if(cleared != Int32.Parse(localIter))
                     {
@@ -569,7 +391,7 @@

                 this.currentMachineId = mcID;

-                trace.Add("call receiver: " + mc.GetType() + " " + mcID);
+                this.Trace.Add("call receiver: " + mc.GetType() + " " + mcID);

                 isDoCalled = false;
                 isEntryFuntionCalled = false;
@@ -581,16 +403,16 @@
                 if (actionIds.ContainsKey(mcID))
                 {
                     actionIds[mcID]++;
-                    trace.Add("action id: " + actionIds[mcID]);
+                    this.Trace.Add("action id: " + actionIds[mcID]);
                 }
                 else
                 {
                     actionIds.Add(mcID, 1);
-                    trace.Add("action id: 1");
+                    this.Trace.Add("action id: 1");
                 }

                 obj.set(actionIds[mcID]);
-                thTrace.Add(obj);
+                this.ThreadTrace.Add(obj);
             }
         }

@@ -600,32 +422,11 @@
         /// <param name="method">callee before vtable lookup</param>
         public override void Callvirt(Method method)
         {
-            trace.Add("Virtual call: " + method.FullName);
+            this.Trace.Add("Virtual call: " + method.FullName);
             if (method.FullName.Contains("System.Threading.Tasks.Task.Start"))
             {
-                taskMethods.Add(new Tuple<Method, int>(callStack.Peek(), -1));
-            }
-        }
-
-        /// <summary>
-        /// This method is called after <see cref="Callvirt"/> to indicate the
-        /// actual type of the receiver object.
-        /// </summary>
-        /// <remarks>
-        /// This method is only called when the receiver was not null,
-        /// and an exception is thrown otherwise.
-        /// When the receiver is a boxed value,
-        /// <paramref name="type"/> is the value type.
-        /// When a constrained call is performed,
-        /// the type is the type pointed to by the receiver pointer.
-        /// When the receiver is a remote object, <paramref name="type"/>
-        /// might not be a class but an interface.
-        /// </remarks>
-        /// <param name="codeLabel">code label</param>
-        /// <param name="type">actual receiver type</param>
-        public override void CallvirtType(TypeEx type, int codeLabel)
-        {
-
+                taskMethods.Add(new Tuple<Method, int>(this.CallStack.Peek(), -1));
+            }
         }

         public string GetSourceLocation(UIntPtr location)


CHANGED: Localization - Localization tables return localization keys in case of missing keys for easier debugging.

--- Tools/BlueprintEditor/Slash.Tools.BlueprintEditor.Logic/Source/Localization/LocalizationTable.cs
+++ Tools/BlueprintEditor/Slash.Tools.BlueprintEditor.Logic/Source/Localization/LocalizationTable.cs
@@ -23,7 +23,15 @@
         {
             get
             {
-                return this.localizationTable[key];
+                string localizedValue;
+
+                if (this.localizationTable.TryGetValue(key, out localizedValue))
+                {
+                    return localizedValue;
+                }
+
+                // Return localization key for easier debugging.
+                return key;
             }

             set


ContinuousKeyboardControllerBoardEmulator: Bug fix

--- projects/RagingBool.Carcosa.Devices_cs/InputControl/ContinuousKeyboardControllerBoardEmulator.cs
+++ projects/RagingBool.Carcosa.Devices_cs/InputControl/ContinuousKeyboardControllerBoardEmulator.cs
@@ -88,7 +88,7 @@
                 step = -step;
             }

-            return BasicMath.Clip(value, MinValue, MaxValue);
+            return BasicMath.Clip(value + step, MinValue, MaxValue);
         }
     }
 }


Remove no longer needed workaround

Remove no longer needed workaround

I fixed this as part of https://github.com/SteamRE/SteamKit/pull/443

--- ArchiSteamFarm/Bot.cs
+++ ArchiSteamFarm/Bot.cs
@@ -1442,20 +1442,6 @@
 				return;
 			}

-			// We can't use SetPersonaState() before SK2 in fact registers our nickname
-			// This is pretty rare, but SK2 SteamFriends handler and this handler could execute at the same time
-			// So we wait for nickname to be registered (with timeout of 5 tries/seconds)
-			string nickname = SteamFriends.GetPersonaName();
-			for (byte i = 0; (i < WebBrowser.MaxTries) && (string.IsNullOrEmpty(nickname) || nickname.Equals("[unassigned]")); i++) {
-				await Task.Delay(1000).ConfigureAwait(false);
-				nickname = SteamFriends.GetPersonaName();
-			}
-
-			// We should return here if [unassigned] is still our nickname at this point
-			// However, [unassigned] could be real nickname of the user regardless
-			// In this case, we can't tell a difference between real nickname and lack of it
-			// We must blindly assume that SK2 did the right thing and our timeout was enough
-
 			try {
 				await SteamFriends.SetPersonaState(EPersonaState.Online);
 			} catch (Exception e) {


Always strong-type GenericResponse on per-API basis

Even when it returns object.

--- ArchiSteamFarm/IPC.cs
+++ ArchiSteamFarm/IPC.cs
@@ -223,7 +223,7 @@

 			ASFResponse asfResponse = new ASFResponse(Program.GlobalConfig, memoryUsage, processStartTime, SharedInfo.Version);

-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", asfResponse)).ConfigureAwait(false);
+			await ResponseJsonObject(request, response, new GenericResponse<ASFResponse>(true, "OK", asfResponse)).ConfigureAwait(false);
 			return true;
 		}

@@ -236,7 +236,7 @@
 			const string requiredContentType = "application/json";

 			if (request.ContentType != requiredContentType) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
 				return true;
 			}

@@ -246,7 +246,7 @@
 			}

 			if (string.IsNullOrEmpty(body)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -255,23 +255,23 @@
 			try {
 				jsonRequest = JsonConvert.DeserializeObject<ASFRequest>(body);
 			} catch (Exception e) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			if (jsonRequest == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			string filePath = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalConfigFileName);

 			if (!await GlobalConfig.Write(filePath, jsonRequest.GlobalConfig).ConfigureAwait(false)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, "Writing global config failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK")).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, "Writing global config failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			await ResponseJsonObject(request, response, new GenericResponse<object>(true, "OK")).ConfigureAwait(false);
 			return true;
 		}

@@ -304,11 +304,11 @@
 				return false;
 			}

-			string botNames = WebUtility.UrlDecode(arguments[argumentsIndex]);
-
-			HashSet<Bot> bots = Bot.GetBots(botNames);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
+
+			HashSet<Bot> bots = Bot.GetBots(argument);
 			if ((bots == null) || (bots.Count == 0)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.BotNotFound, botNames)), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.BotNotFound, argument)), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -329,11 +329,11 @@
 			}

 			if (results.Any(result => !result)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, "Removing one or more files failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK")).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, "Removing one or more files failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			await ResponseJsonObject(request, response, new GenericResponse<object>(true, "OK")).ConfigureAwait(false);
 			return true;
 		}

@@ -347,15 +347,15 @@
 				return false;
 			}

-			string botNames = WebUtility.UrlDecode(arguments[argumentsIndex]);
-
-			HashSet<Bot> bots = Bot.GetBots(botNames);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
+
+			HashSet<Bot> bots = Bot.GetBots(argument);
 			if ((bots == null) || (bots.Count == 0)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.BotNotFound, botNames)), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", bots)).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<HashSet<Bot>>(false, string.Format(Strings.BotNotFound, argument)), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			await ResponseJsonObject(request, response, new GenericResponse<HashSet<Bot>>(true, "OK", bots)).ConfigureAwait(false);
 			return true;
 		}

@@ -372,7 +372,7 @@
 			const string requiredContentType = "application/json";

 			if (request.ContentType != requiredContentType) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
 				return true;
 			}

@@ -382,7 +382,7 @@
 			}

 			if (string.IsNullOrEmpty(body)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -391,12 +391,12 @@
 			try {
 				jsonRequest = JsonConvert.DeserializeObject<BotRequest>(body);
 			} catch (Exception e) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			if (jsonRequest == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -419,11 +419,11 @@
 			string filePath = Path.Combine(SharedInfo.ConfigDirectory, botName + SharedInfo.ConfigExtension);

 			if (!await BotConfig.Write(filePath, jsonRequest.BotConfig).ConfigureAwait(false)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, "Writing bot config failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK")).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, "Writing bot config failed, check ASF log for details"), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			await ResponseJsonObject(request, response, new GenericResponse<object>(true, "OK")).ConfigureAwait(false);
 			return true;
 		}

@@ -434,22 +434,20 @@
 			}

 			if (Program.GlobalConfig.SteamOwnerID == 0) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(Program.GlobalConfig.SteamOwnerID))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<string>(false, string.Format(Strings.ErrorIsEmpty, nameof(Program.GlobalConfig.SteamOwnerID))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			switch (request.HttpMethod) {
-				case HttpMethods.Get:
-					return await HandleApiCommandGeneric(request, response, arguments, argumentsIndex).ConfigureAwait(false);
 				case HttpMethods.Post:
-					return await HandleApiCommandGeneric(request, response, arguments, argumentsIndex).ConfigureAwait(false);
+					return await HandleApiCommandPost(request, response, arguments, argumentsIndex).ConfigureAwait(false);
 				default:
 					await ResponseStatusCode(request, response, HttpStatusCode.MethodNotAllowed).ConfigureAwait(false);
 					return true;
 			}
 		}

-		private static async Task<bool> HandleApiCommandGeneric(HttpListenerRequest request, HttpListenerResponse response, string[] arguments, byte argumentsIndex) {
+		private static async Task<bool> HandleApiCommandPost(HttpListenerRequest request, HttpListenerResponse response, string[] arguments, byte argumentsIndex) {
 			if ((request == null) || (response == null) || (arguments == null) || (argumentsIndex == 0)) {
 				ASF.ArchiLogger.LogNullError(nameof(request) + " || " + nameof(response) + " || " + nameof(arguments) + " || " + nameof(argumentsIndex));
 				return false;
@@ -459,25 +457,25 @@
 				return false;
 			}

-			string command = WebUtility.UrlDecode(arguments[argumentsIndex]);
-			if (string.IsNullOrEmpty(command)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(command))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
+			if (string.IsNullOrEmpty(argument)) {
+				await ResponseJsonObject(request, response, new GenericResponse<string>(false, string.Format(Strings.ErrorIsEmpty, nameof(argument))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			Bot targetBot = Bot.Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value).FirstOrDefault();
 			if (targetBot == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, Strings.ErrorNoBotsDefined), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			if (command[0] != '!') {
-				command = "!" + command;
-			}
-
-			string content = await targetBot.Response(Program.GlobalConfig.SteamOwnerID, command).ConfigureAwait(false);
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", content)).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<string>(false, Strings.ErrorNoBotsDefined), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			if (argument[0] != '!') {
+				argument = "!" + argument;
+			}
+
+			string content = await targetBot.Response(Program.GlobalConfig.SteamOwnerID, argument).ConfigureAwait(false);
+
+			await ResponseJsonObject(request, response, new GenericResponse<string>(true, "OK", content)).ConfigureAwait(false);
 			return true;
 		}

@@ -506,17 +504,17 @@
 				return false;
 			}

-			string botName = WebUtility.UrlDecode(arguments[argumentsIndex]);
-
-			if (!Bot.Bots.TryGetValue(botName, out Bot bot)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.BotNotFound, botName)), HttpStatusCode.BadRequest).ConfigureAwait(false);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
+
+			if (!Bot.Bots.TryGetValue(argument, out Bot bot)) {
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, string.Format(Strings.BotNotFound, argument)), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			const string requiredContentType = "application/json";

 			if (request.ContentType != requiredContentType) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, nameof(request.ContentType) + " must be declared as " + requiredContentType), HttpStatusCode.NotAcceptable).ConfigureAwait(false);
 				return true;
 			}

@@ -526,7 +524,7 @@
 			}

 			if (string.IsNullOrEmpty(body)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, string.Format(Strings.ErrorIsEmpty, nameof(body))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -535,23 +533,23 @@
 			try {
 				jsonRequest = JsonConvert.DeserializeObject<GamesToRedeemInBackgroundRequest>(body);
 			} catch (Exception e) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, string.Format(Strings.ErrorParsingObject, nameof(jsonRequest)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			if (jsonRequest == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, string.Format(Strings.ErrorObjectIsNull, nameof(jsonRequest))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			if (jsonRequest.GamesToRedeemInBackground.Count == 0) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(jsonRequest.GamesToRedeemInBackground))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(false, string.Format(Strings.ErrorIsEmpty, nameof(jsonRequest.GamesToRedeemInBackground))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			await bot.ValidateAndAddGamesToRedeemInBackground(jsonRequest.GamesToRedeemInBackground).ConfigureAwait(false);

-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", jsonRequest.GamesToRedeemInBackground)).ConfigureAwait(false);
+			await ResponseJsonObject(request, response, new GenericResponse<OrderedDictionary>(true, "OK", jsonRequest.GamesToRedeemInBackground)).ConfigureAwait(false);
 			return true;
 		}

@@ -639,11 +637,11 @@
 				return false;
 			}

-			string argument = WebUtility.UrlDecode(arguments[argumentsIndex]);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
 			Type targetType = Type.GetType(argument);

 			if (targetType == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsInvalid, nameof(argument))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorIsInvalid, nameof(argument))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -652,16 +650,16 @@
 			try {
 				obj = Activator.CreateInstance(targetType, true);
 			} catch (Exception e) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, targetType) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorParsingObject, targetType) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			if (obj == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, targetType)), HttpStatusCode.BadRequest).ConfigureAwait(false);
-				return true;
-			}
-
-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", obj)).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<object>(false, string.Format(Strings.ErrorParsingObject, targetType)), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				return true;
+			}
+
+			await ResponseJsonObject(request, response, new GenericResponse<object>(true, "OK", obj)).ConfigureAwait(false);
 			return true;
 		}

@@ -690,11 +688,11 @@
 				return false;
 			}

-			string argument = WebUtility.UrlDecode(arguments[argumentsIndex]);
+			string argument = WebUtility.UrlDecode(string.Join("", arguments.Skip(argumentsIndex)));
 			Type targetType = Type.GetType(argument);

 			if (targetType == null) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsInvalid, nameof(argument))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<TypeResponse>(false, string.Format(Strings.ErrorIsInvalid, nameof(argument))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -723,7 +721,7 @@

 			TypeResponse.TypeProperties properties = new TypeResponse.TypeProperties(baseType, customAttributes.Count > 0 ? customAttributes : null, underlyingType);

-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", new TypeResponse(body, properties))).ConfigureAwait(false);
+			await ResponseJsonObject(request, response, new GenericResponse<TypeResponse>(true, "OK", new TypeResponse(body, properties))).ConfigureAwait(false);
 			return true;
 		}

@@ -774,7 +772,7 @@

 			string directory = Path.Combine(SharedInfo.WebsiteDirectory, argument);
 			if (!Directory.Exists(directory)) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorIsInvalid, nameof(directory))), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<HashSet<string>>(false, string.Format(Strings.ErrorIsInvalid, nameof(directory))), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

@@ -783,13 +781,13 @@
 			try {
 				files = Directory.GetFiles(directory);
 			} catch (Exception e) {
-				await ResponseJsonObject(request, response, new GenericResponse(false, string.Format(Strings.ErrorParsingObject, nameof(files)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
+				await ResponseJsonObject(request, response, new GenericResponse<HashSet<string>>(false, string.Format(Strings.ErrorParsingObject, nameof(files)) + Environment.NewLine + e), HttpStatusCode.BadRequest).ConfigureAwait(false);
 				return true;
 			}

 			HashSet<string> result = new HashSet<string>(files.Select(Path.GetFileName));

-			await ResponseJsonObject(request, response, new GenericResponse(true, "OK", result)).ConfigureAwait(false);
+			await ResponseJsonObject(request, response, new GenericResponse<HashSet<string>>(true, "OK", result)).ConfigureAwait(false);
 			return true;
 		}

@@ -966,7 +964,7 @@
 				return;
 			}

-			string json = JsonConvert.SerializeObject(new GenericResponse(true, "OK", newHistoryEntryArgs.Message));
+			string json = JsonConvert.SerializeObject(new GenericResponse<string>(true, "OK", newHistoryEntryArgs.Message));
 			await Task.WhenAll(ActiveLogWebSockets.Where(webSocket => webSocket.State == WebSocketState.Open).Select(webSocket => PostLoggedJsonUpdate(webSocket, json))).ConfigureAwait(false);
 		}

@@ -997,7 +995,7 @@
 				return;
 			}

-			string response = JsonConvert.SerializeObject(new GenericResponse(true, "OK", loggedMessage));
+			string response = JsonConvert.SerializeObject(new GenericResponse<string>(true, "OK", loggedMessage));
 			await PostLoggedJsonUpdate(webSocket, response).ConfigureAwait(false);
 		}

@@ -1199,17 +1197,17 @@
 			private GamesToRedeemInBackgroundRequest() { }
 		}

-		private sealed class GenericResponse {
+		private sealed class GenericResponse<T> where T : class {
 			[JsonProperty]
 			private readonly string Message;

 			[JsonProperty]
-			private readonly object Result;
+			private readonly T Result;

 			[JsonProperty]
 			private readonly bool Success;

-			internal GenericResponse(bool success, string message = null, object result = null) {
+			internal GenericResponse(bool success, string message = null, T result = null) {
 				Success = success;
 				Message = message;
 				Result = result;


webapi: use methodName convention

webapi: use methodName convention

--- Test.WebApi/App_Start/WebApiConfig.cs
+++ Test.WebApi/App_Start/WebApiConfig.cs
@@ -18,6 +18,7 @@
 				r.DefaultConventionsAre(new IRouteConvention[]
 				{
 					new ControllerNameRouteConvention(),
+					new MethodNameRouteConvention(),
 					new ParameterNameRouteConvention(),
 					new ActionEndsWithRawRouteConvention()
 				});


Added linsolve for finger positions as heights on quadratic

--- Assets/PlotManager.cs
+++ Assets/PlotManager.cs
@@ -26,6 +26,11 @@
 	public Matrix quadForm2dim;
 	public Matrix ellipseTransformer2dim;
 	public Matrix eigenValuesMatInvSquareRoot;
+
+
+	Matrix solveFingerMatrix;
+	Matrix solveFingerVector;
+
 	GameObject controlCube;
 	ScaleObject so;

@@ -90,6 +95,14 @@
 		eigenValuesMatInvSquareRoot = new Matrix(new double[][] {
 			new double[] {0.0, 0.0},
 			new double[] {0.0, 0.0}});
+
+		solveFingerMatrix = new Matrix(new double[][] {
+			new double[] {0.0, 0.0},
+			new double[] {0.0, 0.0}});
+
+		solveFingerVector = new Matrix(new double[][] {
+			new double[] {0.0},
+			new double[] {0.0}});

 		controlCube = GameObject.Find ("ControlCube");
 		so = controlCube.GetComponent<ScaleObject> ();
@@ -113,12 +126,39 @@
 		float t = Time.timeSinceLevelLoad;

 		Vector3 scale = so.graph_scale;
+
+		Vector3[] finger_poses = so.finger_poses;
+		//Vector3[] finger_poses = new Vector3[2];
+		//finger_poses [0] = new Vector3{1.0f, 1.0f, 1.0f};
+		//finger_poses [1] = new Vector3{0.5f, 1.0f, 1.0f};
+
+		if (finger_poses.Length != 2) {
+			return;
+		}
+
+		// set up linsolve
+		solveFingerMatrix [0, 0] = (double) ((finger_poses [0].x) * (finger_poses [0].x));
+		solveFingerMatrix [0, 1] = (double) ((finger_poses [0].z) * (finger_poses [0].z));
+		solveFingerMatrix [1, 0] = (double) ((finger_poses [1].x) * (finger_poses [1].x));
+		solveFingerMatrix [1, 0] = (double) ((finger_poses [1].z) * (finger_poses [1].z));
+
+		solveFingerVector [0, 0] = (double) Mathf.Abs(2 * finger_poses [0].y);
+		solveFingerVector [1, 0] = (double) Mathf.Abs(2 * finger_poses [1].y);
+
+		Matrix solved = solveFingerMatrix.Solve (solveFingerVector);
+
+

 		/*   Grabby interaction */
+		float diagComponent0 = (float) solved[0, 0];
+		float diagComponent2 = (float) solved[1, 0];
+		float offDiagComponent = 0.0f;
+
+		/* grabby interaction old
 		float diagComponent0 = 2.0f / Mathf.Abs(scale[0]);
 		float diagComponent2 = 2.0f / Mathf.Abs(scale[2]);
 		float offDiagComponent = 0.0f;
-
+		*/

 		/*   Sinusoidal watching
 		float diagComponent0 = Mathf.Sin (t) + 1.5f;


Fixed more ball respawning bugs

Fixed more ball respawning bugs

--- Assets/Source/Ball.cs
+++ Assets/Source/Ball.cs
@@ -90,10 +90,13 @@

             yield return new WaitForSeconds(1.05f);

-            ballCollider.enabled = true;
-            ballRigidbody.useGravity = true;
-            ballRigidbody.isKinematic = false;
-            ballMeshRenderer.enabled = true;
+            if (gameManager.isGameOver == false)
+            {
+                ballCollider.enabled = true;
+                ballRigidbody.useGravity = true;
+                ballRigidbody.isKinematic = false;
+                ballMeshRenderer.enabled = true;
+            }
         }
     }
 }


Changed Textbox binding event from TextChanged to KeyUp to allow capturing of changes brought on by clearing a textbox via the Backspace key.

--- Binding/DashBinder.cs
+++ Binding/DashBinder.cs
@@ -174,7 +174,7 @@
 			if(obj.GetType() == typeof(TextBox))
 			{
 				TextBox txt = obj as TextBox;
-				txt.TextChanged += (sender, e) => ViewChanged(txt,vw => vw.Text);
+				txt.KeyUp += (sender, e) => ViewChanged(txt,vw => vw.Text);
 			}
 			if(obj.GetType() == typeof(DateTimePicker))
 			{


still testing

still testing

--- Assets/Scripts/Netoworking/MultiplayerManager.cs
+++ Assets/Scripts/Netoworking/MultiplayerManager.cs
@@ -238,7 +238,7 @@
 	int FindPlayerNumber() {
 		for (int i = 0; i < PlayerList.Count; ++i) {
 			if(PlayerList[i].playerNetwork == Network.player) {
-				return i;
+				return PlayerList[i].playerID;
 			}
 		}


fix(Presence): calculate collider height based on global positions

There was an issue with the Body Physics body collider being sized
incorrectly in the simulator because the calculation was relying
on local positions and the simulator has a more complex set up
with the new neck object.

This fix uses global positions and is more generic to provide a
better future proof solution.

Thanks to @virror for the fix.

--- Assets/VRTK/Scripts/Presence/VRTK_BodyPhysics.cs
+++ Assets/VRTK/Scripts/Presence/VRTK_BodyPhysics.cs
@@ -1095,7 +1095,7 @@
         {
             if (bodyCollider != null && headset != null)
             {
-                float newpresenceColliderYSize = (headset ? headset.transform.localPosition.y - (headsetYOffset + CalculateStepUpYOffset()) : 0f);
+                float newpresenceColliderYSize = (headset.position.y - playArea.position.y) - (headsetYOffset + CalculateStepUpYOffset());
                 float newpresenceColliderYCenter = Mathf.Max((newpresenceColliderYSize * 0.5f) + CalculateStepUpYOffset() + playAreaHeightAdjustment, bodyCollider.radius + playAreaHeightAdjustment);

                 bodyCollider.height = Mathf.Max(newpresenceColliderYSize, bodyCollider.radius);


changed range of GetStick01()

changed range of GetStick01()

--- Assets/Wiimote/Scripts/WiimoteData/GuitarData.cs
+++ Assets/Wiimote/Scripts/WiimoteData/GuitarData.cs
@@ -126,11 +126,12 @@
 		}

 		/// Returns a size 2 [X, Y] array of the analog stick's position, in the range
-		/// (-1, 1)
+		/// (0, 1). The stick typically rests somewhere NEAR [0.5, 0.5], and the actual
+		/// range ends up being somewhere in the neighborhood of (0.2, 0.8).
 		public float[] GetStick01() {
 			float[] ret = new float[2];
 			for(int x=0;x<2;x++) {
-				ret[x] = (_stick[x] - 32) / 32f;
+				ret[x] = _stick[x] / 64f;
 			}
 			return ret;
 		}


replace GetFirst and GetSecond

replace GetFirst and GetSecond

--- BigQueryProvider/Native/BigQueryTypeConverter.cs
+++ BigQueryProvider/Native/BigQueryTypeConverter.cs
@@ -38,17 +38,17 @@
             new Tuple<string, Type>("RECORD", typeof(object))
         };

+        static object GetItem<T, T1>(this List<Tuple<T, T1>> list, object item2ToSearch, Func<Tuple<T, T1>, object> selectFunc) {
+            var tuple = list.FirstOrDefault(i => i.Item1.Equals(item2ToSearch) || i.Item2.Equals(item2ToSearch));
+            return tuple == null ? null : selectFunc(tuple);
+        }
+
         static object GetFirst<T, T1>(Tuple<T, T1> tuple) {
             return tuple.Item1;
         }

         static object GetSecond<T, T1>(Tuple<T, T1> tuple) {
             return tuple.Item2;
-        }
-
-        static object GetItem<T, T1>(this List<Tuple<T, T1>> list, object item2ToSearch, Func<Tuple<T, T1>, object> selectFunc) {
-            var tuple = list.FirstOrDefault(i => i.Item1.Equals(item2ToSearch) || i.Item2.Equals(item2ToSearch));
-            return tuple == null ? null : selectFunc(tuple);
         }

         public static BigQueryDbType ToBigQueryDbType(DbType dbType) {


Increment version

Increment version

--- BudgetAnalyser.Engine/Properties/AssemblyInfo.cs
+++ BudgetAnalyser.Engine/Properties/AssemblyInfo.cs
@@ -36,6 +36,6 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
+[assembly: AssemblyVersion("1.3.1.0")]
+[assembly: AssemblyFileVersion("1.3.1.0")]
 [assembly: InternalsVisibleTo("BudgetAnalyser.UnitTest")]


SampleHistoryTestingParallel. Do not build market depths.

--- Samples/Testing/SampleHistoryTestingParallel/MainWindow.xaml.cs
+++ Samples/Testing/SampleHistoryTestingParallel/MainWindow.xaml.cs
@@ -160,12 +160,6 @@

 				// fill level1 values
 				connector.SendInMessage(level1Info);
-
-				connector.RegisterMarketDepth(new TrendMarketDepthGenerator(connector.GetSecurityId(security))
-				{
-					// order book freq refresh is 1 sec
-					Interval = TimeSpan.FromSeconds(1),
-				});
 			};

 			TestingProcess.Maximum = 100;
@@ -177,7 +171,7 @@
 				.Select(period =>
 				{
 					var candleManager = new CandleManager(connector);
-                    var series = new CandleSeries(typeof(TimeFrameCandle), security, timeFrame);
+					var series = new CandleSeries(typeof(TimeFrameCandle), security, timeFrame);

 					// create strategy based SMA
 					var strategy = new SmaStrategy(candleManager, series, new SimpleMovingAverage { Length = period.Item1 }, new SimpleMovingAverage { Length = period.Item2 })


adding tracing for exception

adding tracing for exception

--- src/Listener/ListenerLink.cs
+++ src/Listener/ListenerLink.cs
@@ -314,6 +314,7 @@
             }
             catch (Exception exception)
             {
+                Trace.WriteLine(TraceLevel.Error, "Exception occurred attaching link: {0}", exception);
                 error = new Error() { Condition = ErrorCode.InternalError, Description = exception.Message };
             }


Issue #130

Issue #130

--- SitecoreIntegrations/Applications/PowerShellMultiValuePrompt.cs
+++ SitecoreIntegrations/Applications/PowerShellMultiValuePrompt.cs
@@ -342,9 +342,9 @@
                                 }
                             }
                         }
-                        GetEditorValue(control, results);
                     }
                 }
+                GetEditorValue(control, results);
             }
             return results.ToArray();
         }


and or params

and or params

--- JSdotNet/J.cs
+++ JSdotNet/J.cs
@@ -61,13 +61,13 @@

         #region 其他

-        public static Jsyntax and(Jsyntax a, Jsyntax b)
-        {
-            return new Jsyntax(string.Format("{0}&&{1}", a, b));
-        }
-        public static Jsyntax or(Jsyntax a, Jsyntax b)
-        {
-            return new Jsyntax(string.Format("{0}||{1}", a, b));
+        public static Jsyntax and(params Jsyntax[] args)
+        {
+            return new Jsyntax(string.Join("&&", args.Select(arg => arg.ToString())));
+        }
+        public static Jsyntax or(params Jsyntax[] args)
+        {
+            return new Jsyntax(string.Join("||", args.Select(arg => arg.ToString())));
         }
         public static Jsyntax @break
         {


Null handling

Null handling

--- Cleverbot.Net/cleverbot.net/CleverbotResponse.cs
+++ Cleverbot.Net/cleverbot.net/CleverbotResponse.cs
@@ -312,7 +312,7 @@
             }
             return null;
         }
-        internal static async Task CreateAsync(string message, string conversationId, string apiKey, Action<CleverbotResponse> resultAction)
+        internal static async Task CreateAsync(string message, string conversationId, string apiKey, Action<CleverbotResponse> resultAction = null)
         {
             WebClient c = new WebClient();

@@ -337,7 +337,7 @@
                         response.apikey = apiKey;
                         response.CreateInteractionsList();

-                        resultAction.Invoke(response);
+                        resultAction?.Invoke(response);
                     }
                 }
             };


Removed IList.Shuffle Extension #CHANGE: Removed inefficient IList.Shuffle extension method in favor of the much more efficient Random.Shuffle extension method.

--- Source/Core/Duality/Utility/Extensions/ExtMethodsIEnumerable.cs
+++ Source/Core/Duality/Utility/Extensions/ExtMethodsIEnumerable.cs
@@ -217,27 +217,6 @@
 		{
 			return collection.Skip(startIndex).Take(length);
 		}
-		/// <summary>
-		/// Shuffles the specified eumerable.
-		/// </summary>
-		/// <typeparam name="T"></typeparam>
-		/// <param name="collection"></param>
-		/// <param name="rnd">The random number generator to use. Defaults to <see cref="MathF.Rnd"/>, if null.</param>
-		/// <returns></returns>
-		public static IEnumerable<T> Shuffle<T>(this IList<T> collection, Random rnd = null)
-		{
-			if (!collection.Any()) yield break;
-			if (rnd == null) rnd = MathF.Rnd;
-
-			List<int> indices = Enumerable.Range(0, collection.Count).ToList();
-			while (indices.Count > 0)
-			{
-				int temp = rnd.Next(indices.Count);
-				int index = indices[temp];
-				indices.RemoveAt(temp);
-				yield return collection[index];
-			}
-		}

 		/// <summary>
 		/// Returns whether two sets of objects equal each other. This is the case if both sets contain an equal number of elements


debug can be private, so let's do that

debug can be private, so let's do that

--- ClickableLinksInChat.mod/ClickableLinksInChat.cs
+++ ClickableLinksInChat.mod/ClickableLinksInChat.cs
@@ -11,7 +11,8 @@

 namespace ClickableLinksInChat.mod {
     public class ClickableLinksInChat : BaseMod {
-        private bool debug = false;
+        private const bool debug = false;
+
         private ChatUI target = null;
         private ChatRooms chatRooms;
         private GUIStyle timeStampStyle;


update

update

--- Source/Examples/WPF.SharpDX/DynamicTextureDemo/MainViewModel.cs
+++ Source/Examples/WPF.SharpDX/DynamicTextureDemo/MainViewModel.cs
@@ -224,14 +224,15 @@
             if (DynamicTexture)
             {
                 var texture = new Vector2Collection(Model.TextureCoordinates);
-                for (int i = 1; i < Model.TextureCoordinates.Count; ++i)
-                {
-                    texture[i - 1] = Model.TextureCoordinates[i];
-                }
-                texture[texture.Count - 1] = Model.TextureCoordinates[0];
-                Model.TextureCoordinates = texture;
+                var t0 = texture[0];
+                for (int i = 1; i < texture.Count; ++i)
+                {
+                    texture[i - 1] = texture[i];
+                }
+                texture[texture.Count - 1] = t0;
                 context.Send((o) =>
                 {
+                    Model.TextureCoordinates = texture;
                     if (ReverseInnerRotation)
                     {
                         var texture1 = new Vector2Collection(texture);
@@ -252,7 +253,7 @@
                 {
                     positions[i] = positions[i] * (float)rnd.Next(95, 105) / 100;
                 }
-                var normals =  MeshGeometryHelper.CalculateNormals(positions, Model.Indices);
+                var normals =  MeshGeometryHelper.CalculateNormals(positions, initialIndicies);
                 var innerNormals =  new Vector3Collection(normals.Select(x => { return x * -1; }));
                 context.Send((o) =>
                 {


Modify compound slider to move correcty when bound to same source

--- Source/Monitorian.Core/Views/Controls/Sliders/CompoundSlider.cs
+++ Source/Monitorian.Core/Views/Controls/Sliders/CompoundSlider.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -10,6 +11,60 @@
 {
 	public class CompoundSlider : ShadowSlider
 	{
+		#region Type
+
+		private class Item
+		{
+			public object Source { get; set; }
+			public List<CompoundSlider> Sliders { get; } = new();
+			public double? BrightnessProtruded { get; set; }
+
+			public Item(object source) => this.Source = source;
+		}
+
+		private class ItemHolder
+		{
+			private readonly List<Item> _items = new();
+
+			public void Add(object source, CompoundSlider slider)
+			{
+				var item = _items.FirstOrDefault(x => ReferenceEquals(x.Source, source));
+				if (item is null)
+				{
+					item = new Item(source);
+					_items.Add(item);
+				}
+				else if (item.Sliders.Any(x => ReferenceEquals(x, slider)))
+					return;
+
+				item.Sliders.Add(slider);
+			}
+
+			public void Remove(object source, CompoundSlider slider)
+			{
+				var item = _items.FirstOrDefault(x => ReferenceEquals(x.Source, source));
+				if (item is null)
+					return;
+
+				item.Sliders.Remove(slider);
+				if (item.Sliders.Any())
+					return;
+
+				item.Source = null;
+				_items.Remove(item);
+			}
+
+			public bool TryGetItem(object source, out Item item)
+			{
+				item = _items.FirstOrDefault(x => ReferenceEquals(x.Source, source));
+				return (item is not null);
+			}
+		}
+
+		#endregion
+
+		private static readonly ItemHolder _holder = new();
+
 		private object _source;

 		public override void OnApplyTemplate()
@@ -17,8 +72,16 @@
 			base.OnApplyTemplate();

 			_source = BindingOperations.GetBindingExpression(this, ValueProperty).DataItem;
-
-			this.Unloaded += (_, _) => _source = null;
+			if ((_source is null) && !DesignerProperties.GetIsInDesignMode(this))
+				throw new InvalidOperationException("The binding source of Value property must not be null.");
+
+			_holder.Add(_source, this);
+
+			this.Unloaded += (_, _) =>
+			{
+				_holder.Remove(_source, this);
+				_source = null;
+			};
 		}

 		#region Unison
@@ -100,13 +163,14 @@
 			}
 		}

-		private double? _brightnessProtruded = null;
-
 		protected override void OnGotFocus(RoutedEventArgs e)
 		{
 			base.OnGotFocus(e);

-			_brightnessProtruded = null; // Reset
+			if (_holder.TryGetItem(_source, out Item item))
+			{
+				item.BrightnessProtruded = null; // Reset;
+			}
 		}

 		private void OnMoved(object sender, (object source, double delta, bool update) e)
@@ -114,12 +178,16 @@
 			if (ReferenceEquals(this, sender) || ReferenceEquals(this._source, e.source))
 				return;

+			if (!_holder.TryGetItem(_source, out Item item) ||
+				!ReferenceEquals(item.Sliders.FirstOrDefault(x => x.IsUnison), this))
+				return;
+
 			if (e.delta != 0D)
 			{
-				_brightnessProtruded ??= this.Value;
-				_brightnessProtruded += e.delta * GetRangeRate();
-
-				UpdateValue(_brightnessProtruded.Value);
+				item.BrightnessProtruded ??= this.Value;
+				item.BrightnessProtruded += e.delta * GetRangeRate();
+
+				UpdateValue(item.BrightnessProtruded.Value);
 			}

 			if ((e.delta == 0D) || e.update)