Bug: incorrect conversion path

Bug: incorrect conversion path

--- src/reni2/Type/ConversionService.cs
+++ src/reni2/Type/ConversionService.cs
@@ -1,198 +1,190 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using hw.Debug;
-using hw.Helper;
-using Reni.Feature;
-
-namespace Reni.Type
-{
-    static class ConversionService
-    {
-        internal sealed class Path : DumpableObject
-        {
-            public readonly TypeBase Source;
-            public readonly ISimpleFeature[] Elements;
-
-            public Path(TypeBase source)
-            {
-                Source = source;
-                Elements = new ISimpleFeature[0];
-                Tracer.Assert(Source != null);
-            }
-
-            public Path(params ISimpleFeature[] elements)
-            {
-                Tracer.Assert(elements.Any());
-                Tracer.Assert(!elements.Skip(1).Where((element, i) => element.ResultType() != elements[i].TargetType).Any());
-                Source = elements.Last().TargetType;
-                Elements = elements;
-                Tracer.Assert(Source != null);
-            }
-
-            public TypeBase Destination
-            {
-                get
-                {
-                    var result = Elements.FirstOrDefault();
-                    if(result != null)
-                        return result.ResultType();
-                    return Source;
-                }
-            }
-
-            protected override string GetNodeDump()
-            {
-                return Elements
-                    .Select(element => element.ResultType().DumpPrintText + " <== ")
-                    .Stringify("")
-                    + Source.DumpPrintText;
-            }
-        }
-
-        public static Path FindPath(TypeBase source, TypeBase destination)
-        {
-            if(source == destination)
-                return new Path(source);
-
-            var conversions = source.GetReflexiveConversionPaths().ToArray();
-            var result = conversions.SingleOrDefault(x => x.Destination == destination);
-            if(result != null)
-                return result;
-
-            var stripConversions = conversions.SelectMany(StripConversions).ToArray();
-            result = stripConversions.SingleOrDefault(x => x.Destination == destination);
-            if(result != null)
-                return result;
-
-            return conversions
-                .Concat(stripConversions)
-                .SelectMany(path => ForcedConversions(destination, path))
-                .SingleOrDefault(x => x.Destination == destination);
-        }
-
-        static IEnumerable<Path> ForcedConversions(TypeBase destination, Path path)
-        {
-            return destination
-                .GetReachableTypes()
-                .SelectMany(destinationEntry => path.Destination.GetForcedConversions(destinationEntry))
-                .SelectMany(element => Combine(destination, element, path));
-        }
-
-        static IEnumerable<Path> StripConversions(Path path)
-        {
-            var conversion = path.Destination.GetStripConversion();
-            if(conversion == null)
-                return new Path[0];
-            return
-                conversion
-                    .ResultType()
-                    .GetReflexiveConversionPaths()
-                    .ToArray()
-                    .Combine(path)
-                    .ToArray();
-        }
-
-        static IEnumerable<T> NullableToArray<T>(this T target) { return target.Equals(default(T)) ? new T[0] : new[] {target}; }
-
-        public static string DumpObvious(TypeBase source) { return DumpReachable(source, type => type.ReflexiveConversions); }
-
-        static string DumpReachable(TypeBase source, Func<TypeBase, IEnumerable<ISimpleFeature>> getConversionElements)
-        {
-            return source.ReachableTypes(getConversionElements).Select(t => t.NodeDump).Stringify("\n");
-        }
-
-        static IEnumerable<TypeBase> ReachableTypes
-            (this TypeBase source, Func<TypeBase, IEnumerable<ISimpleFeature>> getConversionElements)
-        {
-            var types = new TypeBase[0];
-            var newTypes = new[] {source};
-            do
-            {
-                types = types.Union(newTypes).ToArray();
-                newTypes = newTypes
-                    .SelectMany(type => getConversionElements(type).Select(c => c.ResultType()))
-                    .Where(type => !types.Contains(type))
-                    .ToArray();
-            } while(newTypes.Any());
-            return types;
-        }
-
-        static IEnumerable<Path> FeatureClosure
-            (this TypeBase source, Func<TypeBase, IEnumerable<Path>> getElements)
-        {
-            var identity = new Path(source);
-            var types = new TypeBase[0];
-            var elements = new Dictionary<TypeBase, Path> {{source, identity}};
-            yield return identity;
-
-            var newTypes = new[] {source};
-            do
-            {
-                types = types.Union(newTypes).ToArray();
-                var newElements = newTypes
-                    .SelectMany(type => getElements(type).Combine(elements[type]))
-                    .Where(element => !types.Contains(element.Destination))
-                    .ToArray();
-                foreach(var element in newElements)
-                {
-                    yield return element;
-                    elements.Add(element.Destination, element);
-                }
-
-                newTypes = newElements
-                    .Select(element => element.Destination)
-                    .ToArray();
-            } while(newTypes.Any());
-        }
-
-        static IEnumerable<Path> Combine(this IEnumerable<Path> listOfNewContinuations, Path path)
-        {
-            return listOfNewContinuations.Select
-                (
-                    newPath =>
-                    {
-                        Tracer.Assert
-                            (
-                                path.Destination == newPath.Source,
-                                () => "\npath=" + path.NodeDump + "\nnewPath=" + newPath.NodeDump
-                            );
-                        return new Path(newPath.Elements.Concat(path.Elements).ToArray());
-                    }
-                )
-                .ToArray();
-        }
-
-        static IEnumerable<Path> Combine(this TypeBase destination, ISimpleFeature element, Path path)
-        {
-            return element
-                .ResultType()
-                .GetReflexiveConversionPaths()
-                .ToArray()
-                .Where(e => e.Destination == destination)
-                .ToArray()
-                .Combine(new Path(element))
-                .ToArray()
-                .Combine(path)
-                .ToArray()
-                ;
-        }
-
-        static IEnumerable<Path> GetReflexiveConversionPaths(this TypeBase target)
-        {
-            return target.FeatureClosure
-                (
-                    type => type
-                        .ReflexiveConversions
-                        .Select(element => new Path(element))
-                );
-        }
-
-        static IEnumerable<TypeBase> GetReachableTypes(this TypeBase target)
-        {
-            return target
-                .GetReflexiveConversionPaths()
-                .Select(element => element.Destination);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using hw.Debug;
+using hw.Helper;
+using Reni.Feature;
+
+namespace Reni.Type
+{
+    static class ConversionService
+    {
+        internal sealed class Path : DumpableObject
+        {
+            public readonly TypeBase Source;
+            public readonly ISimpleFeature[] Elements;
+
+            public Path(TypeBase source)
+            {
+                Source = source;
+                Elements = new ISimpleFeature[0];
+                Tracer.Assert(Source != null);
+            }
+
+            public Path(params ISimpleFeature[] elements)
+            {
+                Tracer.Assert(elements.Any());
+                Tracer.Assert(!elements.Skip(1).Where((element, i) => element.ResultType() != elements[i].TargetType).Any());
+                Source = elements.Last().TargetType;
+                Elements = elements;
+                Tracer.Assert(Source != null);
+            }
+
+            public TypeBase Destination
+            {
+                get
+                {
+                    var result = Elements.FirstOrDefault();
+                    if(result != null)
+                        return result.ResultType();
+                    return Source;
+                }
+            }
+
+            protected override string GetNodeDump()
+            {
+                return Elements
+                    .Select(element => element.ResultType().DumpPrintText + " <== ")
+                    .Stringify("")
+                       + Source.DumpPrintText;
+            }
+        }
+
+        public static Path FindPath(TypeBase source, TypeBase destination)
+        {
+            if(source == destination)
+                return new Path(source);
+
+            var conversions = source.GetReflexiveConversionPaths().ToArray();
+            var result = conversions.SingleOrDefault(x => x.Destination == destination);
+            if(result != null)
+                return result;
+
+            var stripConversions = conversions.SelectMany(path => StripConversions(destination, path)).ToArray();
+            result = stripConversions.SingleOrDefault(x => x.Destination == destination);
+            if(result != null)
+                return result;
+
+            return conversions
+                .Concat(stripConversions)
+                .SelectMany(path => ForcedConversions(destination, path))
+                .SingleOrDefault(x => x.Destination == destination);
+        }
+
+        static IEnumerable<Path> ForcedConversions(TypeBase destination, Path path)
+        {
+            return destination
+                .GetReachableTypes()
+                .SelectMany(destinationEntry => path.Destination.GetForcedConversions(destinationEntry))
+                .SelectMany(element => destination.Combine(element, path));
+        }
+
+        static IEnumerable<Path> StripConversions(TypeBase destination, Path path)
+        {
+            var conversion = path.Destination.GetStripConversion();
+            if(conversion == null)
+                return new Path[0];
+            return destination
+                .Combine(conversion, path)
+                .ToArray();
+        }
+
+        static IEnumerable<Path> Combine(this TypeBase destination, ISimpleFeature element, Path path)
+        {
+            return element
+                .ResultType()
+                .GetReflexiveConversionPaths()
+                .Where(e => e.Destination == destination)
+                .Combine(new Path(element))
+                .Combine(path)
+                ;
+        }
+
+        static IEnumerable<T> NullableToArray<T>(this T target) { return target.Equals(default(T)) ? new T[0] : new[] {target}; }
+
+        public static string DumpObvious(TypeBase source) { return DumpReachable(source, type => type.ReflexiveConversions); }
+
+        static string DumpReachable(TypeBase source, Func<TypeBase, IEnumerable<ISimpleFeature>> getConversionElements)
+        {
+            return source.ReachableTypes(getConversionElements).Select(t => t.NodeDump).Stringify("\n");
+        }
+
+        static IEnumerable<TypeBase> ReachableTypes
+            (this TypeBase source, Func<TypeBase, IEnumerable<ISimpleFeature>> getConversionElements)
+        {
+            var types = new TypeBase[0];
+            var newTypes = new[] {source};
+            do
+            {
+                types = types.Union(newTypes).ToArray();
+                newTypes = newTypes
+                    .SelectMany(type => getConversionElements(type).Select(c => c.ResultType()))
+                    .Where(type => !types.Contains(type))
+                    .ToArray();
+            } while(newTypes.Any());
+            return types;
+        }
+
+        static IEnumerable<Path> FeatureClosure
+            (this TypeBase source, Func<TypeBase, IEnumerable<Path>> getElements)
+        {
+            var identity = new Path(source);
+            var types = new TypeBase[0];
+            var elements = new Dictionary<TypeBase, Path> {{source, identity}};
+            yield return identity;
+
+            var newTypes = new[] {source};
+            do
+            {
+                types = types.Union(newTypes).ToArray();
+                var newElements = newTypes
+                    .SelectMany(type => getElements(type).Combine(elements[type]))
+                    .Where(element => !types.Contains(element.Destination))
+                    .ToArray();
+                foreach(var element in newElements)
+                {
+                    yield return element;
+                    elements.Add(element.Destination, element);
+                }
+
+                newTypes = newElements
+                    .Select(element => element.Destination)
+                    .ToArray();
+            } while(newTypes.Any());
+        }
+
+        static IEnumerable<Path> Combine(this IEnumerable<Path> listOfNewContinuations, Path path)
+        {
+            return listOfNewContinuations.Select
+                (
+                    newPath =>
+                    {
+                        Tracer.Assert
+                            (
+                                path.Destination == newPath.Source,
+                                () => "\npath=" + path.NodeDump + "\nnewPath=" + newPath.NodeDump
+                            );
+                        return new Path(newPath.Elements.Concat(path.Elements).ToArray());
+                    }
+                )
+                .ToArray();
+        }
+
+        static IEnumerable<Path> GetReflexiveConversionPaths(this TypeBase target)
+        {
+            return target.FeatureClosure
+                (
+                    type => type
+                        .ReflexiveConversions
+                        .Select(element => new Path(element))
+                );
+        }
+
+        static IEnumerable<TypeBase> GetReachableTypes(this TypeBase target)
+        {
+            return target
+                .GetReflexiveConversionPaths()
+                .Select(element => element.Destination);
+        }
+    }
 }


fix issue

fix issue

--- src/wp8/cordova/MpnsRegistration.cs
+++ src/wp8/cordova/MpnsRegistration.cs
@@ -1,18 +1,9 @@
 using System;
 using System.Net;
 using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
 using System.Threading.Tasks;
 using Microsoft.Phone.Notification;
-using Microsoft.Phone.Info;
 using System.Collections.Generic;
-using System.Text.RegularExpressions;

 namespace AeroGear.Push
 {
@@ -35,12 +26,29 @@
                 {
                     channel = new HttpNotificationChannel(channelName);
                 }
-                channel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(PushChannel_ChannelUriUpdated);
-                channel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(PushChannel_ErrorOccurred);
+
+                var tcs = new TaskCompletionSource<HttpStatusCode>();
+                channel.ChannelUriUpdated += async (s, e) =>
+                {
+                    ChannelStore channelStore = new ChannelStore();
+                    if (!e.ChannelUri.ToString().Equals(channelStore.Read()))
+                    {
+                        installation.deviceToken = e.ChannelUri.ToString();
+                        channelStore.Save(e.ChannelUri.ToString());
+                        HttpStatusCode result = await client.register(installation);
+                        tcs.TrySetResult(result);
+                    }
+                };
+                channel.ErrorOccurred += (s, e) =>
+                {
+                    tcs.TrySetException(new Exception(e.Message));
+                };
+
                 channel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(PushChannel_ShellToastNotificationReceived);

                 channel.Open();
                 channel.BindToShellToast();
+                return tcs.Task;
             });
         }

@@ -48,7 +56,7 @@
         {
             string message = e.Collection["wp:Text1"];
             IDictionary<string, string> data = null;
-            if (e.Collection.Keys.Contains("wp:Param") && e.Collection["wp:Param"] != null)
+            if (e.Collection.ContainsKey("wp:Param") && e.Collection["wp:Param"] != null)
             {
                 data = UrlQueryParser.ParseQueryString(e.Collection["wp:Param"]);
             }
@@ -64,17 +72,6 @@
             }));
         }

-        private void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
-        {
-            ChannelStore channelStore = new ChannelStore();
-            if (!e.ChannelUri.ToString().Equals(channelStore.Read()))
-            {
-                installation.deviceToken = e.ChannelUri.ToString();
-                channelStore.Save(e.ChannelUri.ToString());
-                client.register(installation);
-            }
-        }
-
         protected override Installation CreateInstallation(PushConfig pushConfig)
         {
             string operatingSystem = Environment.OSVersion.Platform.ToString();


made BlockCipher configurable

made BlockCipher configurable

--- src/x2net/Transforms/BlockCipher.cs
+++ src/x2net/Transforms/BlockCipher.cs
@@ -15,14 +15,9 @@
     /// A simple example of BufferTransform that performs block encryption and
     /// decryption based on the keys exchanged by an asymmetric algorithm.
     ///
-    /// <remarks>
-    /// Illustration purpose only. Do NOT use this as is in production.
-    /// </remarks>
     public sealed class BlockCipher : IBufferTransform
     {
-        private const int blockSize = 128;
-        private const int keySize = 128;
-        private const int rsaKeySize = 512;
+        private Settings settings;

         private SymmetricAlgorithm encryptionAlgorithm;
         private SymmetricAlgorithm decryptionAlgorithm;
@@ -33,29 +28,65 @@
         private byte[] encryptionIV;
         private byte[] decryptionIV;

-        private int BlockSizeInBytes { get { return (blockSize >> 3); } }
-        private int KeySizeInBytes { get { return (keySize >> 3); } }
-
-        public int HandshakeBlockLength { get { return (rsaKeySize >> 3); } }
+        private int BlockSizeInBytes { get { return (settings.BlockSize >> 3); } }
+        private int KeySizeInBytes { get { return (settings.KeySize >> 3); } }
+
+        public int HandshakeBlockLength { get { return (settings.RsaKeySize >> 3); } }

         public BlockCipher()
         {
+            settings = new Settings {
+                BlockSize = 128,
+                KeySize = 128,
+                RsaKeySize = 512,
+
+                Padding = PaddingMode.PKCS7,
+
+                // In a real-world client/server production, each peer should use a
+                // different RSA key pair.
+                RsaMyPrivateKey = @"
+<RSAKeyValue><Modulus>tCNTvJ3bN6uLsqiUMeDGaaUSXyS9bs0m8q2+tmh7QfMwAP9G8CEjFaxyjb
+391QeCDsX+lRNf4wsuTJvnbk8rGw==</Modulus><Exponent>AQAB</Exponent>
8GQnZQd9C4vc
+PnezAYD7eTRf01Y52f3/mdhlEi3+1hU=
<Q>v9Wg0aXwf1TBjnsubTmY9b8ZTnAw2CApHPpUe068+
+G8=</Q><DP>Ijj/6sAgKy6kEjiUQViNdHniUoHqBoDEjLBj4yytJOk=</DP><DQ>Q5lOAFKPOu9s/X5e
+z9J6Gi7rBf7211IN6s4zsvf+EzU=</DQ><InverseQ>UfiNSsb4iYaAhgbNp3pTFnvwn1uf1sKQoBN7m
+Mv0LpA=</InverseQ><D>MzlIen449B+n3enqGjTctvXlv4BnDbbwuFmHvb8ALcRKnY+e5BjF03CSzvK
+hDthiOoUk1O9KWo47g0FGaleJIQ==</D></RSAKeyValue>
+",
+                RsaPeerPublicKey = @"
+<RSAKeyValue><Modulus>tCNTvJ3bN6uLsqiUMeDGaaUSXyS9bs0m8q2+tmh7QfMwAP9G8CEjFaxyjb
+391QeCDsX+lRNf4wsuTJvnbk8rGw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>
+"
+            };
+
+            Initialize();
+        }
+
+        public BlockCipher(Settings settings)
+        {
+            this.settings = settings;
+
+            Initialize();
+        }
+
+        private void Initialize()
+        {
             encryptionAlgorithm = Aes.Create();
-            encryptionAlgorithm.BlockSize = blockSize;
-            encryptionAlgorithm.KeySize = keySize;
-            encryptionAlgorithm.Mode = CipherMode.CBC;
-            encryptionAlgorithm.Padding = PaddingMode.PKCS7;
+            encryptionAlgorithm.BlockSize = settings.BlockSize;
+            encryptionAlgorithm.KeySize = settings.KeySize;
+            encryptionAlgorithm.Mode = settings.Mode;
+            encryptionAlgorithm.Padding = settings.Padding;

             decryptionAlgorithm = Aes.Create();
-            decryptionAlgorithm.BlockSize = blockSize;
-            decryptionAlgorithm.KeySize = keySize;
-            decryptionAlgorithm.Mode = CipherMode.CBC;
-            decryptionAlgorithm.Padding = PaddingMode.PKCS7;
+            decryptionAlgorithm.BlockSize = settings.BlockSize;
+            decryptionAlgorithm.KeySize = settings.KeySize;
+            decryptionAlgorithm.Mode = settings.Mode;
+            decryptionAlgorithm.Padding = settings.Padding;
         }

         public object Clone()
         {
-            return new BlockCipher();
+            return new BlockCipher(settings);
         }

         public void Dispose()
@@ -73,9 +104,9 @@
             encryptionKey = challenge.SubArray(0, KeySizeInBytes);
             encryptionIV = challenge.SubArray(KeySizeInBytes, BlockSizeInBytes);

-            using (var rsa = new RSACryptoServiceProvider(rsaKeySize))
-            {
-                ImportRsaParameters(rsa, rsaPeerPublicKey);
+            using (var rsa = new RSACryptoServiceProvider(settings.RsaKeySize))
+            {
+                ImportRsaParameters(rsa, settings.RsaPeerPublicKey);
                 return rsa.Encrypt(challenge, false);
             }
         }
@@ -83,9 +114,9 @@
         public byte[] Handshake(byte[] challenge)
         {
             byte[] decrypted;
-            using (var rsa = new RSACryptoServiceProvider(rsaKeySize))
-            {
-                ImportRsaParameters(rsa, rsaMyPrivateKey);
+            using (var rsa = new RSACryptoServiceProvider(settings.RsaKeySize))
+            {
+                ImportRsaParameters(rsa, settings.RsaMyPrivateKey);
                 decrypted = rsa.Decrypt(challenge, false);

                 decryptionKey = decrypted.SubArray(0, KeySizeInBytes);
@@ -96,16 +127,16 @@
                 //return rsa.SignData(decrypted, new SHA1CryptoServiceProvider());
             }
             // But if not, replay the data decrypted with our private key.
-            using (var rsa = new RSACryptoServiceProvider(rsaKeySize))
-            {
-                ImportRsaParameters(rsa, rsaPeerPublicKey);
+            using (var rsa = new RSACryptoServiceProvider(settings.RsaKeySize))
+            {
+                ImportRsaParameters(rsa, settings.RsaPeerPublicKey);
                 return rsa.Encrypt(decrypted, false);
             }
         }

         public bool FinalizeHandshake(byte[] response)
         {
-            using (var rsa = new RSACryptoServiceProvider(rsaKeySize))
+            using (var rsa = new RSACryptoServiceProvider(settings.RsaKeySize))
             {
                 byte[] expected = encryptionKey.Concat(encryptionIV);

@@ -115,7 +146,7 @@
                 //return rsa.VerifyData(expected, new SHA1CryptoServiceProvider(), response);

                 // But if not, verify the replayed data.
-                ImportRsaParameters(rsa, rsaMyPrivateKey);
+                ImportRsaParameters(rsa, settings.RsaMyPrivateKey);
                 byte[] actual = rsa.Decrypt(response, false);
                 return actual.EqualsExtended(expected);
             }
@@ -289,20 +320,22 @@
 #endif
         }

-        // In a real-world client/server production, each peer should use a
-        // different RSA key pair.
-        private const string rsaMyPrivateKey = @"
-<RSAKeyValue><Modulus>tCNTvJ3bN6uLsqiUMeDGaaUSXyS9bs0m8q2+tmh7QfMwAP9G8CEjFaxyjb
-391QeCDsX+lRNf4wsuTJvnbk8rGw==</Modulus><Exponent>AQAB</Exponent>
8GQnZQd9C4vc
-PnezAYD7eTRf01Y52f3/mdhlEi3+1hU=
<Q>v9Wg0aXwf1TBjnsubTmY9b8ZTnAw2CApHPpUe068+
-G8=</Q><DP>Ijj/6sAgKy6kEjiUQViNdHniUoHqBoDEjLBj4yytJOk=</DP><DQ>Q5lOAFKPOu9s/X5e
-z9J6Gi7rBf7211IN6s4zsvf+EzU=</DQ><InverseQ>UfiNSsb4iYaAhgbNp3pTFnvwn1uf1sKQoBN7m
-Mv0LpA=</InverseQ><D>MzlIen449B+n3enqGjTctvXlv4BnDbbwuFmHvb8ALcRKnY+e5BjF03CSzvK
-hDthiOoUk1O9KWo47g0FGaleJIQ==</D></RSAKeyValue>
-";
-        private const string rsaPeerPublicKey = @"
-<RSAKeyValue><Modulus>tCNTvJ3bN6uLsqiUMeDGaaUSXyS9bs0m8q2+tmh7QfMwAP9G8CEjFaxyjb
-391QeCDsX+lRNf4wsuTJvnbk8rGw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>
-";
+        public class Settings
+        {
+            public int BlockSize { get; set; }
+            public int KeySize { get; set; }
+            public int RsaKeySize { get; set; }
+
+            public CipherMode Mode { get; private set; }
+            public PaddingMode Padding { get; set; }
+
+            public string RsaMyPrivateKey { get; set; }
+            public string RsaPeerPublicKey { get; set; }
+
+            public Settings()
+            {
+                Mode = CipherMode.CBC;
+            }
+        }
     }
 }


basci cancelation for program plugin query

--- Plugins/Wox.Plugin.Program/Main.cs
+++ Plugins/Wox.Plugin.Program/Main.cs
@@ -54,19 +54,32 @@

         public List<Result> Query(Query query)
         {
-
+            if (_updateSource != null && !_updateSource.IsCancellationRequested)
+            {
+                _updateSource.Cancel();
+                Logger.WoxDebug($"cancel init {_updateSource.Token.GetHashCode()} {Thread.CurrentThread.ManagedThreadId} {query.RawQuery}");
+                _updateSource.Dispose();
+            }
+            var source = new CancellationTokenSource();
+            _updateSource = source;
+            var token = source.Token;
+
+            if (token.IsCancellationRequested) { return new List<Result>(); }
             var results1 = _win32s.AsParallel()
                 .Where(p => p.Enabled)
                 .Select(p => p.Result(query.Search, _context.API));
-
+
+            if (token.IsCancellationRequested) { return new List<Result>(); }
             var results2 = _uwps.AsParallel()
                 .Where(p => p.Enabled)
                 .Select(p => p.Result(query.Search, _context.API));

+            if (token.IsCancellationRequested) { return new List<Result>(); }
             var result = results1.Concat(results2)
                 .Where(r => r != null && r.Score > 0)
                 .Where(p => !_settings.IgnoredSequence.Any(entry =>
             {
+                if (token.IsCancellationRequested) { return false; }
                 if (entry.IsRegex)
                 {
                     return Regex.Match(p.Title, entry.EntryString).Success;


Simplified definition

Simplified definition

--- Tulpep.NetworkAutoSwitch.Service/Program.cs
+++ Tulpep.NetworkAutoSwitch.Service/Program.cs
@@ -52,8 +52,7 @@
             }
             else
             {
-                ServiceBase[] ServicesToRun;
-                ServicesToRun = new ServiceBase[]
+                ServiceBase[]  ServicesToRun = new ServiceBase[]
                 {
                     new NetworkAutoSwitch()
                 };


Interactive mode breaks if the camera layer is 8 rather than 11.

--- TwitchPlaysAssembly/Src/UI/ModuleCameras.cs
+++ TwitchPlaysAssembly/Src/UI/ModuleCameras.cs
@@ -8,7 +8,7 @@

 public class ModuleCameras : MonoBehaviour
 {
-	public const int CameraLayer = 8;
+	public const int CameraLayer = 11;

 	public class ModuleItem
 	{


敵のbaseスコアによって敵が死んだ時のエフェクトの大きさが変わる

敵のbaseスコアによって敵が死んだ時のエフェクトの大きさが変わる

--- UnityProject/Assets/Scripts/Battle/Enemy.cs
+++ UnityProject/Assets/Scripts/Battle/Enemy.cs
@@ -41,7 +41,7 @@
 			var effectTrans = go.transform;
 			effectTrans.SetParent(transform.parent);	// 弾は消えるので親オブジェクトに関連付ける
 			effectTrans.localPosition = transform.localPosition;
-			effectTrans.localScale = Vector3.one;
+			effectTrans.localScale = Vector3.one * Mathf.Sqrt(baseScore); // 敵によってエフェクトの大きさを変更してみる
 		}

 		this.GetComponent<Collider2D>().enabled = false;


Quick fix for texture alignment problem

Quick fix for texture alignment problem

--- UnityRenderingPlugin/RenderStereoCubemap.cs
+++ UnityRenderingPlugin/RenderStereoCubemap.cs
@@ -306,17 +306,17 @@
     {
         PlaneInit();
         CameraInit();
-
+        int[] map = {1,3,8,9,0,2,5,7,8,9,4,6};
         System.IntPtr[] texturePtrs = new System.IntPtr[faceCount];
         int j = 0;
         for (int i = 0; i < Math.Min(faceCount,12); i++)
         {
-            texturePtrs[i] = renderTextures[j].GetNativeTexturePtr();
-            j++;
+            texturePtrs[i] = renderTextures[map[i]].GetNativeTexturePtr();
+            /*j++;
             if (j == 4)
                 j = 8;
             else if (j == 10)
-                j = 4;
+                j = 4;*/
         }


Add value type to not supported exception

--- ValveKeyValue/ValveKeyValue/ObjectCopier.cs
+++ ValveKeyValue/ValveKeyValue/ObjectCopier.cs
@@ -55,7 +55,7 @@
             else
             {
                 // TODO: For nullable types this typeof is not that useful
-                throw new NotSupportedException($"Convering to {typeof(TObject).Name} is not supported. (key = {keyValueObject.Name})");
+                throw new NotSupportedException($"Convering to {typeof(TObject).Name} is not supported. (key = {keyValueObject.Name}, type = {keyValueObject.Value.ValueType})");
             }
         }


тесты

тесты

--- VkNet.Tests/Categories/AudioCategoryTest.cs
+++ VkNet.Tests/Categories/AudioCategoryTest.cs
@@ -1208,7 +1208,7 @@

             var cat = GetMockedAudioCategory(url, json);

-			var result = cat.MoveToAlbum(45303161, new ulong[] {258542771, 258542571});
+			var result = cat.MoveToAlbum(45303161, new long[] {258542771, 258542571});

             Assert.That(result, Is.True);
         }


Mono "fix"

Mono "fix"

--- ActivatorCached.cs
+++ ActivatorCached.cs
@@ -55,6 +55,8 @@
             return result(args);
         }

+        // Mono has problems with it
+        /*
         /// <summary>
         /// Faster implementation of <see cref="Activator.CreateInstance{T}()"/>.
         /// <para/>
@@ -65,6 +67,7 @@
             var type = input == null ? typeof (T) : input.GetType();
             return (T) CreateInstance(type);
         }
+        */

         public static void ClearCache() { Cache.Clear(); }


Allow the host manager to load all assemblies from the runtime directory

--- RazorGenerator.Core/HostManager.cs
+++ RazorGenerator.Core/HostManager.cs
@@ -134,11 +134,26 @@
             string assemblyDirectory = AssemblyDirectory ?? Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

             // Look for the assembly at vX\RazorGenerator.vX.dll. If not, assume it is at RazorGenerator.vX.dll
+            string runtimeDirectory = Path.Combine(assemblyDirectory, "v" + runtimeValue);
             string assemblyName = "RazorGenerator.Core.v" + runtimeValue + ".dll";
-            string hostFile = Path.Combine(assemblyDirectory, "v" + runtimeValue, assemblyName);
-            hostFile = File.Exists(hostFile) ? hostFile : Path.Combine(assemblyDirectory, "v" + runtimeValue + ".dll");
-
-            return Assembly.LoadFrom(hostFile);
+            if (Directory.Exists(runtimeDirectory))
+            {
+                // If we have a vX directory, load everything from there.
+                Assembly assembly = null;
+                foreach (var file in Directory.EnumerateFiles(runtimeDirectory, "*.dll"))
+                {
+                    Assembly loadedAssembly = Assembly.LoadFrom(file);
+                    if (Path.GetFileName(file).Equals(assemblyName, StringComparison.OrdinalIgnoreCase))
+                    {
+                        assembly = loadedAssembly;
+                    }
+                }
+                return assembly;
+            }
+            else
+            {
+                return Assembly.LoadFrom(Path.Combine(assemblyDirectory, assemblyName));
+            }
         }

         internal static string GuessHost(string projectRoot, string projectRelativePath, out RazorRuntime runtime)


Slightly nicer reporting

Slightly nicer reporting

--- BaseDice/Player.cs
+++ BaseDice/Player.cs
@@ -252,12 +252,9 @@
                 /// <returns>The tally.</returns>
                 public string FinalTally()
                 {
-                        return this.runs.ToString() + " run" +
-                                (this.runs == 1 ? string.Empty : "s") + ".  " +
-                                this.hits.ToString() + " hit" +
-                                (this.hits == 1 ? string.Empty : "s") + ".  " +
-                                this.errors.ToString() + " error" +
-                                (this.errors == 1 ? string.Empty : "s") + ".";
+                        return this.ReportValue(this.runs, "run", ".  ") +
+                                this.ReportValue(this.outs, "out", ".  ") +
+                                this.ReportValue(this.errors, "error", ".");
                 }

                 /// <summary>
@@ -303,5 +300,19 @@
                         ++inn;
                         this.inningRuns[this.lastInning] = inn;
                 }
+
+                /// <summary>
+                /// Pluralize the specified number, noun and end.
+                /// </summary>
+                /// <param name="number">The object count.</param>
+                /// <param name="noun">The noun.</param>
+                /// <param name="end">The string ending.</param>
+                /// <returns>The report string with the noun pluralized.</returns>
+                /// <remarks>Currently only need to pluralize with 's'.</remarks>
+                private string ReportValue(int number, string noun, string end)
+                {
+                        return number.ToString() + " " + noun +
+                                (number == 1 ? string.Empty : "s") + end;
+                }
         }
 }


Locking movement when fire button is pressed

--- RobotFrog/Assets/Scripts/Player.cs
+++ RobotFrog/Assets/Scripts/Player.cs
@@ -85,7 +85,10 @@

         this.UpdateHeading(horizontal, vertical);

-        this.transform.position = this.transform.position + movementVector;
+        if (this.fireTimer <= 0)
+        {
+            this.transform.position = this.transform.position + movementVector;
+        }

         this.FireWeapon();


Cap width at 80

Cap width at 80

--- hangman.cs
+++ hangman.cs
@@ -23,8 +23,8 @@
       };

       var table = new Table(
-        Console.WindowWidth,  // width
-        2,                    // spacing
+        Math.Min(80, Console.WindowWidth),
+        2,
         rows
       );


Fix Intellisense warning.

Fix Intellisense warning.

--- RollGen/Properties/AssemblyInfo.cs
+++ RollGen/Properties/AssemblyInfo.cs
@@ -32,4 +32,3 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyFileVersion("1.0.*")]


Attribution

Attribution

--- SharpGEDParse/DrawAnce/DrawCirc.cs
+++ SharpGEDParse/DrawAnce/DrawCirc.cs
@@ -1,4 +1,7 @@
 // Draw pedigree as a doughnut chart
+//
+// Adapted from https://github.com/Serg-Norseman/GEDKeeper/tree/master/projects/GEDKeeper2/GKUI/Charts/CircleChart.cs
+//
 using GEDWrap;
 using System;
 using System.Drawing;


fix #251 (probably)

fix #251 (probably)

--- slimCat/Commands/Channel/ClearCommand.cs
+++ slimCat/Commands/Channel/ClearCommand.cs
@@ -33,12 +33,6 @@
     {
         private static void ClearChannel(ChannelModel channel)
         {
-            foreach (var item in channel.Messages)
-                item.Dispose();
-
-            foreach (var item in channel.Ads)
-                item.Dispose();
-
             channel.Messages.Clear();
             channel.Ads.Clear();
         }


Fix "Gender" not disabled while TTS is running

--- SimpleTTSReader/MainWindow.xaml.cs
+++ SimpleTTSReader/MainWindow.xaml.cs
@@ -103,6 +103,7 @@

                 sliderSpeed.IsEnabled = false;
                 sliderVolume.IsEnabled = false;
+                cbGender.IsEnabled = false;
             }
             else
             {
@@ -113,6 +114,7 @@

                 sliderSpeed.IsEnabled = true;
                 sliderVolume.IsEnabled = true;
+                cbGender.IsEnabled = true;

                 txtWord.Text = string.Empty;
             }


AlphaBlend fix + DrawImageAlpha

AlphaBlend fix + DrawImageAlpha

--- source/Cosmos.System2/Graphics/Canvas.cs
+++ source/Cosmos.System2/Graphics/Canvas.cs
@@ -857,6 +857,26 @@
         }

         /// <summary>
+        /// Draw image with alpha channel.
+        /// </summary>
+        /// <param name="image">Image to draw.</param>
+        /// <param name="x">X coordinate.</param>
+        /// <param name="y">Y coordinate.</param>
+        /// <exception cref="Exception">Thrown on memory access violation.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Thrown on fatal error.</exception>
+        public void DrawImageAlpha(Image image, int x, int y)
+        {
+            for (int _x = 0; _x < image.Width; _x++)
+            {
+                for (int _y = 0; _y < image.Height; _y++)
+                {
+                    Global.mDebugger.SendInternal(image.rawData[_x + _y * image.Width]);
+                    DrawPoint(new Pen(Color.FromArgb(image.rawData[_x + _y * image.Width])), x + _x, y + _y);
+                }
+            }
+        }
+
+        /// <summary>
         /// Draw image.
         /// </summary>
         /// <param name="image">Image to draw.</param>
@@ -866,6 +886,18 @@
         public void DrawImage(Image image, Point point)
         {
             DrawImage(image, point.X, point.Y);
+        }
+
+        /// <summary>
+        /// Draw image with alpha channel.
+        /// </summary>
+        /// <param name="image">Image to draw.</param>
+        /// <param name="point">Point of the top left corner of the image.</param>
+        /// <exception cref="Exception">Thrown on memory access violation.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Thrown on fatal error.</exception>
+        public void DrawImageAlpha(Image image, Point point)
+        {
+            DrawImageAlpha(image, point.X, point.Y);
         }

         /// <summary>
@@ -1117,11 +1149,11 @@
         /// <param name="to">Color to calculate.</param>
         /// <param name="from">Color used to calculate.</param>
         /// <param name="alpha">Alpha amount.</param>
-        public Color AlphaBlend(Color to, Color from, float alpha)
-        {
-            byte R = (byte)((to.R * alpha) + from.R * (1 - alpha));
-            byte G = (byte)((to.G * alpha) + from.G * (1 - alpha));
-            byte B = (byte)((to.B * alpha) + from.B * (1 - alpha));
+        public Color AlphaBlend(Color to, Color from, byte alpha)
+        {
+            byte R = (byte)((to.R * alpha + from.R * (255 - alpha)) >> 8);
+            byte G = (byte)((to.G * alpha + from.G * (255 - alpha)) >> 8);
+            byte B = (byte)((to.B * alpha + from.B * (255 - alpha)) >> 8);
             return Color.FromArgb(R, G, B);
         }


Mapping multimedia components based on schema title instead of root element name Fixed bug with mapping of IComponent

--- source/DD4T.ViewModels/AttributesBase.cs
+++ source/DD4T.ViewModels/AttributesBase.cs
@@ -387,12 +387,12 @@
                 if (data is IComponentPresentation)
                 {
                     var definedData = data as IComponentPresentation;
-                    schemaRootElementName = definedData.Component.Schema.RootElementName;
+                    schemaRootElementName = definedData.Component.Multimedia == null ? definedData.Component.Schema.RootElementName : definedData.Component.Schema.Title;
                 }
                 else if (data is IComponent)
                 {
                     var definedData = data as IComponent;
-                    schemaRootElementName = definedData.Schema.Title;
+                    schemaRootElementName = definedData.Multimedia == null ? definedData.Schema.RootElementName : definedData.Schema.Title;
                 }
                 else if (data is IEmbeddedFields)
                 {


fix type

fix type

--- sources/Domain.Model/Entities/Account.cs
+++ sources/Domain.Model/Entities/Account.cs
@@ -22,7 +22,7 @@

         public virtual string Name { get; protected set; }

-        public virtual long PlayerId { get; protected set; }
+        public virtual int PlayerId { get; protected set; }

         [CanBeNull]
         public virtual string GetToken()


also call async on host.

also call async on host.

--- Source/JeroenPot.WebJob/Program.cs
+++ Source/JeroenPot.WebJob/Program.cs
@@ -7,7 +7,7 @@
         static void Main(string[] args)
         {
             JobHost host = new JobHost();
-            host.Call(typeof(Functions).GetMethod("ProcessMethod"));
+            host.CallAsync(typeof(Functions).GetMethod("ProcessMethod"));
             host.RunAndBlock();
         }
     }


Updated fix for SetVertexShaderConstant

Updated fix for SetVertexShaderConstant

--- Source/SharpDX.Direct3D9/Device.cs
+++ Source/SharpDX.Direct3D9/Device.cs
@@ -1140,7 +1140,7 @@
             unsafe
             {
                 fixed (void* pData = data)
-                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length << 4);
+                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length << 2);
             }
         }

@@ -1158,7 +1158,7 @@
             unsafe
             {
                 fixed (void* pData = data)
-                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length << 2);
+                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length >> 2);
             }
         }

@@ -1204,7 +1204,7 @@
             unsafe
             {
                 fixed (void* pData = data)
-                    SetVertexShaderConstantI(startRegister, (IntPtr)pData, data.Length);
+                    SetVertexShaderConstantI(startRegister, (IntPtr)pData, data.Length >> 2);
             }
         }

@@ -1222,7 +1222,7 @@
             unsafe
             {
                 fixed (void* pData = data)
-                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length);
+                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, data.Length >> 2);
             }
         }

@@ -1237,7 +1237,7 @@
         /// <unmanaged>HRESULT IDirect3DDevice9::SetVertexShaderConstantF([In] unsigned int StartRegister,[In] const void* pConstantData,[In] unsigned int Vector4fCount)</unmanaged>
         public unsafe void SetVertexShaderConstant(int startRegister, Matrix* data)
         {
-            SetVertexShaderConstantF(startRegister, (IntPtr)data, 16);
+            SetVertexShaderConstantF(startRegister, (IntPtr)data, 4);
         }

         /// <summary>
@@ -1253,7 +1253,7 @@
         {
             unsafe
             {
-                SetVertexShaderConstantF(startRegister, new IntPtr(&data), 16);
+                SetVertexShaderConstantF(startRegister, new IntPtr(&data), 4);
             }
         }

@@ -1269,7 +1269,7 @@
         /// <unmanaged>HRESULT IDirect3DDevice9::SetVertexShaderConstantF([In] unsigned int StartRegister,[In] const void* pConstantData,[In] unsigned int Vector4fCount)</unmanaged>
         public unsafe void SetVertexShaderConstant(int startRegister, Matrix* data, int count)
         {
-            SetVertexShaderConstantF(startRegister, (IntPtr)data, count << 4);
+            SetVertexShaderConstantF(startRegister, (IntPtr)data, count << 2);
         }

         /// <summary>
@@ -1288,7 +1288,7 @@
             unsafe
             {
                 fixed (void* pData = &data[offset])
-                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, count << 4);
+                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, count << 2);
             }
         }

@@ -1306,7 +1306,7 @@
             unsafe
             {
                 fixed (void* pData = &data[offset])
-                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, count << 2);
+                    SetVertexShaderConstantF(startRegister, (IntPtr)pData, count >> 2);
             }
         }


Add better fix for items swapping erratically.

--- osu.Game/Overlays/Music/PlaylistList.cs
+++ osu.Game/Overlays/Music/PlaylistList.cs
@@ -143,22 +143,19 @@

                 int src = (int)draggedItem.Depth;

-                var matchingItem = items.LastOrDefault(c => c.Position.Y < itemsPos.Y);
-                if (matchingItem == null)
-                    return true;
-
-                int dst = (int)matchingItem.Depth;
-
-                // Due to the position predicate above, there is an edge case to consider when an item is moved upwards:
-                // At the point where the two items cross there will be two items sharing the same condition, and the items will jump back
-                // and forth between the two positions because of this. This is accentuated if the items span differing line heights.
-                // The easiest way to avoid this is to ensure the movement direction matches the expected mouse delta
-
-                if (state.Mouse.Delta.Y <= 0 && dst > src)
-                    return true;
-
-                if (state.Mouse.Delta.Y >= 0 && dst < src)
-                    return true;
+                // Find the last item with position < mouse position. Note we can't directly use
+                // the item positions as they are being transformed
+                float heightAccumulator = 0;
+                int dst = 0;
+                for (; dst < items.Count; dst++)
+                {
+                    // Using BoundingBox here takes care of scale, paddings, etc...
+                    heightAccumulator += items[dst].BoundingBox.Height;
+                    if (heightAccumulator > itemsPos.Y)
+                        break;
+                }
+
+                dst = MathHelper.Clamp(dst, 0, items.Count - 1);

                 if (src == dst)
                     return true;


Remove unnecessary comment

Remove unnecessary comment

--- osu.Game/Overlays/Volume/VolumeMeter.cs
+++ osu.Game/Overlays/Volume/VolumeMeter.cs
@@ -133,9 +133,6 @@

         private double displayVolume;

-        /// <summary>
-        /// This is needed because <see cref="TransformCustom{TValue,T}"/> doesn't support <see cref="Bindable{T}"/>
-        /// </summary>
         protected double DisplayVolume
         {
             get => displayVolume;


Simplify property

Simplify property

--- osu.Game/Screens/Play/HUD/ModDisplay.cs
+++ osu.Game/Screens/Play/HUD/ModDisplay.cs
@@ -53,7 +53,6 @@
             mods.ValueChanged += mods =>
             {
                 iconsContainer.Clear();
-
                 foreach (Mod mod in mods)
                 {
                     iconsContainer.Add(new ModIcon(mod)
@@ -68,28 +67,17 @@
             };
         }

-        private bool playIsRanked()
-        {
-            if (!mods.Value.Any()) return true;
-
-            foreach (var mod in mods.Value)
-            {
-                if (!mod.Ranked)
-                    return false;
-            }
-
-            return true;
-        }
-
         protected override void LoadComplete()
         {
             base.LoadComplete();
             appearTransform();
         }

+        private bool playIsRanked => !mods.Value.Any(m => !m.Ranked);
+
         private void appearTransform()
         {
-            if (!playIsRanked())
+            if (!playIsRanked)
                 unrankedText.FadeInFromZero(fade_duration, EasingTypes.OutQuint);
             else
                 unrankedText.FadeTo(0);


Disable the assembly cache

Disable the assembly cache

until the initialization race condition is solved

--- src/Abioc/Compilation/CodeCompilation.cs
+++ src/Abioc/Compilation/CodeCompilation.cs
@@ -50,7 +50,8 @@
             if (srcAssembly == null)
                 throw new ArgumentNullException(nameof(srcAssembly));

-            Assembly assembly = Compilations.GetOrAdd(code, c => CompileCode(c, srcAssembly));
+            ////Assembly assembly = Compilations.GetOrAdd(code, c => CompileCode(c, srcAssembly));
+            Assembly assembly = CompileCode(code, srcAssembly);

             if (fieldValues.Length > 0)
             {
@@ -94,7 +95,8 @@
             if (srcAssembly == null)
                 throw new ArgumentNullException(nameof(srcAssembly));

-            Assembly assembly = Compilations.GetOrAdd(code, c => CompileCode(c, srcAssembly));
+            ////Assembly assembly = Compilations.GetOrAdd(code, c => CompileCode(c, srcAssembly));
+            Assembly assembly = CompileCode(code, srcAssembly);

             if (fieldValues.Length > 0)
             {


Add index on `MD5Hash` property

Add index on `MD5Hash` property

Reduces actual query overhead significantly

--- osu.Game/Beatmaps/BeatmapInfo.cs
+++ osu.Game/Beatmaps/BeatmapInfo.cs
@@ -90,6 +90,7 @@

         public double StarRating { get; set; }

+        [Indexed]
         public string MD5Hash { get; set; } = string.Empty;

         [JsonIgnore]


Remove remnants of user skin PR

Remove remnants of user skin PR

--- osu.Game/Skinning/SkinManager.cs
+++ osu.Game/Skinning/SkinManager.cs
@@ -60,9 +60,6 @@
             };
         }

-        private Skin createIfNotExisting(SkinInfo skinInfo) =>
-            GetSkin(Query(s => s.Name == skinInfo.Name) ?? Import(skinInfo).Result);
-
         protected override bool ShouldDeleteArchive(string path) => Path.GetExtension(path)?.ToLowerInvariant() == ".osk";

         /// <summary>
@@ -110,9 +107,6 @@
         /// <returns>A <see cref="Skin"/> instance correlating to the provided <see cref="SkinInfo"/>.</returns>
         public Skin GetSkin(SkinInfo skinInfo)
         {
-            if (skinInfo == null)
-                return null;
-
             if (skinInfo == SkinInfo.Default)
                 return new DefaultSkin();


Minor visual adjustments

Minor visual adjustments

--- osu.Game/Users/UserBrickPanel.cs
+++ osu.Game/Users/UserBrickPanel.cs
@@ -16,15 +16,14 @@
         public UserBrickPanel(User user)
             : base(user)
         {
-            AutoSizeAxes = Axes.X;
-            Height = 23;
+            AutoSizeAxes = Axes.Both;
             CornerRadius = 6;
         }

         [BackgroundDependencyLoader]
         private void load()
         {
-            Background.FadeTo(0.3f);
+            Background.FadeTo(0.2f);
         }

         protected override Drawable CreateLayout() => new FillFlowContainer
@@ -34,7 +33,8 @@
             Spacing = new Vector2(5, 0),
             Margin = new MarginPadding
             {
-                Horizontal = 5
+                Horizontal = 10,
+                Vertical = 3,
             },
             Anchor = Anchor.Centre,
             Origin = Anchor.Centre,


Additional multiply integer tests for Flow

--- Src/TensorSharp.Tests/FlowTests.cs
+++ Src/TensorSharp.Tests/FlowTests.cs
@@ -395,6 +395,72 @@
         }

         [TestMethod]
+        public void MultiplyIntegerSingleValues()
+        {
+            INode<int> left = Flow.Constant(2);
+            INode<int> right = Flow.Constant(21);
+
+            var multiply = Flow.Multiply(left, right);
+
+            Assert.AreEqual(left.Rank, multiply.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(right.Shape));
+
+            var result = multiply.Evaluate();
+
+            Assert.IsNotNull(result);
+            Assert.AreEqual(left.Rank, result.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(result.Shape));
+            Assert.AreEqual(42, result.GetValue());
+        }
+
+        [TestMethod]
+        public void MultiplyIntegerVectors()
+        {
+            INode<int> left = Flow.Constant(new int[] { 1, 2, 3 });
+            INode<int> right = Flow.Constant(new int[] { 4, 5, 6 });
+
+            var multiply = Flow.Multiply(left, right);
+
+            Assert.AreEqual(left.Rank, multiply.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(right.Shape));
+
+            var result = multiply.Evaluate();
+
+            Assert.IsNotNull(result);
+            Assert.AreEqual(left.Rank, result.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(result.Shape));
+            Assert.AreEqual(4, result.GetValue(0));
+            Assert.AreEqual(10, result.GetValue(1));
+            Assert.AreEqual(18, result.GetValue(2));
+        }
+
+        [TestMethod]
+        public void MultiplyIntegerMatrices()
+        {
+            INode<int> left = Flow.Constant(new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6 } });
+            INode<int> right = Flow.Constant(new int[][] { new int[] { 10, 20, 30 }, new int[] { 40, 50, 60 } });
+
+            var multiply = Flow.Multiply(left, right);
+
+            Assert.AreEqual(left.Rank, multiply.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(right.Shape));
+
+            var result = multiply.Evaluate();
+
+            Assert.IsNotNull(result);
+            Assert.AreEqual(left.Rank, result.Rank);
+            Assert.IsTrue(left.Shape.SequenceEqual(result.Shape));
+
+            Assert.AreEqual(10, result.GetValue(0, 0));
+            Assert.AreEqual(40, result.GetValue(0, 1));
+            Assert.AreEqual(90, result.GetValue(0, 2));
+
+            Assert.AreEqual(160, result.GetValue(1, 0));
+            Assert.AreEqual(250, result.GetValue(1, 1));
+            Assert.AreEqual(360, result.GetValue(1, 2));
+        }
+
+        [TestMethod]
         public void DivideIntegerSingleValues()
         {
             INode<int> left = Flow.Constant(84);


Reinstate record progress update

Reinstate record progress update

--- src/Cake.TFBuild.Module/TFBuildEngine.cs
+++ src/Cake.TFBuild.Module/TFBuildEngine.cs
@@ -76,7 +76,7 @@
                 var currentTask =
                     _engine.Tasks.First(t => t.Name == e.TaskSetupContext.Task.Name);
                 var currentIndex = _engine.Tasks.ToList().IndexOf(currentTask);
-                //b.TFBuild.UpdateProgress(_parentRecord, GetProgress(currentIndex, _engine.Tasks.Count));
+                b.TFBuild.UpdateProgress(_parentRecord, GetProgress(currentIndex, _engine.Tasks.Count));
                 b.TFBuild.Commands.SetProgress(GetProgress(currentIndex, _engine.Tasks.Count), e.TaskSetupContext.Task.Name);
                 var g = e.TaskSetupContext.TFBuild()
                     .Commands.CreateNewRecord(currentTask.Name, "build", currentIndex,


Move circuitBreakerEventHandler to public property

--- src/CircuitBreaker.Net/CircuitBreaker.cs
+++ src/CircuitBreaker.Net/CircuitBreaker.cs
@@ -14,14 +14,11 @@

         private ICircuitBreakerState _currentState;

-        private ICircuitBreakerEvents _circuitBreakerEventHandler;
-
         public CircuitBreaker(
             TaskScheduler taskScheduler,
             int maxFailures,
             TimeSpan invocationTimeout,
-            TimeSpan circuitResetTimeout,
-            ICircuitBreakerEvents eventHandler = null)
+            TimeSpan circuitResetTimeout)
         {
             var invoker = new CircuitBreakerInvoker(taskScheduler);

@@ -42,8 +39,9 @@
                 circuitResetTimeout);

             _currentState = _closedState;
-            _circuitBreakerEventHandler = eventHandler;
         }
+
+        public ICircuitBreakerEvents CircuitBreakerEventHandler { get; set; }

         public virtual void Execute(Action action)
         {
@@ -75,17 +73,17 @@

         void ICircuitBreakerSwitch.AttemptToCloseCircuit(ICircuitBreakerState from)
         {
-            if (Trip(from, _halfOpenedState)) _circuitBreakerEventHandler?.CircuitHalfOpened(this);
+            if (Trip(from, _halfOpenedState)) CircuitBreakerEventHandler?.CircuitHalfOpened(this);
         }

         void ICircuitBreakerSwitch.CloseCircuit(ICircuitBreakerState from)
         {
-            if (Trip(from, _closedState)) _circuitBreakerEventHandler?.CircuitClosed(this);
+            if (Trip(from, _closedState)) CircuitBreakerEventHandler?.CircuitClosed(this);
         }

         void ICircuitBreakerSwitch.OpenCircuit(ICircuitBreakerState from)
         {
-            if (Trip(from, _openedState)) _circuitBreakerEventHandler?.CircuitOpened(this);
+            if (Trip(from, _openedState)) CircuitBreakerEventHandler?.CircuitOpened(this);
         }

         private bool Trip(ICircuitBreakerState from, ICircuitBreakerState to)


dont try to find covertion methode to object in emitted MSIL

--- src/CompilerServices/CompilerServices.cs
+++ src/CompilerServices/CompilerServices.cs
@@ -362,7 +362,7 @@
 						il.Emit (OpCodes.Callvirt, tostring.Method);
 					} else if (!sourceValueType.IsValueType)
 						il.Emit (OpCodes.Castclass, sourceValueType);
-					else if (b.Source.Property.PropertyType != sourceValueType) {
+					else if (b.Source.Property.PropertyType != sourceValueType && b.Source.Property.PropertyType != typeof(object)) {
 						il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (b.Source.Property.PropertyType));
 					} else
 						il.Emit (OpCodes.Unbox_Any, b.Source.Property.PropertyType);


* fixed Pfusch

* fixed Pfusch

--- code/UI/Console/SDM/Program.cs
+++ code/UI/Console/SDM/Program.cs
@@ -17,11 +17,11 @@
             var localFsResults = localFsRetriever.Retrieve();
             OutputResults( localFsResults );

-            var registryRetriever32 = new RegistryRetriever32bit();
+            var registryRetriever32 = new Global32bitRegistryRetriever();
             var registry32Results = registryRetriever32.Retrieve();
             OutputResults( registry32Results );

-            var registryRetriever64 = new RegistryRetriever64bit();
+            var registryRetriever64 = new Global64bitRegistryRetriever();
             var registry64Results = registryRetriever64.Retrieve();
             OutputResults( registry64Results );


Fix double logging for work items.

Fix double logging for work items.

--- src/Core/Jobs/WorkItemJob/WorkItemJob.cs
+++ src/Core/Jobs/WorkItemJob/WorkItemJob.cs
@@ -15,6 +15,7 @@
             _messageBus = messageBus;
             _handlers = handlers;
             AutoComplete = true;
+            EnableLogging = false;
         }

         protected async override Task<JobResult> ProcessQueueEntryAsync(JobQueueEntryContext<WorkItemData> context) {


Update version to 2.0.1

Update version to 2.0.1

--- Syndll2/Properties/AssemblyInfo.cs
+++ Syndll2/Properties/AssemblyInfo.cs
@@ -11,8 +11,8 @@
 [assembly: ComVisible(false)]
 [assembly: Guid("a7fe65a7-0b61-4ea1-81c0-adc5a037ea17")]

-[assembly: AssemblyVersion("2.0.0.*")]
-[assembly: AssemblyInformationalVersion("2.0.0")]
+[assembly: AssemblyVersion("2.0.1.*")]
+[assembly: AssemblyInformationalVersion("2.0.1")]

 [assembly: InternalsVisibleTo("Syndll2.Tests, PublicKey=" +
 "00240000048000009400000006020000002400005253413100040000010001000f0f0c410cd366" +


Version Bump

Version Bump

--- Syndll2/Properties/AssemblyInfo.cs
+++ Syndll2/Properties/AssemblyInfo.cs
@@ -11,9 +11,9 @@
 [assembly: ComVisible(false)]
 [assembly: Guid("a7fe65a7-0b61-4ea1-81c0-adc5a037ea17")]

-[assembly: AssemblyVersion("0.5.2")]
-[assembly: AssemblyFileVersion("0.5.2.21")]
-[assembly: AssemblyInformationalVersion("0.5.2-beta")]
+[assembly: AssemblyVersion("0.5.3")]
+[assembly: AssemblyFileVersion("0.5.3.22")]
+[assembly: AssemblyInformationalVersion("0.5.3-beta")]

 [assembly: InternalsVisibleTo("Syndll2.Tests, PublicKey=" +
 "00240000048000009400000006020000002400005253413100040000010001000f0f0c410cd366" +


Update ConicTool.cs

Update ConicTool.cs

--- src/Draw2D.ViewModels/Tools/ConicTool.cs
+++ src/Draw2D.ViewModels/Tools/ConicTool.cs
@@ -52,7 +52,7 @@
                 StartPoint = startPoint,
                 Point1 = point1,
                 Point2 = point2,
-                Weight = Settings.Weight,
+                Weight = Settings?.Weight ?? 1.0,
                 Text = new Text(),
                 StyleId = context.DocumentContainer?.StyleLibrary?.CurrentItem?.Title
             };


Updated URLs to HTTPS and updated bio

Updated URLs to HTTPS and updated bio

--- src/Firehose.Web/Authors/MikeFRobbins.cs
+++ src/Firehose.Web/Authors/MikeFRobbins.cs
@@ -10,7 +10,7 @@
     {
         public string FirstName => "Mike";
         public string LastName => "Robbins";
-        public string ShortBioOrTagLine => "Microsoft PowerShell MVP and SAPIEN Technologies MVP. Leader & Co-founder of MSPSUG";
+        public string ShortBioOrTagLine => "is the leader and co-founder of the Mississippi PowerShell User Group.";
         public string StateOrRegion => "Mississippi, USA";
         public string EmailAddress => "";
         public string TwitterHandle => "mikefrobbins";
@@ -18,8 +18,8 @@
         public string GravatarHash => "e809f9f3d1f46f219c3a28b2fd7dbf83";
         public GeoPosition Position => new GeoPosition(32.3643100, -88.7036560);

-        public Uri WebSite => new Uri("http://mikefrobbins.com/");
-        public IEnumerable<Uri> FeedUris { get { yield return new Uri("http://mikefrobbins.com/feed/"); } }
+        public Uri WebSite => new Uri("https://mikefrobbins.com/");
+        public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://mikefrobbins.com/feed/"); } }

         public bool Filter(SyndicationItem item)
         {


Delete link fix

Delete link fix

--- src/FujiyBlog.Web/Views/Post/Post.cshtml
+++ src/FujiyBlog.Web/Views/Post/Post.cshtml
@@ -68,7 +68,7 @@
                 @if (Request.IsAuthenticated)
                 {
                     @Html.ActionLink(Resources.Labels.Edit, MVC.Admin.Post.Edit(Model.Post.Id)) <text>|</text>
-                    @Html.ActionLink(Resources.Labels.Delete, MVC.Admin.Post.Delete(Model.Post.Id)) <text>|</text>
+                    @Ajax.ActionLink(Resources.Labels.Delete, MVC.Admin.Post.Delete((Model.Post.Id)), new AjaxOptions { HttpMethod = "POST", Confirm = "Sure?", OnSuccess = "window.location.href='"+ Url.Content("~/") +"';" }) <text>|</text>
                 }
                 @Html.ActionLink("Permalink", MVC.Post.DetailsById(Model.Post.Id), new { rel = "bookmark", title = Model.Post.Title })
                 | @Resources.Labels.Comments (@Model.CommentsTotal)


Ensure That Timer Callback Does not Call Method on Disposed Timer (#1445)

Co-authored-by: thefringeninja <b02b8eaff25fe22eaefd871e28ed3318d9d99822@users.noreply.github.com>

--- src/Grpc.Net.Client/Internal/GrpcCall.cs
+++ src/Grpc.Net.Client/Internal/GrpcCall.cs
@@ -225,7 +225,18 @@
             Channel.FinishActiveCall(this);

             _ctsRegistration?.Dispose();
-            _deadlineTimer?.Dispose();
+
+            if (_deadlineTimer != null)
+            {
+                lock (this)
+                {
+                    // Timer callback can call Timer.Change so dispose deadline timer in a lock
+                    // and set to null to indicate to the callback that it has been disposed.
+                    _deadlineTimer?.Dispose();
+                    _deadlineTimer = null;
+                }
+            }
+
             HttpResponse?.Dispose();
             ClientStreamReader?.Dispose();
             ClientStreamWriter?.Dispose();
@@ -657,10 +668,15 @@
                 // The server could exceed the deadline and return a CANCELLED status before the
                 // client's deadline timer is triggered. When CANCELLED is received check the
                 // deadline against the clock and change status to DEADLINE_EXCEEDED if required.
-                var deadlineExceeded = s.StatusCode == StatusCode.Cancelled && IsDeadlineExceeded();
-                if (deadlineExceeded)
-                {
-                    s = new Status(StatusCode.DeadlineExceeded, s.Detail, s.DebugException);
+                if (s.StatusCode == StatusCode.Cancelled)
+                {
+                    lock (this)
+                    {
+                        if (IsDeadlineExceededUnsynchronized())
+                        {
+                            s = new Status(StatusCode.DeadlineExceeded, s.Detail, s.DebugException);
+                        }
+                    }
                 }

                 status = s;
@@ -776,7 +792,7 @@
                     // the client has processed that it has exceeded or not.
                     lock (this)
                     {
-                        if (IsDeadlineExceeded())
+                        if (IsDeadlineExceededUnsynchronized())
                         {
                             GrpcCallLog.DeadlineExceeded(Logger);
                             GrpcEventSource.Log.CallDeadlineExceeded();
@@ -819,8 +835,9 @@
             return true;
         }

-        private bool IsDeadlineExceeded()
-        {
+        private bool IsDeadlineExceededUnsynchronized()
+        {
+            Debug.Assert(Monitor.IsEntered(this), "Check deadline in a lock. Updating a DateTime isn't guaranteed to be atomic. Avoid struct tearing.");
             return _deadline <= Channel.Clock.UtcNow;
         }

@@ -965,14 +982,17 @@
                         DeadlineExceeded();
                         return;
                     }
-                }
-
-                // Deadline has not been reached because timer maximum due time was smaller than deadline.
-                // Reschedule DeadlineExceeded again until deadline has been exceeded.
-                GrpcCallLog.DeadlineTimerRescheduled(Logger, remaining);
-
-                var dueTime = CommonGrpcProtocolHelpers.GetTimerDueTime(remaining, Channel.MaxTimerDueTime);
-                _deadlineTimer!.Change(dueTime, Timeout.Infinite);
+
+                    if (_deadlineTimer != null)
+                    {
+                        // Deadline has not been reached because timer maximum due time was smaller than deadline.
+                        // Reschedule DeadlineExceeded again until deadline has been exceeded.
+                        GrpcCallLog.DeadlineTimerRescheduled(Logger, remaining);
+
+                        var dueTime = CommonGrpcProtocolHelpers.GetTimerDueTime(remaining, Channel.MaxTimerDueTime);
+                        _deadlineTimer.Change(dueTime, Timeout.Infinite);
+                    }
+                }
             }
         }


Fix Not using Sum for aggregated counters collection (#135)

- This resulted in the query always returning 1 instead of the actual value which was the aggregated counter value for that counter key

--- src/Hangfire.Mongo/MongoMonitoringApi.cs
+++ src/Hangfire.Mongo/MongoMonitoringApi.cs
@@ -547,7 +547,7 @@
                 .Find(Builders<AggregatedCounterDto>.Filter.In(_ => _.Key, keys))
                 .ToList()
                 .GroupBy(x => x.Key)
-                .ToDictionary(x => x.Key, x => (long) x.Count());
+                .ToDictionary(x => x.Key, x => x.Sum(v => (long)v.Value));

             foreach (var valuePair in valuesMapAggregated)
             {


Initialised properties for ImmlDocument to the correct default values

--- src/Imml/Scene/Container/ImmlDocument.cs
+++ src/Imml/Scene/Container/ImmlDocument.cs
@@ -250,6 +250,11 @@
         {
             this.Behaviours = new List<string>();
             this.Tags = new List<string>();
+            this.GlobalIllumination = new Color3("#4c4c4c");
+            this.Gravity = new Vector3(0, -9.8f, 0);
+            this.AnimationSpeed = 1;
+            this.PhysicsSpeed = 1;
+            this.SoundSpeed = 1;
         }
     }
 }


Fix loader exception for assembly.

Fix loader exception for assembly.

--- src/MiNET/MiNET/Plugins/PluginManager.cs
+++ src/MiNET/MiNET/Plugins/PluginManager.cs
@@ -93,50 +93,58 @@

 				foreach (string pluginPath in pluginPaths)
 				{
-					Assembly newAssembly = Assembly.LoadFile(pluginPath);
-
 					try
 					{
-						Type[] types = newAssembly.GetExportedTypes();
-						foreach (Type type in types)
-						{
-							try
+						Assembly newAssembly = Assembly.LoadFile(pluginPath);
+
+						try
+						{
+							Type[] types = newAssembly.GetExportedTypes();
+							foreach (Type type in types)
 							{
-								// If no PluginAttribute and does not implement IPlugin interface, not a valid plugin
-								if (!type.IsDefined(typeof(PluginAttribute), true) && !typeof(IPlugin).IsAssignableFrom(type)) continue;
-
-								// If plugin is already loaded don't load it again
-								if (_plugins.Any(l => l.GetType().AssemblyQualifiedName == type.AssemblyQualifiedName))
+								try
 								{
-									Log.Error($"Tried to load duplicate plugin: {type}");
-									continue;
-								}
-
-								if (type.IsDefined(typeof(PluginAttribute), true))
-								{
-									PluginAttribute pluginAttribute = Attribute.GetCustomAttribute(type, typeof(PluginAttribute), true) as PluginAttribute;
-									if (pluginAttribute != null)
+									// If no PluginAttribute and does not implement IPlugin interface, not a valid plugin
+									if (!type.IsDefined(typeof(PluginAttribute), true) && !typeof(IPlugin).IsAssignableFrom(type)) continue;
+
+									// If plugin is already loaded don't load it again
+									if (_plugins.Any(l => l.GetType().AssemblyQualifiedName == type.AssemblyQualifiedName))
 									{
-										if (!Config.GetProperty(pluginAttribute.PluginName + ".Enabled", true)) continue;
+										Log.Error($"Tried to load duplicate plugin: {type}");
+										continue;
+									}
+
+									if (type.IsDefined(typeof(PluginAttribute), true))
+									{
+										PluginAttribute pluginAttribute = Attribute.GetCustomAttribute(type, typeof(PluginAttribute), true) as PluginAttribute;
+										if (pluginAttribute != null)
+										{
+											if (!Config.GetProperty(pluginAttribute.PluginName + ".Enabled", true)) continue;
+										}
+									}
+									var ctor = type.GetConstructor(Type.EmptyTypes);
+									if (ctor != null)
+									{
+										var plugin = ctor.Invoke(null);
+										LoadPlugin(plugin, type);
 									}
 								}
-								var ctor = type.GetConstructor(Type.EmptyTypes);
-								if (ctor != null)
+								catch (Exception ex)
 								{
-									var plugin = ctor.Invoke(null);
-									LoadPlugin(plugin, type);
+									Log.WarnFormat("Failed loading plugin type {0} as a plugin.", type);
+									Log.Debug("Plugin loader caught exception, but is moving on.", ex);
 								}
 							}
-							catch (Exception ex)
-							{
-								Log.WarnFormat("Failed loading plugin type {0} as a plugin.", type);
-								Log.Debug("Plugin loader caught exception, but is moving on.", ex);
-							}
+						}
+						catch (Exception e)
+						{
+							Log.WarnFormat("Failed loading exported types for assembly {0} as a plugin.", newAssembly.FullName);
+							Log.Debug("Plugin loader caught exception, but is moving on.", e);
 						}
 					}
 					catch (Exception e)
 					{
-						Log.WarnFormat("Failed loading exported types for assembly {0} as a plugin.", newAssembly.FullName);
+						Log.Warn($"Failed loading assembly at path \"{pluginPath}\"");
 						Log.Debug("Plugin loader caught exception, but is moving on.", e);
 					}
 				}


Use IndexOf(char) where appropriate

Use IndexOf(char) where appropriate

Calls to IndexOf(string, StringComparison.Ordinal) when string is a
single char can be replaced with IndexOf(char) for slightly improved
performance. Also, in this case, the search can be conducted once
instead of twice.

--- src/MiniProfiler.Shared/ClientTimings.cs
+++ src/MiniProfiler.Shared/ClientTimings.cs
@@ -90,7 +90,8 @@

                     if (key.StartsWith(ProbesPrefix))
                     {
-                        if (key.IndexOf("]", StringComparison.Ordinal) > 0 && int.TryParse(key.Substring(ProbesPrefix.Length, key.IndexOf("]", StringComparison.Ordinal) - ProbesPrefix.Length), out int probeId))
+                        int endBracketIndex = key.IndexOf(']');
+                        if (endBracketIndex > 0 && int.TryParse(key.Substring(ProbesPrefix.Length, endBracketIndex - ProbesPrefix.Length), out int probeId))
                         {
                             if (!clientProbes.TryGetValue(probeId, out var t))
                             {


 Fix unintentional TLS downgrade (#1134).

Change the logic used to determine when a connection attempt is failing
due to a lack of support for TLS 1.2+ in yaSSL-based MySQL Server so
that a downgrade no longer occurs if the user has explicitly configured
supported TLS Version(s) in the connection string.

Signed-off-by: Andrew Nagel <2df2c2f7b3642fb1e6b4298278c5d999a348a29b@gmail.com>
Signed-off-by: Andrew Nagel <a92f53e7c6338dddd7c357d08334d550714a1182@dot.gov>

Co-authored-by: Andrew Nagel <a92f53e7c6338dddd7c357d08334d550714a1182@dot.gov>

--- src/MySqlConnector/Core/ServerSession.cs
+++ src/MySqlConnector/Core/ServerSession.cs
@@ -416,7 +416,9 @@
 			InitialHandshakePayload initialHandshake;
 			do
 			{
-				shouldRetrySsl = (sslProtocols == SslProtocols.None || (sslProtocols & SslProtocols.Tls12) == SslProtocols.Tls12) && Utility.IsWindows();
+				bool tls11or10Supported = (sslProtocols & (SslProtocols.Tls | SslProtocols.Tls11)) != SslProtocols.None;
+				bool tls12Supported = (sslProtocols & SslProtocols.Tls12) == SslProtocols.Tls12;
+				shouldRetrySsl = (sslProtocols == SslProtocols.None || (tls12Supported && tls11or10Supported)) && Utility.IsWindows();

 				var connected = false;
 				if (cs.ConnectionProtocol == MySqlConnectionProtocol.Sockets)
@@ -525,7 +527,7 @@
 					{
 						// negotiating TLS 1.2 with a yaSSL-based server throws an exception on Windows, see comment at top of method
 						Log.Debug(ex, "Session{0} failed negotiating TLS; falling back to TLS 1.1", m_logArguments);
-						sslProtocols = SslProtocols.Tls | SslProtocols.Tls11;
+						sslProtocols = sslProtocols == SslProtocols.None ? SslProtocols.Tls | SslProtocols.Tls11 : (SslProtocols.Tls | SslProtocols.Tls11) & sslProtocols;
 						if (Pool is not null)
 							Pool.SslProtocols = sslProtocols;
 					}
@@ -1200,7 +1202,7 @@
 						await namedPipeStream.ConnectAsync(timeout, cancellationToken).ConfigureAwait(false);
 					else
 #endif
-						namedPipeStream.Connect(timeout);
+					namedPipeStream.Connect(timeout);
 				}
 				catch (Exception ex) when ((ex is ObjectDisposedException && cancellationToken.IsCancellationRequested) || ex is TimeoutException)
 				{


Use pattern matching

Use pattern matching

--- src/NQuery/Binding/Binder.Expressions.cs
+++ src/NQuery/Binding/Binder.Expressions.cs
@@ -715,8 +715,7 @@
             // For cases like Foo.Bar we check whether 'Foo' was resolved to a table instance.
             // If that's the case we bind a column otherwise we bind a normal expression.

-            var boundTable = target as BoundTableExpression;
-            if (boundTable != null)
+            if (target is BoundTableExpression boundTable)
             {
                 // In Foo.Bar, Foo was resolved to a table. Bind Bar as column.
                 var tableInstance = boundTable.Symbol;


Accept dash sign in routing segment default value.

Resolve NancyFx/Nancy#1951.

--- src/Nancy/Extensions/StringExtensions.cs
+++ src/Nancy/Extensions/StringExtensions.cs
@@ -19,7 +19,7 @@
         /// <value>A <see cref="Regex"/> object.</value>
         [DebuggerBrowsable(DebuggerBrowsableState.Never)]
         private static readonly Regex ParameterExpression =
-            new Regex(@"{(?<name>[A-Za-z0-9_]*)(?:\?(?<default>[A-Za-z0-9_]*))?}", RegexOptions.Compiled);
+            new Regex(@"{(?<name>[A-Za-z0-9_]*)(?:\?(?<default>[A-Za-z0-9_-]*))?}", RegexOptions.Compiled);

         /// <summary>
         /// Extracts information about the parameters in the <paramref name="segment"/>.


Hide key/value to support import from file system

--- src/Neo4jManager/Neo4jInstanceFactory.cs
+++ src/Neo4jManager/Neo4jInstanceFactory.cs
@@ -28,7 +28,7 @@
                     const string configFile = Neo4jConfigFile;
                     instance.Configure(configFile, "dbms.security.auth_enabled", "false");
                     instance.Configure(configFile, "dbms.allow_format_migration", "true");
-                    instance.Configure(configFile, "dbms.directories.import", "");
+                    instance.Configure(configFile, "dbms.directories.import", null);

                     instance.Configure(configFile, "dbms.connector.http.listen_address", $":{request.Endpoints.HttpEndpoint.Port}");


Remove unused const

Remove unused const

--- src/NesZord.Core/Memory/BoundedMemory.cs
+++ src/NesZord.Core/Memory/BoundedMemory.cs
@@ -5,8 +5,6 @@
 {
 	internal class BoundedMemory : IBoundedMemory
 	{
-		private const int LENGTH = 0x0800;
-
 		private Dictionary<int, byte> data;

 		public BoundedMemory(MemoryAddress firstAddress, MemoryAddress lastAddress)


Increased test timeout ot get it working with apveyor - hopefuly

--- src/ProtobufSockets.Tests/PubSubTests.cs
+++ src/ProtobufSockets.Tests/PubSubTests.cs
@@ -8,6 +8,7 @@
 	[TestFixture]
     public class PubSubTests
     {
+		const int _timeout = 30000;
 		[Test]
         public void Publisher_starts_with_an_ephemeral_port()
         {
@@ -25,7 +26,7 @@

             publisher.Publish("*", new Message {Payload = "payload1"});

-            Assert.IsTrue(r.WaitOne(3000), "Timed out");
+			Assert.IsTrue(r.WaitOne(_timeout), "Timed out");

             publisher.Dispose();
             subscriber.Dispose();
@@ -56,8 +57,8 @@
             publisher.Publish("topic1", new Message { Payload = "payload1" });
             publisher.Publish("topic2", new Message { Payload = "payload2" });

-            Assert.IsTrue(r1.WaitOne(3000), "Timed out");
-            Assert.IsTrue(r2.WaitOne(3000), "Timed out");
+			Assert.IsTrue(r1.WaitOne(_timeout), "Timed out");
+			Assert.IsTrue(r2.WaitOne(_timeout), "Timed out");

             publisher.Dispose();
             subscriber1.Dispose();
@@ -108,27 +109,27 @@
                 r2[c-1].Set();
             }, ep => rc2[ep].Set());

-            Assert.True(rc1[publisher1.EndPoint].WaitOne(3000), "Timed out");
-            Assert.True(rc2[publisher1.EndPoint].WaitOne(3000), "Timed out");
+			Assert.True(rc1[publisher1.EndPoint].WaitOne(_timeout), "Timed out");
+			Assert.True(rc2[publisher1.EndPoint].WaitOne(_timeout), "Timed out");
             publisher1.Publish(new Message { Payload = "payload1" });
-            Assert.True(r1[0].WaitOne(3000), "Timed out");
-            Assert.True(r2[0].WaitOne(3000), "Timed out");
+			Assert.True(r1[0].WaitOne(_timeout), "Timed out");
+			Assert.True(r2[0].WaitOne(_timeout), "Timed out");
             publisher1.Dispose();

             // should fail over to publisher2
-            Assert.True(rc1[publisher2.EndPoint].WaitOne(3000), "Timed out");
-            Assert.True(rc2[publisher2.EndPoint].WaitOne(3000), "Timed out");
+			Assert.True(rc1[publisher2.EndPoint].WaitOne(_timeout), "Timed out");
+			Assert.True(rc2[publisher2.EndPoint].WaitOne(_timeout), "Timed out");
             publisher2.Publish(new Message { Payload = "payload2" });
-            Assert.True(r1[1].WaitOne(3000), "Timed out");
-            Assert.True(r2[1].WaitOne(3000), "Timed out");
+			Assert.True(r1[1].WaitOne(_timeout), "Timed out");
+			Assert.True(r2[1].WaitOne(_timeout), "Timed out");
             publisher2.Dispose();

             // should fail over to publisher3
-            Assert.True(rc1[publisher3.EndPoint].WaitOne(3000), "Timed out");
-            Assert.True(rc2[publisher3.EndPoint].WaitOne(3000), "Timed out");
+			Assert.True(rc1[publisher3.EndPoint].WaitOne(_timeout), "Timed out");
+			Assert.True(rc2[publisher3.EndPoint].WaitOne(_timeout), "Timed out");
             publisher3.Publish(new Message { Payload = "payload3" });
-            Assert.True(r1[2].WaitOne(3000), "Timed out");
-            Assert.True(r2[2].WaitOne(3000), "Timed out");
+			Assert.True(r1[2].WaitOne(_timeout), "Timed out");
+			Assert.True(r2[2].WaitOne(_timeout), "Timed out");
             publisher3.Dispose();

             subscriber1.Dispose();


Trivial refactoring of an existing unit test to use TestCase

--- Test.CSF/TestDateTimeExtensions.cs
+++ Test.CSF/TestDateTimeExtensions.cs
@@ -7,31 +7,31 @@
   [TestFixture]
   public class TestDateTimeExtensions
   {
-    [Test]
-    public void TestAsAgeInYears()
+    #region tests
+
+    [TestCase(1976, 09, 18, 2012, 10, 03, 36)]
+    [TestCase(1976, 09, 18, 2012, 10, 20, 36)]
+    [TestCase(1976, 09, 18, 2012, 09, 03, 35)]
+    [TestCase(1976, 09, 18, 2012, 09, 20, 36)]
+    [TestCase(1976, 09, 18, 2012, 08, 03, 35)]
+    [TestCase(1976, 09, 18, 2012, 08, 20, 35)]
+    public void TestAsAgeInYears(int birthYear, int birthMonth, int birthDay,
+                                 int referenceYear, int referenceMonth, int referenceDay,
+                                 int expectedAge)
     {
-      DateTime birth, reference;
+      DateTime
+        birth = new DateTime(birthYear, birthMonth, birthDay),
+        reference = new DateTime(referenceYear, referenceMonth, referenceDay);

-      birth = new DateTime(1976, 09, 18);
-      reference = new DateTime(2012, 10, 03);
+      Assert.AreEqual(expectedAge,
+                      birth.AsAgeInYears(reference),
+                      "Birthday {0}: Age {1} on {2}",
+                      birth.ToShortDateString(),
+                      expectedAge,
+                      reference.ToShortDateString());
+    }

-      Assert.AreEqual(36, birth.AsAgeInYears(reference), reference.ToShortDateString());
-
-      reference = new DateTime(2012, 10, 20);
-      Assert.AreEqual(36, birth.AsAgeInYears(reference), reference.ToShortDateString());
-
-      reference = new DateTime(2012, 09, 03);
-      Assert.AreEqual(35, birth.AsAgeInYears(reference), reference.ToShortDateString());
-
-      reference = new DateTime(2012, 09, 20);
-      Assert.AreEqual(36, birth.AsAgeInYears(reference), reference.ToShortDateString());
-
-      reference = new DateTime(2012, 08, 03);
-      Assert.AreEqual(35, birth.AsAgeInYears(reference), reference.ToShortDateString());
-
-      reference = new DateTime(2012, 08, 20);
-      Assert.AreEqual(35, birth.AsAgeInYears(reference), reference.ToShortDateString());
-    }
+    #endregion
   }
 }


Update AppAssemblerRingsCheck.cs

Update AppAssemblerRingsCheck.cs

--- source/Cosmos.IL2CPU/AppAssemblerRingsCheck.cs
+++ source/Cosmos.IL2CPU/AppAssemblerRingsCheck.cs
@@ -75,8 +75,6 @@
                     RingsWriteLine("\tDependency '{0}'", xAsmDepRef.Name);
                     var xDepRing = GetRingFromAssembly(xAsmDep);
                     RingsWriteLine("\t\tRing = {0}", xDepRing);
-
-                    continue; // zdimension: Disabled ring verification for my personal needs

                     var xDepRingInt = (int)xDepRing;

@@ -177,4 +175,4 @@
             Console.WriteLine("Rings: " + String.Format(line.Replace("\t", "    "), args));
         }
     }
-}+}


íslensku þýðingar

íslensku þýðingar

--- TextDuck/Views/Home/Request.cshtml
+++ TextDuck/Views/Home/Request.cshtml
@@ -1,7 +1,7 @@
 @model IQueryable<TextDuck.Models.srtFiles>

-
Beidnir

+
Beiðnir

 @Html.ActionLink("Bæta við beiðni", "CreateRequest", "Home")

@@ -15,7 +15,7 @@
             Nafn

-            Tungumal
+            Tungumál

             Flokkur
@@ -27,7 +27,7 @@
             Dagsetning

-            Adgerdir
+            Aðgerðir

             Eftirspurn


Fix window size shenanigans breaking the config

--- Torch.Server/Views/TorchUI.xaml.cs
+++ Torch.Server/Views/TorchUI.xaml.cs
@@ -33,6 +33,9 @@

         public TorchUI(TorchServer server)
         {
+            WindowStartupLocation = WindowStartupLocation.CenterScreen;
+            Width = 800;
+            Height = 600;
             _config = (TorchConfig)server.Config;
             _server = server;
             //TODO: data binding for whole server
@@ -41,10 +44,10 @@

             AttachConsole();

-            Left = _config.WindowPosition.X;
-            Top = _config.WindowPosition.Y;
-            Width = _config.WindowSize.X;
-            Height = _config.WindowSize.Y;
+            //Left = _config.WindowPosition.X;
+            //Top = _config.WindowPosition.Y;
+            //Width = _config.WindowSize.X;
+            //Height = _config.WindowSize.Y;

             Chat.BindServer(server);
             PlayerList.BindServer(server);
@@ -97,12 +100,14 @@

         protected override void OnClosing(CancelEventArgs e)
         {
-            var newSize = new Point((int)Width, (int)Height);
-            _config.WindowSize = newSize;
-            var newPos = new Point((int)Left, (int)Top);
-            _config.WindowPosition = newPos;
+            // Can't save here or you'll persist all the command line arguments
+            //
+            //var newSize = new Point((int)Width, (int)Height);
+            //_config.WindowSize = newSize;
+            //var newPos = new Point((int)Left, (int)Top);
+            //_config.WindowPosition = newPos;

-            _config.Save(); //you idiot
+            //_config.Save(); //you idiot

             if (_server?.State == ServerState.Running)
                 _server.Stop();


IsCursorDisabled plays nice with Renderer now.

--- src/SadConsole.Shared/Console.Surface.cs
+++ src/SadConsole.Shared/Console.Surface.cs
@@ -13,11 +13,28 @@

         private Font _font;
         private Renderers.IRenderer _renderer;
+        private bool _isCursorDisabled;

         /// <summary>
         /// When <see langword="true"/>, indicates that the <see cref="Cursor"/> cannot be used on this console; otherwise, <see langword="false"/>.
         /// </summary>
-        public bool IsCursorDisabled { get; protected set; }
+        /// <remarks>
+        /// This property should only be used to indicate that this object can never use the <see cref="Cursor"/>. To simply disable or enable the <see cref="Cursor"/>, use <see cref="Cursor.IsEnabled"/> and <see cref="Cursor.IsVisible"/>.
+        /// </remarks>
+        public bool IsCursorDisabled
+        {
+            get => _isCursorDisabled;
+            set
+            {
+                _isCursorDisabled = value;
+
+                if (value)
+                {
+                    if (_renderer?.BeforeRenderTintCallback == null)
+                        _renderer.BeforeRenderTintCallback = OnBeforeRender;
+                }
+            }
+        }

         /// <summary>
         /// The renderer used to draw this surface.


fixes casing

fixes casing

--- src/Smidge/Cache/TimeStampCacheBuster.cs
+++ src/Smidge/Cache/TimeStampCacheBuster.cs
@@ -6,7 +6,7 @@
     /// <summary>
     /// Cache bust for every request
     /// </summary>
-    public class TimeStampCacheBuster : ICacheBuster
+    public class TimestampCacheBuster : ICacheBuster
     {
         public string GetValue()
         {


Add FileStream.CopyToAsync missing override to ref (#35850)

--- src/System.Runtime/ref/System.Runtime.cs
+++ src/System.Runtime/ref/System.Runtime.cs
@@ -5161,6 +5161,7 @@
         public override bool CanRead { get { throw null; } }
         public override bool CanSeek { get { throw null; } }
         public override bool CanWrite { get { throw null; } }
+        public override System.Threading.Tasks.Task CopyToAsync(System.IO.Stream destination, int bufferSize, System.Threading.CancellationToken cancellationToken) { throw null; }
         [System.ObsoleteAttribute("This property has been deprecated.  Please use FileStream's SafeFileHandle property instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
         public virtual System.IntPtr Handle { get { throw null; } }
         public virtual bool IsAsync { get { throw null; } }


StringExtension.Replace メソッド修正。

StringExtension.Replace メソッド修正。

--- Util/Extensions/StringExtension.cs
+++ Util/Extensions/StringExtension.cs
@@ -14,9 +14,11 @@
         /// 文字列列挙による文字列の置換処理を行う。
         /// </summary>
         /// <param name="self">置換対象文字列。</param>
-        /// <param name="oldValues">置換元文字列列挙。</param>
+        /// <param name="oldValues">
+        /// 置換元文字列列挙。 null や空文字列を含んでいてはならない。
+        /// </param>
         /// <param name="newValues">
-        /// 置換先文字列列挙。要素数 1 以上でなければならない。
+        /// 置換先文字列列挙。 null を含んでいてはならない。
         /// </param>
         /// <returns>置換された文字列。</returns>
         /// <remarks>
@@ -34,10 +36,10 @@
             IEnumerable<string> oldValues,
             IEnumerable<string> newValues)
         {
-            // 置換処理用アイテム列挙作成
+            // 置換処理用アイテムリスト作成
             // 引数の正当性チェックも行われる
             var items = MakeReplaceItems(self, oldValues, newValues);
-            if (!items.Any())
+            if (items.Count <= 0)
             {
                 return self;
             }
@@ -61,10 +63,10 @@
                     break;
                 }

-                // 置換処理用アイテム列挙更新
-                items = UpdateReplaceItems(items, self, selfPos);
-            }
-            while (items.Any());
+                // 置換処理用アイテムリスト更新
+                UpdateReplaceItems(items, self, selfPos);
+            }
+            while (items.Count > 0);

             // 末尾までの文字列を追加
             if (selfPos < self.Length)
@@ -76,9 +78,9 @@
         }

         /// <summary>
-        /// 置換処理用アイテム構造体。
-        /// </summary>
-        private struct ReplaceItem : IComparable<ReplaceItem>
+        /// 置換処理用アイテムクラス。
+        /// </summary>
+        private class ReplaceItem : IComparable<ReplaceItem>
         {
             /// <summary>
             /// コンストラクタ。
@@ -161,15 +163,17 @@
         }

         /// <summary>
-        /// 置換処理用アイテム列挙を作成する。
+        /// 置換処理用アイテムリストを作成する。
         /// </summary>
         /// <param name="self">置換対象文字列。</param>
-        /// <param name="oldValues">置換元文字列列挙。</param>
+        /// <param name="oldValues">
+        /// 置換元文字列列挙。 null や空文字列を含んでいてはならない。
+        /// </param>
         /// <param name="newValues">
-        /// 置換先文字列列挙。要素数 1 以上でなければならない。
-        /// </param>
-        /// <returns>置換処理用アイテム列挙。</returns>
-        private static IEnumerable<ReplaceItem> MakeReplaceItems(
+        /// 置換先文字列列挙。 null を含んでいてはならない。
+        /// </param>
+        /// <returns>置換処理用アイテムリスト。</returns>
+        private static List<ReplaceItem> MakeReplaceItems(
             string self,
             IEnumerable<string> oldValues,
             IEnumerable<string> newValues)
@@ -180,13 +184,13 @@
             ValidateArgumentNull(newValues, nameof(newValues));

             var newVals = newValues.ToArray();
-            if (newVals.Length <= 0)
+            if (newVals.Length <= 0 && oldValues.Any())
             {
                 throw new ArgumentException(
                     @"置換先文字列列挙の要素数が 0 です。",
                     nameof(newValues));
             }
-            if (newVals.Any(v => v == null))
+            if (newVals.Contains(null))
             {
                 throw new ArgumentException(
                     @"置換先文字列列挙内に null が含まれています。",
@@ -211,37 +215,42 @@
                                     nameof(oldValues));
                             }

-                            var newVal = newVals[Math.Min(i, newVals.Length - 1)];
-                            return new ReplaceItem(i, v, newVal, self.IndexOf(v));
+                            var searchResult = self.IndexOf(v);
+                            return
+                                (searchResult < 0) ?
+                                    null :
+                                    new ReplaceItem(
+                                        i,
+                                        v,
+                                        newVals[Math.Min(i, newVals.Length - 1)],
+                                        searchResult);
                         })
-                    .Where(item => item.SearchResult >= 0);
-        }
-
-        /// <summary>
-        /// 置換処理用アイテム列挙を更新する。
-        /// </summary>
-        /// <param name="items">置換処理用アイテム列挙。</param>
+                    .Where(item => item != null)
+                    .ToList();
+        }
+
+        /// <summary>
+        /// 置換処理用アイテムリストを更新する。
+        /// </summary>
+        /// <param name="items">置換処理用アイテムリスト。</param>
         /// <param name="self">置換対象文字列。</param>
         /// <param name="searchResultMin">置換元文字列の検索開始位置。</param>
-        /// <returns>更新された置換処理用アイテム列挙。</returns>
-        private static IEnumerable<ReplaceItem> UpdateReplaceItems(
-            IEnumerable<ReplaceItem> items,
+        private static void UpdateReplaceItems(
+            List<ReplaceItem> items,
             string self,
             int searchResultMin)
         {
-            return
-                items
-                    .Select(
-                        item =>
-                        {
-                            if (item.SearchResult < searchResultMin)
-                            {
-                                item.SearchResult =
-                                    self.IndexOf(item.OldValue, searchResultMin);
-                            }
-                            return item;
-                        })
-                    .Where(item => item.SearchResult >= 0);
+            // 検索結果値更新
+            foreach (var item in items)
+            {
+                if (item.SearchResult < searchResultMin)
+                {
+                    item.SearchResult = self.IndexOf(item.OldValue, searchResultMin);
+                }
+            }
+
+            // 文字列が見つからない要素をリストから削除
+            items.RemoveAll(item => item.SearchResult < 0);
         }
     }
 }


Add caching for RSS

Add caching for RSS

--- src/WebSite/Controllers/RssController.cs
+++ src/WebSite/Controllers/RssController.cs
@@ -21,56 +21,66 @@
     public class RssController : Controller
     {
         private readonly PublicationManager _manager;
+        private readonly IMemoryCache _cache;

         public RssController(IMemoryCache cache)
         {
+            _cache = cache;
             _manager = new PublicationManager(Core.Settings.Current.ConnectionString, cache);
         }

         [HttpGet]
         [Route("rss")]
-        public async Task<IActionResult> GetRssFeed(string url, Guid key)
+        public async Task<IActionResult> GetRssFeed()
         {
-            var pagedResult = await _manager.GetPublications(1, 50);
-            var lastUpdateDate = pagedResult.Max(o => o.DateTime);
+            var key = "rss";
+            var xml = _cache.Get(key)?.ToString();

-            var rss = new RssDocument
+            if (string.IsNullOrEmpty(xml))
             {
-                Channel =
-                new RssChannel
+                var pagedResult = await _manager.GetPublications(1, 50);
+                var lastUpdateDate = pagedResult.Max(o => o.DateTime);
+
+                var rss = new RssDocument
                 {
-                    Copyright = Settings.Current.WebSiteTitle,
-                    Description = Settings.Current.DefaultDescription,
-                    Image =
-                        new RssImage
-                        {
-                            Description = Settings.Current.WebSiteTitle,
-                            Height = 100,
-                            Width = 100,
-                            Link = new RssUrl(Settings.Current.FacebookImage),
-                            Title = Settings.Current.WebSiteTitle,
-                            Url = new RssUrl(Settings.Current.FacebookImage)
-                        },
-                    Language = new CultureInfo("ru"),
-                    LastBuildDate = lastUpdateDate,
-                    Link = new RssUrl(Settings.Current.RssFeedUrl),
-                    ManagingEditor = new RssEmail(Settings.Current.SupportEmail),
-                    PubDate = lastUpdateDate,
-                    Title = Settings.Current.WebSiteTitle,
-                    TTL = 10,
-                    WebMaster = new RssEmail(Settings.Current.SupportEmail),
-                    Items = new List<RssItem> { }
+                    Channel =
+                    new RssChannel
+                    {
+                        Copyright = Settings.Current.WebSiteTitle,
+                        Description = Settings.Current.DefaultDescription,
+                        Image =
+                            new RssImage
+                            {
+                                Description = Settings.Current.WebSiteTitle,
+                                Height = 100,
+                                Width = 100,
+                                Link = new RssUrl(Settings.Current.FacebookImage),
+                                Title = Settings.Current.WebSiteTitle,
+                                Url = new RssUrl(Settings.Current.FacebookImage)
+                            },
+                        Language = new CultureInfo("ru"),
+                        LastBuildDate = lastUpdateDate,
+                        Link = new RssUrl(Settings.Current.RssFeedUrl),
+                        ManagingEditor = new RssEmail(Settings.Current.SupportEmail),
+                        PubDate = lastUpdateDate,
+                        Title = Settings.Current.WebSiteTitle,
+                        TTL = 10,
+                        WebMaster = new RssEmail(Settings.Current.SupportEmail),
+                        Items = new List<RssItem> { }
+                    }
+                };
+
+                foreach (var p in pagedResult)
+                {
+                    rss.Channel.Items.Add(CreateRssItem(p));
                 }
-            };

-            foreach (var p in pagedResult)
-            {
-                rss.Channel.Items.Add(CreateRssItem(p));
+                xml = rss.ToXml();
+
+                _cache.Set(key, xml, TimeSpan.FromMinutes(10));
             }

-            var xml = rss.ToXml();
             return Content(xml, RssDocument.MimeType);
-
         }

         private RssItem CreateRssItem(DAL.Publication publication)


whitespace.

whitespace.

--- src/Windows/Avalonia.Win32/WindowImpl.cs
+++ src/Windows/Avalonia.Win32/WindowImpl.cs
@@ -892,7 +892,7 @@
                 rcWindow.left, rcWindow.top,
                 rcClient.Width, rcClient.Height,
                 SetWindowPosFlags.SWP_FRAMECHANGED);
-
+
             if (_isClientAreaExtended && WindowState != WindowState.FullScreen)
             {
                 var margins = UpdateExtendMargins();