small fixes

small fixes

--- src/Features/CSharp/Portable/CodeFixes/AddExplicitCast/AddExplicitCastCodeFixProvider.cs
+++ src/Features/CSharp/Portable/CodeFixes/AddExplicitCast/AddExplicitCastCodeFixProvider.cs
@@ -39,10 +39,6 @@
         private const string CS1503 = nameof(CS1503);
         private const int MaximumConversionOptions = 3;

-        public AddExplicitCastCodeFixProvider()
-        {
-        }
-
         public sealed override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(CS0266, CS1503);

         internal sealed override CodeFixCategory CodeFixCategory => CodeFixCategory.Compile;
@@ -57,8 +53,7 @@
             var syntaxFacts = document.GetRequiredLanguageService<ISyntaxFactsService>();
             var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);

-            if (root != null && syntaxFacts != null && semanticModel != null &&
-                TryGetTargetNode(root, diagnostic.Location.SourceSpan) is ExpressionSyntax targetNode)
+            if (TryGetTargetNode(root, diagnostic.Location.SourceSpan) is ExpressionSyntax targetNode)
             {
                 var exactSolution = GetTypeInfo(semanticModel, root, targetNode, cancellationToken, out var nodeType, out var conversionType, out var potentialConvTypes);
                 if (exactSolution)
@@ -75,7 +70,7 @@
                     {
                         var convType = potentialConvTypes[i];
                         actions.Add(new MyCodeAction(string.Format(CSharpFeaturesResources.Convert_type_to_0, convType.ToDisplayString()),
-                            c => FixIt(context.Document, root, targetNode, convType)));
+                            c => ApplyFixAsync(context.Document, root, targetNode, convType)));
                     }

                     if (potentialConvTypes.Length > MaximumConversionOptions)
@@ -89,13 +84,13 @@

                     context.RegisterCodeFix(new CodeAction.CodeActionWithNestedActions(
                         CSharpFeaturesResources.Add_explicit_cast,
-                        actions.ToImmutableArray(), false),
+                        actions.ToImmutableAndFree(), false),
                         context.Diagnostics);
                 }
             }
         }

-        private async Task<Document> FixIt(Document document, SyntaxNode currentRoot, ExpressionSyntax targetNode, ITypeSymbol conversionType)
+        private async Task<Document> ApplyFixAsync(Document document, SyntaxNode currentRoot, ExpressionSyntax targetNode, ITypeSymbol conversionType)
         {
             var castExpression = targetNode.Cast(conversionType);
             var newRoot = currentRoot.ReplaceNode(targetNode, castExpression.WithAdditionalAnnotations(Simplifier.Annotation));
@@ -294,7 +289,65 @@
             return Array.TrueForAll(matchedTypes, (item => item));
         }

-        class InheritanceDistanceComparer : IComparer<ITypeSymbol>
+
+
+
+        private SyntaxNode? TryGetTargetNode(SyntaxNode root, TextSpan span)
+        {
+            var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
+
+            var node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root);
+            return node;
+        }
+
+        private bool TryGetNode(SyntaxNode root, TextSpan span, SyntaxKind kind, SyntaxNode target, out SyntaxNode? node)
+        {
+            var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
+
+            node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root && n != target && n.IsKind(kind));
+            return node != null;
+        }
+
+        protected override async Task FixAllAsync(
+            Document document, ImmutableArray<Diagnostic> diagnostics,
+            SyntaxEditor editor, CancellationToken cancellationToken)
+        {
+            var root = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
+
+            var targetNodes = diagnostics.SelectAsArray(
+                d => TryGetTargetNode(root, d.Location.SourceSpan) is ExpressionSyntax node ? node : null);
+
+            await editor.ApplyExpressionLevelSemanticEditsAsync(
+                document, targetNodes,
+                (semanticModel, targetNode) => true,
+                (semanticModel, currentRoot, targetNode) =>
+                {
+                    if (GetTypeInfo(semanticModel, currentRoot, targetNode, cancellationToken, out var nodeType, out var conversionType, out var potentialConvTypes) &&
+                    nodeType != null && conversionType != null && !nodeType.Equals(conversionType) &&
+                        targetNode is ExpressionSyntax expression)
+                    {
+                        var castExpression = expression.Cast(conversionType);
+
+                        // TODO: castExpression.WithAdditionalAnnotations(Simplifier.Annotation)
+                        // - the Simplifier doesn't remove the redundant cast from the expression
+                        // Issue link: https://github.com/dotnet/roslyn/issues/41500
+                        return currentRoot.ReplaceNode(expression, castExpression.WithAdditionalAnnotations(Simplifier.Annotation));
+                    }
+
+                    return currentRoot;
+                },
+                cancellationToken).ConfigureAwait(false);
+        }
+
+        private class MyCodeAction : CodeAction.DocumentChangeAction
+        {
+            public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
+                : base(title, createChangedDocument, equivalenceKey: title)
+            {
+            }
+        }
+
+        private sealed class InheritanceDistanceComparer : IComparer<ITypeSymbol>
         {
             private ITypeSymbol baseType;
             private SemanticModel semanticModel;
@@ -333,64 +386,5 @@
                 this.baseType = baseType;
             }
         }
-
-
-        protected SyntaxNode? TryGetTargetNode(SyntaxNode root, TextSpan span)
-        {
-            var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
-
-            var node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root);
-            return node;
-        }
-
-        protected bool TryGetNode(SyntaxNode root, TextSpan span, SyntaxKind kind, SyntaxNode target, out SyntaxNode? node)
-        {
-            var ancestors = root.FindToken(span.Start).GetAncestors<SyntaxNode>();
-
-            node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root && n != target && n.IsKind(kind));
-            return node != null;
-        }
-
-        protected override async Task FixAllAsync(
-            Document document, ImmutableArray<Diagnostic> diagnostics,
-            SyntaxEditor editor, CancellationToken cancellationToken)
-        {
-            var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
-            if (root == null)
-            {
-                return;
-            }
-            var targetNodes = diagnostics.SelectAsArray(
-                d => TryGetTargetNode(root, d.Location.SourceSpan) is ExpressionSyntax node ? node : null);
-
-            await editor.ApplyExpressionLevelSemanticEditsAsync(
-                document, targetNodes,
-                (semanticModel, targetNode) => true,
-                (semanticModel, currentRoot, targetNode) =>
-                {
-                    if (GetTypeInfo(semanticModel, currentRoot, targetNode, cancellationToken, out var nodeType, out var conversionType, out var potentialConvTypes) &&
-                    nodeType != null && conversionType != null && !nodeType.Equals(conversionType) &&
-                        targetNode is ExpressionSyntax expression)
-                    {
-                        var castExpression = expression.Cast(conversionType);
-
-                        // TODO: castExpression.WithAdditionalAnnotations(Simplifier.Annotation)
-                        // - the Simplifier doesn't remove the redundant cast from the expression
-                        // Issue link: https://github.com/dotnet/roslyn/issues/41500
-                        return currentRoot.ReplaceNode(expression, castExpression.WithAdditionalAnnotations(Simplifier.Annotation));
-                    }
-
-                    return currentRoot;
-                },
-                cancellationToken).ConfigureAwait(false);
-        }
-
-        private class MyCodeAction : CodeAction.DocumentChangeAction
-        {
-            public MyCodeAction(string title, Func<CancellationToken, Task<Document>> createChangedDocument)
-                : base(title, createChangedDocument)
-            {
-            }
-        }
     }
 }


Revert "Added ctor to token service configuration"

This reverts commit 0bf5bf1129f1befee08e0ae17e53e0d61a785676.

--- src/Libraries/Thinktecture.IdentityServer.Core/TokenService/TokenServiceConfiguration.cs
+++ src/Libraries/Thinktecture.IdentityServer.Core/TokenService/TokenServiceConfiguration.cs
@@ -17,27 +17,17 @@
     /// </summary>
     public class TokenServiceConfiguration : SecurityTokenServiceConfiguration
     {
+        private static readonly object _syncRoot = new object();
         private static Lazy<TokenServiceConfiguration> _configuration = new Lazy<TokenServiceConfiguration>();

         [Import]
         public IConfigurationRepository ConfigurationRepository { get; set; }

-        public TokenServiceConfiguration(IConfigurationRepository configurationRepository)
-        {
-            ConfigurationRepository = configurationRepository;
-            Configure();
-        }
-
         public TokenServiceConfiguration() : base()
         {
+            Tracing.Information("Configuring token service");
             Container.Current.SatisfyImportsOnce(this);
-            Configure();
-        }

-        protected virtual void Configure()
-        {
-            Tracing.Information("Configuring token service");
-
             SecurityTokenService = typeof(TokenService);
             DefaultTokenLifetime = TimeSpan.FromHours(ConfigurationRepository.Global.DefaultTokenLifetime);
             MaximumTokenLifetime = TimeSpan.FromDays(ConfigurationRepository.Global.MaximumTokenLifetime);


Throughput tests now do a single pass per test type.

--- src/Tests/Nimbus.IntegrationTests/Tests/ThroughputTests/ThroughputSpecificationForBus.cs
+++ src/Tests/Nimbus.IntegrationTests/Tests/ThroughputTests/ThroughputSpecificationForBus.cs
@@ -84,33 +84,40 @@
             Console.WriteLine("Average throughput: {0} messages/second", _messagesPerSecond);
         }

+        [TestFixtureSetUp]
+        public void TestFixtureSetUp()
+        {
+            Task.Run(async () =>
+                           {
+                               Subject = await Given();
+                               await When();
+                           }).Wait();
+        }
+
+        [TestFixtureTearDown]
+        public void TestFixtureTearDown()
+        {
+            Task.Run(async () =>
+                           {
+                               await Subject.Stop();
+                               _dependencyResolver = null;
+
+                               if (Directory.Exists(_largeMessageBodyTempPath)) Directory.Delete(_largeMessageBodyTempPath, true);
+                           });
+        }
+
         public abstract IEnumerable<Task> SendMessages(IBus bus);

         [Test]
         public async Task TheCorrectNumberOfMessagesShouldHaveBeenObserved()
         {
-            Subject = await Given();
-            await When();
-
             _fakeHandler.ActualNumMessagesReceived.ShouldBe(_fakeHandler.ExpectedNumMessagesReceived);
         }

         [Test]
         public async Task WeShouldGetAcceptableThroughput()
         {
-            Subject = await Given();
-            await When();
-
             _messagesPerSecond.ShouldBeGreaterThan(ExpectedMessagesPerSecond);
-        }
-
-        [TearDown]
-        public override void TearDown()
-        {
-            Subject.Stop();
-            _dependencyResolver = null;
-
-            if (Directory.Exists(_largeMessageBodyTempPath)) Directory.Delete(_largeMessageBodyTempPath, true);
         }
     }
 }


bug fix

bug fix

--- cscs/Interpreter.cs
+++ cscs/Interpreter.cs
@@ -4,6 +4,7 @@
 using System.Configuration;
 using System.Text;
 using System.Threading.Tasks;
+using static SplitAndMerge.ParserFunction;

 namespace SplitAndMerge
 {
@@ -188,7 +189,7 @@
         public Variable Process(string script, string filename = "", bool mainFile = false)
         {
             Dictionary<int, int> char2Line;
-            string data = Utils.ConvertToScript(script, out char2Line);
+            string data = Utils.ConvertToScript(script, out char2Line, filename);
             if (string.IsNullOrWhiteSpace(data))
             {
                 return null;
@@ -216,7 +217,7 @@
         public async Task<Variable> ProcessAsync(string script, string filename = "", bool mainFile = false)
         {
             Dictionary<int, int> char2Line;
-            string data = Utils.ConvertToScript(script, out char2Line);
+            string data = Utils.ConvertToScript(script, out char2Line, filename);
             if (string.IsNullOrWhiteSpace(data))
             {
                 return null;
@@ -835,6 +836,9 @@
             int blockStart = script.Pointer;
             Variable result = null;

+            //StackLevel stackLevel = new StackLevel(script.Rest);
+            //ParserFunction.AddLocalVariables(stackLevel);
+
             if (script.Debugger != null)
             {
                 bool done = false;
@@ -852,11 +856,6 @@
                     return result != null ? result : new Variable();
                 }

-                /*if (!script.StillValid())
-                {
-                    throw new ArgumentException("Couldn't process block [" +
-                    script.Substr(blockStart, Constants.MAX_CHARS_TO_SHOW) + "]");
-                }*/
                 result = script.ExecuteTo();

                 if (result.IsReturn ||
@@ -866,6 +865,8 @@
                     return result;
                 }
             }
+
+            //ParserFunction.PopLocalVariables();
             return result;
         }

@@ -873,6 +874,9 @@
         {
             int blockStart = script.Pointer;
             Variable result = null;
+
+            //StackLevel stackLevel = new StackLevel(script.Rest);
+            //ParserFunction.AddLocalVariables(stackLevel);

             if (script.Debugger != null)
             {
@@ -891,11 +895,6 @@
                     return result != null ? result : new Variable();
                 }

-                /*if (!script.StillValid())
-                {
-                    throw new ArgumentException("Couldn't process block [" +
-                    script.Substr(blockStart, Constants.MAX_CHARS_TO_SHOW) + "]");
-                }*/
                 result = await script.ExecuteToAsync();

                 if (result.IsReturn ||
@@ -905,6 +904,8 @@
                     return result;
                 }
             }
+
+            //ParserFunction.PopLocalVariables();
             return result;
         }


Bug fixes

Bug fixes

--- cscs/Precompiler.cs
+++ cscs/Precompiler.cs
@@ -15,7 +15,7 @@
 {
     public class Precompiler
     {
-#if UNITY_EDITOR == false && UNITY_STANDALONE == false && __ANDROID__ == false && __IOS__ == false
+//#if UNITY_EDITOR == false && UNITY_STANDALONE == false && __ANDROID__ == false && __IOS__ == false
         static Dictionary<string, Variable.VarType> m_returnTypes = new Dictionary<string, Variable.VarType>();

         string m_functionName;
@@ -77,19 +77,24 @@
             CompilerParams.GenerateExecutable = false;
             CompilerParams.CompilerOptions = "/optimize";

+            var assemblyPath = new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath;
+            CompilerParams.ReferencedAssemblies.Add(assemblyPath);
+
             Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
             foreach (Assembly asm in assemblies)
             {
                 AssemblyName asmName = asm.GetName();
-                if (asmName == null || asmName.CodeBase == null ||
-                  (!asmName.CodeBase.EndsWith(".exe") && asmName.GetPublicKeyToken().Length == 0))
+                if (asmName == null || string.IsNullOrWhiteSpace(asmName.CodeBase))
                 {
                     continue;
                 }
-                string suffix = asmName.CodeBase.EndsWith(".exe") ? ".exe" : "";
-                CompilerParams.ReferencedAssemblies.Add(asmName.Name + suffix);
-            }
-
+                assemblyPath = new Uri(asmName.CodeBase).LocalPath;
+                if (!File.Exists(assemblyPath))
+                {
+                    continue;
+                }
+                CompilerParams.ReferencedAssemblies.Add(assemblyPath);
+            }
             var provider = new CSharpCodeProvider();
             var compile = provider.CompileAssemblyFromSource(CompilerParams, m_csCode);

@@ -242,7 +247,7 @@
                             "";
             }

-            m_converted.AppendLine("using System; using System.Collections; using System.Collections.Generic; using static System.Math;\n\n" +
+            m_converted.AppendLine("using System; using System.Collections; using System.Collections.Generic; using static System.Math; using SplitAndMerge; \n\n" +
                            "namespace SplitAndMerge {\n" +
                            "  public partial class Precompiler {\n" +
                            "    public static Variable " + m_functionName +
@@ -880,6 +885,6 @@
                 default: return typeof(string);
             }
         }
-#endif
+//#endif
     }
 }


Fixed edge case where swapping connections connected to the same port would cause a "port is already connected" error

--- Scripts/NodePort.cs
+++ Scripts/NodePort.cs
@@ -296,29 +296,28 @@
             int aConnectionCount = connections.Count;
             int bConnectionCount = targetPort.connections.Count;

+            List<NodePort> portConnections = new List<NodePort>();
+            List<NodePort> targetPortConnections = new List<NodePort>();
+
+            // Cache port connections
+            for (int i = 0; i < aConnectionCount; i++)
+                portConnections.Add(connections[i].Port);
+
+            // Cache target port connections
+            for (int i = 0; i < bConnectionCount; i++)
+                targetPortConnections.Add(targetPort.connections[i].Port);
+
+            ClearConnections();
+            targetPort.ClearConnections();
+
+            // Add port connections to targetPort
+            for (int i = 0; i < portConnections.Count; i++)
+                targetPort.Connect(portConnections[i]);
+
             // Add target port connections to this one
-            for (int i = 0; i < aConnectionCount; i++) {
-                PortConnection connection = connections[i];
-                NodePort otherPort = connection.Port;
-                targetPort.Connect(otherPort);
-            }
-
-            // Add connections to target port
-            for (int i = 0; i < bConnectionCount; i++) {
-                PortConnection connection = targetPort.connections[i];
-                NodePort otherPort = connection.Port;
-                Connect(otherPort);
-            }
-
-            // Remove starting connections on this port
-            for (int i = aConnectionCount - 1; i >= 0; i--) {
-                Disconnect(i);
-            }
-
-            // Remove starting connections on target port
-            for (int i = bConnectionCount - 1; i >= 0; i--) {
-                targetPort.Disconnect(i);
-            }
+            for (int i = 0; i < targetPortConnections.Count; i++)
+                Connect(targetPortConnections[i]);
+
         }

         /// <summary> Copy all connections pointing to a node and add them to this one </summary>


AppendAuthorize tests pass

AppendAuthorize tests pass

--- test/Swashbuckle.AspNetCore.Filters.Test/AppendAuthorizeToSummaryOperationFilterTests.cs
+++ test/Swashbuckle.AspNetCore.Filters.Test/AppendAuthorizeToSummaryOperationFilterTests.cs
@@ -1,174 +1,175 @@
-//using Xunit;
-//using Swashbuckle.AspNetCore.Swagger;
-//using Shouldly;
-//using Swashbuckle.AspNetCore.SwaggerGen;
-//using Swashbuckle.AspNetCore.Filters.Test.TestFixtures.Fakes;
-//using static Swashbuckle.AspNetCore.Filters.Test.TestFixtures.Fakes.FakeControllers;
+using Xunit;
+using Swashbuckle.AspNetCore.Swagger;
+using Shouldly;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using Swashbuckle.AspNetCore.Filters.Test.TestFixtures.Fakes;
+using static Swashbuckle.AspNetCore.Filters.Test.TestFixtures.Fakes.FakeControllers;
+using Microsoft.OpenApi.Models;

-//namespace Swashbuckle.AspNetCore.Filters.Test
-//{
-//    public class AppendAuthorizeToSummaryOperationFilterTests : BaseOperationFilterTests
-//    {
-//        private readonly IOperationFilter sut;
+namespace Swashbuckle.AspNetCore.Filters.Test
+{
+    public class AppendAuthorizeToSummaryOperationFilterTests : BaseOperationFilterTests
+    {
+        private readonly IOperationFilter sut;

-//        public AppendAuthorizeToSummaryOperationFilterTests()
-//        {
-//            sut = new AppendAuthorizeToSummaryOperationFilter();
-//        }
+        public AppendAuthorizeToSummaryOperationFilterTests()
+        {
+            sut = new AppendAuthorizeToSummaryOperationFilter();
+        }

-//        [Fact]
-//        public void Apply_AppendsAuth()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.Authorize));
+        [Fact]
+        public void Apply_AppendsAuth()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.Authorize));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth)");
+        }

-//        [Fact]
-//        public void Apply_AppendsPolicy()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeAdministratorPolicy));
+        [Fact]
+        public void Apply_AppendsPolicy()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeAdministratorPolicy));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator)");
+        }

-//        [Fact]
-//        public void Apply_AppendsMultiplePolicies()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultiplePolicies));
+        [Fact]
+        public void Apply_AppendsMultiplePolicies()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultiplePolicies));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator, Customer)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator, Customer)");
+        }

-//        [Fact]
-//        public void Apply_AppendsRole()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeAdministratorRole));
+        [Fact]
+        public void Apply_AppendsRole()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeAdministratorRole));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator)");
+        }

-//        [Fact]
-//        public void Apply_AppendsMultipleRoles()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultipleRoles));
+        [Fact]
+        public void Apply_AppendsMultipleRoles()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultipleRoles));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator, Customer)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator, Customer)");
+        }

-//        [Fact]
-//        public void Apply_AppendsMultipleRolesInOneAttribute()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultipleRolesInOneAttribute));
+        [Fact]
+        public void Apply_AppendsMultipleRolesInOneAttribute()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizeMultipleRolesInOneAttribute));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator, Customer)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth roles: Administrator, Customer)");
+        }

-//        [Fact]
-//        public void Apply_AppendsPolicyAndRole()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizePolicyAndRole));
+        [Fact]
+        public void Apply_AppendsPolicyAndRole()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.AuthorizePolicyAndRole));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator; roles: Customer)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth policies: Administrator; roles: Customer)");
+        }

-//        [Fact]
-//        public void Apply_WorksWhenNoAuthorize()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.None));
+        [Fact]
+        public void Apply_WorksWhenNoAuthorize()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(FakeActions), nameof(FakeActions.None));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary");
+        }

-//        [Fact]
-//        public void Apply_AppendsWhenAuthIsOnController()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(AuthController), nameof(FakeActions.None));
+        [Fact]
+        public void Apply_AppendsWhenAuthIsOnController()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(AuthController), nameof(FakeActions.None));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary (Auth)");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary (Auth)");
+        }

-//        [Fact]
-//        public void Apply_DoesNotAppendWhenMethodHasAllowAnonymous()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(AuthController), nameof(AuthController.AllowAnonymous));
+        [Fact]
+        public void Apply_DoesNotAppendWhenMethodHasAllowAnonymous()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(AuthController), nameof(AuthController.AllowAnonymous));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary");
-//        }
+            // Assert
+            operation.Summary.ShouldBe("Test summary");
+        }

-//        [Fact]
-//        public void Apply_DoesNotAppendWhenControllerHasAllowAnonymous()
-//        {
-//            // Arrange
-//            var operation = new Operation { Summary = "Test summary" };
-//            var filterContext = FilterContextFor(typeof(AllowAnonymousController), nameof(AllowAnonymousController.Customer));
+        [Fact]
+        public void Apply_DoesNotAppendWhenControllerHasAllowAnonymous()
+        {
+            // Arrange
+            var operation = new OpenApiOperation { Summary = "Test summary" };
+            var filterContext = FilterContextFor(typeof(AllowAnonymousController), nameof(AllowAnonymousController.Customer));

-//            // Act
-//            sut.Apply(operation, filterContext);
+            // Act
+            sut.Apply(operation, filterContext);

-//            // Assert
-//            operation.Summary.ShouldBe("Test summary");
-//        }
-//    }
-//}
+            // Assert
+            operation.Summary.ShouldBe("Test summary");
+        }
+    }
+}


added overload to give unique names

added overload to give unique names

--- DataGen/Types/Name/NameFilter.cs
+++ DataGen/Types/Name/NameFilter.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using DataGen.Types.String;

 namespace DataGen.Types.Name {
     public sealed class NameFilter : Filter<Name> {
@@ -11,6 +12,15 @@
         public NameFilter ByCountry(params string[] args)
             => new NameFilter(this.Where(name => args.Contains(name.Country)));

+
+        public NameFilter ByCountry(bool uniqueNames, params string[] args) {
+            if (!uniqueNames) return new NameFilter(this.Where(name => args.Contains(name.Country)));
+            var names = new List<Name>();
+            foreach (var name in this)
+                if (args.Contains(name.Country) && names.All(name1 => name1.Data != name.Data)) names.Add(name);
+            return new NameFilter(names);
+        }
+
         public NameFilter ByRegion(params string[] args)
             => new NameFilter(this.Where(name => args.Contains(name.Region)));


Hiding/ Showing fields

Hiding/ Showing fields

--- Assets/MixedRealityToolkit.SDK/Inspectors/UX/Collections/GridObjectCollectionInspector.cs
+++ Assets/MixedRealityToolkit.SDK/Inspectors/UX/Collections/GridObjectCollectionInspector.cs
@@ -47,9 +47,20 @@
                 EditorGUILayout.PropertyField(radius);
                 EditorGUILayout.PropertyField(radialRange);
             }
-            EditorGUILayout.PropertyField(rows);
-            EditorGUILayout.PropertyField(cellWidth);
-            EditorGUILayout.PropertyField(cellHeight);
+
+            int layoutTypeIndex = layout.enumValueIndex;
+            if (layoutTypeIndex != 2 && layoutTypeIndex != 3)
+            {
+                EditorGUILayout.PropertyField(rows);
+            }
+            if (layoutTypeIndex != 3)
+            {
+                EditorGUILayout.PropertyField(cellWidth);
+            }
+            if (layoutTypeIndex != 2)
+            {
+                EditorGUILayout.PropertyField(cellHeight);
+            }
         }
     }
 }


Updated schema

Updated schema

--- Core/OfficeDevPnP.Core/Framework/Provisioning/Providers/Xml/ProvisioningSchema-2019-03.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/Providers/Xml/ProvisioningSchema-2019-03.cs
@@ -2886,10 +2886,6 @@

         private string logoField;

-        private bool nameVisibilityField;
-
-        private bool nameVisibilityFieldSpecified;
-
         private string nameField;

         private bool removeExistingNodesField;
@@ -2928,28 +2924,6 @@
             }
             set {
                 this.logoField = value;
-            }
-        }
-
-        /// <remarks/>
-        [System.Xml.Serialization.XmlAttributeAttribute()]
-        public bool NameVisibility {
-            get {
-                return this.nameVisibilityField;
-            }
-            set {
-                this.nameVisibilityField = value;
-            }
-        }
-
-        /// <remarks/>
-        [System.Xml.Serialization.XmlIgnoreAttribute()]
-        public bool NameVisibilitySpecified {
-            get {
-                return this.nameVisibilityFieldSpecified;
-            }
-            set {
-                this.nameVisibilityFieldSpecified = value;
             }
         }


Refactored CCActionManager to use ActionStates instead of Action to key off of.

--- src/actions/CCActionManager.cs
+++ src/actions/CCActionManager.cs
@@ -9,9 +9,7 @@
 		protected class HashElement
 		{
 			public int ActionIndex;
-			public List<CCAction> Actions;
 			public List<CCActionState> ActionStates;
-			public CCAction CurrentAction;
 			public CCActionState CurrentActionState;
 			public bool CurrentActionSalvaged;
 			public bool Paused;
@@ -153,12 +151,12 @@
 				{
 					// The 'actions' may change while inside this loop.
 					for (currentTarget.ActionIndex = 0;
-                         currentTarget.ActionIndex < currentTarget.Actions.Count;
-                         currentTarget.ActionIndex++)
+								currentTarget.ActionIndex < currentTarget.ActionStates.Count;
+                         		currentTarget.ActionIndex++)
 					{
-						currentTarget.CurrentAction = currentTarget.Actions[currentTarget.ActionIndex];
+
 						currentTarget.CurrentActionState = currentTarget.ActionStates[currentTarget.ActionIndex];
-						if (currentTarget.CurrentAction == null)
+						if (currentTarget.CurrentActionState == null)
 						{
 							continue;
 						}
@@ -179,17 +177,17 @@
 						{
 							currentTarget.CurrentActionState.Stop();

-							CCActionState actionState = currentTarget.CurrentActionState;
+							var actionState = currentTarget.CurrentActionState;
 							// Make currentAction nil to prevent removeAction from salvaging it.
-							currentTarget.CurrentAction = null;
+							currentTarget.CurrentActionState = null;
 							RemoveAction(actionState);
 						}
-						currentTarget.CurrentAction = null;
+						currentTarget.CurrentActionState = null;
 					}
 				}

 				// only delete currentTarget if no actions were scheduled during the cycle (issue #481)
-				if (currentTargetSalvaged && currentTarget.Actions.Count == 0)
+				if (currentTargetSalvaged && currentTarget.ActionStates.Count == 0)
 				{
 					DeleteHashElement(currentTarget);
 				}
@@ -201,7 +199,6 @@

 		protected void DeleteHashElement(HashElement element)
 		{
-			element.Actions.Clear();
 			element.ActionStates.Clear();
 			targets.Remove(element.Target);
 			element.Target = null;
@@ -209,9 +206,8 @@

 		protected void ActionAllocWithHashElement(HashElement element)
 		{
-			if (element.Actions == null)
-			{
-				element.Actions = new List<CCAction>();
+			if (element.ActionStates == null)
+			{
 				element.ActionStates = new List<CCActionState>();
 			}
 		}
@@ -281,13 +277,17 @@
 			}

 			ActionAllocWithHashElement(element);
-
-			Debug.Assert(!element.Actions.Contains(action));
-			element.Actions.Add(action);
-
-			CCActionState state = null;
-
-			state = action.StartAction(target);
+			var isActionRunning = false;
+			foreach (var existingState in element.ActionStates)
+			{
+				if (existingState.Action == action)
+				{
+					isActionRunning = true;
+					break;
+				}
+			}
+			Debug.Assert(!isActionRunning, "CocosSharp : Action is already running for this target.");
+			var state = action.StartAction(target);
 			element.ActionStates.Add(state);

 			return state;
@@ -319,12 +319,12 @@
 			HashElement element;
 			if (targets.TryGetValue(target, out element))
 			{
-				if (element.Actions.Contains(element.CurrentAction) && (!element.CurrentActionSalvaged))
+				if (element.ActionStates.Contains(element.CurrentActionState) && (!element.CurrentActionSalvaged))
 				{
 					element.CurrentActionSalvaged = true;
 				}

-				element.Actions.Clear();
+				element.ActionStates.Clear();

 				if (currentTarget == element)
 				{
@@ -367,14 +367,13 @@

 		protected void RemoveActionAtIndex(int index, HashElement element)
 		{
-			CCAction action = element.Actions[index];
-
-			if (action == element.CurrentAction && (!element.CurrentActionSalvaged))
+			var action = element.ActionStates[index];
+
+			if (action == element.CurrentActionState && (!element.CurrentActionSalvaged))
 			{
 				element.CurrentActionSalvaged = true;
 			}

-			element.Actions.RemoveAt(index);
 			element.ActionStates.RemoveAt(index);

 			// update actionIndex in case we are in tick. looping over the actions
@@ -383,7 +382,7 @@
 				element.ActionIndex--;
 			}

-			if (element.Actions.Count == 0)
+			if (element.ActionStates.Count == 0)
 			{
 				if (currentTarget == element)
 				{


Update Program.cs

Update Program.cs

--- 1_units/source/everything/Test/Program.cs
+++ 1_units/source/everything/Test/Program.cs
@@ -166,7 +166,7 @@
             //--- The system is automatically determined at variable instantiation. Each unit can belong to just one system.
             UnitP varSystem1 = new UnitP("1 m/s2"); //SI acceleration unit (m/s2).
             UnitP varSystem2 = new UnitP("1 cm/s2"); //CGS acceleration unit (Gal).
-            UnitP varSystem3 = new UnitP(1m, UnitSymbols.ImperialCable + "/h2"); //Imperial acceleration unit (impcbl/s2).
+            UnitP varSystem3 = new UnitP(1m, UnitSymbols.ImperialCable + "/h2"); //Imperial acceleration unit (impcbl/h2).
             UnitP varSystem4 = new UnitP(1m, UnitSymbols.USCSCable + "/s2"); //USCS acceleration unit (usccbl/s2).
             UnitP varSystem5 = new UnitP(1m, "AU/min2"); //Acceleration unit not belonging to any system (AU/min2).


Fix a typo in the assert statement

Fix a typo in the assert statement

--- CSharpKoans/AboutLambdas.cs
+++ CSharpKoans/AboutLambdas.cs
@@ -161,7 +161,7 @@
                     }
                 ) ;

-            CollectionAssert.AreEquivalent(new int[] { 1, 9, 3, 27, 9, 13 }, someNumbers);
+            CollectionAssert.AreEquivalent(new int[] { 1, 9, 3, 27, 0, 13 }, someNumbers);
         }


Wasnt appending instance suffix

Wasnt appending instance suffix

--- SetMaterialValue.cs
+++ SetMaterialValue.cs
@@ -89,6 +89,8 @@
 		//	instance
 		Debug.Log ("Making instance of material " + SharedMaterial.name);
 		var MaterialInstance = new Material (SharedMaterial);
+		MaterialInstance.name += MaterialInstanceSuffix;
+
 		return MaterialInstance;
 	}


US7539: fix tests

US7539: fix tests

--- SignInCheckIn/MinistryPlatform.Translation.Test/Repositories/ParticipantRepositoryTest.cs
+++ SignInCheckIn/MinistryPlatform.Translation.Test/Repositories/ParticipantRepositoryTest.cs
@@ -185,7 +185,8 @@
             {
                 "Participants.Participant_ID",
                 "Participants.Participant_Type_ID",
-                "Participants.Participant_Start_Date"
+                "Participants.Participant_Start_Date",
+                "Contact_ID_Table.[Contact_ID] AS [Participant_Contact_ID]"
             };

             var mpNewParticipantDto = new MpNewParticipantDto
@@ -216,7 +217,8 @@
             {
                 "Participants.Participant_ID",
                 "Participants.Participant_Type_ID",
-                "Participants.Participant_Start_Date"
+                "Participants.Participant_Start_Date",
+                "Contact_ID_Table.[Contact_ID] AS [Participant_Contact_ID]"
             };

             MpNewParticipantDto mpNewParticipantDto = new MpNewParticipantDto


Tool depth limit now successfully implemented

--- TessellationAndVoxelizationGeometryLibrary/Voxelization/VoxelizedSolid_PublicFunctions.cs
+++ TessellationAndVoxelizationGeometryLibrary/Voxelization/VoxelizedSolid_PublicFunctions.cs
@@ -1167,7 +1167,7 @@
         #endregion
         #region Voxel Projection along line
         public VoxelizedSolid ErodeToNewSolid(VoxelizedSolid designedSolid, double[] dir,
-            double tLimit = -1, double toolDia = 0, bool inclusive = false,
+            double tLimit = 0, double toolDia = 0, bool inclusive = false,
             bool stopAtPartial = true, params string[] toolOptions)
         {
             var copy = (VoxelizedSolid)Copy();
@@ -1190,13 +1190,11 @@
         {
             //ToDo: tLimit is will not work as intended if used
             tLimit = tLimit <= 0 ? voxelsPerDimension[lastLevel].norm2() : tLimit / VoxelSideLengths[lastLevel];
-            //tLimit += Math.Sqrt(3 * Math.Pow(toolDia / 2, 2));
-            tLimit = toolDia <= 0 ? tLimit : tLimit * 2;
-            tLimit *= 2;
-            var mask = CreateProjectionMask(dir, tLimit, inclusive);
+            var mLimit = tLimit + voxelsPerDimension[lastLevel].norm2();
+            var mask = CreateProjectionMask(dir, mLimit, inclusive);
             var starts = GetAllVoxelsOnBoundingSurfaces(dir, toolDia);
             Parallel.ForEach(starts, vox =>
-                    ErodeMask(designedSolid, mask, stopAtPartial, toolDia, dir, vox, toolOptions));
+                    ErodeMask(designedSolid, mask, tLimit, stopAtPartial, toolDia, dir, vox, toolOptions));
             //foreach (var vox in starts)
             //    ErodeMask(designedSolid, mask, vox);
             //ErodeVoxels(designedSolid, mask, starts, stopAtPartial);
@@ -1270,21 +1268,26 @@
         //    }
         //}

-        private void ErodeMask(VoxelizedSolid designedSolid, IList<int[]> mask,
+        private void ErodeMask(VoxelizedSolid designedSolid, IList<int[]> mask, double tLimit,
             bool stopAtPartial, double toolDia, IList<double> dir,
             IList<int> start = null, params string[] toolOptions)
         {
             start = start ?? mask[0].ToArray();
             var shift = start.subtract(mask[0]);
             var pBounds = true;
+            var entryCoord = new [] { 0, 0, 0 };
             foreach (var initCoord in mask)
             {
                 var eBounds = true;
-                var slice = ThickenMask(initCoord.add(shift), dir, toolDia, toolOptions);
+                var startCoord = initCoord.add(shift);
+                if (!pBounds && startCoord.subtract(entryCoord).norm2() > tLimit)
+                    break;
+                var slice = ThickenMask(startCoord, dir, toolDia, toolOptions);

                 foreach (var coord in slice)
                 {
-                    if (PrecedesBounds(coord, dir)) continue;
+                    if (pBounds && PrecedesBounds(coord, dir)) continue;
+                    if (pBounds) entryCoord = startCoord.ToArray();
                     pBounds = false;
                     if (ExceedsBounds(coord, dir)) continue;
                     eBounds = false;


Flesh out wrapper code, add comments for what specifc things need to happen

--- TessellationAndVoxelizationGeometryLibrary/Voxelization/VoxelizedSolid_PublicFunctions.cs
+++ TessellationAndVoxelizationGeometryLibrary/Voxelization/VoxelizedSolid_PublicFunctions.cs
@@ -1170,18 +1170,31 @@
         public VoxelizedSolid ErodeSolid(double[] dir, double tLimit, bool inclusive = false)
         {
             var mask = CreateProjectionMask(dir, tLimit, inclusive);
+            //ToDo: Move mask around and determine which voxels can be removed
             return this;
         }

-        private IEnumerable<long> CreateProjectionMask(double[] dir, double tLimit, bool inclusive)
+        private IEnumerable<int[]> CreateProjectionMask(IReadOnlyList<double> dir, double tLimit, bool inclusive)
         {
             var nL = NumberOfLevels - 1;
-            var init = new[] { 0, 0, 0 };
+            var initCoord = new[] { 0, 0, 0 };
             for (var i = 0; i < 3; i++)
-                if (dir[i] < 0) init[i] = voxelsPerDimension[nL][i] - 1;
-            var voxels = new List<long>(new [] {Constants.MakeIDFromCoordinates(init, singleCoordinateShifts[nL])});
-
-
+                if (dir[i] < 0) initCoord[i] = voxelsPerDimension[nL][i] - 1;
+            var voxels = new List<int[]>(new [] {initCoord});
+            var oldVoxelCoord = initCoord.add(new[] { 0.5, 0.5, 0.5 });
+            var tTotal = 0.0;
+            while (tTotal < tLimit)
+            {
+                var t = 2.0;
+                for (var i = 0; i < 3; i++)
+                {
+                    //ToDo: determine smallest t such that ray lands on face/edge/vertex
+                    var tTemp = .24;
+                    t = Math.Min(t, tTemp);
+                }
+                //ToDo: Determine which voxels are being passed through/around
+                tTotal += t;
+            }
             return voxels;
         }
         #endregion


cleanup

cleanup

--- Tests.Unit.Core.ApplicationServices/BackgroundJobs/CheckExternalLinksBackgroundJobTest.cs
+++ Tests.Unit.Core.ApplicationServices/BackgroundJobs/CheckExternalLinksBackgroundJobTest.cs
@@ -14,7 +14,6 @@
 using Infrastructure.Services.Configuration;
 using Infrastructure.Services.Http;
 using Moq;
-using Moq.Language.Flow;
 using Tests.Toolkit.Patterns;
 using Xunit;


9858.1

--- a_mini/projects/PixelFarm/PixelFarm.DrawingBuffer/PixelFarm.DrawingBuffer/BitmapBuffer.cs
+++ a_mini/projects/PixelFarm/PixelFarm.DrawingBuffer/PixelFarm.DrawingBuffer/BitmapBuffer.cs
@@ -138,7 +138,7 @@
                 return this.Left;
             }

-            set
+            private set
             {
                 this.Left = value;
             }
@@ -169,7 +169,7 @@
             this.Height = h;
         }
         public double Width { get; private set; }
-        public double Height { get; private  set; }
+        public double Height { get; private set; }
     }
     public struct ColorInt
     {


Fixed file deleting in Windows 10

Fixed file deleting in Windows 10

--- amazon-clouddrive-dokan/VirtualDrive.cs
+++ amazon-clouddrive-dokan/VirtualDrive.cs
@@ -30,6 +30,13 @@
                     var str = info.Context as IBlockStream;
                     if (str != null) str.Close();
                 }
+                if (info.DeleteOnClose)
+                {
+                    if (info.IsDirectory)
+                        provider.DeleteDir(fileName);
+                    else
+                        provider.DeleteFile(fileName);
+                }
             }
             catch (Exception e)
             {


Get duration from id3tags (import)

Get duration from id3tags (import)

--- Apps/Audiotica.Shared/LocalMusicHelper.cs
+++ Apps/Audiotica.Shared/LocalMusicHelper.cs
@@ -106,6 +106,7 @@
             #region id3 tags

             Tag tags = null;
+            TimeSpan duration;
             if (file.FileType == ".mp3")
             {
                 var tryAsM4A = false;
@@ -135,6 +136,10 @@
                 }

                 tags = tagFile == null ? null : tagFile.Tag;
+                if (tags != null)
+                {
+                    duration = tagFile.Properties.Duration;
+                }
                 fileStream.Dispose();
                 if (tagFile != null)
                     tagFile.Dispose();
@@ -159,6 +164,7 @@
                     FilePath = audioPath,
                     Genre = tags.FirstGenre,
                     TrackNumber = (int) tags.Track,
+                    Duration = duration
                 };
             }


Bump...

Bump...

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


Some slight upgrades of the editor

Some slight upgrades of the editor

--- Assets/Editor/SerializableActionDrawer.cs
+++ Assets/Editor/SerializableActionDrawer.cs
@@ -8,6 +8,10 @@
     public class SerializableActionDrawer : PropertyDrawer {

         private ReorderableList reorderable;
+        // The cache is not used for optimization, but to work around problems where Unity
+        // double-iterated the property, causing it to try to draw other properties instead of
+        // the SerializableAction
+        private Dictionary<int, float> cachedHeights = new Dictionary<int, float>();

         public override float GetPropertyHeight(SerializedProperty property, GUIContent label) {
             if (reorderable == null)
@@ -23,33 +27,28 @@
             reorderable.DoList(position);
         }

-        private Dictionary<int, float> cachedHeights = new Dictionary<int, float>();
-
         private void CreateReorderable(SerializedProperty property, GUIContent label) {
             var actionsProp = property.FindPropertyRelative("actions");
             var defaults = new ReorderableList.Defaults();

             reorderable = new ReorderableList(property.serializedObject, actionsProp);
             reorderable.drawHeaderCallback = rect => EditorGUI.LabelField(rect, label);
-            reorderable.drawElementCallback = (rect, index, active, focused) =>
+            reorderable.drawElementCallback = (rect, index, active, focused) => {
+                rect.y += 2;
+                rect.height -= 2;
                 SerializableAction_SingleDrawer.DrawSerializableAction(
                     rect, actionsProp.GetArrayElementAtIndex(index)
                 );
+            };
             reorderable.elementHeightCallback = index => {
                 var height = SerializableAction_SingleDrawer.FindSerializableActionHeight(
-                            actionsProp.GetArrayElementAtIndex(index), GUIContent.none) + 2f;
+                            actionsProp.GetArrayElementAtIndex(index), GUIContent.none) + 4f;
                 cachedHeights[index] = height;
                 return height;
             };
             reorderable.showDefaultBackground = true;

             reorderable.drawElementBackgroundCallback = (rect, index, active, focused) => {
-                //Trying to call this causes Unity's editor to somehow keep iterating the parent property, and
-                //GetArrayElementAtIndex will return the next property (so the property BELOW THE SerializableAction IN THE INSPECTOR)
-                //So the value is cached instead
-                /*rect.height = SerializableAction_SingleDrawer.FindSerializableActionHeight(
-                                  actionsProp.GetArrayElementAtIndex(index), GUIContent.none) + 2f;*/
-
                 var rectHeight = EditorGUIUtility.singleLineHeight;
                 float height;
                 if (cachedHeights.TryGetValue(index, out height))


Save the message after invoking the plugins, makes !seen on your own name useful

--- Source/QIRC/QIRC.cs
+++ Source/QIRC/QIRC.cs
@@ -243,8 +243,6 @@
         /// </summary>
         private static void PrivateMessageRecieved(Object sender, PrivateMessageEventArgs e)
         {
-            PluginManager.Invoke("PrivateMessageRecieved", client, e);
-
             /// Commands
             String control = Settings.Read<String>("control");
             ProtoIrcMessage msg = new ProtoIrcMessage(e);
@@ -252,6 +250,8 @@
             {
                 HandleCommand(msg, client);
             }
+
+            PluginManager.Invoke("PrivateMessageRecieved", client, e);
         }

         /// <summary>


Comments

Comments

--- Source/QIRC/QIRC.cs
+++ Source/QIRC/QIRC.cs
@@ -404,6 +404,7 @@
                         if (String.Equals(command.GetName(), cmd, StringComparison.InvariantCultureIgnoreCase))
                         {
                             message.Message = message.Message.Remove(0, cmd.Length).Trim();
+                            message.Message = message.Message.Split(new[] { "//" }, 2, StringSplitOptions.None)[0];
                             AccessLevel level = AccessLevel.NORMAL;
                             if (message.IsChannelMessage)
                             {


Cleanup

Cleanup

--- Source/TakeHints.cs
+++ Source/TakeHints.cs
@@ -1,8 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;

 namespace LinqToDB
 {


fix Bjd.CoreCLR.Test

fix Bjd.CoreCLR.Test

--- Bjd.CoreCLR.Test/plugin/ListPluginTest.cs
+++ Bjd.CoreCLR.Test/plugin/ListPluginTest.cs
@@ -17,7 +17,7 @@
             using (TestService service = TestService.CreateTestService())
             {
                 service.SetOption("Option.ini");
-                service.ContentDirectory("mailbox");
+                //service.ContentDirectory("mailbox");

                 //const string currentDir = @"C:\tmp2\bjd5\BJD\out";

@@ -38,7 +38,7 @@
             using (TestService service = TestService.CreateTestService())
             {
                 service.SetOption("Option.ini");
-                service.ContentDirectory("mailbox");
+                //service.ContentDirectory("mailbox");

                 //var kernel = new Kernel();
                 var kernel = service.Kernel;


LUCENENET-305 TestSubclassConcurrentMergeScheduler in TestMergeSchedulerExternal fails.

git-svn-id: 6c68d65edd5507bf6b37474e0d155329cbeeff2a@883456 13f79535-47bb-0310-9956-ffa450edef68

--- C#/src/Test/TestMergeSchedulerExternal.cs
+++ C#/src/Test/TestMergeSchedulerExternal.cs
@@ -139,7 +139,7 @@
 				for (int i = 0; i < trace.FrameCount; i++)
 				{
                     System.Diagnostics.StackFrame sf = trace.GetFrame(i);
-					if ("DoMerge".Equals(sf.GetMethod()))
+					if ("DoMerge".Equals(sf.GetMethod().Name))
 						throw new System.IO.IOException("now failing during merge");
 				}
 			}


Don't use Thread.Sleep to reconnect in Steam thread

--- Steam/Connection.cs
+++ Steam/Connection.cs
@@ -6,12 +6,16 @@
 using System;
 using SteamKit2;
 using System.IO;
-using System.Threading;
+using Timer = System.Timers.Timer;

 namespace SteamDatabaseBackend
 {
     class Connection : SteamHandler
     {
+        private const uint RETRY_DELAY = 15;
+
+        public readonly Timer ReconnectionTimer;
+
         private readonly string SentryFile;
         private string AuthCode;

@@ -20,11 +24,30 @@
         {
             SentryFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "sentry.bin");

+            ReconnectionTimer = new Timer();
+            ReconnectionTimer.AutoReset = false;
+            ReconnectionTimer.Elapsed += Reconnect;
+            ReconnectionTimer.Interval = TimeSpan.FromSeconds(RETRY_DELAY).TotalMilliseconds;
+
             manager.Register(new Callback<SteamClient.ConnectedCallback>(OnConnected));
             manager.Register(new Callback<SteamClient.DisconnectedCallback>(OnDisconnected));
             manager.Register(new Callback<SteamUser.LoggedOnCallback>(OnLoggedOn));
             manager.Register(new Callback<SteamUser.LoggedOffCallback>(OnLoggedOff));
             manager.Register(new Callback<SteamUser.UpdateMachineAuthCallback>(OnMachineAuth));
+        }
+
+        private static void Reconnect(object sender, System.Timers.ElapsedEventArgs e)
+        {
+            if (Steam.Instance.Client.IsConnected)
+            {
+                Log.WriteDebug("Steam", "Reconnect timer fired, but it's connected already.");
+
+                return;
+            }
+
+            Log.WriteDebug("Steam", "Reconnecting...");
+
+            Steam.Instance.Client.Connect();
         }

         private void OnConnected(SteamClient.ConnectedCallback callback)
@@ -83,15 +106,11 @@

             JobManager.CancelChatJobsIfAny();

-            const uint RETRY_DELAY = 15;
-
             Log.WriteInfo("Steam", "Disconnected from Steam. Retrying in {0} seconds...", RETRY_DELAY);

             IRC.Instance.SendEmoteAnnounce("disconnected from Steam. Retrying in {0} seconds...", RETRY_DELAY);

-            Thread.Sleep(TimeSpan.FromSeconds(RETRY_DELAY));
-
-            Steam.Instance.Client.Connect();
+            ReconnectionTimer.Start();
         }

         private void OnLoggedOn(SteamUser.LoggedOnCallback callback)
@@ -112,8 +131,6 @@
                 Log.WriteInfo("Steam", "Failed to login: {0}", callback.Result);

                 IRC.Instance.SendEmoteAnnounce("failed to log in: {0}", callback.Result);
-
-                Thread.Sleep(TimeSpan.FromSeconds(2));

                 return;
             }


Fixed issue with already set loglevel being overridden

--- Core/OfficeDevPnP.Core/Diagnostics/Log.cs
+++ Core/OfficeDevPnP.Core/Diagnostics/Log.cs
@@ -16,11 +16,11 @@
         private static ILogger _logger;

         [ThreadStatic]
-        private static LogLevel _logLevel;
+        private static LogLevel? _logLevel;

         public static LogLevel LogLevel
         {
-            get { return _logLevel; }
+            get { return _logLevel.Value; }
             set { _logLevel = value; }
         }

@@ -73,7 +73,10 @@
                 else
                 {
                     // Defaulting to built in logger
-                    _logLevel = LogLevel.Information;
+                    if (!_logLevel.HasValue)
+                    {
+                        _logLevel = LogLevel.Information;
+                    }
                     _logger = new TraceLogger();
                 }
             }


Update XML documentation comment of `LimitPrice` (#6381)

* Update OrderField.cs

* Typo

--- Common/Orders/OrderField.cs
+++ Common/Orders/OrderField.cs
@@ -21,7 +21,7 @@
     public enum OrderField
     {
         /// <summary>
-        /// The limit price for a <see cref="LimitOrder"/> or <see cref="StopLimitOrder"/>
+        /// The limit price for a <see cref="LimitOrder"/>, <see cref="StopLimitOrder"/> or <see cref="LimitIfTouchedOrder"/>
         /// </summary>
         LimitPrice,

@@ -35,4 +35,4 @@
         /// </summary>
         TriggerPrice
     }
-}+}


Fix: Repository Monitor should detect changes

--- Disco.Data/Repository/DiscoDataContext.cs
+++ Disco.Data/Repository/DiscoDataContext.cs
@@ -73,6 +73,8 @@
         {
             int changeCount = 0;

+            this.ChangeTracker.DetectChanges();
+
             // Notify before changes are committed
             var changes = Monitor.RepositoryMonitor.BeforeSaveChanges(this);


fix backronym

fix backronym

--- DiscordBotNew/Commands/GeneralCommands.cs
+++ DiscordBotNew/Commands/GeneralCommands.cs
@@ -226,7 +226,7 @@
                 {
                     if (File.Exists(Path.Combine($"{(useComplexWords ? "" : "simple")}words", $"{char.ToLower(c)}.txt")))
                     {
-                        string[] words = File.ReadAllLines($"{(useComplexWords ? "" : "simple")}words\\{char.ToLower(c)}.txt");
+                        string[] words = File.ReadAllLines(Path.Combine($"{(useComplexWords ? "" : "simple")}words", $"{char.ToLower(c)}.txt"));
                         string word = words[random.Next(words.Length)];
                         if (word.Length > 1)
                             backronym += char.ToUpper(word[0]) + word.Substring(1) + " ";


try threaded

try threaded

--- Tests/TestConfig.cs
+++ Tests/TestConfig.cs
@@ -1,3 +0,0 @@
-using Xunit;
-
-[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true)]


Add doc comments for stind instructions.

--- CilTK/Cil.cs
+++ CilTK/Cil.cs
@@ -2284,13 +2284,69 @@
         public static unsafe void Stelem_Ref() { throw new Exception("CilTK Rewriter not run."); }

         public static unsafe void Stfld(string field) { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type native int into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
         public static unsafe void Stind_I() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type int8 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
         public static unsafe void Stind_I1() { throw new Exception("CilTK Rewriter not run."); }
-        public static unsafe void Stind_I2() { throw new Exception("CilTK Rewriter not run."); }
-        public static unsafe void Stind_I4() { throw new Exception("CilTK Rewriter not run."); }
-        public static unsafe void Stind_I8() { throw new Exception("CilTK Rewriter not run."); }
-        public static unsafe void Stind_R4() { throw new Exception("CilTK Rewriter not run."); }
-        public static unsafe void Stind_R8() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type int16 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
+		public static unsafe void Stind_I2() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type int32 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
+		public static unsafe void Stind_I4() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type int64 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
+		public static unsafe void Stind_I8() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type float32 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
+		public static unsafe void Stind_R4() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type float64 into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
+		public static unsafe void Stind_R8() { throw new Exception("CilTK Rewriter not run."); }
+
+		/// <summary>
+		/// Store value of type object ref (type O) into memory at address
+		///
+		/// Stack Transition:
+		/// …, addr, value, -> …,
+		/// </summary>
         public static unsafe void Stind_Ref() { throw new Exception("CilTK Rewriter not run."); }

         /// <summary>