Fix ToolPathResolver to support global tool packages

--- source/Nuke.Common/Tooling/ToolPathResolver.cs
+++ source/Nuke.Common/Tooling/ToolPathResolver.cs
@@ -35,8 +35,36 @@
         {
             ControlFlow.Assert(packageId != null && packageExecutable != null, "packageId != null && packageExecutable != null");

-            var packageIds = packageId.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
-            var packageDirectory = packageIds
+            var packageDirectory = GetPackageDirectory(packageId.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries), version);
+            var packageExecutables = packageExecutable.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
+            var packageExecutablePaths = packageExecutables
+                .Select(x => Directory.GetFiles(packageDirectory, x, SearchOption.AllDirectories))
+                .FirstOrDefault(x => x.Length > 0)?.ToList();
+
+            ControlFlow.Assert(packageExecutablePaths != null,
+                $"Could not find {packageExecutables.Select(x => x.SingleQuote()).JoinCommaOr()} inside '{packageDirectory}'.");
+            if (packageExecutablePaths.Count == 1 && framework == null)
+                return packageExecutablePaths.Single();
+
+            string GetFramework(string file)
+            {
+                var directory = new FileInfo(file).Directory.NotNull();
+                return !directory.Name.EqualsOrdinalIgnoreCase("any")
+                    ? directory.Name
+                    : directory.Parent.NotNull().Name;
+            }
+
+            var frameworks = packageExecutablePaths.ToDictionary(GetFramework,x => x,StringComparer.OrdinalIgnoreCase);
+            ControlFlow.Assert(framework != null && frameworks.ContainsKey(framework),
+                new[] { $"Package executable {frameworks.First().Key.SingleQuote()} [{packageId}] requires a framework:" }
+                    .Concat(frameworks.Keys.Select(x => $" - {x}")).JoinNewLine());
+
+            return frameworks[framework];
+        }
+
+        private static string GetPackageDirectory(string[] packageIds, string version)
+        {
+            return packageIds
                 .SelectMany(x =>
                     new[]
                     {
@@ -77,22 +105,6 @@
                                     ? $"Paket packages config '{PaketPackagesConfigFile}'"
                                     : null
                             }.WhereNotNull().Select(x => $" - {x}")).JoinNewLine());
-
-            var packageExecutables = packageExecutable.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
-            var absolutePackageExecutables = packageExecutables
-                .Select(x => Directory.GetFiles(packageDirectory, x, SearchOption.AllDirectories))
-                .FirstOrDefault(x => x.Length > 0)?.ToList();
-
-            ControlFlow.Assert(absolutePackageExecutables != null,
-                $"Could not find {packageExecutables.Select(x => x.SingleQuote()).Join(", or")} inside '{packageDirectory}'.");
-            if (absolutePackageExecutables.Count == 1 && framework == null)
-                return absolutePackageExecutables.Single();
-
-            var frameworks = absolutePackageExecutables.Select(x => new FileInfo(x).Directory.NotNull().Name).ToList();
-            ControlFlow.Assert(frameworks.Contains(framework, StringComparer.OrdinalIgnoreCase),
-                $"Package executable {packageExecutable} [{packageId}] requires a framework: {frameworks.JoinComma()}");
-
-            return absolutePackageExecutables.Single(x => new FileInfo(x).Directory.NotNull().Name.EqualsOrdinalIgnoreCase(framework));
         }

         public static string GetPathExecutable(string pathExecutable)


Added test for copying storage entries

Added test for copying storage entries

--- sources/Test/OpenMcdf.Test/CompoundFileTest.cs
+++ sources/Test/OpenMcdf.Test/CompoundFileTest.cs
@@ -811,39 +811,82 @@
             }
         }

-            //[TestMethod]
-            //public void Test_CORRUPTED_CYCLIC_DIFAT_VALIDATION_CHECK()
-            //{
-
-            //    CompoundFile cf = null;
-            //    try
-            //    {
-            //        cf = new CompoundFile("CiclycDFAT.cfs");
-            //        CFStorage s = cf.RootStorage.GetStorage("MyStorage");
-            //        CFStream st = s.GetStream("MyStream");
-            //        Assert.IsTrue(st.Size > 0);
-            //    }
-            //    catch (Exception ex)
-            //    {
-            //        Assert.IsTrue(ex is CFCorruptedFileException);
-            //    }
-            //    finally
-            //    {
-            //        if (cf != null)
-            //        {
-            //            cf.Close();
-            //        }
-            //    }
-            //}
-            //[TestMethod]
-            //public void Test_REM()
-            //{
-            //    var f = new CompoundFile();
-
-            //    byte[] bB = Helpers.GetBuffer(5 * 1024, 0x0B);
-            //    f.RootStorage.AddStream("Test").AppendData(bB);
-            //    f.Save("Astorage.cfs");
-            //}
-
-        }
+        [TestMethod]
+        public void Test_COPY_ENTRIES_FROM_TO_STORAGE()
+        {
+            CompoundFile cfDst = new CompoundFile();
+            CompoundFile cfSrc = new CompoundFile("MultipleStorage4.cfs");
+
+            Copy(cfSrc.RootStorage, cfDst.RootStorage);
+
+            cfDst.Save("MultipleStorage4Copy.cfs");
+
+            cfDst.Close();
+            cfSrc.Close();
+
+        }
+
+        #region Copy heper method
+            /// <summary>
+            /// Copies the given <paramref name="source"/> to the given <paramref name="destination"/>
+            /// </summary>
+            /// <param name="source"></param>
+            /// <param name="destination"></param>
+        public static void Copy(CFStorage source, CFStorage destination)
+        {
+            source.VisitEntries(action =>
+            {
+                if (action.IsStorage)
+                {
+                    var destionationStorage = destination.AddStorage(action.Name);
+                    destionationStorage.CLSID = action.CLSID;
+                    destionationStorage.CreationDate = action.CreationDate;
+                    destionationStorage.ModifyDate = action.ModifyDate;
+                    Copy(action as CFStorage, destionationStorage);
+                }
+                else
+                {
+                    var sourceStream = action as CFStream;
+                    var destinationStream = destination.AddStream(action.Name);
+                    if (sourceStream != null) destinationStream.SetData(sourceStream.GetData());
+                }
+
+            }, false);
+        }
+        #endregion
+        //[TestMethod]
+        //public void Test_CORRUPTED_CYCLIC_DIFAT_VALIDATION_CHECK()
+        //{
+
+        //    CompoundFile cf = null;
+        //    try
+        //    {
+        //        cf = new CompoundFile("CiclycDFAT.cfs");
+        //        CFStorage s = cf.RootStorage.GetStorage("MyStorage");
+        //        CFStream st = s.GetStream("MyStream");
+        //        Assert.IsTrue(st.Size > 0);
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        Assert.IsTrue(ex is CFCorruptedFileException);
+        //    }
+        //    finally
+        //    {
+        //        if (cf != null)
+        //        {
+        //            cf.Close();
+        //        }
+        //    }
+        //}
+        //[TestMethod]
+        //public void Test_REM()
+        //{
+        //    var f = new CompoundFile();
+
+        //    byte[] bB = Helpers.GetBuffer(5 * 1024, 0x0B);
+        //    f.RootStorage.AddStream("Test").AppendData(bB);
+        //    f.Save("Astorage.cfs");
+        //}
+
+    }
 }


Updated to fix issue with RequireLicenceAcceptance

Updated to fix issue with RequireLicenceAcceptance


Render avatar using all image layers

Render avatar using all image layers

--- MonoHaven.Client/Graphics/Avatar.cs
+++ MonoHaven.Client/Graphics/Avatar.cs
@@ -12,8 +12,7 @@
 		public Avatar(IEnumerable<Resource> layers)
 		{
 			var images = layers
-				.Select(x => x.GetLayer<ImageData>())
-				.Where(x => x != null)
+				.SelectMany(x => x.GetLayers<ImageData>())
 				.OrderBy(x => x.Z);
 			tex = new Texture(ImageUtils.Combine(images));
 			Width = tex.Width;


Switch the split button for a regular button (manually)

--- MultiMiner.Win/MainForm.Designer.cs
+++ MultiMiner.Win/MainForm.Designer.cs
@@ -124,7 +124,7 @@
             this.coinChooseLinkLabel = new System.Windows.Forms.LinkLabel();
             this.coinChoosePrefixLabel = new System.Windows.Forms.Label();
             this.statusStrip1 = new System.Windows.Forms.StatusStrip();
-            this.detailsToggleButton = new System.Windows.Forms.ToolStripSplitButton();
+            this.detailsToggleButton = new System.Windows.Forms.ToolStripButton();
             this.strategiesLabel = new System.Windows.Forms.ToolStripStatusLabel();
             this.strategyCountdownLabel = new System.Windows.Forms.ToolStripStatusLabel();
             this.sha256RateLabel = new System.Windows.Forms.ToolStripStatusLabel();
@@ -944,13 +944,12 @@
             // detailsToggleButton
             //
             this.detailsToggleButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
-            this.detailsToggleButton.DropDownButtonWidth = 0;
             this.detailsToggleButton.Image = ((System.Drawing.Image)(resources.GetObject("detailsToggleButton.Image")));
             this.detailsToggleButton.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.detailsToggleButton.Name = "detailsToggleButton";
-            this.detailsToggleButton.Size = new System.Drawing.Size(93, 20);
+            this.detailsToggleButton.Size = new System.Drawing.Size(92, 20);
             this.detailsToggleButton.Text = "▾ Fewer details";
-            this.detailsToggleButton.ButtonClick += new System.EventHandler(this.detailsToggleButton_ButtonClick);
+            this.detailsToggleButton.Click += new System.EventHandler(this.detailsToggleButton_ButtonClick);
             //
             // strategiesLabel
             //
@@ -1433,7 +1432,7 @@
         private System.Windows.Forms.ToolStripMenuItem strategiesToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
         private System.Windows.Forms.ToolStripMenuItem dummyToolStripMenuItem1;
-        private System.Windows.Forms.ToolStripSplitButton detailsToggleButton;
+        private System.Windows.Forms.ToolStripButton detailsToggleButton;
         private System.Windows.Forms.ContextMenuStrip quickCoinMenu;
         private System.Windows.Forms.ImageList largeImageList;
         private System.Windows.Forms.ImageList smallImageList;


Make Hex encoder more efficient of span available (less work for GC)

--- NBitcoin/DataEncoders/HexEncoder.cs
+++ NBitcoin/DataEncoders/HexEncoder.cs
@@ -21,6 +21,8 @@

 			int pos = 0;
 			var spaces = (Space ? Math.Max((count - 1), 0) : 0);
+
+#if !HAS_SPAN
 			var s = new char[2 * count + spaces];
 			for(var i = offset; i < offset + count; i++)
 			{
@@ -31,7 +33,25 @@
 				s[pos++] = c[1];
 			}
 			return new string(s);
+#else
+			return string.Create(2 * count + spaces, (offset, count, data), CreateHexString);
+#endif
 		}
+
+#if HAS_SPAN
+		void CreateHexString(Span<char> s, (int offset, int count, byte[] data) state)
+		{
+			int pos = 0;
+			for (var i = state.offset; i < state.offset + state.count; i++)
+			{
+				if (Space && i != 0)
+					s[pos++] = ' ';
+				var c = HexTbl[state.data[i]];
+				s[pos++] = c[0];
+				s[pos++] = c[1];
+			}
+		}
+#endif

 		public override byte[] DecodeData(string encoded)
 		{
@@ -41,7 +61,7 @@
 				throw new FormatException("Invalid Hex String");

 			var result = new byte[encoded.Length / 2];
-			for(int i = 0, j = 0; i < encoded.Length; i += 2, j++)
+			for (int i = 0, j = 0; i < encoded.Length; i += 2, j++)
 			{
 				var a = IsDigit(encoded[i]);
 				var b = IsDigit(encoded[i + 1]);


Fix error runnig samples when stdout is redirected

--- eg/Program.cs
+++ eg/Program.cs
@@ -37,8 +37,8 @@
         {
             System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);

-            var ruler1 = new string('=', Console.BufferWidth - 1);
-            var ruler2 = new string('-', Console.BufferWidth - 1);
+            var ruler1 = new string('=', Console.IsOutputRedirected ? 78 : Console.BufferWidth - 1);
+            var ruler2 = new string('-', ruler1.Length);

             var samples =
                 from s in new[]


More delay before rescans

More delay before rescans

--- fsserver/Server.cs
+++ fsserver/Server.cs
@@ -13,7 +13,7 @@
   public sealed class FileServer : Logging, IMediaServer, IVolatileMediaServer
   {

-    private readonly Timer changeTimer = new Timer(2000);
+    private readonly Timer changeTimer = new Timer(20000);
     private Comparers.IItemComparer comparer = new Comparers.TitleComparer();
     private bool descending = false;
     private readonly DirectoryInfo directory;


Added auto-guessing logic to the backend manager so it can guess if the user forgot to specify encryption module. This fixes #1447.

--- Duplicati/Library/Main/BackendManager.cs
+++ Duplicati/Library/Main/BackendManager.cs
@@ -707,7 +707,35 @@
                             {
                             	tmpfile = new Library.Utility.TempFile();
                                 lock(m_encryptionLock)
-                            	    m_encryption.Decrypt(tmpfile2, tmpfile);
+                                {
+                                    // Auto-guess the encryption module
+                                    var ext = (System.IO.Path.GetExtension(item.RemoteFilename) ?? "").TrimStart('.');
+                                    if (!m_encryption.FilenameExtension.Equals(ext, StringComparison.InvariantCultureIgnoreCase))
+                                    {
+                                        // Check if the file is encrypted with something else
+                                        if (DynamicLoader.EncryptionLoader.Keys.Contains(ext, StringComparer.InvariantCultureIgnoreCase))
+                                        {
+                                            m_statwriter.AddVerboseMessage("Filename extension \"{0}\" does not match encryption module \"{1}\", using matching encryption module", ext, m_options.EncryptionModule);
+                                            using(var encmodule = DynamicLoader.EncryptionLoader.GetModule(ext, m_options.Passphrase, m_options.RawOptions))
+                                                (encmodule ?? m_encryption).Decrypt(tmpfile2, tmpfile);
+                                        }
+                                        // Check if the file is not encrypted
+                                        else if (DynamicLoader.CompressionLoader.Keys.Contains(ext, StringComparer.InvariantCultureIgnoreCase))
+                                        {
+                                            m_statwriter.AddVerboseMessage("Filename extension \"{0}\" does not match encryption module \"{1}\", guessing that it is not encrypted", ext, m_options.EncryptionModule);
+                                        }
+                                        // Fallback, lets see what happens...
+                                        else
+                                        {
+                                            m_statwriter.AddVerboseMessage("Filename extension \"{0}\" does not match encryption module \"{1}\", attempting to use specified encryption module as no others match", ext, m_options.EncryptionModule);
+                                            m_encryption.Decrypt(tmpfile2, tmpfile);
+                                        }
+                                    }
+                                    else
+                                    {
+                                	    m_encryption.Decrypt(tmpfile2, tmpfile);
+                                    }
+                                }
                             }
                         }
                         catch (Exception ex)


Fix calls to prompt() to detect cancellations.

--- src/IntelliTect.Coalesce.CodeGeneration/Templates/KoViewModel.cshtml
+++ src/IntelliTect.Coalesce.CodeGeneration/Templates/KoViewModel.cshtml
@@ -250,9 +250,13 @@
         @:public @method.JsVariableWasSuccessful: KnockoutObservable<boolean> = ko.observable(null);
         @:/** Presents a series of input boxes to call the server method (@method.Name) */
         @:public @method.JsVariableUi = (callback: () => void = null, reload: boolean = true): JQueryPromise<any> => {
+            @:var $promptVal: string = null;
         @foreach (var param in method.ClientParameters.Where(f => f.ConvertsFromJsString))
         {
-            @:var @param.Name: @param.Type.TsType = @param.Type.TsConvertFromString($"prompt('{param.Name.ToProperCase()}')");
+            @:$promptVal = @($"prompt('{param.Name.ToProperCase()}')");
+            @:if ($promptVal === null) return;
+            @:var @param.Name: @param.Type.TsType = @param.Type.TsConvertFromString("$promptVal");
+            @:
         }
         @foreach (var param in method.ClientParameters.Where(f => !f.ConvertsFromJsString))
         {


Fixes issue #382

Fixes issue #382

--- src/Markup/Perspex.Markup/Data/Plugins/InpcPropertyAccessorPlugin.cs
+++ src/Markup/Perspex.Markup/Data/Plugins/InpcPropertyAccessorPlugin.cs
@@ -3,6 +3,7 @@

 using System;
 using System.ComponentModel;
+using System.Linq;
 using System.Reactive.Linq;
 using System.Reflection;

@@ -42,7 +43,7 @@
             Contract.Requires<ArgumentNullException>(propertyName != null);
             Contract.Requires<ArgumentNullException>(changed != null);

-            var p = instance.GetType().GetRuntimeProperty(propertyName);
+            var p = instance.GetType().GetRuntimeProperties().First(_ => _.Name == propertyName);

             if (p != null)
             {


Fixed #1673 - PrefetchCount for ActiveMQ consumers.

--- src/MassTransit.ActiveMqTransport/Pipeline/ActiveMqConsumerFilter.cs
+++ src/MassTransit.ActiveMqTransport/Pipeline/ActiveMqConsumerFilter.cs
@@ -39,10 +39,11 @@

             List<Task<ActiveMqBasicConsumer>> consumers = new List<Task<ActiveMqBasicConsumer>>
             {
-                CreateConsumer(context, receiveSettings.EntityName, receiveSettings.Selector)
+                CreateConsumer(context, receiveSettings.EntityName, receiveSettings.Selector, receiveSettings.PrefetchCount)
             };

-            consumers.AddRange(_context.BrokerTopology.Consumers.Select(x => CreateConsumer(context, x.Destination.EntityName, x.Selector)));
+            consumers.AddRange(_context.BrokerTopology.Consumers.Select(x =>
+                CreateConsumer(context, x.Destination.EntityName, x.Selector, receiveSettings.PrefetchCount)));

             var actualConsumers = await Task.WhenAll(consumers).ConfigureAwait(false);

@@ -93,11 +94,15 @@
             return supervisor;
         }

-        async Task<ActiveMqBasicConsumer> CreateConsumer(SessionContext context, string entityName, string selector)
+        async Task<ActiveMqBasicConsumer> CreateConsumer(SessionContext context, string entityName, string selector, ushort prefetchCount)
         {
-            var queue = await context.GetQueue(entityName).ConfigureAwait(false);
+            string queueName = $"{entityName}?consumer.prefetchSize={prefetchCount}";
+
+            var queue = await context.GetQueue(queueName).ConfigureAwait(false);

             var messageConsumer = await context.CreateMessageConsumer(queue, selector, false).ConfigureAwait(false);
+
+            LogContext.Debug?.Log("Created consumer for {InputAddress}: {Queue}", _context.InputAddress, queueName);

             var consumer = new ActiveMqBasicConsumer(context, messageConsumer, _context.InputAddress, _context);


Updated feed URL for Orchard gallery.

Updated feed URL for Orchard gallery.

Fixes #6289

--- src/Orchard.Web/Modules/Orchard.Packaging/DefaultPackagingUpdater.cs
+++ src/Orchard.Web/Modules/Orchard.Packaging/DefaultPackagingUpdater.cs
@@ -20,7 +20,7 @@

         public void Installed(Feature feature) {
             if (feature.Descriptor.Id == "Gallery") {
-                _packagingSourceManager.AddSource("Orchard Gallery", "http://packages.orchardproject.net/FeedService.svc");
+                _packagingSourceManager.AddSource("Orchard Gallery", "https://gallery.orchardproject.net/api/FeedService");
             }
         }

@@ -42,4 +42,4 @@
         public void Uninstalled(Feature feature) {
         }
     }
-}+}


#19204: Removed "would you like to add a widget layer" message for users without ManageWidgets permission.

Work Item: 19204

--HG--
branch : 1.x
extra : rebase_source : 786bb05acd4a9e6f0da1884a0a3cc29c0241df44

--- src/Orchard.Web/Modules/Orchard.Widgets/Handlers/LayerHintHandler.cs
+++ src/Orchard.Web/Modules/Orchard.Widgets/Handlers/LayerHintHandler.cs
@@ -32,6 +32,9 @@
             if (content.ContentItem.ContentType != "Page")
                 return;

+            if (!Services.Authorizer.Authorize(Permissions.ManageWidgets))
+                return;
+
             var urlHelper = new UrlHelper(_requestContext);
             var pathForLayer = "~/" + path;
             var title = content.ContentItem.ContentManager.GetItemMetadata(content).DisplayText;


fixing NavigationService to be resolvable by the Container.

--- src/Prism.Plugin.Popups.Autofac/AutofacPopupPageNavigationService.cs
+++ src/Prism.Plugin.Popups.Autofac/AutofacPopupPageNavigationService.cs
@@ -8,17 +8,17 @@
 {
     public class AutofacPopupPageNavigationService : PopupPageNavigationServiceBase
     {
-        IContainer _container { get; }
+        IComponentContext _context { get; }

-        public AutofacPopupPageNavigationService( IPopupNavigation popupNavigation, IApplicationProvider applicationProvider, ILoggerFacade logger, IContainer container )
+        public AutofacPopupPageNavigationService( IPopupNavigation popupNavigation, IApplicationProvider applicationProvider, ILoggerFacade logger, IComponentContext context )
             : base( popupNavigation, applicationProvider, logger )
         {
-            _container = container;
+            _context = context;
         }

         protected override Page CreatePage(string segmentName)
         {
-            return _container.ResolveNamed<object>(segmentName) as Page;
+            return _context.ResolveNamed<object>(segmentName) as Page;
         }
     }
 }


AppVeyor still fails

AppVeyor still fails

--- src/ServiceBus.AttachmentPlugin.Tests/AzureStorageEmulatorFixture.cs
+++ src/ServiceBus.AttachmentPlugin.Tests/AzureStorageEmulatorFixture.cs
@@ -10,7 +10,7 @@
             AzureStorageEmulatorManager.StartStorageEmulator();
             // Emulator is not started fast enough on AppVeyor
             // Microsoft.WindowsAzure.Storage.StorageException : Unable to connect to the remote server
-            Thread.Sleep(100);
+            Thread.Sleep(1000);
         }

         public void Dispose()


Remove redundant comments.

Remove redundant comments.

--- src/TestClients/IdentityTestClient/GuestAuthToFacebookAuthCommand.cs
+++ src/TestClients/IdentityTestClient/GuestAuthToFacebookAuthCommand.cs
@@ -75,13 +75,6 @@
             Console.WriteLine(tokenResponse.Json);
             Console.WriteLine("\n\n");

-            //var requestBody = new FormUrlEncodedContent(
-            //     new Dictionary<string, string>
-            //     {
-            //            { "FacebookToken", facebookToken}
-            //     }
-            // );
-
             var payload = new
             {
                 FacebookToken = facebookToken
@@ -89,9 +82,6 @@

             var client = new HttpClient();
             client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenResponse.AccessToken);
-
-            //client.DefaultRequestHeaders.Accept.Clear();
-            //client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

             var response = await client.PostAsJsonAsync($"{Application.ApiRootUrl}user/logins/facebook", payload);
             Console.WriteLine(response);


Update Expression serialization tests

Update Expression serialization tests

--- Editor/Tests/Engine/SerializationTest.cs
+++ Editor/Tests/Engine/SerializationTest.cs
@@ -30,6 +30,45 @@
 		}

 		/// <summary>
+		/// Ensure BoolAnd expressions are serialized properly.
+		/// </summary>
+		[Test]
+		public void SerializeBoolAndExpression()
+		{
+			var num = new LiteralExpression(1);
+			var a = new BoolAndExpression(num, num);
+			var b = Reserialize(a);
+
+			Assert.AreEqual(a, b);
+		}
+
+		/// <summary>
+		/// Ensure BoolOr expressions are serialized properly.
+		/// </summary>
+		[Test]
+		public void SerializeBoolOrExpression()
+		{
+			var num = new LiteralExpression(1);
+			var a = new BoolOrExpression(num, num);
+			var b = Reserialize(a);
+
+			Assert.AreEqual(a, b);
+		}
+
+		/// <summary>
+		/// Ensure BoolXor expressions are serialized properly.
+		/// </summary>
+		[Test]
+		public void SerializeBoolXorExpression()
+		{
+			var num = new LiteralExpression(1);
+			var a = new BoolXorExpression(num, num);
+			var b = Reserialize(a);
+
+			Assert.AreEqual(a, b);
+		}
+
+		/// <summary>
 		/// Ensure Divide expressions are serialized properly.
 		/// </summary>
 		[Test]
@@ -37,6 +76,19 @@
 		{
 			var num = new LiteralExpression(1);
 			var a = new DivideExpression(num, num);
+			var b = Reserialize(a);
+
+			Assert.AreEqual(a, b);
+		}
+
+		/// <summary>
+		/// Ensure Equals expressions are serialized properly.
+		/// </summary>
+		[Test]
+		public void SerializeEqualsExpression()
+		{
+			var num = new LiteralExpression(1);
+			var a = new EqualsExpression(num, num);
 			var b = Reserialize(a);

 			Assert.AreEqual(a, b);
@@ -81,6 +133,19 @@
 		public void SerializeNoOpExpression()
 		{
 			var a = new NoOpExpression();
+			var b = Reserialize(a);
+
+			Assert.AreEqual(a, b);
+		}
+
+		/// <summary>
+		/// Ensure NotEquals expressions are serialized properly.
+		/// </summary>
+		[Test]
+		public void SerializeNotEqualsExpression()
+		{
+			var num = new LiteralExpression(1);
+			var a = new NotEqualsExpression(num, num);
 			var b = Reserialize(a);

 			Assert.AreEqual(a, b);
@@ -128,6 +193,10 @@
 			Assert.AreEqual(a, b);

 			a = new StringValue("1");
+			b = Reserialize(a);
+			Assert.AreEqual(a, b);
+
+			a = new BoolValue(true);
 			b = Reserialize(a);
 			Assert.AreEqual(a, b);
 		}


wrong interface being used (duh)

wrong interface being used (duh)

--- source/Core/Configuration/IdentityServerServiceFactory.cs
+++ source/Core/Configuration/IdentityServerServiceFactory.cs
@@ -20,7 +20,7 @@
         public Func<IConsentService> ConsentService { get; set; }

         // optional
-        public Func<ITokenHandleStore> AssertionGrantValidator { get; set; }
+        public Func<IAssertionGrantValidator> AssertionGrantValidator { get; set; }
         public Func<ICustomRequestValidator> CustomRequestValidator { get; set; }
         public Func<IClaimsProvider> ClaimsProvider { get; set; }
         public Func<ITokenService> TokenService { get; set; }


Adds the shared option to the File sink to avoid file locking & if app restarts we don't get _001 or _002 files etc

--- src/Umbraco.Core/Logging/SerilogExtensions/LoggerConfigExtensions.cs
+++ src/Umbraco.Core/Logging/SerilogExtensions/LoggerConfigExtensions.cs
@@ -45,6 +45,7 @@
             //Main .txt logfile - in similar format to older Log4Net output
             //Ends with ..txt as Date is inserted before file extension substring
             logConfig.WriteTo.File($@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.{Environment.MachineName}..txt",
+                    shared: true,
                     rollingInterval: RollingInterval.Day,
                     restrictedToMinimumLevel: minimumLevel,
                     retainedFileCountLimit: null, //Setting to null means we keep all files - default is 31 days
@@ -64,6 +65,7 @@
             //.clef format (Compact log event format, that can be imported into local SEQ & will make searching/filtering logs easier)
             //Ends with ..txt as Date is inserted before file extension substring
             logConfig.WriteTo.File(new CompactJsonFormatter(), $@"{AppDomain.CurrentDomain.BaseDirectory}\App_Data\Logs\UmbracoTraceLog.{Environment.MachineName}..json",
+                shared: true,
                 rollingInterval: RollingInterval.Day, //Create a new JSON file every day
                 retainedFileCountLimit: retainedFileCount, //Setting to null means we keep all files - default is 31 days
                 restrictedToMinimumLevel: minimumLevel);


Added v10 interfaces

Added v10 interfaces

--- src/Wave.Extensions.Esri/ESRI/ArcGIS/BaseClasses/BaseContentsView.cs
+++ src/Wave.Extensions.Esri/ESRI/ArcGIS/BaseClasses/BaseContentsView.cs
@@ -3,6 +3,7 @@
 using ESRI.ArcGIS.ADF.CATIDs;
 using ESRI.ArcGIS.ArcMapUI;
 using ESRI.ArcGIS.SystemUI;
+using ESRI.ArcGIS.Framework;

 namespace ESRI.ArcGIS.BaseClasses
 {
@@ -10,10 +11,17 @@
     ///     An abstract class used to create a contents view in the Table of Contents in ArcMap.
     /// </summary>
     [ComVisible(true)]
-    public abstract class BaseContentsView : IContentsView, IComPropertySheetEvents
+    public abstract class BaseContentsView : IComPropertySheetEvents
+#if V10
+        , IContentsView3
+#else
+        , IContentsView
+        , IContentsView2
+#endif
     {
         #region Constructors

+#if !V10
         /// <summary>
         ///     Initializes a new instance of the <see cref="BaseContentsView" /> class.
         /// </summary>
@@ -23,6 +31,19 @@
             this.Name = name;
         }

+#else
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="BaseContentsView" /> class.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <param name="toolTip">The tool tip.</param>
+        protected BaseContentsView(string name, string toolTip)
+        {
+            this.Name = name;
+            this.Tooltip = toolTip;
+        }
+#endif
+
         #endregion

         #region IComPropertySheetEvents Members
@@ -36,7 +57,7 @@

         #endregion

-        #region IContentsView Members
+        #region IContentsView2 Members

         /// <summary>
         ///     Gets or sets the context item (could be an enumerator).
@@ -99,6 +120,15 @@
         }

         /// <summary>
+        ///     Activates the contents view.
+        /// </summary>
+        /// <param name="parentHWnd">The parent window handle.</param>
+        /// <param name="document">The document.</param>
+        public virtual void BasicActivate(int parentHWnd, IDocument document)
+        {
+        }
+
+        /// <summary>
         ///     Adds to the selected items.
         /// </summary>
         /// <param name="item">The item.</param>
@@ -154,5 +184,20 @@
         }

         #endregion
+#if V10
+        #region IContentsView3 Members
+
+        /// <summary>
+        ///     Bitmap shown in Table Of Contents window toolbar.
+        /// </summary>
+        public abstract int Bitmap { get; }
+
+        /// <summary>
+        ///     The tool tip for the table of contents window.
+        /// </summary>
+        public string Tooltip { get; protected set; }
+
+        #endregion
+#endif
     }
 }


Remove method.

Remove method.

--- src/Workspaces/CSharp/Portable/CodeGeneration/ExpressionGenerator.cs
+++ src/Workspaces/CSharp/Portable/CodeGeneration/ExpressionGenerator.cs
@@ -97,8 +97,6 @@
                 : (ExpressionSyntax)CSharpSyntaxGenerator.Instance.DefaultExpression(type);
         }

-        private static bool FalsePredicate<T>() => false;
-
         private static ExpressionSyntax GenerateBooleanLiteralExpression(bool val)
         {
             return SyntaxFactory.LiteralExpression(val


Implement ISpan with JsonSyntax.

Implement ISpan with JsonSyntax.

--- Eutherion/Shared/Text/Json/JsonSyntax.cs
+++ Eutherion/Shared/Text/Json/JsonSyntax.cs
@@ -24,7 +24,11 @@
     /// <summary>
     /// Represents a context sensitive node in an abstract json syntax tree.
     /// </summary>
-    public abstract class JsonSyntax
+    public abstract class JsonSyntax : ISpan
     {
+        /// <summary>
+        /// Gets the length of the text span corresponding with this node.
+        /// </summary>
+        public abstract int Length { get; }
     }
 }


Removing useless setter for ToolTip

Removing useless setter for ToolTip

--- Fluent.Ribbon/Controls/RibbonGroupBox.cs
+++ Fluent.Ribbon/Controls/RibbonGroupBox.cs
@@ -627,8 +627,6 @@
         /// </summary>
         public RibbonGroupBox()
         {
-            this.ToolTip = new ToolTip();
-            ((ToolTip)this.ToolTip).Template = null;
             this.CoerceValue(ContextMenuProperty);
             this.Focusable = false;


mute som with debuf

mute som with debuf

--- Focus/Assets/Resources/Scripts/EvtSom.cs
+++ Focus/Assets/Resources/Scripts/EvtSom.cs
@@ -36,6 +36,7 @@
                     isActiveDebuf = false;
                     indexCurSlot = i;
                     isActiveDebuf = true;
+                    mySom.mute = true;
                     break;
                 }
             }
@@ -43,16 +44,18 @@
 			if (Vector3.Distance (transform.position, player.transform.position) < distToAct/3) {
                 if (isActiveDebuf)
                     Inventory.instance.itemSlot[indexCurSlot].Removed();
-
+                mySom.mute = false;
                 //GetComponent<SpriteRenderer> ().enabled = true;
                 SpawnOne spawn = GetComponent<SpawnOne>();
                 spawn.enabled = true;
 			} else if (Vector3.Distance (transform.position, player.transform.position) < distToAct/2 && !isActiveDebuf) {
-				//GetComponent<SpriteRenderer> ().enabled = false;
+                mySom.mute = false;
+                //GetComponent<SpriteRenderer> ().enabled = false;
                 SpawnOne spawn = GetComponent<SpawnOne>();
                 spawn.enabled = false;
 			} else if (Vector3.Distance (transform.position, player.transform.position) < distToAct && !isActiveDebuf) {
-				//GetComponent<SpriteRenderer> ().enabled = false;
+                mySom.mute = false;
+                //GetComponent<SpriteRenderer> ().enabled = false;
                 SpawnOne spawn = GetComponent<SpawnOne>();
                 spawn.enabled = false;
             }


Tweaks to TagDictionary creation

Tweaks to TagDictionary creation

--- src/15below.Deployment.Update/TagDictionary.cs
+++ src/15below.Deployment.Update/TagDictionary.cs
@@ -25,44 +25,28 @@

         private TagDictionary(string identifier, bool isLabel, params Tuple<string, TagSource>[] sources)
         {
-            if (sources.Length == 0)
-            {
-                sources = new[] { Tuple.Create("", TagSource.Environment) };
-            }
-            else if (sources.Any(x => x.Item2 == TagSource.XmlFileName))
-            {
-                //convert xmlFileName to be xmlData
-                var newSources = new List<Tuple<string, TagSource>>();
-                newSources.AddRange(sources.Where(x => x.Item2 == TagSource.Environment || x.Item2 == TagSource.XmlData));
-
-                foreach (var source in sources.Where(x => x.Item2 == TagSource.XmlFileName))
-                {
-                    XDocument doc;
-                    try
-                    {
-                        doc = XDocument.Load(new FileStream(source.Item1, FileMode.Open, FileAccess.Read));
-                    }
-                    catch (Exception)
-                    {
-                        doc = new XDocument();
-                    }
-
-                    newSources.Add(new Tuple<string, TagSource>(doc.ToString(), TagSource.XmlData));
-                }
-
-                sources = newSources.ToArray();
-            }
+            sources = FixSources(sources);

             //Load environment 1st
             if (sources.Any(x => x.Item2 == TagSource.Environment))
             {
-                LoadEnviroment();
+                LoadEnvironment();
             }

             //Load by xml data 2nd
             foreach (var source in sources.Where(x => x.Item2 == TagSource.XmlData))
             {
-                LoadXmlData(source.Item1, identifier);
+                if (string.IsNullOrEmpty(source.Item1)) return;
+                XDocument doc;
+                try
+                {
+                    doc = XDocument.Parse(source.Item1);
+                }
+                catch (Exception)
+                {
+                    doc = new XDocument();
+                }
+                PropertiesFromXml(identifier, doc);
             }

             if (ContainsKey("Environment") && ((string)this["Environment"]).StartsWith("DR-"))
@@ -115,34 +99,47 @@
             }
         }

-        private void LoadXmlData(string xml, string identifier)
-        {
-            if (string.IsNullOrEmpty(xml)) return;
-            XDocument doc;
-            try
-            {
-                doc = XDocument.Parse(xml);
-            }
-            catch (Exception)
-            {
-                doc = new XDocument();
-            }
-            PropertiesFromXml(identifier, doc);
-        }
-
-        private static Tuple<string, string> GetTagInPropertyValue(XDocument doc, string propName)
-        {
-            var xEl = doc.XPathSelectElement(string.Format("Structure/{0}", propName)) ?? doc.XPathSelectElements("/Structure/Properties/Property").FirstOrDefault(el => el.Attribute("name").Value == propName);
-            return Tuple.Create(propName, xEl == null ? "" : xEl.Value);
+        private static Tuple<string, TagSource>[] FixSources(Tuple<string, TagSource>[] sources)
+        {
+            if (sources.Length == 0)
+            {
+                sources = new[] {Tuple.Create("", TagSource.Environment)};
+            }
+            else if (sources.Any(x => x.Item2 == TagSource.XmlFileName))
+            {
+                //convert xmlFileName to be xmlData
+                var newSources = new List<Tuple<string, TagSource>>();
+                newSources.AddRange(sources.Where(x => x.Item2 == TagSource.Environment || x.Item2 == TagSource.XmlData));
+
+                foreach (var source in sources.Where(x => x.Item2 == TagSource.XmlFileName))
+                {
+                    XDocument doc;
+                    try
+                    {
+                        doc = XDocument.Load(new FileStream(source.Item1, FileMode.Open, FileAccess.Read));
+                    }
+                    catch (Exception)
+                    {
+                        doc = new XDocument();
+                    }
+
+                    newSources.Add(new Tuple<string, TagSource>(doc.ToString(), TagSource.XmlData));
+                }
+
+                sources = newSources.ToArray();
+            }
+            return sources;
         }

         private void PropertiesFromXml(string identifier, XDocument doc)
         {
             if (!string.IsNullOrEmpty(identifier)) AddOrDiscard("identity", identifier);

-            validTagsInProperties.Select(str => GetTagInPropertyValue(doc, str))
-                                 .ToList()
-                                 .ForEach(tuple => AddOrDiscard(tuple.Item1, tuple.Item2));
+            var environmentNode = doc.XPathSelectElement("/Structure/Environment");
+            if(environmentNode != null) AddOrDiscard("Environment", environmentNode.Value);
+
+            var clientCode = doc.XPathSelectElement("/Structure/ClientCode");
+            if (clientCode != null) AddOrDiscard("ClientCode", clientCode.Value);

             var matchingGroupProperties = doc.XPathSelectElements("/Structure/PropertyGroups/PropertyGroup")
                                              .Where(p => p.Name == "PropertyGroup")
@@ -234,15 +231,20 @@
                                             .Replace("tagClientCode", "{{ ClientCode }}")
                                             .Replace("tagEnvironment", "{{ Environment }}");

-            return djangoStyleValue.RenderTemplate(propertyTagDictionary);
-        }
-
-        private void LoadEnviroment()
+            if (djangoStyleValue.Contains("{"))
+            {
+                return djangoStyleValue.RenderTemplate(propertyTagDictionary);
+            }
+
+            return baseValue;
+        }
+
+        private void LoadEnvironment()
         {
             var env = Environment.GetEnvironmentVariables();
-            foreach (var key in env.Keys)
-            {
-                var wantedKey = key.ToString();
+            foreach (string key in env.Keys)
+            {
+                var wantedKey = key;
                 if (wantedKey.StartsWith("Octopus"))
                 {
                     wantedKey = GetOctopusVariable(wantedKey);


Added the variable name to Exception constructor

--- GitSharp.Core/Util/EndianBitConverter.cs
+++ GitSharp.Core/Util/EndianBitConverter.cs
@@ -547,7 +547,7 @@
 			}
 			if (buffer.Length < index+bytes)
 			{
-				throw new ArgumentOutOfRangeException("Buffer not big enough for value");
+				throw new ArgumentOutOfRangeException("buffer","Buffer not big enough for value");
 			}
 			CopyBytesImpl(value, bytes, buffer, index);
 		}


[Ses] Improve tests

[Ses] Improve tests

--- src/Amazon.Ses.Tests/NotificationTests.cs
+++ src/Amazon.Ses.Tests/NotificationTests.cs
@@ -1,12 +1,13 @@
-
-using Xunit;
+using Xunit;

-using Carbon.Json;
+using System.Text.Json;

 namespace Amazon.Ses.Tests
 {
     public class NotificationTests
     {
+        private static readonly JsonSerializerOptions jso = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
+
         [Fact]
         public void ParseComplaint()
         {
@@ -34,12 +35,17 @@
 			  }
 		   }";

-            var notification = JsonObject.Parse(text).As<SesNotification>();
+            var notification = JsonSerializer.Deserialize<SesNotification>(text, jso);

             Assert.Equal(SesNotificationType.Complaint, notification.NotificationType);
+            Assert.Equal(2012, notification.Complaint.Timestamp.Year);
+            Assert.Equal(-7, notification.Complaint.Timestamp.Offset.Hours);
+
+            Assert.Equal(4, notification.Mail.Destination.Length);

             Assert.Equal("recipient1@example.com", notification.Mail.Destination[0]);
             Assert.Equal("recipient1@example.com", notification.Complaint.ComplainedRecipients[0].EmailAddress);
+

             Assert.Equal("0000013786031775-163e3910-53eb-4c8e-a04a-f29debf88a84-000000", notification.Mail.MessageId);
         }
@@ -49,12 +55,12 @@
         {
             var text = @"{""notificationType"":""Bounce"",""bounce"":{""bounceSubType"":""Suppressed"",""bounceType"":""Permanent"",""bouncedRecipients"":[{""action"":""failed"",""diagnosticCode"":""Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. For more information about how to remove an address from the suppression list, see the Amazon SES Developer Guide: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/remove-from-suppressionlist.html"",""status"":""5.1.1"",""emailAddress"":""hi@simulator.amazonses.com""}],""reportingMTA"":""dns; amazonses.com"",""timestamp"":""2014-01-14T07:24:56.332Z"",""feedbackId"":""000001438fa38a49-f7cb046b-7cec-11e3-b22a-31634d3963ed-000000""},""mail"":{""timestamp"":""2014-01-14T07:24:53.000Z"",""destination"":[""hi@simulator.amazonses.com""],""messageId"":""000001438fa37fa1-08180675-1d15-4bfc-b388-3b71a75f5a31-000000"",""source"":""hello@carbonmade.com""}}";

-            var notification = JsonObject.Parse(text).As<SesNotification>();
+            var notification = JsonSerializer.Deserialize<SesNotification>(text, jso);

             Assert.Equal(SesNotificationType.Bounce, notification.NotificationType);

             Assert.Equal(SesBounceType.Permanent, notification.Bounce.BounceType);
-            Assert.Equal(SesBounceSubtype.Suppressed, notification.Bounce.BounceSubtype);
+            Assert.Equal(SesBounceSubtype.Suppressed, notification.Bounce.BounceSubType);

             Assert.Equal("Amazon SES has suppressed sending to this address because it has a recent history of bouncing as an invalid address. For more information about how to remove an address from the suppression list, see the Amazon SES Developer Guide: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/remove-from-suppressionlist.html", notification.Bounce.BouncedRecipients[0].DiagnosticCode);


Ensure crashes folder exists before writing file

--- HockeySDK_WPF/HockeyPlatformHelperWPF.cs
+++ HockeySDK_WPF/HockeyPlatformHelperWPF.cs
@@ -71,6 +71,11 @@

         public async Task WriteStreamToFileAsync(Stream dataStream, string fileName, string folderName = null)
         {
+            // Ensure crashes folder exists
+            if (!isoStore.DirectoryExists(folderName)) {
+                isoStore.CreateDirectory(folderName);
+            }
+
             using (var fileStream = isoStore.OpenFile((folderName ?? "") + Path.DirectorySeparatorChar + fileName,FileMode.Create,FileAccess.Write)) {
                 await dataStream.CopyToAsync(fileStream);
             }
@@ -78,7 +83,11 @@

         public async Task<IEnumerable<string>> GetFileNamesAsync(string folderName = null, string fileNamePattern = null)
         {
-            return isoStore.GetFileNames((folderName ?? "") + Path.DirectorySeparatorChar + fileNamePattern ?? "*");
+            try {
+                return isoStore.GetFileNames((folderName ?? "") + Path.DirectorySeparatorChar + fileNamePattern ?? "*");
+            } catch (DirectoryNotFoundException) {
+                return new string[0];
+            }
         }

         #endregion


Fix cross plattform issue with drive info method

ARKADE-245

--- src/Arkivverket.Arkade.Core/Util/SystemInfo.cs
+++ src/Arkivverket.Arkade.Core/Util/SystemInfo.cs
@@ -1,5 +1,6 @@
-using System;
+using System;
 using System.IO;
+using System.Linq;
 using Arkivverket.Arkade.Core.Base;

 namespace Arkivverket.Arkade.Core.Util
@@ -33,14 +34,14 @@

         private static DriveInfo GetDirectoryDriveInfo(string directory)
         {
-            string fullyQualifiedPath = Path.GetFullPath(directory);
+            string fullyQualifiedDirectoryPath = // TODO: Uncomment below line when on .NET Standard 2.1 (reducing IO)
+                /*Path.IsPathFullyQualified(directory) ? directory :*/ Path.GetFullPath(directory);
+
+            DriveInfo directoryDrive = DriveInfo.GetDrives()
+                .OrderByDescending(drive => drive.Name.Length)
+                .First(drive => fullyQualifiedDirectoryPath.StartsWith(drive.Name));

-            // TODO: Use below line when on .NET Standard 2.1 (reducing IO)
-            //string fullyQualifiedPath = Path.IsPathFullyQualified(directory) ? directory : Path.GetFullPath(directory);
-
-            string directoryPathRoot = Path.GetPathRoot(fullyQualifiedPath);
-
-            return new DriveInfo(directoryPathRoot);
+            return directoryDrive;
         }
     }
 }


Finished updating lattice Cube class.

Finished updating lattice Cube class.

--- src/Assets/Scripts/MarchingCubesEnvironment.cs
+++ src/Assets/Scripts/MarchingCubesEnvironment.cs
@@ -116,7 +116,15 @@
     private class LatticeCube
     {
         private readonly LatticeEdge[] _edges = new LatticeEdge[12];
-
+        private readonly LatticePoint[] _points = new LatticePoint[8];
+        private int _lastFrameProcessed = 0;
+
+        public int LatticeXIndex { get; set; }
+        public int LatticeYIndex { get; set; }
+        public int LatticeZIndex { get; set; }
+
+        public int LastFrameProcessed { get { return _lastFrameProcessed; } set { _lastFrameProcessed = value; } }
+
         public LatticeEdge GetEdge(int edgeIndex)
         {
             return _edges[edgeIndex];
@@ -127,23 +135,15 @@
             _edges[edgeIndex] = edge;
         }

-        public LatticeCube()
-        {
-            cntr = 0;
-            points = new LatticePoint[8];
-        }
-
-
-        /*8 Points, see march() for their positioning*/
-        public LatticePoint[] points;
-
-        /*last frame this cube was processed*/
-        public int cntr;
-
-        /*Pointers into the latice array*/
-        public int px;
-        public int py;
-        public int pz;
+        public LatticePoint GetPoint(int pointIndex)
+        {
+            return _points[pointIndex];
+        }
+
+        public void SetPoint(int pointIndex, LatticePoint point)
+        {
+            _points[pointIndex] = point;
+        }
     }

     /*Edge class*/
@@ -302,7 +302,7 @@
         if (e.cntr < _currentFrameCounter)
         {

-            v = mPos(cube.points[p1i], cube.points[p2i], e.axisI);
+            v = mPos(cube.GetPoint(p1i), cube.GetPoint(p2i), e.axisI);
             e.v3 = v;
             e.vi = _vertexIndex;
             _newNormals[_vertexIndex] = calcNormal(v);
@@ -327,14 +327,14 @@

         int cubeIndex = 0;

-        if (cube.points[0].i() > _threshold) { cubeIndex |= 1; }
-        if (cube.points[1].i() > _threshold) { cubeIndex |= 2; }
-        if (cube.points[2].i() > _threshold) { cubeIndex |= 4; }
-        if (cube.points[3].i() > _threshold) { cubeIndex |= 8; }
-        if (cube.points[4].i() > _threshold) { cubeIndex |= 16; }
-        if (cube.points[5].i() > _threshold) { cubeIndex |= 32; }
-        if (cube.points[6].i() > _threshold) { cubeIndex |= 64; }
-        if (cube.points[7].i() > _threshold) { cubeIndex |= 128; }
+        if (cube.GetPoint(0).i() > _threshold) { cubeIndex |= 1; }
+        if (cube.GetPoint(1).i() > _threshold) { cubeIndex |= 2; }
+        if (cube.GetPoint(2).i() > _threshold) { cubeIndex |= 4; }
+        if (cube.GetPoint(3).i() > _threshold) { cubeIndex |= 8; }
+        if (cube.GetPoint(4).i() > _threshold) { cubeIndex |= 16; }
+        if (cube.GetPoint(5).i() > _threshold) { cubeIndex |= 32; }
+        if (cube.GetPoint(6).i() > _threshold) { cubeIndex |= 64; }
+        if (cube.GetPoint(7).i() > _threshold) { cubeIndex |= 128; }

         int edgeIndex = _edgeTable[cubeIndex];
         edgec += edgeIndex;
@@ -381,21 +381,21 @@
     {
         LatticeCube nCube;
         int jx, jy, jz;
-        jx = cube.px; jy = cube.py; jz = cube.pz;
+        jx = cube.LatticeXIndex; jy = cube.LatticeYIndex; jz = cube.LatticeZIndex;
         _cubeCounter++;
         /* Test 6 axis cases. This seems to work well, no need to test all 26 cases */
         nCube = getCube(jx + 1, jy, jz);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
         nCube = getCube(jx - 1, jy, jz);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
         nCube = getCube(jx, jy + 1, jz);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
         nCube = getCube(jx, jy - 1, jz);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
         nCube = getCube(jx, jy, jz + 1);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
         nCube = getCube(jx, jy, jz - 1);
-        if (nCube != null && nCube.cntr < _currentFrameCounter) { nCube.cntr = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }
+        if (nCube != null && nCube.LastFrameProcessed < _currentFrameCounter) { nCube.LastFrameProcessed = _currentFrameCounter; if (doCube(nCube)) { recurseCube(nCube); } }

@@ -421,14 +421,14 @@
             while (jz >= 0)
             {
                 LatticeCube cube = getCube(jx, jy, jz);
-                if (cube != null && cube.cntr < _currentFrameCounter)
+                if (cube != null && cube.LastFrameProcessed < _currentFrameCounter)
                 {
                     if (doCube(cube))
                     {
                         recurseCube(cube);
                         jz = -1;
                     }
-                    cube.cntr = _currentFrameCounter;
+                    cube.LastFrameProcessed = _currentFrameCounter;
                 }
                 else
                 {
@@ -620,19 +620,18 @@

                     c = _cubes[i];
                     i++;
-                    c.px = ijx; c.py = ijy; c.pz = ijz;
-
-
-
-                    LatticePoint[] cpt = c.points;
-                    cpt[0] = getPoint(ijx, ijy, ijz);
-                    cpt[1] = getPoint(ijx + 1, ijy, ijz);
-                    cpt[2] = getPoint(ijx + 1, ijy + 1, ijz);
-                    cpt[3] = getPoint(ijx, ijy + 1, ijz);
-                    cpt[4] = getPoint(ijx, ijy, ijz + 1);
-                    cpt[5] = getPoint(ijx + 1, ijy, ijz + 1);
-                    cpt[6] = getPoint(ijx + 1, ijy + 1, ijz + 1);
-                    cpt[7] = getPoint(ijx, ijy + 1, ijz + 1);
+                    c.LatticeXIndex = ijx; c.LatticeYIndex = ijy; c.LatticeZIndex = ijz;
+
+
+
+                    c.SetPoint(0, getPoint(ijx, ijy, ijz));
+                    c.SetPoint(1, getPoint(ijx + 1, ijy, ijz));
+                    c.SetPoint(2, getPoint(ijx + 1, ijy + 1, ijz));
+                    c.SetPoint(3, getPoint(ijx, ijy + 1, ijz));
+                    c.SetPoint(4, getPoint(ijx, ijy, ijz + 1));
+                    c.SetPoint(5, getPoint(ijx + 1, ijy, ijz + 1));
+                    c.SetPoint(6, getPoint(ijx + 1, ijy + 1, ijz + 1));
+                    c.SetPoint(7, getPoint(ijx, ijy + 1, ijz + 1));

                     c.SetEdge(5, _edges[ep++]);


Updated the color of a button.

Updated the color of a button.

--- src/Automation.Gui/Views/Testruns/Index.cshtml
+++ src/Automation.Gui/Views/Testruns/Index.cshtml
@@ -12,7 +12,7 @@
 @Html.Partial("TestrunsTable")

-
+

         Import Nunit test results


Use avalonia properties

Use avalonia properties

--- src/Avalonia.Controls.PanAndZoom/ZoomBorder.cs
+++ src/Avalonia.Controls.PanAndZoom/ZoomBorder.cs
@@ -20,6 +20,10 @@
         private Point _previous;
         private Matrix _matrix;
         private bool _isPanning;
+        private double _zoomX = 1.0;
+        private double _zoomY = 1.0;
+        private double _offsetX = 0.0;
+        private double _offsetY = 0.0;
         private static StretchMode[] _autoFitModes = (StretchMode[])Enum.GetValues(typeof(StretchMode));

         /// <summary>
@@ -52,43 +56,79 @@
         }

         /// <inheritdoc/>
-        public double ZoomX => _matrix.M11;
-
-        /// <inheritdoc/>
-        public double ZoomY => _matrix.M22;
-
-        /// <inheritdoc/>
-        public double OffsetX => _matrix.M31;
-
-        /// <inheritdoc/>
-        public double OffsetY => _matrix.M32;
-
-        /// <inheritdoc/>
-        public bool EnableConstrains { get; set; }
-
-        /// <inheritdoc/>
-        public double MinZoomX { get; set; }
-
-        /// <inheritdoc/>
-        public double MaxZoomX { get; set; }
-
-        /// <inheritdoc/>
-        public double MinZoomY { get; set; }
-
-        /// <inheritdoc/>
-        public double MaxZoomY { get; set; }
-
-        /// <inheritdoc/>
-        public double MinOffsetX { get; set; }
-
-        /// <inheritdoc/>
-        public double MaxOffsetX { get; set; }
-
-        /// <inheritdoc/>
-        public double MinOffsetY { get; set; }
-
-        /// <inheritdoc/>
-        public double MaxOffsetY { get; set; }
+        public double ZoomX => _zoomX;
+
+        /// <inheritdoc/>
+        public double ZoomY => _zoomY;
+
+        /// <inheritdoc/>
+        public double OffsetX => _offsetX;
+
+        /// <inheritdoc/>
+        public double OffsetY => _offsetY;
+
+        /// <inheritdoc/>
+        public bool EnableConstrains
+        {
+            get => GetValue(EnableConstrainsProperty);
+            set => SetValue(EnableConstrainsProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MinZoomX
+        {
+            get => GetValue(MinZoomXProperty);
+            set => SetValue(MinZoomXProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MaxZoomX
+        {
+            get => GetValue(MaxZoomXProperty);
+            set => SetValue(MaxZoomXProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MinZoomY
+        {
+            get => GetValue(MinZoomYProperty);
+            set => SetValue(MinZoomYProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MaxZoomY
+        {
+            get => GetValue(MaxZoomYProperty);
+            set => SetValue(MaxZoomYProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MinOffsetX
+        {
+            get => GetValue(MinOffsetXProperty);
+            set => SetValue(MinOffsetXProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MaxOffsetX
+        {
+            get => GetValue(MaxOffsetXProperty);
+            set => SetValue(MaxOffsetXProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MinOffsetY
+        {
+            get => GetValue(MinOffsetYProperty);
+            set => SetValue(MinOffsetYProperty, value);
+        }
+
+        /// <inheritdoc/>
+        public double MaxOffsetY
+        {
+            get => GetValue(MaxOffsetYProperty);
+            set => SetValue(MaxOffsetYProperty, value);
+        }

         /// <inheritdoc/>
         public bool EnableInput
@@ -116,6 +156,100 @@
             AvaloniaProperty.Register<ZoomBorder, StretchMode>(nameof(Stretch), StretchMode.Uniform, false, BindingMode.TwoWay);

         /// <summary>
+        /// Identifies the <seealso cref="ZoomX"/> avalonia property.
+        /// </summary>
+        public static readonly DirectProperty<ZoomBorder, double> ZoomXProperty =
+            AvaloniaProperty.RegisterDirect<ZoomBorder, double>(
+                nameof(ZoomX),
+                o => o.ZoomX,
+                null,
+                1.0);
+
+        /// <summary>
+        /// Identifies the <seealso cref="ZoomY"/> avalonia property.
+        /// </summary>
+        public static readonly DirectProperty<ZoomBorder, double> ZoomYProperty =
+            AvaloniaProperty.RegisterDirect<ZoomBorder, double>(
+                nameof(ZoomY),
+                o => o.ZoomY,
+                null,
+                1.0);
+
+        /// <summary>
+        /// Identifies the <seealso cref="OffsetX"/> avalonia property.
+        /// </summary>
+        public static readonly DirectProperty<ZoomBorder, double> OffsetXProperty =
+            AvaloniaProperty.RegisterDirect<ZoomBorder, double>(
+                nameof(OffsetX),
+                o => o.OffsetX,
+                null,
+                0.0);
+
+        /// <summary>
+        /// Identifies the <seealso cref="OffsetY"/> avalonia property.
+        /// </summary>
+        public static readonly DirectProperty<ZoomBorder, double> OffsetYProperty =
+            AvaloniaProperty.RegisterDirect<ZoomBorder, double>(
+                nameof(OffsetY),
+                o => o.OffsetY,
+                null,
+                0.0);
+
+        /// <summary>
+        /// Identifies the <seealso cref="EnableConstrains"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<bool> EnableConstrainsProperty =
+            AvaloniaProperty.Register<ZoomBorder, bool>(nameof(EnableConstrains), true, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MinZoomX"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MinZoomXProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MinZoomX), double.NegativeInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MaxZoomX"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MaxZoomXProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MaxZoomX), double.PositiveInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MinZoomY"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MinZoomYProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MinZoomY), double.NegativeInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MaxZoomY"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MaxZoomYProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MaxZoomY), double.PositiveInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MinOffsetX"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MinOffsetXProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MinOffsetX), double.NegativeInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MaxOffsetX"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MaxOffsetXProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MaxOffsetX), double.PositiveInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MinOffsetY"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MinOffsetYProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MinOffsetY), double.NegativeInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
+        /// Identifies the <seealso cref="MaxOffsetY"/> avalonia property.
+        /// </summary>
+        public static AvaloniaProperty<double> MaxOffsetYProperty =
+            AvaloniaProperty.Register<ZoomBorder, double>(nameof(MaxOffsetY), double.PositiveInfinity, false, BindingMode.TwoWay);
+
+        /// <summary>
         /// Identifies the <seealso cref="EnableInput"/> avalonia property.
         /// </summary>
         public static AvaloniaProperty<bool> EnableInputProperty =
@@ -123,7 +257,18 @@

         static ZoomBorder()
         {
-            AffectsArrange(ZoomSpeedProperty, StretchProperty);
+            AffectsArrange(
+                ZoomSpeedProperty,
+                StretchProperty,
+                EnableConstrainsProperty,
+                MinZoomXProperty,
+                MaxZoomXProperty,
+                MinZoomYProperty,
+                MaxZoomYProperty,
+                MinOffsetXProperty,
+                MaxOffsetXProperty,
+                MinOffsetYProperty,
+                MaxOffsetYProperty);
         }

         /// <summary>
@@ -133,17 +278,6 @@
             : base()
         {
             Defaults();
-
-            EnableConstrains = true;
-
-            MinZoomX = double.NegativeInfinity;
-            MaxZoomX = double.PositiveInfinity;
-            MinZoomY = double.NegativeInfinity;
-            MaxZoomY = double.PositiveInfinity;
-            MinOffsetX = double.NegativeInfinity;
-            MaxOffsetX = double.PositiveInfinity;
-            MinOffsetY = double.NegativeInfinity;
-            MaxOffsetY = double.PositiveInfinity;

             Focusable = true;
             Background = Brushes.Transparent;
@@ -348,6 +482,18 @@
                     Constrain();
                 }
                 Debug.WriteLine($"Zoom: {_matrix.M11} {_matrix.M22} Offset: {_matrix.M31} {_matrix.M32}");
+                double oldZoomX = _zoomX;
+                double oldZoomY = _zoomY;
+                double oldOffsetX = _offsetX;
+                double oldOffsetY = _offsetY;
+                _zoomX = _matrix.M11;
+                _zoomY = _matrix.M22;
+                _offsetX = _matrix.M31;
+                _offsetY = _matrix.M32;
+                RaisePropertyChanged(ZoomXProperty, oldZoomX, _zoomX);
+                RaisePropertyChanged(ZoomYProperty, oldZoomY, _zoomY);
+                RaisePropertyChanged(OffsetXProperty, oldOffsetX, _offsetX);
+                RaisePropertyChanged(OffsetYProperty, oldOffsetY, _offsetY);
                 this.InvalidatedChild?.Invoke(_matrix.M11, _matrix.M22, _matrix.M31, _matrix.M32);
                 _element.RenderTransformOrigin = new RelativePoint(new Point(0, 0), RelativeUnit.Relative);
                 _element.RenderTransform = new MatrixTransform(_matrix);


Refactoring

Refactoring

--- src/Beetle.EntityFramework/EFContextHandler.cs
+++ src/Beetle.EntityFramework/EFContextHandler.cs
@@ -14,18 +14,75 @@
     using Server;

     public class EFContextHandler<TContext> : ContextHandler<TContext> where TContext : DbContext {
-        private Metadata _metadata;
+        // ReSharper disable StaticMemberInGenericType
+        private static Metadata _metadata;
+        private static ItemCollection _itemCollection;
+        private static IEnumerable<EFEntityType> _entityTypes;
+        private static IEnumerable<EntitySetBase> _entitySets;
+        private static ObjectItemCollection _objectItemCollection;
+        private static List<EFEntityType> _objectEntityTypes;
+        // ReSharper restore StaticMemberInGenericType
         private ObjectContext _objectContext;
-        private ItemCollection _itemCollection;
-        private IEnumerable<EFEntityType> _entityTypes;
-        private IEnumerable<EntitySetBase> _entitySets;
-        private ObjectItemCollection _objectItemCollection;
-        private List<EFEntityType> _objectEntityTypes;

         public EFContextHandler() {
         }

         public EFContextHandler(TContext context) : base(context) {
+        }
+
+        protected ItemCollection ItemCollection {
+            get {
+                if (_itemCollection != null) return _itemCollection;
+                lock (Lockers.ItemCollectionLocker) {
+                    return _itemCollection ??
+                        (_itemCollection = _objectContext.MetadataWorkspace.GetItemCollection(DataSpace.CSpace));
+                }
+            }
+        }
+
+        protected IEnumerable<EFEntityType> EntityTypes {
+            get {
+                if (_entityTypes != null) return _entityTypes;
+                lock (ItemCollection) {
+                    return _entityTypes ??
+                        (_entityTypes = ItemCollection.OfType<EFEntityType>().ToList());
+                }
+            }
+        }
+
+        protected IEnumerable<EntitySetBase> EntitySets {
+            get {
+                if (_entitySets != null) return _entitySets;
+                lock (ItemCollection) {
+                    return _entitySets ??
+                        (_entitySets = ItemCollection.OfType<EntityContainer>().SelectMany(ec => ec.BaseEntitySets).ToList());
+                }
+            }
+        }
+
+        protected ObjectItemCollection ObjectItemCollection {
+            get {
+                if (_objectItemCollection != null) return _objectItemCollection;
+                lock (Lockers.ObjectItemCollectionLocker) {
+                    if (typeof(ObjectContext).IsAssignableFrom(typeof(TContext)))
+                        _objectContext.MetadataWorkspace.LoadFromAssembly(_objectContext.GetType().Assembly);
+                    return _objectItemCollection ??
+                        (_objectItemCollection = (ObjectItemCollection)_objectContext.MetadataWorkspace.GetItemCollection(DataSpace.OSpace));
+                }
+            }
+        }
+
+        protected List<EFEntityType> ObjectEntityTypes {
+            get {
+                if (_objectEntityTypes != null) return _objectEntityTypes;
+                lock (Lockers.ObjectEntityTypesLocker) {
+                    if (_objectEntityTypes == null) {
+                        var objectEntityTypes = ObjectItemCollection.GetItems<EFEntityType>();
+                        _objectEntityTypes = objectEntityTypes?.ToList() ?? new List<EFEntityType>();
+                    }
+                    return _objectEntityTypes;
+                }
+            }
         }

         public override void Initialize() {
@@ -38,12 +95,6 @@
             Context.Configuration.LazyLoadingEnabled = false;

             _objectContext = ((IObjectContextAdapter) Context).ObjectContext;
-            _itemCollection = _objectContext.MetadataWorkspace.GetItemCollection(DataSpace.CSpace);
-            _entityTypes = _itemCollection.OfType<EFEntityType>().ToList();
-            _entitySets = _itemCollection.OfType<EntityContainer>().SelectMany(ec => ec.BaseEntitySets).ToList();
-            _objectItemCollection = (ObjectItemCollection)_objectContext.MetadataWorkspace.GetItemCollection(DataSpace.OSpace);
-            var objectEntityTypes = _objectItemCollection.GetItems<EFEntityType>();
-            _objectEntityTypes = objectEntityTypes?.ToList() ?? new List<EFEntityType>();
         }

         public override Metadata Metadata() {
@@ -208,6 +259,10 @@
     }

     internal static class Lockers {
+        internal static readonly object ObjectContextLocker = new object();
+        internal static readonly object ItemCollectionLocker = new object();
+        internal static readonly object ObjectItemCollectionLocker = new object();
+        internal static readonly object ObjectEntityTypesLocker = new object();
         internal static readonly object MetadataLocker = new object();
     }
 }


Add version to test mock settings

Add version to test mock settings

--- anime-downloader.Tests/Services/MockXmlSettingsService.cs
+++ anime-downloader.Tests/Services/MockXmlSettingsService.cs
@@ -11,6 +11,7 @@
         public PathConfiguration PathConfig { get; set; } = new PathConfiguration();
         public FlagConfiguration FlagConfig { get; set; } = new FlagConfiguration();
         public MyAnimeListConfiguration MyAnimeListConfig { get; set; } = new MyAnimeListConfiguration();
+        public VersionCheck Version { get; set; }
         public string SortBy { get; set; } = "";
         public string FilterBy { get; set; } = "";
         public List<string> Subgroups { get; set; } = new List<string>();


Fixing tests with required xml elements

Fixing tests with required xml elements

--- src/15below.Deployment.Update.Tests/TagDictionaryTests.cs
+++ src/15below.Deployment.Update.Tests/TagDictionaryTests.cs
@@ -422,9 +422,13 @@
         public void Contains(string value, string contains, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">{value}</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|contains:'#contains#' %}true{% else %}false{% endif %}".Replace("#contains#", contains).RenderTemplate(sut));
@@ -434,9 +438,13 @@
         public void Contains_EmptyString_Throws()
         {
             var sut = new TagDictionary("ident", @"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Data|contains:'' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -446,9 +454,13 @@
         public void Contains_WhenPropertyDoesntExist_Throws()
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Undata|contains:'al' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -461,8 +473,11 @@
         public void Contains_WhenPropertyDoesntExist_Defaulted(string value, string contains, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
-                                                      <Properties>
-                                                      </Properties>
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
+                                                      <Properties />
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|default:'#value#'|contains:'#endsWith#' %}true{% else %}false{% endif %}".Replace("#endsWith#", contains).Replace("#value#", value).RenderTemplate(sut));
@@ -475,9 +490,13 @@
         public void StartsWith(string value, string startsWith, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">{value}</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|startsWith:'#startsWith#' %}true{% else %}false{% endif %}".Replace("#startsWith#", startsWith).RenderTemplate(sut));
@@ -487,9 +506,13 @@
         public void StartsWith_EmptyString_Throws()
         {
             var sut = new TagDictionary("ident", @"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Data|startsWith:'' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -499,9 +522,13 @@
         public void StartsWith_WhenPropertyDoesntExist_Throws()
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Undata|startsWith:'V' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -514,8 +541,11 @@
         public void StartsWith_WhenPropertyDoesntExist_Defaulted(string value, string startsWith, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
-                                                      <Properties>
-                                                      </Properties>
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
+                                                      <Properties />
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|default:'#value#'|startsWith:'#endsWith#' %}true{% else %}false{% endif %}".Replace("#endsWith#", startsWith).Replace("#value#", value).RenderTemplate(sut));
@@ -528,9 +558,13 @@
         public void EndsWith(string value, string endsWith, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">{value}</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|endsWith:'#endsWith#' %}true{% else %}false{% endif %}".Replace("#endsWith#", endsWith).RenderTemplate(sut));
@@ -540,9 +574,13 @@
         public void EndsWith_EmptyString_Throws()
         {
             var sut = new TagDictionary("ident", @"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Data|endsWith:'' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -552,9 +590,13 @@
         public void EndsWith_WhenPropertyDoesntExist_Throws()
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">Value</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.Throws<ArgumentException>(() => "{% if Undata|startsWith:'V' %}true{% else %}false{% endif %}".RenderTemplate(sut));
@@ -567,8 +609,11 @@
         public void EndsWith_WhenPropertyDoesntExist_Defaulted(string value, string endsWith, bool expected)
         {
             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
-                                                      <Properties>
-                                                      </Properties>
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
+                                                      <Properties />
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             Assert.AreEqual(expected.ToString().ToLower(), "{% if Data|default:'#value#'|endsWith:'#endsWith#' %}true{% else %}false{% endif %}".Replace("#endsWith#", endsWith).Replace("#value#", value).RenderTemplate(sut));
@@ -581,10 +626,14 @@
             string value = "fQF5wgZ4J9+lm2LbpqoxWeeao6A9x1XoIc3VTDSHBosJ1tM/mLX2XO8+AENaizmalFhCD1YKK4j7YmzEP72FwtfGgm2jazDGNb1WR440ZPL96P/tO/dKvy53KHtlkY76qFiP2KZPxRWjbem+5kpWn5lLczwl/7lQfBAM6ntawghntVAA7l7gwvKDuq2FcVIP3Njdu3DzSWPgP4P83pQxn04KtG7fO0VudUXjllI6Y/LAgpovYuC1SR3lTw33V4KVPXcOvB16bwplw+izKGWBn9Wjc6B0IxyW0tSz87ETzuL0HpiOeTZvEObrzSXlCjz3qbt4mf5gQ9QN4Gk7tLpOAZhrV1fn94IDL+l73KDbQDVo/HsX5sFFK1amFu7669kjlCOtiXxS9nZ35GtMVV2N+TC78xg0tAmYZtCOaJ+AgKoPj+PZTaR+Heu+nddiy7EAsezQ0FePxL1FN6+VcMydA16htdfdhwBzt/Sjql1LLoqSuaduOvXwftkOfhl3ylVRNnGjgHtIlAAEXtxfyitxVQSVVDgPRwfncB0S4LgpXrnuw+Bj7CuslXvCL6x9ZCp5PYqcXTYcwuv/xysFrTKM0k6xS4D6mIShlOwOxaMm0nntg3VBIXwJZULHabd/xMb2UkwQOAjKvgplLmduaSeGdS8axup326eSmEDRXQlHqUM=";

             var sut = new TagDictionary("ident", $@"<Structure xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
+                                                      <ClientCode>XX</ClientCode>
+                                                      <Environment>LOC</Environment>
                                                       <Properties>
                                                         <Property name=""Data"">{value}</Property>
                                                         <Property name=""Certificate"">XX-NON-Certificate</Property>
                                                       </Properties>
+                                                      <PropertyGroups />
+                                                      <DbLogins />
                                                   </Structure>");

             var expected = "hello";


Removed som invalid feedback

Removed som invalid feedback

--- src/AutoTest.Core/Configuration/Config.cs
+++ src/AutoTest.Core/Configuration/Config.cs
@@ -280,18 +280,18 @@

         public void ValidateSettings()
         {
-            if (noneExists(_buildExecutables))
+            /*if (noneExists(_buildExecutables))
                 _bus.Publish(new WarningMessage("Invalid build executable specified in the configuration file. Builds will not be run."));
             if (noneExists(_nunitTestRunners))
                 _bus.Publish(new WarningMessage("NUnit test runner not specified. NUnit tests will not be run."));
             if (noneExists(_msTestRunner))
                 _bus.Publish(new WarningMessage("MSTest test runner not specified. MSTest tests will not be run."));
 			if (noneExists(_xunitTestRunner))
-                _bus.Publish(new WarningMessage("XUnit test runner not specified. XUnit tests will not be run."));
+                _bus.Publish(new WarningMessage("XUnit test runner not specified. XUnit tests will not be run."));*/
             if (noneExists(_mspecTestRunner))
                 _bus.Publish(new WarningMessage("Machine.Specifications test runner not specified. Machine.Specifications tests will not be run."));
-            if (_codeEditor == null || !File.Exists(_codeEditor.Executable))
-                _bus.Publish(new WarningMessage("Code editor not specified"));
+            /*if (_codeEditor == null || !File.Exists(_codeEditor.Executable))
+                _bus.Publish(new WarningMessage("Code editor not specified"));*/
             _bus.Publish(new InformationMessage(getIgnoreList()));
         }


Fix test

Fix test

--- src/Abc.Zebus.Tests/Directory/PeerDirectoryClientTests.cs
+++ src/Abc.Zebus.Tests/Directory/PeerDirectoryClientTests.cs
@@ -4,14 +4,10 @@
 using System.Threading;
 using System.Threading.Tasks;
 using Abc.Zebus.Directory;
-using Abc.Zebus.Dispatch;
-using Abc.Zebus.Lotus;
 using Abc.Zebus.Routing;
-using Abc.Zebus.Subscriptions;
 using Abc.Zebus.Testing;
 using Abc.Zebus.Testing.Extensions;
 using Abc.Zebus.Tests.Messages;
-using Abc.Zebus.Tests.Scan;
 using Abc.Zebus.Util;
 using Abc.Zebus.Util.Extensions;
 using Moq;
@@ -972,6 +968,7 @@
             var subscriptions = CaptureSubscriptionsUpdated();
             _directory.EnableSubscriptionsUpdatedFor(new[] { typeof(PeerStarted) });
             await RegisterSelf();
+            _directory.Handle(new PeerStarted(_otherPeer.ToPeerDescriptor(true)));

             // Act
             _directory.Handle(new PeerSubscriptionsUpdated(_otherPeer.ToPeerDescriptor(false, new[] { Subscription.Any<PeerStarted>() })));


Fix specific error

Fix specific error

GetFullPath "ASSUMES INPUT IS STILL ESCAPED," and the unescaped form was being passed to it. Now pass the escaped form.

--- src/Build/Evaluation/LazyItemEvaluator.cs
+++ src/Build/Evaluation/LazyItemEvaluator.cs
@@ -450,7 +450,8 @@
                 {
                     for (int i = 0; i < items.Count; i++)
                     {
-                        if (itemsWithNoWildcards.TryGetValue(FileUtilities.GetFullPath(items[i].Item.EvaluatedInclude, items[i].Item.ProjectDirectory), out UpdateOperation op))
+                        string fullPath = FileUtilities.GetFullPath(items[i].Item.EvaluatedIncludeEscaped, items[i].Item.ProjectDirectory);
+                        if (itemsWithNoWildcards.TryGetValue(fullPath, out UpdateOperation op))
                         {
                             items[i] = op.UpdateItem(items[i]);
                         }


fix flaky test failure

fix flaky test failure

--- src/Cassandra.Tests/Mapping/BatchTests.cs
+++ src/Cassandra.Tests/Mapping/BatchTests.cs
@@ -301,7 +301,7 @@
             batch.Insert(testUsers[0]);
             batch.Insert(testUsers[1]);
             batch.Insert(testUsers[2]);
-            mapperAndSession.Mapper.ExecuteAsync(batch);
+            mapperAndSession.Mapper.ExecuteAsync(batch).Wait();
             Mock.Get(mapperAndSession.Session).Verify(s => s.ExecuteAsync(It.IsAny<IStatement>(), It.Is<string>(profile => profile != "default")), Times.Never);
             Mock.Get(mapperAndSession.Session).Verify(s => s.ExecuteAsync(It.IsAny<IStatement>(), It.Is<string>(profile => profile == "default")), Times.Once);
             Mock.Get(mapperAndSession.Session).Verify(s => s.ExecuteAsync(It.IsAny<IStatement>()), Times.Never);


BUGFIX: Use MethodDefOrRef index for MethodSpec's Method column.

--- src/AsmResolver.PE/DotNet/Metadata/Tables/TablesStream.cs
+++ src/AsmResolver.PE/DotNet/Metadata/Tables/TablesStream.cs
@@ -742,7 +742,7 @@
                     new ColumnLayout("Owner", ColumnType.TypeOrMethodDef, GetColumnSize(ColumnType.TypeOrMethodDef)),
                     new ColumnLayout("EnclosingClass", ColumnType.String, StringIndexSize)),
                 new TableLayout(
-                    new ColumnLayout("Method", ColumnType.Method, GetColumnSize(ColumnType.Method)),
+                    new ColumnLayout("Method", ColumnType.Method, GetColumnSize(ColumnType.MethodDefOrRef)),
                     new ColumnLayout("Instantiation", ColumnType.Blob, BlobIndexSize)),
                 new TableLayout(
                     new ColumnLayout("Owner", ColumnType.GenericParam, GetColumnSize(ColumnType.GenericParam)),


added a more descriptive error message on Yui pre-compiling of empty css files

--- src/Assman.YuiCompressor/YuiCompressorCssContentFilter.cs
+++ src/Assman.YuiCompressor/YuiCompressorCssContentFilter.cs
@@ -1,4 +1,6 @@
-using Assman.ContentFiltering;
+using System;
+
+using Assman.ContentFiltering;

 using Yahoo.Yui.Compressor;

@@ -8,9 +10,17 @@
     {
         public string FilterContent(string content, ContentFilterContext context)
         {
+            if (string.IsNullOrEmpty(content)) throw new ArgumentException("File content cannot be empty: " + context.ResourceVirtualPath);
             if(context.Minify)
             {
-                return CssCompressor.Compress(content);
+                try
+                {
+                    return CssCompressor.Compress(content);
+                }
+                catch (Exception)
+                {
+                    throw new ArgumentException("Css Yui compressor was unable to compress the following file: " + context.ResourceVirtualPath);
+                }
             }

             return content;


Update before calling base.EndInit.

Update before calling base.EndInit.

Fixes #1932.

--- src/Avalonia.Controls/Primitives/SelectingItemsControl.cs
+++ src/Avalonia.Controls/Primitives/SelectingItemsControl.cs
@@ -289,12 +289,12 @@
         /// <inheritdoc/>
         public override void EndInit()
         {
+            if (--_updateCount == 0)
+            {
+                UpdateFinished();
+            }
+
             base.EndInit();
-
-            if (--_updateCount == 0)
-            {
-                UpdateFinished();
-            }
         }

         /// <summary>


Update SkiaShapeRenderer.cs

Update SkiaShapeRenderer.cs

--- src/Draw2D/Renderers/SkiaShapeRenderer.cs
+++ src/Draw2D/Renderers/SkiaShapeRenderer.cs
@@ -292,6 +292,7 @@
                     }
                 }
             }
+
             return pathShape;
         }


ADD: MusiC.Extensions.Windows.Hamming. An extensions to represent a Hamming window.

--- src/Extensions/Windows/Hamming/Hamming.cs
+++ src/Extensions/Windows/Hamming/Hamming.cs
@@ -1,6 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
+
+using MusiC;

 //namespace MCModule.Windows
 //{
@@ -17,3 +19,19 @@
 //		}
 //	}
 //}
+
+namespace MusiC.Extensions.Windows
+{
+	public class Hamming : Window
+	{
+		public Hamming(int size, int overlap) : base("Hamming", size, overlap)
+		{
+		}
+
+		override public double Factory(int n)
+		{
+			//return 0.53836 - 0.46164 * (Math.Cos(2 * Math.PI * n / (m_size - 1)));
+			return 0.54 - 0.46 * (Math.Cos(2 * Math.PI * n / (m_size - 1)));
+		}
+	}
+}


Delete KevinCallanan.cs

Delete KevinCallanan.cs

--- src/Firehose.Web/Authors/KevinCallanan.cs
+++ src/Firehose.Web/Authors/KevinCallanan.cs
@@ -1,25 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.ServiceModel.Syndication;
-using System.Web;
-using Firehose.Web.Infrastructure;
-
-namespace Firehose.Web.Authors
-{
-    public class KevinCallanan : IAmACommunityMember
-    {
-        public string FirstName => "Kevin";
-        public string LastName => "Callanan";
-        public string ShortBioOrTagLine => "Hi, I’m Kevin. I’m an Advisory Consultant living in Chicago, IL specializing in infrastructure technology such as Exchange, Skype, AD, O365, Windows, VMware.";
-        public string StateOrRegion => "Chicago";
-        public string EmailAddress => string.Empty;
-        public string TwitterHandle => "kevincallanan";
-        public string GravatarHash => "efb7bbc92a66d185905c300ad5eafadb";
-        public string GitHubHandle => "kevincallanan";
-        public GeoPosition Position => new GeoPosition(41.882457, -87.644678);
-        public Uri WebSite => new Uri("https://itsoundbytes.com/tag/powershell/");
-        public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://itsoundbytes.com/tag/powershell/feed/"); } }
-        public string FeedLanguageCode => "en";
-    }
-}


include the implementation of ISerializable on the ResourceIdentity class

--- src/Hl7.Fhir.Api/Rest/ResourceIdentity.cs
+++ src/Hl7.Fhir.Api/Rest/ResourceIdentity.cs
@@ -3,17 +3,42 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+#if !PORTABLE45 || NET45
+using System.Runtime.Serialization;
+#endif

 namespace Hl7.Fhir.Rest
 {
-    public class ResourceIdentity : Uri
+	/// <summary>
+	/// Creates an absolute Uri representing a Resource identitity for a given resource type, id and optional version.
+	/// </summary>
+	/// <param name="endpoint">Absolute path giving the FHIR service endpoint</param>
+#if !PORTABLE45 || NET45
+	[SerializableAttribute]
+#endif
+	public class ResourceIdentity : Uri
     {
         public ResourceIdentity(string uri) : base(uri, UriKind.RelativeOrAbsolute) {  }
         public ResourceIdentity(Uri uri) : base(uri.ToString(), UriKind.RelativeOrAbsolute) { }
         internal ResourceIdentity(string uri, UriKind kind) : base(uri, kind) { }
-
-
-        /// <summary>
+
+		#region << Serialization Implementation >>
+#if !PORTABLE45 || NET45
+		// The default serialization is all that is required as this class does
+		// not contain any of it's own properties that are not contained in the actual Uri
+		protected ResourceIdentity(SerializationInfo info, StreamingContext context)
+			: base(info, context)
+		{
+		}
+
+		protected virtual new void GetObjectData(SerializationInfo info, StreamingContext context)
+		{
+			base.GetObjectData(info, context);
+		}
+#endif
+		#endregion
+
+		/// <summary>
         /// Creates an absolute Uri representing a Resource identitity for a given resource type, id and optional version.
         /// </summary>
         /// <param name="endpoint">Absolute path giving the FHIR service endpoint</param>
@@ -264,6 +289,4 @@
             }
         }
     }
-
-
 }


Reduce enumerations and delegate invocations (#28470)

--- src/Hosting/Hosting/src/WebHostBuilder.cs
+++ src/Hosting/Hosting/src/WebHostBuilder.cs
@@ -183,9 +183,13 @@
                 var logger = host.Services.GetRequiredService<ILogger<WebHost>>();

                 // Warn about duplicate HostingStartupAssemblies
-                foreach (var assemblyName in _options.GetFinalHostingStartupAssemblies().GroupBy(a => a, StringComparer.OrdinalIgnoreCase).Where(g => g.Count() > 1))
-                {
-                    logger.LogWarning($"The assembly {assemblyName} was specified multiple times. Hosting startup assemblies should only be specified once.");
+                var assemblyNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
+                foreach (var assemblyName in _options.GetFinalHostingStartupAssemblies())
+                {
+                    if (!assemblyNames.Add(assemblyName))
+                    {
+                        logger.LogWarning($"The assembly {assemblyName} was specified multiple times. Hosting startup assemblies should only be specified once.");
+                    }
                 }

                 return host;