LifecycleTests uses the same SelfTestDiscovery as many other tests. Assertions in this commit are affected only in the order that the sample test class methods are processed.

--- src/Fixie.Tests/LifecycleTests.cs
+++ src/Fixie.Tests/LifecycleTests.cs
@@ -17,20 +17,7 @@
         public LifecycleTests()
         {
             FailingMembers = null;
-            discovery = new LifecycleTestsDiscovery();
-        }
-
-        class LifecycleTestsDiscovery : Discovery
-        {
-            public LifecycleTestsDiscovery()
-            {
-                Classes
-                    .Where(x => x.IsNestedPrivate)
-                    .Where(x => x.Name.EndsWith("TestClass"));
-
-                Methods
-                    .OrderByDescending(x => x.Name, StringComparer.Ordinal);
-            }
+            discovery = new SelfTestDiscovery();
         }

         static void FailDuring(params string[] failingMemberNames)
@@ -353,118 +340,118 @@
             var output = Run<SampleTestClass, DefaultLifecycle>();

             output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Pass passed");
+
+            output.ShouldHaveLifecycle(
+                ".ctor", "Fail", "Dispose",
+                ".ctor", "Pass", "Dispose");
+        }
+
+        public void ShouldAllowConstructingPerCase()
+        {
+            var output = Run<SampleTestClass, CreateInstancePerCase>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
                 "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor", "Pass", "Dispose",
-                ".ctor", "Fail", "Dispose");
-        }
-
-        public void ShouldAllowConstructingPerCase()
-        {
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(
+                ".ctor", "Fail", "Dispose",
+                ".ctor", "Pass", "Dispose");
+        }
+
+        public void ShouldAllowConstructingPerClass()
+        {
+            var output = Run<SampleTestClass, CreateInstancePerClass>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Pass passed",
+                "SampleTestClass.Skip skipped: skipped by naming convention");
+
+            output.ShouldHaveLifecycle(
+                ".ctor",
+                "CaseSetUp", "Fail", "CaseTearDown",
+                "CaseSetUp", "Pass", "CaseTearDown",
+                "Dispose");
+        }
+
+        public void ShouldSkipAllCasesWhenShortCircuitingClassExecution()
+        {
+            var output = Run<SampleTestClass, ShortCircuitClassExecution>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail skipped",
+                "SampleTestClass.Pass skipped",
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle();
+        }
+
+        public void ShouldSkipAllCasesWhenShortCircuitingCaseExecution()
+        {
+            var output = Run<SampleTestClass, ShortCircuitCaseExection>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail skipped",
+                "SampleTestClass.Pass skipped",
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle();
+        }
+
+        public void ShouldFailCaseWhenConstructingPerCaseAndConstructorThrows()
+        {
+            FailDuring(".ctor");
+
             var output = Run<SampleTestClass, CreateInstancePerCase>();

             output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor", "Pass", "Dispose",
-                ".ctor", "Fail", "Dispose");
-        }
-
-        public void ShouldAllowConstructingPerClass()
-        {
+                "SampleTestClass.Fail failed: '.ctor' failed!",
+                "SampleTestClass.Pass failed: '.ctor' failed!",
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(".ctor", ".ctor");
+        }
+
+        public void ShouldFailAllMethodsWhenLifecycleThrows()
+        {
+            var output = Run<SampleTestClass, BuggyLifecycle>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: Unsafe lifecycle threw!",
+                "SampleTestClass.Pass failed: Unsafe lifecycle threw!",
+                "SampleTestClass.Skip failed: Unsafe lifecycle threw!");
+
+            output.ShouldHaveLifecycle();
+        }
+
+        public void ShouldFailAllMethodsWhenConstructingPerClassAndConstructorThrows()
+        {
+            FailDuring(".ctor");
+
             var output = Run<SampleTestClass, CreateInstancePerClass>();

             output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped: skipped by naming convention",
-                "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor",
-                "CaseSetUp", "Pass", "CaseTearDown",
-                "CaseSetUp", "Fail", "CaseTearDown",
-                "Dispose");
-        }
-
-        public void ShouldSkipAllCasesWhenShortCircuitingClassExecution()
-        {
-            var output = Run<SampleTestClass, ShortCircuitClassExecution>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass skipped",
-                "SampleTestClass.Fail skipped");
-
-            output.ShouldHaveLifecycle();
-        }
-
-        public void ShouldSkipAllCasesWhenShortCircuitingCaseExecution()
-        {
-            var output = Run<SampleTestClass, ShortCircuitCaseExection>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass skipped",
-                "SampleTestClass.Fail skipped");
-
-            output.ShouldHaveLifecycle();
-        }
-
-        public void ShouldFailCaseWhenConstructingPerCaseAndConstructorThrows()
-        {
-            FailDuring(".ctor");
-
-            var output = Run<SampleTestClass, CreateInstancePerCase>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
+                "SampleTestClass.Fail failed: '.ctor' failed!",
                 "SampleTestClass.Pass failed: '.ctor' failed!",
-                "SampleTestClass.Fail failed: '.ctor' failed!");
-
-            output.ShouldHaveLifecycle(".ctor", ".ctor");
-        }
-
-        public void ShouldFailAllMethodsWhenLifecycleThrows()
-        {
-            var output = Run<SampleTestClass, BuggyLifecycle>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip failed: Unsafe lifecycle threw!",
-                "SampleTestClass.Pass failed: Unsafe lifecycle threw!",
-                "SampleTestClass.Fail failed: Unsafe lifecycle threw!");
-
-            output.ShouldHaveLifecycle();
-        }
-
-        public void ShouldFailAllMethodsWhenConstructingPerClassAndConstructorThrows()
-        {
-            FailDuring(".ctor");
+                "SampleTestClass.Skip failed: '.ctor' failed!");
+
+            output.ShouldHaveLifecycle(".ctor");
+        }
+
+        public void ShouldFailCasesWhenConstructingPerClassAndCaseSetUpThrows()
+        {
+            FailDuring("CaseSetUp");

             var output = Run<SampleTestClass, CreateInstancePerClass>();

             output.ShouldHaveResults(
-                "SampleTestClass.Skip failed: '.ctor' failed!",
-                "SampleTestClass.Pass failed: '.ctor' failed!",
-                "SampleTestClass.Fail failed: '.ctor' failed!");
-
-            output.ShouldHaveLifecycle(".ctor");
-        }
-
-        public void ShouldFailCasesWhenConstructingPerClassAndCaseSetUpThrows()
-        {
-            FailDuring("CaseSetUp");
-
-            var output = Run<SampleTestClass, CreateInstancePerClass>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped: skipped by naming convention",
+                "SampleTestClass.Fail failed: 'CaseSetUp' failed!",
                 "SampleTestClass.Pass failed: 'CaseSetUp' failed!",
-                "SampleTestClass.Fail failed: 'CaseSetUp' failed!");
+                "SampleTestClass.Skip skipped: skipped by naming convention");

             output.ShouldHaveLifecycle(
                 ".ctor",
@@ -480,135 +467,135 @@
             var output = Run<SampleTestClass, CreateInstancePerClass>();

             output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Fail failed: 'CaseTearDown' failed!",
+                "SampleTestClass.Pass failed: 'CaseTearDown' failed!",
+                "SampleTestClass.Skip skipped: skipped by naming convention");
+
+            output.ShouldHaveLifecycle(
+                ".ctor",
+                "CaseSetUp", "Fail", "CaseTearDown",
+                "CaseSetUp", "Pass", "CaseTearDown",
+                "Dispose");
+        }
+
+        public void ShouldFailCaseWhenConstructingPerCaseAndDisposeThrows()
+        {
+            FailDuring("Dispose");
+
+            var output = Run<SampleTestClass, CreateInstancePerCase>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Fail failed: 'Dispose' failed!",
+                "SampleTestClass.Pass failed: 'Dispose' failed!",
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(
+                ".ctor", "Fail", "Dispose",
+                ".ctor", "Pass", "Dispose");
+        }
+
+        public void ShouldFailAllMethodsAfterReportingPrimaryResultsWhenConstructingPerClassAndDisposeThrows()
+        {
+            FailDuring("Dispose");
+
+            var output = Run<SampleTestClass, CreateInstancePerClass>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Pass passed",
                 "SampleTestClass.Skip skipped: skipped by naming convention",
-                "SampleTestClass.Pass failed: 'CaseTearDown' failed!",
-                "SampleTestClass.Fail failed: 'Fail' failed!",
-                "SampleTestClass.Fail failed: 'CaseTearDown' failed!");
+
+                "SampleTestClass.Fail failed: 'Dispose' failed!",
+                "SampleTestClass.Pass failed: 'Dispose' failed!",
+                "SampleTestClass.Skip failed: 'Dispose' failed!");

             output.ShouldHaveLifecycle(
                 ".ctor",
+                "CaseSetUp", "Fail", "CaseTearDown",
                 "CaseSetUp", "Pass", "CaseTearDown",
-                "CaseSetUp", "Fail", "CaseTearDown",
                 "Dispose");
         }

-        public void ShouldFailCaseWhenConstructingPerCaseAndDisposeThrows()
-        {
-            FailDuring("Dispose");
-
-            var output = Run<SampleTestClass, CreateInstancePerCase>();
-
-            output.ShouldHaveResults(
+        public void ShouldSkipLifecycleWhenConstructingPerCaseAndAllCasesAreSkipped()
+        {
+            var output = Run<AllSkippedTestClass, CreateInstancePerCase>();
+
+            output.ShouldHaveResults(
+                "AllSkippedTestClass.SkipA skipped",
+                "AllSkippedTestClass.SkipB skipped",
+                "AllSkippedTestClass.SkipC skipped");
+
+            output.ShouldHaveLifecycle();
+        }
+
+        public void ShouldNotSkipLifecycleWhenConstructingPerClassAndAllCasesAreSkipped()
+        {
+            var output = Run<AllSkippedTestClass, CreateInstancePerClass>();
+
+            output.ShouldHaveResults(
+                "AllSkippedTestClass.SkipA skipped: skipped by naming convention",
+                "AllSkippedTestClass.SkipB skipped: skipped by naming convention",
+                "AllSkippedTestClass.SkipC skipped: skipped by naming convention");
+
+            output.ShouldHaveLifecycle(".ctor", "Dispose");
+        }
+
+        public void ShouldSkipLifecycleWhenConstructingPerCaseButAllCasesFailCustomParameterGeneration()
+        {
+            discovery.Parameters.Add<BuggyParameterSource>();
+
+            var output = Run<ParameterizedSampleTestClass, CreateInstancePerCase>();
+
+            output.ShouldHaveResults(
+                "ParameterizedSampleTestClass.BoolArg failed: Exception thrown while attempting to yield input parameters for method: BoolArg",
+                "ParameterizedSampleTestClass.IntArg failed: Exception thrown while attempting to yield input parameters for method: IntArg");
+
+            output.ShouldHaveLifecycle();
+        }
+
+        public void ShouldNotSkipLifecycleWhenConstructingPerClassAndAllCasesFailCustomParameterGeneration()
+        {
+            discovery.Parameters.Add<BuggyParameterSource>();
+
+            var output = Run<ParameterizedSampleTestClass, CreateInstancePerClass>();
+
+            output.ShouldHaveResults(
+                "ParameterizedSampleTestClass.BoolArg failed: Exception thrown while attempting to yield input parameters for method: BoolArg",
+                "ParameterizedSampleTestClass.IntArg failed: Exception thrown while attempting to yield input parameters for method: IntArg");
+
+            output.ShouldHaveLifecycle(".ctor", "Dispose");
+        }
+
+        public void ShouldAllowRunningAllCasesMultipleTimes()
+        {
+            var output = Run<SampleTestClass, RunCasesTwice>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
+                "SampleTestClass.Pass passed",
                 "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass failed: 'Dispose' failed!",
-                "SampleTestClass.Fail failed: 'Fail' failed!",
-                "SampleTestClass.Fail failed: 'Dispose' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor", "Pass", "Dispose",
-                ".ctor", "Fail", "Dispose");
-        }
-
-        public void ShouldFailAllMethodsAfterReportingPrimaryResultsWhenConstructingPerClassAndDisposeThrows()
-        {
-            FailDuring("Dispose");
-
-            var output = Run<SampleTestClass, CreateInstancePerClass>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped: skipped by naming convention",
+
+                "SampleTestClass.Fail failed: 'Fail' failed!",
                 "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!",
-
-                "SampleTestClass.Skip failed: 'Dispose' failed!",
-                "SampleTestClass.Pass failed: 'Dispose' failed!",
-                "SampleTestClass.Fail failed: 'Dispose' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor",
-                "CaseSetUp", "Pass", "CaseTearDown",
-                "CaseSetUp", "Fail", "CaseTearDown",
-                "Dispose");
-        }
-
-        public void ShouldSkipLifecycleWhenConstructingPerCaseAndAllCasesAreSkipped()
-        {
-            var output = Run<AllSkippedTestClass, CreateInstancePerCase>();
-
-            output.ShouldHaveResults(
-                "AllSkippedTestClass.SkipC skipped",
-                "AllSkippedTestClass.SkipB skipped",
-                "AllSkippedTestClass.SkipA skipped");
-
-            output.ShouldHaveLifecycle();
-        }
-
-        public void ShouldNotSkipLifecycleWhenConstructingPerClassAndAllCasesAreSkipped()
-        {
-            var output = Run<AllSkippedTestClass, CreateInstancePerClass>();
-
-            output.ShouldHaveResults(
-                "AllSkippedTestClass.SkipC skipped: skipped by naming convention",
-                "AllSkippedTestClass.SkipB skipped: skipped by naming convention",
-                "AllSkippedTestClass.SkipA skipped: skipped by naming convention");
-
-            output.ShouldHaveLifecycle(".ctor", "Dispose");
-        }
-
-        public void ShouldSkipLifecycleWhenConstructingPerCaseButAllCasesFailCustomParameterGeneration()
-        {
-            discovery.Parameters.Add<BuggyParameterSource>();
-
-            var output = Run<ParameterizedSampleTestClass, CreateInstancePerCase>();
-
-            output.ShouldHaveResults(
-                "ParameterizedSampleTestClass.IntArg failed: Exception thrown while attempting to yield input parameters for method: IntArg",
-                "ParameterizedSampleTestClass.BoolArg failed: Exception thrown while attempting to yield input parameters for method: BoolArg");
-
-            output.ShouldHaveLifecycle();
-        }
-
-        public void ShouldNotSkipLifecycleWhenConstructingPerClassAndAllCasesFailCustomParameterGeneration()
-        {
-            discovery.Parameters.Add<BuggyParameterSource>();
-
-            var output = Run<ParameterizedSampleTestClass, CreateInstancePerClass>();
-
-            output.ShouldHaveResults(
-                "ParameterizedSampleTestClass.IntArg failed: Exception thrown while attempting to yield input parameters for method: IntArg",
-                "ParameterizedSampleTestClass.BoolArg failed: Exception thrown while attempting to yield input parameters for method: BoolArg");
-
-            output.ShouldHaveLifecycle(".ctor", "Dispose");
-        }
-
-        public void ShouldAllowRunningAllCasesMultipleTimes()
-        {
-            var output = Run<SampleTestClass, RunCasesTwice>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(
+                ".ctor", "Fail", "Pass", "Fail", "Pass", "Dispose");
+        }
+
+        public void ShouldAllowExecutingACaseMultipleTimesBeforeEmittingItsResult()
+        {
+            var output = Run<SampleTestClass, RetryFailingCases>();
+
+            output.ShouldHaveResults(
+                "SampleTestClass.Fail failed: 'Fail' failed!",
                 "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!",
-
-                "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor", "Pass", "Fail", "Pass", "Fail", "Dispose");
-        }
-
-        public void ShouldAllowExecutingACaseMultipleTimesBeforeEmittingItsResult()
-        {
-            var output = Run<SampleTestClass, RetryFailingCases>();
-
-            output.ShouldHaveResults(
-                "SampleTestClass.Skip skipped",
-                "SampleTestClass.Pass passed",
-                "SampleTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                ".ctor", "Pass", "Fail", "Fail", "Dispose");
+                "SampleTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(
+                ".ctor", "Fail", "Fail", "Pass", "Dispose");
         }

         public void ShouldAllowStaticTestClassesAndMethodsBypassingConstructionAttempts()
@@ -616,12 +603,12 @@
             var output = Run<CreateInstancePerCase>(typeof(StaticTestClass));

             output.ShouldHaveResults(
-                "StaticTestClass.Skip skipped",
+                "StaticTestClass.Fail failed: 'Fail' failed!",
                 "StaticTestClass.Pass passed",
-                "StaticTestClass.Fail failed: 'Fail' failed!");
-
-            output.ShouldHaveLifecycle(
-                "Pass", "Fail");
+                "StaticTestClass.Skip skipped");
+
+            output.ShouldHaveLifecycle(
+                "Fail", "Pass");
         }
     }
 }


fix for texture scaling

fix for texture scaling

--- Sapphire/Skin.cs
+++ Sapphire/Skin.cs
@@ -416,7 +416,7 @@
                         throw new FileNotFoundException(String.Format("Sprite \"{0}\" not found!", fullPath), fullPath);
                     }

-                    var texture = new Texture2D(0, 0);
+                    var texture = new Texture2D(0, 0, TextureFormat.ARGB32, false, true);
                     texture.LoadImage(File.ReadAllBytes(fullPath));
                     texture.filterMode = FilterMode.Bilinear;
                     spriteTextureCache.Add(path, texture);


fix bug in Server adress handling when it should listen for all Uris

--- Server/Server.cs
+++ Server/Server.cs
@@ -45,8 +45,11 @@
         private void AddHandler(string prefix, HttpVerb verb, Action<HttpListenerRequest, ServerResponse> act)
         {

-            string fulladress = prefix.EndsWith("/")
-                ? _serverAdress + prefix : _serverAdress + prefix + "/";
+            string fulladress;
+            if (prefix.EndsWith("/") || string.IsNullOrEmpty(prefix))
+                fulladress = _serverAdress + prefix;
+            else
+                fulladress  = _serverAdress + prefix + "/";

             _listener.Prefixes.Add(fulladress);


dump version:16

dump version:16

git-svn-id: deaf5729afa9d9459d700df0b32929dbfb02527c@59386 2327b42d-5241-43d6-9e2a-de5ac946f064

--- HtmlAgilityPack.Adaptor/HtmlHandlerAdapter.cs
+++ HtmlAgilityPack.Adaptor/HtmlHandlerAdapter.cs
@@ -22,6 +22,8 @@
       document.LoadHtml( GetTemplateContent() );
       Document = document;

+      ApplyBindingSheets();
+
       using ( var bindingContext = HtmlBindingContext.EnterContext( DocumentNode ) )
       {
         Process();
@@ -37,6 +39,24 @@
       Document.Find( "html head" ).First().AppendChild( meta );

       document.Save( Response.Output );
+    }
+
+    private void ApplyBindingSheets()
+    {
+      var bindingSheets = Find( "link[rel=Bindingsheet]" )
+        .Select( link => link.Attribute( "href" ) )
+        .Where( href => href != null )
+        .Select( href => MapPath( href.Value ) )
+        .Select( physicalPath => HtmlBindingSheet.Load( physicalPath ) );
+
+      HtmlBindingContext.EnterContext( DocumentNode );
+
+      bindingSheets
+        .ForAll( sheet => sheet.Apply() );
+
+      HtmlBindingContext.ExitContext();
+
+
     }

     protected IEnumerable<IHtmlElement> Find( string selector )


Обработка ошибок Email

Обработка ошибок Email

--- Interiora/FunctionalityLibrary/EMailSender.cs
+++ Interiora/FunctionalityLibrary/EMailSender.cs
@@ -40,7 +40,7 @@
                }
                catch (Exception e)
                {
-                    throw new Exception("Отправка Почты провалилась на начальном этапе: " + e.Message);
+                    MessageBox.Show("Отправка Почты провалилась на начальном этапе: " + e.Message);
                }
           }


Added logging to the ProcessRunner.

Added logging to the ProcessRunner.

--- IronFoundry.Container.Shared/ProcessRunner.cs
+++ IronFoundry.Container.Shared/ProcessRunner.cs
@@ -6,6 +6,7 @@
 using System.Net;
 using IronFoundry.Container.Utilities;
 using IronFoundry.Container.Win32;
+using NLog;

 namespace IronFoundry.Container
 {
@@ -40,6 +41,8 @@

     public class ProcessRunner : IProcessRunner
     {
+        private readonly Logger log = LogManager.GetCurrentClassLogger();
+
         static readonly string[] EmptyArguments = new string[0];

         public void Dispose()
@@ -105,6 +108,11 @@
                 }
             }

+            log.Trace("Starting Process - FileName: {0} Arguments: {1} WorkingDirectory: {2}",
+                p.StartInfo.FileName,
+                p.StartInfo.Arguments,
+                p.StartInfo.WorkingDirectory);
+
             bool started = p.Start();
             Debug.Assert(started); // TODO: Should we throw an exception here? Fail fast?


Decompiler: don't allow png export with only vmat_c filter

--- Decompiler/Decompiler.cs
+++ Decompiler/Decompiler.cs
@@ -811,9 +811,18 @@

         private void DumpVPK(string parentPath, Package package, string type, Dictionary<string, uint> manifestData)
         {
-            if (ExtFilterList != null && !ExtFilterList.Contains(type))
-            {
-                return;
+            var allowSubFilesFromExternalRefs = true;
+            if (ExtFilterList != null)
+            {
+                if (!ExtFilterList.Contains(type))
+                {
+                    return;
+                }
+
+                if (type == "vmat_c" && ExtFilterList.Contains("vmat_c") && !ExtFilterList.Contains("vtex_c"))
+                {
+                    allowSubFilesFromExternalRefs = false;
+                }
             }

             if (!package.Entries.ContainsKey(type))
@@ -912,7 +921,7 @@

                         if (Decompile && contentFile is not null)
                         {
-                            DumpContentFile(filePath, contentFile);
+                            DumpContentFile(filePath, contentFile, allowSubFilesFromExternalRefs);
                         }
                         else
                         {


Incorporate the changes committed in the dev branch

--- samples/CodeFlow/ClientApp/Startup.cs
+++ samples/CodeFlow/ClientApp/Startup.cs
@@ -1,3 +1,5 @@
+using System.Collections.Generic;
+using System.IdentityModel.Tokens.Jwt;
 using System.Net.Http;
 using Microsoft.AspNetCore.Authentication.Cookies;
 using Microsoft.AspNetCore.Authentication.OpenIdConnect;
@@ -5,6 +7,7 @@
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.IdentityModel.Protocols.OpenIdConnect;
+using Microsoft.IdentityModel.Tokens;

 namespace ClientApp
 {
@@ -58,7 +61,19 @@
                 // the different endpoints URIs or the token validation parameters explicitly.
                 Authority = "http://localhost:54540/",

-                Scope = { "email", "roles" }
+                Scope = { "email", "roles" },
+
+                SecurityTokenValidator = new JwtSecurityTokenHandler
+                {
+                    // Disable the built-in JWT claims mapping feature.
+                    InboundClaimTypeMap = new Dictionary<string, string>()
+                },
+
+                TokenValidationParameters = new TokenValidationParameters
+                {
+                    NameClaimType = "name",
+                    RoleClaimType = "role"
+                }
             });

             app.UseMvc();


Reacting to Kestrel extensions

Reacting to Kestrel extensions

--- samples/IdentitySample.Mvc/Startup.cs
+++ samples/IdentitySample.Mvc/Startup.cs
@@ -120,7 +120,7 @@
         {
             var host = new WebHostBuilder()
                 .UseDefaultHostingConfiguration(args)
-                .UseServer("Microsoft.AspNetCore.Server.Kestrel")
+                .UseKestrel()
                 .UseStartup<Startup>()
                 .Build();

@@ -128,3 +128,4 @@
         }
     }
 }
+


Fix sample project

Fix sample project

--- samples/RazorLight.Samples/Program.cs
+++ samples/RazorLight.Samples/Program.cs
@@ -20,8 +20,7 @@
             // Create engine that uses entityFramework to fetch templates from db
             // You can create project that uses your IRepository<T>
             var project = new EntityFrameworkRazorLightProject(db);
-            IRazorLightEngine engine = new EngineFactory().Create(project);
-
+			var engine = new RazorLightEngineBuilder().UseProject(project).Build();

             // As our key in database is integer, but engine takes string as a key - pass integer ID as a string


fix tractor defaulting to cowboy hat

fix tractor defaulting to cowboy hat

--- TractorMod/ModEntry.cs
+++ TractorMod/ModEntry.cs
@@ -473,7 +473,7 @@
                 foreach (TractorGarage garage in location.buildings.OfType<TractorGarage>())
                 {
                     Tractor tractor = Utility.findHorse(garage.HorseId) as Tractor;
-                    int? tractorHatID = tractor?.hat.Value?.which;
+                    int? tractorHatID = tractor?.hat.Value?.which.Value;
                     var saveData = new CustomSaveBuilding(new Vector2(garage.tileX.Value, garage.tileY.Value), garage.HorseId, tractorHatID, this.GarageBuildingType, this.GetMapName(location), garage.daysOfConstructionLeft.Value);

                     yield return new GarageMetadata(location, garage, saveData);


Bugfix for query usage

Bugfix for query usage

--- src/Bots/Bot.cs
+++ src/Bots/Bot.cs
@@ -294,7 +294,7 @@
                 bool mentionsBot = messageData.MentionsBot(this.Config.Name, Convert.ToUInt64(this.UserId));
                 if (CommandsConfig.Instance.TryParseForCommand(messageData.Content, mentionsBot, out string parsedCommand, out string query))
                 {
-                    messageData.Content = $"{settings.Prefix}query";
+                    messageData.Content = $"{settings.Prefix}{query}";
                 }
             }
         }


CCCamera :  Reverting change to default calculated near clipping plane

--- src/CCCamera.cs
+++ src/CCCamera.cs
@@ -245,7 +245,7 @@
                  * In particular, this will result in imprecise visible bounds
                  */
                 nearAndFarPerspectiveClipping.Near
-                    = Math.Max(Math.Abs ((centerInWorldspace.Z - targetInWorldspaceIn.Z) / 3.0f), defaultNearAndFarPerspClipping.Near);
+                    = Math.Max(Math.Abs ((centerInWorldspace.Z - targetInWorldspaceIn.Z) / 2.0f), defaultNearAndFarPerspClipping.Near);
             }

             UpdateCameraMatrices();


Added length validation for shared key.

Added length validation for shared key.

--- PocketHub.Client.Lib/ServiceProviders/HubClientBase.cs
+++ PocketHub.Client.Lib/ServiceProviders/HubClientBase.cs
@@ -101,6 +101,7 @@

         private string ComposeAuthToken(string loginName, string rawPassword, string sharedKey)
         {
+            if (sharedKey.Length < 12) throw Fault.BadArg(nameof(sharedKey), "be at least 12 characters");
             if (loginName  .IsBlank()) throw Fault.BlankText("Login Name");
             if (rawPassword.IsBlank()) throw Fault.BlankText("Password"  );
             if (sharedKey  .IsBlank()) throw Fault.BlankText("Shared Key");


Control constructor takes array angles[3] instead of cone/clock/flatspin

--- src/Controls.cs
+++ src/Controls.cs
@@ -323,7 +323,7 @@

 	// Constructor

-	public Control (Navigator navigator, Controls controls, float cone, float clock, float flatspin, float throttle, bool sailon, double duration, int iwarp, string frame) {
+	public Control (Navigator navigator, Controls controls, float [] angles, float throttle, bool sailon, double duration, int iwarp, string frame) {
 	    // Navigator
 	    this.navigator = navigator;
 	    // Parent controls object
@@ -331,12 +331,12 @@
 	    // Reference frame for control angles
 	    this.frame = Frame.Frames[frame];
 	    // Angles
-	    this.cone = cone;
-	    cone_str = cone.ToString();
-	    this.clock = clock;
-	    clock_str = clock.ToString();
-	    this.flatspin = flatspin;
-	    flatspin_str = flatspin.ToString();
+	    this.cone = angles[0];
+	    cone_str = angles[0].ToString();
+	    this.clock = angles[1];
+	    clock_str = angles[1].ToString();
+	    this.flatspin = angles[2];
+	    flatspin_str = angles[2].ToString();
 	    // Throttle
 	    throttle_str = throttle.ToString();
 	    this.throttle = throttle;
@@ -358,7 +358,7 @@

 	public static Control Default (Navigator navigator, Controls controls) {
 	    var frame = Frame.Frames[defaultFrame];
-	    return new Control(navigator, controls, frame.defaults[0], frame.defaults[1], frame.defaults[2], defaultThrottle, defaultSailon, defaultDuration, defaultiwarp, defaultFrame);
+	    return new Control(navigator, controls, frame.defaults, defaultThrottle, defaultSailon, defaultDuration, defaultiwarp, defaultFrame);
 	}
     }

@@ -442,11 +442,12 @@

 		// Populate controls
 		for(var i = 0; i < ncontrols; i++) {
+		    var angles = new float [] { Control.ParseSingle(coneStrings[i]),
+						Control.ParseSingle(clockStrings[i]),
+						Control.ParseSingle(flatspinStrings[i]) };
 		    controls.Add(new Control(navigator,
 					     this,
-					     Control.ParseSingle(coneStrings[i]),
-					     Control.ParseSingle(clockStrings[i]),
-					     Control.ParseSingle(flatspinStrings[i]),
+					     angles,
 					     Control.ParseSingle(throttleStrings[i]),
 					     Control.ParseBool(sailonStrings[i]),
 					     Control.ParseDouble(durationStrings[i]),


Edit comment

Edit comment

Edit comment

--- QueueDataGraphic/QueueDataGraphic/CSharpFiles/Debug.cs
+++ QueueDataGraphic/QueueDataGraphic/CSharpFiles/Debug.cs
@@ -14,9 +14,9 @@

 namespace QueueDataGraphic.CSharpFiles
 {                                                                               //	namespace start, 進入命名空間
-	class Debug                                                                 // Debug class, Debug類別
-	{                                                                           // Debug class start, 進入Debug類別
-		public readonly static Debug Instance = new Debug();                    // Debug class instance, 設計Debug存取介面
+	class Debug                                                                 //	Debug class, Debug類別
+	{                                                                           //	Debug class start, 進入Debug類別
+		public readonly static Debug Instance = new Debug();                    //	Debug class instance, 設計Debug存取介面

 		/// <summary>
 		/// DebugMode would be setted "true" during debugging.


Removed my own API key... Don't bother try it as I changed it.

--- WaniKaniApp/Program.cs
+++ WaniKaniApp/Program.cs
@@ -10,10 +10,12 @@
     {
         static void Main(string[] args)
         {
-            WaniKaniClient client = new WaniKaniClient("114023cc08517f6180a1f120bfffe87f");
+            Console.WriteLine("PLease enter your API key: ");
+            string apiKey = Console.ReadLine();
+
+            WaniKaniClient client = new WaniKaniClient(apiKey);

             var data2 = client.UserInformation;
-
             var data = client.Vocabulary();

             Console.WriteLine("Please a key to exit");


More TODO cleanup.

More TODO cleanup.

--- WeilerAtherton/Main.cs
+++ WeilerAtherton/Main.cs
@@ -74,8 +74,6 @@
             List<DeepPoint> deepShape = new List<DeepPoint>(Array.ConvertAll(shape, p => new DeepPoint(p, DeepPoint.PointType.Normal, p.InOrOut(clip))));
             List<DeepPoint> deepClip = new List<DeepPoint>(Array.ConvertAll(shape, p => new DeepPoint(p, DeepPoint.PointType.Normal, p.InOrOut(shape))));

-            //TODO: make a dictionary to get an intersection (DeepPoint) from two lines (4 DeepPoints) to ensure we don't get precision errors
-
             for (int i = 0; i < deepShape.Count; i++)
             {
                 DeepPoint p1 = deepShape[i];
@@ -89,7 +87,7 @@

                     if (Line.HasIntersection(p1, p2, c1, c2))
                     {
-                        //This ensures that we have the same intersection added to both
+                        //This ensures that we have the same intersection added to both (avoid precision errors)
                         DeepPoint intersection = new DeepPoint(Line.Intersection(p1, p2, c1, c2), DeepPoint.PointType.Intersection, DeepPoint.PointStatus.Undetermined);
                         p1.intersections.Add(intersection);
                         c1.intersections.Add(intersection);
@@ -116,7 +114,6 @@
                     else intersection.status = DeepPoint.PointStatus.In; //set inter as In
                 }
             }
-            //TODO: put above for loop into a method and run it with shape/clip reversed????

             //sort all intersections in clip
             for(int i = 0; i < deepClip.Count; i++)


Update AppDriver.cs

Update AppDriver.cs

--- source/WinCap.Driver/Drivers/AppDriver.cs
+++ source/WinCap.Driver/Drivers/AppDriver.cs
@@ -149,7 +149,7 @@
                     do
                     {
                         Thread.Sleep(100);
-                    } while (!settingsWindow.IsNull && !(bool)settingsWindow.Instance?.DataContext?.IsInitialized);
+                    } while (!(bool)settingsWindow.Instance?.DataContext?.IsInitialized);

                     return settingsWindow.Instance;
                 }


ouyaproj

ouyaproj

--- Android/Resources/Resource.designer.cs
+++ Android/Resources/Resource.designer.cs
@@ -2,7 +2,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.34014
+//     Runtime Version:4.0.30319.18444
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.


Update ITokenValidator.cs

Update ITokenValidator.cs


Removed sync. implementation

Removed sync. implementation

--- AngleSharp/Network/DefaultRequester.cs
+++ AngleSharp/Network/DefaultRequester.cs
@@ -83,17 +83,6 @@
         }

         /// <summary>
-        /// Performs a blocking http request with the given options.
-        /// </summary>
-        /// <param name="request">The options to consider.</param>
-        /// <returns>The response data.</returns>
-        public IResponse Request(IRequest request)
-        {
-            var cache = new RequestState(request, _headers);
-            return cache.Request();
-        }
-
-        /// <summary>
         /// Performs an asynchronous http request with the given options.
         /// </summary>
         /// <param name="request">The options to consider.</param>
@@ -141,20 +130,6 @@

                 foreach (var header in request.Headers)
                     AddHeader(header.Key, header.Value);
-            }
-
-            public IResponse Request()
-            {
-                if (_request.Method == HttpMethod.Post || _request.Method == HttpMethod.Put)
-                {
-                    _http.BeginGetRequestStream(SendRequest, _request);
-                    _completed.Task.Wait();
-                    _completed = new TaskCompletionSource<Boolean>();
-                }
-
-                _http.BeginGetResponse(ReceiveResponse, null);
-                _completed.Task.Wait();
-                return GetResponse();
             }

             public async Task<IResponse> RequestAsync(CancellationToken cancellationToken)


Added missing using.

Added missing using.

--- Arebis.Data.Entity/EntityExtensions.cs
+++ Arebis.Data.Entity/EntityExtensions.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data.Entity;
 using System.Data.Entity.Infrastructure;
+using System.Linq;

 namespace Arebis.Data.Entity
 {


Removed log

Removed log

--- Assets/BriLib/Scripts/Octree/Octree.cs
+++ Assets/BriLib/Scripts/Octree/Octree.cs
@@ -87,7 +87,6 @@
                 var point = new ThreeDimensionalPoint<T>(x, y, z, obj);
                 _children.Add(point);
                 _childMap.Add(obj, point);
-                UnityEngine.Debug.Log("Added child point x: " + x + ", y: " + y + ", z: " + z + " to bounds: " + _bounds);
             }
         }


update project to be compatible with unity 5.6. fix android compatability level to 16.

--- Assets/External/Zapdot/Editor/Build.cs
+++ Assets/External/Zapdot/Editor/Build.cs
@@ -83,7 +83,7 @@
         PlayerSettings.companyName = AppInfo.companyName;
         PlayerSettings.productName = AppInfo.longName;

-        PlayerSettings.bundleIdentifier = AppInfo.appleBundleId;
+        PlayerSettings.applicationIdentifier = AppInfo.appleBundleId;
         PlayerSettings.bundleVersion = AppInfo.fullVersion;

         List<string> buildScenes = new List<string>(scenes);
@@ -99,7 +99,7 @@
         if (target == BuildTarget.Android)
         {
             PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeRight;
-            PlayerSettings.Android.minSdkVersion = AndroidSdkVersions.AndroidApiLevel9;
+            PlayerSettings.Android.minSdkVersion = AndroidSdkVersions.AndroidApiLevel16;

             //PlayerSettings.Android.keystorePass = "";
             //PlayerSettings.Android.keyaliasName = "";


code cleanup

code cleanup

--- src/BBox3D.cs
+++ src/BBox3D.cs
@@ -34,15 +34,14 @@
     {

         public class BBox3D
-        {
-
+        {
             public bool IsEmpty { get { return Min == null; } }

             public Vector3D Min { get; private set; }
             public Vector3D Max { get; private set; }

             public BBox3D()
-            {
+            {
             }

             public BBox3D(IEnumerable<Vector3D> pts)


Fix v2 for BsRange for=

Fix v2 for BsRange for=

--- BootstrapForms/Html/RangeExtensions.cs
+++ BootstrapForms/Html/RangeExtensions.cs
@@ -136,7 +136,7 @@
             //render hidden for range
             object valRange = null;
             htmlAttributes = new Dictionary<string, object>();
-            htmlAttributes.MergeAttribute("data-for", name + ".TextValue");
+            htmlAttributes.MergeAttribute("data-for", fullName + ".TextValue");

             //From
             var fromName = fullName + ".From";


Broken link in C# guide

Broken link in C# guide

--- CSharp/Documentation/GettingStarted.cs
+++ CSharp/Documentation/GettingStarted.cs
@@ -102,7 +102,7 @@
     - Empty out the **MicrosoftAppPassword** field

 This will only work with the emulator running locally; in the cloud you would instead have to specify the appropriate URL and authentication values.
-For more about the emulator, read [here](en-us/tools/bot-framework-emulator).
+For more about the emulator, read [here](/en-us/tools/bot-framework-emulator).

 ![Configure the emulator with your locahost URL, AppId & AppPassword](/en-us/images/connector/connector-getstarted-configure-emulator.png)


update

update

--- CSharpGL/Scene/GUI/GLControl.Layout.cs
+++ CSharpGL/Scene/GUI/GLControl.Layout.cs
@@ -20,11 +20,38 @@
         //[Category(strGLControl)]
         //public GUIPadding Margin { get; set; }

+        private int x;
         /// <summary>
         /// 相对于Parent左下角的位置(Left Down location)
         /// </summary>
         [Category(strGLControl)]
-        public GUIPoint Location { get; set; }
+        [Description("相对于Parent左下角的位置(Left Down location)")]
+        public int X
+        {
+            get { return x; }
+            set { x = value; }
+        }
+        private int y;
+        /// <summary>
+        /// 相对于Parent左下角的位置(Left Down location)
+        /// </summary>
+        [Description("相对于Parent左下角的位置(Left Down location)")]
+        public int Y
+        {
+            get { return y; }
+            set { y = value; }
+        }
+
+        /// <summary>
+        /// 相对于Parent左下角的位置(Left Down location)
+        /// </summary>
+        [Category(strGLControl)]
+        [Description("相对于Parent左下角的位置(Left Down location)")]
+        public GUIPoint Location
+        {
+            get { return new GUIPoint(x, y); }
+            set { this.x = value.X; this.y = value.Y; }
+        }

         /// <summary>
         /// Stores width when <see cref="Anchor"/>.Left & <see cref="Anchor"/>.Right is <see cref="Anchor"/>.None.
@@ -62,9 +89,13 @@
         }

         /// <summary>
-        /// 上次更新之后，parent的Size属性值。
-        /// </summary>
-        private GUISize parentLastSize;
+        /// 上次更新之后，parent的Width属性值。
+        /// </summary>
+        private int parentLastWidth;
+        /// <summary>
+        /// 上次更新之后，parent的Height属性值。
+        /// </summary>
+        private int parentLastHeight;

         /// <summary>
         ///
@@ -132,13 +163,13 @@
             GLControl parent = this.Parent;
             if (parent != null)
             {
-                this.absLeft = parent.absLeft + this.Location.X;
-                this.absBottom = parent.absBottom + this.Location.Y;
-            }
-            else
-            {
-                this.absLeft = this.Location.X;
-                this.absBottom = this.Location.Y;
+                this.absLeft = parent.absLeft + this.x;
+                this.absBottom = parent.absBottom + this.y;
+            }
+            else
+            {
+                this.absLeft = this.x;
+                this.absBottom = this.y;
             }
         }

@@ -180,7 +211,8 @@

             if (parent != null)
             {
-                node.parentLastSize = parent.Size;
+                node.parentLastWidth = parent.width;
+                node.parentLastHeight = parent.height;
             }
         }

@@ -204,68 +236,68 @@
             int x, y, width, height;
             if ((currentNode.Anchor & leftRightAnchor) == leftRightAnchor)
             {
-                width = parent.width - currentNode.parentLastSize.Width + currentNode.width;
+                width = parent.width - currentNode.parentLastWidth + currentNode.width;
                 if (width < 0) { width = 0; }
             }
             else
             {
-                width = currentNode.Width;
+                width = currentNode.width;
             }

             if ((currentNode.Anchor & topBottomAnchor) == topBottomAnchor)
             {
-                height = parent.height - currentNode.parentLastSize.Height + currentNode.height;
+                height = parent.height - currentNode.parentLastHeight + currentNode.height;
                 if (height < 0) { height = 0; }
             }
             else
             {
-                height = currentNode.Height;
+                height = currentNode.height;
             }

             if ((currentNode.Anchor & leftRightAnchor) == GUIAnchorStyles.None)
             {
-                int diff = parent.width - currentNode.parentLastSize.Width;
-                x = currentNode.Location.X + diff / 2;
+                int diff = parent.width - currentNode.parentLastWidth;
+                x = currentNode.x + diff / 2;
             }
             else if ((currentNode.Anchor & leftRightAnchor) == GUIAnchorStyles.Left)
             {
-                x = currentNode.Location.X;
+                x = currentNode.x;
             }
             else if ((currentNode.Anchor & leftRightAnchor) == GUIAnchorStyles.Right)
             {
-                int diff = parent.width - currentNode.parentLastSize.Width;
-                x = currentNode.Location.X + diff;
+                int diff = parent.width - currentNode.parentLastWidth;
+                x = currentNode.x + diff;
             }
             else if ((currentNode.Anchor & leftRightAnchor) == leftRightAnchor)
             {
-                x = currentNode.Location.X;
+                x = currentNode.x;
             }
             else
             { throw new Exception(string.Format("Not expected Anchor:[{0}]!", currentNode.Anchor)); }

             if ((currentNode.Anchor & topBottomAnchor) == GUIAnchorStyles.None)
             {
-                int diff = parent.height - currentNode.parentLastSize.Height;
-                y = currentNode.Location.Y + diff / 2;
+                int diff = parent.height - currentNode.parentLastHeight;
+                y = currentNode.y + diff / 2;
             }
             else if ((currentNode.Anchor & topBottomAnchor) == GUIAnchorStyles.Bottom)
             {
-                y = currentNode.Location.Y;
+                y = currentNode.y;
             }
             else if ((currentNode.Anchor & topBottomAnchor) == GUIAnchorStyles.Top)
             {
-                int diff = parent.height - currentNode.parentLastSize.Height;
-                y = currentNode.Location.Y + diff;
+                int diff = parent.height - currentNode.parentLastHeight;
+                y = currentNode.y + diff;
             }
             else if ((currentNode.Anchor & topBottomAnchor) == topBottomAnchor)
             {
-                y = currentNode.Location.Y;
+                y = currentNode.y;
             }
             else
             { throw new Exception(string.Format("Not expected Anchor:[{0}]!", currentNode.Anchor)); }

-            currentNode.Location = new GUIPoint(x, y);
-            currentNode.Size = new GUISize(width, height);
+            currentNode.x = x; currentNode.y = y;
+            currentNode.width = width; currentNode.height = height;
         }
     }


fix parsing error after a function call

fix parsing error after a function call

--- CobaltAHK/Parser.cs
+++ CobaltAHK/Parser.cs
@@ -213,6 +213,7 @@
 			AssertToken(lexer.PeekToken(), Token.OpenParenthesis);
 			var parameters = ParseExpressionList(lexer);

+			var beforeToken = lexer.Position;
 			bool newline = SkipNewline(lexer);
 			var token = lexer.PeekToken();

@@ -233,6 +234,8 @@

 				} else {
 					result = funcExpr;
+					lexer.Rewind(beforeToken);
+					lexer.ResetToken();
 				}
 			}


Test that StyleCop is working on CI.

Test that StyleCop is working on CI.

--- Code/QStore/QSet.cs
+++ Code/QStore/QSet.cs
@@ -13,7 +13,7 @@

         private int[] lowerTransitionIndexes;

-        private int start;
+        private int Start;

         // TODO: think of serialization.
         private IComparer<T> symbolComparer;
@@ -71,7 +71,7 @@
             {
                 symbolComparer = comparer,
                 alphabet = alphabet,
-                start = 0,
+                Start = 0,
                 lowerTransitionIndexes = new int[transitions.Count],
                 transitions = new SequenceSetTransition[transitions.Sum(s => s.Count)]
             };
@@ -111,7 +111,7 @@

         public IEnumerator<IEnumerable<T>> GetEnumerator()
         {
-            return this.Enumerate(this.start).GetEnumerator();
+            return this.Enumerate(this.Start).GetEnumerator();
         }

         IEnumerator IEnumerable.GetEnumerator()


Ignore RtMidi tests where tests fail due to known reason.

--- Commons.Music.Midi.Tests/RtMidiTest.cs
+++ Commons.Music.Midi.Tests/RtMidiTest.cs
@@ -10,6 +10,7 @@
 	public class RtMidiTest
 	{
 		[Test]
+		[Ignore ("https://github.com/atsushieno/managed-midi/issues/1")]
 		public void RawDeviceCount ()
 		{
 			var input = new RtMidiInputDevice ();
@@ -25,6 +26,7 @@
 		}

 		[Test]
+		[Ignore ("https://github.com/atsushieno/managed-midi/issues/1")]
 		public void DeviceDetails ()
 		{
 			var a = new RtMidiAccess ();


tweaks to the log format

tweaks to the log format

filter out TaskCancelledExceptions

--- CompatBot/Config.cs
+++ CompatBot/Config.cs
@@ -6,6 +6,7 @@
 using System.Threading;
 using DSharpPlus.Entities;
 using NLog;
+using NLog.Filters;
 using NLog.Targets;
 using NLog.Targets.Wrappers;

@@ -155,7 +156,9 @@
                 ConcurrentWrites = false,
                 AutoFlush = false,
                 OpenFileFlushTimeout = 1,
-                Layout = "${longdate} ${sequenceid} ${level:uppercase=true} ${message} ${onexception:${newline}${exception:format=tostring}}",
+                Layout = "${longdate} ${sequenceid:padding=6} ${level:uppercase=true:padding=-5} ${message} ${onexception:" +
+                            "${newline}${exception:format=ToString}" +
+                            ":when=not contains('${exception:format=ShortType}','TaskCanceledException')}",
             };
             var asyncFileTarget = new AsyncTargetWrapper(fileTarget)
             {
@@ -163,13 +166,21 @@
                 OverflowAction = AsyncTargetWrapperOverflowAction.Block,
                 BatchSize = 500,
             };
-            var logTarget = new ColoredConsoleTarget("logconsole");
+            var logTarget = new ColoredConsoleTarget("logconsole") {
+                Layout = "${longdate} ${level:uppercase=true:padding=-5} ${message} ${onexception:" +
+                            "${newline}${exception:format=Message}" +
+                            ":when=not contains('${exception:format=ShortType}','TaskCanceledException')}",
+            };
 #if DEBUG
             config.AddRule(LogLevel.Trace, LogLevel.Fatal, logTarget, "default"); // only echo messages from default logger to the console
 #else
             config.AddRule(LogLevel.Info, LogLevel.Fatal, logTarget, "default");
 #endif
             config.AddRule(LogLevel.Debug, LogLevel.Fatal, asyncFileTarget);
+
+            var filter = new ConditionBasedFilter { Condition = "contains('${message}','TaskCanceledException')", Action = FilterResult.Ignore, };
+            foreach (var rule in config.LoggingRules)
+                rule.Filters.Add(filter);
             LogManager.Configuration = config;
             return LogManager.GetLogger("default");
         }


Update CardServiceTest.cs

Update CardServiceTest.cs

--- OpenpayTest/CardServiceTest.cs
+++ OpenpayTest/CardServiceTest.cs
@@ -17,7 +17,7 @@
             card.HolderName = "Juanito Pérez Nuñez";
             card.Cvv2 = "123";
             card.ExpirationMonth = "01";
-            card.ExpirationYear = "14";
+            card.ExpirationYear = "15";

             OpenpayAPI openpayAPI = new OpenpayAPI(Constants.API_KEY, Constants.MERCHANT_ID);

@@ -37,7 +37,7 @@
             card.HolderName = "Juanito Pérez Nuñez";
             card.Cvv2 = "123";
             card.ExpirationMonth = "01";
-            card.ExpirationYear = "14";
+            card.ExpirationYear = "15";

             OpenpayAPI openpayAPI = new OpenpayAPI(Constants.API_KEY, Constants.MERCHANT_ID);


Re-add mp3 support in sound notifications

--- Core/Notification/SoundNotification.cs
+++ Core/Notification/SoundNotification.cs
@@ -8,7 +8,7 @@

 namespace TweetDuck.Core.Notification{
     static class SoundNotification{
-        public const string SupportedFormats = "*.wav;*.ogg;*.flac;*.opus;*.weba;*.webm"; // TODO add mp3 when supported
+        public const string SupportedFormats = "*.wav;*.ogg;*.mp3;*.flac;*.opus;*.weba;*.webm";

         public static IResourceHandler CreateFileHandler(string path){
             string mimeType;
@@ -18,36 +18,33 @@
                 case ".webm": mimeType = "audio/webm"; break;
                 case ".wav": mimeType = "audio/wav"; break;
                 case ".ogg": mimeType = "audio/ogg"; break;
+                case ".mp3": mimeType = "audio/mp3"; break;
                 case ".flac": mimeType = "audio/flac"; break;
                 case ".opus": mimeType = "audio/ogg; codecs=opus"; break;
-                case ".mp3": TryShowError("MP3 sound notifications are temporarily unsupported, please convert the file to another format, such as .ogg, .wav, or .flac."); return null;
                 default: mimeType = null; break;
             }

             try{
                 return ResourceHandler.FromFilePath(path, mimeType);
             }catch{
-                TryShowError("Could not find custom notification sound file:\n"+path);
+                FormBrowser browser = FormManager.TryFind<FormBrowser>();
+
+                browser?.InvokeAsyncSafe(() => {
+                    using(FormMessage form = new FormMessage("Sound Notification Error", "Could not find custom notification sound file:\n"+path, MessageBoxIcon.Error)){
+                        form.AddButton(FormMessage.Ignore, ControlType.Cancel | ControlType.Focused);
+
+                        Button btnViewOptions = form.AddButton("View Options");
+                        btnViewOptions.Width += 16;
+                        btnViewOptions.Location = new Point(btnViewOptions.Location.X-16, btnViewOptions.Location.Y);
+
+                        if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnViewOptions){
+                            browser.OpenSettings(typeof(TabSettingsSounds));
+                        }
+                    }
+                });
+
                 return null;
             }
         }
-
-        private static void TryShowError(string message){
-            FormBrowser browser = FormManager.TryFind<FormBrowser>();
-
-            browser?.InvokeAsyncSafe(() => {
-                using(FormMessage form = new FormMessage("Sound Notification Error", message, MessageBoxIcon.Error)){
-                    form.AddButton(FormMessage.Ignore, ControlType.Cancel | ControlType.Focused);
-
-                    Button btnViewOptions = form.AddButton("View Options");
-                    btnViewOptions.Width += 16;
-                    btnViewOptions.Location = new Point(btnViewOptions.Location.X-16, btnViewOptions.Location.Y);
-
-                    if (form.ShowDialog() == DialogResult.OK && form.ClickedButton == btnViewOptions){
-                        browser.OpenSettings(typeof(TabSettingsSounds));
-                    }
-                }
-            });
-        }
     }
 }


Cleanup code in TweetNotification

Cleanup code in TweetNotification

--- Core/Notification/TweetNotification.cs
+++ Core/Notification/TweetNotification.cs
@@ -51,24 +51,22 @@
             TopLeft, TopRight, BottomLeft, BottomRight, Custom
         }

-        public string Column => column;
-        public string TweetUrl => tweetUrl;
-        public string QuoteUrl => quoteUrl;
-
-        private readonly string column;
+        public string Column { get; }
+        public string TweetUrl { get; }
+        public string QuoteUrl { get; }
+
         private readonly string html;
         private readonly int characters;
-        private readonly string tweetUrl;
-        private readonly string quoteUrl;
         private readonly bool isExample;

         public TweetNotification(string column, string html, int characters, string tweetUrl, string quoteUrl) : this(column, html, characters, tweetUrl, quoteUrl, false){}

         private TweetNotification(string column, string html, int characters, string tweetUrl, string quoteUrl, bool isExample){
-            this.column = column;
+            this.Column = column;
+            this.TweetUrl = tweetUrl;
+            this.QuoteUrl = quoteUrl;
+
             this.html = html;
-            this.tweetUrl = tweetUrl;
-            this.quoteUrl = quoteUrl;
             this.characters = characters;
             this.isExample = isExample;
         }


Fixing bug #134634: XLIM Proof PDF>Attached TIFF Asset produced with wrong color.

--- ConverterService.cs
+++ ConverterService.cs
@@ -217,7 +217,7 @@
 					// 96 means that windows might have failed reading the original resolution so we don't change it
 					if (bitmap.HorizontalResolution == 96 && bitmap.VerticalResolution == 96)
 						return false;
-					if (bitmap.HorizontalResolution < 72 || bitmap.VerticalResolution < 72)
+					if (bitmap.HorizontalResolution <= 72 || bitmap.VerticalResolution <= 72)
 						return false;
 					using (Bitmap smallBitmap = new Bitmap(bitmap, new Size((int)(bitmap.Width / (bitmap.HorizontalResolution / targetResolution)), (int)(bitmap.Height / (bitmap.VerticalResolution / targetResolution)))))
 					{


BREAKING CHANGE: Fixed return value of TrackPopupMenuEx so command identifiers could be returned.

--- PInvoke/User32/WinUser.Menu.cs
+++ PInvoke/User32/WinUser.Menu.cs
@@ -3293,8 +3293,7 @@
 		// uFlags, int x, int y, HWND hwnd, LPTPMPARAMS lptpm );
 		[DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)]
 		[PInvokeData("winuser.h", MSDNShortId = "trackpopupmenuex.htm")]
-		[return: MarshalAs(UnmanagedType.Bool)]
-		public static extern bool TrackPopupMenuEx(HMENU hMenu, TrackPopupMenuFlags uFlags, int x, int y, HWND hwnd, [In, Optional] TPMPARAMS lptpm);
+		public static extern uint TrackPopupMenuEx(HMENU hMenu, TrackPopupMenuFlags uFlags, int x, int y, HWND hwnd, [In, Optional] TPMPARAMS lptpm);

 		/// <summary>
 		/// <para>Contains information about the menu to be activated.</para>


refs #400: convert to docx with compatibility mode 2007

--- Doc2Docx/Program.cs
+++ Doc2Docx/Program.cs
@@ -74,7 +74,7 @@
                     Console.WriteLine("Converting document '{0}' to DOCX.", file);

                     document.Convert();
-                    document.SaveAs(newfilename, fileformat);
+                    document.SaveAs2(newfilename, fileformat, CompatibilityMode: Word.WdCompatibilityMode.wdWord2007);
                     document.Close();
                     document = null;


Added a method to perform an HTTP GET

Added a method to perform an HTTP GET

--- ESH/Utility/Http.cs
+++ ESH/Utility/Http.cs
@@ -44,6 +44,38 @@
         }

         /// <summary>
+        /// Perofrms an HTTP GET and returns the results
+        /// </summary>
+        /// <param name="uri">URI to post to</param>
+        /// <param name="userAgent">User agent string</param>
+        /// <returns>HttpResponse object containing the results of the web request</returns>
+        public static async Task<HttpResponse> DoHttpGetAsync(Uri uri, string userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36")
+        {
+            var result = new HttpResponse();
+
+            using (var client = new HttpClient())
+            {
+                using (var request = new HttpRequestMessage(HttpMethod.Get, uri))
+                {
+                    request.Headers.ExpectContinue = false;
+                    request.Headers.Add("cache-control", "max-age=0");
+                    request.Headers.Add("user-agent", userAgent);
+                    using (HttpResponseMessage response = await client.SendAsync(request))
+                    {
+                        //Console.WriteLine("Response Code: " + ((int)response.StatusCode).ToString() + " " + response.StatusCode.ToString());
+
+                        result.Content = await response.Content.ReadAsStringAsync();
+                        result.StatusCode = response.StatusCode;
+                    }
+                }
+            }
+
+            return result;
+
+        }
+
+
+        /// <summary>
         /// Perofrms an HTTP Post and returns the results
         /// </summary>
         /// <param name="uri">URI to post to</param>
@@ -55,26 +87,28 @@
             var result = new HttpResponse();

             var formContent = new FormUrlEncodedContent(postVars);
-            var client = new HttpClient();
+            using (var client = new HttpClient())
+            {
+                using (var request = new HttpRequestMessage(HttpMethod.Post, uri))
+                {
+                    request.Content = formContent;
+                    request.Headers.ExpectContinue = false;
+                    request.Headers.Add("cache-control", "max-age=0");
+                    request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
+                    request.Headers.Add("user-agent", userAgent);
+                    using (HttpResponseMessage response = await client.SendAsync(request))
+                    {
+                        //Console.WriteLine("Response Code: " + ((int)response.StatusCode).ToString() + " " + response.StatusCode.ToString());

-            using (var request = new HttpRequestMessage(HttpMethod.Post, uri))
-            {
-                request.Content = formContent;
-                request.Headers.ExpectContinue = false;
-                request.Headers.Add("cache-control", "max-age=0");
-                request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
-                request.Headers.Add("user-agent", userAgent);
-                using (HttpResponseMessage response = await client.SendAsync(request))
-                {
-                    //Console.WriteLine("Response Code: " + ((int)response.StatusCode).ToString() + " " + response.StatusCode.ToString());
-
-                    result.Content = await response.Content.ReadAsStringAsync();
-                    result.StatusCode = response.StatusCode;
+                        result.Content = await response.Content.ReadAsStringAsync();
+                        result.StatusCode = response.StatusCode;
+                    }
                 }
             }

             return result;

         }
+
     }
 }


Handle line addition to empty TextLines object

--- Engine/TextLines.cs
+++ Engine/TextLines.cs
@@ -159,9 +159,19 @@
         /// </summary>
         public void Insert(int index, string item)
         {
-            ValidateIndex(index);
             ThrowIfNull(item, nameof(item));
-            SetLastAccessed(index, lines.AddBefore(GetNodeAt(index), item));
+            LinkedListNode<string> itemInserted;
+            if (Count == 0 && index == 0)
+            {
+                itemInserted = lines.AddFirst(item);
+            }
+            else
+            {
+                ValidateIndex(index);
+                itemInserted = lines.AddBefore(GetNodeAt(index), item);
+            }
+
+            SetLastAccessed(index, itemInserted);
             Count++;
         }


Refactor individual object loading to prepare for object graphs.

--- src/Loader.cs
+++ src/Loader.cs
@@ -2,6 +2,7 @@
 using System.Reflection;
 using System.IO;
 using System.Collections.Generic;
+using System.Linq;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;

@@ -20,28 +21,31 @@
                         var filename = fixtureName + ".json";
                         var path = Path.Combine(_basePath, filename);

-                        dynamic fixture;
-                        var mappedList = new List<T>();
-
+                        IList<T> mappedList = new List<T>();
                         using (var reader = new StreamReader(path))
                         {
                                 var buffer = reader.ReadToEnd();
-                                fixture = JsonConvert.DeserializeObject(buffer);
-
-                                foreach (var obj in fixture)
+                                dynamic fixtures = JsonConvert.DeserializeObject(buffer);
+                                foreach (var obj in fixtures)
                                 {
-                                        var mapped = new T();
-
-                                        foreach (var prop in obj)
-                                        {
-                                                SetProperty(prop, mapped);
-                                        }
-
-                                        mappedList.Add(mapped);
+                                        mappedList.Add(LoadObject<T>(obj));
                                 }
                         }

                         return mappedList;
+                }
+
+                private T LoadObject<T>(JObject raw) where T : new()
+                {
+                        var mapped = new T();
+
+                        foreach (var prop in raw.Properties())
+                        {
+                                SetProperty(prop, mapped);
+                        }
+
+                        return mapped;
+
                 }

                 protected void SetProperty<T>(JProperty source, T dest)


Fixed RemoveGraphElement Method

Fixed RemoveGraphElement Method

--- Fallen-8/Fallen8.cs
+++ Fallen-8/Fallen8.cs
@@ -284,7 +284,7 @@
                 AGraphElement graphElement;

                 var success = _graphElements.TryGetElementOrDefault(out graphElement, graphElementId) && graphElement.TryRemoveProperty(propertyId);
-
+
                 FinishWriteResource();

                 return success;
@@ -325,18 +325,21 @@
                         #region out edges

                         var outgoingEdgeConatiner = vertex.GetOutgoingEdges();
-                        for (var i = 0; i < outgoingEdgeConatiner.Count; i++)
+                        if (outgoingEdgeConatiner != null)
                         {
-                            var aOutEdgeContainer = outgoingEdgeConatiner[i];
-                            for (var j = 0; j < aOutEdgeContainer.Edges.Count; j++)
+                            for (var i = 0; i < outgoingEdgeConatiner.Count; i++)
                             {
-                                var aOutEdge = aOutEdgeContainer.Edges[j];
-
-                                //remove from incoming edges of target vertex
-                                aOutEdge.TargetVertex.RemoveIncomingEdge(aOutEdgeContainer.EdgePropertyId, aOutEdge);
-
-                                //remove the edge itself
-                                _graphElements.SetDefault(aOutEdge.Id);
+                                var aOutEdgeContainer = outgoingEdgeConatiner[i];
+                                for (var j = 0; j < aOutEdgeContainer.Edges.Count; j++)
+                                {
+                                    var aOutEdge = aOutEdgeContainer.Edges[j];
+
+                                    //remove from incoming edges of target vertex
+                                    aOutEdge.TargetVertex.RemoveIncomingEdge(aOutEdgeContainer.EdgePropertyId, aOutEdge);
+
+                                    //remove the edge itself
+                                    _graphElements.SetDefault(aOutEdge.Id);
+                                }
                             }
                         }

@@ -345,19 +348,21 @@
                         #region in edges

                         var incomingEdgeContainer = vertex.GetIncomingEdges();
-
-                        for (var i = 0; i < incomingEdgeContainer.Count; i++)
+                        if (incomingEdgeContainer != null)
                         {
-                            var aInEdgeContainer = incomingEdgeContainer[i];
-                            for (var j = 0; j < aInEdgeContainer.Edges.Count; j++)
+                            for (var i = 0; i < incomingEdgeContainer.Count; i++)
                             {
-                                var aInEdge = aInEdgeContainer.Edges[j];
-
-                                //remove from outgoing edges of source vertex
-                                aInEdge.SourceVertex.RemoveOutGoingEdge(aInEdgeContainer.EdgePropertyId, aInEdge);
-
-                                //remove the edge itself
-                                _graphElements.SetDefault(aInEdge.Id);
+                                var aInEdgeContainer = incomingEdgeContainer[i];
+                                for (var j = 0; j < aInEdgeContainer.Edges.Count; j++)
+                                {
+                                    var aInEdge = aInEdgeContainer.Edges[j];
+
+                                    //remove from outgoing edges of source vertex
+                                    aInEdge.SourceVertex.RemoveOutGoingEdge(aInEdgeContainer.EdgePropertyId, aInEdge);
+
+                                    //remove the edge itself
+                                    _graphElements.SetDefault(aInEdge.Id);
+                                }
                             }
                         }

@@ -403,18 +408,21 @@
                         #region out edges

                         var outgoingEdgeConatiner = vertex.GetOutgoingEdges();
-                        for (var i = 0; i < outgoingEdgeConatiner.Count; i++)
+                        if (outgoingEdgeConatiner != null)
                         {
-                            var aOutEdgeContainer = outgoingEdgeConatiner[i];
-                            for (var j = 0; j < aOutEdgeContainer.Edges.Count; j++)
+                            for (var i = 0; i < outgoingEdgeConatiner.Count; i++)
                             {
-                                var aOutEdge = aOutEdgeContainer.Edges[j];
-
-                                //remove from incoming edges of target vertex
-                                aOutEdge.TargetVertex.AddIncomingEdge(aOutEdgeContainer.EdgePropertyId, aOutEdge);
-
-                                //reset the edge
-                                _graphElements.SetValue(aOutEdge.Id, aOutEdge);
+                                var aOutEdgeContainer = outgoingEdgeConatiner[i];
+                                for (var j = 0; j < aOutEdgeContainer.Edges.Count; j++)
+                                {
+                                    var aOutEdge = aOutEdgeContainer.Edges[j];
+
+                                    //remove from incoming edges of target vertex
+                                    aOutEdge.TargetVertex.AddIncomingEdge(aOutEdgeContainer.EdgePropertyId, aOutEdge);
+
+                                    //reset the edge
+                                    _graphElements.SetValue(aOutEdge.Id, aOutEdge);
+                                }
                             }
                         }

@@ -423,19 +431,21 @@
                         #region in edges

                         var incomingEdgeContainer = vertex.GetIncomingEdges();
-
-                        for (var i = 0; i < incomingEdgeContainer.Count; i++)
+                        if (incomingEdgeContainer != null)
                         {
-                            var aInEdgeContainer = incomingEdgeContainer[i];
-                            for (var j = 0; j < aInEdgeContainer.Edges.Count; j++)
+                            for (var i = 0; i < incomingEdgeContainer.Count; i++)
                             {
-                                var aInEdge = aInEdgeContainer.Edges[j];
-
-                                //remove from outgoing edges of source vertex
-                                aInEdge.SourceVertex.AddOutEdge(aInEdgeContainer.EdgePropertyId, aInEdge);
-
-                                //reset the edge
-                                _graphElements.SetValue(aInEdge.Id, aInEdge);
+                                var aInEdgeContainer = incomingEdgeContainer[i];
+                                for (var j = 0; j < aInEdgeContainer.Edges.Count; j++)
+                                {
+                                    var aInEdge = aInEdgeContainer.Edges[j];
+
+                                    //remove from outgoing edges of source vertex
+                                    aInEdge.SourceVertex.AddOutEdge(aInEdgeContainer.EdgePropertyId, aInEdge);
+
+                                    //reset the edge
+                                    _graphElements.SetValue(aInEdge.Id, aInEdge);
+                                }
                             }
                         }


Increase number of MRU files to 10.

Increase number of MRU files to 10.

--- PackageViewModel/MruManager.cs
+++ PackageViewModel/MruManager.cs
@@ -10,7 +10,7 @@

     [Export(typeof(IMruManager))]
     internal class MruManager : IMruManager {
-        private const int MaxFile = 7;
+        private const int MaxFile = 10;
         private readonly ObservableCollection<MruItem> _files;
         private readonly ISettingsManager _settingsManager;


Fixed the wander countdown bug

Fixed the wander countdown bug

--- LowLevel/Movement/SteeringBehaviors/Wander.cs
+++ LowLevel/Movement/SteeringBehaviors/Wander.cs
@@ -27,6 +27,7 @@

         float minCountdownTime = 1.0f;
         float maxCountdownTime = 2.0f;
+		float countdown = 0.0f;
         float maxDeviation = 0.2f;
         float wanderAngle = 0.0f;
 		PointActor target;
@@ -79,8 +80,12 @@
         public override Steering Update(SteeringManager manager, Actor actor,
 			float dt)
         {
-            float angle = Random.Range(-maxDeviation, maxDeviation);
-            wanderAngle += angle;
+			countdown -= dt;
+			if(countdown <= 0f) {
+				countdown = Random.Range(minCountdownTime, maxCountdownTime);
+            	float angle = Random.Range(-maxDeviation, maxDeviation);
+            	wanderAngle += angle;
+			}
             int radius = 200;
             Vector3 currPos = actor.Position;
             float x = currPos.x + radius * Mathf.Cos(wanderAngle);


Updated post destroy method and comp properties get

--- DLL_Project/ThingComps/CompHideItem.cs
+++ DLL_Project/ThingComps/CompHideItem.cs
@@ -23,7 +23,7 @@
             {
                 if( _Properties == null )
                 {
-                    _Properties = parent.def.GetCompProperties( typeof( CompHideItem ) ) as CompProperties_HideItem;
+                    _Properties = parent.def.GetCompProperties<CompProperties_HideItem>();
                 }
                 return _Properties;
             }
@@ -36,9 +36,9 @@
             HideItemManager.RegisterBuilding( parent );
         }

-        public override void                PostDestroy( DestroyMode mode = DestroyMode.Vanish )
+        public override void                PostDestroy( DestroyMode mode, bool wasSpawned )
         {
-            base.PostDestroy( mode );
+            base.PostDestroy( mode, wasSpawned );
             if( knownItems.NullOrEmpty() )
             {
                 return;


Extracted interface from Tracingmanager

Extracted interface from Tracingmanager

--- DatadogSharp/Tracing/TracingManager.cs
+++ DatadogSharp/Tracing/TracingManager.cs
@@ -5,9 +5,42 @@

 namespace DatadogSharp.Tracing
 {
-    public class TracingManager
+    public interface ITracingManager
     {
-        public static TracingManager Default = new TracingManager();
+        /// <summary>
+        /// Begin the root tracing, when TracingScope.Dispose, finish measurement and enqueue to send worker.
+        /// </summary>
+        /// <param name="name">The span name.</param>
+        /// <param name="resource">The resource you are tracing such as "/Home/Index", "/Article/Post".</param>
+        /// <param name="service">The service name such as "webservice", "batch", "mysql", "redis".</param>
+        /// <param name="type">The type of request such as "web", "db", "cache".</param>
+        TracingScope BeginTracing(string name, string resource, string service, string type);
+
+        /// <summary>
+        /// Begin the root tracing, when TracingScope.Dispose, finish measurement and enqueue to send worker.
+        /// When use distributed monitoring, set traceId and parentId from other machine.
+        /// </summary>
+        /// <param name="name">The span name.</param>
+        /// <param name="resource">The resource you are tracing such as "/Home/Index", "/Article/Post".</param>
+        /// <param name="service">The service name such as "webservice", "batch", "mysql", "redis".</param>
+        /// <param name="type">The type of request such as "web", "db", "cache".</param>
+        /// <param name="traceId">TraceId from other machine.</param>
+        /// <param name="parentId">ParentId of tracing.</param>
+        TracingScope BeginTracing(string name, string resource, string service, string type, ulong traceId, ulong parentId);
+
+        void EnqueueToWorker(Span[] tracing);
+        void SetBufferingParameter(int bufferingCount, int bufferingTimeMilliseconds);
+        void SetExceptionLogger(Action<Exception> logger);
+
+        /// <summary>
+        /// Finish worker, flush all traces and wait complete.
+        /// </summary>
+        void Complete(TimeSpan waitTimeout);
+    }
+
+    public class TracingManager : ITracingManager
+    {
+        public static ITracingManager Default = new TracingManager();
         internal AsyncQueueWorker worker;

         public TracingManager()


Loop group ids

Loop group ids

--- Desktop/Tempest.Social/GroupManager.cs
+++ Desktop/Tempest.Social/GroupManager.cs
@@ -28,6 +28,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;

 namespace Tempest.Social
@@ -42,7 +43,7 @@
 				throw new ArgumentNullException ("person");

 			while (this.groups.ContainsKey (this.nextId))
-				this.nextId++;
+				Interlocked.Increment (ref this.nextId);

 			var group = new Group (this.nextId, new[] { person.Identity });
 			this.groups.Add (group.Id, group);


Cleaned-up unused imports.

Cleaned-up unused imports.

--- ModernApp4Me.Core/App/M4MExceptionHandlers.cs
+++ ModernApp4Me.Core/App/M4MExceptionHandlers.cs
@@ -15,7 +15,6 @@

 using System;
 using ModernApp4Me.Core.LifeCycle;
-using ModernApp4Me.Core.Log;

 namespace ModernApp4Me.Core.App
 {


fixes whitespaces

fixes whitespaces

--- Droid/Views/FirstView.cs
+++ Droid/Views/FirstView.cs
@@ -9,13 +9,13 @@

 namespace backstack.Droid.Views
 {
-    [Activity(Label = "View for FirstViewModel")]
-    public class FirstView : MvxActivity
-    {
-        protected override void OnCreate(Bundle bundle)
-        {
-            base.OnCreate(bundle);
-            SetContentView(Resource.Layout.FirstView);
+	[Activity (Label = "View for FirstViewModel")]
+	public class FirstView : MvxActivity
+	{
+		protected override void OnCreate (Bundle bundle)
+		{
+			base.OnCreate (bundle);
+			SetContentView (Resource.Layout.FirstView);

 			var intentDeep = new Intent (this, typeof(DeepView));
 			SetMvxParams (intentDeep, typeof(DeepViewModel), "message", "FROM INTENT");
@@ -36,8 +36,8 @@
 				.SetContentIntent (pendingIntent);

 			var notificationManager = (NotificationManager)GetSystemService (NotificationService);
-			notificationManager.Notify (0, builder.Build());
-        }
+			notificationManager.Notify (0, builder.Build ());
+		}

 		static void SetMvxParams (Intent intent, Type viewModelType, string key, string value)
 		{
@@ -52,5 +52,5 @@
 			intent.SetAction (string.Empty);
 			intent.PutExtra (extrasKey, requestText);
 		}
-    }
+	}
 }


Use TimeSpan.Zero instead of TimeSpan.MaxValue as default ConnectionLifetime.

--- MongoDBDriver/MongoConnectionStringBuilder.cs
+++ MongoDBDriver/MongoConnectionStringBuilder.cs
@@ -10,7 +10,7 @@
     {
         public const int DefaultMaximumPoolSize = 100;
         public const int DefaultMinimumPoolSize = 0;
-        public static readonly TimeSpan DefaultConnectionLifeTime = TimeSpan.MaxValue;
+        public static readonly TimeSpan DefaultConnectionLifeTime = TimeSpan.Zero;

         private static readonly Regex PairRegex = new Regex(@"^\s*(.*)\s*=\s*(.*)\s*$");
         private static readonly Regex ServerRegex = new Regex(@"\s*([^:]+)(?::(\d+))?\s*$");
@@ -25,7 +25,7 @@
         /// </summary>
         public MongoConnectionStringBuilder()
         {
-            ConnectionLifetime = TimeSpan.MaxValue;
+            ConnectionLifetime = DefaultConnectionLifeTime;
             MaximumPoolSize = DefaultMaximumPoolSize;
             MinimumPoolSize = DefaultMinimumPoolSize;
         }
@@ -148,7 +148,9 @@
                     {
                         try
                         {
-                            ConnectionLifetime = TimeSpan.FromSeconds(int.Parse(value));
+                            var seconds = int.Parse(value);
+
+                            ConnectionLifetime = seconds>0 ? TimeSpan.FromSeconds(seconds) : DefaultConnectionLifeTime;
                         }
                         catch(FormatException exception)
                         {


Added colorized Theater Count pill to old page.

--- MoviePicker.WebApp/Views/Home/IndexOld.cshtml
+++ MoviePicker.WebApp/Views/Home/IndexOld.cshtml
@@ -254,7 +254,14 @@

 							@foreach (var movie in Model.Miners.First().Movies)
 							{
+								var lastWeek = Model.Miners.Last().Movies?.FirstOrDefault(item => item.Name == movie.Name);
 								int minerCount = 0;
+								decimal theaterCountPercent = 0;
+
+								if (lastWeek != null && movie.TheaterCount > 0)
+								{
+									theaterCountPercent = (movie.TheaterCount - lastWeek.TheaterCount) / movie.TheaterCount;
+								}

@@ -264,13 +271,12 @@
 									-->

-
+

-
@movie.Cost BUX

@movie.Name

 										@if (1 <= movieCount && movieCount <= 15)
@@ -283,16 +289,23 @@

 											<input name="@name"
-											class="form-control"
-											id="@id"
-											style="background-color: lightcyan; width: 100px;"
-											type="text"
-											value="@value"
-											data-val-required="The Box Office @movieCount field is required."
-											data-val-number="The field Box Office @movieCount must be a number."
-											data-val="true">
-										}
-
+												   class="form-control"
+												   id="@id"
+												   style="background-color: lightcyan; width: 100px;"
+												   type="text"
+												   value="@value"
+												   data-val-required="The Box Office @movieCount field is required."
+												   data-val-number="The field Box Office @movieCount must be a number."
+												   data-val="true">
+										}
+
+
@movie.Cost BUX

+
+											@movie.TheaterCount
+

@@ -300,7 +313,6 @@
 										@foreach (var miner in Model.Miners.Skip(2))
 										{
 											var minerMovie = miner.Movies.FirstOrDefault(item => item.Name == movie.Name);
-											var lastWeek = Model.Miners.Last().Movies?.FirstOrDefault(item => item.Name == movie.Name);
 											var errorStyle = !string.IsNullOrEmpty(miner.Error) ? @" color: #cc3333;" : string.Empty;
 											var colorBackgroundStyle = minerCount % 2 == 0 ? "background-color:hsl(0, 0%, 90%);" : string.Empty;

@@ -513,32 +525,43 @@

 									@foreach (var movie in Model.Miners.First().Movies)
 									{
-										//const string myColumnStyle = "width: 100px;";
-										//const string myColumnFormat = "{0:N0}";
 										var lastWeek = Model.Miners.Last().Movies?.FirstOrDefault(item => item.Name == movie.Name);
 										var movieIsNewStyle = lastWeek == null ? "background-color: #C3FDB8;" : string.Empty;           // Color light-jade
 										bool isFirst = true;
-
-

+										decimal theaterCountPercent = 0;
+
+										if (lastWeek != null && movie.TheaterCount > 0)
+										{
+											theaterCountPercent = ((decimal)movie.TheaterCount - lastWeek.TheaterCount) / movie.TheaterCount * 100;
+										}
+
+										var theaterCountColorStyle = ViewUtility.PercentColorFromLastWeek(theaterCountPercent);
+										var theaterCountTextStyle = (theaterCountPercent >= 0) ? "color: black;" : "color: red";
+
+										if (Math.Abs(theaterCountPercent) < 20)
+										{
+											theaterCountColorStyle = "background-color: gray;";
+										}
+
+

 											@* Movie Image *@

 												@if (movie.Day.HasValue)
 												{
-
-													@**@
+
 												}
 												else
 												{
-
+
 												}

 											@* Movie Details and edit field *@

-

+

 													@movie.Name

@@ -574,14 +597,17 @@
 														   data-val-number="The field Box Office @movieCount must be a number."
 														   data-val="true">
 												}
-
-

-													@movie.Cost
-

-
-

-													@movie.TheaterCount
-

+
+													@movie.Cost BUX
+
+
+														@movie.TheaterCount
+
+

 											@foreach (var miner in Model.Miners.Where(item => !item.IsHidden))


BUX percent for compound movie.

BUX percent for compound movie.

--- MoviePicker.WebApp/Views/Home/IndexOld.cshtml
+++ MoviePicker.WebApp/Views/Home/IndexOld.cshtml
@@ -405,7 +405,7 @@
 								<span style="font-weight: bold;">
 									@movie.Cost BUX

-									@if(compoundBuxTotal > 0)
+									@if(compoundBuxTotal > 0 && movie.Day.HasValue)
 									{
 										var buxPercent = $"{movie.Cost / (decimal)compoundBuxTotal * 100:N1}%";


fix documentation in interface

fix documentation in interface

--- OmniResources.InfraredControl/IHeliCommand.cs
+++ OmniResources.InfraredControl/IHeliCommand.cs
@@ -43,7 +43,7 @@
         int PitchTrim { get; set; }

         /// <summary>
-        /// Gets or sets the value for yaw (left: 1000, still: 0, right: -10000)
+        /// Gets or sets the value for yaw (left: 1000, still: 0, right: -1000)
         /// </summary>
         int Yaw { get; set; }


git-svn-id: 21cdf44b51306c1f0753fc51e774ecf5fc1851ba@1274 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Dorian/Tools/Gorgon.Editor/formMain.cs
+++ Dorian/Tools/Gorgon.Editor/formMain.cs
@@ -119,7 +119,7 @@
                 {
                     GorgonFileSystemFileEntry file = (GorgonFileSystemFileEntry)node.Tag;

-                    itemOpen.Enabled = Program.ContentPlugIns.Any(item => item.Value.FileExtensions.ContainsKey(file.Extension.ToLower())));
+                    itemOpen.Enabled = Program.ContentPlugIns.Any(item => item.Value.FileExtensions.ContainsKey(file.Extension.ToLower()));
                     itemDelete.Enabled = true;
                     itemRenameFolder.Enabled = true;
                 }


Explicitly set the changed status of the prim groups affected in a delink Mantis #2484

--- OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1690,6 +1690,7 @@
             foreach (SceneObjectGroup g in affectedGroups)
             {
                 g.TriggerScriptChangedEvent(Changed.LINK);
+                g.HasGroupChanged = true; // Persist
                 g.ScheduleGroupForFullUpdate();
             }
         }


[Bench] Supported debugging

[Bench] Supported debugging

--- DryWetMidi.Benchmarks/BenchmarkTest.cs
+++ DryWetMidi.Benchmarks/BenchmarkTest.cs
@@ -23,10 +23,6 @@
         [SetUp]
         public void SetupTest()
         {
-#if DEBUG
-            Assert.Inconclusive("Unable to run benchmarks on Debug configuration. Use Release.");
-#endif
-
             Environment.CurrentDirectory = TestContext.CurrentContext.TestDirectory;
         }

@@ -39,10 +35,16 @@
         {
             var summary = BenchmarkRunner.Run(
                 type,
-                ManualConfig.Create(DefaultConfig.Instance)
-                            .AddExporter(AsciiDocExporter.Default, JsonExporter.Brief)
-                            .AddColumn(StatisticColumn.Min)
-                            .AddColumn(columns));
+                ManualConfig.Create(
+#if DEBUG
+                    new DebugInProcessConfig()
+#else
+                    DefaultConfig.Instance
+#endif
+                    )
+                    .AddExporter(AsciiDocExporter.Default, JsonExporter.Brief)
+                    .AddColumn(StatisticColumn.Min)
+                    .AddColumn(columns));

             // Assert validation errors

@@ -85,6 +87,6 @@
                 Assert.Inconclusive(buildError);
         }

-        #endregion
+#endregion
     }
 }


Experimental: Remove explicit property sends

--- OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1606,17 +1606,17 @@
                 parentGroup.HasGroupChanged = true;
                 parentGroup.ScheduleGroupForFullUpdate();

-                if (client != null)
-                {
-                    parentGroup.GetProperties(client);
-                }
-                else
-                {
-                    foreach (ScenePresence p in GetScenePresences())
-                    {
-                        parentGroup.GetProperties(p.ControllingClient);
-                    }
-                }
+//                if (client != null)
+//                {
+//                    parentGroup.GetProperties(client);
+//                }
+//                else
+//                {
+//                    foreach (ScenePresence p in GetScenePresences())
+//                    {
+//                        parentGroup.GetProperties(p.ControllingClient);
+//                    }
+//                }
             }
             finally
             {


Preparing release

Preparing release

Minor change, as stats editor isn't implemented yet; game data editor
still needs work, too, thus it's still disabled for now; preparing new
release build

--- EO4SaveEdit/Editors/GuildCardEditor.cs
+++ EO4SaveEdit/Editors/GuildCardEditor.cs
@@ -68,6 +68,10 @@
             }

             lbGuildCards.DataSource = new BindingSource(this.guildCardData.GuildCards, null);
+
+#if !DEBUG
+            btnRegCharacterStatsEditor.Enabled = false;
+#endif
         }

         private void InitializeControls(GuildCard guildCard)


Fix crash when [Mesh] section is missing from configuration files

--- OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -88,7 +88,8 @@

             decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache");
             cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps);
-            useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);
+            if(mesh_config != null)
+                useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh);

             try
             {


one more silly line ending thing.... *If you have problems, fetch the tree and rebase.

--- OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -30,10 +30,10 @@
 using System.Collections.Generic;
 using OpenSim.Framework;
 using OpenSim.Region.Physics.Manager;
-using OpenMetaverse;
+using OpenMetaverse;
 using OpenMetaverse.StructuredData;
 using System.Drawing;
-using System.Drawing.Imaging;
+using System.Drawing.Imaging;
 using System.IO.Compression;
 using PrimMesher;
 using log4net;
@@ -266,75 +266,75 @@

             if (primShape.SculptEntry)
             {
-                if (((OpenMetaverse.SculptType)primShape.SculptType) == SculptType.Mesh)
-                {
-                    // add code for mesh physics proxy generation here
-                    m_log.Debug("[MESH]: mesh proxy generation not implemented yet ");
-
-                    OSD meshOsd;
-
-                    if (primShape.SculptData.Length > 0)
-                    {
-
-
-                        m_log.Debug("[MESH]: asset data length: " + primShape.SculptData.Length.ToString());
-                        byte[] header = Util.StringToBytes256("<? LLSD/Binary ?>");
-
-                        ////dump to debugging file
-                        //string filename = System.IO.Path.Combine(decodedSculptMapPath, "mesh_" + primShape.SculptTexture.ToString());
-                        //BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Create));
-                        //writer.Write(primShape.SculptData);
-                        //writer.Close();
-
-                    }
-                    else
-                    {
-                        m_log.Error("[MESH]: asset data is zero length");
-                        return null;
-                    }
-
-                    try
-                    {
-                        meshOsd = OSDParser.DeserializeLLSDBinary(primShape.SculptData, true);
-                    }
-                    catch (Exception e)
-                    {
-                        m_log.Error("[MESH]: exception decoding mesh asset: " + e.ToString());
-                        return null;
-                    }
-
-                    if (meshOsd is OSDMap)
-                    {
-                        OSDMap map = (OSDMap)meshOsd;
-                        //foreach (string name in map.Keys)
-                        //    m_log.Debug("[MESH]: key:" + name + " value:" + map[name].AsString());
-                        OSDMap physicsParms = (OSDMap)map["physics_shape"];
-                        int physOffset = physicsParms["offset"].AsInteger();
-                        int physSize = physicsParms["size"].AsInteger();
-
-                        if (physOffset < 0 || physSize == 0)
-                            return null; // no mesh data in asset
-
-                        m_log.Debug("[MESH]: physOffset:" + physOffset.ToString() + " physSize:" + physSize.ToString());
-                        //MemoryStream ms = new MemoryStream(primShape.SculptData, physOffset, physSize);
-                        //GZipStream gzStream = new GZipStream(ms, CompressionMode.Decompress);
-
-                        //int maxSize = physSize * 5; // arbitrary guess
-                        //byte[] readBuffer = new byte[maxSize];
-
-                        //int bytesRead = gzStream.Read(readBuffer, 0, maxSize);
-
-                        //OSD physMeshOsd = OSDParser.DeserializeLLSDBinary(readBuffer);
-
-
-
-
-
-                    }
-
-                    //just bail out for now until mesh code is finished
-                    return null;
-
+                if (((OpenMetaverse.SculptType)primShape.SculptType) == SculptType.Mesh)
+                {
+                    // add code for mesh physics proxy generation here
+                    m_log.Debug("[MESH]: mesh proxy generation not implemented yet ");
+
+                    OSD meshOsd;
+
+                    if (primShape.SculptData.Length > 0)
+                    {
+
+
+                        m_log.Debug("[MESH]: asset data length: " + primShape.SculptData.Length.ToString());
+                        byte[] header = Util.StringToBytes256("<? LLSD/Binary ?>");
+
+                        ////dump to debugging file
+                        //string filename = System.IO.Path.Combine(decodedSculptMapPath, "mesh_" + primShape.SculptTexture.ToString());
+                        //BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Create));
+                        //writer.Write(primShape.SculptData);
+                        //writer.Close();
+
+                    }
+                    else
+                    {
+                        m_log.Error("[MESH]: asset data is zero length");
+                        return null;
+                    }
+
+                    try
+                    {
+                        meshOsd = OSDParser.DeserializeLLSDBinary(primShape.SculptData, true);
+                    }
+                    catch (Exception e)
+                    {
+                        m_log.Error("[MESH]: exception decoding mesh asset: " + e.ToString());
+                        return null;
+                    }
+
+                    if (meshOsd is OSDMap)
+                    {
+                        OSDMap map = (OSDMap)meshOsd;
+                        //foreach (string name in map.Keys)
+                        //    m_log.Debug("[MESH]: key:" + name + " value:" + map[name].AsString());
+                        OSDMap physicsParms = (OSDMap)map["physics_shape"];
+                        int physOffset = physicsParms["offset"].AsInteger();
+                        int physSize = physicsParms["size"].AsInteger();
+
+                        if (physOffset < 0 || physSize == 0)
+                            return null; // no mesh data in asset
+
+                        m_log.Debug("[MESH]: physOffset:" + physOffset.ToString() + " physSize:" + physSize.ToString());
+                        //MemoryStream ms = new MemoryStream(primShape.SculptData, physOffset, physSize);
+                        //GZipStream gzStream = new GZipStream(ms, CompressionMode.Decompress);
+
+                        //int maxSize = physSize * 5; // arbitrary guess
+                        //byte[] readBuffer = new byte[maxSize];
+
+                        //int bytesRead = gzStream.Read(readBuffer, 0, maxSize);
+
+                        //OSD physMeshOsd = OSDParser.DeserializeLLSDBinary(readBuffer);
+
+
+
+
+
+                    }
+
+                    //just bail out for now until mesh code is finished
+                    return null;
+
                 }
                 else
                 {