Use symbol nodes with the values “true” and “false” as booleans

--- squirrel/Evaluator.cs
+++ squirrel/Evaluator.cs
@@ -32,6 +32,9 @@

         private delegate INode BuiltinFunctionDelegate(List<INode> args, Environment env);

+        private static readonly INode True = new SymbolNode("true");
+        private static readonly INode False = new SymbolNode("false");
+
         public Evaluator(INode root)
         {
             _root = root;
@@ -308,7 +311,7 @@
                 return new ErrorNode($"function takes exactly 2 arguments ({args.Count} given)");
             }

-            return new IntegerNode(args[0].Equals(args[1]) ? 1 : 0);
+            return args[0].Equals(args[1]) ? True : False;
         }

         [ExpectedTypes(new[] {typeof(QuotedExpressionNode), typeof(IntegerNode)})]


Some TODO notes were no longer relevant

Some TODO notes were no longer relevant

--- Source/Examples/WPF.SharpDX/MorphTargetAnimation/MainViewModel.cs
+++ Source/Examples/WPF.SharpDX/MorphTargetAnimation/MainViewModel.cs
@@ -27,18 +27,9 @@

         private HelixToolkitScene scn;
         private CompositionTargetEx compositeHelper = new CompositionTargetEx();
-        private Animation animation;
-        private List<IAnimationUpdater> animUpdaters;
-        private MorphTargetKeyFrameUpdater mtUpdater;
         private long sum = 0;
         private long count = 0;
         private List<IAnimationUpdater> animationUpdaters;
-
-        //TODO
-        //Issue with boneskin mesh node
-        //Since we force it to render as boneskin mesh whenever morph targets exist
-        //it will not render correctly if it has a skeleton since only an updater
-        //currently handles updatiing skeleton data. we need to add a default state for that

         public MainViewModel()
         {
@@ -57,7 +48,7 @@
             //Make it renderable
             ModelGroup.AddNode(scn.Root);

-            //Setup animation TODO: will not handle shit well at all, only in this case
+            //Setup animation
             animationUpdaters = new List<IAnimationUpdater>();
             foreach (Animation anim in scn.Animations)
             {


Remove unnecessary code

Remove unnecessary code

--- Source/ReactiveProperty.NETStandard/ReadOnlyReactiveCollection.cs
+++ Source/ReactiveProperty.NETStandard/ReadOnlyReactiveCollection.cs
@@ -74,15 +74,11 @@
                 .AddTo(Token);

             subject.Where(x => x.Action == NotifyCollectionChangedAction.Move)
-                .Subscribe(x =>
-                {
-                    var targetValue = Source[x.OldIndex];
-                    Source.Move(x.OldIndex, x.Index);
-                })
+                .Subscribe(x => Source.Move(x.OldIndex, x.Index))
                 .AddTo(Token);

             ox.ObserveOn(scheduler)
-                .Subscribe(subject.OnNext, subject.OnError, subject.OnCompleted).AddTo(Token);
+                .Subscribe(subject).AddTo(Token);
         }

         /// <summary>


Fixed array reference issues in the GeoFacetFilter.

--- src/BoboBrowse.Net/Facets/Filter/GeoFacetFilter.cs
+++ src/BoboBrowse.Net/Facets/Filter/GeoFacetFilter.cs
@@ -45,7 +45,7 @@
             int maxDoc = reader.MaxDoc;

             GeoFacetHandler.GeoFacetData dataCache = _handler.GetFacetData<GeoFacetHandler.GeoFacetData>(reader);
-		    return new GeoDocIdSet(dataCache.get_xValArray(), dataCache.get_yValArray(), dataCache.get_zValArray(),
+		    return new GeoDocIdSet(dataCache.xValArray, dataCache.yValArray, dataCache.zValArray,
 				_lat, _lon, _rad, maxDoc, _miles);
         }


Code formatting

Code formatting

--- src/CommandLine.Tests/Unit/Core/NameLookupTests.cs
+++ src/CommandLine.Tests/Unit/Core/NameLookupTests.cs
@@ -28,5 +28,4 @@
             // Teardown
         }
     }
-
 }


Semplyfing linq query of EnforceMutuallyExclusiveSet()

--- src/CommandLine/Core/SpecificationPropertyRules.cs
+++ src/CommandLine/Core/SpecificationPropertyRules.cs
@@ -20,13 +20,17 @@
         {
             return specProps =>
                 {
-                    var options = specProps.Where(sp => sp.Specification.IsOption()
-                        && sp.Value.IsJust()
-                        && sp.Specification.GetSetName().Length > 0);
+                    var options = specProps
+                            .Where(sp => sp.Specification.IsOption())
+                            .Where(sp => ((OptionSpecification)sp.Specification).SetName.Length > 0
+                                   && sp.Value.IsJust()
+                                   && sp.Specification.GetSetName().Length > 0);
                     var groups = options.GroupBy(g => ((OptionSpecification)g.Specification).SetName);
                     if (groups.Count() > 1)
                     {
-                        return options.Select(s => Maybe.Just<Error>(new MutuallyExclusiveSetError(NameInfo.FromOptionSpecification((OptionSpecification)s.Specification))));
+                        return options.Select(s => Maybe.Just<Error>(
+                            new MutuallyExclusiveSetError(
+                                NameInfo.FromOptionSpecification((OptionSpecification)s.Specification))));
                     }
                     return Enumerable.Empty<Nothing<Error>>();
                 };


Skip rangecheck in string.EndsWith(char) (dotnet/coreclr#22206)

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/String.Comparison.cs
+++ src/Common/src/CoreLib/System/String.Comparison.cs
@@ -594,8 +594,8 @@

         public bool EndsWith(char value)
         {
-            int thisLen = Length;
-            return thisLen != 0 && this[thisLen - 1] == value;
+            int lastPos = Length - 1;
+            return ((uint)lastPos < (uint)Length) && this[lastPos] == value;
         }

         // Determines whether two strings match.


uncomment tests

uncomment tests

--- Spa2/NakedObjects.Spa.Selenium.Test/tests/TransientObjectTests.cs
+++ Spa2/NakedObjects.Spa.Selenium.Test/tests/TransientObjectTests.cs
@@ -361,32 +361,32 @@
         [TestMethod] //Mega
         [Priority(0)]
         public void TransientObjectTests() {
-            //CreateAndSaveTransientObject();
-            //SaveAndClose();
-            //MissingMandatoryFieldsNotified();
-            //IndividualFieldValidation();
-            //MultiFieldValidation();
-            //PropertyDescriptionAndRequiredRenderedAsPlaceholder();
-            //CancelTransientObject();
-            //BackAndForwardOverTransient();
-            //RequestForExpiredTransient();
-            //TransientWithHiddenNonOptionalFields();
-            //CanInvokeActionOnASavedTransient();
-            //TransientCreatedFromDialogClosesDialog();
-            //CreateAndSaveNotPersistedObject();
-            //ValuePropOnTransientEmptyIfNoDefault();
-            //InvalidPropOnTransientClearedAndReentered();
-            //AutoCompletePropOnTransient();
-            //TransientWithHiddenUntilPersistedFields();
-            //PersistentWithHiddenUntilPersistedFields();
+            CreateAndSaveTransientObject();
+            SaveAndClose();
+            MissingMandatoryFieldsNotified();
+            IndividualFieldValidation();
+            MultiFieldValidation();
+            PropertyDescriptionAndRequiredRenderedAsPlaceholder();
+            CancelTransientObject();
+            BackAndForwardOverTransient();
+            RequestForExpiredTransient();
+            TransientWithHiddenNonOptionalFields();
+            CanInvokeActionOnASavedTransient();
+            TransientCreatedFromDialogClosesDialog();
+            CreateAndSaveNotPersistedObject();
+            ValuePropOnTransientEmptyIfNoDefault();
+            InvalidPropOnTransientClearedAndReentered();
+            AutoCompletePropOnTransient();
+            TransientWithHiddenUntilPersistedFields();
+            PersistentWithHiddenUntilPersistedFields();
             TransientWithOtherPaneChanges();
         }

         [TestMethod]
         [Priority(-1)]
         public void ProblematicTransientObjectTests() {
-            //ConditionalChoicesOnTransient();
-            //SwapPanesWithTransients();
+            ConditionalChoicesOnTransient();
+            SwapPanesWithTransients();
         }
     }


Revise test coverage of Models.Th125.ScoreTotalReplacer

--- ThScoreFileConverterTests/Models/Th125/ScoreTotalReplacerTests.cs
+++ ThScoreFileConverterTests/Models/Th125/ScoreTotalReplacerTests.cs
@@ -15,8 +15,8 @@
             new ScoreStub(ScoreTests.ValidStub),
             new ScoreStub(ScoreTests.ValidStub)
             {
-                LevelScene = (Level.Nine, 7),
-                HighScore = 0,
+                LevelScene = (Level.Spoiler, 4),
+                Chara = Chara.Aya,
             },
             new ScoreStub(ScoreTests.ValidStub)
             {
@@ -55,11 +55,11 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("1,234,567", replacer.Replace("%T125SCRTLA11"));
+            Assert.AreEqual("2,469,134", replacer.Replace("%T125SCRTLA11"));
             Assert.AreEqual("1,234,567", replacer.Replace("%T125SCRTLH11"));

             Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("1234567", replacer.Replace("%T125SCRTLA11"));
+            Assert.AreEqual("2469134", replacer.Replace("%T125SCRTLA11"));
             Assert.AreEqual("1234567", replacer.Replace("%T125SCRTLH11"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
@@ -73,12 +73,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("23,456", replacer.Replace("%T125SCRTLA12"));
-            Assert.AreEqual("46,912", replacer.Replace("%T125SCRTLH12"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("23456", replacer.Replace("%T125SCRTLA12"));
-            Assert.AreEqual("46912", replacer.Replace("%T125SCRTLH12"));
+            Assert.AreEqual("46,912", replacer.Replace("%T125SCRTLA12"));
+            Assert.AreEqual("23,456", replacer.Replace("%T125SCRTLH12"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("46912", replacer.Replace("%T125SCRTLA12"));
+            Assert.AreEqual("23456", replacer.Replace("%T125SCRTLH12"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -91,12 +91,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("9,876", replacer.Replace("%T125SCRTLA13"));
-            Assert.AreEqual("19,752", replacer.Replace("%T125SCRTLH13"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("9876", replacer.Replace("%T125SCRTLA13"));
-            Assert.AreEqual("19752", replacer.Replace("%T125SCRTLH13"));
+            Assert.AreEqual("19,752", replacer.Replace("%T125SCRTLA13"));
+            Assert.AreEqual("9,876", replacer.Replace("%T125SCRTLH13"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("19752", replacer.Replace("%T125SCRTLA13"));
+            Assert.AreEqual("9876", replacer.Replace("%T125SCRTLH13"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -109,12 +109,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("5,432", replacer.Replace("%T125SCRTLA14"));
-            Assert.AreEqual("10,864", replacer.Replace("%T125SCRTLH14"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("5432", replacer.Replace("%T125SCRTLA14"));
-            Assert.AreEqual("10864", replacer.Replace("%T125SCRTLH14"));
+            Assert.AreEqual("10,864", replacer.Replace("%T125SCRTLA14"));
+            Assert.AreEqual("5,432", replacer.Replace("%T125SCRTLH14"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("10864", replacer.Replace("%T125SCRTLA14"));
+            Assert.AreEqual("5432", replacer.Replace("%T125SCRTLH14"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -123,8 +123,8 @@
         public void ReplaceTestNumSucceededScenesInGame()
         {
             var replacer = new ScoreTotalReplacer(Scores);
-            Assert.AreEqual("1", replacer.Replace("%T125SCRTLA15"));
-            Assert.AreEqual("2", replacer.Replace("%T125SCRTLH15"));
+            Assert.AreEqual("2", replacer.Replace("%T125SCRTLA15"));
+            Assert.AreEqual("1", replacer.Replace("%T125SCRTLH15"));
         }

         [TestMethod]
@@ -135,11 +135,11 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA21"));
+            Assert.AreEqual("1,234,567", replacer.Replace("%T125SCRTLA21"));
             Assert.AreEqual("2,469,134", replacer.Replace("%T125SCRTLH21"));

             Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA21"));
+            Assert.AreEqual("1234567", replacer.Replace("%T125SCRTLA21"));
             Assert.AreEqual("2469134", replacer.Replace("%T125SCRTLH21"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
@@ -153,12 +153,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA22"));
-            Assert.AreEqual("70,368", replacer.Replace("%T125SCRTLH22"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA22"));
-            Assert.AreEqual("70368", replacer.Replace("%T125SCRTLH22"));
+            Assert.AreEqual("23,456", replacer.Replace("%T125SCRTLA22"));
+            Assert.AreEqual("46,912", replacer.Replace("%T125SCRTLH22"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("23456", replacer.Replace("%T125SCRTLA22"));
+            Assert.AreEqual("46912", replacer.Replace("%T125SCRTLH22"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -171,12 +171,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA23"));
-            Assert.AreEqual("29,628", replacer.Replace("%T125SCRTLH23"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA23"));
-            Assert.AreEqual("29628", replacer.Replace("%T125SCRTLH23"));
+            Assert.AreEqual("9,876", replacer.Replace("%T125SCRTLA23"));
+            Assert.AreEqual("19,752", replacer.Replace("%T125SCRTLH23"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("9876", replacer.Replace("%T125SCRTLA23"));
+            Assert.AreEqual("19752", replacer.Replace("%T125SCRTLH23"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -189,12 +189,12 @@
             var replacer = new ScoreTotalReplacer(Scores);

             Settings.Instance.OutputNumberGroupSeparator = true;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA24"));
-            Assert.AreEqual("16,296", replacer.Replace("%T125SCRTLH24"));
-
-            Settings.Instance.OutputNumberGroupSeparator = false;
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA24"));
-            Assert.AreEqual("16296", replacer.Replace("%T125SCRTLH24"));
+            Assert.AreEqual("5,432", replacer.Replace("%T125SCRTLA24"));
+            Assert.AreEqual("10,864", replacer.Replace("%T125SCRTLH24"));
+
+            Settings.Instance.OutputNumberGroupSeparator = false;
+            Assert.AreEqual("5432", replacer.Replace("%T125SCRTLA24"));
+            Assert.AreEqual("10864", replacer.Replace("%T125SCRTLH24"));

             Settings.Instance.OutputNumberGroupSeparator = outputSeparator;
         }
@@ -203,8 +203,8 @@
         public void ReplaceTestNumSucceededScenesPerChara()
         {
             var replacer = new ScoreTotalReplacer(Scores);
-            Assert.AreEqual("0", replacer.Replace("%T125SCRTLA25"));
-            Assert.AreEqual("3", replacer.Replace("%T125SCRTLH25"));
+            Assert.AreEqual("1", replacer.Replace("%T125SCRTLA25"));
+            Assert.AreEqual("2", replacer.Replace("%T125SCRTLH25"));
         }

         [TestMethod]
@@ -220,6 +220,18 @@
         }

         [TestMethod]
+        public void ReplaceTestNullScore()
+        {
+            var scores = new List<IScore>() { null };
+            var replacer = new ScoreTotalReplacer(scores);
+            Assert.AreEqual("0", replacer.Replace("%T125SCRTLH11"));
+            Assert.AreEqual("0", replacer.Replace("%T125SCRTLH12"));
+            Assert.AreEqual("0", replacer.Replace("%T125SCRTLH13"));
+            Assert.AreEqual("0", replacer.Replace("%T125SCRTLH14"));
+            Assert.AreEqual("0", replacer.Replace("%T125SCRTLH15"));
+        }
+
+        [TestMethod]
         public void ReplaceTestInvalidFormat()
         {
             var replacer = new ScoreTotalReplacer(Scores);


Update AvaloniaProjectEditorPlatform.cs

Update AvaloniaProjectEditorPlatform.cs

--- src/Core2D/Editor/AvaloniaProjectEditorPlatform.cs
+++ src/Core2D/Editor/AvaloniaProjectEditorPlatform.cs
@@ -5,7 +5,9 @@
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Text;
+using Avalonia;
 using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
 using Core2D.Model;
 using Core2D.Model.Editor;
 using Core2D.Model.Renderer;
@@ -296,7 +298,10 @@

     public void OnExit()
     {
-        GetWindow().Close();
+    	if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktopLifetime)
+    	{
+    		desktopLifetime.Shutdown();
+    	}
     }

     public void OnCopyAsSvg(object? item)
@@ -771,4 +776,4 @@
     {
         ServiceProvider.GetService<ProjectEditorViewModel>()?.CanvasPlatform?.OutZoom?.Invoke();
     }
-}+}


Fix FxCop error.

Fix FxCop error.

--HG--
branch : 1.1

--- src/Dialog/PackageManagerUI/LicenseWindowOpener.cs
+++ src/Dialog/PackageManagerUI/LicenseWindowOpener.cs
@@ -6,7 +6,7 @@
 namespace NuGet.Dialog.PackageManagerUI {

     [Export(typeof(ILicenseWindowOpener))]
-    public class LicenseWindowOpener : ILicenseWindowOpener {
+    public sealed class LicenseWindowOpener : ILicenseWindowOpener {

         private readonly Dispatcher _uiDispatcher;


Refactor code to use the text generator indentation helpers.

--- src/Generator/Generators/CLI/CLISourcesTemplate.cs
+++ src/Generator/Generators/CLI/CLISourcesTemplate.cs
@@ -273,13 +273,11 @@
             }

             WriteLine(")");
-            WriteLine("{");
-            PushIndent();
+            WriteStartBraceIndent();

             GenerateFunctionCall(function);

-            PopIndent();
-            WriteLine("}");
+            WriteCloseBraceIndent();
         }

         public void GenerateFunctionCall(Function function, Class @class = null)


Reduced test to the bare minimum

Reduced test to the bare minimum

--- src/GitVersionExe.Tests/ExecCmdLineArgumentTest.cs
+++ src/GitVersionExe.Tests/ExecCmdLineArgumentTest.cs
@@ -39,22 +39,10 @@
     {
         using (var fixture = new EmptyRepositoryFixture())
         {
-            fixture.MakeATaggedCommit("1.2.3");
-            fixture.MakeACommit();
-
-            var buildFile = Path.Combine(fixture.RepositoryPath, "RunExecViaCommandLine.proj");
-            File.Delete(buildFile);
-            const string buildFileContent = @"<?xml version=""1.0"" encoding=""utf-8""?>
-<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
-  <Target Name=""OutputResults"">
-    <Message Text=""GitVersion_FullSemVer: $(GitVersion_FullSemVer)""/>
-  </Target>
-</Project>";
-            File.WriteAllText(buildFile, buildFileContent);
             var result = GitVersionHelper.ExecuteIn(fixture.RepositoryPath, arguments: " /invalid-argument");

             result.ExitCode.ShouldBe(1);
-            result.Output.ShouldContain("Failed to parse arguments");
+            result.Output.ShouldContain("Could not parse command line parameter '/invalid-argument'");
         }
     }
 }


Include resource name in error message

Include resource name in error message

--- src/JsonApiDotNetCore/Internal/IResourceFactory.cs
+++ src/JsonApiDotNetCore/Internal/IResourceFactory.cs
@@ -3,7 +3,6 @@
 using System.Linq.Expressions;
 using System.Reflection;
 using JsonApiDotNetCore.Extensions;
-using JsonApiDotNetCore.Models;
 using Microsoft.Extensions.DependencyInjection;

 namespace JsonApiDotNetCore.Internal
@@ -70,9 +69,19 @@
             var longestConstructor = resourceType.GetLongestConstructor();
             foreach (ParameterInfo constructorParameter in longestConstructor.GetParameters())
             {
-                var constructorArgument =
-                    ActivatorUtilities.CreateInstance(_serviceProvider, constructorParameter.ParameterType);
-                constructorArguments.Add(Expression.Constant(constructorArgument));
+                try
+                {
+                    object constructorArgument =
+                        ActivatorUtilities.CreateInstance(_serviceProvider, constructorParameter.ParameterType);
+
+                    constructorArguments.Add(Expression.Constant(constructorArgument));
+                }
+                catch (Exception exception)
+                {
+                    throw new InvalidOperationException(
+                        $"Failed to create an instance of '{resourceType.FullName}': Parameter '{constructorParameter.Name}' could not be resolved.",
+                        exception);
+                }
             }

             return Expression.New(longestConstructor, constructorArguments);


[CHANGE] Severitys to use less than, added new damage icons

--- UnityProject/Assets/Scripts/Health/BodyParts/BodyPartBehaviour.cs
+++ UnityProject/Assets/Scripts/Health/BodyParts/BodyPartBehaviour.cs
@@ -7,17 +7,15 @@
 	private float burnDamage;
 	public float BruteDamage { get { return bruteDamage; } set { bruteDamage = Mathf.Clamp(value, 0, 101); } }
 	public float BurnDamage { get { return burnDamage; } set { burnDamage = Mathf.Clamp(value, 0, 101); } }
-
+	public Sprite BlueDamageMonitorIcon;
+	public Sprite GreenDamageMonitorIcon;
+	public Sprite YellowDamageMonitorIcon;
+	public Sprite OrangeDamageMonitorIcon;
+	public Sprite DarkOrangeDamageMonitorIcon;
+	public Sprite RedDamageMonitorIcon;
 	public Sprite GrayDamageMonitorIcon;
-
-	public Sprite GreenDamageMonitorIcon;
-
 	private int MaxDamage = 100;
-
-	public Sprite OrangeDamageMonitorIcon;
-	public Sprite RedDamageMonitorIcon;
 	public BodyPartType Type;
-	public Sprite YellowDamageMonitorIcon;

 	public DamageSeverity Severity; //{ get; private set; }
 	public float OverallDamage => BruteDamage + BurnDamage;
@@ -83,25 +81,29 @@

 	private void UpdateSeverity()
 	{
+		// update UI limbs depending on their severity of damage
 		float severity = (float)OverallDamage / MaxDamage;
-		if (severity < 0.2)
+		if (severity <= 0)
 		{
 			Severity = DamageSeverity.None;
 		}
-		else
-		if (severity >= 0.2 && severity < 0.4)
+		else if (severity <= 0.2)
+		{
+			Severity = DamageSeverity.Light;
+		}
+		else if (severity <= 0.4)
+		{
+			Severity = DamageSeverity.LightModerate;
+		}
+		else if (severity <= 0.6)
 		{
 			Severity = DamageSeverity.Moderate;
 		}
-		else if (severity >= 0.4 && severity < 0.7)
-		{
-			Severity = DamageSeverity.Bad;
-		}
-		else if (severity >= 0.7 && severity < 1f)
+		else if (severity <= 0.8)
 		{
 			Severity = DamageSeverity.Critical;
 		}
-		else if (severity >= 1f)
+		else if (severity <= 1f)
 		{
 			Severity = DamageSeverity.Max;
 		}


CIT-505 changed Unit drop down box place

--- Web/Areas/Hub/Views/StartingBalance/StartingBalancePartial.cshtml
+++ Web/Areas/Hub/Views/StartingBalance/StartingBalancePartial.cshtml
@@ -144,7 +144,17 @@
             @Html.EditorFor(model => model.SINumber)
             @Html.ValidationMessageFor(model => model.SINumber)

-
+

+            @Html.LabelFor(model => model.UnitID, Html.Translate("Unit")) *
+

+

+            @(Html.Telerik().ComboBox()
+            .Name("UnitID")
+            .BindTo(new SelectList(Model.Units, "UnitID", "Name", Model.UnitID))
+            .HtmlAttributes(new { style = string.Format("width:{0}px", 200) })
+            )
+            @Html.ValidationMessageFor(model => model.UnitID)
+

             @Html.LabelFor(model => model.QuantityInUnit, Html.Translate("Quantity In Unit"))

@@ -165,17 +175,7 @@
             @Html.ValidationMessageFor(model => model.QuantityInMT)

-

-            @Html.LabelFor(model => model.UnitID, Html.Translate("Unit")) *
-

-

-            @(Html.Telerik().ComboBox()
-            .Name("UnitID")
-            .BindTo(new SelectList(Model.Units, "UnitID", "Name", Model.UnitID))
-            .HtmlAttributes(new { style = string.Format("width:{0}px", 200) })
-            )
-            @Html.ValidationMessageFor(model => model.UnitID)
-

+


refactor and fixes some tests

refactor and fixes some tests

--- src/NLog/LayoutRenderers/RegistryLayoutRenderer.cs
+++ src/NLog/LayoutRenderers/RegistryLayoutRenderer.cs
@@ -51,8 +51,7 @@
     [LayoutRenderer("registry")]
     public class RegistryLayoutRenderer : LayoutRenderer
     {
-        private RegistryHive hive = RegistryHive.LocalMachine;
-        private string subKey;
+

         /// <summary>
         /// Gets or sets the registry value name.
@@ -104,21 +103,21 @@
             // Value = null is necessary for querying "unnamed values"
             string renderedValue = (this.Value != null) ? this.Value.Render(logEvent) : null;

-            ParseKey(this.Key.Render(logEvent));
-
+            var parseResult = ParseKey(this.Key.Render(logEvent));
             try
             {
 #if !NET3_5
                 using (RegistryKey rootKey = RegistryKey.OpenBaseKey(hive, View))
 #else
-                    var rootKey = MapHiveToKey(this.hive);
+                var rootKey = MapHiveToKey(parseResult.Hive);

 #endif

                 {
-                    if (!String.IsNullOrEmpty(this.subKey))
+
+                    if (parseResult.HasSubKey)
                     {
-                        using (RegistryKey registryKey = rootKey.OpenSubKey(this.subKey))
+                        using (RegistryKey registryKey = rootKey.OpenSubKey(parseResult.SubKey))
                         {
                             if (registryKey != null) registryValue = registryKey.GetValue(renderedValue);
                         }
@@ -127,7 +126,6 @@
                     {
                         registryValue = rootKey.GetValue(renderedValue);
                     }
-
                 }
             }
             catch (Exception ex)
@@ -150,39 +148,70 @@
             builder.Append(value);
         }

-        /// <summary>
-        /// Splits up <paramref name="key"/> into its registry <see cref="hive"/> and <see cref="subKey"/>.
+        private class ParseResult
+        {
+            public string SubKey { get; set; }
+
+            public RegistryHive Hive { get; set; }
+
+            /// <summary>
+            /// Has <see cref="SubKey"/>?
+            /// </summary>
+            public bool HasSubKey
+            {
+                get { return !string.IsNullOrEmpty(SubKey); }
+            }
+        }
+
+        /// <summary>
+        /// Parse key to <see cref="RegistryHive"/> and subkey.
         /// </summary>
         /// <param name="key">full registry key name</param>
-        private void ParseKey(string key)
+        /// <returns>Result of parsing, never <c>null</c>.</returns>
+        private static ParseResult ParseKey(string key)
         {
             string hiveName;
             int pos = key.IndexOfAny(new char[] { '\\', '/' });

+            string subkey = null;
             if (pos >= 0)
             {
                 hiveName = key.Substring(0, pos);
-                this.subKey = key.Substring(pos + 1).Replace('/', '\\');
+
+                //normalize slashes
+                subkey = key.Substring(pos + 1).Replace('/', '\\');
+
+                //remove starting slashes
+                subkey = subkey.TrimStart('\\');
+
             }
             else
             {
                 hiveName = key;
             }
+
+            RegistryHive hive;
             switch (hiveName.ToUpper(CultureInfo.InvariantCulture))
             {
                 case "HKEY_LOCAL_MACHINE":
                 case "HKLM":
-                    this.hive = RegistryHive.LocalMachine;
+                    hive = RegistryHive.LocalMachine;
                     break;

                 case "HKEY_CURRENT_USER":
                 case "HKCU":
-                    this.hive = RegistryHive.CurrentUser;
+                   hive = RegistryHive.CurrentUser;
                     break;

                 default:
                     throw new ArgumentException("Key name is invalid. Root hive not recognized.");
             }
+
+            return new ParseResult
+            {
+                SubKey = subkey,
+                Hive = hive,
+            };
         }

 #if NET3_5


:hammer: (identity) 初始化OnlineUser时，用户的UserClaim数据都添加到扩展数据字典`onlineUser.ExtendData`中

--- src/OSharp.Identity/Identity/OnlineUserProvider.cs
+++ src/OSharp.Identity/Identity/OnlineUserProvider.cs
@@ -10,6 +10,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Security.Claims;
 using System.Threading;
 using System.Threading.Tasks;

@@ -31,9 +32,11 @@
     /// <summary>
     /// 在线用户信息提供者
     /// </summary>
-    public class OnlineUserProvider<TUser, TUserKey, TRole, TRoleKey> : IOnlineUserProvider
+    public class OnlineUserProvider<TUser, TUserKey, TUserClaim, TUserClaimKey, TRole, TRoleKey> : IOnlineUserProvider
         where TUser : UserBase<TUserKey>
         where TUserKey : IEquatable<TUserKey>
+        where TUserClaim : UserClaimBase<TUserClaimKey, TUserKey>
+        where TUserClaimKey : IEquatable<TUserClaimKey>
         where TRole : RoleBase<TRoleKey>
         where TRoleKey : IEquatable<TRoleKey>
     {
@@ -76,7 +79,7 @@
                         RoleManager<TRole> roleManager = _serviceProvider.GetService<RoleManager<TRole>>();
                         bool isAdmin = roleManager.Roles.ToList().Any(m => roles.Contains(m.Name) && m.IsAdmin);
                         RefreshToken[] refreshTokens = await GetRefreshTokens(user);
-                        return new OnlineUser()
+                        OnlineUser onlineUser = new OnlineUser()
                         {
                             Id = user.Id.ToString(),
                             UserName = user.UserName,
@@ -87,6 +90,15 @@
                             Roles = roles.ToArray(),
                             RefreshTokens = refreshTokens.ToDictionary(m => m.ClientId, m => m)
                         };
+
+                        // UserClaim都添加到扩展数据
+                        IList<Claim> claims = await userManager.GetClaimsAsync(user);
+                        foreach (Claim claim in claims)
+                        {
+                            onlineUser.ExtendData.Add(claim.Type, claim.Value);
+                        }
+
+                        return onlineUser;
                     },
                     options);
             }


Tests fixed.

Tests fixed.

--- backend/tests/Squidex.Domain.Apps.Entities.Tests/Assets/RecursiveDeleterTests.cs
+++ backend/tests/Squidex.Domain.Apps.Entities.Tests/Assets/RecursiveDeleterTests.cs
@@ -43,7 +43,7 @@
         {
             IEventConsumer consumer = sut;

-            Assert.Equal("^assetFolder\\-", consumer.EventsFilter);
+            Assert.Equal("^assetFolder-", consumer.EventsFilter);
         }

         [Fact]


Prettified constants

Prettified constants

--- source/Core/Constants.cs
+++ source/Core/Constants.cs
@@ -25,8 +25,8 @@
     {
         public const string IdentityServerName = "Thinktecture IdentityServer v3";

-        public const string PrimaryAuthenticationType = "idsrv";
-        public const string ExternalAuthenticationType = "idsrv.external";
+        public const string PrimaryAuthenticationType       = "idsrv";
+        public const string ExternalAuthenticationType      = "idsrv.external";
         public const string PartialSignInAuthenticationType = "idsrv.partial";
         public const string BuiltInIdentityProvider         = "idsrv";


修复了在MetaWeblogMiddleware中，由于context.Response.WriteAsync产生的InvalidOperationException异常。详情请参见：https://github.com/aspnet/HttpAbstractions/issues/686。

--- src/WilderMinds.MetaWeblog/MetaWeblogMiddleware.cs
+++ src/WilderMinds.MetaWeblog/MetaWeblogMiddleware.cs
@@ -41,9 +41,11 @@
                 // occurred in the Windows Live Writer client.
                 await Task.Delay(500);
             }
-
-            // Continue On
-            await _next.Invoke(context);
+            else
+            {
+                // Continue On
+                await _next.Invoke(context);
+            }
         }
     }
 }


A little cleanup

A little cleanup

--- src/app/ExtraLINQ/Extensions/IEnumerable/Random.cs
+++ src/app/ExtraLINQ/Extensions/IEnumerable/Random.cs
@@ -17,10 +17,7 @@
         /// <exception cref="ArgumentNullException">Thrown when <paramref name="source"/> is null.</exception>
         public static TSource Random<TSource>(this IEnumerable<TSource> source)
         {
-            if (source == null)
-            {
-                throw new ArgumentNullException("source");
-            }
+            ThrowIf.Argument.IsNull(source, "source");

             return PickRandomElement(source, _random);
         }
@@ -75,15 +72,8 @@
         ///   </exception>
         public static TSource Random<TSource>(this IEnumerable<TSource> source, Random randomNumberGenerator)
         {
-            if (source == null)
-            {
-                throw new ArgumentNullException("source");
-            }
-
-            if (randomNumberGenerator == null)
-            {
-                throw new ArgumentNullException("randomNumberGenerator");
-            }
+            ThrowIf.Argument.IsNull(source, "source");
+            ThrowIf.Argument.IsNull(randomNumberGenerator, "randomNumberGenerator");

             return PickRandomElement(source, randomNumberGenerator);
         }
@@ -108,15 +98,8 @@
         /// </exception>
         public static IEnumerable<TSource> Random<TSource>(this IEnumerable<TSource> source, int randomElementsCount, Random randomNumberGenerator)
         {
-            if (source == null)
-            {
-                throw new ArgumentNullException("source");
-            }
-
-            if (randomNumberGenerator == null)
-            {
-                throw new ArgumentNullException("randomNumberGenerator");
-            }
+            ThrowIf.Argument.IsNull(source, "source");
+            ThrowIf.Argument.IsNull(randomNumberGenerator, "randomNumberGenerator");

             // Create array from source for further use to avoid multiple enumeration
             TSource[] sourceArray = source.ToArray();
@@ -129,15 +112,15 @@
                 throw new ArgumentOutOfRangeException("randomElementsCount");
             }

-            return PickRandomElements(source, randomElementsCount, randomNumberGenerator);
+            return PickRandomElements(sourceArray, randomElementsCount, randomNumberGenerator);
         }

         private static TSource PickRandomElement<TSource>(IEnumerable<TSource> source, Random randomNumberGenerator)
         {
-            int itemCount = source.Count();
-            int randomIndex = randomNumberGenerator.Next(itemCount);
+            var sourceArray = source as TSource[] ?? source.ToArray();
+            int randomIndex = randomNumberGenerator.Next(sourceArray.Length);

-            return source.ElementAt(randomIndex);
+            return sourceArray[randomIndex];
         }

         private static IEnumerable<TSource> PickRandomElements<TSource>(IEnumerable<TSource> source, int randomElementsCount)
@@ -148,11 +131,6 @@
         private static IEnumerable<TSource> PickRandomElements<TSource>(IEnumerable<TSource> source, int randomElementsCount, Random randomNumberGenerator)
         {
             return ShuffleCollection(source, randomNumberGenerator).Take(randomElementsCount);
-        }
-
-        private static IEnumerable<TSource> ShuffleCollection<TSource>(IEnumerable<TSource> source)
-        {
-            return ShuffleCollection(source, _random);
         }

         public static IEnumerable<TSource> ShuffleCollection<TSource>(IEnumerable<TSource> source, Random random)


Don't throw an exception if an anim curve node's channel is missing curves. Just assume the value is zero.

--- Property.cs
+++ Property.cs
@@ -288,7 +288,12 @@
                 uint i;
                 for (i = 0; i < Math.Min(4, acn.GetChannelsCount()); i++)
                 {
-                    if (acn.GetCurveCount(i) < 1) throw new NotImplementedException();
+                    if (acn.GetCurveCount(i) < 1)
+                        //throw new NotImplementedException(
+                        //    string.Format(
+                        //        "The AnimCurveNode channel #{0} doesn't have any curves attached", i));
+                        continue;
+
                     var curve = acn.GetCurve(i);
                     values[i] = curve.Evaluate(pTime);
                 }


Make most ObjectPath members internal

Make most ObjectPath members internal

--- Protocol.cs
+++ Protocol.cs
@@ -127,7 +127,7 @@
 	{
 		public static readonly ObjectPath Root = new ObjectPath ("/");

-		public readonly string Value;
+		internal readonly string Value;

 		public ObjectPath (string value)
 		{
@@ -140,7 +140,7 @@
 		}

 		//this may or may not prove useful
-		public string[] Decomposed
+		internal string[] Decomposed
 		{
 			get {
 				return Value.Split (new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
@@ -151,7 +151,7 @@
 			}
 		}

-		public ObjectPath Parent
+		internal ObjectPath Parent
 		{
 			get {
 				if (Value == Root.Value)


Added mode .GetID() extensions

Added mode .GetID() extensions

--- StringID.cs
+++ StringID.cs
@@ -9,24 +9,35 @@
 {
     public static class StringID
     {
+        static string GetSystemID(object o) =>
+        string.Format("{0}[{1:X}]", o.GetType().Name, o.GetHashCode());
+
+        static string GetObjectID(Object o) =>
+        string.Format("{0}[{1:X}]", o.name, o.GetHashCode());
+
+        static string GetComponentID(Component c) =>
+        string.Format("{0}:{1}", c.gameObject.GetID(), GetObjectID(c));
+
+        static string GetComponentSysID(Component c) =>
+        string.Format("{0}:{1}", c.gameObject.GetID(), GetSystemID(c));
+
         public static string GetID(this object o) =>
-        o == null ?
-        "_object" :
-        string.Format("{0}[{1:X}]",
-                      o.GetType().Name, o.GetHashCode());
+        o == null ? "_object" : GetSystemID(o);
+
+        public static string GetID(this Object o) =>
+        o == null ? "_Object" : GetSystemID(o);

         public static string GetID(this GameObject o) =>
-        o == null ?
-        "_GO" :
-        string.Format("{0}[{1:X}]",
-                      o.name, o.GetHashCode());
+        o == null ? "_GO" : GetObjectID(o);
+
+        public static string GetID(this Component c) =>
+        c == null ? "_component" : GetComponentSysID(c);
+
+        public static string GetID(this Transform t) =>
+        t == null ? "_transform" : GetComponentID(t);

         public static string GetID(this MonoBehaviour mb) =>
-        mb == null ?
-        "_behaviour" :
-        string.Format("{0}:{1}[{2:X}]",
-                      mb.gameObject.GetID(),
-                      mb.GetType().Name, mb.GetHashCode());
+        mb == null ? "_behaviour" : GetComponentSysID(mb);

         public static string GetID(this Vessel vessel) =>
         vessel == null ?


Only enable the render type drop down if render or all is selected.

Forgot about this.

--- Launcher/MainWindow.xaml.cs
+++ Launcher/MainWindow.xaml.cs
@@ -783,30 +783,35 @@
         {
             model_compile_type = model_compile.collision;
             model_compile_obj_type.IsEnabled = false;
+            model_compile_render_type.IsEnabled = false;
         }

         private void model_compile_physics_Checked(object sender, RoutedEventArgs e)
         {
             model_compile_type = model_compile.physics;
             model_compile_obj_type.IsEnabled = false;
+            model_compile_render_type.IsEnabled = false;
         }

         private void model_compile_obj_Checked(object sender, RoutedEventArgs e)
         {
             model_compile_type = model_compile.obj;
             model_compile_obj_type.IsEnabled = true;
+            model_compile_render_type.IsEnabled = false;
         }

         private void model_compile_all_Checked(object sender, RoutedEventArgs e)
         {
             model_compile_type = model_compile.collision | model_compile.physics | model_compile.obj | model_compile.render;
             model_compile_obj_type.IsEnabled = true;
+            model_compile_render_type.IsEnabled = true;
         }

         private void model_compile_render_Checked(object sender, RoutedEventArgs e)
         {
             model_compile_type = model_compile.render;
             model_compile_obj_type.IsEnabled = false;
+            model_compile_render_type.IsEnabled = true;
         }

         private void large_addr_enabled_Checked(object sender, RoutedEventArgs e)


get rid of A*

get rid of A*

--- src/npuzzle/Program.cs
+++ src/npuzzle/Program.cs
@@ -3,7 +3,6 @@
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
-using System.Text.RegularExpressions;

 namespace npuzzle
 {
@@ -12,9 +11,8 @@
         private const string timerFormat = @"hh\:mm\:ss\.fff";
         private static Stopwatch timer;
         private static long lastMillis;
-        static ulong nodesEvaluated;
-        static ulong nodesExpanded;
-        static string outputFormat;
+        private static ulong nodeCounter;
+        private static string outputFormat;

         static void Main(string[] args)
         {
@@ -28,9 +26,6 @@
                     }
                     switch (args[0])
                     {
-                        case "a*":
-                            DoAStar();
-                            break;
                         case "ida*":
                             DoIDAStar();
                             break;
@@ -91,11 +86,6 @@
             }
         }

-        static void DoAStar()
-        {
-            DoPuzzles(KorfPuzzles.Puzzles, AStar);
-        }
-
         static void DoIDAStar()
         {
             DoPuzzles(KorfPuzzles.Puzzles, IDAStarDriver);
@@ -112,8 +102,7 @@
                     string filename = string.Format(outputFormat, korfPuzzle.Number);
                     if (File.Exists(filename)) continue;
                 }
-                nodesExpanded = 0;
-                nodesEvaluated = 0;
+                nodeCounter = 0;
                 lastMillis = 0;
                 Console.WriteLine("\n\n{0}: < {1} >", korfPuzzle.Number, string.Join(",", korfPuzzle.InitialState));
                 Console.WriteLine("actual solution length: {0}, korf nodes evaluated: {1:n0}", korfPuzzle.Actual, korfPuzzle.KorfNodesExpanded);
@@ -154,7 +143,7 @@

         static void PrintSolution(ulong[] solution, TextWriter writeLocation)
         {
-            writeLocation.WriteLine("\nSolution found! time: {0}, length: {1}, eval: {2}", timer.Elapsed.ToString(timerFormat), solution.Length - 1, nodesEvaluated);
+            writeLocation.WriteLine("\nSolution found! time: {0}, length: {1}, eval: {2}", timer.Elapsed.ToString(timerFormat), solution.Length - 1, nodeCounter);
             foreach (var step in solution)
             {
                 PrintState(step, writeLocation);
@@ -179,7 +168,7 @@
         {
             idash = h;
             nextBest = idash(initialState);
-            nodesEvaluated = 1;
+            nodeCounter = 1;
             var bestPath = noSolution;
             while (bestPath == noSolution && nextBest != uint.MaxValue)
             {
@@ -198,7 +187,7 @@
             var newCost = cost + 1;
             foreach (var successor in successors.Where(s => s != parent))
             {
-                nodesEvaluated += 1;
+                nodeCounter += 1;
                 var newF = newCost + idash(successor);
                 if (newF > upperbound)
                 {
@@ -217,63 +206,10 @@
             if (parent == 0ul || (timer.ElapsedMilliseconds - lastMillis) > 1000)
             {
                 var nextBestDisplay = nextBest == uint.MaxValue ? "inf" : nextBest.ToString();
-                Console.Write("\rtime: {0}, upperbound: {1}, nextBest: {2}, eval: {3:n0}     ", timer.Elapsed.ToString(timerFormat), upperbound, nextBestDisplay, nodesEvaluated);
+                Console.Write("\rtime: {0}, upperbound: {1}, nextBest: {2}, eval: {3:n0}     ", timer.Elapsed.ToString(timerFormat), upperbound, nextBestDisplay, nodeCounter);
                 lastMillis = timer.ElapsedMilliseconds;
             }
             return noSolution;
-        }
-
-        static ulong[] AStar(ulong initialState, ulong goal, Func<ulong, uint> h)
-        {
-            uint lastMinCost = 0u;
-            var g = new Dictionary<ulong, uint> {{initialState, 0u}};
-            var closed = new HashSet<ulong>();
-            var open = new SimplePriorityQueue<ulong>();
-            open.Push(initialState, g[initialState], h(initialState));
-            var cameFrom = new Dictionary<ulong, ulong> {{ initialState, 0ul }};
-            while (open.Count > 0)
-            {
-                nodesEvaluated += 1;
-                var minCost = open.GetMinCost();
-                if (minCost > lastMinCost)
-                {
-                    Console.Write("\n\rtime: {0}, best: {1}, open: {2}, eval: {3}, exp: {4}", timer.Elapsed.ToString(timerFormat), minCost, open.Count, nodesEvaluated, nodesExpanded);
-                    lastMinCost = minCost;
-                }
-                var current = open.Pop();
-                if (current == goal)
-                {
-                    return ReconstructPath(cameFrom, goal);
-                }
-                closed.Add(current);
-                uint successorGScore = g[current] + 1;
-                var successors = ExpandState(current);
-                foreach (var successor in successors)
-                {
-                    if (cameFrom[current] == successor) continue; // don't allow a move back to the previous move
-                    if (closed.Contains(successor)) continue; // TODO: only valid because using admissable heuristics
-                    if (!open.Contains(successor) || successorGScore < g[successor])
-                    {
-                        nodesExpanded += 1;
-                        cameFrom[successor] = current;
-                        g[successor] = successorGScore;
-                        if (open.Contains(successor))
-                        {
-                            open.DecreaseKey(successor, successorGScore, h(successor));
-                        }
-                        else
-                        {
-                            open.Push(successor, successorGScore, h(successor));
-                        }
-                    }
-                }
-                if ((timer.ElapsedMilliseconds - lastMillis) > 1000)
-                {
-                    Console.Write("\rtime: {0}, best: {1}, open: {2}, eval: {3}, exp: {4}", timer.Elapsed.ToString(timerFormat), minCost, open.Count, nodesEvaluated, nodesExpanded);
-                    lastMillis = timer.ElapsedMilliseconds;
-                }
-            }
-            return new ulong[0];
         }

         static List<ulong> ExpandState(ulong state)
@@ -325,17 +261,5 @@
             }
             return (uint)minMovesRemaning;
         }
-
-        static ulong[] ReconstructPath(Dictionary<ulong, ulong> cameFrom, ulong current)
-        {
-            var path = new Stack<ulong>();
-            path.Push(current);
-            while (cameFrom[current] != 0ul)
-            {
-                current = cameFrom[current];
-                path.Push(current);
-            }
-            return path.ToArray();
-        }
     }
 }


Properly commented out the Dependancy Graph

--- src/Red-Folder.com/Views/Microservice/Index.cshtml
+++ src/Red-Folder.com/Views/Microservice/Index.cshtml
@@ -27,50 +27,52 @@

-

-

-

-
Dependancy Graph

+@*
+

+

+

+
Dependancy Graph

+

-

-

-

-

-                @{ await Html.RenderPartialAsync("_MicroServiceDependanyGraph"); }
+

+

+

+                    @{ await Html.RenderPartialAsync("_MicroServiceDependanyGraph"); }

-                @section Scripts
-            {
-
+                    @section Scripts
+                {
+

-                    <environment names="Development">
-
-
-
-                    </environment>
-                    <environment names="Production,Staging">
-
-
-                    </environment>
-                }
+                        <environment names="Development">
+
+
+
+                        </environment>
+                        <environment names="Production,Staging">
+
+
+                        </environment>
+                    }

-                @section Styles
-            {
-                    <environment names="Development">
-
-                        <link rel="stylesheet" href="/css/dependancyGraph/dependancy.graph.css">
-
-                    </environment>
-                    <environment names="Production,Staging">
-
-                        <link rel="stylesheet" href="/css/dependancyGraph/production/DependancyGraph-44f0c67616.css">
-
-                    </environment>
-                }
+                    @section Styles
+                {
+                        <environment names="Development">
+
+                            <link rel="stylesheet" href="/css/dependancyGraph/dependancy.graph.css">
+
+                        </environment>
+                        <environment names="Production,Staging">
+
+                            <link rel="stylesheet" href="/css/dependancyGraph/production/DependancyGraph-44f0c67616.css">
+
+                        </environment>
+                    }
+

-

+*@

Microservice Articles


359.1

--- src/SharpConnect.MySql/0_Public/MySqlConnection.cs
+++ src/SharpConnect.MySql/0_Public/MySqlConnection.cs
@@ -12,9 +12,10 @@
             {
                 conn.InternalOpen();
             }
-            public static void Ping(this MySqlConnection conn)
+            public static bool Ping(this MySqlConnection conn)
             {
                 conn.InternalPing();
+                return conn.LatestPingResult;
             }
             public static void ChangeDB(this MySqlConnection conn,string newDbName)
             {
@@ -240,7 +241,7 @@
             }
         }

-
+        internal bool LatestPingResult => _conn.LatestPingResult;
         internal void InternalPing(Action onComplete = null)
         {
             _conn.Ping(onComplete);


330: GetFloat()

330: GetFloat()

--- src/SharpConnect.MySql/0_Public/MySqlDataReader.cs
+++ src/SharpConnect.MySql/0_Public/MySqlDataReader.cs
@@ -557,9 +557,11 @@

         //TODO: check match type and index here
         public decimal GetDecimal(int colIndex) => _cells[colIndex].myDecimal;
+        public decimal GetDecimal(string colName) => GetDecimal(GetOrdinal(colName));

         //TODO: check match type and index here
         public float GetFloat(int colIndex) => (float)(_cells[colIndex].myDouble);
+        public float GetFloat(string colName) => (float)(_cells[GetOrdinal(colName)].myDouble);

         //TODO: check match type and index here
         public double GetDouble(int colIndex) => _cells[colIndex].myDouble;
@@ -567,7 +569,7 @@
         //TODO: check match type and index here
         public double GetDouble(string colName) => GetDouble(GetOrdinal(colName));

-        public decimal GetDecimal(string colName) => GetDecimal(GetOrdinal(colName));
+

         public string GetString(int colIndex)
         {


Remove string based serializer

Remove string based serializer

--- src/SpeakEasy/Serializers/StringBasedSerializer.cs
+++ src/SpeakEasy/Serializers/StringBasedSerializer.cs
@@ -1,35 +0,0 @@
-using System;
-using System.IO;
-
-namespace SpeakEasy.Serializers
-{
-    public abstract class StringBasedSerializer : Serializer
-    {
-        public override T Deserialize<T>(Stream body)
-        {
-            return ReadStream(
-                body,
-                contents => DeserializeString<T>(contents));
-        }
-
-        public override object Deserialize(Stream body, Type type)
-        {
-            return ReadStream(
-                body,
-                contents => DeserializeString(contents, type));
-        }
-
-        private T ReadStream<T>(Stream body, Func<string, T> callback)
-        {
-            using (var reader = new StreamReader(body))
-            {
-                var contents = reader.ReadToEnd();
-                return callback(contents);
-            }
-        }
-
-        public abstract T DeserializeString<T>(string body);
-
-        public abstract object DeserializeString(string body, Type type);
-    }
-}


Remove error code from synchronizertest.cs

--- src/Tests.Daterpillar/UnitTest/SynchronizerTest.cs
+++ src/Tests.Daterpillar/UnitTest/SynchronizerTest.cs
@@ -113,21 +113,9 @@
             string tableName = "a";

             var source = new Schema();
-            source.Tables.Add(new Table(tableName, new Column[]
-            {
-                SampleData.CreateIntegerColumn("c1", tableName),
-                SampleData.CreateIntegerColumn("c2", tableName),
-                SampleData.CreateIntegerColumn("c4", tableName),
-                SampleData.CreateIntegerColumn("c5", tableName),
-            }));
-
-            var target = new Schema();
-            target.Tables.Add(new Table("a", new Column[]
-            {
-                SampleData.CreateIntegerColumn("c1" , tableName),
-                SampleData.CreateStringColumn("c2"  , tableName),
-                SampleData.CreateDateTimeColumn("c3", tableName),
-            }));
+
+            var target = new Schema();
+

             var sut = new Synchronizer(new FakeScriptBuilder());

@@ -146,18 +134,8 @@
             string tableName = "a";

             var source = new Schema();
-            source.Tables.Add(new Table("a", new Column[]
-            {
-                SampleData.CreateIntegerColumn("c1", tableName)
-            }));
-
-            var target = new Schema();
-            target.Tables.Add(new Table("a", new Column[]
-            {
-                SampleData.CreateIntegerColumn("c1", tableName),
-                SampleData.CreateIntegerColumn("c2", tableName),
-                SampleData.CreateIntegerColumn("c3", tableName),
-            }));
+
+            var target = new Schema();

             var sut = new Synchronizer(new FakeScriptBuilder());

@@ -209,7 +187,7 @@
                 _text.AppendLine($"add column [{column.Name}] to [{column.TableRef}]");
             }

-            public void Drop(Schema schema, Column column)
+            public void Drop(Column column)
             {
                 _text.AppendLine($"drop [{column.Name}] column from [{column.TableRef}] table");
             }


inlined variable

inlined variable

--- src/TrackTv.Data/Repositories/EpisodeRepository.cs
+++ src/TrackTv.Data/Repositories/EpisodeRepository.cs
@@ -38,20 +38,18 @@

         public Task<EpisodesSummary[]> GetEpisodesSummariesAsync(int[] ids, DateTime time)
         {
-            var summariesQuery = this.DataStore.Shows.Where(x => ids.Contains(x.Id)).Select(s => new EpisodesSummary
-                                     {
-                                         ShowId = s.Id,
-                                         LastEpisode =
-                                             s.Episodes.Where(e => (e.FirstAired != null) && (e.FirstAired <= time))
-                                              .OrderByDescending(e => e.FirstAired)
-                                              .FirstOrDefault(),
-                                         NextEpisode =
-                                             s.Episodes.Where(e => (e.FirstAired != null) && (e.FirstAired > time))
-                                              .OrderBy(e => e.FirstAired)
-                                              .FirstOrDefault()
-                                     });
-
-            return summariesQuery.ToArrayAsync();
+            return this.DataStore.Shows.Where(x => ids.Contains(x.Id)).Select(s => new EpisodesSummary
+                       {
+                           ShowId = s.Id,
+                           LastEpisode =
+                               s.Episodes.Where(e => (e.FirstAired != null) && (e.FirstAired <= time))
+                                .OrderByDescending(e => e.FirstAired)
+                                .FirstOrDefault(),
+                           NextEpisode =
+                               s.Episodes.Where(e => (e.FirstAired != null) && (e.FirstAired > time))
+                                .OrderBy(e => e.FirstAired)
+                                .FirstOrDefault()
+                       }).ToArrayAsync();
         }

         public Task<Episode[]> GetMonthlyEpisodesAsync(int userId, DateTime startDay, DateTime endDay)


Can resolve the container without registering it

--- src/UnityConfiguration.Tests/ConfigurationTests.cs
+++ src/UnityConfiguration.Tests/ConfigurationTests.cs
@@ -9,6 +9,16 @@
     [TestFixture]
     public class ConfigurationTests
     {
+        [Test]
+        public void Can_resolve_the_container_without_registering_it()
+        {
+            var container = new UnityContainer();
+
+            container.Initialize(x => {});
+
+            Assert.That(container.Resolve<IUnityContainer>(), Is.SameAs(container));
+        }
+
         [Test]
         public void Can_initalize_container_with_one_registry()
         {


Fix comparison in MonoTouch sample

Fix comparison in MonoTouch sample

--- src/ZXing.Net.Mobile/MonoTouch/ZXingScannerView.cs
+++ src/ZXing.Net.Mobile/MonoTouch/ZXingScannerView.cs
@@ -110,7 +110,7 @@
 				    device.Position == AVCaptureDevicePosition.Front)

 					break; //Front camera successfully set
-				else if (device.Position = AVCaptureDevicePosition.Back && (!options.UseFrontCameraIfAvailable.HasValue || !options.UseFrontCameraIfAvailable.Value))
+				else if (device.Position == AVCaptureDevicePosition.Back && (!options.UseFrontCameraIfAvailable.HasValue || !options.UseFrontCameraIfAvailable.Value))
 					break; //Back camera succesfully set
 			}
 			if (captureDevice == null){


Squashing changes into one commit

Squashing changes into one commit

Allow custom properties to be added to payload
added special character handling
changed tabs to spaces

--- Log4Netly/LogglyAppender.cs
+++ Log4Netly/LogglyAppender.cs
@@ -2,7 +2,9 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Dynamic;
+using System.Linq;
 using System.Net.Http;
+using System.Text;
 using log4net.Appender;
 using log4net.Core;
 using Newtonsoft.Json;
@@ -61,6 +63,13 @@
             payload.message = loggingEvent.RenderedMessage;
             payload.logger = loggingEvent.LoggerName;

+            //If any custom properties exist, add them to the dynamic object
+            //i.e. if someone added loggingEvent.Properties["xx:traceId"] = "helloWorld"
+            foreach (var key in loggingEvent.Properties.GetKeys())
+            {
+                ((IDictionary<string, object>)payload)[RemoveSpecialCharacters(key)] = loggingEvent.Properties[key];
+            }
+
             var exception = loggingEvent.ExceptionObject;
             if (exception != null) {
                 payload.exception = new ExpandoObject();
@@ -80,5 +89,15 @@
             var payloadJson = JsonConvert.SerializeObject(payload);
             var response = client.PostAsync(url, new StringContent(payloadJson));
         }
+
+        private static string RemoveSpecialCharacters(string str)
+        {
+            var sb = new StringBuilder(str.Length);
+            foreach (var c in str.Where(c => (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_'))
+            {
+                sb.Append(c);
+            }
+            return sb.ToString();
+        }
     }
 }


Limit resolutions before animation to avoid needless animation

From the users's perspective this caused a short delay after zooming to the highest level.

--- Mapsui.UI.Wpf/MapControl.cs
+++ Mapsui.UI.Wpf/MapControl.cs
@@ -226,6 +226,8 @@
                 _toResolution = ZoomHelper.ZoomOut(_map.Resolutions, _toResolution);
             }

+            _toResolution = Map.Limiter.LimitResolution(_toResolution, Viewport.Width, Viewport.Height, Map.Resolutions, Map.Envelope);
+
             // Some cheating to trigger a zoom animation if resolution does not change.
             // This workaround could be ommitted if the zoom animations was on CenterX, CenterY and Resolution, not Resolution alone.
             // todo: Remove this workaround once animations are centralized.


Minor improvements to comment.

Minor improvements to comment.

--- Moritz.Spec/MidiChordDef.cs
+++ Moritz.Spec/MidiChordDef.cs
@@ -129,7 +129,7 @@
 		/// <summary>
 		/// Returns a new, ornamented MidiChordDef having msDuration, whose BasicMidiChordDefs are created from the MidiChordDefs
 		/// and RestDefs in the iUniqueDefs argument. Condition: The first iUniqueDef in the iUnqueDefs must be a MidiChordDef.
-		/// BasicMidiChordDefs created from MidiChordDefs are the MidiChordDef's BasicMidiChordDef[0].
+		/// BasicMidiChordDefs created from MidiChordDefs are that MidiChordDef's BasicMidiChordDef[0].
 		/// BasicMidiChordDefs created from RestDefs have a single (un-notated) pitch (=0) and velocity=0.
 		/// The durations of the returned BasicMidiChordDefs are in proportion to the durations of the MidiChordDefs and RestDefs
 		/// in the iUniqueDefs.
@@ -137,7 +137,7 @@
 		/// </summary>
 		/// <param name="msDuration">The duration of the returned MidiChordDef</param>
 		/// <param name="iUniqueDefs">See function summary.</param>
-		/// <param name="ornamentID">Usually a single character. Will be appended to a tilde, and added to the chord symbol - usually above.</param>
+		/// <param name="ornamentID">Usually a single character. Will be appended to a tilde, and added (usually above) to the chord symbol.</param>
 		public MidiChordDef(int msDuration, List<IUniqueDef> iUniqueDefs, string ornamentID)
 			:base(msDuration)
 		{


Implement removing coin configurations

Implement removing coin configurations

--- MultiMiner.Win/CoinsForm.cs
+++ MultiMiner.Win/CoinsForm.cs
@@ -43,6 +43,13 @@
         private void removeCoinButton_Click(object sender, EventArgs e)
         {

+            DialogResult promptResult = MessageBox.Show("Remove the selected coin configuration?", "Confirm", MessageBoxButtons.YesNo);
+            if (promptResult == System.Windows.Forms.DialogResult.Yes)
+            {
+                CoinConfiguration configuration = configurations[coinListBox.SelectedIndex];
+                configurations.Remove(configuration);
+                coinListBox.Items.RemoveAt(coinListBox.SelectedIndex);
+            }
         }

         private void PopulateConfigurations()


Update Fact Skip for not work tests for FileSystemProvider xunit test

--- test/csharp/test_FileSystemProvider.cs
+++ test/csharp/test_FileSystemProvider.cs
@@ -1,16 +1,42 @@
 using Xunit;
 using System;
 using System.Collections.ObjectModel;
+using System.Globalization;
 using System.IO;
+using System.Linq;
 using System.Management.Automation;
+using System.Management.Automation.Host;
+using System.Management.Automation.Internal;
+using System.Management.Automation.Internal.Host;
 using System.Management.Automation.Provider;
+using System.Management.Automation.Runspaces;
+using Microsoft.PowerShell;
 using Microsoft.PowerShell.Commands;
+using Microsoft.PowerShell.Linux.Host;

 namespace PSTests
 {
     [Collection("AssemblyLoadContext")]
     public static class FileSystemProviderTests
     {
+		private static ProviderInfo GetProvider()
+        {
+			CultureInfo currentCulture = CultureInfo.CurrentCulture;
+            PSHost hostInterface =  new DefaultHost(currentCulture,currentCulture);
+            RunspaceConfiguration runspaceConfiguration =  RunspaceConfiguration.Create();
+            InitialSessionState iss = InitialSessionState.CreateDefault2();
+
+            AutomationEngine engine = new AutomationEngine(hostInterface, runspaceConfiguration, iss);
+            ExecutionContext executionContext = new ExecutionContext(engine, hostInterface, iss);
+            SessionStateInternal sessionState = new SessionStateInternal(executionContext);
+
+			SessionStateProviderEntry providerEntry = new SessionStateProviderEntry("FileSystem",typeof(FileSystemProvider), null);
+			sessionState.AddSessionStateEntry(providerEntry);
+            ProviderInfo matchingProvider = sessionState.ProviderList.ToList()[0];
+
+            return matchingProvider;
+        }
+
         [Fact]
         public static void TestCreateJunctionFails()
         {
@@ -34,48 +60,57 @@
 			Assert.NotEqual(FileSystemProvider.Mode(PSObject.AsPSObject(fileSystemObject)),String.Empty);
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestGetProperty()
         {
-			//FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			//fileSystemProvider.GetProperty(@"/", new Collection<string>(){"Attributes"});
+			string path = @"/filesystemobject1";
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			ProviderInfo providerInfoToSet = GetProvider();
+			fileSystemProvider.SetProviderInformation(providerInfoToSet);
+			FileInfo fileSystemObject1 = new FileInfo(path);
+			fileSystemProvider.SetProperty(path, PSObject.AsPSObject(fileSystemObject1));
+			fileSystemProvider.GetProperty(path, new Collection<string>(){"Attributes"});
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestSetProperty()
         {
-			//FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			//fileSystemProvider.SetProperty(@"/root", PSObject.AsPSObject(propertyToSet));
+			string path = @"/filesystemobject1";
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			ProviderInfo providerInfoToSet = GetProvider();
+			fileSystemProvider.SetProviderInformation(providerInfoToSet);
+			FileInfo fileSystemObject1 = new FileInfo(path);
+			fileSystemProvider.SetProperty(@"/root", PSObject.AsPSObject(fileSystemObject1));
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestClearProperty()
         {
-			// FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			// fileSystemProvider.ClearProperty(@"/test", new Collection<string>(){"Attributes"});
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			fileSystemProvider.ClearProperty(@"/test", new Collection<string>(){"Attributes"});
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestGetContentReader()
         {
-			// FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			// IContentReader contentReader = fileSystemProvider.GetContentReader(@"/test");
-			// Assert.NotNull(contentReader);
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			IContentReader contentReader = fileSystemProvider.GetContentReader(@"/test");
+			Assert.NotNull(contentReader);
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestGetContentWriter()
         {
-			// FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			// IContentWriter contentWriter = fileSystemProvider.GetContentWriter(@"/test");
-			// Assert.NotNull(contentWriter);
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			IContentWriter contentWriter = fileSystemProvider.GetContentWriter(@"/test");
+			Assert.NotNull(contentWriter);
         }

-		[Fact]
+		[Fact(Skip = "Need mock")]
         public static void TestClearContent()
         {
-			//FileSystemProvider fileSystemProvider = new FileSystemProvider();
-			//fileSystemProvider.ClearContent(@"/test");
+			FileSystemProvider fileSystemProvider = new FileSystemProvider();
+			fileSystemProvider.ClearContent(@"/test");
         }
     }
 }


Change: prio parser: inner loop is controlled by parsed item instead of result

--- src/hw.nuget/hw.CompilerTools/Parser/PrioParser.cs
+++ src/hw.nuget/hw.CompilerTools/Parser/PrioParser.cs
@@ -1,11 +1,12 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using hw.Debug;
 using hw.Scanner;

 namespace hw.Parser
 {
-    public sealed class PrioParser<TTreeItem> : IParser<TTreeItem>
+    public sealed class PrioParser<TTreeItem> : DumpableObject, IParser<TTreeItem>
         where TTreeItem : class
     {
         readonly PrioTable _prioTable;
@@ -51,8 +52,8 @@
                         continue;

                     stack.Push(new OpenItem<TTreeItem>(result, item));
-                    result = null;
-                } while(result != null);
+                    item = null;
+                } while(item != null);
             } while(true);
         }


[packages,Publisher] Corrected recursive switch for cp

--- packages/Publisher/bam/Scripts/CopyFileSettings/CommandLine/ICopyFileSettings.cs
+++ packages/Publisher/bam/Scripts/CopyFileSettings/CommandLine/ICopyFileSettings.cs
@@ -65,7 +65,7 @@
                 }
                 if (settings.Recursive)
                 {
-                    commandLine.Add("-r");
+                    commandLine.Add("-R");
                 }
             }
         }


Fixing merge result

Fixing merge result

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@2616 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- ActiveRecord/Castle.ActiveRecord/Framework/SessionScopeWebModule.cs
+++ ActiveRecord/Castle.ActiveRecord/Framework/SessionScopeWebModule.cs
@@ -40,6 +40,11 @@
 		/// The key used to store the session in the context items
 		/// </summary>
 		protected static readonly String SessionKey = "SessionScopeWebModule.session";
+
+		/// <summary>
+		/// Used to check whether the ThreadScopeInfo being used is suitable for a web environment
+		/// </summary>
+		private static bool isWebConfigured;

 		/// <summary>
 		/// Initialize the module.


fix out of range

fix out of range

--- Assets/PerfAssist/ResourceTracker/Editor/PAContrib/MemObjHistory.cs
+++ Assets/PerfAssist/ResourceTracker/Editor/PAContrib/MemObjHistory.cs
@@ -33,7 +33,7 @@

     public ThingInMemory TryGetPrev()
     {
-        if (_history.Count == 0 || _cursor == 0 || _cursor == -1)
+        if (_history.Count == 0 || _cursor == 0 || _cursor == -1 || _cursor >= _history.Count)
             return null;

         return _history[_cursor - 1];


Finished the compress method.

Finished the compress method.

--- CommandEverything/DataStorage/Compression/CompressionA/CompressA.cs
+++ CommandEverything/DataStorage/Compression/CompressionA/CompressA.cs
@@ -30,18 +30,22 @@

             while (i != size)
             {
-                string item = CompressionDictionary.ElementAt(size - 1).Key;
-                //search for it and replace it.
+                string key = CompressionDictionary.ElementAt(size - 1).Key;
+                string value = CompressionDictionary.ElementAt(size - 1).Value;
+
+                Binary = Binary.Replace(key, value);
+
                 i++;
             }

-            foreach (string item in CompressionDictionary.ElementAt Reverse())
-            {
-
-            }
-            //Write compression logic here
+            return Binary;
         }

+        /// <summary>
+        /// Decompresses the given string.
+        /// </summary>
+        /// <param name="ToDecompress"></param>
+        /// <returns></returns>
         public static string Decompress(string ToDecompress)
         {


NG ユーザーの削除で例外が発生する問題を修正

NG ユーザーの削除で例外が発生する問題を修正

--- source/AskMonaViewer/Dialogs/ViewNGUsersDialog.cs
+++ source/AskMonaViewer/Dialogs/ViewNGUsersDialog.cs
@@ -46,6 +46,9 @@

         private async void Delete_ToolStripMenuItem_Click(object sender, EventArgs e)
         {
+            if (listViewEx1.SelectedItems.Count == 0)
+                return;
+
             var ngUser = (User)listViewEx1.SelectedItems[0].Tag;
             var result = await mApi.DeleteNGUserAsync(ngUser.UserId);
             if (result != null)


fix start method description in c# (lib)

--- src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
+++ src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
@@ -997,21 +997,25 @@
         UInt64 task_id,
         UInt64 project_id,
         [MarshalAs(UnmanagedType.LPWStr)]
-        string project_guid);
+        string project_guid,
+        [MarshalAs(UnmanagedType.LPWStr)]
+        string tags);

     public static string Start(
         string description,
         string duration,
         UInt64 task_id,
         UInt64 project_id,
-        string project_guid)
+        string project_guid,
+        string tags)
     {
         return toggl_start(ctx,
                            description,
                            duration,
                            task_id,
                            project_id,
-                           project_guid);
+                           project_guid,
+                           tags);
     }

     [DllImport(dll, CharSet = charset, CallingConvention = convention)]


comment spacing

comment spacing

--- Jil/Deserialize/InlineDeserializer.cs
+++ Jil/Deserialize/InlineDeserializer.cs
@@ -1449,7 +1449,7 @@
             if (propertyMap.Count == 0)
             {
                 Emit.NewObject(cons);           // objType
-                Emit.Branch(doneNotNull);          // objType
+                Emit.Branch(doneNotNull);       // objType

                 Emit.MarkLabel(doneNull);       // null
                 Emit.LoadNull();                // null


fix: Implement parser to get tests passing

--- lib/Bugsnag.Common/StacktraceLineParser.cs
+++ lib/Bugsnag.Common/StacktraceLineParser.cs
@@ -9,19 +9,41 @@
 {
     public class StacktraceLineParser
     {
+        Regex _fileRegex = new Regex("\\) [^ ]+ (.+):");
         public string ParseFile(string line)
         {
-            throw new NotImplementedException();
+            var match = _fileRegex.Match(line);
+
+            if (match.Groups.Count < 2) { return ""; }
+
+            return match.Groups[1].Value;
         }

+        Regex _methodNameRegex = new Regex("^ *[^ ]+ (.+\\))");
         public string ParseMethodName(string line)
         {
-            throw new NotImplementedException();
+            var match = _methodNameRegex.Match(line);
+
+            if (match.Groups.Count < 2) { return line; }
+
+            return match.Groups[1].Value;
         }

+        Regex _lineNumberRegex = new Regex(":.+ ([0-9]+)$");
         public int? ParseLineNumber(string line)
         {
-            throw new NotImplementedException();
+            var match = _lineNumberRegex.Match(line);
+
+            if (match.Groups.Count < 2) { return null; }
+
+            if (int.TryParse(match.Groups[1].Value, out var lineNumber))
+            {
+                return lineNumber;
+            }
+            else
+            {
+                return null;
+            }
         }
     }
 }


Fixed glitchy output when the output signal is also being probed

--- LiveSPICE/TransientSimulation.xaml.cs
+++ LiveSPICE/TransientSimulation.xaml.cs
@@ -29,7 +29,7 @@
             set { oversample = value; Build(); NotifyChanged("Oversample"); }
         }

-        protected int iterations = 1;
+        protected int iterations = 8;
         public int Iterations
         {
             get { return iterations; }
@@ -224,7 +224,7 @@
                     simulation.Run(Input, Samples, output, arguments, Iterations);

                     // Show the samples on the oscilloscope.
-                    oscilloscope.ProcessSignals(Samples.Length, output, new Circuit.Quantity(Rate, Circuit.Units.Hz));
+                    oscilloscope.ProcessSignals(Samples.Length, probes, new Circuit.Quantity(Rate, Circuit.Units.Hz));
                 }

                 // Apply output gain.


Hide QX10 and QX100 from gallery screen

Hide QX10 and QX100 from gallery screen

--- Locana/Pages/ContentsGridPage.xaml.cs
+++ Locana/Pages/ContentsGridPage.xaml.cs
@@ -226,18 +226,20 @@
                 menu.Items.Add(item);
             });

-            NetworkObserver.INSTANCE.CdsDevices.Where(upnp =>
-            {
-                return upnp.UDN != RemoteStorageId;
-            }).ToList().ForEach(upnp =>
-            {
-                var item = new RemoteStorageMenuFlyoutItem(upnp.UDN, StorageType.Dlna)
-                {
-                    Text = upnp.FriendlyName,
-                };
-                item.Tapped += RemoteStorage_Tapped;
-                menu.Items.Add(item);
-            });
+            NetworkObserver.INSTANCE.CdsDevices
+                .Where(upnp => upnp.UDN != RemoteStorageId)
+                .Where(upnp => upnp.FriendlyName != "DSC-QX10")
+                .Where(upnp => upnp.FriendlyName != "DSC-QX100")
+                .ToList()
+                .ForEach(upnp =>
+                {
+                    var item = new RemoteStorageMenuFlyoutItem(upnp.UDN, StorageType.Dlna)
+                    {
+                        Text = upnp.FriendlyName,
+                    };
+                    item.Tapped += RemoteStorage_Tapped;
+                    menu.Items.Add(item);
+                });

             return menu;
         }


Added comments to LogoFX.Client.Modularity package

--- LogoFX.Client.Modularity/IUiModule.cs
+++ LogoFX.Client.Modularity/IUiModule.cs
@@ -3,19 +3,41 @@

 namespace LogoFX.Client.Modularity
 {
+    /// <summary>
+    /// Represents user interface composition module
+    /// </summary>
     public interface IUiModule : ICompositionModule
     {
+        /// <summary>
+        /// Module ID
+        /// </summary>
         string Id { get; }

+        /// <summary>
+        /// Module display name
+        /// </summary>
         string Name { get; }

+        /// <summary>
+        /// Module display order
+        /// </summary>
         int Order { get; }
     }

+    /// <summary>
+    /// Respresents user interface composition module with root view model
+    /// </summary>
+    /// <typeparam name="TRootViewModel">Type of Root ViewModel</typeparam>
     public interface IUiModule<out TRootViewModel> : IUiModule
     {
+        /// <summary>
+        /// Root ViewModel
+        /// </summary>
         TRootViewModel RootViewModel { get; }

+        /// <summary>
+        /// Explicit type of Root ViewModel
+        /// </summary>
         Type RootModelType { get; }
     }
 }


introduce ShowWindowButtonCommandsOnHiddenTitleBar

--- MahApps.Metro/Controls/MetroWindow.cs
+++ MahApps.Metro/Controls/MetroWindow.cs
@@ -46,6 +46,8 @@
         public static readonly DependencyProperty ShowMaxRestoreButtonProperty = DependencyProperty.Register("ShowMaxRestoreButton", typeof(bool), typeof(MetroWindow), new PropertyMetadata(true));
         public static readonly DependencyProperty ShowCloseButtonProperty = DependencyProperty.Register("ShowCloseButton", typeof(bool), typeof(MetroWindow), new PropertyMetadata(true));

+        public static readonly DependencyProperty ShowWindowButtonCommandsOnHiddenTitleBarProperty = DependencyProperty.Register("ShowWindowButtonCommandsOnHiddenTitleBar", typeof(bool), typeof(MetroWindow), new PropertyMetadata(true));
+
         public static readonly DependencyProperty ShowSystemMenuOnRightClickProperty = DependencyProperty.Register("ShowSystemMenuOnRightClick", typeof(bool), typeof(MetroWindow), new PropertyMetadata(true));

         public static readonly DependencyProperty TitlebarHeightProperty = DependencyProperty.Register("TitlebarHeight", typeof(int), typeof(MetroWindow), new PropertyMetadata(30, TitlebarHeightPropertyChangedCallback));
@@ -380,6 +382,15 @@
         }

         /// <summary>
+        /// Gets/sets whether the Window Button Commands will show if the TitleBar is hidden.
+        /// </summary>
+        public bool ShowWindowButtonCommandsOnHiddenTitleBar
+        {
+            get { return (bool)GetValue(ShowWindowButtonCommandsOnHiddenTitleBarProperty); }
+            set { SetValue(ShowWindowButtonCommandsOnHiddenTitleBarProperty, value); }
+        }
+
+        /// <summary>
         /// Gets/sets if the the system menu should popup on right click.
         /// </summary>
         public bool ShowSystemMenuOnRightClick
@@ -432,7 +443,8 @@
             }
             if (this.WindowButtonCommands != null)
             {
-                this.WindowButtonCommands.Visibility = newVisibility;
+                var windowCommandsVisibility = ShowWindowButtonCommandsOnHiddenTitleBar ? Visibility.Visible : newVisibility;
+                this.WindowButtonCommands.Visibility = windowCommandsVisibility;
             }

             SetWindowEvents();


"Fix" importing members in generic types in .NET Core 1.X

--- MonoMod.Utils/MMReflectionImporter.cs
+++ MonoMod.Utils/MMReflectionImporter.cs
@@ -211,7 +211,6 @@
 #else
                 // ... unless we're targetting .NET Standard 1.X.
                 // FIXME: Implement resolving the generic declaring type's definition field definition.
-                throw new NotSupportedException();
 #endif
             }

@@ -261,7 +260,6 @@
 #else
                 // ... unless we're targetting .NET Standard 1.X.
                 // FIXME: Implement resolving the generic declaring type's definition method definition.
-                throw new NotSupportedException();
 #endif
             }


null check for MessageObject

null check for MessageObject

--- src/log4net.ElasticSearch/ElasticSearchAppender.cs
+++ src/log4net.ElasticSearch/ElasticSearchAppender.cs
@@ -42,9 +42,9 @@
             logEvent.Identity = loggingEvent.Identity;
             logEvent.ThreadName = loggingEvent.ThreadName;
             logEvent.UserName = loggingEvent.UserName;
-            logEvent.MessageObject = loggingEvent.MessageObject.ToString();
+            logEvent.MessageObject = loggingEvent.MessageObject == null ? "" : loggingEvent.MessageObject.ToString();
             logEvent.TimeStamp = loggingEvent.TimeStamp;
-            logEvent.Exception = loggingEvent.ExceptionObject.ToString();
+            logEvent.Exception = loggingEvent.ExceptionObject == null ? "" : loggingEvent.MessageObject.ToString();
             logEvent.Message = loggingEvent.RenderedMessage;
             logEvent.Fix = loggingEvent.Fix.ToString();


fix push and check color32

fix push and check color32

--- Assets/Plugins/Slua_Managed/LuaObject_overload.cs
+++ Assets/Plugins/Slua_Managed/LuaObject_overload.cs
@@ -159,6 +159,10 @@
 		{
 			LuaDLL.luaS_pushColor(l, o.r, o.g, o.b, o.a);
 		}
+
+		public static void pushValue(IntPtr l, Color32 c32) {
+			pushObject(l, c32);
+		}
 	}
 }
 #endif


Add preview move upon click, no longer confirm upon click

--- Assets/Resources/Scripts/game/model/GlobalGame.cs
+++ Assets/Resources/Scripts/game/model/GlobalGame.cs
@@ -148,7 +148,7 @@
     {
         if (!(ActivePlayer() is AI))
         {
-            Play((Spot)o);
+            Preview((Spot)o);
         }
     }


Update NetworkingController.cs

Update NetworkingController.cs

--- Assets/Scripts/Networking/NetworkingController.cs
+++ Assets/Scripts/Networking/NetworkingController.cs
@@ -217,7 +217,7 @@

     if (nickName.IsNullOrEmpty())
     {
-      throw new System.Exception("No nick name set. Play multiplayer at least once while signed in to Steam.");
+      nickName = "Player";
     }

     props[(object)SteamProfileNamePlayerProperty] = nickName;  // This may be redundant given we set the playerName/NickName.


Extra rewording

Extra rewording

--- osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs
+++ osu.Framework.Tests/Visual/Input/TestSceneTouchInput.cs
@@ -195,7 +195,7 @@
                 InputManager.BeginTouch(new Touch(firstReceptor.AssociatedSource, getTouchDownPos(firstReceptor.AssociatedSource)));
             });

-            AddAssert("received correct down event on first", () =>
+            AddAssert("received mouse-down event on first", () =>
             {
                 // event #1: move mouse to first touch position.
                 if (!(firstReceptor.MouseEvents.TryDequeue(out MouseEvent me1) && me1 is MouseMoveEvent mouseMove))


it wont get invoked anyway

it wont get invoked anyway

--- Assets/UniHttp/Support/Connection/DispatchInfo.cs
+++ Assets/UniHttp/Support/Connection/DispatchInfo.cs
@@ -6,8 +6,8 @@
 	public class DispatchInfo : IDisposable
 	{
 		readonly internal HttpRequest request;
+        readonly Action<HttpResponse> onResponse;
 		readonly internal CancellationToken cancellationToken;
-        Action<HttpResponse> onResponse;

 		public bool IsDisposed { get; private set; }

@@ -31,8 +31,6 @@

 		public void Dispose()
 		{
-            this.onResponse = null;
-
             if(!IsDisposed) {
 				IsDisposed = true;
 			}


Resolve test failure

Resolve test failure

--- osu.Game.Tests/Visual/Ranking/TestSceneResultsScreen.cs
+++ osu.Game.Tests/Visual/Ranking/TestSceneResultsScreen.cs
@@ -326,7 +326,7 @@
             public HotkeyRetryOverlay RetryOverlay;

             public UnrankedSoloResultsScreen(ScoreInfo score)
-                : base(score, false)
+                : base(score, true)
             {
                 Score.Beatmap.OnlineBeatmapID = 0;
                 Score.Beatmap.Status = BeatmapSetOnlineStatus.Pending;


Removed UdpStream.Copy

Removed UdpStream.Copy

Removed UdpStream.Copy as the way it functions is incredibly unintuitive

--- src/managed/udpkit/udpStream.cs
+++ src/managed/udpkit/udpStream.cs
@@ -84,13 +84,6 @@
             Array.Clear(Data, 0, Data.Length);
         }

-        public void Copy (UdpStream stream) {
-            Ptr = stream.Ptr;
-            Length = stream.Length;
-
-            Array.Copy(stream.Data, 0, Data, 0, stream.Data.Length);
-        }
-
         public bool WriteBool (bool value) {
 #if TRACE_RW
             if (UdpLog.IsEnabled(UdpLog.TRACE))


unityModularization: name update

unityModularization: name update

--- Assets/Votyra/Core.Editor/ScheduledSubjectTest.cs
+++ Assets/Votyra/Core.Editor/ScheduledSubjectTest.cs
@@ -16,7 +16,7 @@
     public class ScheduledSubjectTest
     {
         [Test]
-        public void QueuedSubject_OnNext_HandlersAreSerialized()
+        public void ScheduledSubject_OnNext_HandlersAreSerialized()
         {
             TestUtils.UnityAsyncTest(async () =>
             {
@@ -67,7 +67,7 @@
         }

         [Test]
-        public void QueuedSubjects_CircullarConnection_CombinedValueIsCorrect()
+        public void ScheduledSubject_CircullarConnection_CombinedValueIsCorrect()
         {

             TestUtils.UnityAsyncTest(async () =>


Add failing test case

Add failing test case

--- osu.Game.Tests/Visual/Ranking/TestSceneResultsScreen.cs
+++ osu.Game.Tests/Visual/Ranking/TestSceneResultsScreen.cs
@@ -17,10 +17,13 @@
 using osu.Game.Graphics.UserInterface;
 using osu.Game.Online.API;
 using osu.Game.Rulesets;
+using osu.Game.Rulesets.Difficulty;
+using osu.Game.Rulesets.Osu;
 using osu.Game.Scoring;
 using osu.Game.Screens;
 using osu.Game.Screens.Play;
 using osu.Game.Screens.Ranking;
+using osu.Game.Screens.Ranking.Expanded.Statistics;
 using osu.Game.Screens.Ranking.Statistics;
 using osu.Game.Tests.Resources;
 using osuTK;
@@ -256,6 +259,23 @@
             AddAssert("download button is enabled", () => screen.ChildrenOfType<DownloadButton>().Last().Enabled.Value);
         }

+        [Test]
+        public void TestRulesetWithNoPerformanceCalculator()
+        {
+            var ruleset = new RulesetWithNoPerformanceCalculator();
+            var score = TestResources.CreateTestScoreInfo(ruleset.RulesetInfo);
+
+            AddStep("load results", () => Child = new TestResultsContainer(createResultsScreen(score)));
+            AddUntilStep("wait for load", () => this.ChildrenOfType<ScorePanelList>().Single().AllPanelsVisible);
+
+            AddAssert("PP displayed as 0", () =>
+            {
+                var performance = this.ChildrenOfType<PerformanceStatistic>().Single();
+                var counter = performance.ChildrenOfType<StatisticCounter>().Single();
+                return counter.Current.Value == 0;
+            });
+        }
+
         private TestResultsScreen createResultsScreen(ScoreInfo score = null) => new TestResultsScreen(score ?? TestResources.CreateTestScoreInfo());

         private UnrankedSoloResultsScreen createUnrankedSoloResultsScreen() => new UnrankedSoloResultsScreen(TestResources.CreateTestScoreInfo());
@@ -367,5 +387,10 @@
                 RetryOverlay = InternalChildren.OfType<HotkeyRetryOverlay>().SingleOrDefault();
             }
         }
+
+        private class RulesetWithNoPerformanceCalculator : OsuRuleset
+        {
+            public override PerformanceCalculator CreatePerformanceCalculator(DifficultyAttributes attributes, ScoreInfo score) => null;
+        }
     }
 }


Set all progress notifications to non-important

--- osu.Game/Overlays/Notifications/ProgressNotification.cs
+++ osu.Game/Overlays/Notifications/ProgressNotification.cs
@@ -162,6 +162,8 @@

         public override bool DisplayOnTop => false;

+        public override bool IsImportant => false;
+
         private readonly ProgressBar progressBar;
         private Color4 colourQueued;
         private Color4 colourActive;


Fix checkmarks not showing on editor stateful menu items

--- osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs
+++ osu.Game/Screens/Edit/Components/Menus/EditorMenuBar.cs
@@ -110,8 +110,28 @@
                     case EditorMenuItemSpacer spacer:
                         return new DrawableSpacer(spacer);

+                    case StatefulMenuItem stateful:
+                        return new EditorStatefulMenuItem(stateful);
+
                     default:
                         return new EditorMenuItem(item);
+                }
+            }
+
+            private class EditorStatefulMenuItem : DrawableStatefulMenuItem
+            {
+                public EditorStatefulMenuItem(StatefulMenuItem item)
+                    : base(item)
+                {
+                }
+
+                [BackgroundDependencyLoader]
+                private void load(OverlayColourProvider colourProvider)
+                {
+                    BackgroundColour = colourProvider.Background2;
+                    BackgroundColourHover = colourProvider.Background1;
+
+                    Foreground.Padding = new MarginPadding { Vertical = 2 };
                 }
             }


Fix swap

Fix swap

--- Binance.Net/SubClients/BinanceClientLiquidSwap.cs
+++ Binance.Net/SubClients/BinanceClientLiquidSwap.cs
@@ -252,7 +252,7 @@
             {
                 {"quoteAsset", quoteAsset},
                 {"baseAsset", baseAsset},
-                {"quoteQuantity",quoteQuantity.ToString(CultureInfo.InvariantCulture)},
+                {"quoteQty",quoteQuantity.ToString(CultureInfo.InvariantCulture)},
                 {"timestamp", _baseClient.GetTimestamp()}
             };
             parameters.AddOptionalParameter("recvWindow", receiveWindow?.ToString(CultureInfo.InvariantCulture) ?? _baseClient.DefaultReceiveWindow.TotalMilliseconds.ToString(CultureInfo.InvariantCulture));


add twofactorauth.org to CSP

add twofactorauth.org to CSP

--- util/Setup/NginxConfigBuilder.cs
+++ util/Setup/NginxConfigBuilder.cs
@@ -10,7 +10,8 @@
             "default-src 'self'; style-src 'self' 'unsafe-inline'; " +
             "img-src 'self' data: https://haveibeenpwned.com https://www.gravatar.com; " +
             "child-src 'self' https://*.duosecurity.com; frame-src 'self' https://*.duosecurity.com; " +
-            "connect-src 'self' wss://{0} https://haveibeenpwned.com https://api.pwnedpasswords.com; " +
+            "connect-src 'self' wss://{0} https://haveibeenpwned.com https://api.pwnedpasswords.com " +
+            "https://twofactorauth.org; " +
             "object-src 'self' blob:;";

         private readonly Context _context;


Features/FeatureDictionary.cs documentation changes

--- src/Abp/Application/Features/FeatureDictionary.cs
+++ src/Abp/Application/Features/FeatureDictionary.cs
@@ -9,7 +9,7 @@
     public class FeatureDictionary : Dictionary<string, Feature>
     {
         /// <summary>
-        /// Adds all child features of current features recursively.
+        /// Adds all the child features of the current features, recursively.
         /// </summary>
         public void AddAllFeatures()
         {
@@ -21,9 +21,8 @@

         private void AddFeatureRecursively(Feature feature)
         {
-            //Prevent multiple adding of same named feature.
-            Feature existingFeature;
-            if (TryGetValue(feature.Name, out existingFeature))
+            //Prevent multiple additions of the same-named feature.
+            if (TryGetValue(feature.Name, out var existingFeature))
             {
                 if (existingFeature != feature)
                 {


Use Anonymous AuthenticationScheme by default instead of None for backward compatibility

--- src/mindtouch.core/DreamHost.cs
+++ src/mindtouch.core/DreamHost.cs
@@ -96,7 +96,7 @@
             string appDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
             int limit = config["connect-limit"].AsInt ?? 0;
             int httpPort = config["http-port"].AsInt ?? DEFAULT_PORT;
-            AuthenticationSchemes authenticationScheme = AuthenticationSchemes.None;
+            AuthenticationSchemes authenticationScheme = AuthenticationSchemes.Anonymous;
             string authShemes = config["authentication-shemes"].AsText;
             if (!String.IsNullOrEmpty (authShemes)) {
                 try {


Got rid of warnings.

Got rid of warnings.

--- CacheTempData.Tests/CacheTempDataProviderTests.cs
+++ CacheTempData.Tests/CacheTempDataProviderTests.cs
@@ -34,7 +34,7 @@

             cacheMock.Verify(c => c.Set(
                 It.Is<string>(s => s.StartsWith("[XperiCode.CacheTempData.SessionId].[")),
-                It.Is<CacheTempDataItem>(i => i.Data["name"] == "John Doe"),
+                It.Is<CacheTempDataItem>(i => Convert.ToString(i.Data["name"]) == "John Doe"),
                 null,
                 null), Times.Once);
         }
@@ -62,7 +62,7 @@

             cacheMock.Verify(c => c.Set(
                 It.Is<string>(s => s == string.Concat("[XperiCode.CacheTempData.SessionId].[", sessionId, "]")),
-                It.Is<CacheTempDataItem>(i => i.Data["name"] == "John Doe"),
+                It.Is<CacheTempDataItem>(i => Convert.ToString(i.Data["name"]) == "John Doe"),
                 null,
                 null), Times.Once);
         }
@@ -97,7 +97,7 @@
             var values = provider.LoadTempData(controllerContextMock.Object);

             Assert.IsNotNull(values);
-            Assert.IsTrue(values["name"] == "John Doe");
+            Assert.IsTrue(Convert.ToString(values["name"]) == "John Doe");

             cacheMock.Verify(c => c.Remove(cacheKey, null), Times.Once);


Update Driver_Remote_WithOptions test

Update Driver_Remote_WithOptions test

--- src/Atata.Configuration.Json.Tests/DriverTests.cs
+++ src/Atata.Configuration.Json.Tests/DriverTests.cs
@@ -293,12 +293,6 @@
                 ["cap2"] = 5,
                 ["cap3"] = "str"
             });
-
-            //chromeCapabilities.Should().HaveCount(4);
-            //chromeCapabilities["detach"].Should().Be(true);
-            //chromeCapabilities["cap1"].Should().Be(true);
-            //chromeCapabilities["cap2"].Should().Be(5);
-            //chromeCapabilities["cap3"].Should().Be("str");
         }

         [Test]