Added more Insert tests

Added more Insert tests

--- tests/InsertTest.cs
+++ tests/InsertTest.cs
@@ -26,12 +26,29 @@
             }

         }
+
+
+        public class TestObj2
+        {
+            [PrimaryKey]
+            public int Id { get; set; }
+            public String Text { get; set; }
+
+            public override string ToString()
+            {
+                return string.Format("[TestObj: Id={0}, Text={1}]", Id, Text);
+            }
+
+        }
+
+
         public class TestDb : SQLiteConnection
         {
             public TestDb(String path)
                 : base(path)
             {
 				CreateTable<TestObj>();
+                CreateTable<TestObj2>();
             }

         }
@@ -68,6 +85,89 @@
 			var numCount = db.CreateCommand("select count(*) from TestObj").ExecuteScalar<int>();

 			Assert.AreEqual(numCount, n, "Num counted must = num objects");
+
+            db.Close();
         }
+
+        [Test]
+        public void InsertTwoTimes()
+        {
+            var db = new TestDb(Path.GetTempFileName());
+            var obj1 = new TestObj() { Text = "GLaDOS loves testing!" };
+            var obj2 = new TestObj() { Text = "Keep testing, just keep testing" };
+
+
+            var numIn1 = db.Insert(obj1);
+            var numIn2 = db.Insert(obj2);
+            Assert.AreEqual(1, numIn1);
+            Assert.AreEqual(1, numIn2);
+
+            var result = db.Query<TestObj>("select * from TestObj").ToList();
+            Assert.AreEqual(2, result.Count);
+            Assert.AreEqual(obj1.Text, result[0].Text);
+            Assert.AreEqual(obj2.Text, result[1].Text);
+
+            db.Close();
+        }
+
+        [Test]
+        public void InsertIntoTwoTables()
+        {
+            var db = new TestDb(Path.GetTempFileName());
+            var obj1 = new TestObj() { Text = "GLaDOS loves testing!" };
+            var obj2 = new TestObj2() { Text = "Keep testing, just keep testing" };
+
+            var numIn1 = db.Insert(obj1);
+            Assert.AreEqual(1, numIn1);
+            var numIn2 = db.Insert(obj2);
+            Assert.AreEqual(1, numIn2);
+
+            var result1 = db.Query<TestObj>("select * from TestObj").ToList();
+            Assert.AreEqual(numIn1, result1.Count);
+            Assert.AreEqual(obj1.Text, result1.First().Text);
+
+            var result2 = db.Query<TestObj>("select * from TestObj2").ToList();
+            Assert.AreEqual(numIn2, result2.Count);
+
+            db.Close();
+        }
+
+        [Test]
+        public void InsertWithExtra()
+        {
+            var db = new TestDb(Path.GetTempFileName());
+            var obj1 = new TestObj2() { Id=1, Text = "GLaDOS loves testing!" };
+            var obj2 = new TestObj2() { Id=1, Text = "Keep testing, just keep testing" };
+            var obj3 = new TestObj2() { Id=1, Text = "Done testing" };
+
+            db.Insert(obj1);
+
+
+            try {
+                db.Insert(obj2);
+                Assert.Fail("Expected unique constraint violation");
+            }
+            catch (SQLiteException) {
+            }
+            db.Insert(obj2, "OR REPLACE");
+
+
+            try {
+                db.Insert(obj3);
+                Assert.Fail("Expected unique constraint violation");
+            }
+            catch (SQLiteException) {
+            }
+            db.Insert(obj3, "OR IGNORE");
+
+            var result = db.Query<TestObj>("select * from TestObj2").ToList();
+            Assert.AreEqual(1, result.Count);
+            Assert.AreEqual(obj2.Text, result.First().Text);
+
+
+            db.Close();
+        }
+
+
     }
 }


Update Program.cs

Update Program.cs

Added reference to namepace System again.

--- app/Program.cs
+++ app/Program.cs
@@ -1,8 +1,8 @@
-// using System;
 // using System.Collections.Generic;
 // using System.Linq;
 // using System.Threading.Tasks;

+using System;
 using System.IO;                            // Directory.
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.Configuration;


Assembly info updates

Assembly info updates

--- sdk/src/DocuSign.eSign/Properties/AssemblyInfo.cs
+++ sdk/src/DocuSign.eSign/Properties/AssemblyInfo.cs
@@ -28,5 +28,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.2.0")]
-[assembly: AssemblyFileVersion("2.2.0")]
+[assembly: AssemblyVersion("2.2.1")]
+[assembly: AssemblyFileVersion("2.2.1")]


Assembly info updates

Assembly info updates


Added failing test for #4654.

Added failing test for #4654.

--- tests/Avalonia.Controls.UnitTests/TabControlTests.cs
+++ tests/Avalonia.Controls.UnitTests/TabControlTests.cs
@@ -122,11 +122,56 @@
                 Items = collection,
             };

-            target.ApplyTemplate();
+            Prepare(target);
             target.SelectedItem = collection[1];
+
+            Assert.Same(collection[1], target.SelectedItem);
+            Assert.Equal(collection[1].Content, target.SelectedContent);
+
             collection.RemoveAt(1);

             Assert.Same(collection[0], target.SelectedItem);
+            Assert.Equal(collection[0].Content, target.SelectedContent);
+        }
+
+        [Fact]
+        public void Removal_Should_Set_New_Item0_When_Item0_Selected()
+        {
+            var collection = new ObservableCollection<TabItem>()
+            {
+                new TabItem
+                {
+                    Name = "first",
+                    Content = "foo",
+                },
+                new TabItem
+                {
+                    Name = "second",
+                    Content = "bar",
+                },
+                new TabItem
+                {
+                    Name = "3rd",
+                    Content = "barf",
+                },
+            };
+
+            var target = new TabControl
+            {
+                Template = TabControlTemplate(),
+                Items = collection,
+            };
+
+            Prepare(target);
+            target.SelectedItem = collection[0];
+
+            Assert.Same(collection[0], target.SelectedItem);
+            Assert.Equal(collection[0].Content, target.SelectedContent);
+
+            collection.RemoveAt(0);
+
+            Assert.Same(collection[0], target.SelectedItem);
+            Assert.Equal(collection[0].Content, target.SelectedContent);
         }

         [Fact]
@@ -349,6 +394,8 @@
             }
         }

+
+
         private IControlTemplate TabControlTemplate()
         {
             return new FuncControlTemplate<TabControl>((parent, scope) =>
@@ -383,6 +430,13 @@
                 }.RegisterInNameScope(scope));
         }

+        private void Prepare(TabControl target)
+        {
+            ApplyTemplate(target);
+            target.Measure(Size.Infinity);
+            target.Arrange(new Rect(target.DesiredSize));
+        }
+
         private void ApplyTemplate(TabControl target)
         {
             target.ApplyTemplate();


Update template to display CompiledName

Update template to display CompiledName

--- misc/templates/reference/part-members.cshtml
+++ misc/templates/reference/part-members.cshtml
@@ -32,9 +32,13 @@

           }
           @it.Comment.FullText
+          @if (!String.IsNullOrEmpty(it.Details.FormatCompiledName))
+		  {
+			  @:
CompiledName: @it.Details.FormatCompiledName

+		  }

     }

-}+}


bugfix OberservableCollections where recreated in Initialize and broke the DataBindings to the GUI

--- processing/ProcessChain.cs
+++ processing/ProcessChain.cs
@@ -55,6 +55,10 @@
             ToolProvider = toolProvider;
             Project = project;

+            WaitingProcesses = new ObservableCollection<IProcess>();
+            RunningProcesses = new ObservableCollection<IProcess>();
+            EndedProcesses = new ObservableCollection<IProcess>();
+
             Initialize();
         }

@@ -71,6 +75,9 @@
             processes = CreateProcessChain();
             //processes = CreateDummyProcessChain();

+            WaitingProcesses.Clear();
+            RunningProcesses.Clear();
+            EndedProcesses.Clear();
             foreach (var p in processes)
             {
                 p.Setup = Setup;
@@ -81,11 +88,8 @@
                 p.Ended += ProcessEndedHandler;
                 p.Progress += ProcessProgressHandler;
                 totalProgressWeight += p.ProgressWeight;
-            }
-
-            WaitingProcesses = new ObservableCollection<IProcess>(processes);
-            RunningProcesses = new ObservableCollection<IProcess>();
-            EndedProcesses = new ObservableCollection<IProcess>();
+                WaitingProcesses.Add(p);
+            }
         }

         private static IProcess[] CreateProcessChain()


Add test cases confirming behaviour described in xmldoc

--- osu.Framework.Tests/Dependencies/CachedAttributeTest.cs
+++ osu.Framework.Tests/Dependencies/CachedAttributeTest.cs
@@ -110,6 +110,7 @@

             var dependencies = DependencyActivator.MergeDependencies(provider, new DependencyContainer());

+            Assert.IsNull(dependencies.Get<object>());
             Assert.IsNotNull(dependencies.Get<ProvidedType1>());
         }

@@ -274,6 +275,29 @@

             Assert.IsNotNull(dependencies.Get<IProviderInterface3>());
             Assert.IsNotNull(dependencies.Get<IProviderInterface2>());
+        }
+
+        [Test]
+        public void TestInheritancePreservesCachingViaBaseType()
+        {
+            var provider = new Provider26();
+
+            var dependencies = DependencyActivator.MergeDependencies(provider, new DependencyContainer());
+
+            Assert.AreEqual(provider, dependencies.Get<Provider1>());
+            Assert.IsNull(dependencies.Get<Provider26>());
+        }
+
+        [Test]
+        public void TestImplementationOfDerivedInterfacePreservesCaching()
+        {
+            var provider = new Provider27();
+
+            var dependencies = DependencyActivator.MergeDependencies(provider, new DependencyContainer());
+
+            Assert.AreEqual(provider, dependencies.Get<IProviderInterface2>());
+            Assert.IsNull(dependencies.Get<IProviderInterface4>());
+            Assert.IsNull(dependencies.Get<Provider27>());
         }

         private interface IProvidedInterface1
@@ -459,6 +483,14 @@
         {
         }

+        private class Provider26 : Provider1
+        {
+        }
+
+        private class Provider27 : IProviderInterface4
+        {
+        }
+
         [Cached]
         private interface IProviderInterface3 : IProviderInterface2
         {
@@ -468,5 +500,9 @@
         private interface IProviderInterface2
         {
         }
+
+        private interface IProviderInterface4 : IProviderInterface2
+        {
+        }
     }
 }


Fix `DatabasedKeyBindingContainer` re-querying realm on receiving notification

--- osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs
+++ osu.Game/Input/Bindings/DatabasedKeyBindingContainer.cs
@@ -8,6 +8,7 @@
 using osu.Framework.Input.Bindings;
 using osu.Game.Database;
 using osu.Game.Rulesets;
+using Realms;

 namespace osu.Game.Input.Bindings
 {
@@ -46,41 +47,36 @@
                 throw new InvalidOperationException($"{nameof(variant)} can not be null when a non-null {nameof(ruleset)} is provided.");
         }

-        private IQueryable<RealmKeyBinding> queryRealmKeyBindings()
-        {
-            string rulesetName = ruleset?.ShortName;
-            return realm.Realm.All<RealmKeyBinding>()
-                        .Where(b => b.RulesetName == rulesetName && b.Variant == variant);
-        }
-
         protected override void LoadComplete()
         {
-            realmSubscription = realm.RegisterForNotifications(r => queryRealmKeyBindings(), (sender, changes, error) =>
+            realmSubscription = realm.RegisterForNotifications(queryRealmKeyBindings, (sender, changes, error) =>
             {
                 // The first fire of this is a bit redundant as this is being called in base.LoadComplete,
                 // but this is safest in case the subscription is restored after a context recycle.
-                ReloadMappings();
+                reloadMappings(sender.AsQueryable());
             });

             base.LoadComplete();
         }

-        protected override void Dispose(bool isDisposing)
+        protected override void ReloadMappings() => reloadMappings(queryRealmKeyBindings(realm.Realm));
+
+        private IQueryable<RealmKeyBinding> queryRealmKeyBindings(Realm realm)
         {
-            base.Dispose(isDisposing);
-
-            realmSubscription?.Dispose();
+            string rulesetName = ruleset?.ShortName;
+            return realm.All<RealmKeyBinding>()
+                        .Where(b => b.RulesetName == rulesetName && b.Variant == variant);
         }

-        protected override void ReloadMappings()
+        private void reloadMappings(IQueryable<RealmKeyBinding> realmKeyBindings)
         {
             var defaults = DefaultKeyBindings.ToList();

-            List<RealmKeyBinding> newBindings = queryRealmKeyBindings().Detach()
-                                                                       // this ordering is important to ensure that we read entries from the database in the order
-                                                                       // enforced by DefaultKeyBindings. allow for song select to handle actions that may otherwise
-                                                                       // have been eaten by the music controller due to query order.
-                                                                       .OrderBy(b => defaults.FindIndex(d => (int)d.Action == b.ActionInt)).ToList();
+            List<RealmKeyBinding> newBindings = realmKeyBindings.Detach()
+                                                                // this ordering is important to ensure that we read entries from the database in the order
+                                                                // enforced by DefaultKeyBindings. allow for song select to handle actions that may otherwise
+                                                                // have been eaten by the music controller due to query order.
+                                                                .OrderBy(b => defaults.FindIndex(d => (int)d.Action == b.ActionInt)).ToList();

             // In the case no bindings were found in the database, presume this usage is for a non-databased ruleset.
             // This actually should never be required and can be removed if it is ever deemed to cause a problem.
@@ -91,5 +87,12 @@
             else
                 KeyBindings = newBindings;
         }
+
+        protected override void Dispose(bool isDisposing)
+        {
+            base.Dispose(isDisposing);
+
+            realmSubscription?.Dispose();
+        }
     }
 }


Add collection context menu to room playlist items

--- osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs
+++ osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs
@@ -5,6 +5,7 @@

 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Threading.Tasks;
 using osu.Framework.Allocation;
@@ -15,11 +16,13 @@
 using osu.Framework.Graphics.Cursor;
 using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.Sprites;
+using osu.Framework.Graphics.UserInterface;
 using osu.Framework.Input.Events;
 using osu.Framework.Localisation;
 using osu.Framework.Logging;
 using osu.Game.Beatmaps;
 using osu.Game.Beatmaps.Drawables;
+using osu.Game.Collections;
 using osu.Game.Database;
 using osu.Game.Graphics;
 using osu.Game.Graphics.Containers;
@@ -38,7 +41,7 @@

 namespace osu.Game.Screens.OnlinePlay
 {
-    public class DrawableRoomPlaylistItem : OsuRearrangeableListItem<PlaylistItem>
+    public class DrawableRoomPlaylistItem : OsuRearrangeableListItem<PlaylistItem>, IHasContextMenu
     {
         public const float HEIGHT = 50;

@@ -90,6 +93,8 @@
         private PanelBackground panelBackground;
         private FillFlowContainer mainFillFlow;

+        private BeatmapDownloadTracker downloadTracker;
+
         [Resolved]
         private RulesetStore rulesets { get; set; }

@@ -101,6 +106,12 @@

         [Resolved]
         private BeatmapLookupCache beatmapLookupCache { get; set; }
+
+        [Resolved(CanBeNull = true)]
+        private CollectionManager collectionManager { get; set; }
+
+        [Resolved(CanBeNull = true)]
+        private ManageCollectionsDialog manageCollectionsDialog { get; set; }

         protected override bool ShouldBeConsideredForInput(Drawable child) => AllowReordering || AllowDeletion || !AllowSelection || SelectedItem.Value == Model;

@@ -304,6 +315,15 @@

             difficultyIconContainer.FadeInFromZero(500, Easing.OutQuint);
             mainFillFlow.FadeInFromZero(500, Easing.OutQuint);
+
+            downloadTracker?.RemoveAndDisposeImmediately();
+
+            if (beatmap != null)
+            {
+                Debug.Assert(beatmap.BeatmapSet != null);
+                downloadTracker = new BeatmapDownloadTracker(beatmap.BeatmapSet);
+                AddInternal(downloadTracker);
+            }
         }

         protected override Drawable CreateContent()
@@ -433,7 +453,7 @@
                             }
                         }
                     },
-                }
+                },
             };
         }

@@ -468,6 +488,30 @@
             if (AllowSelection && valid.Value)
                 SelectedItem.Value = Model;
             return true;
+        }
+
+        public MenuItem[] ContextMenuItems
+        {
+            get
+            {
+                List<MenuItem> items = new List<MenuItem>();
+
+                if (beatmap != null && collectionManager != null)
+                {
+                    if (downloadTracker.State.Value == DownloadState.LocallyAvailable)
+                    {
+                        var collectionItems = collectionManager.Collections.Select(c => new CollectionToggleMenuItem(c, beatmap)).Cast<OsuMenuItem>().ToList();
+                        if (manageCollectionsDialog != null)
+                            collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show));
+
+                        items.Add(new OsuMenuItem("Collections") { Items = collectionItems });
+                    }
+                    else
+                        items.Add(new OsuMenuItem("Download to add to collection") { Action = { Disabled = true } });
+                }
+
+                return items.ToArray();
+            }
         }

         public class PlaylistEditButton : GrayButton


Do not do a screen translation to draw with the new reversible frame.

--- source/ZedGraph/ZedGraphControl.Events.cs
+++ source/ZedGraph/ZedGraphControl.Events.cs
@@ -1180,20 +1180,20 @@

 		private void HandleZoomDrag( Point mousePt )
 		{
-		        using (Graphics g = Graphics.FromHwnd(this.Handle))
-		        {
-			        // Hide the previous rectangle by calling the
-			        // DrawReversibleFrame method with the same parameters.
-			        Rectangle rect = this.CalcScreenRect(this._dragStartPt, this._dragEndPt);
-			        ReversibleFrame.Draw(g, this.BackColor, rect);
-
-			        // Bound the zoom to the ChartRect
-			        _dragEndPt = Point.Round(this.BoundPointToRect(mousePt, this._dragPane.Chart._rect));
-			        rect = this.CalcScreenRect(this._dragStartPt, this._dragEndPt);
-
-			        // Draw the new rectangle by calling DrawReversibleFrame again.
-			        ReversibleFrame.Draw(g, this.BackColor, rect);
-		        }
+			using (Graphics g = Graphics.FromHwnd(this.Handle))
+			{
+				// Hide the previous rectangle by calling the
+				// DrawReversibleFrame method with the same parameters.
+				Rectangle rect = this.CalcZoomRect(this._dragStartPt, this._dragEndPt);
+				ReversibleFrame.Draw(g, this.BackColor, rect);
+
+				// Bound the zoom to the ChartRect
+				_dragEndPt = Point.Round(this.BoundPointToRect(mousePt, this._dragPane.Chart._rect));
+				rect = this.CalcZoomRect(this._dragStartPt, this._dragEndPt);
+
+				// Draw the new rectangle by calling DrawReversibleFrame again.
+				ReversibleFrame.Draw(g, this.BackColor, rect);
+			}
 		}

 		private const double ZoomResolution = 1e-300;
@@ -1342,28 +1342,30 @@
 			return newPt;
 		}

-		private Rectangle CalcScreenRect( Point mousePt1, Point mousePt2 )
-		{
-			Point screenPt = PointToScreen( mousePt1 );
-			Size size = new Size( mousePt2.X - mousePt1.X, mousePt2.Y - mousePt1.Y );
-			Rectangle rect = new Rectangle( screenPt, size );
-
-			if ( _isZooming )
-			{
-				Rectangle chartRect = Rectangle.Round( _dragPane.Chart._rect );
-
-				Point chartPt = PointToScreen( chartRect.Location );
-
-				if ( !_isEnableVZoom )
-				{
-					rect.Y = chartPt.Y;
-					rect.Height = chartRect.Height + 1;
-				}
-				else if ( !_isEnableHZoom )
-				{
-					rect.X = chartPt.X;
-					rect.Width = chartRect.Width + 1;
-				}
+		/// <summary>
+		/// Caclulates the <see cref="Rectangle"/> between two points for zooming.
+		/// </summary>
+		/// <param name="point1">The first point.</param>
+		/// <param name="point2">The second point.</param>
+		/// <returns>The rectangle between the two points.</returns>
+		private Rectangle CalcZoomRect(Point point1, Point point2)
+		{
+			Size size = new Size(point2.X - point1.X, point2.Y - point1.Y);
+			Rectangle rect = new Rectangle(point1, size);
+
+			Rectangle chartRect = Rectangle.Round(this._dragPane.Chart.Rect);
+
+			Point chartPt = chartRect.Location;
+
+			if (!this.IsEnableVZoom)
+			{
+				rect.Y = chartPt.Y;
+				rect.Height = chartRect.Height + 1;
+			}
+			else if (!this.IsEnableHZoom)
+			{
+				rect.X = chartPt.X;
+				rect.Width = chartRect.Width + 1;
 			}

 			return rect;


Bug fix for result of QueueMethod.

Bug fix for result of QueueMethod.

--- source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs
+++ source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs
@@ -125,7 +125,8 @@
     protected uint QueueMethod(MethodBase aMethod) {
       uint xResult;
       if (!mKnownMethods.TryGetValue(aMethod, out xResult)) {
-        mKnownMethods.Add(aMethod, (uint)mMethodsToProcess.Count);
+        xResult = (uint)mMethodsToProcess.Count;
+        mKnownMethods.Add(aMethod, xResult);
         mMethodsToProcess.Add(aMethod);
         //TODO: Might still need this one, see after we get assembly output again
         //Im hoping the operand walking we have now ill include this on its own.


setting the test category to integration since it touches wmi and it broke the build

--- product/dropkick.tests/FileSystem/PathConverterSpecs.cs
+++ product/dropkick.tests/FileSystem/PathConverterSpecs.cs
@@ -42,6 +42,7 @@
             }
         }

+        [Category("Integration")]
         public class when_using_PathConverter_to_convert_a_path_and_deploying_to_a_local_server : PathConverterSpecsBase
         {
             public override void Because() {}
@@ -59,7 +60,6 @@
             }

             [Fact]
-            [Category("Integration")]
             public void should_convert_remote_path_with_tilda_shareName_subfolder_successfully()
             {
                 var shareFolder = @".\temp";


Edit Seq.Find

Edit Seq.Find

--- NX.cs
+++ NX.cs
@@ -369,7 +369,7 @@

         public static Option<T> Find<T>(this IEnumerable<T> seq, Func<T, bool> f)
         {
-            return seq.Map(Option.Some).FirstOrDefault(x => x.Match(f, () => Option.None));
+            return seq.Map(Option.Some).FirstOrDefault(x => x.Match(f, () => false));
         }

         public static IEnumerable<T> Filter<T>(this IEnumerable<T> seq, Func<T, bool> f)


Fix unit names in UnitNames.cs

Fix unit names in UnitNames.cs

Change "radiants" to "Radians" for the CSS "rad" unit (see https://developer.mozilla.org/en-US/docs/Web/CSS/angle#units).

Change "Grads" to "Gradians" for the CSS "grad" unit (see https://developer.mozilla.org/en-US/docs/Web/CSS/angle#units).

Change "Remainings" to "Font size of the root element." for the CSS "rem" unit (see https://developer.mozilla.org/en-US/docs/Web/CSS/length#units).

Change "Pieces" to "Picas" for the CSS "pc" unit (see https://developer.mozilla.org/en-US/docs/Web/CSS/length#units).

--- src/AngleSharp.Css/Constants/UnitNames.cs
+++ src/AngleSharp.Css/Constants/UnitNames.cs
@@ -33,12 +33,12 @@
         public static readonly String Turn = "turn";

         /// <summary>
-        /// Radiants.
+        /// Radians.
         /// </summary>
         public static readonly String Rad = "rad";

         /// <summary>
-        /// Grads.
+        /// Gradians.
         /// </summary>
         public static readonly String Grad = "grad";

@@ -123,12 +123,12 @@
         public static readonly String Pt = "pt";

         /// <summary>
-        /// Remainings.
+        /// Font size of the root element.
         /// </summary>
         public static readonly String Rem = "rem";

         /// <summary>
-        /// Pieces.
+        /// Picas.
         /// </summary>
         public static readonly String Pc = "pc";


Added  logging to root cause an issue

Added  logging to root cause an issue

--- src/Appveyor.TestLogger/AppveyorLogger.cs
+++ src/Appveyor.TestLogger/AppveyorLogger.cs
@@ -161,6 +161,7 @@
                 RedirectStandardOutput = true
             };

+            Console.WriteLine("Logging: " + processInfo.Arguments);
             using (var activeProcess = new Process { StartInfo = processInfo })
             {
                 activeProcess.OutputDataReceived += (sender, arg) => Console.WriteLine(arg.Data);


Add missing constructors to ApiException

--- src/Auth0.Core/Exceptions/ApiException.cs
+++ src/Auth0.Core/Exceptions/ApiException.cs
@@ -9,42 +9,62 @@
     public class ApiException : Exception
     {
         /// <summary>
-        /// The exception payload from the response
+        /// The <see cref="Core.ApiError"/> from the response.
         /// </summary>
         public ApiError ApiError { get; }

         /// <summary>
-        /// The HTTP status code associated with the response
+        /// The <see cref="HttpStatusCode"/> code associated with the response.
         /// </summary>
         public HttpStatusCode StatusCode { get; }

         /// <summary>
         /// Initializes a new instance of the <see cref="ApiException"/> class.
         /// </summary>
-        /// <param name="message">The message.</param>
-        /// <param name="innerException">The inner exception.</param>
+        public ApiException()
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message.
+        /// </summary>
+        /// <param name="message">The error message that explains the reason for the exception.</param>
+        public ApiException(string message)
+            : base(message)
+        {
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ApiException"/> class with a specified error message
+        /// and a reference to the inner exception that is the cause of this exception.
+        /// </summary>
+        /// <param name="message">The error message that explains the reason for the exception.</param>
+        /// <param name="innerException">The exception that is the cause of the current exception, or a null
+        /// reference if no inner exception is specified.</param>
         public ApiException(string message, Exception innerException)
             : base(message, innerException)
         {
         }

         /// <summary>
-        /// Initializes a new instance of the <see cref="ApiException"/> class.
+        /// Initializes a new instance of the <see cref="ApiException"/> class with a specified
+        /// <see cref="HttpStatusCode"/>.
         /// </summary>
-        /// <param name="statusCode">The HTTP status code.</param>
+        /// The <see cref="HttpStatusCode"/> code associated with the response.
         public ApiException(HttpStatusCode statusCode)
-            : base(statusCode.ToString())
+            : this(statusCode.ToString())
         {
             StatusCode = statusCode;
         }

         /// <summary>
-        /// Initializes a new instance of the <see cref="ApiException"/> class.
+        /// Initializes a new instance of the <see cref="ApiException"/> class with a specified
+        /// <see cref="HttpStatusCode"/> and <see cref="Core.ApiError"/>.
         /// </summary>
         /// <param name="statusCode">The status code.</param>
         /// <param name="apiError">The API error.</param>
         public ApiException(HttpStatusCode statusCode, ApiError apiError)
-            : base(apiError == null ? statusCode.ToString() : apiError.Message)
+            : this(apiError == null ? statusCode.ToString() : apiError.Message)
         {
             StatusCode = statusCode;
             ApiError = apiError;


Make test expect 'credits' instead of 'verso'

--- src/BloomTests/Book/XMatterHelperTests.cs
+++ src/BloomTests/Book/XMatterHelperTests.cs
@@ -54,7 +54,7 @@
 			CreateHelper().InjectXMatter(_dataSet.WritingSystemAliases, Layout.A5Portrait);
 			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[1][@id='bloomDataDiv']", 1);
 			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[2][contains(@class,'cover')]", 1);
-			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[3][contains(@class,'verso')]", 1);
+			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[3][contains(@class,'credits')]", 1);
 			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[4][contains(@class,'titlePage')]", 1);
 			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[5][@id='firstPage']", 1);
 			AssertThatXmlIn.Dom(_dom.RawDom).HasSpecifiedNumberOfMatchesForXpath("//body/div[6][contains(@class,'bloom-backMatter')]", 1);


Fixed another bug in PDPatcher.

Fixed another bug in PDPatcher.

It was trying to create the working directory when backing up, rather
than creating the backup dir.

--- src/C#/PDPatcher/PDPatcher/FileManager.cs
+++ src/C#/PDPatcher/PDPatcher/FileManager.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Text;
 using System.IO;
+using LogThis;
 using KISS;

 namespace PDPatcher
@@ -15,16 +16,23 @@
         /// <param name="WorkingDir">The client's residing directory.</param>
         public static void Backup(ManifestFile Manifest, string WorkingDir)
         {
-            if(!Directory.Exists(WorkingDir + "Backup"))
-                Directory.CreateDirectory(WorkingDir);
+            try
+            {
+                if (!Directory.Exists(WorkingDir + "Backup"))
+                    Directory.CreateDirectory(WorkingDir + "Backup");

-            foreach (PatchFile PFile in Manifest.PatchFiles)
+                foreach (PatchFile PFile in Manifest.PatchFiles)
+                {
+                    if (File.Exists(WorkingDir + PFile.Address))
+                    {
+                        FileManager.CreateDirectory(WorkingDir + "Backup\\" + PFile.Address);
+                        File.Copy(WorkingDir + PFile.Address, WorkingDir + "Backup\\" + PFile.Address);
+                    }
+                }
+            }
+            catch (Exception e)
             {
-                if (File.Exists(WorkingDir + PFile.Address))
-                {
-                    FileManager.CreateDirectory(WorkingDir + "Backup\\" + PFile.Address);
-                    File.Copy(WorkingDir + PFile.Address, WorkingDir + "Backup\\" + PFile.Address);
-                }
+                Log.LogThis("Exception in FileManager.Backup:" + e.ToString(), eloglevel.error);
             }
         }


Fix to pull non-text attributes

Fix to pull non-text attributes

--- src/CSharpHDF5/Helpers/AttributeHelper.cs
+++ src/CSharpHDF5/Helpers/AttributeHelper.cs
@@ -37,8 +37,7 @@
                             else
                             {
                                 attribute = GetAttribute(attributeId, attributeName, type);
-                            }
-
+                            }

                             if (attribute != null)
                             {
@@ -226,7 +225,7 @@
             Hdf5DataType _dataType,
             Hdf5Identifier _attributeId)
         {
-            T value = default(T);
+            T[] value = new T[1];

             GCHandle arrayHandle = GCHandle.Alloc(value, GCHandleType.Pinned);

@@ -238,7 +237,7 @@

             H5T.close(dataType.Value);

-            return value;
+            return value[0];
         }
     }
 }


为字段标识表达式增加一些计算赋值的静态方法。 :dash: :chocolate_bar:

--- src/Common/Expressions/FieldIdentifier.cs
+++ src/Common/Expressions/FieldIdentifier.cs
@@ -89,6 +89,33 @@
 		}
 		#endregion

+		#region 公共方法
+		public BinaryExpression AddAssign(IExpression value)
+		{
+			return Expression.Add(this, value);
+		}
+
+		public BinaryExpression SubtractAssign(IExpression value)
+		{
+			return Expression.Subtract(this, value);
+		}
+
+		public BinaryExpression MultiplyAssign(IExpression value)
+		{
+			return Expression.Multiply(this, value);
+		}
+
+		public BinaryExpression DivideAssign(IExpression value)
+		{
+			return Expression.Divide(this, value);
+		}
+
+		public BinaryExpression ModuloAssign(IExpression value)
+		{
+			return Expression.Modulo(this, value);
+		}
+		#endregion
+
 		#region 重写方法
 		public override string ToString()
 		{


Cleanup on destroy

Cleanup on destroy

--- src/Core2D.Avalonia.Droid/MainActivity.cs
+++ src/Core2D.Avalonia.Droid/MainActivity.cs
@@ -77,9 +77,9 @@
             base.OnCreate(bundle);
         }

-        protected override void OnStop()
+        protected override void OnDestroy()
         {
-            base.OnStop();
+            base.OnDestroy();

             var path = System.IO.Path.Combine(fileIO.GetAssemblyPath(null), "Core2D.recent");
             editor.OnSaveRecent(path);


Remove the code that detects modules added after initial load.

This is too much code complexity for too little gain (covering the case where a simulator temporarily has all its regions removed but is not shutdown, it's not a major requirement).
Removing this check also at least allows the module to work with dynamically added modules without restarting (as long as modules never falls to zero).

--- src/EventRecorder/EventRecordingModule.cs
+++ src/EventRecorder/EventRecordingModule.cs
@@ -53,16 +53,7 @@
         /// <summary>
         /// Is this module enabled?
         /// </summary>
-        public bool Enabled { get; private set; }
-
-        /// <summary>
-        /// Indicates whether the simulator has finished adding its initial scenes to the module.
-        /// </summary>
-        /// <remarks>
-        /// This only exists to help handle a bug in OpenSimulator 0.8 where Close() is not called on simulator
-        /// shutdown.
-        /// </remarks>
-        public bool FinishedAddingInitialScenes { get; private set; }
+        public bool Enabled { get; private set; }

         /// <summary>
         /// Track the number of scenes being monitored.
@@ -108,7 +99,6 @@
             else if (recorder == "MySQL")
                 m_recorder = new QueueingRecorder(new MySQLRecorder(configSource));

-            SceneManager.Instance.OnRegionsReadyStatusChange += HandleRegionsReadyStatusChange;
             Enabled = true;

             m_recorder.Start();
@@ -132,15 +122,6 @@
             if (!Enabled)
                 return;

-            if (FinishedAddingInitialScenes)
-            {
-                m_log.WarnFormat(
-                    "[EVENT RECORDER]: Cannot currently dynamic add scenes to event recorder.  Please restart the simulator to add scene {0}",
-                    scene.Name);
-
-                return;
-            }
-
             NumberOfScenesMonitored++;

             scene.EventManager.OnMakeRootAgent += HandleOnMakeRootAgent;
@@ -156,19 +137,6 @@
 //                        "[EVENT RECORDER]: Notified of avatar {0} logging out of scene {1}", agentID, s.Name);

             scene.EventManager.OnClientClosed += HandleOnClientClosed;
-        }
-
-        private void HandleRegionsReadyStatusChange(SceneManager sm)
-        {
-            // XXX: This is horrific, but the only way to tell whether we are shutting down at the moment is both to
-            // scene count and wait for OpenSimulator to signal that all scene are ready after initial startup.
-            // But this stops this module working properly with scene-less simulators and those that add regions afterwards
-            // This will be fixed in the next release of OpenSimulator (post 0.8) when Close() will be called on shutdown.
-            if (sm.AllRegionsReady)
-            {
-                sm.OnRegionsReadyStatusChange -= HandleRegionsReadyStatusChange;
-                FinishedAddingInitialScenes = true;
-            }
         }

         private void HandleOnClientClosed(UUID agentID, Scene s)


Deleted boundaryTuples from Plugin/PluginInitiator.cs

This was removed because it was never used

--- src/lib/Plugin/PluginInitiator.cs
+++ src/lib/Plugin/PluginInitiator.cs
@@ -12,7 +12,6 @@
   public abstract class PluginInitiator<T> : Initiator, IPluginLoader<T>
   {
     private Dictionary<Guid, Guid> translationLayer;
-    private T[] boundaryTuples;
     public abstract T[] DesiredPluginInformation { get; }
     protected PluginInitiator()
     {


Fixed method UpdateFirework of SearchMutator class.

--- src/FireworksNet/Explode/SearchMutator.cs
+++ src/FireworksNet/Explode/SearchMutator.cs
@@ -79,10 +79,10 @@
         /// <returns></returns>
         private static Firework UpdateFirework(Firework source, ref Firework target)
         {
-            source.Coordinates = target.Coordinates;
-            source.Quality = target.Quality;
-            source.BirthStepNumber = target.BirthStepNumber;//TODO: maybe this field unnecessary
-            source.FireworkType = target.FireworkType; //TODO: maybe this field unnecessary
+            target.Coordinates = source.Coordinates;
+            target.Quality = source.Quality;
+            target.BirthStepNumber = source.BirthStepNumber;//TODO: maybe this field unnecessary
+            target.FireworkType = source.FireworkType; //TODO: maybe this field unnecessary

             return source;
         }


Revert security after applying transforms.

--- src/Foundation/Installer/code/PostStep.cs
+++ src/Foundation/Installer/code/PostStep.cs
@@ -1,11 +1,14 @@
 namespace Sitecore.Foundation.Installer
 {
+  using System;
   using System.Collections.Generic;
   using System.Collections.Specialized;
   using System.IO;
   using System.Linq;
   using System.Text.RegularExpressions;
   using Sitecore.Foundation.Installer.XmlTransform;
+  using Sitecore.Install;
+  using Sitecore.Install.Files;
   using Sitecore.Install.Framework;

   public class PostStep : IPostStep
@@ -40,16 +43,28 @@
         foreach (var transform in transforms)
         {
           var fileToTransformPath = Regex.Replace(transform, "^.*\\\\code", "~").Replace(".transform", "");
-          Diagnostics.Log.Warn($"{transform} - {fileToTransformPath}", this);
           var fileToTransform = this.filePathResolver.MapPath(fileToTransformPath);
           this.ApplyTransform(fileToTransform, transform, fileToTransform);
         }
       }
+
+      this.InstallSecurity(metaData);
     }

     protected void ApplyTransform(string sourceFilePath, string transformFilePath, string targetFilePath)
     {
       this.xdtTransformEngine.ApplyConfigTransformation(sourceFilePath, transformFilePath, targetFilePath);
     }
+
+    protected void InstallSecurity(NameValueCollection metaData)
+    {
+      if (metaData != null)
+      {
+        var packageName = $"{metaData["PackageName"]}.zip";
+        var installer = new Installer();
+        var file = Installer.GetFilename(packageName);
+        installer.InstallSecurity(PathUtils.MapPath(file));
+      }
+    }
   }
 }


A fix for when the camera roll list is empty (#13)

* Added the camera privacy permission for sample
Fix for crash when there are no items in camera roll

* plist description to english.
spaces to tabs

--- src/GMImagePicker/GMGridViewController.cs
+++ src/GMImagePicker/GMGridViewController.cs
@@ -105,7 +105,7 @@
 		}

 		private void SetupViews ()
-		{
+		{
 			CollectionView.Source = new GMGridViewCollectionViewSource (this);
 			CollectionView.BackgroundColor = UIColor.Clear;
 			View.BackgroundColor = _picker.PickerBackgroundColor;
@@ -196,7 +196,7 @@
 		{
 			base.ViewDidAppear (animated);

-			if (_picker.GridSortOrder == SortOrder.Ascending)
+			if (_newestItemPath.Section >= 0 && _newestItemPath.Row >= 0 && _newestItemPath.Item >= 0 && _picker.GridSortOrder == SortOrder.Ascending)
 			{
 				// Scroll to bottom (newest images are at the bottom)
 				CollectionView.ScrollToItem(_newestItemPath, UICollectionViewScrollPosition.Bottom, false);
@@ -378,8 +378,11 @@
 							if (_picker.GridSortOrder == SortOrder.Ascending)
 							{
 								var item = collectionView.NumberOfItemsInSection(0) - 1;
-								var path = NSIndexPath.FromItemSection(item, 0);
-								collectionView.ScrollToItem(path, UICollectionViewScrollPosition.Bottom, true);
+							    if (item >= 0)
+							    {
+							        var path = NSIndexPath.FromItemSection(item, 0);
+							        collectionView.ScrollToItem(path, UICollectionViewScrollPosition.Bottom, true);
+							    }
 							}
 							else
 							{


Add new line after each question

Add new line after each question

--- src/GameFifteen.Logic/Common/Constants.cs
+++ src/GameFifteen.Logic/Common/Constants.cs
@@ -19,11 +19,11 @@
         public const int ScoreboardMaxCount = 5;

         // GameInitializator
-        public const string TileTypeQuestion = "What type of tiles would you like: Number or Letter: ";
-        public const string PatternTypeQuestion = "What type of pattern would you like: Classic or Column: ";
-        public const string MoverTypesQuestion = "How would you like to move the tiles: Classic or RowCol: ";
-        public const string RowsQuestion = "How many rows would you like: ";
-        public const string ColsQuestion = "How many cols would you like: ";
+        public const string TileTypeQuestion = "What type of tiles would you like?\n\rNumber or Letter: ";
+        public const string PatternTypeQuestion = "What type of pattern would you like?\n\rClassic or Column: ";
+        public const string MoverTypesQuestion = "How would you like to move the tiles?\n\rClassic or RowCol: ";
+        public const string RowsQuestion = "How many rows would you like? ";
+        public const string ColsQuestion = "How many cols would you like? ";

         // User messages
         public const string EnterCommandMessage = "Enter a number to move: ";


[generator] Do not generated unformatted code if debug mode is enabled.

--- src/Generator/Generators/CodeGenerator.cs
+++ src/Generator/Generators/CodeGenerator.cs
@@ -61,7 +61,7 @@

         public override string Generate()
         {
-            if (Options.IsCSharpGenerator && Options.CompileCode)
+            if (Options.IsCSharpGenerator && Options.CompileCode && !Options.GenerateDebugOutput)
                 return base.GenerateUnformatted();

             return base.Generate();


Raised missing notification of dependent value.

And added comment indicating that it will be :fire: soon.

--- src/GitHub.App/Models/PullRequestModel.cs
+++ src/GitHub.App/Models/PullRequestModel.cs
@@ -110,7 +110,15 @@
         public PullRequestStateEnum State
         {
             get { return status; }
-            set { status = value; this.RaisePropertyChange(); this.RaisePropertyChange(nameof(IsOpen)); }
+            set
+            {
+                status = value;
+                this.RaisePropertyChange();
+
+                // TODO: These notifications will be removed once maintainer workflow has been merged to master.
+                this.RaisePropertyChange(nameof(IsOpen));
+                this.RaisePropertyChange(nameof(Merged));
+            }
         }

         // TODO: Remove these property once maintainer workflow has been merged to master.


use object cache for commnet

use object cache for commnet

--- src/Kerbalism/Comms/AntennaInfoCommNet.cs
+++ src/Kerbalism/Comms/AntennaInfoCommNet.cs
@@ -9,16 +9,22 @@
 	{
 		public AntennaInfoCommNet(Vessel v, bool powered, bool storm)
 		{
-			List<ModuleDataTransmitter> transmitters;
-
 			int transmitterCount = 0;
 			rate = 1;

 			// if vessel is loaded
 			if (v.loaded)
 			{
-				// find transmitters
-				transmitters = v.FindPartModulesImplementing<ModuleDataTransmitter>();
+				// cache transmitters
+				var transmitters = Cache.VesselObjectsCache<List<ModuleDataTransmitter>>(v, "commnet");
+				if(transmitters == null)
+				{
+					// find transmitters
+					transmitters = v.FindPartModulesImplementing<ModuleDataTransmitter>();
+					if (transmitters == null)
+						transmitters = new List<ModuleDataTransmitter>();
+					Cache.SetVesselObjectsCache(v, "commnet", transmitters);
+				}

 				if (transmitters != null)
 				{
@@ -71,44 +77,55 @@
 			// if vessel is not loaded
 			else
 			{
-				// find proto transmitters
-				foreach (ProtoPartSnapshot p in v.protoVessel.protoPartSnapshots)
+				// cache transmitters
+				var transmitters = Cache.VesselObjectsCache<List<KeyValuePair<ModuleDataTransmitter, ProtoPartSnapshot>>>(v, "commnet");
+				if (transmitters == null)
 				{
-					// get part prefab (required for module properties)
-					Part part_prefab = PartLoader.getPartInfoByName(p.partName).partPrefab;
+					transmitters = new List<KeyValuePair<ModuleDataTransmitter, ProtoPartSnapshot>>();
+					// find proto transmitters
+					foreach (ProtoPartSnapshot p in v.protoVessel.protoPartSnapshots)
+					{
+						// get part prefab (required for module properties)
+						Part part_prefab = PartLoader.getPartInfoByName(p.partName).partPrefab;

-					transmitters = part_prefab.FindModulesImplementing<ModuleDataTransmitter>();
+						foreach(ModuleDataTransmitter t in part_prefab.FindModulesImplementing<ModuleDataTransmitter>())
+						{
+							transmitters.Add(new KeyValuePair<ModuleDataTransmitter, ProtoPartSnapshot>(t, p));
+						}
+					}

-					if (transmitters != null)
+					Cache.SetVesselObjectsCache(v, "commnet", transmitters);
+				}
+
+				foreach(var pair in transmitters)
+				{
+					ModuleDataTransmitter t = pair.Key;
+					ProtoPartSnapshot p = pair.Value;
+
+					if (t.antennaType == AntennaType.INTERNAL) // do not include internal data rate, ec cost only
+						ec += t.DataResourceCost * t.DataRate;
+					else
 					{
-						foreach (ModuleDataTransmitter t in transmitters)
+						// do we have an animation
+						ProtoPartModuleSnapshot m = p.FindModule("ModuleDeployableAntenna") ?? p.FindModule("ModuleAnimateGeneric");
+						if (m != null)
 						{
-							if (t.antennaType == AntennaType.INTERNAL) // do not include internal data rate, ec cost only
+							// only include data rate and ec cost if transmitter is extended
+							string deployState = Lib.Proto.GetString(m, "deployState");
+							float animSpeed = Lib.Proto.GetFloat(m, "animSpeed");
+							if (deployState == "EXTENDED" || animSpeed > 0)
+							{
+								rate *= t.DataRate;
+								transmitterCount++;
 								ec += t.DataResourceCost * t.DataRate;
-							else
-							{
-								// do we have an animation
-								ProtoPartModuleSnapshot m = p.FindModule("ModuleDeployableAntenna") ?? p.FindModule("ModuleAnimateGeneric");
-								if (m != null)
-								{
-									// only include data rate and ec cost if transmitter is extended
-									string deployState = Lib.Proto.GetString(m, "deployState");
-									float animSpeed = Lib.Proto.GetFloat(m, "animSpeed");
-									if (deployState == "EXTENDED" || animSpeed > 0)
-									{
-										rate *= t.DataRate;
-										transmitterCount++;
-										ec += t.DataResourceCost * t.DataRate;
-									}
-								}
-								// no animation
-								else
-								{
-									rate *= t.DataRate;
-									transmitterCount++;
-									ec += t.DataResourceCost * t.DataRate;
-								}
 							}
+						}
+						// no animation
+						else
+						{
+							rate *= t.DataRate;
+							transmitterCount++;
+							ec += t.DataResourceCost * t.DataRate;
 						}
 					}
 				}


Update Assembly Versions

Update Assembly Versions

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


Add GetImplementedOrInterfaceMember

Add GetImplementedOrInterfaceMember

--- source/Nuke.Common/Utilities/ReflectionUtility.cs
+++ source/Nuke.Common/Utilities/ReflectionUtility.cs
@@ -137,5 +137,15 @@
         {
             return $"{member.DeclaringType.NotNull().FullName.NotNull().Replace("+", ".")}.{member.Name}";
         }
+
+        public static MemberInfo GetImplementedOrInterfaceMember(this MemberInfo member, Type classType)
+        {
+            ControlFlow.Assert(classType.IsClass, "classType.IsClass");
+            return member.DeclaringType != classType
+                ? classType.GetMember(member.Name).SingleOrDefault() ??
+                  classType.GetMember(member.GetPossibleExplicitName(), Instance).SingleOrDefault() ??
+                  member
+                : member;
+        }
     }
 }


Dropped StringBuilderExtensions.cs which isn't used anymore

--- src/Nancy/Json/StringBuilderExtensions.cs
+++ src/Nancy/Json/StringBuilderExtensions.cs
@@ -1,175 +0,0 @@
-//
-// StringBuilderExtensions.cs
-//
-// Author:
-//   Marek Habersack <mhabersack@novell.com>
-//
-// (C) 2008 Novell, Inc.  http://novell.com/
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-namespace Nancy.Json
-{
-    using System;
-    using System.Text;
-
-    internal static class StringBuilderExtensions
-    {
-        static void CheckCount(StringBuilder sb, int maxCount)
-        {
-            if (sb.Length > maxCount)
-                throw new InvalidOperationException("Nancy.Json.JsonConfiguration.MaxJsonLength exceeded");
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, char[] value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, string value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, bool value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, byte value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, decimal value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, double value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, short value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, int value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, long value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, object value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, sbyte value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, float value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, ushort value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, uint value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, ulong value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, char value)
-        {
-            StringBuilder ret = sb.Append(value);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, char value, int repeatCount)
-        {
-            StringBuilder ret = sb.Append(value, repeatCount);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, char[] value, int startIndex, int charCount)
-        {
-            StringBuilder ret = sb.Append(value, startIndex, charCount);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-
-        public static StringBuilder AppendCount(StringBuilder sb, int maxCount, string value, int startIndex, int count)
-        {
-            StringBuilder ret = sb.Append(value, startIndex, count);
-            CheckCount(sb, maxCount);
-            return ret;
-        }
-    }
-}


Remove pointless TODO and improve internal docs.

--- src/NodaTime/Fields/GJEraDateTimeField.cs
+++ src/NodaTime/Fields/GJEraDateTimeField.cs
@@ -8,8 +8,7 @@
 namespace NodaTime.Fields
 {
     /// <summary>
-    /// Porting status: needs text
-    /// TODO(Post-V1): Rename to "GregulianEraDateTimeField" or something similar?
+    /// Era field for Gregorian and Julian calendars, representing the BC and CE eras.
     /// </summary>
     internal sealed class GJEraDateTimeField : DateTimeField
     {


add comment for ab4

add comment for ab4

--- src/Numerics/OdeSolvers/AdamsBashforth.cs
+++ src/Numerics/OdeSolvers/AdamsBashforth.cs
@@ -92,6 +92,15 @@
             return null;
         }

+        /// <summary>
+        /// Fourth Order AB Method(Require two initial guesses)
+        /// </summary>
+        /// <param name="y0">Initial value 1</param>
+        /// <param name="start">Start Time</param>
+        /// <param name="end">End Time</param>
+        /// <param name="N">Number of subintervals</param>
+        /// <param name="f">ode model</param>
+        /// <returns></returns>
         public static double[] FourthOrder(double y0, double start, double end, int N, Func<double, double, double> f)
         {
             double dt = (end - start) / (N - 1);


Removing lock and relying on ConcurrentDictionary Locking

--- src/Orchard.Hosting/DefaultOrchardHost.cs
+++ src/Orchard.Hosting/DefaultOrchardHost.cs
@@ -35,7 +35,7 @@
             _logger = logger;
         }

-        void IOrchardHost.Initialize()
+        public void Initialize()
         {
             BuildCurrent();
         }
@@ -85,7 +85,10 @@

             // Is there any tenant right now?
             var allSettings = _shellSettingsManager.LoadSettings()
-                .Where(settings => settings.State == TenantState.Running || settings.State == TenantState.Uninitialized || settings.State == TenantState.Initializing)
+                .Where(settings =>
+                    settings.State == TenantState.Running ||
+                    settings.State == TenantState.Uninitialized ||
+                    settings.State == TenantState.Initializing)
                 .ToArray();

             // Load all tenants, and activate their shell.
@@ -131,12 +134,10 @@
             {
                 _logger.LogDebug("Activating context for tenant {0}", context.Settings.Name);
             }
-            lock (_shellContexts)
+            if (_shellContexts.TryAdd(context.Settings.Name, context))
             {
-                _shellContexts[context.Settings.Name] = context;
+                _runningShellTable.Add(context.Settings);
             }
-
-            _runningShellTable.Add(context.Settings);
         }


add abort method. this is needed when the websocket is in receiving state and is not able to close connection

--- src/Owin.WebSocket/WebSocketConnection.cs
+++ src/Owin.WebSocket/WebSocketConnection.cs
@@ -50,6 +50,14 @@
         }

         /// <summary>
+        /// Aborts the websocket connection
+        /// </summary>
+        public void Abort()
+        {
+            mCancellToken.Cancel();
+        }
+
+        /// <summary>
         /// Sends data to the client with binary message type
         /// </summary>
         /// <param name="buffer">Data to send</param>


Bump version

Bump version

--- src/RabbitLink/Properties/AssemblyInfo.cs
+++ src/RabbitLink/Properties/AssemblyInfo.cs
@@ -39,5 +39,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("0.2.5.0")]
-[assembly: AssemblyFileVersion("0.2.5.0")]+[assembly: AssemblyVersion("0.2.6.0")]
+[assembly: AssemblyFileVersion("0.2.6.0")]


Add some logging to PhysicalFileSystem

Add some logging to PhysicalFileSystem

--- src/Umbraco.Core/IO/PhysicalFileSystem.cs
+++ src/Umbraco.Core/IO/PhysicalFileSystem.cs
@@ -1,14 +1,14 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
+using System.Globalization;
+using System.IO;
 using System.Linq;
-using System.Text;
 using System.Web;
 using Umbraco.Core.CodeAnnotations;
+using Umbraco.Core.Logging;

 namespace Umbraco.Core.IO
 {
-
 	[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
     internal class PhysicalFileSystem : IFileSystem
     {
@@ -43,9 +43,13 @@
                     return Directory.EnumerateDirectories(path).Select(GetRelativePath);
             }
             catch (UnauthorizedAccessException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("Not authorized to get directories", ex);
+            }
             catch (DirectoryNotFoundException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("Directory not found", ex);
+            }

             return Enumerable.Empty<string>();
         }
@@ -65,7 +69,9 @@
                 Directory.Delete(GetFullPath(path), recursive);
             }
             catch (DirectoryNotFoundException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("Directory not found", ex);
+            }
         }

         public bool DirectoryExists(string path)
@@ -80,9 +86,7 @@

         public void AddFile(string path, Stream stream, bool overrideIfExists)
         {
-            if (FileExists(path) && !overrideIfExists)
-                throw new InvalidOperationException(string.Format("A file at path '{0}' already exists",
-                    path));
+            if (FileExists(path) && !overrideIfExists) throw new InvalidOperationException(string.Format("A file at path '{0}' already exists", path));

             EnsureDirectory(Path.GetDirectoryName(path));

@@ -108,9 +112,13 @@
                     return Directory.EnumerateFiles(path, filter).Select(GetRelativePath);
             }
             catch (UnauthorizedAccessException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("Not authorized to get directories", ex);
+            }
             catch (DirectoryNotFoundException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("Directory not found", ex);
+            }

             return Enumerable.Empty<string>();
         }
@@ -130,7 +138,9 @@
                 File.Delete(GetFullPath(path));
             }
             catch (FileNotFoundException ex)
-            { }
+            {
+                LogHelper.Error<PhysicalFileSystem>("File not found", ex);
+            }
         }

         public bool FileExists(string path)
@@ -188,7 +198,7 @@

         protected string EnsureTrailingSeparator(string path)
         {
-            if (!path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
+            if (!path.EndsWith(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal))
                 path = path + Path.DirectorySeparatorChar;

             return path;


Fix for wrong sorting overload in MediaService (#3948)

(cherry picked from commit 0852b20b311cbeb4efa6360c5e1e17720c4d7b16)

--- src/Umbraco.Core/Services/MediaService.cs
+++ src/Umbraco.Core/Services/MediaService.cs
@@ -509,7 +509,7 @@
         public IEnumerable<IMedia> GetPagedChildren(int id, long pageIndex, int pageSize, out long totalChildren,
             string orderBy, Direction orderDirection, bool orderBySystemField, string filter)
         {
-            return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, true, filter, null);
+            return GetPagedChildren(id, pageIndex, pageSize, out totalChildren, orderBy, orderDirection, orderBySystemField, filter, null);
         }

         /// <summary>


Fixes up merge issue.

Fixes up merge issue.

--- src/Umbraco.Web/Mvc/RenderRouteHandler.cs
+++ src/Umbraco.Web/Mvc/RenderRouteHandler.cs
@@ -185,11 +185,10 @@
             IHttpHandler handler;

             //get the route from the defined routes
-			if (!postedInfo.Area.IsNullOrWhiteSpace())
 		    using (RouteTable.Routes.GetReadLock())
 		    {
 		        Route surfaceRoute;
-		        if (postedInfo.Area == standardArea)
+		        if (postedInfo.Area.IsNullOrWhiteSpace())
 		        {
                     //find the controller in the route table without an area
 		            surfaceRoute = RouteTable.Routes.OfType<Route>()
@@ -206,14 +205,18 @@
 		                                                               x.Defaults.ContainsKey("controller") &&
 						                      x.Defaults["controller"].ToString().InvariantEquals(postedInfo.ControllerName) &&
 		                                                               x.DataTokens.ContainsKey("area") &&
-						                      x.DataTokens["area"].ToString().InvariantEquals(postedInfo.Area));
+						                      x.DataTokens["area"].ToString().InvariantEquals(postedInfo.Area));
 		        }

                 if (surfaceRoute == null)
                     throw new InvalidOperationException("Could not find a Surface controller route in the RouteTable for controller name " + postedInfo.ControllerName);
-
+
+                //set the area if one is there.
+                if (surfaceRoute.DataTokens.ContainsKey("area"))
+                {
                     requestContext.RouteData.DataTokens["area"] = surfaceRoute.DataTokens["area"];
-
+                }
+
                 //set the 'Namespaces' token so the controller factory knows where to look to construct it
                 if (surfaceRoute.DataTokens.ContainsKey("Namespaces"))
                 {


- Fix parsing --event arg

- Fix parsing --event arg

--- src/main/csharp/ArgumentParser.cs
+++ src/main/csharp/ArgumentParser.cs
@@ -60,7 +60,7 @@
 				}
 				else if ("--event".Equals(args[i]) || "-e".Equals(args[i]))
 				{
-					result.Events = new List<string>(Value(args, ++i, "event").Split('-'));
+					result.Events = new List<string>(Value(args, ++i, "event").Split(','));
 				}
 				else if ("--format".Equals(args[i]))
 				{


Create reader tests

Create reader tests

--- src/Yarhl.UnitTests/IO/DataReaderTests.cs
+++ src/Yarhl.UnitTests/IO/DataReaderTests.cs
@@ -25,6 +25,7 @@
     using System.Text;
     using NUnit.Framework;
     using Yarhl.IO;
+    using Yarhl.IO.Serialization;

     [TestFixture]
     public class DataReaderTests
@@ -928,5 +929,70 @@
             reader.SkipPadding(1);
             Assert.AreEqual(buffer.Length, stream.Position);
         }
+
+        [Test]
+        public void ReadWithReflection()
+        {
+            byte[] expected = {
+                0x01, 0x00, 0x00, 0x00,
+                0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                0x03, 0x00, 0x00, 0x00,
+            };
+            stream.Write(expected, 0, expected.Length);
+
+            stream.Position = 0;
+
+            ComplexObject obj = reader.Read<ComplexObject>();
+
+            Assert.AreEqual(1, obj.IntegerValue);
+            Assert.AreEqual(2L, obj.LongValue);
+            Assert.AreEqual(0, obj.IgnoredIntegerValue);
+            Assert.AreEqual(3, obj.AnotherIntegerValue);
+        }
+
+        [Test]
+        public void ReadNestedObjectWithReflection()
+        {
+            byte[] expected = {
+                0x0A, 0x00, 0x00, 0x00,
+                0x01, 0x00, 0x00, 0x00,
+                0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                0x03, 0x00, 0x00, 0x00,
+                0x14, 0x00, 0x00, 0x00,
+            };
+            stream.Write(expected, 0, expected.Length);
+
+            stream.Position = 0;
+
+            NestedObject obj = this.reader.Read<NestedObject>();
+
+            Assert.AreEqual(10, obj.IntegerValue);
+            Assert.AreEqual(1, obj.ComplexValue.IntegerValue);
+            Assert.AreEqual(2L, obj.ComplexValue.LongValue);
+            Assert.AreEqual(0, obj.ComplexValue.IgnoredIntegerValue);
+            Assert.AreEqual(3, obj.ComplexValue.AnotherIntegerValue);
+            Assert.AreEqual(20, obj.AnotherIntegerValue);
+        }
+
+        private class ComplexObject
+        {
+            public int IntegerValue { get; set; }
+
+            public long LongValue { get; set; }
+
+            [YarhlIgnore]
+            public int IgnoredIntegerValue { get; set; }
+
+            public int AnotherIntegerValue { get; set; }
+        }
+
+        private class NestedObject
+        {
+            public int IntegerValue { get; set; }
+
+            public ComplexObject ComplexValue { get; set; }
+
+            public int AnotherIntegerValue { get; set; }
+        }
     }
 }


without using

without using

--- src/ZeroFormatter/Formatters/Formatter.cs
+++ src/ZeroFormatter/Formatters/Formatter.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
 using ZeroFormatter.Segments;


Fix merge conflict

Fix merge conflict

--- samples/setup/Setup.WPF/Properties/Settings.Designer.cs
+++ samples/setup/Setup.WPF/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@

     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {

         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));


#44: Allow connection to be done by space delimted values (--connect-params) or by connection string (--connection-string), but not both at the same time

--- FdoCmd/Commands/ProviderCommand.cs
+++ FdoCmd/Commands/ProviderCommand.cs
@@ -85,37 +85,34 @@

     public abstract class ProviderConnectionCommand : ProviderCommand
     {
-        [Option("connect-params", HelpText = "Connection Parameters. Must be in the form of: <name1> <value1> ... <nameN> <valueN>")]
+        [Option("connect-params", SetName = "space-delimited", Required = true, HelpText = "Connection Parameters. Must be in the form of: <name1> <value1> ... <nameN> <valueN>. Can be specified as an alternative to --connection-string")]
         public IEnumerable<string> ConnectParameters { get; set; }

+        [Option("connection-string", SetName = "connection-string", Required = true, HelpText = "The FDO connection string. Can be specified as an alternative to --connect-params")]
+        public string ConnectionString { get; set; }
+
         protected virtual bool RequireConnect => true;

         protected virtual bool IsValidConnectionStateForCommand(ConnectionState state) => state == ConnectionState.ConnectionState_Open;

-        public override int Execute()
-        {
-            IConnection conn = null;
-            try
-            {
-                conn = FeatureAccessManager.GetConnectionManager().CreateConnection(this.Provider);
-            }
-            catch (OSGeo.FDO.Common.Exception ex)
-            {
-                WriteException(ex);
-                return (int)CommandStatus.E_FAIL_CREATE_CONNECTION;
-            }
-
-            try
-            {
-                bool bConnect = RequireConnect;
-
+        private (bool bConnect, int? retCode) TryConnect(IConnection conn)
+        {
+            bool bConnect = RequireConnect;
+
+            if (!string.IsNullOrWhiteSpace(this.ConnectionString))
+            {
+                conn.ConnectionString = this.ConnectionString;
+                bConnect = true;
+            }
+            else
+            {
                 var connp = (this.ConnectParameters ?? Enumerable.Empty<string>()).ToList();
                 if (connp.Count > 0)
                 {
                     if ((connp.Count % 2) != 0)
                     {
                         Console.Error.WriteLine("Incorrect parameters format. Expected: <name1> <value1> ... <nameN> <valueN>");
-                        return (int)CommandStatus.E_FAIL_INVALID_ARGUMENTS;
+                        return (false, (int)CommandStatus.E_FAIL_INVALID_ARGUMENTS);
                     }
                     else
                     {
@@ -130,6 +127,28 @@
                         bConnect = true;
                     }
                 }
+            }
+            return (bConnect, null);
+        }
+
+        public override int Execute()
+        {
+            IConnection conn = null;
+            try
+            {
+                conn = FeatureAccessManager.GetConnectionManager().CreateConnection(this.Provider);
+            }
+            catch (OSGeo.FDO.Common.Exception ex)
+            {
+                WriteException(ex);
+                return (int)CommandStatus.E_FAIL_CREATE_CONNECTION;
+            }
+
+            try
+            {
+                var (bConnect, rc) = TryConnect(conn);
+                if (rc.HasValue)
+                    return rc.Value;

                 if (bConnect)
                 {


Fix DeviceFamilyService Bug

Fix DeviceFamilyService Bug

--- src/AppStudio.Uwp/Services/DeviceFamilyService.cs
+++ src/AppStudio.Uwp/Services/DeviceFamilyService.cs
@@ -14,6 +14,11 @@
         {
             get
             {
+                if (_qualifierValues == null)
+                {
+                    _qualifierValues = Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().QualifierValues;
+
+                }
                 return _qualifierValues;
             }
         }


Support updating all guardian factors (#536)

* Support updating all guardian factors

* Revert GetEnumMemberValue and use ToEnumString

* clean up

--- src/Auth0.ManagementApi/Clients/GuardianClient.cs
+++ src/Auth0.ManagementApi/Clients/GuardianClient.cs
@@ -4,6 +4,7 @@
 using System.Net.Http;
 using System.Threading;
 using System.Threading.Tasks;
+using Auth0.Core.Http;

 namespace Auth0.ManagementApi.Clients
 {
@@ -127,7 +128,7 @@
         /// <returns>The <see cref="UpdateGuardianFactorResponse" /> indicating the status of the factor.</returns>
         public Task<UpdateGuardianFactorResponse> UpdateFactorAsync(UpdateGuardianFactorRequest request, CancellationToken cancellationToken = default)
         {
-            var name = request.Factor == GuardianFactorName.PushNotifications ? "push-notification" : "sms";
+            var name = request.Factor.ToEnumString();

             return Connection
                 .SendAsync<UpdateGuardianFactorResponse>(


Add null check for scroller.

Add null check for scroller.

--- src/Avalonia.Controls/Repeater/ViewportManager.cs
+++ src/Avalonia.Controls/Repeater/ViewportManager.cs
@@ -350,11 +350,14 @@
                 }

                 // Make sure that only the target child can be the anchor during the bring into view operation.
-                foreach (var child in _owner.Children)
-                {
-                    if (child != targetChild)
+                if (_scroller is object)
+                {
+                    foreach (var child in _owner.Children)
                     {
-                        _scroller.UnregisterAnchorCandidate(child);
+                        if (child != targetChild)
+                        {
+                            _scroller.UnregisterAnchorCandidate(child);
+                        }
                     }
                 }


prevent extra menu updates that are not required.

--- src/Avalonia.Native/AvaloniaNativeMenuExporter.cs
+++ src/Avalonia.Native/AvaloniaNativeMenuExporter.cs
@@ -74,31 +74,34 @@
             return result;
         }

-        void DoLayoutReset()
+        private void DoLayoutReset()
         {
-            _resetQueued = false;
+            if (_resetQueued)
+            {
+                _resetQueued = false;

-            if (_nativeWindow is null)
-            {
-                var appMenu = NativeMenu.GetMenu(Application.Current);
+                if (_nativeWindow is null)
+                {
+                    var appMenu = NativeMenu.GetMenu(Application.Current);

-                if (appMenu == null)
+                    if (appMenu == null)
+                    {
+                        appMenu = CreateDefaultAppMenu();
+                        NativeMenu.SetMenu(Application.Current, appMenu);
+                    }
+
+                    SetMenu(appMenu);
+                }
+                else
                 {
-                    appMenu = CreateDefaultAppMenu();
-                    NativeMenu.SetMenu(Application.Current, appMenu);
+                    if (_menu != null)
+                    {
+                        SetMenu(_nativeWindow, _menu);
+                    }
                 }

-                SetMenu(appMenu);
+                _exported = true;
             }
-            else
-            {
-                if (_menu != null)
-                {
-                    SetMenu(_nativeWindow, _menu);
-                }
-            }
-
-            _exported = true;
         }

         internal void QueueReset()


new conn string

new conn string

--- src/BPCCScheduler.Web/Controllers/DBController.cs
+++ src/BPCCScheduler.Web/Controllers/DBController.cs
@@ -35,7 +35,7 @@

         public string Get()
         {
-            _appointmentContext.Database.Connection.ConnectionString = "Data Source=|DataDirectory|BpccScheduler.sdf";
+            //_appointmentContext.Database.Connection.ConnectionString = "Data Source=|DataDirectory|BpccScheduler.sdf";
             //_appointmentContext.Database.CreateIfNotExists();
             return string.Format("connStr: {0}", _appointmentContext.Database.Connection.ConnectionString);
         }


Added TestSimpleBrowser from the readme file to the tests.

--- src/BoboBrowse.Net/BoboBrowse.Tests/BasicTests.cs
+++ src/BoboBrowse.Net/BoboBrowse.Tests/BasicTests.cs
@@ -256,6 +256,41 @@
                 Console.WriteLine("");
             }
         }
+
+        [Test]
+        public void TestSimpleBrowser()
+        {
+            var query = new TermQuery(new Term("name", "asp.net"));
+            Console.WriteLine(string.Format("query: <{0}>", query.ToString()));
+            var request = new BrowseRequest()
+            {
+                Count = 10,
+                Offset = 0,
+                Query = query,
+                Sort = new Sort(new SortField("price", SortField.DOUBLE, false)).GetSort()
+            };
+
+            var facetHandlers = new IFacetHandler[] { new SimpleFacetHandler("category") };
+            var browser = new BoboBrowser(BoboIndexReader.GetInstance(IndexReader.Open(_indexDir, true), facetHandlers));
+            var facetSpec = new FacetSpec() { OrderBy = FacetSpec.FacetSortSpec.OrderHitsDesc, MinHitCount = 1 };
+            request.SetFacetSpec("category", facetSpec);
+
+            var result = browser.Browse(request);
+            Console.WriteLine(string.Format("total hits:{0}", result.NumHits));
+            Console.WriteLine("===========================");
+            foreach (var facet in result.FacetMap["category"].GetFacets())
+            {
+                var category = _categories.First(k => k.Value == int.Parse(facet.Value.ToString()));
+                Console.WriteLine("{0}:({1})", category.Key, facet.FacetValueHitCount);
+            }
+            Console.WriteLine("===========================");
+            for (var i = 0; i < result.Hits.Length; i++)
+            {
+                var doc = browser.Doc(result.Hits[i].DocId);
+                var category = _categories.First(k => k.Value == int.Parse(doc.GetField("category").StringValue)).Key;
+                Console.WriteLine(string.Format("{2} - {0} ${1} by {3}", doc.GetField("name").StringValue, doc.GetField("price").StringValue, category, doc.GetField("author").StringValue));
+            }
+        }
     }

     public class NumberFieldFactory : TermListFactory


More tests for CassetteApplication.

More tests for CassetteApplication.

--- src/Cassette.UnitTests/Web/CassetteApplication.cs
+++ src/Cassette.UnitTests/Web/CassetteApplication.cs
@@ -19,7 +19,9 @@
 #endregion

 using System.Collections.Generic;
+using System.IO;
 using System.Web;
+using System.Web.Handlers;
 using System.Web.Routing;
 using Cassette.HtmlTemplates;
 using Cassette.IO;
@@ -32,7 +34,34 @@

 namespace Cassette.Web
 {
-    public class CassetteApplication_OnPostMapRequestHandler_Tests
+    public class CassetteApplication_Tests
+    {
+        protected static CassetteApplication StubApplication()
+        {
+            return new CassetteApplication(
+                new[] { new StubConfig() },
+                Mock.Of<IDirectory>(),
+                Mock.Of<IDirectory>(),
+                false,
+                "",
+                new UrlGenerator(""),
+                new RouteCollection(),
+                () => null
+            );
+        }
+
+        class StubConfig : ICassetteConfiguration
+        {
+            public void Configure(ModuleConfiguration moduleConfiguration, ICassetteApplication application)
+            {
+                moduleConfiguration.Add(Mock.Of<IModuleSource<ScriptModule>>());
+                moduleConfiguration.Add(Mock.Of<IModuleSource<StylesheetModule>>());
+                moduleConfiguration.Add(Mock.Of<IModuleSource<HtmlTemplateModule>>());
+            }
+        }
+    }
+
+    public class CassetteApplication_OnPostMapRequestHandler_Tests : CassetteApplication_Tests
     {
         [Fact]
         public void GivenHtmlRewritingEnabled_WhenOnPostMapRequestHandler_ThenPlaceholderTrackerAddedToContextItems()
@@ -63,29 +92,43 @@

             items[typeof(IPlaceholderTracker).FullName].ShouldBeType<NullPlaceholderTracker>();
         }
+    }

-        static CassetteApplication StubApplication()
+    public class CassetteApplication_OnPostRequestHandlerExecute_Tests : CassetteApplication_Tests
+    {
+        [Fact]
+        public void GivenHtmlRewritingDisabled_WhenOnPostRequestHandlerExecute_ThenResponseFilterIsNotSet()
         {
-            return new CassetteApplication(
-                new[] { new StubConfig() },
-                Mock.Of<IDirectory>(),
-                Mock.Of<IDirectory>(),
-                false,
-                "",
-                new UrlGenerator(""),
-                new RouteCollection(),
-                () => null
-            );
+            var application = StubApplication();
+            application.HtmlRewritingEnabled = false;
+
+            var context = new Mock<HttpContextBase>();
+            var response = new Mock<HttpResponseBase>();
+            context.Setup(c => c.Response)
+                   .Returns(response.Object);
+
+            application.OnPostRequestHandlerExecute(context.Object);
+
+            response.VerifySet(r => r.Filter = It.IsAny<Stream>(), Times.Never());
         }

-        class StubConfig : ICassetteConfiguration
+        [Fact]
+        public void GivenCurrentHandlerIsAssemblyResourceLoader_WhenOnPostRequestHandlerExecute_ThenResponseFilterIsNotSet()
         {
-            public void Configure(ModuleConfiguration moduleConfiguration, ICassetteApplication application)
-            {
-                moduleConfiguration.Add(Mock.Of<IModuleSource<ScriptModule>>());
-                moduleConfiguration.Add(Mock.Of<IModuleSource<StylesheetModule>>());
-                moduleConfiguration.Add(Mock.Of<IModuleSource<HtmlTemplateModule>>());
-            }
+            var application = StubApplication();
+            application.HtmlRewritingEnabled = true;
+
+            var context = new Mock<HttpContextBase>();
+            context.SetupGet(c => c.CurrentHandler)
+                   .Returns(new AssemblyResourceLoader());
+
+            var response = new Mock<HttpResponseBase>();
+            context.Setup(c => c.Response)
+                   .Returns(response.Object);
+
+            application.OnPostRequestHandlerExecute(context.Object);
+
+            response.VerifySet(r => r.Filter = It.IsAny<Stream>(), Times.Never());
         }
     }
 }


Remove MouseWheelScroll.ScrollSize since it doesn't work.

--- src/Client/Core/UserInterface/MouseWheelScroll.cs
+++ src/Client/Core/UserInterface/MouseWheelScroll.cs
@@ -31,29 +31,10 @@
         private IScrollProvider _scrollProvider;
         private bool _activated;

-        private int _scrollSize;
-
         /// <summary>
         /// Initializes an instance of a MouseWheelScroll.
         /// </summary>
         public MouseWheelScroll() {
-            _scrollSize = 1;
-        }
-
-        /// <summary>
-        /// Gets or sets the number of scroll units the control should be
-        /// scrolled per mouse wheel turn.
-        /// </summary>
-        public int ScrollSize {
-            get {
-                return _scrollSize;
-            }
-            set {
-                if (value < 1) {
-                    throw new ArgumentOutOfRangeException("value");
-                }
-                _scrollSize = value;
-            }
         }

         private ScrollViewer GetChildScrollViewer(DependencyObject parentObject) {
@@ -167,9 +148,7 @@

         private void UpdateScrollOffset(double delta) {
             ScrollAmount verticalScroll = delta < 0.0 ? ScrollAmount.SmallIncrement : ScrollAmount.SmallDecrement;
-            for (int i = 0; i < _scrollSize; i++) {
-                _scrollProvider.Scroll(ScrollAmount.NoAmount, verticalScroll);
-            }
+            _scrollProvider.Scroll(ScrollAmount.NoAmount, verticalScroll);
         }
     }
 }


dropout serialization test

dropout serialization test

--- src/ConvNetSharp.Core.Tests/SerializationTests.cs
+++ src/ConvNetSharp.Core.Tests/SerializationTests.cs
@@ -300,5 +300,29 @@
             Assert.AreEqual(layer.OutputHeight, deserialized.OutputHeight);
             Assert.AreEqual(layer.OutputDepth, deserialized.OutputDepth);
         }
+
+        [TestMethod]
+        public void DropoutSerialization()
+        {
+            var layer = new DropoutLayer { DropProbability = 0.1 };
+            layer.Init(28, 24, 1);
+            var data = layer.GetData();
+
+            Assert.AreEqual(28, data["InputWidth"]);
+            Assert.AreEqual(24, data["InputHeight"]);
+            Assert.AreEqual(1, data["InputDepth"]);
+
+            var deserialized = LayerBase<double>.FromData(data) as DropoutLayer;
+
+            Assert.IsNotNull(deserialized);
+            Assert.AreEqual(28, deserialized.InputWidth);
+            Assert.AreEqual(24, deserialized.InputHeight);
+            Assert.AreEqual(1, deserialized.InputDepth);
+            Assert.AreEqual(layer.OutputWidth, deserialized.OutputWidth);
+            Assert.AreEqual(layer.OutputHeight, deserialized.OutputHeight);
+            Assert.AreEqual(layer.OutputDepth, deserialized.OutputDepth);
+
+            Assert.AreEqual(layer.DropProbability, deserialized.DropProbability);
+        }
     }
 }


Fixed a nasty litte bug.

Fixed a nasty litte bug.

--- src/DBGhost.Build/Extensions/GenericExtensions.cs
+++ src/DBGhost.Build/Extensions/GenericExtensions.cs
@@ -4,7 +4,7 @@
     {
         public static T Coalesce<T>(this T value, T newValue) where T : class
         {
-            return newValue ?? value;
+            return value ?? newValue;
         }
     }
 }


Update ContainerView.cs

Update ContainerView.cs

--- src/Draw2D.ViewModels/Containers/ContainerView.cs
+++ src/Draw2D.ViewModels/Containers/ContainerView.cs
@@ -156,6 +156,7 @@
                 var title = shape is GroupShape group ? group.Title : "Reference";
                 var reference = new ReferenceShape(title, 0.0, 0.0, shape);
                 reference.Select(_selectionState);
+                reference.Owner = _currentContainer;
                 _currentContainer.Shapes.Add(reference);
                 _currentContainer.MarkAsDirty(true);
                 _inputService?.Redraw?.Invoke();


Prevented entities from spawning when creative players destroy blocks

--- source/Craft.Net.Server/Handlers/InteractionHandlers.cs
+++ source/Craft.Net.Server/Handlers/InteractionHandlers.cs
@@ -29,7 +29,11 @@
                     if (client.Entity.Position.DistanceTo(position) <= MaxDigDistance)
                     {
                         if (client.GameMode == GameMode.Creative || client.Entity.Abilities.InstantMine || Block.GetLogicDescriptor(block).Hardness == 0)
-                            Block.OnBlockMined(block, client.World, position, null); // TODO: Tool
+						{
+                            //Block.OnBlockMined(block, client.World, position, null); // TODO: See if we really need to call this
+							client.World.SetBlockId(position, 0);
+							client.World.SetMetadata(position, 0);
+						}
                         else
                         {
                             int time = Block.GetHarvestTime(new ItemDescriptor(client.Entity.SelectedItem.Id), block, out damage);