fixes #5706 - standardize order on Properties, Validation, Bindings

--- src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/BindingsElementDriver.cs
+++ src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/BindingsElementDriver.cs
@@ -37,7 +37,7 @@

             var bindingsEditor = context.ShapeFactory.EditorTemplate(TemplateName: "FormBindings", Model: viewModel);

-            bindingsEditor.Metadata.Position = "Bindings:10";
+            bindingsEditor.Metadata.Position = "Bindings:20";

             return Editor(context, bindingsEditor);
         }


修改Demo

修改Demo

--- src/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Views/Menu/Index.cshtml
+++ src/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Views/Menu/Index.cshtml
@@ -75,7 +75,7 @@
             }

             #addConditionalArea h3, #reveiveJSON h3 {
-                font-size: 60%;
+                font-size: 16px;
                 margin-bottom: 20px;
             }


Add some comments to ProcessIOCPResult

Add some comments to ProcessIOCPResult

--- src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Windows.cs
+++ src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Windows.cs
@@ -98,6 +98,9 @@
                     FinishOperationSyncSuccess(bytesTransferred, SocketFlags.None);
                     return SocketError.Success;
                 }
+
+                // Completed synchronously, but the handle wasn't marked as skip completion port on success,
+                // so we still need to fall through and behave as if the IO was pending.
             }
             else
             {
@@ -105,9 +108,12 @@
                 SocketError socketError = SocketPal.GetLastSocketError();
                 if (socketError != SocketError.IOPending)
                 {
+                    // Completed synchronously with a failure.
                     FinishOperationSyncFailure(socketError, bytesTransferred, SocketFlags.None);
                     return socketError;
                 }
+
+                // Fall through to IOPending handling for asynchronous completion.
             }

             // Socket handle is going to post a completion to the completion port (may have done so already).
@@ -128,6 +134,9 @@
                     FinishOperationSyncSuccess(bytesTransferred, SocketFlags.None);
                     return SocketError.Success;
                 }
+
+                // Completed synchronously, but the handle wasn't marked as skip completion port on success,
+                // so we still need to fall through and behave as if the IO was pending.
             }
             else
             {
@@ -135,10 +144,13 @@
                 socketError = SocketPal.GetLastSocketError();
                 if (socketError != SocketError.IOPending)
                 {
+                    // Completed synchronously with a failure.
                     _singleBufferHandleState = SingleBufferHandleState.None;
                     FinishOperationSyncFailure(socketError, bytesTransferred, SocketFlags.None);
                     return socketError;
                 }
+
+                // Fall through to IOPending handling for asynchronous completion.
             }

             // Socket handle is going to post a completion to the completion port (may have done so already).


change :get the correct alternative recursive field

--- src/Umbraco.Web/umbraco.presentation/item.cs
+++ src/Umbraco.Web/umbraco.presentation/item.cs
@@ -62,60 +62,51 @@
             else
             {
                 // Loop through XML children we need to find the fields recursive
-                if (helper.FindAttribute(attributes, "recursive") == "true")
-                {
-                    if (publishedContent == null)
+                var recursive = helper.FindAttribute(attributes, "recursive") == "true";
+
+                if (publishedContent == null)
+                {
+                    var recursiveVal = GetRecursiveValueLegacy(elements);
+                    _fieldContent = recursiveVal.IsNullOrWhiteSpace() ? _fieldContent : recursiveVal;
+                }
+
+                //check for published content and get its value using that
+                if (publishedContent != null && (publishedContent.HasProperty(_fieldName) || recursive))
+                {
+                    var pval = publishedContent.GetPropertyValue(_fieldName, recursive);
+                    var rval = pval == null ? string.Empty : pval.ToString();
+                    _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval;
+                }
+                else
+                {
+                    //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent)
+                    var elt = elements[_fieldName];
+                    if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false)
+                        _fieldContent = elt.ToString().Trim();
+                }
+
+                //now we check if the value is still empty and if so we'll check useIfEmpty
+                if (string.IsNullOrEmpty(_fieldContent))
+                {
+                    var altFieldName = helper.FindAttribute(attributes, "useIfEmpty");
+                    if (string.IsNullOrEmpty(altFieldName) == false)
                     {
-                        var recursiveVal = GetRecursiveValueLegacy(elements);
-                        _fieldContent = recursiveVal.IsNullOrWhiteSpace() ? _fieldContent : recursiveVal;
+                        if (publishedContent != null && (publishedContent.HasProperty(altFieldName) || recursive))
+                        {
+                            var pval = publishedContent.GetPropertyValue(altFieldName, recursive);
+                            var rval = pval == null ? string.Empty : pval.ToString();
+                            _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval;
+                        }
+                        else
+                        {
+                            //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent)
+                            var elt = elements[altFieldName];
+                            if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false)
+                                _fieldContent = elt.ToString().Trim();
+                        }
                     }
-                    else
-                    {
-					    var pval = publishedContent.GetPropertyValue(_fieldName, true);
-					    var rval = pval == null ? string.Empty : pval.ToString();
-					    _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval;
-                    }
-                }
-                else
-                {
-                    //check for published content and get its value using that
-                    if (publishedContent != null && publishedContent.HasProperty(_fieldName))
-                    {
-                        var pval = publishedContent.GetPropertyValue(_fieldName);
-                        var rval = pval == null ? string.Empty : pval.ToString();
-                        _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval;
-                    }
-                    else
-                    {
-                        //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent)
-                        var elt = elements[_fieldName];
-                        if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false)
-                            _fieldContent = elt.ToString().Trim();
-                    }
-
-                    //now we check if the value is still empty and if so we'll check useIfEmpty
-                    if (string.IsNullOrEmpty(_fieldContent))
-                    {
-                        var altFieldName = helper.FindAttribute(attributes, "useIfEmpty");
-                        if (string.IsNullOrEmpty(altFieldName) == false)
-                        {
-                            if (publishedContent != null && publishedContent.HasProperty(altFieldName))
-                            {
-                                var pval = publishedContent.GetPropertyValue(altFieldName);
-                                var rval = pval == null ? string.Empty : pval.ToString();
-                                _fieldContent = rval.IsNullOrWhiteSpace() ? _fieldContent : rval;
-                            }
-                            else
-                            {
-                                //get the vaue the legacy way (this will not parse locallinks, etc... since that is handled with ipublishedcontent)
-                                var elt = elements[altFieldName];
-                                if (elt != null && string.IsNullOrEmpty(elt.ToString()) == false)
-                                    _fieldContent = elt.ToString().Trim();
-                            }
-                        }
-                    }
-
-                }
+                }
+
             }

             ParseItem(attributes);


Disable IntelliCode line completions for integration tests

Fixes #56394

--- src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs
+++ src/VisualStudio/IntegrationTest/TestUtilities/VisualStudioInstanceFactory.cs
@@ -331,6 +331,9 @@
                 // Disable roaming settings to avoid interference from the online user profile
                 Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"ApplicationPrivateSettings\\Microsoft\\VisualStudio\" RoamingEnabled string \"1*System.Boolean*False\"")).WaitForExit();

+                // Disable IntelliCode line completions to avoid interference with argument completion testing
+                Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"ApplicationPrivateSettings\\Microsoft\\VisualStudio\\IntelliCode\" wholeLineCompletions string \"0*System.Int32*2\"")).WaitForExit();
+
                 // Disable background download UI to avoid toasts
                 Process.Start(CreateSilentStartInfo(vsRegEditExeFile, $"set \"{installationPath}\" {Settings.Default.VsRootSuffix} HKCU \"FeatureFlags\\Setup\\BackgroundDownload\" Value dword 0")).WaitForExit();


Simplify

Simplify

--- src/Workspaces/Core/Portable/FindSymbols/FindReferences/FindReferenceCache.cs
+++ src/Workspaces/Core/Portable/FindSymbols/FindReferences/FindReferenceCache.cs
@@ -181,12 +181,12 @@
             public ImmutableHashSet<string>? AliasNameSet;
             public ImmutableArray<SyntaxToken> ConstructorInitializerCache;

+            public readonly ConcurrentDictionary<SyntaxNode, SymbolInfo> SymbolInfoCache = new();
             public readonly ConcurrentDictionary<string, ImmutableArray<SyntaxToken>> IdentifierCache;
-            public readonly ConcurrentDictionary<SyntaxNode, SymbolInfo> SymbolInfoCache = new();

             public Entry(SemanticModel semanticModel)
             {
-                IdentifierCache = new ConcurrentDictionary<string, ImmutableArray<SyntaxToken>>(semanticModel.Language switch
+                IdentifierCache = new(comparer: semanticModel.Language switch
                 {
                     LanguageNames.VisualBasic => StringComparer.OrdinalIgnoreCase,
                     LanguageNames.CSharp => StringComparer.Ordinal,


Removed serializer test

Removed serializer test

--- tests/Exceptionless.Tests/SerializerTests.cs
+++ tests/Exceptionless.Tests/SerializerTests.cs
@@ -1,14 +1,9 @@
 using System;
 using System.Collections.Generic;
-using System.Text.Json;
-using Exceptionless.Core.Authorization;
 using Exceptionless.Core.Extensions;
 using Exceptionless.Core.Models;
 using Exceptionless.Core.Models.Data;
-using Exceptionless.Core.Utility;
 using Exceptionless.Serializer;
-using Exceptionless.Web.Models;
-using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Xunit;
@@ -96,20 +91,6 @@
             Assert.Equal("Hello", ev.Message);
             Assert.Equal("SomeVal", ev.Data["Blah"]);
         }
-
-        [Fact]
-        public void CanSerializeSimpleModel() {
-            var token = new NewToken {
-                OrganizationId = SampleDataService.TEST_ORG_ID,
-                ProjectId = SampleDataService.TEST_PROJECT_ID,
-                Scopes = new HashSet<string> { AuthorizationRoles.Client, AuthorizationRoles.User }
-            };
-
-            var settings = Core.Bootstrapper.ConfigureJsonSerializerOptions(new JsonSerializerOptions());
-            string json = System.Text.Json.JsonSerializer.Serialize(token, settings);
-            _logger.LogInformation(json);
-            ViewToken token2 = System.Text.Json.JsonSerializer.Deserialize<ViewToken>(json, settings);
-        }
     }

     public class SomeModel {


Test TryParse overload.

Test TryParse overload.

--- tests/Faithlife.Parsing.Tests/CommonTests.cs
+++ tests/Faithlife.Parsing.Tests/CommonTests.cs
@@ -5,11 +5,18 @@
 public class CommonTests
 {
 	[Fact]
-	public void ResultShouldAlwaysSucceed()
+	public void SuccessShouldAlwaysSucceed()
 	{
 		Parser.Success(true).TryParse("").ShouldSucceed(true, 0);
 		Parser.Success(true).TryParse("x").ShouldSucceed(true, 0);
 		Parser.Success(true).TryParse("xabc").ShouldSucceed(true, 0);
+	}
+
+	[Fact]
+	public void TryParseOverload()
+	{
+		Parser.Success(1).TryParse("", out var value).ShouldBe(true);
+		value.ShouldBe(1);
 	}

 	[Fact]


Add reminder comments.

Add reminder comments.

--- myLocalFarm/test/farmApi.Test/AccountControllerTests.cs
+++ myLocalFarm/test/farmApi.Test/AccountControllerTests.cs
@@ -8,6 +8,14 @@

 namespace farmApi.Test
 {
+    /// <summary>
+    /// Tests the Account Controller
+    /// </summary>
+    /// <remarks>
+    /// We are NOT also testing:
+    /// 1. The data access layer. So, in this test class, we don't check whether user creation succeeded in the data store.
+    /// 2. The emailer service. Neither do we test whether the emailer actually sent an email.
+    /// </remarks>
     public class AccountControllerTests
     {
         public AccountControllerTests()


XDocument now kept as private variable

XDocument now kept as private variable

Ensures the ResultDocument property can be accessed multiple times when
it comes from a stream.

--- src/core/BrightstarDB/Client/SparqlResult.cs
+++ src/core/BrightstarDB/Client/SparqlResult.cs
@@ -12,6 +12,7 @@
     {
         private Stream _resultStream;
         private readonly string _resultString;
+        private XDocument _resultDocument;

         internal SparqlResult(Stream resultStream)
         {
@@ -46,11 +47,13 @@
         {
             get
             {
-                if (_resultString != null)
+                if (_resultDocument == null)
                 {
-                    return XDocument.Parse(_resultString);
+                    _resultDocument = _resultString != null
+                        ? XDocument.Parse(_resultString)
+                        : XDocument.Load(_resultStream);
                 }
-                return XDocument.Load(_resultStream);
+                return _resultDocument;
             }
         }


Reverse assert conditions for efficiency.

--- osu.Framework/Graphics/Containers/Container_AutoSize.cs
+++ osu.Framework/Graphics/Containers/Container_AutoSize.cs
@@ -64,7 +64,7 @@
             set
             {
                 //transform check here is to allow AutoSizeDuration to work below.
-                Debug.Assert(Transforms.Find(t => t is TransformSize) != null || (AutoSizeAxes & Axes.Both) == 0, @"The Size of an AutoSizeContainer should only be manually set if it is relative to its parent.");
+                Debug.Assert((AutoSizeAxes & Axes.Both) == 0 || Transforms.Find(t => t is TransformSize) != null, @"The Size of an AutoSizeContainer should only be manually set if it is relative to its parent.");
                 base.Size = value;
             }
         }


Fix incorrect sorting.

Fix incorrect sorting.

--- osu.Game.Rulesets.Mania/Timing/TimingChangeContainer.cs
+++ osu.Game.Rulesets.Mania/Timing/TimingChangeContainer.cs
@@ -35,11 +35,37 @@
             target.Add(hitObject);
         }

+        protected override IComparer<Drawable> DepthComparer => new TimingChangeReverseStartTimeComparer();
+
         /// <summary>
         /// Finds the most applicable timing change that can contain a hit object.
         /// </summary>
         /// <param name="hitObject">The hit object to contain.</param>
-        /// <returns>The last timing change which can contain <paramref name="hitObject"/>.</returns>
-        private DrawableTimingChange timingChangeFor(DrawableHitObject hitObject) => Children.LastOrDefault(c => c.CanContain(hitObject)) ?? Children.FirstOrDefault();
+        /// <returns>The last timing change which can contain <paramref name="hitObject"/>. Null if no timing change can contain the hit object.</returns>
+        private DrawableTimingChange timingChangeFor(DrawableHitObject hitObject) => Children.FirstOrDefault(c => c.CanContain(hitObject));
+    }
+
+    /// <summary>
+    /// Compares two timing changes by their start time, falling back to creation order if their start time is equal.
+    /// This will compare the two timing changes in reverse order.
+    /// </summary>
+    public class TimingChangeReverseStartTimeComparer : Drawable.ReverseCreationOrderDepthComparer
+    {
+        public override int Compare(Drawable x, Drawable y)
+        {
+            var timingChangeX = x as DrawableTimingChange;
+            var timingChangeY = y as DrawableTimingChange;
+
+            // If either of the two drawables are not hit objects, fall back to the base comparer
+            if (timingChangeX?.TimingChange == null || timingChangeY?.TimingChange == null)
+                return base.Compare(x, y);
+
+            // Compare by start time
+            int i = timingChangeY.TimingChange.Time.CompareTo(timingChangeX.TimingChange.Time);
+            if (i != 0)
+                return i;
+
+            return base.Compare(x, y);
+        }
     }
 }


Add support for spinner glow

Add support for spinner glow

--- osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs
+++ osu.Game.Rulesets.Osu/Skinning/LegacyNewStyleSpinner.cs
@@ -21,6 +21,7 @@
     /// </summary>
     public class LegacyNewStyleSpinner : CompositeDrawable
     {
+        private Sprite glow;
         private Sprite discBottom;
         private Sprite discTop;
         private Sprite spinningMiddle;
@@ -29,6 +30,8 @@
         private DrawableSpinner drawableSpinner;

         private const float final_scale = 0.625f;
+
+        private readonly Color4 glowColour = new Color4(3, 151, 255, 255);

         [BackgroundDependencyLoader]
         private void load(ISkinSource source, DrawableHitObject drawableObject)
@@ -39,6 +42,14 @@

             InternalChildren = new Drawable[]
             {
+                glow = new Sprite
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.Centre,
+                    Texture = source.GetTexture("spinner-glow"),
+                    Blending = BlendingParameters.Additive,
+                    Colour = glowColour,
+                },
                 discBottom = new Sprite
                 {
                     Anchor = Anchor.Centre,
@@ -76,23 +87,38 @@

         private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)
         {
-            if (!(drawableHitObject is DrawableSpinner d))
-                return;
+            switch (drawableHitObject)
+            {
+                case DrawableSpinner d:
+                    Spinner spinner = d.HitObject;

-            Spinner spinner = d.HitObject;
+                    using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt, true))
+                        this.FadeOut();

-            using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt, true))
-                this.FadeOut();
+                    using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimeFadeIn / 2, true))
+                        this.FadeInFromZero(spinner.TimeFadeIn / 2);

-            using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimeFadeIn / 2, true))
-                this.FadeInFromZero(spinner.TimeFadeIn / 2);
+                    using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt, true))
+                    {
+                        fixedMiddle.FadeColour(Color4.White);

-            using (BeginAbsoluteSequence(spinner.StartTime - spinner.TimePreempt, true))
-            {
-                fixedMiddle.FadeColour(Color4.White);
+                        using (BeginDelayedSequence(spinner.TimePreempt, true))
+                            fixedMiddle.FadeColour(Color4.Red, spinner.Duration);
+                    }

-                using (BeginDelayedSequence(spinner.TimePreempt, true))
-                    fixedMiddle.FadeColour(Color4.Red, spinner.Duration);
+                    if (state == ArmedState.Hit)
+                    {
+                        using (BeginAbsoluteSequence(d.HitStateUpdateTime))
+                            glow.FadeOut(300);
+                    }
+
+                    break;
+
+                case DrawableSpinnerBonusTick _:
+                    if (state == ArmedState.Hit)
+                        glow.FlashColour(Color4.White, 200);
+
+                    break;
             }
         }

@@ -101,6 +127,8 @@
             base.Update();
             spinningMiddle.Rotation = discTop.Rotation = drawableSpinner.RotationTracker.Rotation;
             discBottom.Rotation = discTop.Rotation / 3;
+
+            glow.Alpha = drawableSpinner.Progress;

             Scale = new Vector2(final_scale * (0.8f + (float)Interpolation.ApplyEasing(Easing.Out, drawableSpinner.Progress) * 0.2f));
         }


Improve tiling logic

Improve tiling logic

--- osu.Game.Rulesets.Taiko/Skinning/LegacyTaikoScroller.cs
+++ osu.Game.Rulesets.Taiko/Skinning/LegacyTaikoScroller.cs
@@ -21,19 +21,28 @@
         {
             base.Update();

-            foreach (var sprite in InternalChildren)
+            while (true)
             {
-                sprite.X -= (float)Time.Elapsed * 0.1f;
+                float? additiveX = null;

-                if (sprite.X + sprite.DrawWidth < 0)
-                    sprite.Expire();
-            }
+                foreach (var sprite in InternalChildren)
+                {
+                    // add the x coordinates and perform re-layout on all sprites as spacing may change with gameplay scale.
+                    sprite.X = additiveX ??= sprite.X - (float)Time.Elapsed * 0.1f;

-            var last = InternalChildren.LastOrDefault();
+                    additiveX += sprite.DrawWidth - 1;

-            if (last == null || last.ScreenSpaceDrawQuad.TopRight.X < ScreenSpaceDrawQuad.TopRight.X)
-            {
-                AddInternal(new ScrollerSprite { X = last == null ? 0 : last.X + last.DrawWidth });
+                    if (sprite.X + sprite.DrawWidth < 0)
+                        sprite.Expire();
+                }
+
+                var last = InternalChildren.LastOrDefault();
+
+                // only break from this loop once we have saturated horizontal space completely.
+                if (last != null && last.ScreenSpaceDrawQuad.TopRight.X >= ScreenSpaceDrawQuad.TopRight.X)
+                    break;
+
+                AddInternal(new ScrollerSprite());
             }
         }


Reduce container nesting by one level

Reduce container nesting by one level

--- osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs
+++ osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs
@@ -46,73 +46,70 @@
             Shear = new Vector2(ShearedOverlayContainer.SHEAR, 0);
             Masking = true;
             CornerRadius = corner_radius;
-            InternalChild = new Container
+
+            InternalChildren = new Drawable[]
             {
-                RelativeSizeAxes = Axes.Both,
-                Children = new Drawable[]
+                background = new Box
                 {
-                    background = new Box
+                    RelativeSizeAxes = Axes.Both
+                },
+                new GridContainer
+                {
+                    RelativeSizeAxes = Axes.Both,
+                    Content = new[]
                     {
-                        RelativeSizeAxes = Axes.Both
-                    },
-                    new GridContainer
-                    {
-                        RelativeSizeAxes = Axes.Both,
-                        Content = new[]
+                        new Drawable[]
                         {
-                            new Drawable[]
+                            new Container
                             {
-                                new Container
+                                Name = @"Search box container",
+                                RelativeSizeAxes = Axes.Both,
+                                CornerRadius = corner_radius,
+                                Masking = true,
+                                Children = new Drawable[]
                                 {
-                                    Name = @"Search box container",
-                                    RelativeSizeAxes = Axes.Both,
-                                    CornerRadius = corner_radius,
-                                    Masking = true,
-                                    Children = new Drawable[]
+                                    searchBoxBackground = new Box
                                     {
-                                        searchBoxBackground = new Box
+                                        RelativeSizeAxes = Axes.Both
+                                    },
+                                    textBox = new InnerSearchTextBox
+                                    {
+                                        Shear = -Shear,
+                                        Anchor = Anchor.CentreLeft,
+                                        Origin = Anchor.CentreLeft,
+                                        RelativeSizeAxes = Axes.X,
+                                        Padding = new MarginPadding
                                         {
-                                            RelativeSizeAxes = Axes.Both
-                                        },
-                                        textBox = new InnerSearchTextBox
-                                        {
-                                            Shear = -new Vector2(ShearedOverlayContainer.SHEAR, 0),
-                                            Anchor = Anchor.CentreLeft,
-                                            Origin = Anchor.CentreLeft,
-                                            RelativeSizeAxes = Axes.X,
-                                            Padding = new MarginPadding
-                                            {
-                                                Horizontal = corner_radius + new Vector2(ShearedOverlayContainer.SHEAR, 0).X
-                                            }
-                                        }
-                                    }
-                                },
-                                new Container
-                                {
-                                    Name = @"Icon container",
-                                    RelativeSizeAxes = Axes.Y,
-                                    Width = 50,
-                                    Origin = Anchor.CentreRight,
-                                    Anchor = Anchor.CentreRight,
-                                    Children = new Drawable[]
-                                    {
-                                        new SpriteIcon
-                                        {
-                                            Icon = FontAwesome.Solid.Search,
-                                            Origin = Anchor.Centre,
-                                            Anchor = Anchor.Centre,
-                                            Size = new Vector2(16),
-                                            Shear = -new Vector2(ShearedOverlayContainer.SHEAR, 0)
+                                            Horizontal = corner_radius + Shear.X
                                         }
                                     }
                                 }
+                            },
+                            new Container
+                            {
+                                Name = @"Icon container",
+                                RelativeSizeAxes = Axes.Y,
+                                Width = 50,
+                                Origin = Anchor.CentreRight,
+                                Anchor = Anchor.CentreRight,
+                                Children = new Drawable[]
+                                {
+                                    new SpriteIcon
+                                    {
+                                        Icon = FontAwesome.Solid.Search,
+                                        Origin = Anchor.Centre,
+                                        Anchor = Anchor.Centre,
+                                        Size = new Vector2(16),
+                                        Shear = -Shear
+                                    }
+                                }
                             }
-                        },
-                        ColumnDimensions = new[]
-                        {
-                            new Dimension(),
-                            new Dimension(GridSizeMode.AutoSize)
                         }
+                    },
+                    ColumnDimensions = new[]
+                    {
+                        new Dimension(),
+                        new Dimension(GridSizeMode.AutoSize)
                     }
                 }
             };


Fix multiple notifications arriving for imports in edge cases

--- osu.Game/Overlays/Notifications/ProgressNotification.cs
+++ osu.Game/Overlays/Notifications/ProgressNotification.cs
@@ -148,7 +148,7 @@
             }
         }

-        private bool completionSent;
+        private int completionSent;

         /// <summary>
         /// Attempt to post a completion notification.
@@ -162,11 +162,11 @@
             if (CompletionTarget == null)
                 return;

-            if (completionSent)
+            // Thread-safe barrier, as this may be called by a web request and also scheduled to the update thread at the same time.
+            if (Interlocked.Increment(ref completionSent) == 0)
                 return;

             CompletionTarget.Invoke(CreateCompletionNotification());
-            completionSent = true;

             Close(false);
         }


Updated test results for Lame

Updated test results for Lame


added default encoding

added default encoding

--- FlitBit.Dto.WebApi/FlitBit.Dto.WebApi/MediaFormatters/DtoMediaTypeFormatter.cs
+++ FlitBit.Dto.WebApi/FlitBit.Dto.WebApi/MediaFormatters/DtoMediaTypeFormatter.cs
@@ -21,7 +21,7 @@
         static readonly MethodInfo TransformToModelMethod = typeof(DtoMediaTypeFormatter).MatchGenericMethod("TransformToModel", BindingFlags.Instance | BindingFlags.NonPublic, 1, typeof(object), typeof(string));
         public DtoMediaTypeFormatter()
         {
-
+
             _currentFactory = FactoryProvider.Factory;
             _serializerSettings = new JsonSerializerSettings();
             SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/json"));
@@ -42,7 +42,7 @@
             return Task.Factory.StartNew(() =>
             {
                 var serializer = JsonSerializer.Create(_serializerSettings);
-                using (var streamReader = new StreamReader(readStream, new UTF8Encoding(false)))
+                using (var streamReader = new StreamReader(readStream, SupportedEncodings.FirstOrDefault() ?? new UTF8Encoding()))
                 using (var jsonTextReader = new JsonTextReader(streamReader))
                     return serializer.Deserialize(jsonTextReader);
             });


Simplify body of read_google_profile_image_url doc region

--- aspnet/4-auth/App_Start/Startup.cs
+++ aspnet/4-auth/App_Start/Startup.cs
@@ -59,9 +59,9 @@
             authenticationOptions.Scope.Add("profile");
             // [END configure_google_auth_scopes]

-            // [START read_google_profile_image_url]
             authenticationOptions.Provider = new GoogleOAuth2AuthenticationProvider()
             {
+                // [START read_google_profile_image_url]
                 // After OAuth authentication completes successfully,
                 // read user's profile image URL from the profile
                 // response data and add it to the current user identity
@@ -71,8 +71,8 @@
                     context.Identity.AddClaim(new Claim(ClaimTypes.Uri, profileUrl));
                     return Task.FromResult(0);
                 }
+                // [END read_google_profile_image_url]
             };
-            // [END read_google_profile_image_url]

             app.UseGoogleAuthentication(authenticationOptions);
         }


Explicit definition of excluded Diversion comparison

--- PART/Source/CprBroker/DBR.Tests/DiversionComparison/DiversionComparisonTest.cs
+++ PART/Source/CprBroker/DBR.Tests/DiversionComparison/DiversionComparisonTest.cs
@@ -189,7 +189,37 @@
         {
             get
             {
-                return new PropertyComparisonResult[] { };
+                return new PropertyComparisonResult[] {
+                    new PropertyComparisonResult("AJF",""),
+                    new PropertyComparisonResult("MYNKOD",""),
+                    new PropertyComparisonResult("ADRNVN",""),
+                    new PropertyComparisonResult("INDRAP",""),
+                    new PropertyComparisonResult("FOEDMYNHAENSTART",""),
+                    new PropertyComparisonResult("KUNDENR",""),
+                    new PropertyComparisonResult("FARSKABHAENSTART",""),
+                    new PropertyComparisonResult("AEGTEMRK",""),
+                    new PropertyComparisonResult("AEGTEDOK",""),
+                    new PropertyComparisonResult("FARSKABMYNNVN",""),
+                    new PropertyComparisonResult("TIDLKOMNVN",""),
+                    new PropertyComparisonResult("CIVMYN",""),
+                    new PropertyComparisonResult("STILLINGDTO",""),
+                    new PropertyComparisonResult("MORDOK",""),
+                    new PropertyComparisonResult("FARDOK",""),
+                    new PropertyComparisonResult("MORMRK",""),
+                    new PropertyComparisonResult("FARMRK",""),
+                    new PropertyComparisonResult("UDLANDADRDTO",""),
+                    new PropertyComparisonResult("PNRMRKHAENSTART",""),
+                    new PropertyComparisonResult("TIDLPNRMRK", "Fails sometimes because HistoricalPNR's can be older than the 20-year limit for extracts, so they do not appear in the emulated database"),
+                    new PropertyComparisonResult("KONTAKTADR_KOMKOD",""),
+                    new PropertyComparisonResult("STARTDATE_FORALD_46", "real DPR returns yyyy-MM-dd HH:mm:ss or dd-MM-yyyy randomly"),
+                    new PropertyComparisonResult("STARTDATE_FORALD_35", "real DPR returns yyyy-MM-dd HH:mm:ss or dd-MM-yyyy randomly"),
+                    new PropertyComparisonResult("UDRINDRMRK", "Sometimes not set because departures are older than 20 years (so not included in the initial dataset)"),
+                    new PropertyComparisonResult("FRAFLYKOMKOD", "Sometimes not set because departures are older than 20 years (so not included in the initial dataset)"),
+                    new PropertyComparisonResult("TILFLYDTOMRK",""),
+                    new PropertyComparisonResult("MYNTXT_CIV",""),
+                    new PropertyComparisonResult("PNR_BORN", "Tested - excluded because ordering of children from DPR is inconsistent and causes test failure"),
+                    new PropertyComparisonResult("dummy 1293810","")
+                };
             }
         }

@@ -231,36 +261,7 @@

             var status = decimal.Parse(valuesAndProps.SingleOrDefault(p => p.Prop == "STATUS")?.Value.TrimEnd(';'));

-            var excludedProps = new string[] {
-                "AJF",
-                "MYNKOD",
-                "ADRNVN",
-                "INDRAP",
-                "FOEDMYNHAENSTART",
-                "KUNDENR",
-                "FARSKABHAENSTART",
-                "AEGTEMRK",
-                "AEGTEDOK",
-                "FARSKABMYNNVN",
-                "TIDLKOMNVN",
-                "CIVMYN",
-                "STILLINGDTO",
-                "MORDOK",
-                "FARDOK",
-                "MORMRK",
-                "FARMRK",
-                "UDLANDADRDTO",
-                "PNRMRKHAENSTART",
-                "TIDLPNRMRK", // Fails sometimes because HistoricalPNR's can be older than the 20-year limit for extracts, so they do not appear in the emulated database
-                "KONTAKTADR_KOMKOD",
-                "STARTDATE_FORALD_46", "STARTDATE_FORALD_35", // real DPR returns yyyy-MM-dd HH:mm:ss or dd-MM-yyyy randomly
-                "UDRINDRMRK", // Sometimes not set because departures are older than 20 years (so not included in the initial dataset)
-                "FRAFLYKOMKOD", // Sometimes not set because departures are older than 20 years (so not included in the initial dataset)
-                "TILFLYDTOMRK",
-                "MYNTXT_CIV",
-                "PNR_BORN", // Tested - excluded because ordering of children from DPR is inconsistent and causes test failure
-                "dummy 1293810"
-            };
+            var excludedProps = ExcludedPropertiesInformation.Select(p=>p.PropertyName).ToArray();

             var excluded90 = new string[] {
                 "POSTDISTTXT", "POSTDISTRICT",


Refs #1645 - unit test.

Refs #1645 - unit test.

--- Solution/TestProjecten/Chiro.Gap.Services.Test/GelieerdePersonenServiceTest.cs
+++ Solution/TestProjecten/Chiro.Gap.Services.Test/GelieerdePersonenServiceTest.cs
@@ -659,11 +659,8 @@
         /// Als het voorkeursadres van een persoon verandert na het verwijderen van een adres,
         /// dan moet die wijziging gesynct worden. Een unit test.
         ///
-        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
-        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
-        // whether you are testing a page, web service, or a WCF service.
-        [TestMethod()]
-        public void AdresVerwijderenVanPersonenTest()
+        [TestMethod()]
+        public void AdresVerwijderenVanPersonenNieuweVoorkeurTest()
         {
             // ARRANGE

@@ -1023,5 +1020,57 @@

             Assert.AreEqual(actual.GebruikersInfo.VervalDatum, gebruikersRecht.VervalDatum);
         }
+
+        ///
+        /// Als het laatste adres van een persoon wordt verwijderd, dan kan AdressenSync.StandaardAdresBewaren
+        /// niet opgeroepen worden, want dat vraagt een PersoonsAdres. Als alle adressen zijn verwijderd, dan
+        /// is er geen PersonsAdres meer.
+        ///
+        [TestMethod()]
+        public void LaatsteAdresVerwijderenVanPersonenTest()
+        {
+            // ARRANGE
+
+            var voorkeursAdres = new BelgischAdres { ID = 2 };
+
+            var gelieerdePersoon = new GelieerdePersoon { Persoon = new Persoon { ID = 1, AdInAanvraag = true } };
+
+            var voorkeursPa = new PersoonsAdres { Persoon = gelieerdePersoon.Persoon, Adres = voorkeursAdres };
+
+            // wat gepruts om alle relaties goed te leggen
+
+            gelieerdePersoon.Persoon.PersoonsAdres.Add(voorkeursPa);
+            gelieerdePersoon.PersoonsAdres = voorkeursPa;   // persoonsadres gelieere persoon bepaalt voorkeursadres
+            voorkeursAdres.PersoonsAdres.Add(voorkeursPa);
+            voorkeursPa.GelieerdePersoon.Add(gelieerdePersoon);
+
+
+            // Dependency injection synchronisatie
+
+            var adressenSyncMock = new Mock<IAdressenSync>();
+            adressenSyncMock.Setup(src => src.StandaardAdressenBewaren(It.IsAny<IList<PersoonsAdres>>()))
+                            .Verifiable();
+            Factory.InstantieRegistreren(adressenSyncMock.Object);
+
+            // Dependency injection data access
+
+            var repositoryProviderMock = new Mock<IRepositoryProvider>();
+            repositoryProviderMock.Setup(src => src.RepositoryGet<Adres>())
+                                  .Returns(new DummyRepo<Adres>(new List<Adres> { voorkeursAdres }));
+            repositoryProviderMock.Setup(src => src.RepositoryGet<PersoonsAdres>())
+                                  .Returns(new DummyRepo<PersoonsAdres>(new List<PersoonsAdres> { voorkeursPa }));
+            Factory.InstantieRegistreren(repositoryProviderMock.Object);
+
+            // ACT
+
+            var target = Factory.Maak<GelieerdePersonenService>();
+            target.AdresVerwijderenVanPersonen(new[] { gelieerdePersoon.Persoon.ID }, voorkeursAdres.ID);
+
+            // ASSERT
+
+            adressenSyncMock.Verify(src => src.StandaardAdressenBewaren(It.IsAny<IList<PersoonsAdres>>()),
+                                    Times.Never());
+
+        }
     }
 }


add INotifyCollectionChanged#ToCollectionChanged extension method.

--- Source/ReactiveProperty.Portable-NET45+WINRT+WP8/ReadOnlyReactiveCollection.cs
+++ Source/ReactiveProperty.Portable-NET45+WINRT+WP8/ReadOnlyReactiveCollection.cs
@@ -228,12 +228,13 @@
         }

         /// <summary>
-        /// convert ObservableCollection to IO<CollectionChanged>
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="self"></param>
-        /// <returns></returns>
-        public static IObservable<CollectionChanged<T>> ToCollectionChanged<T>(this ObservableCollection<T> self)
+        /// convert INotifyCollectionChanged to CollectionChanged.
+        /// (Supported action is Add(one item), Remove(one item), Replace(one item) and Reset(clear).)
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="self"></param>
+        /// <returns></returns>
+        public static IObservable<CollectionChanged<T>> ToCollectionChanged<T>(this INotifyCollectionChanged self)
         {
             return Observable.Create<CollectionChanged<T>>(ox =>
             {
@@ -267,6 +268,17 @@
         }

         /// <summary>
+        /// convert ObservableCollection to IO<CollectionChanged>
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="self"></param>
+        /// <returns></returns>
+        public static IObservable<CollectionChanged<T>> ToCollectionChanged<T>(this ObservableCollection<T> self)
+        {
+            return ((INotifyCollectionChanged)self).ToCollectionChanged<T>();
+        }
+
+        /// <summary>
         /// convert ReadOnlyObservableCollection to IO<T>
         /// </summary>
         /// <typeparam name="T">source type</typeparam>
@@ -274,35 +286,7 @@
         /// <returns>dest</returns>
         public static IObservable<CollectionChanged<T>> ToCollectionChanged<T>(this ReadOnlyObservableCollection<T> self)
         {
-            return Observable.Create<CollectionChanged<T>>(ox =>
-            {
-                var d = new CompositeDisposable();
-                self.CollectionChangedAsObservable()
-                    .Where(e => e.Action == NotifyCollectionChangedAction.Add)
-                    .Select(e => CollectionChanged<T>.Add(e.NewStartingIndex, e.NewItems.Cast<T>().First()))
-                    .Subscribe(c => ox.OnNext(c))
-                    .AddTo(d);
-
-                self.CollectionChangedAsObservable()
-                    .Where(e => e.Action == NotifyCollectionChangedAction.Remove)
-                    .Select(e => CollectionChanged<T>.Remove(e.OldStartingIndex))
-                    .Subscribe(c => ox.OnNext(c))
-                    .AddTo(d);
-
-                self.CollectionChangedAsObservable()
-                    .Where(e => e.Action == NotifyCollectionChangedAction.Replace)
-                    .Select(e => CollectionChanged<T>.Replace(e.NewStartingIndex, e.NewItems.Cast<T>().First()))
-                    .Subscribe(c => ox.OnNext(c))
-                    .AddTo(d);
-
-                self.CollectionChangedAsObservable()
-                    .Where(e => e.Action == NotifyCollectionChangedAction.Reset)
-                    .Select(_ => CollectionChanged<T>.Reset)
-                    .Subscribe(c => ox.OnNext(c))
-                    .AddTo(d);
-
-                return d;
-            });
+            return ((INotifyCollectionChanged)self).ToCollectionChanged<T>();
         }

         /// <summary>


add call dispose method when item reset.

--- Source/ReactiveProperty.Portable-NET45+WINRT+WP8/ReadOnlyReactiveCollection.cs
+++ Source/ReactiveProperty.Portable-NET45+WINRT+WP8/ReadOnlyReactiveCollection.cs
@@ -94,7 +94,15 @@
             {
                 onReset
                     .ObserveOn(scheduler)
-                    .Subscribe(_ => this.source.Clear()).AddTo(this.token);
+                    .Subscribe(_ =>
+                        {
+                            foreach (var item in source)
+                            {
+                                var d = item as IDisposable;
+                                if (d != null) { d.Dispose(); }
+                            }
+                            this.source.Clear();
+                        }).AddTo(this.token);
             }
         }


Add additional test for SA1100 with indexers

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1100UnitTests.cs
@@ -1023,6 +1023,19 @@
         }

         [Fact]
+        public async Task TestIndexerWithLocalDefinitionAsync()
+        {
+            var testCode = @"
+class ClassName : System.Collections.Generic.List<int>
+{
+  public new int this[int index] { get { return base[index]; } }
+  public int Property { get { return base[0]; } }
+}";
+
+            await this.VerifyCSharpDiagnosticAsync(testCode, EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
+        }
+
+        [Fact]
         public async Task TestIndexerAsync()
         {
             var testCode = @"


Fix errors in SA1101 tests

Fix errors in SA1101 tests

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/ReadabilityRules/SA1101UnitTests.cs
@@ -13,6 +13,7 @@
         private const string DiagnosticId = SA1101PrefixLocalCallsWithThis.DiagnosticId;

         private const string ReferenceCode = @"
+        using System;
         public class BaseTypeName
         {
             public static int BaseStaticFieldName;
@@ -118,7 +119,7 @@
                 {
                     BaseInstanceFieldName = BaseInstanceFieldName,
                     BaseInstancePropertyName = BaseInstancePropertyName,
-                }
+                };

                 // the following line is a regression test for #464
                 // https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/464
@@ -128,6 +129,7 @@
         ";

         private static string FixedCode = @"
+        using System;
         public class BaseTypeName
         {
             public static int BaseStaticFieldName;
@@ -233,7 +235,7 @@
                 {
                     BaseInstanceFieldName = this.BaseInstanceFieldName,
                     BaseInstancePropertyName = this.BaseInstancePropertyName,
-                }
+                };

                 // the following line is a regression test for #464
                 // https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/464
@@ -247,13 +249,13 @@
         {
             var expected = new[]
             {
-                this.CSharpDiagnostic().WithLocation(90, 36),
-                this.CSharpDiagnostic().WithLocation(94, 36),
-                this.CSharpDiagnostic().WithLocation(96, 36),
-                this.CSharpDiagnostic().WithLocation(98, 36),
-                this.CSharpDiagnostic().WithLocation(100, 36),
-                this.CSharpDiagnostic().WithLocation(105, 45),
-                this.CSharpDiagnostic().WithLocation(106, 48),
+                this.CSharpDiagnostic().WithLocation(91, 36),
+                this.CSharpDiagnostic().WithLocation(95, 36),
+                this.CSharpDiagnostic().WithLocation(97, 36),
+                this.CSharpDiagnostic().WithLocation(99, 36),
+                this.CSharpDiagnostic().WithLocation(101, 36),
+                this.CSharpDiagnostic().WithLocation(106, 45),
+                this.CSharpDiagnostic().WithLocation(107, 48),
             };

             await this.VerifyCSharpDiagnosticAsync(ReferenceCode, expected, CancellationToken.None);


Fixed a problem with network manager start up

--- UnityProject/Assets/Scripts/Managers/NetworkManagement/CustomNetworkManager.cs
+++ UnityProject/Assets/Scripts/Managers/NetworkManagement/CustomNetworkManager.cs
@@ -43,7 +43,7 @@
 	{
 		CheckTransport();
 		//Automatically host if starting up game *not* from lobby
-		if (SceneManager.GetActiveScene().name != offlineScene)
+		if (SceneManager.GetActiveScene().name != "Lobby")
 		{
 			StartHost();
 		}


Custom message implemented

Custom message implemented

--- src/SimpleSyslog/Logger.cs
+++ src/SimpleSyslog/Logger.cs
@@ -14,6 +14,7 @@
     static UdpClient udpClient;
     static int facility;
     static string sender;
+    public static string MessageFormat { get; set; }

     public static void Initialize(string hostName, int port, string sender = null, int facility = 0)
     {
@@ -71,6 +72,8 @@

     static void Send(LogLevel logLevel, string message)
     {
+      var messageFormat = MessageFormat ?? "{message}";
+      message = messageFormat.Replace("{message}", message);
       message = string.Format("<{0}>{1} {2} {3} {4}", facility * 8 + (int)logLevel, DateTime.UtcNow.ToString("s"), Dns.GetHostName(), sender, message);
       var bytes = Encoding.ASCII.GetBytes(message);
       AutoResetEvent.WaitOne();


Check for collision with balls only.

Check for collision with balls only.

--- Assets/Scripts/Core/World.cs
+++ Assets/Scripts/Core/World.cs
@@ -11,7 +11,9 @@
     }

     private void OnCollisionEnter( Collision other ) {
-        onPlanetHit.Invoke();
+        if( other.transform.GetComponent<Ball>() ) {
+            onPlanetHit.Invoke();
+        }
     }

     public void AddHitListener( UnityAction call ) {


Adding break to test the travis build

Adding break to test the travis build

--- src/TfsAdvanced/Startup.cs
+++ src/TfsAdvanced/Startup.cs
@@ -39,7 +39,7 @@

             builder.AddApplicationInsightsSettings(developerMode: true);

-            Configuration = builder.Build();
+            Configuration = builder.Build()
         }

         // This method gets called by the runtime. Use this method to add services to the container.
@@ -79,7 +79,7 @@

             builder.RegisterType<AuthenticationTokenProvider>();

-
+
             builder.RegisterType<SignInManager<ApplicationUser>>().AsSelf();

             builder.RegisterAssemblyTypes(Assembly.GetEntryAssembly())
@@ -89,7 +89,7 @@

             builder.RegisterType<RequestData>().AsSelf().InstancePerLifetimeScope();

-
+

             var container = builder.Build();
             var serviceProvider = container.Resolve<IServiceProvider>();
@@ -117,4 +117,4 @@
             Hangfire.BackgroundJob.Enqueue<Updater>(updater => updater.Start());
         }
     }
-}+}


Add ProxyLexer.Initialized : bool

Add ProxyLexer.Initialized : bool

--- src/Txt.Core/ProxyLexer.cs
+++ src/Txt.Core/ProxyLexer.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using JetBrains.Annotations;

 namespace Txt.Core
@@ -9,26 +10,30 @@
     {
         private ILexer<TElement> innerLexer;

+        public bool Initialized { get; private set; }
+
         public void Initialize([NotNull] ILexer<TElement> lexer)
         {
             if (lexer == null)
             {
                 throw new ArgumentNullException(nameof(lexer));
             }
-            if (innerLexer != null)
+            if (Initialized)
             {
                 throw new InvalidOperationException(
                     "Initialize(ILexer`1) has already been called. Changing the rule after it has been initialized is not allowed.");
             }
             innerLexer = lexer;
+            Initialized = true;
         }

         protected override IEnumerable<TElement> ReadImpl(ITextScanner scanner, ITextContext context)
         {
-            if (innerLexer == null)
+            if (!Initialized)
             {
                 throw new InvalidOperationException("Initialize(ILexer`1) has never been called.");
             }
+            Debug.Assert(innerLexer != null, "innerLexer != null");
             return innerLexer.Read(scanner, context);
         }
     }


64-bit Linux fix: Fall back to ordinary cred if BSD fails

--- src/UnixNativeTransport.cs
+++ src/UnixNativeTransport.cs
@@ -138,12 +138,12 @@

 		//send peer credentials null byte
 		//different platforms do this in different ways
-		unsafe public override void WriteCred ()
+#if HAVE_CMSGCRED
+		unsafe void WriteBsdCred ()
 		{
 			//null credentials byte
 			byte buf = 0;

-#if HAVE_CMSGCRED
 			IOVector iov = new IOVector ();
 			iov.Base = (IntPtr)(&buf);
 			iov.Length = 1;
@@ -163,7 +163,24 @@
 			UnixMarshal.ThrowExceptionForLastErrorIf (written);
 			if (written != 1)
 				throw new Exception ("Failed to write credentials");
+		}
+#endif
+
+		public override void WriteCred ()
+		{
+#if HAVE_CMSGCRED
+			try {
+				WriteBsdCred ();
+			} catch {
+				if (Protocol.Verbose)
+					Console.Error.WriteLine ("Warning: WriteBsdCred() failed; falling back to ordinary WriteCred()");
+				//null credentials byte
+				byte buf = 0;
+				Stream.WriteByte (buf);
+			}
 #else
+			//null credentials byte
+			byte buf = 0;
 			Stream.WriteByte (buf);
 #endif
 		}


Convert SignFile to an exception filter

Convert SignFile to an exception filter

This reduces code complexity and might make callstacks easier to decode.

--- src/XMakeTasks/SignFile.cs
+++ src/XMakeTasks/SignFile.cs
@@ -73,15 +73,10 @@
                 SigningTarget.ItemSpec, TargetFrameworkVersion);
                 return true;
             }
-            catch (ArgumentException ex)
+            catch (ArgumentException ex) when (ex.ParamName.Equals("certThumbprint"))
             {
-                if (ex.ParamName.Equals("certThumbprint"))
-                {
-                    Log.LogErrorWithCodeFromResources("SignFile.CertNotInStore");
-                    return false;
-                }
-                else
-                    throw;
+                Log.LogErrorWithCodeFromResources("SignFile.CertNotInStore");
+                return false;
             }
             catch (FileNotFoundException ex)
             {


Add missing tests for UPath

Add missing tests for UPath

--- src/Zio.Tests/TestUPath.cs
+++ src/Zio.Tests/TestUPath.cs
@@ -87,6 +87,8 @@
             Assert.False(path.IsRelative);
             Assert.True(path.IsAbsolute);

+            Assert.Equal(path, path.ToAbsolute());
+
             path = new UPath();
             Assert.True(path.IsNull);
         }
@@ -218,6 +220,50 @@
             Assert.Equal("path1", Assert.Throws<ArgumentNullException>(() => UPath.Combine(null, "")).ParamName);
             Assert.Equal("path2", Assert.Throws<ArgumentNullException>(() => UPath.Combine("", null)).ParamName);
         }
+
+
+        [Fact]
+        public void TestComparers()
+        {
+            {
+                var list = new SortedSet<UPath>(UPath.DefaultComparer)
+                {
+                    "/C.txt",
+                    "/b.txt",
+                    "/do.txt",
+                    "/A.txt",
+                    "/a.txt"
+                };
+                Assert.Equal(new List<UPath>()
+                {
+                    "/A.txt",
+                    "/C.txt",
+                    "/a.txt",
+                    "/b.txt",
+                    "/do.txt"
+                }, list.ToList());
+            }
+
+            {
+                var list = new List<UPath>()
+                {
+                    "/C.txt",
+                    "/b.txt",
+                    "/do.txt",
+                    "/A.txt",
+                    "/a.txt"
+                };
+                list.Sort(UPath.DefaultComparerIgnoreCase);
+                Assert.Equal(new List<UPath>()
+                {
+                    "/A.txt",
+                    "/a.txt",
+                    "/b.txt",
+                    "/C.txt",
+                    "/do.txt"
+                }, list.ToList());
+            }
+        }
     }
 }


fixed NativeTypeSpec on 32 bit platforms

--- src/runtime/Native/NativeTypeSpec.cs
+++ src/runtime/Native/NativeTypeSpec.cs
@@ -10,7 +10,7 @@
         public readonly StrPtr Name;
         public readonly int BasicSize;
         public readonly int ItemSize;
-        public readonly TypeFlags Flags;
+        public readonly IntPtr Flags;
         public IntPtr Slots;

         public NativeTypeSpec(TypeSpec spec)
@@ -20,7 +20,7 @@
             this.Name = new StrPtr(spec.Name, Encoding.UTF8);
             this.BasicSize = spec.BasicSize;
             this.ItemSize = spec.ItemSize;
-            this.Flags = spec.Flags;
+            this.Flags = new IntPtr((long)spec.Flags);

             unsafe
             {


[Aardvark.Base] added out of bounds checks to List.MapToArray(count, Func)

--- src/Aardvark.Base/Extensions/ListExtensions.cs
+++ src/Aardvark.Base/Extensions/ListExtensions.cs
@@ -146,6 +146,7 @@
         public static Tr[] MapToArray<T, Tr>(this List<T> list, int count, Func<T, Tr> item_fun)
         {
             var result = new Tr[count];
+            if (list.Count < count) count = list.Count;
             for (int i = 0; i < count; i++) result[i] = item_fun(list[i]);
             return result;
         }
@@ -161,6 +162,7 @@
                 this List<T> list, int start, int count, Func<T, Tr> item_fun)
         {
             var result = new Tr[count];
+            if (start + count > list.Count) count = list.Count - start;
             for (int i = 0; i < count; i++) result[i] = item_fun(list[i + start]);
             return result;
         }


Fixed warnings for view

Fixed warnings for view

--- src/Galaxy/WebEnd/Views/File/BackupList.cshtml
+++ src/Galaxy/WebEnd/Views/File/BackupList.cshtml
@@ -14,7 +14,7 @@

                 @for (int index = 0; index < Model.Folders.Length; index++)
                 {
-                    @{ var folder = Model.Folders[index]; }
+                    var folder = Model.Folders[index];

                         @folder.Name