tables

tables

--- stankinsv2/solution/StankinsV2/Stankins.Razor/erdotviz.cshtml
+++ stankinsv2/solution/StankinsV2/Stankins.Razor/erdotviz.cshtml
@@ -17,13 +17,22 @@

 @foreach (DataRow db in databases.Rows)
 {
+    var relation = "";
     var id = db["id"].ToString();
+    if (db["name"].ToString() != "model")
+    {
+        continue;
+    }
     foreach (DataRow table in tables.Rows)
     {
+
         if (table["databaseId"].ToString() != id)
         {
             continue;
         }
+
+        var idTable = table["id"].ToString();
+        relation += string.Format("{0};", table["name"]);

         @string.Format("table{0}", @table["id"])

@@ -31,19 +40,36 @@

@table["name"]

-
one

-
two

-
three

-
four

-
five

-
six

+            @foreach (DataRow col in columns.Rows)
+            {
+                if (col["tableId"].ToString() != idTable)
+                {
+                    continue;
+                }
+
@col["name"]

+            }

+
+        @Raw(">];");
+        @string.Format("subgraph cluster_{0}", id);
+        @Raw("{");
+        @Raw("style = filled;");
+
+        @Raw("color = lightgrey;");
+
+        @Raw("node[style = filled, color = white];");
+        @if (!string.IsNullOrWhiteSpace(relation))
+        {
+            @Raw(relation)
+        }
+
+
+        @Raw(string.Format("label = '{0}';", db["name"]));
+        @relation
+        @Raw("}");
+    }
+}

-
-
-    }
-
-
-            }//end digraph
+}//end digraph


fixed setter for code namespace

fixed setter for code namespace

--- MuiDB/MuiDBFile.cs
+++ MuiDB/MuiDBFile.cs
@@ -7,13 +7,10 @@
 {
     using System;
     using System.Collections.Generic;
-    using System.IO;
     using System.Linq;
     using System.Reflection;
-    using System.Resources;
     using System.Text;
     using System.Threading.Tasks;
-    using System.Xml;
     using System.Xml.Linq;
     using System.Xml.Schema;
     using ResX;
@@ -122,7 +119,6 @@
                     }

                     return targetFile;
-
                 }).ToList();
             }
         }
@@ -180,7 +176,6 @@
             }
         }

-
         public string BaseName
         {
             get
@@ -194,7 +189,6 @@
             }
         }

-
         public string CodeNamespace
         {
             get
@@ -204,7 +198,7 @@

             set
             {
-                doc.Root.Element(ns + SettingsElementName)?.SetAttributeValue(BaseNameAttributeName, value);
+                doc.Root.Element(ns + SettingsElementName)?.SetAttributeValue(CodeNamespaceAttributeName, value);
             }
         }


Fixed bug with indicies in plugin API

Fixed bug with indicies in plugin API

--- Organic/Program.cs
+++ Organic/Program.cs
@@ -108,6 +108,8 @@
                                     Console.WriteLine("Error: Invalid parameter: " + arg + "\nUse orgASM.exe --help for usage information.");
                                     return;
                                 }
+                                else
+                                    i = hpea.Index;
                                 if (hpea.StopProgram)
                                     return;
                                 break;


fix naming typo

fix naming typo

--- src/NUnitFramework/tests/Constraints/EqualConstraintTests.cs
+++ src/NUnitFramework/tests/Constraints/EqualConstraintTests.cs
@@ -476,8 +476,8 @@
                 const double tolerance = 0.001;
                 var ex = Assert.Throws<AssertionException>(() => Assert.That(value, new EqualConstraint(1.2).Within(tolerance)));
                 Assert.That(ex.Message, Does.Contain($"+/- {MsgUtils.FormatValue(tolerance)}"));
-                var expectedPercentDiff = 1.2 - (double)value;
-                Assert.That(ex.Message, Does.Contain($"{MsgUtils.FormatValue(expectedPercentDiff)}"));
+                var expectedAbsoluteDiff = 1.2 - (double)value;
+                Assert.That(ex.Message, Does.Contain($"{MsgUtils.FormatValue(expectedAbsoluteDiff)}"));
             }

             /// <summary>Applies both the Percent and Ulps modifiers to cause an exception</summary>


Remove extra test

Remove extra test


Simplify code

Simplify code

--- src/OpenSage.Mods.Generals/Gui/GeneralsExpPointsCallbacks.cs
+++ src/OpenSage.Mods.Generals/Gui/GeneralsExpPointsCallbacks.cs
@@ -27,13 +27,12 @@
             }
         }

-        private static void ApplyCommandSets(Player player, GeneralsControlBar controlBar)
+        private static void ApplyRankCommandSet(CommandSet commandSet, int rank, Player player, GeneralsControlBar controlBar)
         {
-            var rank1 = player.Template.PurchaseScienceCommandSetRank1;
-            for (int i = 0; i < 3; i++)
+            for (int i = 0; i < commandSet.Buttons.Count; i++)
             {
-                var buttonControl = _window.Controls.FindControl("GeneralsExpPoints.wnd:ButtonRank1Number" + i) as Button;
-                if (rank1 != null && rank1.Value.Buttons.TryGetValue(i + 1, out var commandButtonReference))
+                var buttonControl = _window.Controls.FindControl($"GeneralsExpPoints.wnd:ButtonRank{rank}Number" + i) as Button;
+                if (commandSet != null && commandSet.Buttons.TryGetValue(i + 1, out var commandButtonReference))
                 {
                     var commandButton = commandButtonReference.Value;

@@ -47,44 +46,18 @@
                     }
                 }
             }
+        }
+
+        private static void ApplyCommandSets(Player player, GeneralsControlBar controlBar)
+        {
+            var rank1 = player.Template.PurchaseScienceCommandSetRank1;
+            ApplyRankCommandSet(rank1.Value, 1, player, controlBar);

             var rank3 = player.Template.PurchaseScienceCommandSetRank3;
-            for (int i = 0; i < 9; i++)
-            {
-                var buttonControl = _window.Controls.FindControl("GeneralsExpPoints.wnd:ButtonRank3Number" + i) as Button;
-                if (rank1 != null && rank3.Value.Buttons.TryGetValue(i + 1, out var commandButtonReference))
-                {
-                    var commandButton = commandButtonReference.Value;
-
-                    CommandButtonUtils.SetCommandButton(buttonControl, commandButton, controlBar);
-
-                    switch (commandButton.Command)
-                    {
-                        case CommandType.PurchaseScience:
-                            buttonControl.Enabled = player.ScienceAvailable(commandButton.Science[0].Value);
-                            break;
-                    }
-                }
-            }
+            ApplyRankCommandSet(rank3.Value, 3, player, controlBar);

             var rank8 = player.Template.PurchaseScienceCommandSetRank8;
-            for (int i = 0; i < 1; i++)
-            {
-                var buttonControl = _window.Controls.FindControl("GeneralsExpPoints.wnd:ButtonRank8Number" + i) as Button;
-                if (rank1 != null && rank8.Value.Buttons.TryGetValue(i + 1, out var commandButtonReference))
-                {
-                    var commandButton = commandButtonReference.Value;
-
-                    CommandButtonUtils.SetCommandButton(buttonControl, commandButton, controlBar);
-
-                    switch (commandButton.Command)
-                    {
-                        case CommandType.PurchaseScience:
-                            buttonControl.Enabled = player.ScienceAvailable(commandButton.Science[0].Value);
-                            break;
-                    }
-                }
-            }
+            ApplyRankCommandSet(rank8.Value, 8, player, controlBar);
         }

         public static void Update(Player player, GeneralsControlBar controlBar)


Fixed incorrect cref in XML comment.

Fixed incorrect cref in XML comment.

--- src/OrleansAzureUtils/Providers/Storage/AzureTableStorage.cs
+++ src/OrleansAzureUtils/Providers/Storage/AzureTableStorage.cs
@@ -144,7 +144,7 @@
         }

         /// <summary> Shutdown this storage provider. </summary>
-        /// <see cref="IStorageProvider.Close"/>
+        /// <see cref="IProvider.Close"/>
         public Task Close()
         {
             tableDataManager = null;


analysis keeps `ref` flag

analysis keeps `ref` flag

--- src/Peachpie.CodeAnalysis/FlowAnalysis/ExpressionAnalysis.cs
+++ src/Peachpie.CodeAnalysis/FlowAnalysis/ExpressionAnalysis.cs
@@ -1000,6 +1000,10 @@
                             ? positivetype
                             : TypeCtx.GetNullTypeMask();

+                        // keep the ref flag!
+                        newtype.IsRef = currenttype.IsRef;
+
+                        //
                         State.SetLocalType(handle, newtype);
                     }
                 }


matched to the new name of the project

matched to the new name of the project

--- src/SafeOrbit/Infrastructure/Constants/InternalsVisibleTo.cs
+++ src/SafeOrbit/Infrastructure/Constants/InternalsVisibleTo.cs
@@ -36,12 +36,12 @@
 #if DEBUG
         public const string ToUnitTests = "UnitTests";
         public const string ToPerformanceTests = "SafeOrbit.PerformanceTests";
-        public const string ToIntegrationTests = "SafeOrbit.IntegrationTests";
+        public const string ToIntegrationTests = "IntegrationTests";
         public const string ToDynamicProxyGenAssembly2 = "DynamicProxyGenAssembly2";
 #else
         public const string ToUnitTests = "UnitTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001005bc5f29f3c74f543ea44b37448fc2bc7bedf2aa3f751fa20bf96132f15728c00e811e813ad74c65b3c3d9f6bbe565e3bee562a2aec40f3fec2e62646ae3fd6b018269d66a002e34bf35ab253ccd29a8e8c32b3d7fd4f89a71f36a2d365dbec47a024dac8d78893db2dbdaf520769f5c9bf0727eaba877b6e40dcd9b976a3faa3";
         public const string ToPerformanceTests = "SafeOrbit.PerformanceTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010093766cb44eb55f438844d86a7dd3fa35ed7d1979499f503a4ee040bbd90bd6020285d089d27fc69159545e7b8b5bec9d87dc496d6a0d9d76cc7f3a7950758b6278b1230f79276888d41806e9e587affa8f0799473f9322593ea0f8284c766e2b570bf5c007e1038fa7aff1b317a34e291f8241f3e61bf0c3118cf21feac28e8b";
-        public const string ToIntegrationTests = "SafeOrbit.IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed2abddceaf54f71888719a32545c0ac1dbf44a87d7644092caadc0494b0ff0ebc7e32999b09db5bc7804e526639fca6abeb48102ddffd90a118ae28ac7e994110085ef2b76f9c2135e5b7ac3d48be5c7d0fea003c7e7d407aaeabc6b4e2fe9b0b5b5ec3bd05702f6fbbb505c0705dc77a6eac75b2dcc8ba7c92f3ada640f588";
+        public const string ToIntegrationTests = "IntegrationTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed2abddceaf54f71888719a32545c0ac1dbf44a87d7644092caadc0494b0ff0ebc7e32999b09db5bc7804e526639fca6abeb48102ddffd90a118ae28ac7e994110085ef2b76f9c2135e5b7ac3d48be5c7d0fea003c7e7d407aaeabc6b4e2fe9b0b5b5ec3bd05702f6fbbb505c0705dc77a6eac75b2dcc8ba7c92f3ada640f588";
         /// <summary>
         ///     Constant to use when making assembly internals visible to proxy types generated by DynamicProxy. Required when
         ///     proxying internal types.


Fixed hash length

Fixed hash length

--- src/ScriptBuilder/Saga/Writers/PostgreSqlSagaScriptWriter.cs
+++ src/ScriptBuilder/Saga/Writers/PostgreSqlSagaScriptWriter.cs
@@ -154,7 +154,7 @@
         using (var sha1 = SHA1.Create())
         {
             var hashBytes = sha1.ComputeHash(clearText);
-            for (var i = 0; i < 30; i++)
+            for (var i = 0; i < 20; i++)
             {
                 sb.Append(hashBytes[i].ToString("X2"));
             }


Nitpick, get rid of the empty string literal :-)

--- src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs
+++ src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs
@@ -135,7 +135,7 @@
             if (levelSwitch == null) throw new ArgumentNullException(nameof(levelSwitch));

             var trimmed = source.Trim();
-            if (trimmed == "")
+            if (trimmed.Length == 0)
                 throw new ArgumentException("A source name must be provided.", nameof(source));

             _addOverride(trimmed, levelSwitch);


Fix whitespace.

Fix whitespace.

--- src/StructuredLogViewer.Core/Analyzers/ImportTreeAnalyzer.cs
+++ src/StructuredLogViewer.Core/Analyzers/ImportTreeAnalyzer.cs
@@ -41,7 +41,7 @@
                 var importedProject = match.Groups["ImportedProject"].Value;
                 var line = int.Parse(match.Groups["Line"].Value);
                 var column = int.Parse(match.Groups["Column"].Value);
-               // var reason = match.Groups["Reason"].Value;
+                // var reason = match.Groups["Reason"].Value;

                 project = stringTable.Intern(project);
                 importedProject = stringTable.Intern(importedProject);
@@ -56,7 +56,7 @@
                     imported: false,
                     reason: reason);
                 return;
-            }
+            }
         }

         private static void AddImport(
@@ -96,7 +96,7 @@
             {
                 import = new NoImport(project, importedProject, line, column, reason);
             }
-
+
             NamedNode parent = importsFolder;

             if (project != rootProjectNode.ProjectFile)


update ProviderAlias

update ProviderAlias

--- src/WeihanLi.Common.Logging.Log4Net/Log4NetLoggerProvider.cs
+++ src/WeihanLi.Common.Logging.Log4Net/Log4NetLoggerProvider.cs
@@ -12,7 +12,26 @@

 namespace WeihanLi.Common.Logging.Log4Net
 {
+
     [ProviderAlias("log4net")]
+    internal class Log4NetLoggerProvider : ILoggerProvider
+    {
+        private readonly ConcurrentDictionary<string, Log4NetLogger> _loggers =
+            new ConcurrentDictionary<string, Log4NetLogger>(StringComparer.Ordinal);
+
+        public Log4NetLoggerProvider(string confFilePath)
+        {
+            if (null == LogManager.GetAllRepositories()?.FirstOrDefault(_ => _.Name == ApplicationHelper.ApplicationName))
+            {
+                XmlConfigurator.ConfigureAndWatch(LogManager.CreateRepository(ApplicationHelper.ApplicationName), new FileInfo(confFilePath));
+            }
+        }
+
+        public void Dispose() => _loggers.Clear();
+
+        public ILogger CreateLogger(string categoryName) => _loggers.GetOrAdd(categoryName, loggerName => new Log4NetLogger(loggerName));
+    }
+
     internal class Log4NetLogger : ILogger
     {
         private readonly ILog _logger;
@@ -97,24 +116,6 @@
             }
         }
     }
-
-    internal class Log4NetLoggerProvider : ILoggerProvider
-    {
-        private readonly ConcurrentDictionary<string, Log4NetLogger> _loggers =
-            new ConcurrentDictionary<string, Log4NetLogger>(StringComparer.Ordinal);
-
-        public Log4NetLoggerProvider(string confFilePath)
-        {
-            if (null == LogManager.GetAllRepositories()?.FirstOrDefault(_ => _.Name == ApplicationHelper.ApplicationName))
-            {
-                XmlConfigurator.ConfigureAndWatch(LogManager.CreateRepository(ApplicationHelper.ApplicationName), new FileInfo(confFilePath));
-            }
-        }
-
-        public void Dispose() => _loggers.Clear();
-
-        public ILogger CreateLogger(string categoryName) => _loggers.GetOrAdd(categoryName, loggerName => new Log4NetLogger(loggerName));
-    }
 }

 namespace Microsoft.Extensions.Logging


Correct argument validation

Correct argument validation

--- src/Yeast.Multitenancy/Extensions/TenantContextExtensions.cs
+++ src/Yeast.Multitenancy/Extensions/TenantContextExtensions.cs
@@ -12,7 +12,8 @@
         /// <returns></returns>
         public static IServiceScope CreateServiceScope(this TenantContext tenantContext)
         {
-            Ensure.NotNull(tenantContext, nameof(tenantContext));
+            Ensure.Argument.NotNull(tenantContext, nameof(tenantContext));
+
             return tenantContext.Services.GetRequiredService<IServiceScopeFactory>().CreateScope();
         }
     }


minor

minor

new query after the generated key changed

--- ef_model_db_mismatch/EntityFrameworkModelMismatch/Program.cs
+++ ef_model_db_mismatch/EntityFrameworkModelMismatch/Program.cs
@@ -16,10 +16,11 @@
                 Console.WriteLine("Total number of rows in data model: {0}", ctx.Data.Count());

                 var query = from d in ctx.Data
-                            where d.Id == new Guid("2cc3c76e-854d-4c6e-b7ad-23cdc222de1b") && d.Timestamp < new DateTime(2014, 11, 28, 17, 0, 0)
+                            where d.Id == new Guid("82295fa4-e5e0-4152-a5e7-0c06e25f803a")
+                            && d.Timestamp < new DateTime(2014, 12, 2, 19, 0, 0)
                             select d;

-                foreach (var d in query.ToList())
+                foreach (var d in query)
                 {
                     Console.WriteLine(d);
                 }


Blijkbaar had ik nog fouten gemaakt met het mergen.

We zullen maar zeggen dat dat aan de hitte lag :-$

--- Solution/Chiro.Gap.Services/GroepenService.svc.cs
+++ Solution/Chiro.Gap.Services/GroepenService.svc.cs
@@ -78,6 +78,10 @@

         private readonly IGroepenSync _groepenSync;

+        // Cache
+
+        private readonly IVeelGebruikt _veelGebruikt;
+
         /// <summary>
         /// Nieuwe groepenservice
         /// </summary>
@@ -90,11 +94,13 @@
         /// <param name="functiesMgr">Businesslogica aangaande functies</param>
         /// <param name="jaarOvergangMgr">Businesslogica aangaande de jaarovergang</param>
         /// <param name="repositoryProvider">De repository provider levert alle nodige repository's op.</param>
+        /// <param name="groepenSync">Synchronisatie met Kipadmin</param>
+        /// <param name="veelGebruikt">Cache</param>
         public GroepenService(IAfdelingsJaarManager afdelingsJaarMgr, IAuthenticatieManager authenticatieMgr, IAutorisatieManager autorisatieMgr,
                               IGroepenManager groepenMgr, IJaarOvergangManager jaarOvergangMgr,
                                 IChiroGroepenManager chiroGroepenMgr, IGroepsWerkJarenManager groepsWerkJarenMgr,
                               IFunctiesManager functiesMgr,
-                              IRepositoryProvider repositoryProvider, IGroepenSync groepenSync)
+                              IRepositoryProvider repositoryProvider, IGroepenSync groepenSync, IVeelGebruikt veelGebruikt)
         {
             _straatRepo = repositoryProvider.RepositoryGet<StraatNaam>();
             _adresRepo = repositoryProvider.RepositoryGet<WoonPlaats>();
@@ -121,6 +127,9 @@
             _authenticatieMgr = authenticatieMgr;
             _autorisatieMgr = autorisatieMgr;
             _groepenSync = groepenSync;
+
+            _veelGebruikt = veelGebruikt;
+
             _gav = new GavChecker(_autorisatieMgr);
         }


iOS Build fixes.

iOS Build fixes.

--- Source/Eto.Platform.Mac/Forms/MacDockContainer.cs
+++ Source/Eto.Platform.Mac/Forms/MacDockContainer.cs
@@ -1,14 +1,15 @@
 using System;
 using Eto.Forms;
 using Eto.Drawing;
-using MonoMac.AppKit;
 using SD = System.Drawing;
 using MonoTouch.UIKit;
-using Eto.Platform.Mac.Forms.Menu;

 #if IOS
 using NSResponder = MonoTouch.UIKit.UIResponder;
 using NSView = MonoTouch.UIKit.UIView;
+#elif OSX
+using MonoMac.AppKit;
+using Eto.Platform.Mac.Forms.Menu;
 #endif

 namespace Eto.Platform.Mac.Forms
@@ -68,6 +69,7 @@
 			}
 		}

+#if OSX
 		ContextMenu contextMenu;
 		public ContextMenu ContextMenu
 		{
@@ -78,7 +80,7 @@
 				Control.Menu = contextMenu != null ? ((ContextMenuHandler)contextMenu.Handler).Control : null;
 			}
 		}
-
+#endif
 		protected override SizeF GetNaturalSize(SizeF availableSize)
 		{
 			var contentControl = content.GetMacControl();


Added DefaultRandomGenerator

Added DefaultRandomGenerator

--- Source/Labirynth.Common/DefaultRandomGenerator.cs
+++ Source/Labirynth.Common/DefaultRandomGenerator.cs
@@ -5,7 +5,7 @@

     /// <summary>
     /// Represents default random numbers generator
-    /// Implement Singleton Design Pattern
+    /// Implement Singleton Design Pattern.
     /// </summary>
     /// <seealso cref="Labyrinth.Common.Interfaces.IRandomGenerator"/>
     public sealed class DefaultRandomGenerator : IRandomGenerator


Increased block size from 4MB to 100MB (Azure supports larger blob sizes now)

--- k8s/embedder.src/LargeFileUploaderUtils.cs
+++ k8s/embedder.src/LargeFileUploaderUtils.cs
@@ -90,7 +90,7 @@
         public static async Task<string> UploadAsync(Func<long, int, Task<byte[]>> fetchLocalData, long blobLenth,
             CloudBlockBlob blockBlob, uint uploadParallelism = DEFAULT_PARALLELISM)
         {
-            const int MAXIMUM_UPLOAD_SIZE = 4 * MB;
+            const int MAXIMUM_UPLOAD_SIZE = 100 * MB;
             if (NumBytesPerChunk > MAXIMUM_UPLOAD_SIZE) { NumBytesPerChunk = MAXIMUM_UPLOAD_SIZE; }

             #region Which blocks exist in the file


Added South Africa to the list of countrycode to currency

--- Source/Sugar/Extensions/CurrencyCodeExtensions.cs
+++ Source/Sugar/Extensions/CurrencyCodeExtensions.cs
@@ -394,6 +394,7 @@
                 case CountryCode.HN: return CurrencyCode.HNL;
                 case CountryCode.NI: return CurrencyCode.NIO;
                 case CountryCode.PY: return CurrencyCode.PYG;
+                case CountryCode.AZ: return CurrencyCode.ZAR;

                 default:
                     throw new ArgumentOutOfRangeException(nameof(country), country, "Could not convert country code to currency code");


properly remove bindings, avoid activePushes mutation during foreach

--- Phoenix/Channel.cs
+++ Phoenix/Channel.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Linq;
 using System.Collections.Generic;
 using Newtonsoft.Json.Linq;

@@ -70,7 +71,7 @@
 		}

 		public void Off(string anyEvent) {
-			bindings[anyEvent] = null;
+			bindings.Remove(anyEvent);
 		}

 		public Push Push(string @event, Dictionary<string, object> payload = null, TimeSpan? timeout = null) {
@@ -117,15 +118,15 @@
 		public Push Leave(TimeSpan? timeout = null) {

 			// cleanups
-			foreach (var push in activePushes.Values) {
-				CleanUp(push.@ref);
-			}
+			activePushes.Values
+				.ToList() // copy to avoid mutation while iterating
+				.ForEach(push => CleanUp(push.@ref));

 			state = State.Closed;

 			Action onClose = () => {
 				socket.Log(LogLevel.Debug, "channel", string.Format("leave {0}", topic));
-				Trigger(new Message() { @event = Message.InBoundEvent.Close.AsString() });
+				Trigger(new Message { @event = Message.InBoundEvent.Close.AsString() });
 			};

 			var leavePush = Push(Message.OutBoundEvent.Leave.AsString(), null, timeout)


Added ErrorString; added more drive-type toggles. Untested.

--- PluginDriveList.cs
+++ PluginDriveList.cs
@@ -8,39 +8,59 @@
 {
     internal class Measure
     {
+        private Dictionary<DriveType, bool> listedTypes;
+        private string ErrorString;
+        private DriveInfo[] allDrives;
+        private List<string> listedDrives;
+        private int currentIndex;
+        private bool needUpdate;

-        internal List<DriveType> listedTypes;
-        internal DriveInfo[] allDrives;
-        internal List<string> listedDrives;
-        internal int currentIndex;
-
+        /* Measure object constructor initializes class fields
+         */
         internal Measure()
         {
-            listedTypes = new List<DriveType> { DriveType.Fixed, DriveType.Network, DriveType.Ram };
+            listedTypes = new Dictionary<DriveType, bool>
+                {
+                    {DriveType.Fixed, true},
+                    {DriveType.Network, true},
+                    {DriveType.Removable, true},
+                    {DriveType.CDRom, false},
+                    {DriveType.Ram, false},
+                    {DriveType.NoRootDirectory, false},
+                    {DriveType.Unknown, false}
+                };
             listedDrives = new List<string>();
             currentIndex = 0;
+            needUpdate = true;
         }

         internal void Reload(Rainmeter.API rm, ref double maxValue)
         {
-            bool listOptical = (rm.ReadInt("Optical", 0) == 1 ? true : false);
-            bool listRemovable = (rm.ReadInt("Removable", 0) == 1 ? true : false);
-            bool listNetwork = (rm.ReadInt("Network", 0) == 1 ? true : false);
+            // cache type settings from before laste Reload
+            Dictionary<DriveType, bool> oldSettings = new Dictionary<DriveType, bool>(listedTypes);
+            // set type settings
+            listedTypes[DriveType.Fixed] = (rm.ReadInt("Fixed", 1) == 1 ? true : false);
+            listedTypes[DriveType.Removable] = (rm.ReadInt("Removable", 0) == 1 ? true : false);
+            listedTypes[DriveType.Network] = (rm.ReadInt("Network", 0) == 1 ? true : false);
+            listedTypes[DriveType.CDRom] = (rm.ReadInt("Optical", 0) == 1 ? true : false);
+            listedTypes[DriveType.Ram] = (rm.ReadInt("Ram", 0) == 1 ? true : false);
+            // if any of the settings changes, then flag for a list update
+            if (!oldSettings.Equals(listedTypes)) needUpdate = true;

-            updateTypeList(listOptical, listRemovable, listNetwork);
-
-            allDrives = DriveInfo.GetDrives();
         }

         internal double Update()
         {
-            DriveInfo[] newDrives = DriveInfo.GetDrives();
-
-            if (!newDrives.Equals(allDrives)) // connected drives have changed somehow, regenerate list
+            DriveInfo[] newDrives = DriveInfo.GetDrives();  // get array of DriveInfo objects
+            // if the connected drives have changes somehow, copy to allDrives and flag for list update
+            if (!newDrives.Equals(allDrives))
             {
                 allDrives = newDrives;
+                needUpdate = true;
+            }
+            // if the flag is set, run an update.
+            if (needUpdate)
                 updateListedDrives();
-            }

             if (listedDrives.Count < 1)
                 API.Log(API.LogType.Error, "DriveList: no drives?!");
@@ -50,17 +70,19 @@

         internal string GetString()
         {
+            string t;
             try
             {
-                return listedDrives[currentIndex];
+                t = listedDrives[currentIndex];
             }
             catch
             {
 #if DEBUG
-                API.Log(API.LogType.Warning, "Waiting on a valid index");
+                API.Log(API.LogType.Warning, "Caught an IndexOOB exception");
 #endif
-                return "C:\\";
+                t = ErrorString;
             }
+            return t;
         }

         internal void ExecuteBang(string args)
@@ -79,39 +101,8 @@
             }
         }

-        private void updateTypeList(bool incOpt, bool incRem, bool incNet)
-        {
-            bool already = listedTypes.Contains(DriveType.CDRom);
-            if (incOpt && !already)
-            {
-                listedTypes.Add(DriveType.CDRom);
-            }
-            else if (!incOpt && already)
-            {
-                listedTypes.Remove(DriveType.CDRom);
-            }
-
-            already = listedTypes.Contains(DriveType.Removable);
-            if (incRem && !already)
-            {
-                listedTypes.Add(DriveType.Removable);
-            }
-            else if (!incOpt && already)
-            {
-                listedTypes.Remove(DriveType.Removable);
-            }
-
-            already = listedTypes.Contains(DriveType.Network);
-            if (incNet && !already)
-            {
-                listedTypes.Add(DriveType.Network);
-            }
-            else if (!incNet && already)
-            {
-                listedTypes.Remove(DriveType.Network);
-            }
-        }
-
+        /* Clears and repopulates the list of drive names.
+         */
         private void updateListedDrives()
         {
             listedDrives.Clear();
@@ -120,11 +111,11 @@
 #if DEBUG
                 API.Log(API.LogType.Debug, "Found drive " + d.Name);
 #endif
-                if (d.IsReady && listedTypes.Contains(d.DriveType))
+                if (d.IsReady && listedTypes[d.DriveType])
                 {
                     listedDrives.Add(d.Name);
 #if DEBUG
-                        API.Log(API.LogType.Debug, "Added drive " + d.Name);
+                    API.Log(API.LogType.Debug, "Added drive " + d.Name);
 #endif
                 }
             }
@@ -133,6 +124,8 @@
             {
                 currentIndex = listedDrives.Count - 1;
             }
+
+            needUpdate = false; // reset the update flag
         }

     }


Started working on VGAScreen api docs

Started working on VGAScreen api docs

--- source/Cosmos.HAL2/Drivers/Video/VGAScreen.cs
+++ source/Cosmos.HAL2/Drivers/Video/VGAScreen.cs
@@ -24,6 +24,10 @@

         private readonly Core.IOGroup.VGA mIO = new Core.IOGroup.VGA();

+        /// <summary>
+        /// Write VGA registers.
+        /// </summary>
+        /// <param name="registers">Registers to write.</param>
         private void WriteVGARegisters(byte[] registers)
         {
             int xIdx = 0;
@@ -76,6 +80,10 @@
             mIO.AttributeController_Index.Byte = 0x20;
         }

+        /// <summary>
+        /// Set plane.
+        /// </summary>
+        /// <param name="p">p to set.</param>
         private void SetPlane(byte p)
         {
             byte pmask;
@@ -91,6 +99,11 @@
         }

         //int offset = 0xb8000;
+        /// <summary>
+        /// Get frame buffer segment.
+        /// </summary>
+        /// <returns>MemoryBlock08 value.</returns>
+        /// <exception cref="Exception">Thrown when unable to determine memory segment.</exception>
         private MemoryBlock08 GetFramebufferSegment()
         {
             mIO.GraphicsController_Index.Byte = 6;
@@ -112,6 +125,12 @@
             throw new Exception("Unable to determine memory segment!");
         }

+        /// <summary>
+        /// Write font.
+        /// </summary>
+        /// <param name="font">Font.</param>
+        /// <param name="font_height">Font height.</param>
+        /// <exception cref="Exception">Thrown when unable to determine memory segment.</exception>
         private void WriteFont(byte[] font, byte font_height)
         {
             byte seq2, seq4, gc4, gc5, gc6;
@@ -209,17 +228,17 @@
         public enum ScreenSize
         {
             /// <summary>
-            /// 640x480 graphics mode  - 2 and 4 bit color depth avaible
+            /// 640x480 graphics mode  - 2 and 4 bit color depth available
             /// </summary>
             Size640x480,

             /// <summary>
-            /// 720x480 graphics mode  - 16 bit color depth avaible
+            /// 720x480 graphics mode  - 16 bit color depth available
             /// </summary>
             Size720x480,

             /// <summary>
-            /// 320x200 graphics mode  - 4 and 8 bit color depth avaible
+            /// 320x200 graphics mode  - 4 and 8 bit color depth available
             /// </summary>
             Size320x200
         };
@@ -232,6 +251,11 @@
             BitDepth16
         };

+        /// <summary>
+        /// Set text size.
+        /// </summary>
+        /// <param name="aSize">A size to set.</param>
+        /// <exception cref="Exception">Thrown when text size invalid / unable to determine memory segment.</exception>
         public void SetTextMode(TextSize aSize)
         {
             switch (aSize)
@@ -265,6 +289,12 @@
             }
         }

+        /// <summary>
+        /// Set graphics mode.
+        /// </summary>
+        /// <param name="aSize">A screen size.</param>
+        /// <param name="aDepth">A color depth.</param>
+        /// <exception cref="Exception">Thrown when aDepth not supported for the aSize / unknown screen size.</exception>
         public void SetGraphicsMode(ScreenSize aSize, ColorDepth aDepth)
         {
             switch (aSize)
@@ -464,10 +494,31 @@
             throw new Exception("No video mode set!");
         }

+        /// <summary>
+        /// Get and set pixel width.
+        /// </summary>
         public int PixelWidth { private set; get; }
+
+        /// <summary>
+        /// Get and set pixel height.
+        /// </summary>
         public int PixelHeight { private set; get; }
+
+        /// <summary>
+        /// Get and set colors.
+        /// </summary>
         public int Colors { private set; get; }

+        /// <summary>
+        /// Test mode 320x200x8
+        /// </summary>
+        /// <exception cref="Exception">
+        /// <list type="bullet">
+        /// <item>Thrown when color depth not supported for the size.</item>
+        /// <item>Unknown screen size.</item>
+        /// <item>Memory error.</item>
+        /// </list>
+        /// </exception>
         public void TestMode320x200x8()
         {
             SetGraphicsMode(ScreenSize.Size320x200, ColorDepth.BitDepth8);
@@ -491,6 +542,10 @@
             }
         }

+        /// <summary>
+        /// Clear screen, and show one color on it.
+        /// </summary>
+        /// <param name="color">Color to set the screen to.</param>
         public void Clear(int color)
         {
             for (int y = 0; y < PixelHeight; y++)
@@ -511,6 +566,12 @@
         //    return _Palette[index];
         //}

+        /// <summary>
+        /// Set palette.
+        /// </summary>
+        /// <param name="index">Index.</param>
+        /// <param name="pallete">Palette.</param>
+        /// <exception cref="OverflowException">The array contains more than Int32.MaxValue elements.</exception>
         public void SetPalette(int index, byte[] pallete)
         {
             mIO.DACIndex_Write.Byte = (byte)index;
@@ -523,6 +584,13 @@
         //    SetPaletteEntry(index, color.R, color.G, color.B);
         //}

+        /// <summary>
+        /// Set palette entry.
+        /// </summary>
+        /// <param name="index">Index.</param>
+        /// <param name="r">Red.</param>
+        /// <param name="g">Green.</param>
+        /// <param name="b">Blue.</param>
         public void SetPaletteEntry(int index, byte r, byte g, byte b)
         {
             mIO.DACIndex_Write.Byte = (byte)index;


Removed infinite loop.

Removed infinite loop.

--- source/Cosmos/Cosmos.Shell.Console/Program.cs
+++ source/Cosmos/Cosmos.Shell.Console/Program.cs
@@ -37,10 +37,6 @@
 			stages.Run();
 			System.Console.WriteLine("Done");

-			while (true)
-			    ;
-
-
 			stages.Teardown();
 		}
 	}


Corrected spelling

Corrected spelling

--- source/NovusCraft.Site/Views/Home/Home.cshtml
+++ source/NovusCraft.Site/Views/Home/Home.cshtml
@@ -8,11 +8,11 @@

@Html.ActionLink("Hello, Raven DB", "ViewPost", "Blog", new { slug = "hello-raven-db" }, null)

-
Goodbye, hard-coded HTML — hello, Raven DB. I finally managed to find some time to have a good think about my persistence strategy. Raven DB has been on my radar since it was first announced by Ayende, but I had no opporunity to use it until now.

+
Goodbye, hard-coded HTML — hello, Raven DB. I finally managed to find some time to have a good think about my persistence strategy. Raven DB has been on my radar since it was first announced by Ayende, but I had no opportunity to use it until now.

This is my first Raven DB implementation and so far I am pleased with the way it is going:

It is very easy to pick up and just feels natural: it took me about an hour to implement basic display blog post functionality

-
It took about 15 lines of code to implement: including UnitOfWork and StructureMap wiring, exluding specifications and the usual IRepository scaffolding

+
It took about 15 lines of code to implement: including UnitOfWork and StructureMap wiring, excluding specifications and the usual IRepository scaffolding

It is incredibly fast: I am using the embedded mode, so there is no network cost

There is a strong community growing around it: as evidenced by StackOverflow and Google

The project has great visibility: it is available publicly on GitHub, so you can play around with the source and post bug reports (Ayende usually replies very quickly, the man never rests)


mirrored from new Annihilation commit

mirrored from new Annihilation commit

--- trunk/DefaultCombat/Routines/Advanced/Sentinel/Watchman.cs
+++ trunk/DefaultCombat/Routines/Advanced/Sentinel/Watchman.cs
@@ -65,15 +65,30 @@

                     //Rotation
                     Spell.Cast("Force Kick", ret => Me.CurrentTarget.IsCasting && CombatHotkeys.EnableInterrupts),
-                    Spell.Buff("Valorous Call", ret => Me.BuffCount("Centering") < 5),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.DoT("Force Melt", "Force Melt"),
                     Spell.DoT("Cauterize", "Burning (Cauterize)"),
-                    Spell.DoT("Force Melt", "Burning (Force Melt)"),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt"),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Twin Saber Throw", ret => CombatHotkeys.EnableCharge && Me.HasBuff("Mind Sear")),
                     Spell.Cast("Dispatch", ret => Me.CurrentTarget.HealthPercent <= 30),
                     Spell.Cast("Merciless Slash"),
-                    Spell.Cast("Zealous Strike", ret => Me.ActionPoints <= 5),
                     Spell.Cast("Blade Barrage"),
-                    Spell.Cast("Slash", ret => Me.Level < 41),
-                    Spell.Cast("Strike", ret => Me.ActionPoints <= 10)
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt"),
+                    Spell.Cast("Slash", ret => Me.ActionPoints >= 9 && Me.CurrentTarget.HasDebuff("Burning (Cauterize)")),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt"),
+                    Spell.Cast("Zealous Strike", ret => Me.ActionPoints <= 6),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt"),
+                    Spell.Cast("Force Leap", ret => Me.ActionPoints <= 8),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt"),
+                    Spell.Cast("Strike", ret => Me.ActionPoints < 9 && Me.CurrentTarget.HasDebuff("Burning (Cauterize)")),
+                    Spell.Cast("Merciless Slash"),
+                    Spell.Cast("Force Melt")
                     );
             }
         }
@@ -84,8 +99,10 @@
             {
                 return new Decorator(ret => Targeting.ShouldPbaoe,
                     new PrioritySelector(
-                        Spell.Cast("Force Sweep"),
-                        Spell.Cast("Twin Saber Throw", ret => CombatHotkeys.EnableCharge && Me.CurrentTarget.Distance <= 3f),
+                        Spell.Cast("Twin Saber Throw", ret => CombatHotkeys.EnableCharge && !DefaultCombat.MovementDisabled && Me.CurrentTarget.Distance >= 1f && Me.CurrentTarget.Distance <= 3f),
+                        Spell.Cast("Force Sweep", ret => Me.CurrentTarget.HasDebuff("Burning (Cauterize)") && Me.CurrentTarget.HasDebuff("Force Melt")),
+                        Spell.DoT("Force Melt", "Force Melt"),
+                        Spell.DoT("Cauterize", "Burning (Cauterize)"),
                         Spell.Cast("Cyclone Slash")
                         ));
             }


use handler from request scoped module

use handler from request scoped module

--- src/BotwinExtensions.cs
+++ src/BotwinExtensions.cs
@@ -53,7 +53,8 @@
                             var requestScopedModule = ctx.RequestServices.GetRequiredService(moduleType) as BotwinModule;

                             // TODO: Use the handler from the resolved 'requestScopedModule' instead of the one from the "startup scope".
-                            var handler = CreateModuleBeforeAfterHandler(requestScopedModule, route.handler);
+                            var routeHandler = requestScopedModule.Routes.FirstOrDefault(x => x.path == route.path && x.verb == route.verb).handler;
+                            var handler = CreateModuleBeforeAfterHandler(requestScopedModule, routeHandler);

                             var finalHandler = CreateFinalHandler(handler, statusCodeHandlers);


always write out any diagnostics we might have

--- StackExchange.Precompilation.Build/Compilation.cs
+++ StackExchange.Precompilation.Build/Compilation.cs
@@ -50,36 +50,40 @@

         public bool Run()
         {
-            var references = SetupReferences();
-            var sources = LoadSources(_cscArgs.SourceFiles.Select(x => x.Path).ToArray());
-
-            var compilationModules = LoadModules().ToList();
-
-            var compilation = CSharpCompilation.Create(
-                options: _cscArgs.CompilationOptions,
-                references: references,
-                syntaxTrees: sources,
-                assemblyName: _cscArgs.CompilationName);
-
-            var context = new BeforeCompileContext()
-            {
-                Modules = compilationModules,
-                Arguments = _cscArgs,
-                Compilation = compilation,
-                Diagnostics = _diagnostics,
-                Resources = _cscArgs.ManifestResources.ToList()
-            };
-
-            foreach (var module in compilationModules)
-            {
-                module.BeforeCompile(context);
-            }
-
-            var emitResult = Emit(context);
-
-            _diagnostics.ForEach(x => Console.WriteLine(x.ToString())); // strings only, since the Console.Out textwriter is another app domain...
-
-            return emitResult.Success;
+            try
+            {
+                var references = SetupReferences();
+                var sources = LoadSources(_cscArgs.SourceFiles.Select(x => x.Path).ToArray());
+
+                var compilationModules = LoadModules().ToList();
+
+                var compilation = CSharpCompilation.Create(
+                    options: _cscArgs.CompilationOptions,
+                    references: references,
+                    syntaxTrees: sources,
+                    assemblyName: _cscArgs.CompilationName);
+
+                var context = new BeforeCompileContext()
+                {
+                    Modules = compilationModules,
+                    Arguments = _cscArgs,
+                    Compilation = compilation,
+                    Diagnostics = _diagnostics,
+                    Resources = _cscArgs.ManifestResources.ToList()
+                };
+
+                foreach (var module in compilationModules)
+                {
+                    module.BeforeCompile(context);
+                }
+
+                var emitResult = Emit(context);
+                return emitResult.Success;
+            }
+            finally
+            {
+                _diagnostics.ForEach(x => Console.WriteLine(x.ToString())); // strings only, since the Console.Out textwriter is another app domain...
+            }
         }

         private IEnumerable<ICompileModule> LoadModules()


added check for enabled window

added check for enabled window

--- TCC.Core/ViewModels/CooldownBarWindowViewModel.cs
+++ TCC.Core/ViewModels/CooldownBarWindowViewModel.cs
@@ -104,7 +104,7 @@
         {

             if (SettingsManager.ClassWindowSettings.Enabled && _classManager.StartSpecialSkill(sk)) return;
-
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
             try
             {
                 if (sk.Cooldown < SkillManager.LongSkillTreshold)
@@ -143,6 +143,8 @@
         }
         private void NormalCd_RefreshSkill(Skill skill, uint cd)
         {
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
+
             SkillCooldown sk;
             try
             {
@@ -184,6 +186,8 @@
         }
         private void NormalCd_RemoveSkill(Skill sk)
         {
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
+
             try
             {

@@ -210,6 +214,7 @@
         private void FixedCd_AddOrRefreshSkill(SkillCooldown sk)
         {
             if (SettingsManager.ClassWindowSettings.Enabled && _classManager.StartSpecialSkill(sk)) return;
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;

             var skill = MainSkills.FirstOrDefault(x => x.Skill.IconName == sk.Skill.IconName);
             if (skill != null)
@@ -230,6 +235,8 @@
         }
         private void FixedCd_RefreshSkill(Skill sk, uint cd)
         {
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
+
             var skill = MainSkills.FirstOrDefault(x => x.Skill.IconName == sk.IconName);
             if (skill != null)
             {
@@ -257,6 +264,8 @@
         private void FixedCd_RemoveSkill(Skill sk)
         {
             //sk.SetDispatcher(Dispatcher);
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
+
             var skill = MainSkills.FirstOrDefault(x => x.Skill.IconName == sk.IconName);
             if (skill != null)
             {
@@ -284,6 +293,8 @@

         private void AddOrRefreshOtherSkill(SkillCooldown sk)
         {
+            if (!SettingsManager.CooldownWindowSettings.Enabled) return;
+
             sk.SetDispatcher(_dispatcher);

             try


#351 Ignore Container property in mapping

--- Test/AdventureWorksDatabase/Mapping/ProductMap.cs
+++ Test/AdventureWorksDatabase/Mapping/ProductMap.cs
@@ -13,6 +13,7 @@

             builder.Ignore(t => t.ProductCategory);
             //builder.Ignore(t => t.mappedSpecialOffers);
+            builder.Ignore(t => t.Container);

             // Properties


Remove lazy loading of configuration

Remove lazy loading of configuration

--- TfsHipChat/Configuration/ConfigurationProvider.cs
+++ TfsHipChat/Configuration/ConfigurationProvider.cs
@@ -1,26 +1,19 @@
 using System.IO;
 using Newtonsoft.Json;
+using TfsHipChat.Properties;

 namespace TfsHipChat.Configuration
 {
     public class ConfigurationProvider : IConfigurationProvider
     {
-        private TfsHipChatConfig _tfsHipChatConfig;
-
-        public TfsHipChatConfig Config
+        public ConfigurationProvider()
         {
-            get
+            using (var reader = new JsonTextReader(new StreamReader(Settings.Default.DefaultConfigPath)))
             {
-                if (_tfsHipChatConfig == null)
-                {
-                    using (var reader = new JsonTextReader(new StreamReader(Properties.Settings.Default.DefaultConfigPath)))
-                    {
-                        _tfsHipChatConfig = (new JsonSerializer()).Deserialize<TfsHipChatConfig>(reader);
-                    }
-                }
-
-                return _tfsHipChatConfig;
+                Config = (new JsonSerializer()).Deserialize<TfsHipChatConfig>(reader);
             }
         }
+
+        public TfsHipChatConfig Config { get; private set; }
     }
 }


Added a reference to NLog by default to user scripts

--- UserScriptEditor/ViewModels/ScriptingViewModel.cs
+++ UserScriptEditor/ViewModels/ScriptingViewModel.cs
@@ -294,6 +294,8 @@
             script.ReferencedAssemblies.Add(entityModelDllPath);
             string qpasCommonPath = Path.Combine(Path.GetDirectoryName(exePath), "QPAS.Common.dll");
             script.ReferencedAssemblies.Add(qpasCommonPath);
+            string nlogPath = Path.Combine(Path.GetDirectoryName(exePath), "NLog.dll");
+            script.ReferencedAssemblies.Add(nlogPath);
         }

         private const string OrderScriptBase =
@@ -303,6 +305,7 @@
 using QPAS.Scripting;
 using EntityModel;
 using System.Linq;
+using NLog;

 public class {0} : OrderScriptBase
 {{
@@ -325,6 +328,7 @@
 using QPAS.Scripting;
 using EntityModel;
 using System.Linq;
+using NLog;

 public class {0} : TradeScriptBase
 {{


Make DeclaringType2 public

Make DeclaringType2 public

--- src/DotNet/MethodDef.cs
+++ src/DotNet/MethodDef.cs
@@ -139,9 +139,11 @@
 		}

 		/// <summary>
-		/// Called by <see cref="DeclaringType"/>
-		/// </summary>
-		protected internal abstract TypeDef DeclaringType2 { get; set; }
+		/// Called by <see cref="DeclaringType"/> and should normally not be called by any user
+		/// code. Use <see cref="DeclaringType"/> instead. Only call this if you must set the
+		/// declaring type without inserting it in the declaring type's method list.
+		/// </summary>
+		public abstract TypeDef DeclaringType2 { get; set; }

 		/// <summary>
 		/// Gets/sets the CIL method body
@@ -760,7 +762,7 @@
 		}

 		/// <inheritdoc/>
-		protected internal override TypeDef DeclaringType2 {
+		public override TypeDef DeclaringType2 {
 			get { return declaringType; }
 			set {
 				declaringType = value;
@@ -1002,7 +1004,7 @@
 		}

 		/// <inheritdoc/>
-		protected internal override TypeDef DeclaringType2 {
+		public override TypeDef DeclaringType2 {
 			get { return declaringType.Value; }
 			set {
 				declaringType.Value = value;


polish and resolve statusbarviewmodel subscriptions.

--- WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
+++ WalletWasabi.Gui/ViewModels/StatusBarViewModel.cs
@@ -1,24 +1,18 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using Avalonia.Threading;
+using AvalonStudio.Extensibility;
+using AvalonStudio.Shell;
 using NBitcoin.Protocol;
 using ReactiveUI;
+using System;
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
+using WalletWasabi.Gui.Dialogs;
+using WalletWasabi.Gui.Tabs;
+using WalletWasabi.Models;
 using WalletWasabi.Services;
-using Avalonia.Data.Converters;
-using System.Globalization;
-using WalletWasabi.Models;
-using NBitcoin;
-using System.Threading.Tasks;
-using System.Threading;
-using Avalonia.Threading;
-using AvalonStudio.Extensibility;
-using AvalonStudio.Shell;
-using WalletWasabi.Gui.Tabs;
-using System.Reactive.Linq;
-using WalletWasabi.Gui.Dialogs;
-using System.Runtime.InteropServices;
-using System.Reactive.Disposables;
-using System.ComponentModel;

 namespace WalletWasabi.Gui.ViewModels
 {
@@ -31,129 +25,80 @@

 	public class StatusBarViewModel : ViewModelBase
 	{
-		public NodesCollection Nodes { get; }
-		public WasabiSynchronizer Synchronizer { get; }
-		public UpdateChecker UpdateChecker { get; }
-
+		private CompositeDisposable _disposables;
 		private UpdateStatus _updateStatus;
-
-		public UpdateStatus UpdateStatus
-		{
-			get => _updateStatus;
-			set
-			{
-				if (value != UpdateStatus.Latest)
-				{
-					UpdateAvailable = true;
-
-					if (value == UpdateStatus.Critical)
-					{
-						CriticalUpdateAvailable = true;
-					}
-				}
-
-				this.RaiseAndSetIfChanged(ref _updateStatus, value);
-			}
-		}
-
-		public ReactiveCommand UpdateCommand { get; }
-
 		private bool _updateAvailable;
-
-		public bool UpdateAvailable
-		{
-			get => _updateAvailable;
-			set => this.RaiseAndSetIfChanged(ref _updateAvailable, value);
-		}
-
 		private bool _criticalUpdateAvailable;
-
-		public bool CriticalUpdateAvailable
-		{
-			get => _criticalUpdateAvailable;
-			set => this.RaiseAndSetIfChanged(ref _criticalUpdateAvailable, value);
-		}
-
 		private BackendStatus _backend;
-
-		public BackendStatus Backend
-		{
-			get => _backend;
-			set => this.RaiseAndSetIfChanged(ref _backend, value);
-		}
-
 		private TorStatus _tor;
-
-		public TorStatus Tor
-		{
-			get => _tor;
-			set => this.RaiseAndSetIfChanged(ref _tor, value);
-		}
-
 		private int _peers;
-
-		public int Peers
-		{
-			get => _peers;
-			set => this.RaiseAndSetIfChanged(ref _peers, value);
-		}
-
 		private int _filtersLeft;
-
-		public int FiltersLeft
-		{
-			get => _filtersLeft;
-			set => this.RaiseAndSetIfChanged(ref _filtersLeft, value);
-		}
-
 		private int _blocksLeft;
-
-		public int BlocksLeft
-		{
-			get => _blocksLeft;
-			set => this.RaiseAndSetIfChanged(ref _blocksLeft, value);
-		}
-
 		private string _btcPrice;
-
-		public string BtcPrice
-		{
-			get => _btcPrice;
-			set => this.RaiseAndSetIfChanged(ref _btcPrice, value);
-		}
-
 		private string _status;
-
-		public string Status
-		{
-			get => _status;
-			set => this.RaiseAndSetIfChanged(ref _status, value);
-		}
-
 		private long _clientOutOfDate;
 		private long _backendIncompatible;

 		public StatusBarViewModel(NodesCollection nodes, WasabiSynchronizer synchronizer, UpdateChecker updateChecker)
 		{
+			_disposables = new CompositeDisposable();
+
 			_clientOutOfDate = 0;
 			_backendIncompatible = 0;
+
 			UpdateStatus = UpdateStatus.Latest;
-
-			Nodes = nodes;
-			Nodes.Added += Nodes_Added;
-			Nodes.Removed += Nodes_Removed;
-			Peers = Nodes.Count;
-
+			Peers = nodes.Count;
 			BlocksLeft = 0;
-			WalletService.ConcurrentBlockDownloadNumberChanged += WalletService_ConcurrentBlockDownloadNumberChanged;
-
-			Synchronizer = synchronizer;
-			UpdateChecker = updateChecker;
-			Synchronizer.NewFilter += IndexDownloader_NewFilter;
-			Synchronizer.PropertyChanged += Synchronizer_PropertyChanged;
-			Synchronizer.ResponseArrivedIsGenSocksServFail += IndexDownloader_ResponseArrivedIsGenSocksServFail;
-
-			FiltersLeft = Synchronizer.GetFiltersLeft();
+			FiltersLeft = synchronizer.GetFiltersLeft();
+
+			Observable.FromEventPattern<NodeEventArgs>(nodes, nameof(nodes.Added))
+				.Subscribe(x =>
+				{
+					Peers = nodes.Count;
+				}).DisposeWith(_disposables);
+
+			Observable.FromEventPattern<NodeEventArgs>(nodes, nameof(nodes.Removed))
+				.Subscribe(x =>
+				{
+					Peers = nodes.Count;
+				}).DisposeWith(_disposables);
+
+			Observable.FromEventPattern<int>(typeof(WalletService), nameof(WalletService.ConcurrentBlockDownloadNumberChanged))
+				.Subscribe(x =>
+				{
+					BlocksLeft = x.EventArgs;
+				}).DisposeWith(_disposables);
+
+			Observable.FromEventPattern(synchronizer, nameof(synchronizer.NewFilter)).Subscribe(x =>
+			{
+				FiltersLeft = synchronizer.GetFiltersLeft();
+			}).DisposeWith(_disposables);
+
+			synchronizer.WhenAnyValue(x => x.TorStatus).Subscribe(_ =>
+			{
+				Tor = synchronizer.TorStatus;
+			}).DisposeWith(_disposables);
+
+			synchronizer.WhenAnyValue(x => x.BackendStatus).Subscribe(_ =>
+			{
+				Backend = synchronizer.BackendStatus;
+			}).DisposeWith(_disposables);
+
+			synchronizer.WhenAnyValue(x => x.BestBlockchainHeight).Subscribe(_ =>
+			{
+				FiltersLeft = synchronizer.GetFiltersLeft();
+			}).DisposeWith(_disposables);
+
+			synchronizer.WhenAnyValue(x => x.UsdExchangeRate).Subscribe(_ =>
+			{
+				BtcPrice = $"${(long)synchronizer.UsdExchangeRate}";
+			}).DisposeWith(_disposables);
+
+			Observable.FromEventPattern<bool>(synchronizer, nameof(synchronizer.ResponseArrivedIsGenSocksServFail))
+				.Subscribe(e =>
+				{
+					OnResponseArrivedIsGenSocksServFail(e.EventArgs);
+				}).DisposeWith(_disposables);

 			this.WhenAnyValue(x => x.BlocksLeft).Subscribe(blocks =>
 			{
@@ -180,7 +125,12 @@
 				SetStatusAndDoUpdateActions();
 			});

-			UpdateChecker.Start(TimeSpan.FromMinutes(7),
+			UpdateCommand = ReactiveCommand.Create(() =>
+			{
+				IoC.Get<IShell>().AddOrSelectDocument(() => new AboutViewModel());
+			}, this.WhenAnyValue(x => x.UpdateStatus).Select(x => x != UpdateStatus.Latest));
+
+			updateChecker.Start(TimeSpan.FromMinutes(7),
 				() =>
 				{
 					Interlocked.Exchange(ref _backendIncompatible, 1);
@@ -199,34 +149,84 @@
 					});
 					return Task.CompletedTask;
 				});
-
-			UpdateCommand = ReactiveCommand.Create(() =>
-			{
-				IoC.Get<IShell>().AddOrSelectDocument(() => new AboutViewModel());
-			}, this.WhenAnyValue(x => x.UpdateStatus).Select(x => x != UpdateStatus.Latest));
-		}
-
-		private void Synchronizer_PropertyChanged(object sender, PropertyChangedEventArgs e)
-		{
-			if (e.PropertyName == nameof(Synchronizer.TorStatus))
-			{
-				Tor = Synchronizer.TorStatus;
-			}
-			else if (e.PropertyName == nameof(Synchronizer.BackendStatus))
-			{
-				Backend = Synchronizer.BackendStatus;
-			}
-			else if (e.PropertyName == nameof(Synchronizer.BestBlockchainHeight))
-			{
-				FiltersLeft = Synchronizer.GetFiltersLeft();
-			}
-			else if (e.PropertyName == nameof(Synchronizer.UsdExchangeRate))
-			{
-				BtcPrice = $"${(long)Synchronizer.UsdExchangeRate}";
-			}
-		}
-
-		private void IndexDownloader_ResponseArrivedIsGenSocksServFail(object sender, bool isGenSocksServFail)
+		}
+
+		public ReactiveCommand UpdateCommand { get; }
+
+		public UpdateStatus UpdateStatus
+		{
+			get => _updateStatus;
+			set
+			{
+				if (value != UpdateStatus.Latest)
+				{
+					UpdateAvailable = true;
+
+					if (value == UpdateStatus.Critical)
+					{
+						CriticalUpdateAvailable = true;
+					}
+				}
+
+				this.RaiseAndSetIfChanged(ref _updateStatus, value);
+			}
+		}
+
+		public bool UpdateAvailable
+		{
+			get => _updateAvailable;
+			set => this.RaiseAndSetIfChanged(ref _updateAvailable, value);
+		}
+
+		public bool CriticalUpdateAvailable
+		{
+			get => _criticalUpdateAvailable;
+			set => this.RaiseAndSetIfChanged(ref _criticalUpdateAvailable, value);
+		}
+
+		public BackendStatus Backend
+		{
+			get => _backend;
+			set => this.RaiseAndSetIfChanged(ref _backend, value);
+		}
+
+		public TorStatus Tor
+		{
+			get => _tor;
+			set => this.RaiseAndSetIfChanged(ref _tor, value);
+		}
+
+		public int Peers
+		{
+			get => _peers;
+			set => this.RaiseAndSetIfChanged(ref _peers, value);
+		}
+
+		public int FiltersLeft
+		{
+			get => _filtersLeft;
+			set => this.RaiseAndSetIfChanged(ref _filtersLeft, value);
+		}
+
+		public int BlocksLeft
+		{
+			get => _blocksLeft;
+			set => this.RaiseAndSetIfChanged(ref _blocksLeft, value);
+		}
+
+		public string BtcPrice
+		{
+			get => _btcPrice;
+			set => this.RaiseAndSetIfChanged(ref _btcPrice, value);
+		}
+
+		public string Status
+		{
+			get => _status;
+			set => this.RaiseAndSetIfChanged(ref _status, value);
+		}
+
+		private void OnResponseArrivedIsGenSocksServFail(bool isGenSocksServFail)
 		{
 			if (isGenSocksServFail)
 			{
@@ -268,11 +268,6 @@
 			}
 		}

-		private void WalletService_ConcurrentBlockDownloadNumberChanged(object sender, int concurrentBlockDownloadNumber)
-		{
-			BlocksLeft = concurrentBlockDownloadNumber;
-		}
-
 		private void SetStatusAndDoUpdateActions()
 		{
 			if (Interlocked.Read(ref _backendIncompatible) != 0)
@@ -299,21 +294,6 @@
 			}
 		}

-		private void IndexDownloader_NewFilter(object sender, Backend.Models.FilterModel e)
-		{
-			FiltersLeft = Synchronizer.GetFiltersLeft();
-		}
-
-		private void Nodes_Removed(object sender, NodeEventArgs e)
-		{
-			Peers = Nodes.Count;
-		}
-
-		private void Nodes_Added(object sender, NodeEventArgs e)
-		{
-			Peers = Nodes.Count;
-		}
-
 		#region IDisposable Support

 		private volatile bool _disposedValue = false; // To detect redundant calls
@@ -324,11 +304,7 @@
 			{
 				if (disposing)
 				{
-					Nodes.Added -= Nodes_Added;
-					Nodes.Removed -= Nodes_Removed;
-					Synchronizer.NewFilter -= IndexDownloader_NewFilter;
-					Synchronizer.PropertyChanged -= Synchronizer_PropertyChanged;
-					Synchronizer.ResponseArrivedIsGenSocksServFail -= IndexDownloader_ResponseArrivedIsGenSocksServFail;
+					_disposables.Dispose();
 				}

 				_disposedValue = true;


introduce AppAmmyAutocodeGeneratorBase

introduce AppAmmyAutocodeGeneratorBase

--- isukces.code/Ammy/_generator/AppAmmyAutocodeGeneratorBase.cs
+++ isukces.code/Ammy/_generator/AppAmmyAutocodeGeneratorBase.cs
@@ -1,7 +1,132 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using isukces.code.AutoCode;
+using JetBrains.Annotations;
+
 namespace isukces.code.Ammy
 {
-    public class AppAmmyAutocodeGeneratorBase
+    public abstract class AppAmmyAutocodeGeneratorBase : AmmyAutocodeGenerator
     {
-
+        protected AppAmmyAutocodeGeneratorBase(IAssemblyFilenameProvider filenameProvider) : base(filenameProvider)
+        {
+        }
+
+        protected virtual string FindSourceFileFromCompiledUri(string compiledResourceUriPath)
+        {
+            if (compiledResourceUriPath.EndsWith(".baml", StringComparison.Ordinal))
+                compiledResourceUriPath =
+                    compiledResourceUriPath.Substring(0, compiledResourceUriPath.Length - 5) + ".xaml";
+            return compiledResourceUriPath;
+        }
+
+        [CanBeNull]
+        protected virtual string GetUriVariableName(string localUriPath)
+        {
+            var lastIndexOfDot = localUriPath.LastIndexOf('.');
+            var ext            = lastIndexOfDot > 0 ? localUriPath.Substring(lastIndexOfDot) : "";
+            if (IgnoreResourceByExtension(ext))
+                return null;
+            if (lastIndexOfDot > 0)
+                localUriPath = localUriPath.Substring(0, lastIndexOfDot);
+            var shortName = localUriPath.Split('/', '\\').Last();
+            if (shortName.EndsWith(".g", StringComparison.OrdinalIgnoreCase))
+                shortName = shortName.Substring(0, shortName.Length - 2);
+            shortName = shortName.Replace("%20", " ");
+            shortName = UriToVariableName(shortName);
+            var varPrefix = GetVariablePrefixByExtension(ext);
+            return varPrefix + shortName;
+        }
+
+        /*
+        public static IReadOnlyList<string> GetContentNames(Assembly assembly)
+        {
+            var resourceUris = assembly
+                .GetCustomAttributes(typeof(AssemblyAssociatedContentFileAttribute), true)
+                .Cast<AssemblyAssociatedContentFileAttribute>()
+                .Select(attr => attr.RelativeContentFilePath)
+                .ToList();
+            return resourceUris;
+        }
+
+
+        public static string[] GetResourceNames(Assembly assembly)
+        {
+            try
+            {
+                var resName = assembly.GetName().Name + ".g.resources";
+                using(var stream = assembly.GetManifestResourceStream(resName))
+                {
+                    if (stream == null)
+                        return new string[0];
+                    using(var reader = new ResourceReader(stream))
+                    {
+                        return reader.Cast<DictionaryEntry>().Select(entry => (string)entry.Key).ToArray();
+                    }
+                }
+            }
+            catch
+            {
+                return new string[0];
+            }
+        }
+         */
+
+        protected virtual string GetVariablePrefixByExtension(string ext)
+        {
+            if (string.IsNullOrEmpty(ext))
+                return string.Empty;
+            ext = ext.ToLower();
+            switch (ext)
+            {
+                case ".jpg":
+                case ".png":
+                case ".gif":
+                    return "Img";
+                case ".xaml": return "Res";
+                case ".cur": return "Cursor";
+                case ".ico": return "Icon";
+                default:
+                    return string.Empty;
+            }
+        }
+
+        protected virtual bool IgnoreResourceByExtension(string ext)
+        {
+            return false;
+        }
+
+        protected virtual string UriToVariableName(string x)
+        {
+            var sb    = new StringBuilder();
+            var upper = true;
+            foreach (var i in x)
+                if (i == '_' || char.IsWhiteSpace(i) || i == '-' || i == '.')
+                {
+                    upper = true;
+                }
+                else
+                {
+                    sb.Append(upper ? char.ToUpperInvariant(i) : i);
+                    upper = false;
+                }
+
+            return sb.ToString();
+        }
+
+        protected void WriteAmmyVariables(Assembly assembly, params string[] localResourceNames)
+        {
+            var assemblyName = assembly.GetName().Name;
+            var prefix       = $"pack://application:,,,/{assemblyName};component/";
+            foreach (var compiledResourceUriPath in localResourceNames)
+            {
+                var localUriPath = FindSourceFileFromCompiledUri(compiledResourceUriPath);
+                var varName      = GetUriVariableName(localUriPath);
+                if (varName == null)
+                    continue;
+                AddVariable(varName, prefix + localUriPath);
+            }
+        }
     }
 }


Correct PrependTo().

Correct PrependTo().

--- sources/HDocument/HQuery/ElementExtensions.cs
+++ sources/HDocument/HQuery/ElementExtensions.cs
@@ -331,7 +331,7 @@
         /// <summary>
         /// Append the element to the beginning of the content of the target
         /// </summary>
-        public static T PrependTo<T>(this T element, HElement target)
+        public static HNode PrependTo(this HNode element, HElement target)
         {
             if (element != null && target != null)
             {
@@ -343,7 +343,7 @@
         /// <summary>
         /// Append the set of elements to the beginning of the content of the target
         /// </summary>
-        public static IEnumerable<T> PrependTo<T>(this IEnumerable<T> content, HElement target)
+        public static IEnumerable<HNode> PrependTo(this IEnumerable<HNode> content, HElement target)
         {
             if (content != null && target != null)
                 target.Prepend(content);


- fixed broken tests

- fixed broken tests

--- tests/ServiceStack.WebHost.Endpoints.Tests/CorsFeatureTest.cs
+++ tests/ServiceStack.WebHost.Endpoints.Tests/CorsFeatureTest.cs
@@ -104,6 +104,8 @@
         [Test, TestCaseSource("RestClients")]
         public void CorsMethodHasAccessControlHeaders(IRestClient client)
         {
+            appHost.Config.GlobalResponseHeaders.Clear();
+
             var response = RequestContextTests.GetResponseHeaders(ListeningOn + "/corsmethod");
             Assert.That(response[HttpHeaders.AllowOrigin], Is.EqualTo("http://localhost http://localhost2"));
             Assert.That(response[HttpHeaders.AllowMethods], Is.EqualTo("POST, GET"));


Fixed test.

Fixed test.

--- test/FeatureSwitcher.VstsConfiguration.Tests/E2ETests.cs
+++ test/FeatureSwitcher.VstsConfiguration.Tests/E2ETests.cs
@@ -38,7 +38,6 @@
             state.Should().BeFalse();
         }

-        [Ignore]
         [TestMethod]
         [TestCategory("Integration")]
         public void EndToEnd_gets_the_correct_flag_for_environment()
@@ -64,13 +63,13 @@
                 .WithVSTSUrl(Settings.Default.Url)
                 .WithPrivateAccessToken(IntegrationTests.GetPAT())
                 .WithEnvironment(environmentKey)
-                .WithCacheTimeout(TimeSpan.FromMilliseconds(100))
+                .WithCacheTimeout(TimeSpan.FromMilliseconds(1))
                 .PreloadedFeatures()
                 .GetAwaiter().GetResult();

-            Feature<Demo.DemoFeature>.Is().Enabled.Should().BeTrue();
+            Feature<Demo.DemoFeature>.Is().Enabled.Should().BeTrue("The default flag should be false.");

             // turn off the feature
             var doc = new JsonPatchDocument();
@@ -84,16 +83,7 @@
             var t = testClient.WorkItemTrackingHttpClient.UpdateWorkItemAsync(doc, id);
             t.GetAwaiter().GetResult();

-            // give the cache time to expire
-            Thread.Sleep(100);
-
-            // get value from cache
-            Feature<Demo.DemoFeature>.Is().Enabled.Should().BeTrue();
-
-            // give the operation in the background time to finish
-            Thread.Sleep(2000);
-
-            Feature<Demo.DemoFeature>.Is().Enabled.Should().BeFalse();
+            Feature<Demo.DemoFeature>.Is().Enabled.Should().BeFalse("The feature was turned off.");

             testClient.WorkItemTrackingHttpClient.DeleteWorkItemAsync(id, destroy: true);
         }


Removed Ctor, Cleaned up namespace and removed extra vertical spacing as per comments.

--- test/Microsoft.AspNet.Hosting.Tests/Fakes/StartupBase.cs
+++ test/Microsoft.AspNet.Hosting.Tests/Fakes/StartupBase.cs
@@ -1,20 +1,12 @@
 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

-using Microsoft.AspNet.Builder;
 using Microsoft.Framework.DependencyInjection;
-using Microsoft.Framework.DependencyInjection.Fallback;
-using Microsoft.Framework.OptionsModel;
-using System;

 namespace Microsoft.AspNet.Hosting.Fakes
 {
     public class StartupBase
     {
-        public StartupBase()
-        {
-        }
-
         public void ConfigureBaseClassServices(IServiceCollection services)
         {
             services.AddOptions();
@@ -24,6 +16,5 @@
                 o.Environment = "BaseClass";
             });
         }
-
     }
 }


Fix failing test by setting the host object

--- test/Microsoft.TemplateEngine.Core.UnitTests/TestBase.cs
+++ test/Microsoft.TemplateEngine.Core.UnitTests/TestBase.cs
@@ -2,12 +2,18 @@
 using System.IO;
 using System.Text;
 using Microsoft.TemplateEngine.Core.Contracts;
+using Microsoft.TemplateEngine.Utils;
 using Xunit;

 namespace Microsoft.TemplateEngine.Core.UnitTests
 {
     public abstract class TestBase
     {
+        protected TestBase()
+        {
+            EngineEnvironmentSettings.Host = new DefaultTemplateEngineHost("TestRunner", Version.Parse("1.0.0.0"), "en-US");
+        }
+
         protected static void RunAndVerify(string originalValue, string expectedValue, IProcessor processor, int bufferSize, bool? changeOverride = null)
         {
             byte[] valueBytes = Encoding.UTF8.GetBytes(originalValue);


#3254: make splitformatCharacter nullable in FormattedStringValueExtracter

--- src/Abp/Text/FormattedStringValueExtracter.cs
+++ src/Abp/Text/FormattedStringValueExtracter.cs
@@ -24,7 +24,7 @@
         /// <param name="format">Format of the string</param>
         /// <param name="ignoreCase">True, to search case-insensitive.</param>
         /// <param name="splitformatCharacter">format is splitted using this character when provided.</param>
-        public ExtractionResult Extract(string str, string format, bool ignoreCase = false, char splitformatCharacter = default(char))
+        public ExtractionResult Extract(string str, string format, bool ignoreCase = false, char? splitformatCharacter = null)
         {
             var stringComparison = ignoreCase
                 ? StringComparison.OrdinalIgnoreCase
@@ -82,15 +82,15 @@
             return result;
         }

-        private List<FormatStringToken> TokenizeFormat(string originalFormat, char splitformatCharacter)
+        private List<FormatStringToken> TokenizeFormat(string originalFormat, char? splitformatCharacter = null)
         {
-            if (splitformatCharacter == default(char))
+            if (splitformatCharacter == null)
             {
                 return new FormatStringTokenizer().Tokenize(originalFormat);
             }

             var result = new List<FormatStringToken>();
-            var formats = originalFormat.Split('/');
+            var formats = originalFormat.Split(splitformatCharacter.Value);

             foreach (var format in formats)
             {


unused.

unused.

--- src/ApiProxy/Controllers/UseCaseController.cs
+++ src/ApiProxy/Controllers/UseCaseController.cs
@@ -1,11 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-using AutoMapper;
+using AutoMapper;
 using EdFiValidation.ApiProxy.Core.Queries;
 using EdFiValidation.ApiProxy.Models;
+using System.Collections.Generic;
+using System.Web.Mvc;

 namespace EdFiValidation.ApiProxy.Controllers
 {
@@ -16,7 +13,7 @@
         {
             _useCaseQueryService = useCaseQueryService;
         }
-        [System.Web.Mvc.HttpGet]
+        [HttpGet]
         public ActionResult Index()
         {
             var transactions = _useCaseQueryService.GetAll();


Only fail config checks if we asked for them to be attempted

--- src/Certify.Core/Management/CertifyManager.cs
+++ src/Certify.Core/Management/CertifyManager.cs
@@ -324,8 +324,8 @@
                                             }
                                         }
                                     }
-                                    if ((config.ChallengeType == ACMESharpCompat.ACMESharpUtils.CHALLENGE_TYPE_HTTP && !authorization.ExtensionlessConfigCheckedOK) ||
-                                        (config.ChallengeType == ACMESharpCompat.ACMESharpUtils.CHALLENGE_TYPE_SNI && !authorization.TlsSniConfigCheckedOK))
+                                    if ((config.ChallengeType == ACMESharpCompat.ACMESharpUtils.CHALLENGE_TYPE_HTTP && config.PerformExtensionlessConfigChecks && !authorization.ExtensionlessConfigCheckedOK) ||
+                                        (config.ChallengeType == ACMESharpCompat.ACMESharpUtils.CHALLENGE_TYPE_SNI && config.PerformTlsSniBindingConfigChecks && !authorization.TlsSniConfigCheckedOK))
                                     {
                                         //if we failed the config checks, report any errors
                                         LogMessage(managedSite.Id, $"Failed prerequisite configuration checks ({ managedSite.ItemType })", LogItemType.CertficateRequestFailed);


Do not reuse map nodes for another type

Do not reuse map nodes for another type

--- ksp_plugin_adapter/map_node_pool.cs
+++ ksp_plugin_adapter/map_node_pool.cs
@@ -59,14 +59,21 @@
       node_properties.time = apsis_iterator.IteratorGetDiscreteTrajectoryTime();

       if (pool_index_ == nodes_.Count) {
-        AddMapNodeToPool();
+        nodes_.Add(MakePoolNode());
+      } else if (properties_[nodes_[pool_index_]].object_type != type) {
+        // Do not reuse a node for different types, as this results in
+        // overlapping labels on KSP 1.3, e.g. a closest approach marker that
+        // also says "Ap" and "DN".
+        nodes_[pool_index_].Terminate();
+        properties_.Remove(nodes_[pool_index_]);
+        nodes_[pool_index_] = MakePoolNode();
       }
       properties_[nodes_[pool_index_++]] = node_properties;
     }
     Interface.IteratorDelete(ref apsis_iterator);
   }

-  private void AddMapNodeToPool() {
+  private KSP.UI.Screens.Mapview.MapNode MakePoolNode() {
     var new_node = KSP.UI.Screens.Mapview.MapNode.Create(
         "apsis",
         // If we see this colour, something has gone wrong.
@@ -206,7 +213,7 @@
         (KSP.UI.Screens.Mapview.MapNode node) =>
         ScaledSpace.LocalToScaledSpace(
             properties_[node].world_position);
-    nodes_.Add(new_node);
+    return new_node;
   }

   private struct MapNodeProperties {


Added support for passing error log directory as a command-line arg

--- src/Crepido.ElmahOfflineViewer.UI/MainForm.cs
+++ src/Crepido.ElmahOfflineViewer.UI/MainForm.cs
@@ -9,7 +9,9 @@

 namespace Crepido.ElmahOfflineViewer.UI
 {
-	public partial class MainForm : Form
+    using System.Linq;
+
+    public partial class MainForm : Form
 	{
 		private readonly IErrorLogRepository _repository;

@@ -22,15 +24,22 @@
 			_repository = ServiceLocator.Resolve<IErrorLogRepository>();
 			_repository.OnInitialized += RepositoryOnInitialized;

-			var directory = ConfigurationManager.AppSettings["LogsDirectory"];
-
-			if (!directory.HasValue())
-			{
-				SetErrorLoadingState();
-				return;
-			}
+		    var directory = Environment.GetCommandLineArgs()
+                                        .Skip(1)
+                                        .FirstOrDefault(arg => arg.HasValue());

-			HandleLoadingFromDirectory(directory);
+            if (!directory.HasValue())
+            {
+                directory = ConfigurationManager.AppSettings["LogsDirectory"];
+
+                if (!directory.HasValue())
+                {
+                    SetErrorLoadingState();
+                    return;
+                }
+            }
+
+		    HandleLoadingFromDirectory(directory);
 		}

 		private void SetLoadingState()


Replaced ConcurrentQueue by ConcurrentBag because it fits the semantic much better

(The queue-ness was not leveraged at all)

--- src/FixieSpec/SpecificationStepTypeScanner.cs
+++ src/FixieSpec/SpecificationStepTypeScanner.cs
@@ -15,8 +15,8 @@
     /// </summary>
     public static class SpecificationStepTypeScanner
     {
-        static readonly ConcurrentQueue<MethodNameScanner> MethodNameScanners
-            = new ConcurrentQueue<MethodNameScanner>();
+        static readonly ConcurrentBag<MethodNameScanner> MethodNameScanners
+            = new ConcurrentBag<MethodNameScanner>();

         /// <summary>
         /// Initializes static members of the <see cref="SpecificationStepTypeScanner"/> class.
@@ -85,7 +85,7 @@

         static void AddMethodNameScanner(MethodNameScanner methodNameScanner)
         {
-            MethodNameScanners.Enqueue(methodNameScanner);
+            MethodNameScanners.Add(methodNameScanner);
         }

         class MethodNameScanner


Add /GET for a single website resource

Add /GET for a single website resource

--- src/GeoToast/Controllers/WebsiteController.cs
+++ src/GeoToast/Controllers/WebsiteController.cs
@@ -7,11 +7,12 @@
 using GeoToast.Models;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;

 namespace GeoToast.Controllers
 {
     //[Authorize]
-    [Route("api/[controller]")]
+    [Route("api/website")]
     public class WebsiteController : Controller
     {
         private readonly GeoToastDbContext _dbContext;
@@ -31,6 +32,17 @@
             return _mapper.Map<List<WebsiteReadModel>>(_dbContext.Websites);
         }

+        [HttpGet("{id}")]
+        public async Task<IActionResult> Get(int id)
+        {
+            var website = await _dbContext.Websites.FirstOrDefaultAsync(w => w.Id == id);
+
+            if (website == null)
+            return NotFound();
+
+            return  Ok(_mapper.Map<WebsiteReadModel>(website));
+        }
+
         [HttpPost]
         public async Task<IActionResult> Post([FromBody]WebsiteCreateModel model)
         {
@@ -43,7 +55,7 @@
                 _dbContext.Websites.Add(website);
                 await _dbContext.SaveChangesAsync();

-                return CreatedAtAction("Get", website.Id);
+                return CreatedAtAction("Get", new { id = website.Id }, _mapper.Map<WebsiteReadModel>(website));
             }

             return BadRequest();


disable "obsolete" warning on CreateCompiler

--- src/JSNLog.Tests/UnitTests/UnitTestHelpers.cs
+++ src/JSNLog.Tests/UnitTests/UnitTestHelpers.cs
@@ -35,7 +35,9 @@
         public static object Eval(string sCSCode)
         {
             CSharpCodeProvider c = new CSharpCodeProvider();
+#pragma warning disable CS0618
             ICodeCompiler icc = c.CreateCompiler();
+#pragma warning restore CS0618
             CompilerParameters cp = new CompilerParameters();

             cp.ReferencedAssemblies.Add("system.dll");


[Analyzers] Expand problematic members to include ref-return writes

--- src/JiiLib.Analyzers/DefensiveCopyAnalyzer.cs
+++ src/JiiLib.Analyzers/DefensiveCopyAnalyzer.cs
@@ -45,10 +45,6 @@
             return;

         var thisMethodIsReadonly = methodSymbol.IsReadOnly;
-
-        var filter = new HashSet<string>(attrData.ConstructorArguments
-            .SelectMany(a => a.Values.Select(c => c.Value))
-            .OfType<string>(), StringComparer.Ordinal);

         var aliasTracker = new VariableAliasTracker(attrData.ConstructorArguments
             .SelectMany(a => a.Values.Select(c => c.Value))
@@ -141,10 +137,16 @@
     {
         return member switch
         {
-            IFieldSymbol              { IsReadOnly: false, IsStatic: false } => true,
+            // 'IFieldSymbol' not yet updated to model ref fields?
+            //IFieldSymbol { IsReadOnly: false, IsStatic: false } when isWrite => true,
+            IFieldSymbol { IsReadOnly: false, IsStatic: false } => true,
+
             IPropertySymbol { SetMethod.IsReadOnly: false, IsStatic: false } when isWrite => true,
+            IPropertySymbol { GetMethod: { IsReadOnly: false, ReturnsByRef: true }, IsStatic: false } when isWrite => true,
             IPropertySymbol { GetMethod.IsReadOnly: false, IsStatic: false } => true,
-            IMethodSymbol             { IsReadOnly: false, IsStatic: false } => true,
+
+            IMethodSymbol { IsReadOnly: false, IsStatic: false, ReturnsByRef: true } when isWrite => true,
+            IMethodSymbol { IsReadOnly: false, IsStatic: false } => true,
             _ => false
         };
     }


- using directives

- using directives

--- src/JsonFx.Json.Tests/Json/JsonParserTests.cs
+++ src/JsonFx.Json.Tests/Json/JsonParserTests.cs
@@ -30,7 +30,6 @@

 using System;
 using System.Collections.Generic;
-using System.Linq;

 using JsonFx.Serialization;
 using Xunit;


FFmpegClient tweaks

FFmpegClient tweaks

--- src/Kirkin.Experimental/Media/FFmpegClient.cs
+++ src/Kirkin.Experimental/Media/FFmpegClient.cs
@@ -7,14 +7,32 @@

 namespace Kirkin.Media
 {
+    /// <summary>
+    /// Managed FFmpeg wrapper.
+    /// </summary>
     public sealed class FFmpegClient
     {
         public string FFmpegPath { get; }

         /// <summary>
+        /// Target audio bitrate in KB/sec. The default is 192.
+        /// </summary>
+        public int AudioBitrate { get; set; } = 192;
+
+        /// <summary>
+        /// Audio encoder. The default is "aac".
+        /// </summary>
+        public string AudioEncoder { get; set; } = "aac";
+
+        /// <summary>
         /// Target video bitrate in KB/sec. The default is 2048.
         /// </summary>
         public int VideoBitrate { get; set; } = 2048;
+
+        /// <summary>
+        /// Video encoder. The default is "libx264".
+        /// </summary>
+        public string VideoEncoder { get; set; } = "libx264";

         public FFmpegClient()
         {
@@ -27,7 +45,7 @@

         public void ConvertFile(string inputFilePath, string outputFilePath)
         {
-            string args = $@"-i ""{inputFilePath}"" -c:v libx264 -b:v {VideoBitrate}k -c:a copy -y -v warning ""{outputFilePath}""";
+            string args = $@"-i ""{inputFilePath}"" -c:v {VideoEncoder} -b:v {VideoBitrate}k -c:a {AudioEncoder} -b:a {AudioBitrate}k -y -v warning ""{outputFilePath}""";

             ProcessStartInfo info = new ProcessStartInfo(FFmpegPath ?? "ffmpeg", args) {
                 RedirectStandardOutput = true,


BUG: Lucene.Net.Search.TopScoreDocCollector: Compare using Lucene.Net.Util.NumericUtils.SingleToSortableInt32() to prevent test failures on x86 .NET Framework. This fixes Lucene.Net.Search.TestTopDocsMerge::TestSort_1(), Lucene.Net.Search.TestTopDocsMerge::TestSort_2(), and Lucene.Net.Search.TestSearchAfter.TestQueries(). See #269.

--- src/Lucene.Net/Search/TopScoreDocCollector.cs
+++ src/Lucene.Net/Search/TopScoreDocCollector.cs
@@ -1,7 +1,7 @@
 using Lucene.Net.Diagnostics;
 using Lucene.Net.Support;
+using Lucene.Net.Util;
 using System;
-using System.Runtime.CompilerServices;

 namespace Lucene.Net.Search
 {
@@ -47,9 +47,6 @@
             {
             }

-#if NETFRAMEWORK
-            [MethodImpl(MethodImplOptions.NoOptimization)] // LUCENENET specific: comparing float equality fails in x86 on .NET Framework with optimizations enabled
-#endif
             public override void Collect(int doc)
             {
                 float score = scorer.GetScore();
@@ -62,7 +59,8 @@
                 }

                 m_totalHits++;
-                if (score <= pqTop.Score)
+                // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
+                if (NumericUtils.SingleToSortableInt32(score) <= NumericUtils.SingleToSortableInt32(pqTop.Score))
                 {
                     // Since docs are returned in-order (i.e., increasing doc Id), a document
                     // with equal score to pqTop.score cannot compete since HitQueue favors
@@ -93,9 +91,6 @@
                 this.after = after;
             }

-#if NETFRAMEWORK
-            [MethodImpl(MethodImplOptions.NoOptimization)] // LUCENENET specific: comparing float equality fails in x86 on .NET Framework with optimizations enabled
-#endif
             public override void Collect(int doc)
             {
                 float score = scorer.GetScore();
@@ -109,13 +104,17 @@

                 m_totalHits++;

-                if (score > after.Score || (score == after.Score && doc <= afterDoc))
+                // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
+                int scoreBits = NumericUtils.SingleToSortableInt32(score);
+                int afterBits = NumericUtils.SingleToSortableInt32(after.Score);
+
+                if (scoreBits > afterBits || (scoreBits == afterBits && doc <= afterDoc))
                 {
                     // hit was collected on a previous page
                     return;
                 }

-                if (score <= pqTop.Score)
+                if (scoreBits <= NumericUtils.SingleToSortableInt32(pqTop.Score))
                 {
                     // Since docs are returned in-order (i.e., increasing doc Id), a document
                     // with equal score to pqTop.score cannot compete since HitQueue favors
@@ -153,9 +152,6 @@
             {
             }

-#if NETFRAMEWORK
-            [MethodImpl(MethodImplOptions.NoOptimization)] // LUCENENET specific: comparing float equality fails in x86 on .NET Framework with optimizations enabled
-#endif
             public override void Collect(int doc)
             {
                 float score = scorer.GetScore();
@@ -164,13 +160,17 @@
                 if (Debugging.AssertsEnabled) Debugging.Assert(!float.IsNaN(score));

                 m_totalHits++;
-                if (score < pqTop.Score)
+
+                // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
+                int scoreBits = NumericUtils.SingleToSortableInt32(score);
+                int pqTopBits = NumericUtils.SingleToSortableInt32(pqTop.Score);
+                if (scoreBits < pqTopBits)
                 {
                     // Doesn't compete w/ bottom entry in queue
                     return;
                 }
                 doc += docBase;
-                if (score == pqTop.Score && doc > pqTop.Doc)
+                if (scoreBits == pqTopBits && doc > pqTop.Doc)
                 {
                     // Break tie in score by doc ID:
                     return;
@@ -199,9 +199,6 @@
                 this.after = after;
             }

-#if NETFRAMEWORK
-            [MethodImpl(MethodImplOptions.NoOptimization)] // LUCENENET specific: comparing float equality fails in x86 on .NET Framework with optimizations enabled
-#endif
             public override void Collect(int doc)
             {
                 float score = scorer.GetScore();
@@ -210,18 +207,22 @@
                 if (Debugging.AssertsEnabled) Debugging.Assert(!float.IsNaN(score));

                 m_totalHits++;
-                if (score > after.Score || (score == after.Score && doc <= afterDoc))
+                // LUCENENET specific - compare bits rather than using equality operators to prevent these comparisons from failing in x86 in .NET Framework with optimizations enabled
+                int scoreBits = NumericUtils.SingleToSortableInt32(score);
+                int afterBits = NumericUtils.SingleToSortableInt32(after.Score);
+                if (scoreBits > afterBits || (scoreBits == afterBits && doc <= afterDoc))
                 {
                     // hit was collected on a previous page
                     return;
                 }
-                if (score < pqTop.Score)
+                int pqTopBits = NumericUtils.SingleToSortableInt32(pqTop.Score);
+                if (scoreBits < pqTopBits)
                 {
                     // Doesn't compete w/ bottom entry in queue
                     return;
                 }
                 doc += docBase;
-                if (score == pqTop.Score && doc > pqTop.Doc)
+                if (scoreBits == pqTopBits && doc > pqTop.Doc)
                 {
                     // Break tie in score by doc ID:
                     return;


Increased timings for unit tests :(

Increased timings for unit tests :(

Former-commit-id: fcd3f9ac13d3f49d5fdd9c2291e938e413e487ae

--- src/MassTransit.Tests/PublishRequest_Specs.cs
+++ src/MassTransit.Tests/PublishRequest_Specs.cs
@@ -75,7 +75,7 @@

 			var ping = new PingMessage();

-			var timeout = 8.Seconds();
+			var timeout = 18.Seconds();

 			LocalBus.BeginPublishRequest(ping, callbackCalled.Set, null, x =>
 				{
@@ -244,7 +244,7 @@

 			var ping = new PingMessage();

-			var timeout = 8.Seconds();
+			var timeout = 18.Seconds();

 			LocalBus.BeginPublishRequest(ping, callbackCalled.Set, null, x =>
 			{


Change connecting message

Change connecting message

--- CrosspostSharp3/MainForm.cs
+++ CrosspostSharp3/MainForm.cs
@@ -186,7 +186,7 @@
 				wrapper.BatchSize = Math.Max(wrapper.MinBatchSize, Math.Min(wrapper.MaxBatchSize, 4));
 			}

-			lblLoadStatus.Text = "Checking usernames...";
+			lblLoadStatus.Text = "Connecting to sites...";

 			var tasks = list.Select(async w => {
 				try {


Use the BEncodedValue.Clone method in Torrent.ToDictionary ()

--- src/MonoTorrent/MonoTorrent.Common/Torrent.cs
+++ src/MonoTorrent/MonoTorrent.Common/Torrent.cs
@@ -337,7 +337,7 @@
         internal BEncodedDictionary ToDictionary ()
         {
             // Give the user a copy of the original dictionary.
-            return (BEncodedDictionary) BEncodedValue.Decode (ToBytes ());
+            return BEncodedValue.Clone (originalDictionary);
         }

         public override string ToString()


ignore case

ignore case

--- src/NHibernate/Driver/FirebirdClientDriver.cs
+++ src/NHibernate/Driver/FirebirdClientDriver.cs
@@ -14,10 +14,10 @@
 	/// </summary>
 	public class FirebirdClientDriver : ReflectionBasedDriver
 	{
-		private const string SELECT_CLAUSE_EXP = "(?<=select|where|SELECT|WHERE).*";
+		private const string SELECT_CLAUSE_EXP = "(?<=select|where).*";
 		private const string CAST_PARAMS_EXP = @"(?<![=<>]\s?|first\s?|skip\s?|between\s|between\s@\bp\w+\b\sand\s)@\bp\w+\b(?!\s?[=<>])";
-		private readonly Regex _statementRegEx = new Regex(SELECT_CLAUSE_EXP);
-		private readonly Regex _castCandidateRegEx = new Regex(CAST_PARAMS_EXP);
+		private readonly Regex _statementRegEx = new Regex(SELECT_CLAUSE_EXP, RegexOptions.IgnoreCase);
+		private readonly Regex _castCandidateRegEx = new Regex(CAST_PARAMS_EXP, RegexOptions.IgnoreCase);
 		private readonly FirebirdDialect _fbDialect = new FirebirdDialect();

 		/// <summary>


Adding Identity to ShapeMenuItem (#7790)

--- src/Orchard.Web/Core/Navigation/Migrations.cs
+++ src/Orchard.Web/Core/Navigation/Migrations.cs
@@ -177,5 +177,13 @@

             return 6;
         }
+
+        public int UpdateFrom6() {
+            ContentDefinitionManager.AlterTypeDefinition("ShapeMenuItem", cfg => cfg
+                .WithIdentity()
+            );
+
+            return 7;
+        }
     }
 }


#18777: Adding support for later date in DateTimeRelative

Work Item: 18777

--HG--
branch : 1.x

--- src/Orchard.Web/Core/Shapes/DateTimeShapes.cs
+++ src/Orchard.Web/Core/Shapes/DateTimeShapes.cs
@@ -34,18 +34,32 @@
         public IHtmlString DateTimeRelative(dynamic Display, DateTime dateTimeUtc) {
             var time = _clock.UtcNow - dateTimeUtc;

-            if (time.TotalDays > 7)
+            if (time.TotalDays > 7 || time.TotalDays < -7)
                 return Display.DateTime(DateTimeUtc: dateTimeUtc, CustomFormat: T("'on' MMM d yyyy 'at' h:mm tt"));
+
             if (time.TotalHours > 24)
                 return T.Plural("1 day ago", "{0} days ago", time.Days);
+            if (time.TotalHours < -24)
+                return T.Plural("in 1 day", "in {0} days", -time.Days);
+
             if (time.TotalMinutes > 60)
                 return T.Plural("1 hour ago", "{0} hours ago", time.Hours);
+            if (time.TotalMinutes < -60)
+                return T.Plural("in 1 hour", "in {0} hours", -time.Hours);
+
             if (time.TotalSeconds > 60)
                 return T.Plural("1 minute ago", "{0} minutes ago", time.Minutes);
+            if (time.TotalSeconds < -60)
+                return T.Plural("in 1 minute", "in {0} minutes", -time.Minutes);
+
             if (time.TotalSeconds > 10)
                 return T.Plural("1 second ago", "{0} seconds ago", time.Seconds); //aware that the singular won't be used
+            if (time.TotalSeconds < -10)
+                return T.Plural("in 1 second", "in {0} seconds", -time.Seconds);

-            return T("a moment ago");
+            return time.TotalMilliseconds > 0
+                       ? T("a moment ago")
+                       : T("in a moment");
         }

         [Shape]
@@ -73,4 +87,4 @@
         }

     }
-}
+}


Update user meta data tests to ensure we can clear values

--- tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs
+++ tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs
@@ -174,7 +174,7 @@
             Assert.NotNull(users.Paging);
         }

-        [Fact(Skip = "Run manually")]
+        [Fact]
         public async Task Can_update_user_metadata()
         {
             // Add a new user with metadata
@@ -192,19 +192,27 @@
                 UserMetadata = new
                 {
                     c = 3,
-                    d = 4
+                    d = 4,
+                    Color = "red"
                 }
             };
             var newUserResponse = await _apiClient.Users.CreateAsync(newUserRequest);
+            Assert.Equal(newUserResponse.UserMetadata.Color.ToString(), "red");

             // Do some updating
-            var updateUserRequest = new UserUpdateRequest {AppMetadata = new ExpandoObject()};
+            var updateUserRequest = new UserUpdateRequest
+            {
+                AppMetadata = new ExpandoObject(),
+                UserMetadata = new ExpandoObject()
+            };
             updateUserRequest.AppMetadata.IsSubscribedTo = "1";
+            updateUserRequest.UserMetadata.Color = null;
             await _apiClient.Users.UpdateAsync(newUserResponse.UserId, updateUserRequest);

             // Get the user to ensure the metadata was set
             var user = await _apiClient.Users.GetAsync(newUserResponse.UserId);
-            user.AppMetadata.IsSubscribedTo.Should().Be("1");
+            Assert.Equal(user.AppMetadata.IsSubscribedTo.ToString(), "1");
+            Assert.Null(user.UserMetadata.Color);

             // Delete the user
             await _apiClient.Users.DeleteAsync(user.UserId);


Fix the scenarios

Fix the scenarios

--- src/Pickles/Pickles/StrikeMarkdownProvider.cs
+++ src/Pickles/Pickles/StrikeMarkdownProvider.cs
@@ -20,6 +20,7 @@

 using System;

+using Strike;
 using Strike.Jint;

 namespace PicklesDoc.Pickles
@@ -30,7 +31,9 @@

         public StrikeMarkdownProvider()
         {
-            this.markdownify = new Markdownify();
+            this.markdownify = new Markdownify(
+                new Options { Xhtml = true },
+                new RenderMethods());
         }

         public string Transform(string text)


Thumbnails location ignores http://:0 connection uris as well now.

--- src/Plexito/ViewModels/MainWindowViewModel.cs
+++ src/Plexito/ViewModels/MainWindowViewModel.cs
@@ -67,26 +67,27 @@
             if (status != null)
             {
                 var plexServer = this._servers.Single();
+                var publicAddress = plexServer.PublicAddress;
                 if (status.Video != null)
                 {
                     this.Title = status.Video.Title;
                     this.Parent = status.Video.GrandParentTitle;
                     // We don't support if there's more than one server.
-                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => !s.Contains(plexServer.PublicAddress)).TrimEnd('/') + status.Video.Thumb;
+                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => IsAddressInLan(s, publicAddress)).TrimEnd('/') + status.Video.Thumb;
                 }
                 else if (status.Photo != null)
                 {
                     this.Title = status.Photo.Title;
                     this.Parent = status.Photo.OriginallyAvailableAt;
                     // We don't support if there's more than one server.
-                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => !s.Contains(plexServer.PublicAddress)).TrimEnd('/') + status.Photo.Thumb;
+                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => IsAddressInLan(s, publicAddress)).TrimEnd('/') + status.Photo.Thumb;
                 }
                 else if (status.Track != null)
                 {
                     this.Title = status.Track.Title;
                     this.Parent = status.Track.ParentTitle + " - " + status.Track.GrandParentTitle;
                     // We don't support if there's more than one server.
-                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => !s.Contains(plexServer.PublicAddress)).TrimEnd('/') + status.Track.Thumb;
+                    this.ThumbnailLocation = plexServer.ConnectionUris.First(s => IsAddressInLan(s, publicAddress)).TrimEnd('/') + status.Track.Thumb;
                 }
             }
             else
@@ -94,6 +95,11 @@
                 this.Title = string.Empty;
                 this.Parent = string.Empty;
             }
+        }
+
+        private bool IsAddressInLan(string s, string publicAddress)
+        {
+            return s != "http://:0" && !s.Contains(publicAddress);
         }

         public string ThumbnailLocation


Fix: Download Sitecore Wizard does not download Sitecore files (closes #255)

--- src/SIM.Tool.Windows/WizardPipelinesConfig.cs
+++ src/SIM.Tool.Windows/WizardPipelinesConfig.cs
@@ -3,6 +3,12 @@
   public static class WizardPipelinesConfig
   {
     public const string Contents = @"<configuration>
+  <pipelines>
+    <download8 title=""Downloading Sitecore"">
+      <processor type=""SIM.Tool.Windows.Pipelines.Download8.Download8Processor, SIM.Tool.Windows""
+                  title=""Downloading packages"" />
+    </download8>
+  </pipelines>
   <wizardPipelines>
     <agreement title=""SIM License Agreement"" startButton=""Accept"" finishText=""Thank you"">
       <steps afterLastStep=""SIM.Tool.Windows.SaveAgreement, SIM.Tool.Windows"">