Re-enable ignored tests that will work again now

--- osu.Game.Tests/Database/BeatmapImporterTests.cs
+++ osu.Game.Tests/Database/BeatmapImporterTests.cs
@@ -393,7 +393,6 @@
         }

         [Test]
-        [Ignore("intentionally broken by import optimisations")]
         public void TestImportThenImportWithChangedFile()
         {
             RunTestWithRealmAsync(async (realm, storage) =>
@@ -490,7 +489,6 @@
         }

         [Test]
-        [Ignore("intentionally broken by import optimisations")]
         public void TestImportCorruptThenImport()
         {
             RunTestWithRealmAsync(async (realm, storage) =>
@@ -502,16 +500,18 @@

                 var firstFile = imported.Files.First();

+                var fileStorage = storage.GetStorageForDirectory("files");
+
                 long originalLength;
-                using (var stream = storage.GetStream(firstFile.File.GetStoragePath()))
+                using (var stream = fileStorage.GetStream(firstFile.File.GetStoragePath()))
                     originalLength = stream.Length;

-                using (var stream = storage.CreateFileSafely(firstFile.File.GetStoragePath()))
+                using (var stream = fileStorage.CreateFileSafely(firstFile.File.GetStoragePath()))
                     stream.WriteByte(0);

                 var importedSecondTime = await LoadOszIntoStore(importer, realm.Realm);

-                using (var stream = storage.GetStream(firstFile.File.GetStoragePath()))
+                using (var stream = fileStorage.GetStream(firstFile.File.GetStoragePath()))
                     Assert.AreEqual(stream.Length, originalLength, "Corruption was not fixed on second import");

                 // check the newly "imported" beatmap is actually just the restored previous import. since it matches hash.


Fix TestCasePlaySongSelect

Fix TestCasePlaySongSelect

--- osu.Game.Tests/Visual/TestCasePlaySongSelect.cs
+++ osu.Game.Tests/Visual/TestCasePlaySongSelect.cs
@@ -103,22 +103,16 @@
         }

         [SetUp]
-        public virtual void SetUp()
-        {
-            Schedule(() =>
-            {
-                manager?.Delete(manager.GetAllUsableBeatmapSets());
-                LoadScreen(songSelect = new TestSongSelect());
-                AddUntilStep(() => songSelect.IsPresent, "wait for present");
-            });
-        }
+        public virtual void SetUp() =>
+            Schedule(() => { manager?.Delete(manager.GetAllUsableBeatmapSets()); });

         [Test]
         public void TestDummy()
         {
+            createSongSelect();
             AddAssert("dummy selected", () => songSelect.CurrentBeatmap == defaultBeatmap);

-            AddAssert("dummy shown on wedge", () => songSelect.CurrentBeatmapDetailsBeatmap == defaultBeatmap);
+            AddUntilStep(() => songSelect.CurrentBeatmapDetailsBeatmap == defaultBeatmap, "dummy shown on wedge");

             addManyTestMaps();
             AddWaitStep(3);
@@ -129,6 +123,7 @@
         [Test]
         public void TestSorting()
         {
+            createSongSelect();
             addManyTestMaps();
             AddWaitStep(3);

@@ -144,6 +139,7 @@
         [Ignore("needs fixing")]
         public void TestImportUnderDifferentRuleset()
         {
+            createSongSelect();
             changeRuleset(2);
             importForRuleset(0);
             AddUntilStep(() => songSelect.Carousel.SelectedBeatmap == null, "no selection");
@@ -152,6 +148,7 @@
         [Test]
         public void TestImportUnderCurrentRuleset()
         {
+            createSongSelect();
             changeRuleset(2);
             importForRuleset(2);
             importForRuleset(1);
@@ -167,6 +164,7 @@
         [Test]
         public void TestRulesetChangeResetsMods()
         {
+            createSongSelect();
             changeRuleset(0);

             changeMods(new OsuModHardRock());
@@ -196,6 +194,7 @@
         [Test]
         public void TestStartAfterUnMatchingFilterDoesNotStart()
         {
+            createSongSelect();
             addManyTestMaps();
             AddUntilStep(() => songSelect.Carousel.SelectedBeatmap != null, "has selection");

@@ -222,6 +221,12 @@
         private void changeMods(params Mod[] mods) => AddStep($"change mods to {string.Join(", ", mods.Select(m => m.Acronym))}", () => selectedMods.Value = mods);

         private void changeRuleset(int id) => AddStep($"change ruleset to {id}", () => Ruleset.Value = rulesets.AvailableRulesets.First(r => r.ID == id));
+
+        private void createSongSelect()
+        {
+            AddStep("create song select", () => LoadScreen(songSelect = new TestSongSelect()));
+            AddUntilStep(() => songSelect.IsCurrentScreen(), "wait for present");
+        }

         private void addManyTestMaps()
         {


Change order of event firing in Update calls

A remove event should not be fired before the update is successful.

--- osu.Game/Database/MutableDatabaseBackedStore.cs
+++ osu.Game/Database/MutableDatabaseBackedStore.cs
@@ -50,11 +50,10 @@
         /// <param name="item">The item to update.</param>
         public void Update(T item)
         {
-            ItemRemoved?.Invoke(item);
-
             using (var usage = ContextFactory.GetForWrite())
                 usage.Context.Update(item);

+            ItemRemoved?.Invoke(item);
             ItemAdded?.Invoke(item);
         }


Attempt at making all errors show in english

--- KraxbotOSS/Program.cs
+++ KraxbotOSS/Program.cs
@@ -16,6 +16,7 @@
         {
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
+            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
             Application.Run(new Form1());
         }
     }


Console.ReadLine() now works

Console.ReadLine() now works

--- source/Cosmos/Cosmos.Kernel.Plugs/Console.cs
+++ source/Cosmos/Cosmos.Kernel.Plugs/Console.cs
@@ -49,7 +49,13 @@
 				Write (current);
 			}
 			WriteLine ();
-			return new string(chars.ToArray());
+
+			// HACK: Should use .ToArray here.
+			char[] final = new char[chars.Count];
+			for (int i = 0; i < final.Length; i++)
+				final[i] = chars[i];
+
+			return new string(final);
 		}
 	}
 }


Added better label for Vertical Rotation

--- Assets/HoloToolkit/Input/Scripts/Editor/MixedRealityTeleportEditor.cs
+++ Assets/HoloToolkit/Input/Scripts/Editor/MixedRealityTeleportEditor.cs
@@ -9,6 +9,8 @@
     [CustomEditor(typeof(MixedRealityTeleport))]
     public class MixedRealityTeleportEditor : Editor
     {
+        private readonly GUIContent verticalRotationLabel = new GUIContent("Vertical Rotation", "Used to check the Horizontal Rotation and the intent of the user to rotate in that direction");
+
         private static MixedRealityTeleport mixedRealityTeleport;
         private static SerializedProperty teleportMakerPrefab;
         private static SerializedProperty useCustomMappingProperty;
@@ -70,14 +72,14 @@
                 mixedRealityTeleport.LeftThumbstickX = EditorGUILayout.TextField("Horizontal Strafe", mixedRealityTeleport.LeftThumbstickX);
                 mixedRealityTeleport.LeftThumbstickY = EditorGUILayout.TextField("Forward Movement", mixedRealityTeleport.LeftThumbstickY);
                 mixedRealityTeleport.RightThumbstickX = EditorGUILayout.TextField("Horizontal Rotation", mixedRealityTeleport.RightThumbstickX);
-                mixedRealityTeleport.RightThumbstickY = EditorGUILayout.TextField("Rotation", mixedRealityTeleport.RightThumbstickY);
+                mixedRealityTeleport.RightThumbstickY = EditorGUILayout.TextField(verticalRotationLabel, mixedRealityTeleport.RightThumbstickY);
             }
             else
             {
                 mixedRealityTeleport.HorizontalStrafe = (XboxControllerMappingTypes)EditorGUILayout.EnumPopup("Horizontal Strafe", mixedRealityTeleport.HorizontalStrafe);
                 mixedRealityTeleport.ForwardMovement = (XboxControllerMappingTypes)EditorGUILayout.EnumPopup("Forward Movement", mixedRealityTeleport.ForwardMovement);
                 mixedRealityTeleport.HorizontalRotation = (XboxControllerMappingTypes)EditorGUILayout.EnumPopup("Horizontal Rotation", mixedRealityTeleport.HorizontalRotation);
-                mixedRealityTeleport.VerticalRotation = (XboxControllerMappingTypes)EditorGUILayout.EnumPopup("Rotation", mixedRealityTeleport.VerticalRotation);
+                mixedRealityTeleport.VerticalRotation = (XboxControllerMappingTypes)EditorGUILayout.EnumPopup(verticalRotationLabel, mixedRealityTeleport.VerticalRotation);
             }

             serializedObject.ApplyModifiedProperties();


update

update

--- CSharpGL/0Foundations/OpenGLObjects/Buffers/Buffer.ClearBufferData.cs
+++ CSharpGL/0Foundations/OpenGLObjects/Buffers/Buffer.ClearBufferData.cs
@@ -20,6 +20,7 @@
             UnmanagedArrayBase unmanagedArray = UnmanagedArray<vec3>.FromHandle(header, 1);
             bool result = ClearBufferData(OpenGL.GL_RGB32F, OpenGL.GL_RGB, OpenGL.GL_FLOAT, unmanagedArray, autoBind);
             pin.Free();
+
             return result;
         }


renaming

renaming

--- Core.DomainModel/ItSystemUsage/Read/ItSystemUsageOverviewReadModel.cs
+++ Core.DomainModel/ItSystemUsage/Read/ItSystemUsageOverviewReadModel.cs
@@ -34,6 +34,6 @@
         public string ItSystemRightsHolderName { get; set; }
         public string ItSystemKLEIdsAsCsv { get; set; }
         public string ItSystemKLENamesAsCsv { get; set; }
-        public virtual ICollection<ItSystemUsageOverviewTaskRefReadModel> ItSystemTaskRefs { get; set; } // Adding TaskRefs as collection to enable easy sorting in the overview
+        public virtual ICollection<ItSystemUsageOverviewTaskRefReadModel> ItSystemTaskRefs { get; set; } // Adding TaskRefs as collection to enable indexed search
     }
 }


Using NullLogger types from Logging.Abstractions

--- test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs
+++ test/Microsoft.AspNetCore.Session.Tests/SessionTests.cs
@@ -16,6 +16,7 @@
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Internal;
 using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
 using Microsoft.Extensions.Logging.Testing;
 using Microsoft.Net.Http.Headers;
 using Xunit;
@@ -417,7 +418,7 @@
                 })
                 .ConfigureServices(services =>
                 {
-                    services.AddSingleton(typeof(ILoggerFactory), new NullLoggerFactory());
+                    services.AddSingleton(typeof(ILoggerFactory), NullLoggerFactory.Instance);
                     services.AddDistributedMemoryCache();
                     services.AddSession(o => o.IdleTimeout = TimeSpan.FromMinutes(20));
                     services.Configure<MemoryCacheOptions>(o => o.Clock = clock);


Improve test coverage for the SqliteLedgerQueries class

--- test/Openchain.Sqlite.Tests/SqliteLedgerQueriesTests.cs
+++ test/Openchain.Sqlite.Tests/SqliteLedgerQueriesTests.cs
@@ -97,6 +97,13 @@
             Assert.Equal(mutation, new ByteString(MessageSerializer.ComputeHash(MessageSerializer.DeserializeTransaction(result).Mutation.ToByteArray())));
         }

+        [Fact]
+        public async Task EnsureTables_MultipleCalls()
+        {
+            // This must not throw
+            await this.store.EnsureTables();
+        }
+
         private Task<ByteString> AddRecords(params string[] keys)
         {
             return AddRecords(ByteString.Empty, ByteString.Empty, keys);


Add a new unit test for the SqliteStorageEngine class

--- test/Openchain.Sqlite.Tests/SqliteStorageEngineTests.cs
+++ test/Openchain.Sqlite.Tests/SqliteStorageEngineTests.cs
@@ -78,46 +78,6 @@
         }

         [Fact]
-        public async Task AddTransaction_Multiple()
-        {
-            IList<Record> records1 = new Record[]
-            {
-                new Record(binaryData[0], binaryData[1], ByteString.Empty),
-                new Record(binaryData[2], binaryData[3], ByteString.Empty),
-            };
-
-            ByteString mutation1 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records1, ByteString.Empty)));
-            ByteString mutationHash1 = new ByteString(MessageSerializer.ComputeHash(mutation1.ToByteArray()));
-
-            IList<Record> records2 = new Record[]
-            {
-                new Record(binaryData[2], binaryData[5], mutationHash1),
-                new Record(binaryData[6], binaryData[7], ByteString.Empty),
-            };
-
-            ByteString mutation2 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records2, ByteString.Empty)));
-            ByteString mutationHash2 = new ByteString(MessageSerializer.ComputeHash(mutation2.ToByteArray()));
-
-            // Submit both transactions at once
-            await this.store.AddTransactions(new[]
-            {
-                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation1, new DateTime(), ByteString.Empty))),
-                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation2, new DateTime(), ByteString.Empty)))
-            });
-
-            IList<Record> result1 = await this.store.GetRecords(new[] { binaryData[0] });
-            IList<Record> result2 = await this.store.GetRecords(new[] { binaryData[2] });
-            IList<Record> result3 = await this.store.GetRecords(new[] { binaryData[6] });
-
-            Assert.Equal(1, result1.Count);
-            AssertRecord(result1[0], binaryData[0], binaryData[1], mutationHash1);
-            Assert.Equal(1, result2.Count);
-            AssertRecord(result2[0], binaryData[2], binaryData[5], mutationHash2);
-            Assert.Equal(1, result3.Count);
-            AssertRecord(result3[0], binaryData[6], binaryData[7], mutationHash2);
-        }
-
-        [Fact]
         public async Task AddTransaction_InsertError()
         {
             ByteString mutationHash = await AddTransaction(
@@ -164,6 +124,80 @@
             AssertRecord(exception2.FailedMutation, binaryData[4], null, binaryData[6]);
         }

+
+        [Fact]
+        public async Task AddTransaction_MultipleTransactionsSuccess()
+        {
+            IList<Record> records1 = new Record[]
+            {
+                new Record(binaryData[0], binaryData[1], ByteString.Empty),
+                new Record(binaryData[2], binaryData[3], ByteString.Empty),
+            };
+
+            ByteString mutation1 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records1, ByteString.Empty)));
+            ByteString mutationHash1 = new ByteString(MessageSerializer.ComputeHash(mutation1.ToByteArray()));
+
+            IList<Record> records2 = new Record[]
+            {
+                new Record(binaryData[2], binaryData[5], mutationHash1),
+                new Record(binaryData[6], binaryData[7], ByteString.Empty),
+            };
+
+            ByteString mutation2 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records2, ByteString.Empty)));
+            ByteString mutationHash2 = new ByteString(MessageSerializer.ComputeHash(mutation2.ToByteArray()));
+
+            // Submit both transactions at once
+            await this.store.AddTransactions(new[]
+            {
+                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation1, new DateTime(), ByteString.Empty))),
+                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation2, new DateTime(), ByteString.Empty)))
+            });
+
+            IList<Record> result1 = await this.store.GetRecords(new[] { binaryData[0] });
+            IList<Record> result2 = await this.store.GetRecords(new[] { binaryData[2] });
+            IList<Record> result3 = await this.store.GetRecords(new[] { binaryData[6] });
+
+            AssertRecord(result1[0], binaryData[0], binaryData[1], mutationHash1);
+            AssertRecord(result2[0], binaryData[2], binaryData[5], mutationHash2);
+            AssertRecord(result3[0], binaryData[6], binaryData[7], mutationHash2);
+        }
+
+        [Fact]
+        public async Task AddTransaction_MultipleTransactionsError()
+        {
+            IList<Record> records1 = new Record[]
+            {
+                new Record(binaryData[0], binaryData[1], ByteString.Empty),
+                new Record(binaryData[2], binaryData[3], ByteString.Empty),
+            };
+
+            ByteString mutation1 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records1, ByteString.Empty)));
+
+            IList<Record> records2 = new Record[]
+            {
+                new Record(binaryData[2], binaryData[5], ByteString.Empty),
+                new Record(binaryData[6], binaryData[7], ByteString.Empty),
+            };
+
+            ByteString mutation2 = new ByteString(MessageSerializer.SerializeMutation(new Mutation(ByteString.Empty, records2, ByteString.Empty)));
+
+            // Submit both transactions at once
+            ConcurrentMutationException exception = await Assert.ThrowsAsync<ConcurrentMutationException>(() => this.store.AddTransactions(new[]
+            {
+                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation1, new DateTime(), ByteString.Empty))),
+                new ByteString(MessageSerializer.SerializeTransaction(new Transaction(mutation2, new DateTime(), ByteString.Empty)))
+            }));
+
+            IList<Record> result1 = await this.store.GetRecords(new[] { binaryData[0] });
+            IList<Record> result2 = await this.store.GetRecords(new[] { binaryData[2] });
+            IList<Record> result3 = await this.store.GetRecords(new[] { binaryData[6] });
+
+            AssertRecord(exception.FailedMutation, binaryData[2], binaryData[5], ByteString.Empty);
+            AssertRecord(result1[0], binaryData[0], ByteString.Empty, ByteString.Empty);
+            AssertRecord(result2[0], binaryData[2], ByteString.Empty, ByteString.Empty);
+            AssertRecord(result3[0], binaryData[6], ByteString.Empty, ByteString.Empty);
+        }
+
         [Fact]
         public async Task GetLastTransaction_Success()
         {


Added reproduction of error when using an IEnumerable in an expression.

--- test/Remote.Linq.EntityFramework.Tests/When_querying.cs
+++ test/Remote.Linq.EntityFramework.Tests/When_querying.cs
@@ -96,5 +96,19 @@
             var result = await _queryable.SingleOrDefaultAsync(x => x.Value.ToUpper().Contains("no match")).ConfigureAwait(false);
             result.ShouldBeNull();
         }
+
+        [Fact]
+        private async Task Contains_on_non_materialized_ienumerable()
+        {
+            var data = new List<LookupItem>
+            {
+                new LookupItem { Key = "1", Value = "One" },
+                new LookupItem { Key = "2", Value = "Two" },
+                new LookupItem { Key = "3", Value = "Three" },
+            };
+            var filteredPeoplesNames = data.Where(x => x.Value.StartsWith("O")).Select(x => x.Value);
+            var result = await _queryable.FirstOrDefaultAsync(x => filteredPeoplesNames.Contains(x.Key));
+            result.Value.ShouldBe("One");
+        }
     }
 }


完成对WebSocket无法接收断开连接/强制中断的问题修复

完成对WebSocket无法接收断开连接/强制中断的问题修复

--- Network/HttpServer.cs
+++ Network/HttpServer.cs
@@ -248,22 +248,7 @@
             }
             else
             {
-                await Task.WhenAll(ReceiveAsync(index, client, context), Task.Run(()=> { WebSocketWatching(index, websocketContext, client.cancellationToken); }));
-            }
-        }
-
-        private void WebSocketWatching(int index, HttpListenerWebSocketContext client, CancellationTokenSource cancellationToken)
-        {
-            while (true)
-            {
-                System.Diagnostics.Debug.WriteLine("client: " + index + ", state: " + client.WebSocket.State.ToString());
-                if (client.WebSocket == null || client.WebSocket.State == WebSocketState.Aborted || client.WebSocket.State == WebSocketState.Closed)
-                {
-                    KickOut(index, WebSocketCloseStatus.EndpointUnavailable, "Server lost your connection", false).Wait();
-                    client.WebSocket.Abort();
-                    System.Diagnostics.Debug.WriteLine("[before break] client: " + index + ", state: " + client.WebSocket.State.ToString());
-                    break;
-                }
+                await ReceiveAsync(index, client, context);
             }
         }

@@ -280,11 +265,11 @@
                 if (client.mutex != null)
                 {
                     var buffer = new byte[BUFFER_SIZE];
-                    WebSocketReceiveResult result = null;
+                    WebSocketReceiveResult result;
                     try
                     {
                         result = await client.client.WebSocket.ReceiveAsync(new ArraySegment<byte>(buffer), client.cancellationToken.Token);
-                    }catch(Exception e)
+                    }catch(WebSocketException e)
                     {
                         result = null;
                     }


Quick action buttons update immediately when the project loads, not showing all of them.

--- FRBDK/Glue/OfficialPlugins/QuickActionPlugin/MainQuickActionPlugin.cs
+++ FRBDK/Glue/OfficialPlugins/QuickActionPlugin/MainQuickActionPlugin.cs
@@ -40,6 +40,8 @@
             buttonVisibilityManager = new ButtonVisibilityManager(mainView);

             AssignEvents();
+
+            buttonVisibilityManager.UpdateVisibility();
         }

         private void CreateUi()


Fixed cancellation.

Fixed cancellation.

--- NtApiDotNet/NtFile.cs
+++ NtApiDotNet/NtFile.cs
@@ -1040,18 +1040,27 @@

         internal async Task<NtStatus> CompleteCallAsync(NtStatus status, CancellationToken token)
         {
-            if (status == NtStatus.STATUS_PENDING)
-            {
-                if (await WaitForCompleteAsync(token))
-                {
-                    return _result.Status;
-                }
-            }
-            else if (status == NtStatus.STATUS_SUCCESS)
-            {
-                _result = _io_status.Result;
-            }
-            return status;
+            try
+            {
+                if (status == NtStatus.STATUS_PENDING)
+                {
+                    if (await WaitForCompleteAsync(token))
+                    {
+                        return _result.Status;
+                    }
+                }
+                else if (status == NtStatus.STATUS_SUCCESS)
+                {
+                    _result = _io_status.Result;
+                }
+                return status;
+            }
+            catch (TaskCanceledException)
+            {
+                // Cancel and then rethrow.
+                Cancel();
+                throw;
+            }
         }

         /// <summary>
@@ -1223,9 +1232,13 @@
     /// </summary>
     public class NtFile : NtObjectWithDuplicate<NtFile, FileAccessRights>
     {
+        // Cancellation source for stopping pending IO on close.
+        private CancellationTokenSource _cts;
+
         internal NtFile(SafeKernelObjectHandle handle) : base(handle)
         {
             CanSynchronize = IsAccessGranted(FileAccessRights.Synchronize);
+            _cts = new CancellationTokenSource();
         }

         /// <summary>
@@ -1399,24 +1412,7 @@
         {
             return buffer != null ? (int)buffer.ByteLength : 0;
         }
-
-        private async Task<int> DeviceIoControlAsync(NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer, CancellationToken token)
-        {
-            //
-            using (NtFileResult result = new NtFileResult(this))
-            {
-                NtStatus status = await result.CompleteCallAsync(NtSystemCalls.NtDeviceIoControlFile(Handle, result.EventHandle, IntPtr.Zero, IntPtr.Zero, result.IoStatusBuffer,
-                    control_code.ToInt32(), GetSafePointer(input_buffer), GetSafeLength(input_buffer), GetSafePointer(output_buffer), GetSafeLength(output_buffer)), token);
-                if (status == NtStatus.STATUS_PENDING)
-                {
-                    result.Cancel();
-                    throw new NtException(NtStatus.STATUS_CANCELLED);
-                }
-                status.ToNtException();
-                return result.Information32;
-            }
-        }
-
+
         private delegate NtStatus IoControlFunction(SafeKernelObjectHandle FileHandle,
                                                     SafeKernelObjectHandle Event,
                                                     IntPtr ApcRoutine,
@@ -1431,35 +1427,31 @@
         private async Task<int> IoControlGenericAsync(IoControlFunction func,
                         NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer, CancellationToken token)
         {
-            using (NtFileResult result = new NtFileResult(this))
-            {
-                NtStatus status = await result.CompleteCallAsync(func(Handle, result.EventHandle, IntPtr.Zero, IntPtr.Zero, result.IoStatusBuffer,
-                    control_code.ToInt32(), GetSafePointer(input_buffer), GetSafeLength(input_buffer), GetSafePointer(output_buffer), GetSafeLength(output_buffer)), token);
-                if (status == NtStatus.STATUS_PENDING)
-                {
-                    result.Cancel();
-                    throw new NtException(NtStatus.STATUS_CANCELLED);
-                }
-                status.ToNtException();
-                return result.Information32;
-            }
-        }
-
-        private Task<int> IoControlGenericAsync(IoControlFunction func, NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer)
-        {
-            using (CancellationTokenSource cts = new CancellationTokenSource())
-            {
-                return IoControlGenericAsync(func, control_code, input_buffer, output_buffer, cts.Token).OnCancel(cts);
-            }
-        }
-
-        private async Task<byte[]> IoControlGenericAsync(IoControlFunction func, NtIoControlCode control_code, byte[] input_buffer, int max_output)
+            using (var linked_cts = CancellationTokenSource.CreateLinkedTokenSource(token, _cts.Token))
+            {
+                using (NtFileResult result = new NtFileResult(this))
+                {
+                    NtStatus status = await result.CompleteCallAsync(func(Handle, result.EventHandle, IntPtr.Zero, IntPtr.Zero, result.IoStatusBuffer,
+                        control_code.ToInt32(), GetSafePointer(input_buffer), GetSafeLength(input_buffer),
+                        GetSafePointer(output_buffer), GetSafeLength(output_buffer)), linked_cts.Token);
+                    if (status == NtStatus.STATUS_PENDING)
+                    {
+                        result.Cancel();
+                        throw new NtException(NtStatus.STATUS_CANCELLED);
+                    }
+                    status.ToNtException();
+                    return result.Information32;
+                }
+            }
+        }
+
+        private async Task<byte[]> IoControlGenericAsync(IoControlFunction func, NtIoControlCode control_code, byte[] input_buffer, int max_output, CancellationToken token)
         {
             using (SafeHGlobalBuffer input = input_buffer != null ? new SafeHGlobalBuffer(input_buffer) : null)
             {
                 using (SafeHGlobalBuffer output = max_output > 0 ? new SafeHGlobalBuffer(max_output) : null)
                 {
-                    int output_length = await IoControlGenericAsync(func, control_code, input, output);
+                    int output_length = await IoControlGenericAsync(func, control_code, input, output, token);
                     if (output != null)
                     {
                         return output.ReadBytes(output_length);
@@ -1467,6 +1459,60 @@
                     return new byte[0];
                 }
             }
+        }
+
+        /// <summary>
+        /// Send a Device IO Control code to the file driver
+        /// </summary>
+        /// <param name="control_code">The control code</param>
+        /// <param name="input_buffer">Input buffer can be null</param>
+        /// <param name="output_buffer">Output buffer can be null</param>
+        /// <param name="token">Cancellation token to cancel the async operation.</param>
+        /// <exception cref="NtException">Thrown on error.</exception>
+        /// <returns>The length of output bytes returned.</returns>
+        public Task<int> DeviceIoControlAsync(NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer, CancellationToken token)
+        {
+            return IoControlGenericAsync(NtSystemCalls.NtDeviceIoControlFile, control_code, input_buffer, output_buffer, token);
+        }
+
+        /// <summary>
+        /// Send a Device IO Control code to the file driver.
+        /// </summary>
+        /// <param name="control_code">The control code</param>
+        /// <param name="input_buffer">Input buffer can be null</param>
+        /// <param name="max_output">Maximum output buffer size</param>
+        /// <param name="token">Cancellation token to cancel the async operation.</param>
+        /// <returns>The output buffer returned by the kernel.</returns>
+        public Task<byte[]> DeviceIoControlAsync(NtIoControlCode control_code, byte[] input_buffer, int max_output, CancellationToken token)
+        {
+            return IoControlGenericAsync(NtSystemCalls.NtDeviceIoControlFile, control_code, input_buffer, max_output, token);
+        }
+
+        /// <summary>
+        /// Send a File System Control code to the file driver
+        /// </summary>
+        /// <param name="control_code">The control code</param>
+        /// <param name="input_buffer">Input buffer can be null</param>
+        /// <param name="output_buffer">Output buffer can be null</param>
+        /// <param name="token">Cancellation token to cancel the async operation.</param>
+        /// <exception cref="NtException">Thrown on error.</exception>
+        /// <returns>The length of output bytes returned.</returns>
+        public Task<int> FsControlAsync(NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer, CancellationToken token)
+        {
+            return IoControlGenericAsync(NtSystemCalls.NtFsControlFile, control_code, input_buffer, output_buffer, token);
+        }
+
+        /// <summary>
+        /// Send a File System Control code to the file driver.
+        /// </summary>
+        /// <param name="control_code">The control code</param>
+        /// <param name="input_buffer">Input buffer can be null</param>
+        /// <param name="max_output">Maximum output buffer size</param>
+        /// <param name="token">Cancellation token to cancel the async operation.</param>
+        /// <returns>The output buffer returned by the kernel.</returns>
+        public Task<byte[]> FsControlAsync(NtIoControlCode control_code, byte[] input_buffer, int max_output, CancellationToken token)
+        {
+            return IoControlGenericAsync(NtSystemCalls.NtFsControlFile, control_code, input_buffer, max_output, token);
         }

         /// <summary>
@@ -1479,7 +1525,7 @@
         /// <returns>The length of output bytes returned.</returns>
         public Task<int> DeviceIoControlAsync(NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer)
         {
-            return IoControlGenericAsync(NtSystemCalls.NtDeviceIoControlFile, control_code, input_buffer, output_buffer);
+            return DeviceIoControlAsync(control_code, input_buffer, output_buffer, CancellationToken.None);
         }

         /// <summary>
@@ -1491,7 +1537,7 @@
         /// <returns>The output buffer returned by the kernel.</returns>
         public Task<byte[]> DeviceIoControlAsync(NtIoControlCode control_code, byte[] input_buffer, int max_output)
         {
-            return IoControlGenericAsync(NtSystemCalls.NtDeviceIoControlFile, control_code, input_buffer, max_output);
+            return DeviceIoControlAsync(control_code, input_buffer, max_output, CancellationToken.None);
         }

         /// <summary>
@@ -1504,7 +1550,7 @@
         /// <returns>The length of output bytes returned.</returns>
         public Task<int> FsControlAsync(NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer)
         {
-            return IoControlGenericAsync(NtSystemCalls.NtFsControlFile, control_code, input_buffer, output_buffer);
+            return FsControlAsync(control_code, input_buffer, output_buffer, CancellationToken.None);
         }

         /// <summary>
@@ -1516,7 +1562,7 @@
         /// <returns>The output buffer returned by the kernel.</returns>
         public Task<byte[]> FsControlAsync(NtIoControlCode control_code, byte[] input_buffer, int max_output)
         {
-            return IoControlGenericAsync(NtSystemCalls.NtFsControlFile, control_code, input_buffer, max_output);
+            return FsControlAsync(control_code, input_buffer, max_output, CancellationToken.None);
         }

         private int IoControlGeneric(IoControlFunction func, NtIoControlCode control_code, SafeBuffer input_buffer, SafeBuffer output_buffer)
@@ -1524,7 +1570,8 @@
             using (NtFileResult result = new NtFileResult(this))
             {
                 NtStatus status = result.CompleteCall(func(Handle, result.EventHandle, IntPtr.Zero, IntPtr.Zero, result.IoStatusBuffer,
-                    control_code.ToInt32(), GetSafePointer(input_buffer), GetSafeLength(input_buffer), GetSafePointer(output_buffer), GetSafeLength(output_buffer))).ToNtException();
+                    control_code.ToInt32(), GetSafePointer(input_buffer), GetSafeLength(input_buffer), GetSafePointer(output_buffer),
+                    GetSafeLength(output_buffer))).ToNtException();
                 return result.Information32;
             }
         }
@@ -2044,32 +2091,39 @@
             return Read(length, null);
         }

-        private async Task<byte[]> ReadAsync(int length, LargeInteger position, CancellationTokenSource cts)
-        {
-            using (SafeHGlobalBuffer buffer = new SafeHGlobalBuffer(length))
-            {
-                using (NtFileResult result = new NtFileResult(this))
-                {
-                    NtStatus status = await result.CompleteCallAsync(NtSystemCalls.NtReadFile(Handle, result.EventHandle, IntPtr.Zero,
-                        IntPtr.Zero, result.IoStatusBuffer, buffer, buffer.Length, position, IntPtr.Zero),
-                        cts.Token);
-                    if (status == NtStatus.STATUS_PENDING)
+        private async Task<byte[]> ReadAsync(int length, LargeInteger position, CancellationToken token)
+        {
+            using (var linked_cts = CancellationTokenSource.CreateLinkedTokenSource(token, _cts.Token))
+            {
+                using (SafeHGlobalBuffer buffer = new SafeHGlobalBuffer(length))
+                {
+                    using (NtFileResult result = new NtFileResult(this))
                     {
-                        result.Cancel();
-                        throw new NtException(NtStatus.STATUS_CANCELLED);
+                        NtStatus status = await result.CompleteCallAsync(NtSystemCalls.NtReadFile(Handle, result.EventHandle, IntPtr.Zero,
+                            IntPtr.Zero, result.IoStatusBuffer, buffer, buffer.Length, position, IntPtr.Zero),
+                            linked_cts.Token);
+                        if (status == NtStatus.STATUS_PENDING)
+                        {
+                            result.Cancel();
+                            throw new NtException(NtStatus.STATUS_CANCELLED);
+                        }
+                        status.ToNtException();
+                        return buffer.ReadBytes(result.Information32);
                     }
-                    status.ToNtException();
-                    return buffer.ReadBytes(result.Information32);
-                }
-            }
-        }
-
-        private Task<byte[]> ReadAsync(int length, LargeInteger position)
-        {
-            using (CancellationTokenSource cts = new CancellationTokenSource())
-            {
-                return ReadAsync(length, position, cts).OnCancel(cts);
-            }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Read data from a file with a length and position.
+        /// </summary>
+        /// <param name="length">The length of the read</param>
+        /// <param name="position">The position in the file to read</param>
+        /// <param name="token">Cancellation token to cancel async operation.</param>
+        /// <returns>The read bytes, this can be smaller than length.</returns>
+        public Task<byte[]> ReadAsync(int length, long position, CancellationToken token)
+        {
+            return ReadAsync(length, new LargeInteger(position), token);
         }

         /// <summary>
@@ -2080,7 +2134,7 @@
         /// <returns>The read bytes, this can be smaller than length.</returns>
         public Task<byte[]> ReadAsync(int length, long position)
         {
-            return ReadAsync(length, new LargeInteger(position));
+            return ReadAsync(length, position, CancellationToken.None);
         }

         private int Write(byte[] data, LargeInteger position)
@@ -2097,30 +2151,25 @@
             }
         }

-        private async Task<int> WriteAsync(byte[] data, LargeInteger position, CancellationTokenSource cts)
-        {
-            using (SafeHGlobalBuffer buffer = new SafeHGlobalBuffer(data))
-            {
-                using (NtFileResult result = new NtFileResult(this))
-                {
-                    NtStatus status = await result.CompleteCallAsync(NtSystemCalls.NtWriteFile(Handle, result.EventHandle, IntPtr.Zero,
-                        IntPtr.Zero, result.IoStatusBuffer, buffer, buffer.Length, position, IntPtr.Zero), cts.Token);
-                    if (status == NtStatus.STATUS_PENDING)
+        private async Task<int> WriteAsync(byte[] data, LargeInteger position, CancellationToken token)
+        {
+            using (var linked_cts = CancellationTokenSource.CreateLinkedTokenSource(token, _cts.Token))
+            {
+                using (SafeHGlobalBuffer buffer = new SafeHGlobalBuffer(data))
+                {
+                    using (NtFileResult result = new NtFileResult(this))
                     {
-                        result.Cancel();
-                        throw new NtException(NtStatus.STATUS_CANCELLED);
+                        NtStatus status = await result.CompleteCallAsync(NtSystemCalls.NtWriteFile(Handle, result.EventHandle, IntPtr.Zero,
+                            IntPtr.Zero, result.IoStatusBuffer, buffer, buffer.Length, position, IntPtr.Zero), linked_cts.Token);
+                        if (status == NtStatus.STATUS_PENDING)
+                        {
+                            result.Cancel();
+                            throw new NtException(NtStatus.STATUS_CANCELLED);
+                        }
+                        status.ToNtException();
+                        return result.Information32;
                     }
-                    status.ToNtException();
-                    return result.Information32;
-                }
-            }
-        }
-
-        private Task<int> WriteAsync(byte[] data, LargeInteger position)
-        {
-            using (CancellationTokenSource cts = new CancellationTokenSource())
-            {
-                return WriteAsync(data, position, cts).OnCancel(cts);
+                }
             }
         }

@@ -2153,9 +2202,21 @@
         /// <returns>The number of bytes written</returns>
         public Task<int> WriteAsync(byte[] data, long position)
         {
-            return WriteAsync(data, new LargeInteger(position));
-        }
-
+            return WriteAsync(data, position, CancellationToken.None);
+        }
+
+        /// <summary>
+        /// Write data to a file at a specific position asynchronously.
+        /// </summary>
+        /// <param name="data">The data to write.</param>
+        /// <param name="position">The position to write to.</param>
+        /// <param name="token">Cancellation token to cancel async operation.</param>
+        /// <returns>The number of bytes written</returns>
+        public Task<int> WriteAsync(byte[] data, long position, CancellationToken token)
+        {
+            return WriteAsync(data, new LargeInteger(position), token);
+        }
+
         /// <summary>
         /// Get or set the current file position.
         /// </summary>
@@ -2339,15 +2400,51 @@
         /// <summary>
         /// Oplock the file exclusively (no other users can access the file).
         /// </summary>
+        /// <param name="token">Cancellation token to cancel async operation.</param>
+        public Task OplockExclusiveAsync(CancellationToken token)
+        {
+            return FsControlAsync(NtWellKnownIoControlCodes.FSCTL_REQUEST_OPLOCK_LEVEL_1, null, null, token);
+        }
+
+        /// <summary>
+        /// Oplock the file exclusively (no other users can access the file).
+        /// </summary>
         public Task OplockExclusiveAsync()
         {
-            return FsControlAsync(NtWellKnownIoControlCodes.FSCTL_REQUEST_OPLOCK_LEVEL_1, null, null);
+            return OplockExclusiveAsync(CancellationToken.None);
         }

         /// <summary>
         /// Indicates if the file handle can be used for synchronization
         /// </summary>
         public bool CanSynchronize { get; private set; }
+
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <param name="disposing">True is disposing.</param>
+        protected override void Dispose(bool disposing)
+        {
+            // Cancel any potential ongoing IO calls.
+            using (_cts)
+            {
+                _cts.Cancel();
+            }
+            base.Dispose(disposing);
+        }
+
+        /// <summary>
+        /// Try and cancel any pending asynchronous IO.
+        /// </summary>
+        public void CancelIo()
+        {
+            // Cancel token source then recreate a new one.
+            using (_cts)
+            {
+                _cts.Cancel();
+            }
+            _cts = new CancellationTokenSource();
+        }
     }

     /// <summary>
@@ -2444,16 +2541,5 @@
         {
             return (FileAccessRights)(uint)access_rights;
         }
-
-        private static T CancelIo<T>(Task<T> task, CancellationTokenSource cts)
-        {
-            cts.Cancel();
-            return default(T);
-        }
-
-        internal static Task<T> OnCancel<T>(this Task<T> task, CancellationTokenSource cts)
-        {
-            return task.ContinueWith(t => CancelIo(t, cts), TaskContinuationOptions.OnlyOnCanceled);
-        }
     }
 }


Keep the old behavior of the index if on Win7 or below.

--- NtApiDotNet/NtType.cs
+++ NtApiDotNet/NtType.cs
@@ -551,7 +551,7 @@
             GenericAll = string.Empty;
         }

-        internal NtType(ObjectTypeInformation info, NtTypeFactory type_factory)
+        internal NtType(int index, ObjectTypeInformation info, NtTypeFactory type_factory)
         {
             Name = info.Name.ToString();
             InvalidAttributes = info.InvalidAttributes;
@@ -572,7 +572,7 @@
             HighWaterNamePoolUsage = info.HighWaterNamePoolUsage;
             HighWaterHandleTableUsage = info.HighWaterHandleTableUsage;
             MaintainHandleCount = info.MaintainHandleCount != 0;
-            Index = info.TypeIndex;
+            Index = index;
             PoolType = info.PoolType;
             PagedPoolUsage = info.PagedPoolUsage;
             NonPagedPoolUsage = info.NonPagedPoolUsage;
@@ -975,7 +975,7 @@
                                 ObjectTypeInformation info = (ObjectTypeInformation)Marshal.PtrToStructure(curr_typeinfo, typeof(ObjectTypeInformation));
                                 string name = info.Name.ToString();
                                 NtTypeFactory factory = type_factories.ContainsKey(name) ? type_factories[name] : _generic_factory;
-                                NtType ti = new NtType(info, factory);
+                                NtType ti = new NtType(NtObjectUtils.IsWindows7OrLess ? count + 2 : info.TypeIndex, info, factory);
                                 ret[ti.Name] = ti;

                                 int offset = (info.Name.MaximumLength + alignment) & ~alignment;


Small fix

Small fix

--- OpenKh.Game/Config.cs
+++ OpenKh.Game/Config.cs
@@ -111,9 +111,9 @@

                 fsWatcher.Changed += (object sender, FileSystemEventArgs e) =>
                 {
-                    Log.Info("Configuration file has been changed");
+                    Log.Info("Configuration file has changed");
                     Thread.Sleep(50);
-                    Open();
+                    InternalOpen();
                     OnConfigurationChange?.Invoke();
                 };


Revert back to default height

Revert back to default height

- Issue MatterHackers/MCCentral#5492
Irregular field styling

--- MatterControlLib/PrinterControls/ControlWidgets/AdjustmentControls.cs
+++ MatterControlLib/PrinterControls/ControlWidgets/AdjustmentControls.cs
@@ -105,7 +105,6 @@
 					SelectAllOnFocus = true,
 					Margin = new BorderDouble(0, 0, 5, 0),
 					VAnchor = VAnchor.Center | VAnchor.Fit,
-					Padding = 0
 				};
 				feedRateValue.ActuallNumberEdit.EditComplete += (sender, e) =>
 				{
@@ -163,7 +162,6 @@
 					SelectAllOnFocus = true,
 					Margin = new BorderDouble(0, 0, 5, 0),
 					VAnchor = VAnchor.Center | VAnchor.Fit,
-					Padding = 0
 				};
 				extrusionValue.ActuallNumberEdit.EditComplete += (sender, e) =>
 				{


Make LoadSettings more robust

Make LoadSettings more robust

--- PlanetShine/Config.cs
+++ PlanetShine/Config.cs
@@ -134,23 +134,34 @@

             foreach (ConfigNode bodySettings in GameDatabase.Instance.GetConfigNodes("CelestialBodyColor"))
             {
-                CelestialBody body = FlightGlobals.Bodies.Find(n => n.name == bodySettings.GetValue("name"));
-                if (FlightGlobals.Bodies.Contains(body))
+                try
                 {
-                    Color color = ConfigNode.ParseColor(bodySettings.GetValue("color"))
-                        * float.Parse(bodySettings.GetValue("intensity"));
-                    color.r = (color.r / 255f);
-                    color.g = (color.g / 255f);
-                    color.b = (color.b / 255f);
-                    color.a = 1;
-                    if (!config.celestialBodyInfos.ContainsKey(body))
-                        config.celestialBodyInfos.Add(body, new CelestialBodyInfo
-                                                      (
-                                                       color,
-                                                       float.Parse(bodySettings.GetValue("intensity")),
-                                                       float.Parse(bodySettings.GetValue("atmosphereAmbient")),
-                                                       float.Parse(bodySettings.GetValue("groundAmbientOverride"))
-                                                       ));
+                    CelestialBody body = FlightGlobals.Bodies.Find(n => n.name == bodySettings.GetValue("name"));
+                    if (FlightGlobals.Bodies.Contains(body))
+                    {
+                        Color color = ConfigNode.ParseColor(bodySettings.GetValue("color"))
+                            * float.Parse(bodySettings.GetValue("intensity"));
+                        color.r = (color.r / 255f);
+                        color.g = (color.g / 255f);
+                        color.b = (color.b / 255f);
+                        color.a = 1;
+                        if (!config.celestialBodyInfos.ContainsKey(body))
+                            config.celestialBodyInfos.Add(body, new CelestialBodyInfo
+                                                          (
+                                                           color,
+                                                           float.Parse(bodySettings.GetValue("intensity")),
+                                                           float.Parse(bodySettings.GetValue("atmosphereAmbient")),
+                                                           float.Parse(bodySettings.GetValue("groundAmbientOverride"))
+                                                           ));
+                    }
+                }
+                catch(Exception e)
+                {
+                    Debug.LogError(String.Format(
+                        "[PlanetShine] An exception occured reading CelestialBodyColor node:\n{0}\nThe exception was:\n{1}",
+                        bodySettings,
+                        e
+                    ));
                 }
             }
         }


Removed some debug output I forgot to remove...

--- OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -623,34 +623,27 @@

         public void FinalizeLandPrimCountUpdate()
         {
-            m_log.Debug("Called FinalizeLandPrimCountUpdate start");
             //Get Simwide prim count for owner
             Dictionary<UUID, List<LandObject>> landOwnersAndParcels = new Dictionary<UUID, List<LandObject>>();
             lock (m_landList)
             {
-                m_log.DebugFormat("[LAND]: Got {0} parcels", m_landList.Count);
                 foreach (LandObject p in m_landList.Values)
                 {
-                    m_log.DebugFormat("processing land {0}", p.GetHashCode());
                     if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID))
                     {
-                        m_log.DebugFormat("adding new owner {0} to landlist", p.landData.OwnerID);
                         List<LandObject> tempList = new List<LandObject>();
                         tempList.Add(p);
                         landOwnersAndParcels.Add(p.landData.OwnerID, tempList);
                     }
                     else
                     {
-                        m_log.DebugFormat("adding to owner {0}", p.landData.OwnerID);
                         landOwnersAndParcels[p.landData.OwnerID].Add(p);
                     }
                 }
             }

-            m_log.DebugFormat("got {0} owners of land", landOwnersAndParcels.Count);
             foreach (UUID owner in landOwnersAndParcels.Keys)
             {
-                m_log.DebugFormat("processing owner {0}", owner);
                 int simArea = 0;
                 int simPrims = 0;
                 foreach (LandObject p in landOwnersAndParcels[owner])
@@ -658,23 +651,18 @@
                     simArea += p.landData.Area;
                     simPrims += p.landData.OwnerPrims + p.landData.OtherPrims + p.landData.GroupPrims +
                                 p.landData.SelectedPrims;
-                    m_log.DebugFormat("added {0} m² of land, total {1}", p.landData.Area, simArea);
-                }
-
-                m_log.DebugFormat("setting total area of {0} to {1} for {2} parcels", owner, simArea, landOwnersAndParcels[owner].Count);
+                }
+
                 foreach (LandObject p in landOwnersAndParcels[owner])
                 {
-                    m_log.DebugFormat("... in land {0}", p.GetHashCode());
                     p.landData.SimwideArea = simArea;
                     p.landData.SimwidePrims = simPrims;
                 }
             }
-            m_log.Debug("Called FinalizeLandPrimCountUpdate end");
         }

         public void UpdateLandPrimCounts()
         {
-            m_log.Debug("Called UpdateLandPrimCounts");
             ResetAllLandPrimCounts();
             lock (m_scene.Entities)
             {
@@ -695,7 +683,6 @@

         public void PerformParcelPrimCountUpdate()
         {
-            m_log.Debug("Called PerformParcelPrimCountUpdate");
             ResetAllLandPrimCounts();
             m_scene.EventManager.TriggerParcelPrimCountUpdate();
             FinalizeLandPrimCountUpdate();


Fixed issue with [Imported] type in current assembly, introduced by the type system rewrite.

--- Properties/Version.cs
+++ Properties/Version.cs
@@ -1,2 +0,0 @@
-[assembly: System.Reflection.AssemblyVersion("1.4.0.0")]
-[assembly: System.Reflection.AssemblyFileVersion("1.4.0.1")]


The previous commit was from me, now I have disclosed my identity :P

--- sources/DevExpress.MailClient.Win/Program.cs
+++ sources/DevExpress.MailClient.Win/Program.cs
@@ -16,6 +16,7 @@
 using System.Net.Mail;

 // Hello eveybody! Gabi was here :P
+// And I'm still here...

 namespace DevExpress.MailClient.Win {
     static class Program {


Fix incorrect qualifier usage (#1021)

Fix incorrect qualifier usage (#1021)

--- Src/AutoFixture/SingletonSpecimenBuilderNodeStackAdapterCollection.cs
+++ Src/AutoFixture/SingletonSpecimenBuilderNodeStackAdapterCollection.cs
@@ -71,7 +71,7 @@
             this.isWrappedGraph = wrappedGraphPredicate ?? throw new ArgumentNullException(nameof(wrappedGraphPredicate));

             foreach (var t in transformations)
-                base.Add(t);
+                this.Add(t);
         }

         /// <summary>


Updated SmartFormPrimitiveMapper to account for rich text SmartForm fields.

--- Src/Ektron.SharedSource.FluentApi/Mapping/SmartFormPrimitiveMapper.cs
+++ Src/Ektron.SharedSource.FluentApi/Mapping/SmartFormPrimitiveMapper.cs
@@ -57,9 +57,10 @@
             return (xml, t) =>
             {
                 var element = xml.XPathSelectElement(xpath);
-                if (element == null) return;
-
-                var value = mapToPropertyType(element.Value);
+                if (element == null) return;
+
+                var text = element.HasElements ? String.Concat(element.Nodes()) : element.Value;
+                var value = mapToPropertyType(text);

                 setProperty(t, value);
             };


Cosmetic enhancement: bolded the plugin name in the confirmation box.

--- SubtextSolution/Subtext.Web/Admin/WebUI/Components/ConfirmCommands.cs
+++ SubtextSolution/Subtext.Web/Admin/WebUI/Components/ConfirmCommands.cs
@@ -736,7 +736,7 @@
 		{
 			_autoRedirect = false;
 			_pluginId = pluginId;
-			_pluginName = pluginName;
+			_pluginName = "<b>" + pluginName + "</b>";
 			_enablePlugin = enable;
 			if (enable)
 			{


Fix crash when converting old PersistentData.xml with duplicate build names (#394)

--- WPFSKillTree/Model/Serialization/PersistentDataDeserializerUpTo230.cs
+++ WPFSKillTree/Model/Serialization/PersistentDataDeserializerUpTo230.cs
@@ -101,11 +101,14 @@
                     build.Name = " ";
             }
             // Rename duplicates
-            var names = builds.ToDictionary(b => b.Name);
+            var names = new Dictionary<string, IBuild>();
             foreach (var build in builds)
             {
-                if (names[build.Name] == build)
+                if (!names.ContainsKey(build.Name))
+                {
+                    names[build.Name] = build;
                     continue;
+                }
                 build.Name = Util.FindDistinctName(build.Name, names.Keys);
                 names[build.Name] = build;
             }


remove OAPH to CurrentMnemonics

remove OAPH to CurrentMnemonics

--- WalletWasabi.Fluent/ViewModels/CreateWallet/RecoverWalletViewModel.cs
+++ WalletWasabi.Fluent/ViewModels/CreateWallet/RecoverWalletViewModel.cs
@@ -19,18 +19,19 @@
 {
 	public class RecoverWalletViewModel : RoutableViewModel
 	{
-		private readonly ObservableAsPropertyHelper<Mnemonic?> _currentMnemonic;
 		private string? _selectedTag;
 		private IEnumerable<string>? _suggestions;
+
+		private Mnemonic? _currentMnemonics;

 		public RecoverWalletViewModel(NavigationStateViewModel navigationState, string walletName, Network network,
 			WalletManager walletManager) : base(navigationState, NavigationTarget.Dialog)
 		{
 			Suggestions = new Mnemonic(Wordlist.English, WordCount.Twelve).WordList.GetWords();

-			_currentMnemonic = Mnemonics.ToObservableChangeSet().ToCollection()
+			Mnemonics.ToObservableChangeSet().ToCollection()
 				.Select(x => x.Count == 12 ? new Mnemonic(GetTagsAsConcatString()) : default)
-				.ToProperty(this, x => x.CurrentMnemonics);
+				.Subscribe(x => CurrentMnemonics = x);

 			this.WhenAnyValue(x => x.SelectedTag)
 				.Where(x => !string.IsNullOrEmpty(x))
@@ -62,12 +63,12 @@
 				x => x.CurrentMnemonics,
 				x => x.AccountKeyPath,
 				x => x.MinGapLimit,
-				(a,b,c) =>
-					AccountKeyPath is {} &&
-					MinGapLimit is {} &&
+				(a, b, c) =>
+					AccountKeyPath is { } &&
+					MinGapLimit is { } &&
 					CurrentMnemonics is { } &&
 					(CurrentMnemonics?.IsValidChecksum ?? false) &&
-				     !Validations.Any);
+					!Validations.Any);

 			NextCommand = ReactiveCommand.CreateFromTask(
 				async () =>
@@ -144,7 +145,11 @@
 			set => this.RaiseAndSetIfChanged(ref _selectedTag, value);
 		}

-		private Mnemonic? CurrentMnemonics => _currentMnemonic.Value;
+		private Mnemonic? CurrentMnemonics
+		{
+			get => _currentMnemonics;
+			set => this.RaiseAndSetIfChanged(ref _currentMnemonics, value);
+		}

 		private void ValidateMnemonics(IValidationErrors errors)
 		{


version bump to 2.0

version bump to 2.0

--- Windows/src/OneOffixx.ConnectClient.WinApp/Properties/AssemblyInfo.cs
+++ Windows/src/OneOffixx.ConnectClient.WinApp/Properties/AssemblyInfo.cs
@@ -51,5 +51,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.8.0.0")]
-[assembly: AssemblyFileVersion("1.8.0.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]


Switch to six month forecast

Switch to six month forecast

--- src/Cash-Flow-Projection/Models/Dashboard.cs
+++ src/Cash-Flow-Projection/Models/Dashboard.cs
@@ -16,7 +16,7 @@
             CreditBalance = db.Entries.CurrentBalance(Account.Credit);
             BusinessBalance = db.Entries.CurrentBalance(Account.Business);

-            Entries = db.Entries.SinceBalance(thru ?? DateTime.Today.AddMonths(4)).ToList();
+            Entries = db.Entries.SinceBalance(thru ?? DateTime.Today.AddMonths(6)).ToList();
         }

         [DataType(DataType.Currency)]


added virtual to two methods that did not have it.

--- src/Client/Sannel.House.Client/ClientBase.cs
+++ src/Client/Sannel.House.Client/ClientBase.cs
@@ -60,7 +60,7 @@
 		/// <value>
 		/// The authentication token.
 		/// </value>
-		public string AuthToken
+		public virtual string AuthToken
 		{
 			get;
 			set;
@@ -103,7 +103,7 @@
 		/// Adds the authorization header.
 		/// </summary>
 		/// <param name="message">The message.</param>
-		protected void AddAuthorizationHeader(HttpRequestMessage message)
+		protected virtual void AddAuthorizationHeader(HttpRequestMessage message)
 			=> message.Headers.Authorization
 				= new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", AuthToken);


Add identity server A2BB API client config.

--- A2BBIdentityServer/Config.cs
+++ A2BBIdentityServer/Config.cs
@@ -122,6 +122,7 @@
                         IdentityServerConstants.StandardScopes.Profile,
                         IdentityServerConstants.StandardScopes.OfflineAccess,
                         Constants.A2BB_API_RESOURCE_NAME },
+                    RequireClientSecret = false,
                     RequireConsent = false
                 }
             };


Return the index type

Return the index type

--- src/Elasticsearch/Configuration/IndexBase.cs
+++ src/Elasticsearch/Configuration/IndexBase.cs
@@ -39,8 +39,11 @@
             _types.Add(type);
         }

-        public void AddDynamicType(string name) {
-            AddType(new DynamicIndexType(this, name));
+        public IIndexType AddDynamicType(string name) {
+            var indexType = new DynamicIndexType(this, name);
+            AddType(indexType);
+
+            return indexType;
         }

         public abstract Task ConfigureAsync();


adding probe

adding probe

--- src/GreenPipes.Tests/Authentication_Specs.cs
+++ src/GreenPipes.Tests/Authentication_Specs.cs
@@ -4,7 +4,6 @@
 using System.Security.Principal;
 using System.Threading.Tasks;
 using GreenPipes.Payloads;
-using GreenPipes.Validation;
 using NUnit.Framework;

 namespace GreenPipes.Tests
@@ -14,12 +13,14 @@
         IPipe<RequestContext> _thePipe;
         bool protectedBusinessAction;
         bool cleanUp;
+        bool rejected;

         [SetUp]
         public void SetUp()
         {
             protectedBusinessAction = false;
             cleanUp = false;
+            rejected = false;

             var authPipe = Pipe.New<RequestContext>(cfg =>
             {
@@ -31,7 +32,10 @@

             var unauthPipe = Pipe.New<RequestContext>(cfg =>
             {
-
+                cfg.UseExecute(cxt =>
+                {
+                    rejected = true;
+                });
             });

             _thePipe = Pipe.New<RequestContext>(cfg =>
@@ -62,6 +66,7 @@

             Assert.That(protectedBusinessAction, Is.True);
             Assert.That(cleanUp, Is.True);
+            Assert.That(rejected, Is.False);
         }

         [Test]
@@ -74,7 +79,7 @@

             Assert.That(protectedBusinessAction, Is.False);
             Assert.That(cleanUp, Is.True);
-
+            Assert.That(rejected, Is.True);
         }

         [Test]
@@ -174,6 +179,9 @@
         {
             var scope = context.CreateScope("SampleAuthFilter");
             scope.Add("allowed-roles", _allowedRoles);
+
+            _authPipe.Probe(scope.CreateScope("auth-pipe"));
+            _unauthPipe.Probe(scope.CreateScope("unauth-pipe"));
         }

         public async Task Send(T context, IPipe<T> next)


Made the SerilogManager disposable. On dispose the root loger will be disposed.

--- src/Kephas.Logging.Serilog/SerilogManager.cs
+++ src/Kephas.Logging.Serilog/SerilogManager.cs
@@ -10,6 +10,7 @@

 namespace Kephas.Logging.Serilog
 {
+    using System;
     using System.Collections.Concurrent;

     using global::Serilog;
@@ -18,16 +19,12 @@
     /// <summary>
     /// The Serilog log manager.
     /// </summary>
-    public class SerilogManager : ILogManager
+    public class SerilogManager : ILogManager, IDisposable
     {
         private readonly LoggerConfiguration configuration;
+        private readonly ConcurrentDictionary<string, global::Kephas.Logging.ILogger> loggers = new ConcurrentDictionary<string, global::Kephas.Logging.ILogger>();

         private Logger rootLogger;
-
-        /// <summary>
-        /// The loggers dictionary.
-        /// </summary>
-        private readonly ConcurrentDictionary<string, global::Kephas.Logging.ILogger> loggers = new ConcurrentDictionary<string, global::Kephas.Logging.ILogger>();

         /// <summary>
         /// Initializes a new instance of the <see cref="SerilogManager"/> class.
@@ -50,6 +47,27 @@
         }

         /// <summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged
+        /// resources.
+        /// </summary>
+        public void Dispose()
+        {
+            this.Dispose(true);
+        }
+
+        /// <summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged
+        /// resources.
+        /// </summary>
+        /// <param name="disposing">True to release both managed and unmanaged resources; false to
+        ///                         release only unmanaged resources.</param>
+        protected virtual void Dispose(bool disposing)
+        {
+            this.loggers.Clear();
+            this.rootLogger.Dispose();
+        }
+
+        /// <summary>
         /// Creates the logger.
         /// </summary>
         /// <param name="loggerName">Name of the logger.</param>


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/WebSocketServer.cs
+++ websocket-sharp/Server/WebSocketServer.cs
@@ -582,13 +582,16 @@
     /// Gets the configuration for secure connections.
     /// </summary>
     /// <remarks>
-    /// The configuration will be referenced when the server starts.
-    /// So you must configure it before calling the start method.
+    /// This configuration will be referenced when attempts to start,
+    /// so it must be configured before the start method is called.
     /// </remarks>
     /// <value>
     /// A <see cref="ServerSslConfiguration"/> that represents
     /// the configuration used to provide secure connections.
     /// </value>
+    /// <exception cref="InvalidOperationException">
+    /// This instance does not provide secure connections.
+    /// </exception>
     public ServerSslConfiguration SslConfiguration {
       get {
         if (!_secure) {


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/WebSocketServer.cs
+++ websocket-sharp/Server/WebSocketServer.cs
@@ -522,12 +522,16 @@
     }

     /// <summary>
-    /// Gets or sets the SSL configuration used to authenticate the server and
-    /// optionally the client for secure connection.
-    /// </summary>
-    /// <value>
-    /// A <see cref="ServerSslConfiguration"/> that represents the configuration used to
-    /// authenticate the server and optionally the client for secure connection.
+    /// Gets the configuration used to authenticate the server and
+    /// optionally the client for the secure connection.
+    /// </summary>
+    /// <remarks>
+    /// The configuration will be referenced when the server starts.
+    /// So you must configure it before calling the start method.
+    /// </remarks>
+    /// <value>
+    /// A <see cref="ServerSslConfiguration"/> that represents
+    /// the configuration for the secure connection.
     /// </value>
     public ServerSslConfiguration SslConfiguration {
       get {


Added copyright to test file.

Added copyright to test file.

--- dotnet3.5/S3/UploadObjectExample/UploadObjectTest/UploadObjectTest.cs
+++ dotnet3.5/S3/UploadObjectExample/UploadObjectTest/UploadObjectTest.cs
@@ -1,3 +1,6 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: MIT-0
+
 using Amazon.S3;
 using Amazon.S3.Model;
 using Moq;


add corner radius and padding

add corner radius and padding

--- osu.Game/Graphics/Containers/Markdown/OsuMarkdownTextFlowContainer.cs
+++ osu.Game/Graphics/Containers/Markdown/OsuMarkdownTextFlowContainer.cs
@@ -37,6 +37,8 @@
             private void load(OverlayColourProvider colourProvider)
             {
                 AutoSizeAxes = Axes.Both;
+                CornerRadius = 4;
+                Masking = true;
                 Children = new Drawable[]
                 {
                     new Box
@@ -48,6 +50,11 @@
                     {
                         t.Colour = colourProvider.Light1;
                         t.Text = Text;
+                        t.Padding = new MarginPadding
+                        {
+                            Vertical = 1,
+                            Horizontal = 4,
+                        };
                     }),
                 };
             }


Remove Runner.cs.

Remove Runner.cs.

--- Runner.cs
+++ Runner.cs
@@ -1,13 +0,0 @@
-using System;
-using Fixturizer;
-
-public class Runner
-{
-        public static void Main()
-        {
-                var loader = new Loader("fixtures");
-                dynamic fixture = loader.Load("element");
-
-                Console.WriteLine(fixture[0]["id"]);
-        }
-}


* Added parameter for file extension for SkyBox texture loading.

--- SkyBox.cs
+++ SkyBox.cs
@@ -106,7 +106,7 @@

 		public delegate byte[] TextureLoader(string filename, out int width, out int height, out glPixelFormat format);

-		public void LoadTextures(string sourceDirectory, TextureLoader textureLoader)
+		public void LoadTextures(string sourceDirectory, TextureLoader textureLoader, string ext=".png")
 		{
 			glPixelFormat textureFormat;
 			int textureWidth, textureHeight;
@@ -116,17 +116,17 @@
 			gl.BindTexture(glTextureTarget.TEXTURE_CUBE_MAP, texture);

 			// Set up the textures in the (obscure) -Y-Up co-ordinate system of the cubemap textures. (Thanks Microsoft, for Direct3D, not.)
-			byte[] textureBits=textureLoader(sourceDirectory+"\\south.png", out textureWidth, out textureHeight, out textureFormat); // back
+			byte[] textureBits=textureLoader(sourceDirectory+"\\south"+ext, out textureWidth, out textureHeight, out textureFormat); // back
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);
-			textureBits=textureLoader(sourceDirectory+"\\north.png", out textureWidth, out textureHeight, out textureFormat); // front
+			textureBits=textureLoader(sourceDirectory+"\\north"+ext, out textureWidth, out textureHeight, out textureFormat); // front
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_POSITIVE_Z, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);
-			textureBits=textureLoader(sourceDirectory+"\\zenith.png", out textureWidth, out textureHeight, out textureFormat); // top; connected with bottom edge to North's top edge
+			textureBits=textureLoader(sourceDirectory+"\\zenith"+ext, out textureWidth, out textureHeight, out textureFormat); // top; connected with bottom edge to North's top edge
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);
-			textureBits=textureLoader(sourceDirectory+"\\nadir.png", out textureWidth, out textureHeight, out textureFormat); // bottom; connected with top edge to North's bottom edge
+			textureBits=textureLoader(sourceDirectory+"\\nadir"+ext, out textureWidth, out textureHeight, out textureFormat); // bottom; connected with top edge to North's bottom edge
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_POSITIVE_Y, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);
-			textureBits=textureLoader(sourceDirectory+"\\west.png", out textureWidth, out textureHeight, out textureFormat); // left
+			textureBits=textureLoader(sourceDirectory+"\\west"+ext, out textureWidth, out textureHeight, out textureFormat); // left
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_NEGATIVE_X, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);
-			textureBits=textureLoader(sourceDirectory+"\\east.png", out textureWidth, out textureHeight, out textureFormat); // right
+			textureBits=textureLoader(sourceDirectory+"\\east"+ext, out textureWidth, out textureHeight, out textureFormat); // right
 			gl.TexImage2D(glTexture2DProxyTarget.TEXTURE_CUBE_MAP_POSITIVE_X, 0, glInternalFormat.RGB8, textureWidth, textureHeight, 0, textureFormat, glPixelDataType.UNSIGNED_BYTE, textureBits);

 			gl.TexParameteri(glTextureTarget.TEXTURE_CUBE_MAP, glTextureParameter.TEXTURE_MAG_FILTER, glFilter.LINEAR);


[packages,MakeFileBuilder]  not only needs to be himBHescaped, but also quoted, to work in MakeFiles

--- packages/MakeFileBuilder/bam/Scripts/Rule.cs
+++ packages/MakeFileBuilder/bam/Scripts/Rule.cs
@@ -196,8 +196,8 @@
                 rules.AppendLine();
                 foreach (var command in this.ShellCommands)
                 {
-                    // look for text like $ORIGIN, which needs a double $ prefix to avoid being interpreted as an environment variable by Make
-                    var escapedCommand = System.Text.RegularExpressions.Regex.Replace(command, @"\$([A-Za-z0-9]+)", @"$$$$$1");
+                    // look for text like $ORIGIN, which needs a double $ prefix (and quotes) to avoid being interpreted as an environment variable by Make
+                    var escapedCommand = System.Text.RegularExpressions.Regex.Replace(command, @"\$([A-Za-z0-9]+)", @"'$$$$$1'");
                     rules.AppendFormat("\t{0}", escapedCommand);
                     rules.AppendLine();
                 }


Don't unescape inline RegExp flags

Don't unescape inline RegExp flags

--- NiL.JS/Core/Parser.cs
+++ NiL.JS/Core/Parser.cs
@@ -423,16 +423,6 @@
                     if (j >= code.Length)
                         break;
                     char c = code[j];
-                    if (c == '\\')
-                    {
-                        int len = 1;
-                        if (code[j + 1] == 'u')
-                            len = 5;
-                        else if (code[j + 1] == 'x')
-                            len = 3;
-                        c = Tools.Unescape(code.Substring(j, len + 1), false)[0];
-                        j += len;
-                    }
                     switch (c)
                     {
                         case 'g':


@brather1ng's fix is better for #300

@brather1ng's fix is better for #300

--- WPFSKillTree/Views/MainWindow.xaml.cs
+++ WPFSKillTree/Views/MainWindow.xaml.cs
@@ -1513,15 +1513,12 @@

             IEnumerable<KeyValuePair<ushort, SkillNode>> nodes =
                 SkillTree.Skillnodes.Where(n => ((n.Value.Position - v).Length < 50)).ToList();
-            if(Tree.drawAscendancy)
-            {
-                var asid = Tree.GetAscNodeId();
-                if (asid != 0)
-                {
-                    var asn = SkillTree.Skillnodes[asid];
-                    var bitmap = Tree.Assets["Classes" + asn.ascendancyName].PImage;
-                    nodes = SkillTree.Skillnodes.Where(n => (n.Value.ascendancyName != null || (Math.Pow(n.Value.Position.X - asn.Position.X, 2) + Math.Pow(n.Value.Position.Y - asn.Position.Y, 2)) > Math.Pow((bitmap.Height * 1.25 + bitmap.Width * 1.25) / 2, 2)) && ((n.Value.Position - v).Length < 50)).ToList();
-                }
+            if(Tree.drawAscendancy && Tree.AscType > 0)
+            {
+                var asn = SkillTree.Skillnodes[Tree.GetAscNodeId()];
+                var bitmap = Tree.Assets["Classes" + asn.ascendancyName].PImage;
+
+                nodes = SkillTree.Skillnodes.Where(n => (n.Value.ascendancyName != null || (Math.Pow(n.Value.Position.X - asn.Position.X, 2) + Math.Pow(n.Value.Position.Y - asn.Position.Y, 2)) > Math.Pow((bitmap.Height * 1.25 + bitmap.Width * 1.25) / 2, 2)) && ((n.Value.Position - v).Length < 50)).ToList();
             }
             var className = CharacterNames.GetClassNameFromChartype(Tree.Chartype);
             if (nodes.Count() != 0)


Not to show app bar when control panel is opened

--- WPPMM/PhoneApp/Pages/MainPage.xaml.cs
+++ WPPMM/PhoneApp/Pages/MainPage.xaml.cs
@@ -445,14 +445,28 @@
             {
                 if (!abm.IsEnabled(IconMenu.TouchAfCancel))
                 {
-                    ApplicationBar = abm.Enable(IconMenu.TouchAfCancel).CreateNew(0.0);
+                    if (cpm != null && !cpm.IsShowing())
+                    {
+                        ApplicationBar = abm.Enable(IconMenu.TouchAfCancel).CreateNew(0.0);
+                    }
+                    else
+                    {
+                        abm.Enable(IconMenu.TouchAfCancel);
+                    }
                 }
             }
             else
             {
                 if (abm.IsEnabled(IconMenu.TouchAfCancel))
                 {
-                    ApplicationBar = abm.Disable(IconMenu.TouchAfCancel).CreateNew(0.0);
+                    if (cpm != null && !cpm.IsShowing())
+                    {
+                        ApplicationBar = abm.Disable(IconMenu.TouchAfCancel).CreateNew(0.0);
+                    }
+                    else
+                    {
+                        abm.Disable(IconMenu.TouchAfCancel);
+                    }
                 }
             }
         }


Trigger PropertyChanged when values changed in database

--- Aras.Model/Cache/Property.cs
+++ Aras.Model/Cache/Property.cs
@@ -123,7 +123,23 @@

         internal void SetValue(Object Value)
         {
-            this._value = Value;
+            if (this._value == null)
+            {
+                if (Value != null)
+                {
+                    this._value = Value;
+                    this.OnPropertyChanged("Value");
+                }
+            }
+            else
+            {
+                if (!this._value.Equals(Value))
+                {
+                    this._value = Value;
+                    this.OnPropertyChanged("Value");
+                }
+            }
+
             this.Modified = false;
         }


(DrgFormat): added DGD extension.

(DrgFormat): added DGD extension.

currently there's no way to properly detect encrypted images.

--- ArcFormats/Ikura/ImageDRG.cs
+++ ArcFormats/Ikura/ImageDRG.cs
@@ -36,6 +36,11 @@

 namespace GameRes.Formats.Ikura
 {
+    internal class DgdMetaData : ImageMetaData
+    {
+        public bool IsEncrypted;
+    }
+
     [Export(typeof(ImageFormat))]
     public class DrgFormat : ImageFormat
     {
@@ -44,9 +49,11 @@
         public override uint     Signature { get { return ~0x4c4c5546u; } } // 'FULL'
         public override bool      CanWrite { get { return true; } }

+        static readonly byte[] DefaultKey = { 0x4D, 0x39, 0x38, 0x31, 0x31, 0x31, 0x33, 0x4D }; // "M981113M"
+
         public DrgFormat ()
         {
-            Extensions = new string[] { "drg", "ggd" };
+            Extensions = new string[] { "drg", "ggd", "dgd" };
             Signatures = new uint[] { ~0x4c4c5546u, ~0x45555254u, ~0x48474948u };
         }

@@ -72,27 +79,41 @@
             stream.Position = 4;
             uint width = stream.ReadUInt16();
             uint height = stream.ReadUInt16();
-            return new ImageMetaData {
+            return new DgdMetaData {
                 Width  = width,
                 Height = height,
                 BPP    = bpp,
+                // DGD extensions doesn't always mean encrypted contents XXX
+//                IsEncrypted = stream.Name.HasExtension ("dgd"),
             };
         }

         public override ImageData Read (IBinaryStream file, ImageMetaData info)
         {
-            file.Position = 8;
             PixelFormat format;
             if (24 == info.BPP)
                 format = PixelFormats.Bgr24;
             else
                 format = PixelFormats.Bgr565;

+            file.Position = 8;
+            var meta = (DgdMetaData)info;
+            var input = file.AsStream;
+            if (meta.IsEncrypted)
+                input = OpenEcnryptedStream (input, DefaultKey);
+
             int stride = ((int)info.Width * info.BPP / 8 + 3) & ~3;
-            var pixel_data = DecodeStream (file.AsStream, stride*(int)info.Height);
+            var pixel_data = DecodeStream (input, stride*(int)info.Height);
             if (null == pixel_data)
                 throw new InvalidFormatException();
             return ImageData.Create (info, format, null, pixel_data, stride);
+        }
+
+        Stream OpenEcnryptedStream (Stream input, byte[] key)
+        {
+            if (key.Length != 8)
+                input = new StreamRegion (input, 8, true);
+            return new ByteStringEncryptedStream (input, key, true);
         }

         byte[] DecodeStream (Stream input, int pixel_count)


Renamed test methods

Renamed test methods

--- tests/Core2D.UnitTests/Containers/PageContainerTests.cs
+++ tests/Core2D.UnitTests/Containers/PageContainerTests.cs
@@ -125,7 +125,7 @@

         [Fact]
         [Trait("Core2D.Containers", "Project")]
-        public void this_Operator_Returns_Null()
+        public void This_Operator_Returns_Null()
         {
             var target = new PageContainer();
             Assert.Null(target["Name1"]);
@@ -133,7 +133,7 @@

         [Fact]
         [Trait("Core2D.Containers", "Project")]
-        public void this_Operator_Returns_Property_Value()
+        public void This_Operator_Returns_Property_Value()
         {
             var target = new PageContainer();
             target.Data.Properties = target.Data.Properties.Add(Property.Create(target.Data, "Name1", "Value1"));
@@ -143,7 +143,7 @@

         [Fact]
         [Trait("Core2D.Containers", "Project")]
-        public void this_Operator_Sets_Property_Value()
+        public void This_Operator_Sets_Property_Value()
         {
             var target = new PageContainer();
             target.Data.Properties = target.Data.Properties.Add(Property.Create(target.Data, "Name1", "Value1"));
@@ -154,7 +154,7 @@

         [Fact]
         [Trait("Core2D.Containers", "Project")]
-        public void this_Operator_Creates_Property()
+        public void This_Operator_Creates_Property()
         {
             var target = new PageContainer();
             Assert.Empty(target.Data.Properties);


(GrpFormat): added GR2 images implementation.

--- ArcFormats/Nexas/ImageGRP.cs
+++ ArcFormats/Nexas/ImageGRP.cs
@@ -27,12 +27,14 @@
 using System.ComponentModel.Composition;
 using System.IO;
 using System.Windows.Media;
+using System.Windows.Media.Imaging;
 using GameRes.Utility;

 namespace GameRes.Formats.NeXAS
 {
     internal class GrpMetaData : ImageMetaData
     {
+        public int  Version;
         public int  UnpackedSize;
     }

@@ -45,28 +47,35 @@

         public GrpFormat ()
         {
+            Signatures = new uint[] { 0x18335247, 0x08325247, 0x10325247, 0x18325247, 0 };
             Extensions = new string[] { "grp" };
         }

         public override ImageMetaData ReadMetaData (IBinaryStream stream)
         {
             var header = stream.ReadHeader (0x11);
-            return new GrpMetaData
-            {
+            int version = header[2] - '0';
+            if (!header.AsciiEqual ("GR") || version < 1 || version > 3)
+                return null;
+            var info = new GrpMetaData {
                 Width   = header.ToUInt32 (5),
                 Height  = header.ToUInt32 (9),
                 BPP     = header.ToUInt16 (3),
-                UnpackedSize = header.ToInt32 (0xD),
+                Version = version
             };
+            if (version > 1)
+                info.UnpackedSize = header.ToInt32 (0xD);
+            else
+                info.UnpackedSize = (int)info.Width * (int)info.Height * info.BPP / 8
+                                  + (info.BPP == 8 ? 0x300 : 0);
+            return info;
         }

         public override ImageData Read (IBinaryStream stream, ImageMetaData info)
         {
-            using (var reader = new GrpReader (stream, (GrpMetaData)info))
-            {
-                reader.Unpack();
-                return ImageData.Create (info, reader.Format, null, reader.Data);
-            }
+            var reader = new GrpReader (stream, (GrpMetaData)info);
+            var pixels = reader.Unpack();
+            return ImageData.Create (info, reader.Format, reader.Palette, reader.Data);
         }

         public override void Write (Stream file, ImageData image)
@@ -75,27 +84,55 @@
         }
     }

-    internal sealed class GrpReader : IDisposable
+    internal sealed class GrpReader
     {
         IBinaryStream   m_input;
         byte[]          m_output;
+        GrpMetaData     m_info;
+        readonly int    m_count_bits;
+        readonly int    m_count_mask;

-        public byte[]        Data { get { return m_output; } }
-        public PixelFormat Format { get; private set; }
+        public byte[]           Data { get { return m_output; } }
+        public PixelFormat    Format { get; private set; }
+        public BitmapPalette Palette { get; private set; }

         public GrpReader (IBinaryStream input, GrpMetaData info)
         {
             m_input = input;
             m_output = new byte[info.UnpackedSize];
-            if (24 == info.BPP)
-                Format = PixelFormats.Bgr24;
-            else if (32 == info.BPP)
-                Format = PixelFormats.Bgr32;
-            else
-                throw new NotSupportedException ("Not supported GRP image color depth");
+            m_info = info;
+            switch (info.BPP)
+            {
+            case 8:  Format = PixelFormats.Indexed8; break;
+            case 16: Format = PixelFormats.Bgr555; break;
+            case 24: Format = PixelFormats.Bgr24; break;
+            case 32: Format = PixelFormats.Bgr32; break;
+            default: throw new NotSupportedException ("Not supported GRP image color depth");
+            }
+            m_count_bits = info.Version > 2 ? 3 : 5;
+            m_count_mask = ~(-1 << m_count_bits);
         }

-        public void Unpack ()
+        public byte[] Unpack ()
+        {
+            if (m_info.Version < 2)
+            {
+                m_input.Position = 0xD;
+                m_input.Read (m_output, 0, m_output.Length);
+            }
+            else
+            {
+                Decompress();
+            }
+            if (8 == m_info.BPP)
+            {
+                using (var input = new MemoryStream (m_output, m_output.Length-0x300, 0x300))
+                    Palette = ImageFormat.ReadPalette (input, 0x100, PaletteFormat.Rgb);
+            }
+            return m_output;
+        }
+
+        void Decompress ()
         {
             m_input.Position = 0x11;
             int ctl_length = (m_input.ReadInt32() + 7) / 8;
@@ -117,19 +154,13 @@
                     else
                     {
                         int offset = m_input.ReadUInt16();
-                        int count = (offset & 7) + 1;
-                        offset = (offset >> 3) + 1;
+                        int count = (offset & m_count_mask) + 1;
+                        offset = (offset >> m_count_bits) + 1;
                         Binary.CopyOverlapped (m_output, dst - offset, dst, count);
                         dst += count;
                     }
                 }
             }
         }
-
-        #region IDisposable Members
-        public void Dispose ()
-        {
-        }
-        #endregion
     }
 }


Reenables test for 5.0 on Alpine arm (#2898)

--- tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs
+++ tests/Microsoft.DotNet.Docker.Tests/AspnetImageTests.cs
@@ -24,12 +24,6 @@
         [MemberData(nameof(GetImageData))]
         public async Task VerifyAppScenario(ProductImageData imageData)
         {
-            // Skip test for .NET 5 on Arm32 Alpine 3.13 due to https://github.com/dotnet/runtime/issues/47423
-            if (imageData.Version.Major == 5 && imageData.OS == "alpine3.13" && imageData.Arch == Arch.Arm)
-            {
-                return;
-            }
-
             ImageScenarioVerifier verifier = new ImageScenarioVerifier(imageData, DockerHelper, OutputHelper, isWeb: true);
             await verifier.Execute();
         }


Public method for a custom listing.

Public method for a custom listing.

--- RedditSharp/Reddit.cs
+++ RedditSharp/Reddit.cs
@@ -441,5 +441,17 @@

         #endregion SubredditSearching

+        /// <summary>
+        /// Create a listing from the specified url.  Useful if you want to specify your own "before" and "after" values.
+        /// </summary>
+        /// <typeparam name="T">A <see cref="RedditSharp.Things.Thing"/></typeparam>
+        /// <param name="url">endpoint url.</param>
+        /// <param name="maxLimit">Maximum number of records to retrieve from reddit.</param>
+        /// <param name="limitPerRequest">Maximum number of records to return per request.  This number is endpoint specific.</param>
+        /// <returns></returns>
+        public Listing<T> GetListing<T>(string url, int maxLimit = -1, int limitPerRequest = -1) where T : Thing
+        {
+            return new Listing<T>(this.WebAgent, url, maxLimit, limitPerRequest);
+        }
     }
 }


Remove non necessary check in HtmlAttributes.CopyTo

--- src/Markdig/Renderers/Html/HtmlAttributes.cs
+++ src/Markdig/Renderers/Html/HtmlAttributes.cs
@@ -140,10 +140,6 @@
                 }
                 else
                 {
-                    if (htmlAttributes.Properties == null)
-                    {
-                        htmlAttributes.Properties = new List<KeyValuePair<string, string>>();
-                    }
                     htmlAttributes.Properties.AddRange(Properties);
                 }
             }


Release v1.6.3

Release v1.6.3

--- WebAPI.API/Properties/AssemblyInfo.cs
+++ WebAPI.API/Properties/AssemblyInfo.cs
@@ -18,5 +18,5 @@
 // The following GUID is for the ID of the typelib if this project is exposed to COM

 [assembly: Guid("95a58085-f497-4f79-b1e4-b2422579fb76")]
-[assembly: AssemblyVersion("1.6.2.0")]
-[assembly: AssemblyFileVersion("1.6.2.0")]
+[assembly: AssemblyVersion("1.6.3.0")]
+[assembly: AssemblyFileVersion("1.6.3.0")]