Fixed some bugs in the auto-reload / auto-run stuff. Modified modal dialogs to specify the owner window so they don't get lost behind other windows!

--- src/Extensions/Icarus/Gallio.Icarus/Main.cs
+++ src/Extensions/Icarus/Gallio.Icarus/Main.cs
@@ -221,7 +221,7 @@

         private void aboutMenuItem_Click(object sender, EventArgs e)
         {
-            aboutDialog.ShowDialog();
+            aboutDialog.ShowDialog(this);
         }

         private void startButton_Click(object sender, EventArgs e)
@@ -314,7 +314,7 @@
         {
             using (Options.Options options = new Options.Options(mediator.OptionsController))
             {
-                options.ShowDialog();
+                options.ShowDialog(this);
             }
         }

@@ -464,25 +464,32 @@

         private void AssemblyChanged(object sender, AssemblyChangedEventArgs e)
         {
+            // Do this asynchronously when called from another thread.
+            BeginInvoke(new MethodInvoker(() => HandleAssemblyChanged(e.AssemblyName)));
+        }
+
+        private void HandleAssemblyChanged(string assemblyName)
+        {
             bool reload = false;
             if (mediator.OptionsController.AlwaysReloadAssemblies)
                 reload = true;
             else
             {
-                using (ReloadDialog reloadDialog = new ReloadDialog(e.AssemblyName))
+                using (ReloadDialog reloadDialog = new ReloadDialog(assemblyName))
                 {
-                    if (reloadDialog.ShowDialog() == DialogResult.OK)
+                    if (reloadDialog.ShowDialog(this) == DialogResult.OK)
                     {
                         reload = true;
                         mediator.OptionsController.AlwaysReloadAssemblies = reloadDialog.AlwaysReloadTests;
                     }
                 }
             }
-
+
             if (!reload)
                 return;

             Reload();
+
             if (mediator.OptionsController.RunTestsAfterReload)
                 StartTests(false);
         }


remove only .full-build/projects

remove only .full-build/projects

--- src/FullBuild/Commands/Workspace+Convert.cs
+++ src/FullBuild/Commands/Workspace+Convert.cs
@@ -78,7 +78,7 @@

                 // remove all import from .full-build and project reference
                 xdoc.Descendants(XmlHelpers.NsMsBuild + "ProjectReference").Remove();
-                xdoc.Descendants(XmlHelpers.NsMsBuild + "Import").Where(x => x.Attribute("Project").Value.InvariantContains(WellKnownFolders.RelativeAdminDirectory)).Remove();
+                xdoc.Descendants(XmlHelpers.NsMsBuild + "Import").Where(x => x.Attribute("Project").Value.InvariantStartsWith(WellKnownFolders.MsBuildProjectDir)).Remove();
                 xdoc.Descendants(XmlHelpers.NsMsBuild + "Reference").Remove();
                 xdoc.Descendants(XmlHelpers.NsMsBuild + "Import").Where(x => x.Attribute("Project").Value.InvariantContains("NuGet.targets")).Remove();
                 xdoc.Descendants(XmlHelpers.NsMsBuild + "Import").Where(x => x.Attribute("Project").Value.InvariantContains("paket.targets")).Remove();


[related to HT-359] Refactored and commented code in SampleScriptProvider for special-case handling of Eph 3

--- src/HearThis/Script/SampleScriptProvider.cs
+++ src/HearThis/Script/SampleScriptProvider.cs
@@ -136,8 +136,15 @@

 				iStyle = 0;
 			}
-			else if (bookNumber == BCVRef.BookToNumber("EPH") - 1 && chapterNumber == 3 && lineNumber0Based == 4)
-			{
+			else if (IsEphesiansChapter3(bookNumber, chapterNumber) && lineNumber0Based == 4)
+			{
+				// In Ephesians 3, we throw in a section head before the block representing verse 4
+				// in order to illustrate an example of a block that uses a skipped style. Note that
+				// this corresponds to an entry in SampleDataRecordingInfo.xml because we wanted to
+				// be able to illustrate the problem case where a recording exists for a block that
+				// is supposed to be skipped. Ideally, that XML file and the classes that process it
+				// should be enhanced to allow for this special case to be represented fully rather
+				// than hard-coding it in this class.
 				line = LocalizationManager.GetString("Sample.SectionHeadInEph3", "The Mystery", "Only for sample data");
 				iStyle = 3;
 			}
@@ -165,10 +172,18 @@
 			if (chapter1Based == 0)//introduction
 				return 1;

-			var extra = bookNumber0Based == BCVRef.BookToNumber("EPH") - 1 && chapter1Based == 3 ? 2 : 1;
+			// For most chapters, we just want one "extra" block for the chapter number.
+			// But for Ephesians 3, we throw in a section head in order to illustrate an
+			// example of a block that uses a skipped style.
+			var extra = IsEphesiansChapter3(bookNumber0Based, chapter1Based) ? 2 : 1;

 			return _stats.GetVersesInChapter(bookNumber0Based, chapter1Based) + extra;
 		}
+
+		// In Ephesians 3, we throw in a section head in order to illustrate an
+		// example of a block that uses a skipped style.
+		private bool IsEphesiansChapter3(int bookNumber0Based, int chapterNumber) =>
+			bookNumber0Based == BCVRef.BookToNumber("EPH") - 1 && chapterNumber == 3;

 		public override int GetSkippedScriptBlockCount(int bookNumber, int chapter1Based)
 		{


Tweak the SoftwareIdentity we return (and implement it for InstalledPackages)

--- ChocolateyPackageProvider.cs
+++ ChocolateyPackageProvider.cs
@@ -23,6 +23,7 @@

 namespace OneGet
 {
+	using System.IO;
 	using chocolatey.infrastructure.results;
 	using NuGet;
 	using Constants = Sdk.Constants;
@@ -280,8 +281,17 @@
 				{
 					continue;
 				}
-
-				request.YieldSoftwareIdentity("", package.Package.Id, package.Version, "", package.Package.Summary, PackageProviderName, name, "", package.InstallLocation );
+				var fastPath = package.Package.GetFullName(); // string.Format("{0} {1}", package.Package.Id, package.Version);
+				var fileName = string.Format("{0}.{1}.nupkg", package.Package.Id, package.Version);
+				request.YieldSoftwareIdentity(
+					fastPath,	// this should be what we need to figure out how to find the package again
+					package.Package.Id,	// this is the friendly name of the package
+					package.Version, "semver",	// the version and version scheme
+					package.Package.Summary ?? package.Package.Description,	// the summary (sometimes NuGet puts it in Description?)
+					package.Source,	// the package SOURCE name
+					name,	// the search that returned this package
+					package.SourceUri,	// the full path to the file (if it's available)
+					fileName);	// a file name in case they want to download it...
 			}
 		}

@@ -387,7 +397,26 @@
 			// TODO: improve this debug message that tells us what's going on.
 			request.Debug("Calling '{0}::GetInstalledPackages' '{1}'", PackageProviderName, name);

-			// TODO: list all installed packages
+			foreach (var package in _chocolatey.Set(conf =>
+			{
+				conf.CommandName = "List";
+				conf.Input = name;
+				conf.ListCommand.LocalOnly = true;
+				conf.AllowUnofficialBuild = true;
+			}).List<PackageResult>())
+			{
+				var fastPath = package.Package.GetFullName(); // string.Format("{0} {1}", package.Package.Id, package.Version);
+				var fileName = string.Format("{0}.{1}.nupkg", package.Package.Id, package.Version);
+				request.YieldSoftwareIdentity(
+					fastPath,	// this should be what we need to figure out how to find the package again
+					package.Package.Id,	// this is the friendly name of the package
+					package.Version, "semver",	// the version and version scheme
+					package.Package.Summary ?? package.Package.Description,	// the summary (sometimes NuGet puts it in Description?)
+					package.Source,	// the package SOURCE name
+					name,	// the search that returned this package
+					package.SourceUri,	// the full path to the file (if it's available)
+					fileName);	// a file name in case they want to download it...
+			}
 		}

 		/// <summary>


Don't cache the production location (it doesn't seem very inefficient anyways, and it fixes a test)

--- src/Configuration/Config.cs
+++ src/Configuration/Config.cs
@@ -29,12 +29,10 @@
         {
             get
             {
-                if (_location == null)
-                    _location = _getLocation();
-                return _location.Value;
+                return _getLocation();
             }
         }
-        private static DeploymentLocation? _location = null;
+
         private static DeploymentLocation _getLocation()
         {
             // Check the machine.config for the setting


refactor

refactor

--- src/ConsoleMenu/MenuUtil.cs
+++ src/ConsoleMenu/MenuUtil.cs
@@ -7,11 +7,14 @@
 {
 	public static class MenuUtil
 	{
+		private static readonly char[] Whitespace = new char[] { ' ', '\t' };
+
 		/// <summary>
 		/// Split the first word, separated by whitespace, from the rest of the string and return it.
 		/// </summary>
 		/// <param name="from">
-		/// String from which to select the first word. This parameter will be changed to exclude the split off word.
+		/// String from which to select the first word. This parameter will be changed to exclude the
+		/// split off word.
 		/// </param>
 		/// <returns>
 		/// First whitespace-separated word in argument.
@@ -22,7 +25,7 @@
 				throw new ArgumentNullException ("from");
 			}

-			var split = from.Split (new char[] { ' ', '\t' }, 2, StringSplitOptions.RemoveEmptyEntries);
+			var split = from.Split (Whitespace, 2, StringSplitOptions.RemoveEmptyEntries);
 			from = split.Length > 1 ? split[1].TrimStart () : "";
 			var word = split.Length > 0 ? split[0].Trim () : "";
 			return word;


Compare with remote version and check if can update

--- src/Magpie/Magpie/Services/MagpieService.cs
+++ src/Magpie/Magpie/Services/MagpieService.cs
@@ -64,6 +64,20 @@
             return appcast;
         }

+        protected virtual bool CanUpdate(RemoteAppcast appcast)
+        {
+            // todo: check registry
+            var curVer = Assembly.GetExecutingAssembly().GetName().Version;
+            var remVer = appcast.Version;
+
+            var isHigherVersionAvailable = remVer.Revision > curVer.Revision
+                   || remVer.Build > curVer.Build
+                   || remVer.Minor > curVer.Minor
+                   || remVer.Major > curVer.Major;
+            _logger.Log(string.Format("Higher version of app is {0}available", isHigherVersionAvailable ? "" : "not "));
+            return isHigherVersionAvailable;
+        }
+
         protected virtual void OnRemoteAppcastAvailableEvent(SingleEventArgs<RemoteAppcast> args)
         {
             var handler = RemoteAppcastAvailableEvent;


fixing bad RazoreGenerator output of maps.cshtml

--- src/Microsoft.Web.Helpers/Maps.generated.cs
+++ src/Microsoft.Web.Helpers/Maps.generated.cs
@@ -14,13 +14,13 @@
     using System;
     using System.Collections.Generic;

-    #line 3 "..\..\Maps.cshtml"
+    #line 3 "Maps.cshtml"
     using System.Diagnostics;

     #line default
     #line hidden

-    #line 6 "..\..\Maps.cshtml"
+    #line 6 "Maps.cshtml"
     using System.Globalization;

     #line default
@@ -34,7 +34,7 @@
     using System.Web.Security;
     using System.Web.UI;

-    #line 5 "..\..\Maps.cshtml"
+    #line 5 "Maps.cshtml"
     using System.Web.UI.WebControls;

     #line default
@@ -42,13 +42,13 @@
     using System.Web.WebPages;
     using System.Web.WebPages.Html;

-    #line 4 "..\..\Maps.cshtml"
+    #line 4 "Maps.cshtml"
     using System.Web.WebPages.Scope;

     #line default
     #line hidden

-    #line 7 "..\..\Maps.cshtml"
+    #line 7 "Maps.cshtml"
     using Microsoft.Internal.Web.Utils;

     #line default
@@ -58,7 +58,7 @@
     public class Maps : System.Web.WebPages.HelperPage
     {

-        #line 9 "..\..\Maps.cshtml"
+        #line 9 "Maps.cshtml"

     private const string DefaultWidth = "300px";
     private const string DefaultHeight = "300px";
@@ -180,7 +180,7 @@

-#line 147 "..\..\Maps.cshtml"
+#line 147 "Maps.cshtml"

     key = GetApiKey(key, _mapQuestApiKey);
     if (key.IsEmpty()) {
@@ -203,7 +203,7 @@

-#line 161 "..\..\Maps.cshtml"
+#line 161 "Maps.cshtml"
                                           WriteTo(@__razor_helper_writer, key);

 #line default
@@ -218,7 +218,7 @@

-#line 164 "..\..\Maps.cshtml"
+#line 164 "Maps.cshtml"
                                 WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -228,7 +228,7 @@

-#line 164 "..\..\Maps.cshtml"
+#line 164 "Maps.cshtml"
                                                WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -238,7 +238,7 @@

-#line 164 "..\..\Maps.cshtml"
+#line 164 "Maps.cshtml"
                                                       WriteTo(@__razor_helper_writer, Raw(loc));

 #line default
@@ -248,7 +248,7 @@

-#line 164 "..\..\Maps.cshtml"
+#line 164 "Maps.cshtml"
                                                                   WriteTo(@__razor_helper_writer, RawJS(type));

 #line default
@@ -258,7 +258,7 @@

-#line 165 "..\..\Maps.cshtml"
+#line 165 "Maps.cshtml"
              if (showZoomControl) {

 #line default
@@ -274,7 +274,7 @@

-#line 171 "..\..\Maps.cshtml"
+#line 171 "Maps.cshtml"
             }

 #line default
@@ -282,7 +282,7 @@

-#line 172 "..\..\Maps.cshtml"
+#line 172 "Maps.cshtml"
              if (!String.IsNullOrEmpty(location)) {

 #line default
@@ -295,7 +295,7 @@

-#line 175 "..\..\Maps.cshtml"
+#line 175 "Maps.cshtml"
                  WriteTo(@__razor_helper_writer, RawJS(location));

 #line default
@@ -307,7 +307,7 @@

-#line 178 "..\..\Maps.cshtml"
+#line 178 "Maps.cshtml"
             }

 #line default
@@ -315,7 +315,7 @@

-#line 179 "..\..\Maps.cshtml"
+#line 179 "Maps.cshtml"
              if (pushpins != null) {
                 foreach (var p in pushpins) {

@@ -328,7 +328,7 @@

-#line 181 "..\..\Maps.cshtml"
+#line 181 "Maps.cshtml"
                       WriteTo(@__razor_helper_writer, RawJS(p.Latitude));

 #line default
@@ -338,7 +338,7 @@

-#line 181 "..\..\Maps.cshtml"
+#line 181 "Maps.cshtml"
                                              WriteTo(@__razor_helper_writer, RawJS(p.Longitude));

 #line default
@@ -348,7 +348,7 @@

-#line 182 "..\..\Maps.cshtml"
+#line 182 "Maps.cshtml"
 	            }
             }

@@ -359,7 +359,7 @@

-#line 186 "..\..\Maps.cshtml"
+#line 186 "Maps.cshtml"

 #line default
@@ -369,7 +369,7 @@

-#line 187 "..\..\Maps.cshtml"
+#line 187 "Maps.cshtml"
 WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -379,7 +379,7 @@

-#line 187 "..\..\Maps.cshtml"
+#line 187 "Maps.cshtml"
         WriteTo(@__razor_helper_writer, TryParseUnit(width, DefaultWidth));

 #line default
@@ -389,7 +389,7 @@

-#line 187 "..\..\Maps.cshtml"
+#line 187 "Maps.cshtml"
                                                    WriteTo(@__razor_helper_writer, TryParseUnit(height, DefaultHeight));

 #line default
@@ -399,7 +399,7 @@

-#line 189 "..\..\Maps.cshtml"
+#line 189 "Maps.cshtml"
     if (showDirectionsLink) {

 #line default
@@ -409,7 +409,7 @@

-#line 190 "..\..\Maps.cshtml"
+#line 190 "Maps.cshtml"
                               WriteTo(@__razor_helper_writer, GetDirectionsQuery(location, latitude, longitude));

 #line default
@@ -419,7 +419,7 @@

-#line 190 "..\..\Maps.cshtml"
+#line 190 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, directionsLinkText);

 #line default
@@ -429,7 +429,7 @@

-#line 191 "..\..\Maps.cshtml"
+#line 191 "Maps.cshtml"
     }
     MapId++;

@@ -447,7 +447,7 @@

-#line 222 "..\..\Maps.cshtml"
+#line 222 "Maps.cshtml"

     key = GetApiKey(key, _bingApiKey);
     if (key.IsEmpty()) {
@@ -471,7 +471,7 @@

-#line 235 "..\..\Maps.cshtml"
+#line 235 "Maps.cshtml"
              if (useAdaptiveOverlay) {

 #line default
@@ -485,7 +485,7 @@

-#line 239 "..\..\Maps.cshtml"
+#line 239 "Maps.cshtml"
                                                WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -495,7 +495,7 @@

-#line 239 "..\..\Maps.cshtml"
+#line 239 "Maps.cshtml"
                                                                               WriteTo(@__razor_helper_writer, RawJS(key));

 #line default
@@ -505,7 +505,7 @@

-#line 239 "..\..\Maps.cshtml"
+#line 239 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(type));

 #line default
@@ -517,7 +517,7 @@

-#line 242 "..\..\Maps.cshtml"
+#line 242 "Maps.cshtml"
             } else {

 #line default
@@ -529,7 +529,7 @@

-#line 244 "..\..\Maps.cshtml"
+#line 244 "Maps.cshtml"
                                        WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -539,7 +539,7 @@

-#line 244 "..\..\Maps.cshtml"
+#line 244 "Maps.cshtml"
                                                                       WriteTo(@__razor_helper_writer, RawJS(key));

 #line default
@@ -549,7 +549,7 @@

-#line 244 "..\..\Maps.cshtml"
+#line 244 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(type));

 #line default
@@ -561,7 +561,7 @@

-#line 246 "..\..\Maps.cshtml"
+#line 246 "Maps.cshtml"
             }

 #line default
@@ -569,7 +569,7 @@

-#line 247 "..\..\Maps.cshtml"
+#line 247 "Maps.cshtml"
              if (latitude != null && longitude != null) {

 #line default
@@ -581,7 +581,7 @@

-#line 248 "..\..\Maps.cshtml"
+#line 248 "Maps.cshtml"
        WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -591,7 +591,7 @@

-#line 248 "..\..\Maps.cshtml"
+#line 248 "Maps.cshtml"
                                                   WriteTo(@__razor_helper_writer, RawJS(latitude));

 #line default
@@ -601,7 +601,7 @@

-#line 248 "..\..\Maps.cshtml"
+#line 248 "Maps.cshtml"
                                                                     WriteTo(@__razor_helper_writer, RawJS(longitude));

 #line default
@@ -611,7 +611,7 @@

-#line 249 "..\..\Maps.cshtml"
+#line 249 "Maps.cshtml"
             }
             else if (location != null) {

@@ -626,7 +626,7 @@

-#line 254 "..\..\Maps.cshtml"
+#line 254 "Maps.cshtml"
                                                             WriteTo(@__razor_helper_writer, RawJS(location));

 #line default
@@ -644,7 +644,7 @@

-#line 262 "..\..\Maps.cshtml"
+#line 262 "Maps.cshtml"
                     WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -659,7 +659,7 @@

-#line 269 "..\..\Maps.cshtml"
+#line 269 "Maps.cshtml"
             }

 #line default
@@ -667,7 +667,7 @@

-#line 270 "..\..\Maps.cshtml"
+#line 270 "Maps.cshtml"
              if (pushpins != null) {
                 foreach(var loc in pushpins) {

@@ -680,7 +680,7 @@

-#line 272 "..\..\Maps.cshtml"
+#line 272 "Maps.cshtml"
                                                                  WriteTo(@__razor_helper_writer, RawJS(loc.Latitude));

 #line default
@@ -690,7 +690,7 @@

-#line 272 "..\..\Maps.cshtml"
+#line 272 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(loc.Longitude));

 #line default
@@ -700,7 +700,7 @@

-#line 273 "..\..\Maps.cshtml"
+#line 273 "Maps.cshtml"
                 }
             }

@@ -709,7 +709,7 @@

-#line 275 "..\..\Maps.cshtml"
+#line 275 "Maps.cshtml"
              if (useAdaptiveOverlay) {

 #line default
@@ -723,7 +723,7 @@

-#line 280 "..\..\Maps.cshtml"
+#line 280 "Maps.cshtml"
             }

 #line default
@@ -733,7 +733,7 @@

-#line 283 "..\..\Maps.cshtml"
+#line 283 "Maps.cshtml"

 #line default
@@ -743,7 +743,7 @@

-#line 284 "..\..\Maps.cshtml"
+#line 284 "Maps.cshtml"
 WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -753,7 +753,7 @@

-#line 284 "..\..\Maps.cshtml"
+#line 284 "Maps.cshtml"
                                        WriteTo(@__razor_helper_writer, TryParseUnit(width, DefaultWidth));

 #line default
@@ -763,7 +763,7 @@

-#line 284 "..\..\Maps.cshtml"
+#line 284 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, TryParseUnit(height, DefaultHeight));

 #line default
@@ -773,7 +773,7 @@

-#line 286 "..\..\Maps.cshtml"
+#line 286 "Maps.cshtml"
     if (showDirectionsLink) {
         // Review: Need to figure out if the link needs to be localized.

@@ -784,7 +784,7 @@

-#line 288 "..\..\Maps.cshtml"
+#line 288 "Maps.cshtml"
                                         WriteTo(@__razor_helper_writer, GetDirectionsQuery(location, latitude, longitude));

 #line default
@@ -794,7 +794,7 @@

-#line 288 "..\..\Maps.cshtml"
+#line 288 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, directionsLinkText);

 #line default
@@ -804,7 +804,7 @@

-#line 289 "..\..\Maps.cshtml"
+#line 289 "Maps.cshtml"
     }
     MapId++;

@@ -822,7 +822,7 @@

-#line 316 "..\..\Maps.cshtml"
+#line 316 "Maps.cshtml"

     string mapElement = GetMapElementId();
     type = (type ?? "ROADMAP").ToUpperInvariant(); // Map types are in upper case
@@ -846,7 +846,7 @@

-#line 328 "..\..\Maps.cshtml"
+#line 328 "Maps.cshtml"
                                     WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -856,7 +856,7 @@

-#line 328 "..\..\Maps.cshtml"
+#line 328 "Maps.cshtml"
                                                            WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -866,7 +866,7 @@

-#line 328 "..\..\Maps.cshtml"
+#line 328 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(latitude));

 #line default
@@ -876,7 +876,7 @@

-#line 328 "..\..\Maps.cshtml"
+#line 328 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(longitude));

 #line default
@@ -886,7 +886,7 @@

-#line 328 "..\..\Maps.cshtml"
+#line 328 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(type));

 #line default
@@ -896,7 +896,7 @@

-#line 329 "..\..\Maps.cshtml"
+#line 329 "Maps.cshtml"
              if (!String.IsNullOrEmpty(location)) {

 #line default
@@ -908,7 +908,7 @@

-#line 331 "..\..\Maps.cshtml"
+#line 331 "Maps.cshtml"
                                WriteTo(@__razor_helper_writer, RawJS(location));

 #line default
@@ -927,7 +927,7 @@

-#line 339 "..\..\Maps.cshtml"
+#line 339 "Maps.cshtml"
             }

 #line default
@@ -935,7 +935,7 @@

-#line 340 "..\..\Maps.cshtml"
+#line 340 "Maps.cshtml"
              if (pushpins != null) {
                 foreach(var loc in pushpins) {

@@ -948,7 +948,7 @@

-#line 342 "..\..\Maps.cshtml"
+#line 342 "Maps.cshtml"
                                                             WriteTo(@__razor_helper_writer, RawJS(loc.Latitude));

 #line default
@@ -958,7 +958,7 @@

-#line 342 "..\..\Maps.cshtml"
+#line 342 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, RawJS(loc.Longitude));

 #line default
@@ -968,7 +968,7 @@

-#line 343 "..\..\Maps.cshtml"
+#line 343 "Maps.cshtml"
                 }
             }

@@ -979,7 +979,7 @@

-#line 347 "..\..\Maps.cshtml"
+#line 347 "Maps.cshtml"

 #line default
@@ -989,7 +989,7 @@

-#line 348 "..\..\Maps.cshtml"
+#line 348 "Maps.cshtml"
 WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -999,7 +999,7 @@

-#line 348 "..\..\Maps.cshtml"
+#line 348 "Maps.cshtml"
                     WriteTo(@__razor_helper_writer, TryParseUnit(width, DefaultWidth));

 #line default
@@ -1009,7 +1009,7 @@

-#line 348 "..\..\Maps.cshtml"
+#line 348 "Maps.cshtml"
                                                                WriteTo(@__razor_helper_writer, TryParseUnit(height, DefaultHeight));

 #line default
@@ -1019,7 +1019,7 @@

-#line 350 "..\..\Maps.cshtml"
+#line 350 "Maps.cshtml"
     if (showDirectionsLink) {

 #line default
@@ -1029,7 +1029,7 @@

-#line 351 "..\..\Maps.cshtml"
+#line 351 "Maps.cshtml"
                                  WriteTo(@__razor_helper_writer, GetDirectionsQuery(location, latitude, longitude));

 #line default
@@ -1039,7 +1039,7 @@

-#line 351 "..\..\Maps.cshtml"
+#line 351 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, directionsLinkText);

 #line default
@@ -1049,7 +1049,7 @@

-#line 352 "..\..\Maps.cshtml"
+#line 352 "Maps.cshtml"
     }
     MapId++;

@@ -1067,7 +1067,7 @@

-#line 381 "..\..\Maps.cshtml"
+#line 381 "Maps.cshtml"

     key = GetApiKey(key, _yahooApiKey);
     if (key.IsEmpty()) {
@@ -1083,7 +1083,7 @@

-#line 388 "..\..\Maps.cshtml"
+#line 388 "Maps.cshtml"
                                  WriteTo(@__razor_helper_writer, HttpUtility.UrlEncode(key));

 #line default
@@ -1098,7 +1098,7 @@

-#line 391 "..\..\Maps.cshtml"
+#line 391 "Maps.cshtml"
                          WriteTo(@__razor_helper_writer, RawJS(mapElement));

 #line default
@@ -1108,7 +1108,7 @@

-#line 393 "..\..\Maps.cshtml"
+#line 393 "Maps.cshtml"
 WriteTo(@__razor_helper_writer, RawJS(type));

 #line default
@@ -1118,7 +1118,7 @@

-#line 394 "..\..\Maps.cshtml"
+#line 394 "Maps.cshtml"
              if (latitude != null && longitude != null) {

 #line default
@@ -1130,7 +1130,7 @@

-#line 395 "..\..\Maps.cshtml"
+#line 395 "Maps.cshtml"
                         WriteTo(@__razor_helper_writer, RawJS(latitude));

 #line default
@@ -1140,7 +1140,7 @@

-#line 395 "..\..\Maps.cshtml"
+#line 395 "Maps.cshtml"
                                           WriteTo(@__razor_helper_writer, RawJS(longitude));

 #line default
@@ -1150,7 +1150,7 @@

-#line 395 "..\..\Maps.cshtml"
+#line 395 "Maps.cshtml"
                                                               WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -1160,7 +1160,7 @@

-#line 396 "..\..\Maps.cshtml"
+#line 396 "Maps.cshtml"
             }
             else if (!String.IsNullOrEmpty(location)) {

@@ -1173,7 +1173,7 @@

-#line 398 "..\..\Maps.cshtml"
+#line 398 "Maps.cshtml"
            WriteTo(@__razor_helper_writer, RawJS(location));

 #line default
@@ -1183,7 +1183,7 @@

-#line 398 "..\..\Maps.cshtml"
+#line 398 "Maps.cshtml"
                               WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -1193,7 +1193,7 @@

-#line 399 "..\..\Maps.cshtml"
+#line 399 "Maps.cshtml"
             }
             else {

@@ -1206,7 +1206,7 @@

-#line 401 "..\..\Maps.cshtml"
+#line 401 "Maps.cshtml"
      WriteTo(@__razor_helper_writer, zoom);

 #line default
@@ -1216,7 +1216,7 @@

-#line 402 "..\..\Maps.cshtml"
+#line 402 "Maps.cshtml"
             }

 #line default
@@ -1224,7 +1224,7 @@

-#line 403 "..\..\Maps.cshtml"
+#line 403 "Maps.cshtml"
              if(pushpins != null) {
                 foreach (var loc in pushpins) {

@@ -1237,7 +1237,7 @@

-#line 405 "..\..\Maps.cshtml"
+#line 405 "Maps.cshtml"
                      WriteTo(@__razor_helper_writer, RawJS(loc.Latitude));

 #line default
@@ -1247,7 +1247,7 @@

-#line 405 "..\..\Maps.cshtml"
+#line 405 "Maps.cshtml"
                                            WriteTo(@__razor_helper_writer, RawJS(loc.Longitude));

 #line default
@@ -1257,7 +1257,7 @@

-#line 406 "..\..\Maps.cshtml"
+#line 406 "Maps.cshtml"
                  }
             }

@@ -1268,7 +1268,7 @@

-#line 411 "..\..\Maps.cshtml"
+#line 411 "Maps.cshtml"

 #line default
@@ -1278,7 +1278,7 @@

-#line 412 "..\..\Maps.cshtml"
+#line 412 "Maps.cshtml"
 WriteTo(@__razor_helper_writer, mapElement);

 #line default
@@ -1288,7 +1288,7 @@

-#line 412 "..\..\Maps.cshtml"
+#line 412 "Maps.cshtml"
         WriteTo(@__razor_helper_writer, TryParseUnit(width, DefaultWidth));

 #line default
@@ -1298,7 +1298,7 @@

-#line 412 "..\..\Maps.cshtml"
+#line 412 "Maps.cshtml"
                                                    WriteTo(@__razor_helper_writer, TryParseUnit(height, DefaultHeight));

 #line default
@@ -1308,7 +1308,7 @@

-#line 414 "..\..\Maps.cshtml"
+#line 414 "Maps.cshtml"
     if (showDirectionsLink) {

 #line default
@@ -1318,7 +1318,7 @@

-#line 415 "..\..\Maps.cshtml"
+#line 415 "Maps.cshtml"
                              WriteTo(@__razor_helper_writer, GetDirectionsQuery(location, latitude, longitude, HttpUtility.UrlPathEncode));

 #line default
@@ -1328,7 +1328,7 @@

-#line 415 "..\..\Maps.cshtml"
+#line 415 "Maps.cshtml"
                                                                                WriteTo(@__razor_helper_writer, directionsLinkText);

 #line default
@@ -1338,7 +1338,7 @@

-#line 416 "..\..\Maps.cshtml"
+#line 416 "Maps.cshtml"
     }
     MapId++;


[FastCGI] Clean up WorkerRequest, using modern features

--- src/Mono.WebServer.FastCgi/WorkerRequest.cs
+++ src/Mono.WebServer.FastCgi/WorkerRequest.cs
@@ -29,8 +29,7 @@

 using System;
 using System.Collections.Generic;
-using Mono.FastCgi;
-using Mono.WebServer;
+using System.Linq;
 using System.Text;
 using System.Net;
 using System.Globalization;
@@ -50,16 +49,16 @@
 			SetDefaultIndexFiles (System.Configuration.ConfigurationManager.AppSettings ["MonoServerDefaultIndexFiles"]);
 		}

-		private StringBuilder headers = new StringBuilder ();
-		private Responder responder;
-		private byte [] input_data;
-		private string file_path;
-		string raw_url = null;
-		private bool closed = false;
-		string uri_path = null;
-		private string [][] unknownHeaders = null;
-		private string [] knownHeaders = null;
-		string path_info;
+		StringBuilder headers = new StringBuilder ();
+		readonly Responder responder;
+		readonly byte [] input_data;
+		string file_path;
+		string raw_url;
+		bool closed;
+		string uri_path;
+		string [][] unknownHeaders;
+		string [] knownHeaders;
+		readonly string path_info;

 		public WorkerRequest (Responder responder, ApplicationHost appHost) : base (appHost)
 		{
@@ -102,7 +101,7 @@
 				return;

 			closed = true;
-			this.EnsureHeadersSent ();
+			EnsureHeadersSent ();
 			responder.CompleteRequest (0);
 		}
 		public override void SendResponseFromMemory (byte [] data, int length)
@@ -158,14 +157,14 @@
 				return raw_url;
 			}

-			StringBuilder b = new StringBuilder (GetUriPath ());
+			var builder = new StringBuilder (GetUriPath ());
 			string query = GetQueryString ();
-			if (query != null && query.Length > 0) {
-				b.Append ('?');
-				b.Append (query);
-			}
-
-			raw_url = b.ToString ();
+			if (!string.IsNullOrEmpty(query)) {
+				builder.Append ('?');
+				builder.Append (query);
+			}
+
+			raw_url = builder.ToString ();
 			return raw_url;
 		}

@@ -190,17 +189,17 @@
 		public override string GetLocalAddress ()
 		{
 			string address = responder.GetParameter ("SERVER_ADDR");
-			if (address != null && address.Length > 0)
+			if (!string.IsNullOrEmpty(address))
 				return address;

 			address = AddressFromHostName (
 				responder.GetParameter ("HTTP_HOST"));
-			if (address != null && address.Length > 0)
+			if (!string.IsNullOrEmpty(address))
 				return address;

 			address = AddressFromHostName (
 				responder.GetParameter ("SERVER_NAME"));
-			if (address != null && address.Length > 0)
+			if (!string.IsNullOrEmpty(address))
 				return address;

 			return base.GetLocalAddress ();
@@ -231,14 +230,14 @@
 		public override string GetRemoteAddress ()
 		{
 			string addr = responder.GetParameter ("REMOTE_ADDR");
-			return addr != null && addr.Length > 0 ?
+			return !string.IsNullOrEmpty(addr) ?
 				addr : base.GetRemoteAddress ();
 		}

 		public override string GetRemoteName ()
 		{
 			string ip = GetRemoteAddress ();
-			string name = null;
+			string name;
 			try {
 				IPHostEntry entry = Dns.GetHostEntry (ip);
 				name = entry.HostName;
@@ -252,7 +251,7 @@
 		public override int GetRemotePort ()
 		{
 			string port = responder.GetParameter ("REMOTE_PORT");
-			if (port == null || port.Length == 0)
+			if (string.IsNullOrEmpty(port))
 				return base.GetRemotePort ();

 			try {
@@ -264,12 +263,9 @@

 		public override string GetServerVariable (string name)
 		{
-			string value = responder.GetParameter (name);
-
-			if (value == null)
-				value = Environment.GetEnvironmentVariable (name);
-
-			return value != null ? value : base.GetServerVariable (name);
+			return (responder.GetParameter (name)
+				?? Environment.GetEnvironmentVariable (name))
+				?? base.GetServerVariable (name);
 		}

@@ -296,7 +292,7 @@

 			string path = responder.PhysicalPath;

-			DirectoryInfo dir = new DirectoryInfo (path);
+			var dir = new DirectoryInfo (path);

 			if (!dir.Exists)
 				return file_path;
@@ -337,7 +333,7 @@

 			IDictionary<string,string> pairs = responder.GetParameters ();
 			knownHeaders = new string [RequestHeaderMaximum];
-			string [][] headers = new string [pairs.Count][];
+			var headers = new string [pairs.Count][];
 			int count = 0;

 			foreach (string key in pairs.Keys) {
@@ -345,7 +341,7 @@
 					continue;

 				string name  = ReformatHttpHeader (key);
-				string value = (string) pairs [key];
+				string value = pairs [key];
 				int id = GetKnownRequestHeaderIndex (name);

 				if (id >= 0) {
@@ -353,25 +349,25 @@
 					continue;
 				}

-				headers [count++] = new string [] {name, value};
+				headers [count++] = new[] {name, value};
 			}

 			unknownHeaders = new string [count][];
-			System.Array.Copy (headers, 0, unknownHeaders, 0, count);
+			Array.Copy (headers, 0, unknownHeaders, 0, count);

 			return unknownHeaders;
 		}

 		public override string GetKnownRequestHeader (int index)
 		{
-			string value = null;
+			string value;
 			switch (index)
 			{
-			case System.Web.HttpWorkerRequest.HeaderContentType:
+			case HeaderContentType:
 				value = responder.GetParameter ("CONTENT_TYPE");
 				break;

-			case System.Web.HttpWorkerRequest.HeaderContentLength:
+			case HeaderContentLength:
 				value = responder.GetParameter ("CONTENT_LENGTH");
 				break;
 			default:
@@ -380,23 +376,14 @@
 				break;
 			}

-			return (value != null) ?
-				value : base.GetKnownRequestHeader (index);
+			return value ?? base.GetKnownRequestHeader (index);
 		}

 		public override string GetServerName ()
 		{
-			string server_name = HostNameFromString (
-				responder.GetParameter ("SERVER_NAME"));
-
-			if (server_name == null)
-				server_name = HostNameFromString (
-					responder.GetParameter ("HTTP_HOST"));
-
-			if (server_name == null)
-				server_name = GetLocalAddress ();
-
-			return server_name;
+			return (HostNameFromString (responder.GetParameter ("SERVER_NAME"))
+				?? HostNameFromString (responder.GetParameter ("HTTP_HOST")))
+				?? GetLocalAddress ();
 		}

 		public override byte [] GetPreloadedEntityBody ()
@@ -422,13 +409,13 @@

 		private void EnsureHeadersSent ()
 		{
-			if (headers != null) {
-				headers.Append ("\r\n");
-				string str = headers.ToString ();
-				responder.SendOutput (str,
-					HeaderEncoding);
-				headers = null;
-			}
+			if (headers == null)
+				return;
+
+			headers.Append ("\r\n");
+			string str = headers.ToString ();
+			responder.SendOutput (str, HeaderEncoding);
+			headers = null;
 		}

 		#endregion
@@ -442,7 +429,7 @@
 			if (host == null || host.Length > 126)
 				return null;

-			System.Net.IPAddress [] addresses = null;
+			IPAddress [] addresses;
 			try {
 				addresses = Dns.GetHostAddresses (host);
 			} catch (System.Net.Sockets.SocketException) {
@@ -459,7 +446,7 @@

 		private static string HostNameFromString (string host)
 		{
-			if (host == null || host.Length == 0)
+			if (string.IsNullOrEmpty(host))
 				return null;

 			int colon_index = host.IndexOf (':');
@@ -496,15 +483,15 @@
 		{
 			if (list == null)
 				return;
-
-			List<string> files = new List<string> ();
+
+			var files = new List<string> ();

 			string [] fs = list.Split (',');
 			foreach (string f in fs) {
 				string trimmed = f.Trim ();
-				if (trimmed == "")
+				if (trimmed.Length == 0)
 					continue;
-
+
 				files.Add (trimmed);
 			}


Version upped

Version upped

--- src/NadekoBot/Services/Impl/StatsService.cs
+++ src/NadekoBot/Services/Impl/StatsService.cs
@@ -18,7 +18,7 @@
         private readonly IBotCredentials _creds;
         private readonly DateTime _started;

-        public const string BotVersion = "1.4";
+        public const string BotVersion = "1.41-alpha";

         public string Author => "Kwoth#2560";
         public string Library => "Discord.Net";


Fix copyright and using directives for PurityTest.

--- src/NodaTime.Test/Annotations/PurityTest.cs
+++ src/NodaTime.Test/Annotations/PurityTest.cs
@@ -1,13 +1,11 @@
-// Copyright 2011 The Noda Time Authors. All rights reserved.
+// Copyright 2013 The Noda Time Authors. All rights reserved.
 // Use of this source code is governed by the Apache License 2.0,
 // as found in the LICENSE.txt file.
-using System;
+using JetBrains.Annotations;
+using NUnit.Framework;
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
-using System.Text;
-using JetBrains.Annotations;
-using NUnit.Framework;

 namespace NodaTime.Test.Annotations
 {


Make sure we specify an AssemblyIdentityCompare in project.json project system

--- src/OmniSharp.DotNet/DotNetProjectSystem.cs
+++ src/OmniSharp.DotNet/DotNetProjectSystem.cs
@@ -348,6 +348,7 @@
             }

             var csharpOptions = new CSharpCompilationOptions(outputKind)
+                .WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default)
                 .WithAllowUnsafe(option.AllowUnsafe ?? false)
                 .WithPlatform(ParsePlatfrom(option.Platform))
                 .WithGeneralDiagnosticOption(generalDiagnosticOpt)


use IgnoreCorLibraryDuplicatedTypes in ScriptProjectSystem

--- src/OmniSharp.Script/ScriptProjectSystem.cs
+++ src/OmniSharp.Script/ScriptProjectSystem.cs
@@ -65,6 +65,11 @@
             _env = env;
             _logger = loggerFactory.CreateLogger<ScriptProjectSystem>();
             _projects = new Dictionary<string, ProjectInfo>();
+
+            var topLevelBinderFlagsProperty = typeof(CSharpCompilationOptions).GetProperty("TopLevelBinderFlags", BindingFlags.Instance | BindingFlags.NonPublic);
+            var binderFlagsType = typeof(CSharpCompilationOptions).GetTypeInfo().Assembly.GetType("Microsoft.CodeAnalysis.CSharp.BinderFlags");
+            var ignoreCorLibraryDuplicatedTypesMember = binderFlagsType.GetField("IgnoreCorLibraryDuplicatedTypes", BindingFlags.Static | BindingFlags.Public);
+            topLevelBinderFlagsProperty.SetValue(CompilationOptions, ignoreCorLibraryDuplicatedTypesMember.GetValue(null));
         }

         public string Key => "Script";
@@ -96,14 +101,16 @@
             var runtimeContexts = File.Exists(Path.Combine(_env.Path, "project.json")) ? ProjectContext.CreateContextForEachTarget(_env.Path) : null;

             var commonReferences = new HashSet<MetadataReference>();
+
+            // and add mscorlib
+            AddMetadataReference(commonReferences, typeof(object).GetTypeInfo().Assembly.Location);
+
             // if we have no context, then we also have no dependencies
             // we can assume desktop framework
-            // and add mscorlib
             if (runtimeContexts == null || runtimeContexts.Any() == false)
             {
                 _logger.LogInformation("Unable to find project context for CSX files. Will default to non-context usage.");

-                AddMetadataReference(commonReferences, typeof(object).GetTypeInfo().Assembly.Location);
                 AddMetadataReference(commonReferences, typeof(Enumerable).GetTypeInfo().Assembly.Location);

                 inheritedCompileLibraries.AddRange(DependencyContext.Default.CompileLibraries.Where(x =>


Adding logging for FlowControl event

Adding logging for FlowControl event

--- src/RawRabbit/Common/PublishAcknowledger.cs
+++ src/RawRabbit/Common/PublishAcknowledger.cs
@@ -62,6 +62,10 @@
 				}

 			};
+			_channel.FlowControl += (sender, args) =>
+			{
+				_logger.LogInformation($"The flow control event has been raised on channel '{_channel.ChannelNumber}'. Active: {args.Active}.");
+			};
 			channel.ConfirmSelect();
 		}


27: EsParserBase<E,A>

27: EsParserBase<E,A>

--- src/SharpConnect.Data/TreeModel/EsParser.cs
+++ src/SharpConnect.Data/TreeModel/EsParser.cs
@@ -3,13 +3,13 @@
 using System.Collections.Generic;
 using System.Text;

-namespace SharpConnect.Data
+namespace SharpConnect.Es
 {

     /// <summary>
     /// event-driven json-like parser
     /// </summary>
-    abstract class EsParserBase
+    public abstract class EsParserBase
     {
         enum EsElementKind
         {
@@ -795,4 +795,179 @@
             return p1 + p2 + p3 + p4;
         }
     }
+
+
+
+    public abstract class EsParserBase<E, A> : EsParserBase
+        where E : class
+        where A : class
+    {
+        enum CurrentObject
+        {
+            Object,
+            Array
+        }
+
+        Stack<string> keyStack = new Stack<string>();
+        Stack<object> elemStack = new Stack<object>();
+        object currentElem = null;
+        string currentKey = null;
+
+
+
+
+        public EsParserBase()
+        {
+
+        }
+        protected abstract E createElement();
+        protected abstract A createArray();
+        protected abstract void addElementAttribute(E targetElem, string key, object value);
+        protected abstract void addArrayElement(A targetArray, object value);
+
+        protected override void OnParseStart()
+        {
+
+        }
+        protected override void BeginObject()
+        {
+            if (currentKey != null)
+            {
+                keyStack.Push(currentKey);
+            }
+            currentKey = null;
+            if (currentElem != null)
+            {
+                elemStack.Push(currentElem);
+            }
+            currentElem = createElement();
+        }
+        void InternalPopCurrentObjectAndPushToPrevContext()
+        {
+            //current element should be object
+            object c_object = currentElem;
+            if (elemStack.Count > 0)
+            {
+                //pop from stack
+                currentElem = elemStack.Pop();
+                currentKey = null;
+                if (c_object == currentElem)
+                {
+                    throw new System.Exception();
+                }
+
+                E c_elem = null;
+                A c_arr = null;
+                if ((c_elem = currentElem as E) != null)
+                {
+                    currentKey = keyStack.Pop();
+                    addElementAttribute(c_elem, currentKey, c_object);
+                }
+                else if ((c_arr = currentElem as A) != null)
+                {
+                    addArrayElement(c_arr, c_object);
+                }
+                else
+                {
+                    throw new System.NotSupportedException();
+                }
+            }
+        }
+        protected override void EndObject()
+        {
+            InternalPopCurrentObjectAndPushToPrevContext();
+        }
+        protected override void BeginArray()
+        {
+            if (currentKey != null)
+            {
+                keyStack.Push(currentKey);
+            }
+            currentKey = null;
+            if (currentElem != null)
+            {
+                elemStack.Push(currentElem);
+            }
+            currentElem = createArray();
+        }
+        protected override void EndArray()
+        {
+            InternalPopCurrentObjectAndPushToPrevContext();
+        }
+        protected override void OnParseEnd()
+        {
+
+        }
+        protected override void NewKey(StringBuilder tmpBuffer, ValueHint valueHint)
+        {
+            currentKey = tmpBuffer.ToString();
+
+        }
+        protected override void NewValue(StringBuilder tmpBuffer, ValueHint valueHint)
+        {
+            object c_object = null;
+            switch (valueHint)
+            {
+                default:
+                case ValueHint.Comment:
+                    throw new System.NotSupportedException();
+                case ValueHint.Identifier:
+                    string iden = tmpBuffer.ToString();
+                    switch (iden)
+                    {
+                        case "true":
+                            c_object = true;
+                            break;
+                        case "false":
+                            c_object = false;
+                            break;
+                        case "null":
+                            c_object = null;
+                            break;
+                        default:
+                            c_object = iden;
+                            break;
+                    }
+                    break;
+                case ValueHint.StringLiteral:
+                    c_object = tmpBuffer.ToString();
+                    break;
+                case ValueHint.IntegerNumber:
+                    c_object = int.Parse(tmpBuffer.ToString());
+                    break;
+                case ValueHint.NumberWithFractionPart:
+                case ValueHint.NumberWithSignedExponentialPart:
+                case ValueHint.NumberWithExponentialPart:
+                    c_object = double.Parse(tmpBuffer.ToString());
+                    break;
+
+            }
+
+            E c_elem = null;
+            A c_arr = null;
+            if ((c_elem = currentElem as E) != null)
+            {
+                currentKey = keyStack.Pop();
+                addElementAttribute(c_elem, currentKey, c_object);
+            }
+            else if ((c_arr = currentElem as A) != null)
+            {
+                addArrayElement(c_arr, c_object);
+            }
+            else
+            {
+                throw new System.NotSupportedException();
+            }
+
+        }
+        protected override void NotifyError()
+        {
+            base.NotifyError();
+        }
+        protected override void OnError(ref int currentIndex)
+        {
+            base.OnError(ref currentIndex);
+        }
+        public object CurrentElement { get { return currentElem; } }
+    }
 }


BUGFIX Soql: SoqlUnaryNegationExpression.Simplify.

--- src/Sooda/QL/SoqlUnaryNegationExpression.cs
+++ src/Sooda/QL/SoqlUnaryNegationExpression.cs
@@ -50,7 +50,7 @@

         public override SoqlExpression Simplify()
         {
-            par = (SoqlBooleanExpression)par.Simplify();
+            par = par.Simplify();
             return this;
         }


Adding convenience properties to UserInformation

--- src/Uri.Grammar/userinfo/UserInformation.cs
+++ src/Uri.Grammar/userinfo/UserInformation.cs
@@ -8,5 +8,38 @@
             : base(sequence)
         {
         }
+
+        public string Password
+        {
+            get
+            {
+                var indexOfSeparator = this.Value.IndexOf(':');
+                if (indexOfSeparator == -1)
+                {
+                    return null;
+                }
+
+                return this.Value.Substring(indexOfSeparator + 1);
+            }
+        }
+
+        public string UserName
+        {
+            get
+            {
+                if (this.Value == string.Empty)
+                {
+                    return null;
+                }
+
+                var indexOfSeparator = this.Value.IndexOf(':');
+                if (indexOfSeparator == -1)
+                {
+                    return this.Value;
+                }
+
+                return this.Value.Substring(0, indexOfSeparator);
+            }
+        }
     }
 }


Fixed Improved ribbon lookup performance with 4.1

--- src/VcEngineAutomation/Ribbons/RibbonTab.cs
+++ src/VcEngineAutomation/Ribbons/RibbonTab.cs
@@ -372,7 +372,11 @@
             /*var toolBar = TabPage.FindAllChildren(cf => cf.ByControlType(ControlType.ToolBar))
                 .FirstOrDefault(t => t.FindChildAt(0).AutomationId.StartsWith($"{TabPage.AutomationId}{groupAutomationId}"));
             var automationElement = toolBar.FindFirstChild(cf => cf.ByAutomationId($"{TabPage.AutomationId}{groupAutomationId}{itemAutomationId}"));*/
-            var automationElement = TabPage.FindFirstDescendant(cf => cf.ByAutomationId($"{TabPage.AutomationId}{groupAutomationId}{itemAutomationId}"));
+
+            var automationElement = vcEngine.IsR9OrAbove
+                ? TabPage.FindFirstChild(cf => cf.ByAutomationId($"{TabPage.AutomationId}{groupAutomationId}"))?.FindFirstChild(cf => cf.ByAutomationId($"{TabPage.AutomationId}{groupAutomationId}{itemAutomationId}"))
+                : TabPage.FindFirstDescendant(cf => cf.ByAutomationId($"{TabPage.AutomationId}{groupAutomationId}{itemAutomationId}"));
+
             if (automationElement != null)
             {
                 Wait.UntilResponsive(automationElement, TimeSpan.FromSeconds(5));


bug fix

bug fix

--- DataTableWriter/Drivers/MsSQLDriver.cs
+++ DataTableWriter/Drivers/MsSQLDriver.cs
@@ -149,7 +149,6 @@
         /// <returns>MS SQL query that will retrieve the names and types of all columns in the designated table.</returns>
         public string BuildQueryColumnNamesAndTypes(string tableName, bool excludeIdentityColumn = true)
         {
-            //TODO: check this!
             var excludeIdentityColumnClause = excludeIdentityColumn ? "AND upper(COLUMN_NAME) != 'ID'" : "";
             return String.Format(" SELECT COLUMN_NAME AS name, DATA_TYPE AS type, IS_NULLABLE AS nullable FROM INFORMATION_SCHEMA.COLUMNS "
                 + "WHERE upper(table_name) = '{0}' {1}", tableName.ToUpper(), excludeIdentityColumnClause);


Fix widget snapping while loading

Fix widget snapping while loading

--- DesktopWidgets/View/WidgetView.xaml.cs
+++ DesktopWidgets/View/WidgetView.xaml.cs
@@ -57,7 +57,12 @@
             _mouseChecker.Start();

             ViewModel.OnLoad();
-        }
+
+            HasLoaded = true;
+        }
+
+        public bool HasLoaded { private get; set; }
+        public bool HasSourceLoaded { private get; set; }

         public WidgetViewModelBase ViewModel { get; set; }

@@ -73,6 +78,8 @@
         public bool IsClosed { get; set; }

         public Win32App ThisApp { get; set; }
+
+        public bool IsRefreshing { get; set; }

         private void SetupWidgetControl()
         {
@@ -155,6 +162,8 @@
             ViewModel.OnUiLoad();

             //FocusMainElement();
+
+            HasSourceLoaded = true;
         }

         private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
@@ -264,6 +273,7 @@

         private void Refresh(bool resetContext, bool updateNonUi, bool showIntro, bool updateOpacity)
         {
+            IsRefreshing = true;
             var isVisible = IsVisible;
             Opacity = 0;
             if (!isVisible)
@@ -295,6 +305,8 @@
                 Hide();
             if (updateOpacity)
                 Opacity = 1;
+
+            IsRefreshing = false;

             if (showIntro && !_mouseChecker.KeepOpenForIntro)
                 ShowIntro();
@@ -330,7 +342,7 @@

         private void WidgetView_OnLocationChanged(object sender, EventArgs e)
         {
-            if (Settings.SnapToScreenEdges && !Settings.IsDocked)
+            if (HasSourceLoaded && !IsRefreshing && Settings.SnapToScreenEdges && !Settings.IsDocked)
             {
                 var newLoc = this.Snap(true, Settings.IgnoreAppBars);
                 ViewModel.Left = newLoc.X;


Undock AppBar widgets on close

Undock AppBar widgets on close

--- DesktopWidgets/View/WidgetView.xaml.cs
+++ DesktopWidgets/View/WidgetView.xaml.cs
@@ -452,6 +452,10 @@
                 ViewModel?.OnClose();
                 ViewModel = null;
                 SaveScrollPosition();
+                if (_currentAppBarEdge != ABEdge.None)
+                {
+                    SetAsAppBar(ABEdge.None);
+                }
             }
             catch
             {


Updated and improved ITypeDrawer and IDefaultInstanceCreator templates

--- Addons/Entitas.Unity.VisualDebugging/Assets/Entitas.Unity.VisualDebugging/Entity/Editor/Entity/EntityDrawer.cs
+++ Addons/Entitas.Unity.VisualDebugging/Assets/Entitas.Unity.VisualDebugging/Entity/Editor/Entity/EntityDrawer.cs
@@ -322,16 +322,20 @@
         static void generateIDefaultInstanceCreator(string typeName) {
             var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig());
             var folder = config.defaultInstanceCreatorFolderPath;
-            var filePath = folder + "Default_type_InstanceCreator.cs";
-            var template = string.Format(DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT, typeName);
+            var filePath = folder + "Default" + typeName.ShortTypeName() + "InstanceCreator.cs";
+            var template = DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT
+                .Replace("${Type}", typeName)
+                .Replace("${ShortType}", typeName.ShortTypeName());
             generateTemplate(folder, filePath, template);
         }

         static void generateITypeDrawer(string typeName) {
             var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig());
             var folder = config.typeDrawerFolderPath;
-            var filePath = folder + "Type_TypeDrawer.cs";
-            var template = string.Format(TYPE_DRAWER_TEMPLATE_FORMAT, typeName);
+            var filePath = folder + typeName.ShortTypeName() + "TypeDrawer.cs";
+            var template = TYPE_DRAWER_TEMPLATE_FORMAT
+                .Replace("${Type}", typeName)
+                .Replace("${ShortType}", typeName.ShortTypeName());
             generateTemplate(folder, filePath, template);
         }

@@ -340,43 +344,44 @@
                 Directory.CreateDirectory(folder);
             }
             File.WriteAllText(filePath, template);
+            EditorApplication.isPlaying = false;
             AssetDatabase.Refresh();
-            EditorApplication.isPlaying = false;
             Selection.activeObject = AssetDatabase.LoadMainAssetAtPath(filePath);
         }

-        const string DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT = @"using System;
+        const string DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT =
+@"using System;
 using Entitas.Unity.VisualDebugging;

-// Please rename the class and the file
-public class Default_type_InstanceCreator : IDefaultInstanceCreator {{
-
-    public bool HandlesType(Type type) {{
-        return type == typeof({0});
-    }}
-
-    public object CreateDefault(Type type) {{
-        // return an instance of type {0}
+public class Default${ShortType}InstanceCreator : IDefaultInstanceCreator {
+
+    public bool HandlesType(Type type) {
+        return type == typeof(${Type});
+    }
+
+    public object CreateDefault(Type type) {
+        // TODO return an instance of type ${Type}
         throw new NotImplementedException();
-    }}
-}}
+    }
+}
 ";

-        const string TYPE_DRAWER_TEMPLATE_FORMAT = @"using System;
+        const string TYPE_DRAWER_TEMPLATE_FORMAT =
+@"using System;
 using Entitas;
 using Entitas.Unity.VisualDebugging;

-// Please rename the class and the file
-public class Type_TypeDrawer : ITypeDrawer {{
-
-    public bool HandlesType(Type type) {{
-        return type == typeof({0});
-    }}
-
-    public object DrawAndGetNewValue(Type memberType, string memberName, object value, IEntity entity, int index, IComponent component) {{
-        // draw the type {0}
+public class ${ShortType}TypeDrawer : ITypeDrawer {
+
+    public bool HandlesType(Type type) {
+        return type == typeof(${Type});
+    }
+
+    public object DrawAndGetNewValue(Type memberType, string memberName, object value, IComponent component) {
+        // TODO draw the type ${Type}
         throw new NotImplementedException();
-    }}
-}}";
     }
 }
+";
+    }
+}


moved graph rendering objects to own class

--- rgatCore/Widgets/PreviewGraphsWidget.cs
+++ rgatCore/Widgets/PreviewGraphsWidget.cs
@@ -102,12 +102,14 @@
 		private static DeviceBuffer _WireframeIndexBuffer;
 		*/

-        Dictionary<uint, perPreviewData> graphicInfos = new Dictionary<uint, perPreviewData>();
+        Dictionary<uint, GraphRenderObject> graphicInfos = new Dictionary<uint, GraphRenderObject>();

         //TODO: move a bunch of the functionality into this class, maybe use it from maingraph widget too
-        private class perPreviewData
-        {
-
+        private class GraphRenderObject
+        {
+            public GraphRenderObject(PlottedGraph _graph) => graph = _graph;
+
+            PlottedGraph graph;
             public  Pipeline _linesPipeline;
             public VertexPositionColor[] _LineVertices;
             public DeviceBuffer _LineVertexBuffer;
@@ -124,43 +126,89 @@
             public DeviceBuffer _projectionBuffer;
             public DeviceBuffer _viewBuffer;

-        }
-
-
-
-        static void InitLineVertexData(GraphicsDevice _gd, PlottedGraph graph, perPreviewData renderInfo)
-        {
-
-            if (!(graph.previewlines.safe_get_vert_array(out renderInfo._LineVertices)))
-            {
-                Console.WriteLine("Unhandled error 1");
-            }
-
-            Console.WriteLine($"Initing graph with {renderInfo._LineVertices.Length} line verts");
-
-            ResourceFactory factory = _gd.ResourceFactory;
-            if (renderInfo._LineIndexBuffer != null)
-            {
-                renderInfo._LineIndexBuffer.Dispose();
-                renderInfo._LineVertexBuffer.Dispose();
-            }
-
-            BufferDescription vbDescription = new BufferDescription(
-                (uint)renderInfo._LineVertices.Length * VertexPositionColor.SizeInBytes, BufferUsage.VertexBuffer);
-            renderInfo._LineVertexBuffer = factory.CreateBuffer(vbDescription);
-            _gd.UpdateBuffer(renderInfo._LineVertexBuffer, 0, renderInfo._LineVertices);
-
-
-            List<ushort> lineIndices = Enumerable.Range(0, renderInfo._LineVertices.Length)
-                .Select(i => (ushort)i)
-                .ToList();
-
-            BufferDescription ibDescription = new BufferDescription((uint)lineIndices.Count * sizeof(ushort), BufferUsage.IndexBuffer);
-            renderInfo._LineIndexBuffer = factory.CreateBuffer(ibDescription);
-            _gd.UpdateBuffer(renderInfo._LineIndexBuffer, 0, lineIndices.ToArray());
-        }
-
-        static void InitNodeVertexData(GraphicsDevice _gd, PlottedGraph graph, perPreviewData renderInfo)
+            public void InitLineVertexData(GraphicsDevice _gd)
+            {
+
+                if (!(graph.previewlines.safe_get_vert_array(out _LineVertices)))
+                {
+                    Console.WriteLine("Unhandled error 1");
+                }
+
+                Console.WriteLine($"Initing graph with {_LineVertices.Length} line verts");
+
+                ResourceFactory factory = _gd.ResourceFactory;
+                if (_LineIndexBuffer != null)
+                {
+                    _LineIndexBuffer.Dispose();
+                    _LineVertexBuffer.Dispose();
+                }
+
+                BufferDescription vbDescription = new BufferDescription(
+                    (uint)_LineVertices.Length * VertexPositionColor.SizeInBytes, BufferUsage.VertexBuffer);
+                _LineVertexBuffer = factory.CreateBuffer(vbDescription);
+                _gd.UpdateBuffer(_LineVertexBuffer, 0, _LineVertices);
+
+
+                List<ushort> lineIndices = Enumerable.Range(0, _LineVertices.Length)
+                    .Select(i => (ushort)i)
+                    .ToList();
+
+                BufferDescription ibDescription = new BufferDescription((uint)lineIndices.Count * sizeof(ushort), BufferUsage.IndexBuffer);
+                _LineIndexBuffer = factory.CreateBuffer(ibDescription);
+                _gd.UpdateBuffer(_LineIndexBuffer, 0, lineIndices.ToArray());
+            }
+
+            public ResourceLayout SetupProjectionBuffers(ResourceFactory factory)
+            {
+                ResourceLayoutElementDescription pb = new ResourceLayoutElementDescription("ProjectionBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
+                ResourceLayoutElementDescription vb = new ResourceLayoutElementDescription("ViewBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
+                ResourceLayoutElementDescription wb = new ResourceLayoutElementDescription("WorldBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
+                ResourceLayout projViewLayout = factory.CreateResourceLayout(new ResourceLayoutDescription(pb, vb, wb));
+                _worldBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
+                _projectionBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
+                _viewBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
+                _projViewSet = factory.CreateResourceSet(new ResourceSetDescription(projViewLayout, _projectionBuffer, _viewBuffer, _worldBuffer));
+                return projViewLayout;
+            }
+
+
+
+
+
+            public void DrawLines(CommandList _cl)
+            {
+                _cl.SetVertexBuffer(0, _LineVertexBuffer);
+                _cl.SetIndexBuffer(_LineIndexBuffer, IndexFormat.UInt16);
+                _cl.SetPipeline(_linesPipeline);
+                _cl.SetGraphicsResourceSet(0, _projViewSet);
+                _cl.DrawIndexed(
+                    indexCount: (uint)_LineVertices.Length,
+                    instanceCount: 1,
+                    indexStart: 0,
+                    vertexOffset: 0,
+                    instanceStart: 0);
+            }
+
+            public void DrawPoints(CommandList _cl)
+            {
+                _cl.SetVertexBuffer(0, _PointVertexBuffer);
+                _cl.SetIndexBuffer(_PointIndexBuffer, IndexFormat.UInt16);
+                _cl.SetPipeline(_pointsPipeline);
+                _cl.SetGraphicsResourceSet(0, _projViewSet);
+                _cl.DrawIndexed(
+                    indexCount: (uint)_PointVertices.Length,
+                    instanceCount: 1,
+                    indexStart: 0,
+                    vertexOffset: 0,
+                    instanceStart: 0);
+            }
+        }
+
+
+
+
+
+        static void InitNodeVertexData(GraphicsDevice _gd, PlottedGraph graph, GraphRenderObject renderInfo)
         {

             if (!(graph.previewnodes.safe_get_vert_array(out renderInfo._PointVertices)))
@@ -200,17 +248,25 @@
         }

-        private static ResourceLayout SetupProjectionBuffers(ResourceFactory factory, perPreviewData renderInfo)
-        {
-            ResourceLayoutElementDescription pb = new ResourceLayoutElementDescription("ProjectionBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
-            ResourceLayoutElementDescription vb = new ResourceLayoutElementDescription("ViewBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
-            ResourceLayoutElementDescription wb = new ResourceLayoutElementDescription("WorldBuffer", ResourceKind.UniformBuffer, ShaderStages.Vertex);
-            ResourceLayout projViewLayout = factory.CreateResourceLayout(new ResourceLayoutDescription(pb, vb, wb));
-            renderInfo._worldBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
-            renderInfo._projectionBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
-            renderInfo._viewBuffer = factory.CreateBuffer(new BufferDescription(64, BufferUsage.UniformBuffer));
-            renderInfo._projViewSet = factory.CreateResourceSet(new ResourceSetDescription(projViewLayout, renderInfo._projectionBuffer, renderInfo._viewBuffer, renderInfo._worldBuffer));
-            return projViewLayout;
+
+        private void SetupView(CommandList _cl, GraphRenderObject graphRenderInfo)
+        {
+
+            _cl.SetViewport(0, new Viewport(0, 0, EachGraphWidth, EachGraphHeight, 0, 200));
+            _cl.UpdateBuffer(graphRenderInfo._projectionBuffer, 0, Matrix4x4.CreatePerspectiveFieldOfView(dbg_FOV, (float)EachGraphWidth / EachGraphHeight, dbg_near, dbg_far));
+
+            Vector3 cameraPosition = new Vector3(dbg_camX, dbg_camY, dbg_camZ);
+            //_cl.UpdateBuffer(_viewBuffer, 0, Matrix4x4.CreateLookAt(Vector3.UnitZ*7, cameraPosition, Vector3.UnitY));
+            _cl.UpdateBuffer(graphRenderInfo._viewBuffer, 0, Matrix4x4.CreateTranslation(cameraPosition));
+
+            //if autorotation...
+            float _ticks = (System.DateTime.Now.Ticks - _startTime) / (1000f);
+            float angle = _ticks / 10000;
+            //else
+            //angle = dbg_rot;
+
+            Matrix4x4 rotation = Matrix4x4.CreateFromAxisAngle(Vector3.UnitY, angle);
+            _cl.UpdateBuffer(graphRenderInfo._worldBuffer, 0, ref rotation);
         }

         private static ShaderSetDescription CreateGraphShaders(ResourceFactory factory)
@@ -246,15 +302,15 @@
                     graph.UpdatePreviewBuffers(_rgatState._GraphicsDevice);
                 }

-                perPreviewData graphRenderInfo = null;
+                GraphRenderObject graphRenderInfo = null;
                 if (!graphicInfos.TryGetValue(graph.tid, out graphRenderInfo))
                 {
-                    graphicInfos.Add(graph.tid, new perPreviewData());
+                    graphicInfos.Add(graph.tid, new GraphRenderObject(graph));
                     graphRenderInfo = graphicInfos[graph.tid];

                     ResourceFactory factory = _gd.ResourceFactory;
                     ShaderSetDescription shaderSetDesc = CreateGraphShaders(factory);
-                    ResourceLayout projViewLayout = SetupProjectionBuffers(factory, graphRenderInfo);
+                    ResourceLayout projViewLayout = graphRenderInfo.SetupProjectionBuffers(factory);

                     // Create pipelines
@@ -292,7 +348,7 @@
                 if (graph.previewlines.DataChanged)
                 {
                     graph.previewlines.SignalDataRead();
-                    InitLineVertexData(_gd, graph, graphRenderInfo);
+                    graphRenderInfo.InitLineVertexData(_gd);
                 }

@@ -300,31 +356,11 @@
                 _cl.ClearColorTarget(0, new RgbaFloat(1, 0, 0, 0.1f));
                 //_cl.ClearDepthStencil(1f);
                 SetupView(_cl, graphRenderInfo);
-                DrawLines(_cl, graphRenderInfo);
-                DrawPoints(_cl, graphRenderInfo);
-            }
-        }
-
-
-        private void SetupView(CommandList _cl, perPreviewData graphRenderInfo)
-        {
-
-            _cl.SetViewport(0, new Viewport(0, 0, EachGraphWidth, EachGraphHeight, 0, 200));
-            _cl.UpdateBuffer(graphRenderInfo._projectionBuffer, 0, Matrix4x4.CreatePerspectiveFieldOfView(dbg_FOV, (float)EachGraphWidth / EachGraphHeight, dbg_near, dbg_far));
-
-            Vector3 cameraPosition = new Vector3(dbg_camX, dbg_camY, dbg_camZ);
-            //_cl.UpdateBuffer(_viewBuffer, 0, Matrix4x4.CreateLookAt(Vector3.UnitZ*7, cameraPosition, Vector3.UnitY));
-            _cl.UpdateBuffer(graphRenderInfo._viewBuffer, 0, Matrix4x4.CreateTranslation(cameraPosition));
-
-            //if autorotation...
-            float _ticks = (System.DateTime.Now.Ticks - _startTime) / (1000f);
-            float angle = _ticks / 10000;
-            //else
-            //angle = dbg_rot;
-
-            Matrix4x4 rotation = Matrix4x4.CreateFromAxisAngle(Vector3.UnitY, angle);
-            _cl.UpdateBuffer(graphRenderInfo._worldBuffer, 0, ref rotation);
-        }
+                graphRenderInfo.DrawLines(_cl);
+                graphRenderInfo.DrawPoints(_cl);
+            }
+        }
+

         /*
 		private void DrawWireframe(CommandList _cl)
@@ -344,33 +380,6 @@
 		*/

-        private void DrawLines(CommandList _cl, perPreviewData graphicObjs)
-        {
-            _cl.SetVertexBuffer(0, graphicObjs._LineVertexBuffer);
-            _cl.SetIndexBuffer(graphicObjs._LineIndexBuffer, IndexFormat.UInt16);
-            _cl.SetPipeline(graphicObjs._linesPipeline);
-            _cl.SetGraphicsResourceSet(0, graphicObjs._projViewSet);
-            _cl.DrawIndexed(
-                indexCount: (uint)graphicObjs._LineVertices.Length,
-                instanceCount: 1,
-                indexStart: 0,
-                vertexOffset: 0,
-                instanceStart: 0);
-        }
-
-        private void DrawPoints(CommandList _cl, perPreviewData graphicObjs)
-        {
-            _cl.SetVertexBuffer(0, graphicObjs._PointVertexBuffer);
-            _cl.SetIndexBuffer(graphicObjs._PointIndexBuffer, IndexFormat.UInt16);
-            _cl.SetPipeline(graphicObjs._pointsPipeline);
-            _cl.SetGraphicsResourceSet(0, graphicObjs._projViewSet);
-            _cl.DrawIndexed(
-                indexCount: (uint)graphicObjs._PointVertices.Length,
-                instanceCount: 1,
-                indexStart: 0,
-                vertexOffset: 0,
-                instanceStart: 0);
-        }


#110: Made type lookup more robust. Fixed exception on .NET Standard 2.0 libraries.

--- Common/SystemTypesResolver.cs
+++ Common/SystemTypesResolver.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics;
 using System.Linq;
 using Mono.Cecil;

@@ -15,18 +16,33 @@
     public void LoadSystemTypes()
     {
         var mscorlib = AssemblyResolver.Resolve(new AssemblyNameReference("mscorlib", null));
-        var typeType = mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "Type");
+        var netstandard = AssemblyResolver.Resolve(new AssemblyNameReference("netstandard", null));
+        var runtime = AssemblyResolver.Resolve(new AssemblyNameReference("System.Runtime", null));
+        var core = AssemblyResolver.Resolve(new AssemblyNameReference("System.Core", null));
+
+        var typeType =
+            mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "Type")
+            ?? runtime?.MainModule.Types.FirstOrDefault(x => x.Name == "Type")
+            ?? netstandard?.MainModule.Types.FirstOrDefault(x => x.Name == "Type")
+            ?? core?.MainModule.Types.FirstOrDefault(x => x.Name == "Type");
+
         if (typeType == null)
         {
-            var runtime = AssemblyResolver.Resolve(new AssemblyNameReference("System.Runtime",null));
-            typeType = runtime.MainModule.Types.First(x => x.Name == "Type");
+            throw new WeavingException("Unable to find System.Type");
         }
-        var funcDefinition = typeType.Module.Types.FirstOrDefault(x => x.Name == "Func`1");
+        Debug.WriteLine("Loaded type {0} from {1}", typeType.FullName, typeType.Module.FileName);
+
+        var funcDefinition =
+            mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "Func`1")
+            ?? runtime?.MainModule.Types.FirstOrDefault(x => x.Name == "Func`1")
+            ?? netstandard?.MainModule.Types.FirstOrDefault(x => x.Name == "Func`1")
+            ?? core?.MainModule.Types.FirstOrDefault(x => x.Name == "Func`1");
         if (funcDefinition == null)
         {
-            var core = AssemblyResolver.Resolve(new AssemblyNameReference("System.Core", null));
-            funcDefinition = core.MainModule.Types.First(x => x.Name == "Func`1");
+            throw new WeavingException("Unable to find System.Func`1");
         }
+        Debug.WriteLine("Loaded type {0} from {1}", funcDefinition.FullName, funcDefinition.Module.FileName);
+
         var genericInstanceType = new GenericInstanceType(funcDefinition);
         genericInstanceType.GenericArguments.Add(ModuleDefinition.TypeSystem.String);
         GenericFunc = ModuleDefinition.ImportReference(genericInstanceType);
@@ -41,22 +57,33 @@
         GetTypeFromHandle = ModuleDefinition.ImportReference(GetTypeFromHandle);

-        var stringType = mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "String");
+        var stringType =
+            mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "String")
+            ?? runtime?.MainModule.Types.FirstOrDefault(x => x.Name == "String")
+            ?? netstandard?.MainModule.Types.FirstOrDefault(x => x.Name == "String")
+            ?? core?.MainModule.Types.FirstOrDefault(x => x.Name == "String");
+
         if (stringType == null)
         {
-            var runtime = AssemblyResolver.Resolve(new AssemblyNameReference("System.Runtime", null));
-            stringType = runtime.MainModule.Types.First(x => x.Name == "String");
+            throw new WeavingException("Unable to find System.String");
         }
+        Debug.WriteLine("Loaded type {0} from {1}", stringType.FullName, stringType.Module.FileName);
+
         ConcatMethod = ModuleDefinition.ImportReference(stringType.FindMethod("Concat", "String", "String"));
         FormatMethod = ModuleDefinition.ImportReference(stringType.FindMethod("Format", "String", "Object[]"));
         ObjectArray = new ArrayType(ModuleDefinition.TypeSystem.Object);

-        var exceptionType = mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "Exception");
+        var exceptionType =
+            mscorlib?.MainModule.Types.FirstOrDefault(x => x.Name == "Exception")
+            ?? runtime?.MainModule.Types.FirstOrDefault(x => x.Name == "Exception")
+            ?? netstandard?.MainModule.Types.FirstOrDefault(x => x.Name == "Exception")
+            ?? core?.MainModule.Types.FirstOrDefault(x => x.Name == "Exception");
         if (exceptionType == null)
         {
-            var runtime = AssemblyResolver.Resolve(new AssemblyNameReference("System.Runtime",null));
-            exceptionType = runtime.MainModule.Types.First(x => x.Name == "Exception");
+            throw new WeavingException("Unable to find System.Exception");
         }
+        Debug.WriteLine("Loaded type {0} from {1}", exceptionType.FullName, exceptionType.Module.FileName);
+
         ExceptionType = ModuleDefinition.ImportReference(exceptionType);

     }


do not compress exported fortune dump

do not compress exported fortune dump

--- CompatBot/Commands/Fortune.cs
+++ CompatBot/Commands/Fortune.cs
@@ -219,8 +219,7 @@
             {
                 var count = 0;
                 await using var outputStream = Config.MemoryStreamManager.GetStream();
-                await using var compressor = new GZipStream(outputStream, CompressionLevel.Optimal, true);
-                await using var writer = new StreamWriter(compressor);
+                await using var writer = new StreamWriter(outputStream);
                 await using var db = new ThumbnailDb();
                 foreach (var fortune in db.Fortune.AsNoTracking())
                 {
@@ -232,7 +231,6 @@
                     count++;
                 }
                 await writer.FlushAsync().ConfigureAwait(false);
-                await compressor.FlushAsync().ConfigureAwait(false);
                 outputStream.Seek(0, SeekOrigin.Begin);
                 var builder = new DiscordMessageBuilder()
                     .WithContent($"Exported {count} fortune{(count == 1 ? "": "s")}")


Minor, non-functional changes

Minor, non-functional changes

--- Core/BkwdComp/HashSet.NET2.cs
+++ Core/BkwdComp/HashSet.NET2.cs
@@ -113,7 +113,7 @@
 		public HashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
 		{
 			dict = new Dictionary<T, object>(comparer);
-			foreach (T elem in collection)
+			foreach (var elem in collection)
 			{
 				Add(elem);
 			}
@@ -256,6 +256,7 @@
 			var l = this.ToList();
 			foreach (var elem in l)
 			{
+				// ReSharper disable once PossibleMultipleEnumeration
 				if (!other.Contains(elem))
 				{
 					Remove(elem);


Fix automatic people property not being set correctly

--- deployments/UnityMixpanel/Assets/Mixpanel/Mixpanel.cs
+++ deployments/UnityMixpanel/Assets/Mixpanel/Mixpanel.cs
@@ -374,7 +374,13 @@
             {
                 #if !DISABLE_MIXPANEL
                 if (tracking_enabled)
+                {
                     mixpanel.people.set_properties(properties);
+                    #if UNITY_ANDROID && !UNITY_EDITOR
+                    Set("$android_app_version_string", platform.MixpanelUnityPlatform.get_android_version_name());
+                    Set("$android_app_build_number", platform.MixpanelUnityPlatform.get_android_version_code());
+                    #endif
+                }
                 #endif
             }

@@ -387,7 +393,13 @@
             {
                 #if !DISABLE_MIXPANEL
                 if (tracking_enabled)
+                {
                     mixpanel.people.set(property, (detail.Value)to);
+                    #if UNITY_ANDROID && !UNITY_EDITOR
+                    mixpanel.people.set("$android_app_version_string", (detail.Value)platform.MixpanelUnityPlatform.get_android_version_name());
+                    mixpanel.people.set("$android_app_build_number", (detail.Value)platform.MixpanelUnityPlatform.get_android_version_code());
+                    #endif
+                }
                 #endif
             }

@@ -400,8 +412,14 @@
             {
                 #if !DISABLE_MIXPANEL
                 if (tracking_enabled)
+                {
                     mixpanel.people.set_once(property, to);
-                #endif
+                    #if UNITY_ANDROID && !UNITY_EDITOR
+                    Set("$android_app_version_string", platform.MixpanelUnityPlatform.get_android_version_name());
+                    Set("$android_app_build_number", platform.MixpanelUnityPlatform.get_android_version_code());
+                    #endif
+                }
+#endif
             }

             /// <summary>
@@ -412,7 +430,13 @@
             {
                 #if !DISABLE_MIXPANEL
                 if (tracking_enabled)
+                {
                     mixpanel.people.set_once_properties(properties);
+                    #if UNITY_ANDROID && !UNITY_EDITOR
+                    Set("$android_app_version_string", platform.MixpanelUnityPlatform.get_android_version_name());
+                    Set("$android_app_build_number", platform.MixpanelUnityPlatform.get_android_version_code());
+                    #endif
+                }
                 #endif
             }

@@ -672,9 +696,6 @@
                 #if UNITY_ANDROID && !UNITY_EDITOR
                 Register("$app_build_number", platform.MixpanelUnityPlatform.get_android_version_code());
                 Register("$app_version_string", platform.MixpanelUnityPlatform.get_android_version_name());
-
-                people.Set("$android_app_version_string", platform.MixpanelUnityPlatform.get_android_version_name());
-                people.Set("$android_app_build_number", platform.MixpanelUnityPlatform.get_android_version_code());
                 #endif

                 #if UNITY_IOS


updated examples

updated examples

--- Commands/Admin/GetHubSite.cs
+++ Commands/Admin/GetHubSite.cs
@@ -13,8 +13,8 @@
     [CmdletHelp(@"Retrieve all or a specific hubsite.",
         Category = CmdletHelpCategory.TenantAdmin,
         SupportedPlatform = CmdletSupportedPlatform.Online)]
-    [CmdletExample(Code = @"PS:> Get-PnPStorageEntity", Remarks = "Returns all site storage entities/farm properties", SortOrder = 1)]
-    [CmdletExample(Code = @"PS:> Get-PnPTenantSite -Key MyKey", Remarks = "Returns the storage entity/farm property with the given key.", SortOrder = 2)]
+    [CmdletExample(Code = @"PS:> Get-PnPHubSite", Remarks = "Returns all hubsite properties", SortOrder = 1)]
+    [CmdletExample(Code = @"PS:> Get-PnPHubSite -Identity https://contoso.sharepoint.com/sites/myhubsite", Remarks = "Returns the properties of the specified hubsite", SortOrder = 2)]
     public class GetHubSite : PnPAdminCmdlet
     {
         [Parameter(Position = 0, ValueFromPipeline = true)]


Fix ScrollContainers not consuming MouseWheelUp/Down events.

--- osu.Framework/Graphics/Containers/ScrollContainer.cs
+++ osu.Framework/Graphics/Containers/ScrollContainer.cs
@@ -107,13 +107,13 @@
         protected override bool OnWheelDown(InputState state)
         {
             offset(Math.Max(-content.Position.Y - currentClamped, 0) * 1.5f + 80);
-            return base.OnWheelDown(state);
+            return true;
         }

         protected override bool OnWheelUp(InputState state)
         {
             offset(Math.Min(currentClamped - content.Position.Y, 0) * 1.5f - 80);
-            return base.OnWheelUp(state);
+            return true;
         }

         private void onScrollbarMovement(float value)


Changed to ensure local time is returned

--- plmOS.Database.SQLServer/Table.cs
+++ plmOS.Database.SQLServer/Table.cs
@@ -597,7 +597,7 @@
                         }
                         else
                         {
-                            Item.AddProperty(new Property(Item, proptype, Reader.GetDateTime(cnt)));
+                            Item.AddProperty(new Property(Item, proptype, Reader.GetDateTime(cnt).ToLocalTime()));
                         }

                         break;


Fix tests executing before overlays load

--- osu.Game.Tests/Visual/Menus/TestSceneSideOverlays.cs
+++ osu.Game.Tests/Visual/Menus/TestSceneSideOverlays.cs
@@ -19,6 +19,7 @@
             base.SetUpSteps();

             AddAssert("no screen offset applied", () => Game.ScreenOffsetContainer.X == 0f);
+            AddUntilStep("wait for overlays", () => Game.Settings.IsLoaded && Game.Notifications.IsLoaded);
         }

         [Test]


Adjust colors to match web design

Adjust colors to match web design

--- osu.Game/Overlays/Profile/Sections/ShowMoreButton.cs
+++ osu.Game/Overlays/Profile/Sections/ShowMoreButton.cs
@@ -102,8 +102,8 @@
         [BackgroundDependencyLoader]
         private void load(OsuColour colors)
         {
-            IdleColour = colors.GreySeafoam;
-            HoverColour = colors.GreySeafoamLight;
+            IdleColour = colors.GreySeafoamDark;
+            HoverColour = colors.GreySeafoam;
         }

         protected override bool OnClick(ClickEvent e)


get redis-server.exe relative to APPVEYOR_BUILD_FOLDER env variable

--- tests/TestHelper.cs
+++ tests/TestHelper.cs
@@ -9,8 +9,7 @@
     {
         public static Process StartRedisServer(long port)
         {
-            var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
-            var fileName = Path.Combine(assemblyDir, "redis-server.exe");
+            var fileName = GetRedisServerLocation();

             // Launch Server
             var process = new Process
@@ -31,7 +30,7 @@
             {
                 Console.WriteLine($"Attempt to launch {fileName} failed.");
                 Console.WriteLine("Directory listing:");
-                foreach (var file in Directory.GetFiles(assemblyDir))
+                foreach (var file in Directory.GetFiles(Path.GetDirectoryName(fileName)))
                 {
                     Console.WriteLine($"\t{Path.GetFileName(file)}");
                 }
@@ -40,5 +39,16 @@

             return process;
         }
+
+        private static string GetRedisServerLocation()
+        {
+            var appVeyor = Environment.GetEnvironmentVariable("APPVEYOR_BUILD_FOLDER");
+            if (!string.IsNullOrEmpty(appVeyor))
+            {
+                return Path.Combine(appVeyor, "tests", "bin", "Release", "redis-server.exe");
+            }
+            var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+            return Path.Combine(assemblyDir, "redis-server.exe");
+        }
     }
 }


Make base class abstract and add documentation

--- osu.Game/Tests/Visual/TestCaseRateAdjustedBeatmap.cs
+++ osu.Game/Tests/Visual/TestCaseRateAdjustedBeatmap.cs
@@ -3,7 +3,10 @@

 namespace osu.Game.Tests.Visual
 {
-    public class TestCaseRateAdjustedBeatmap : ScreenTestCase
+    /// <summary>
+    /// Test case which adjusts the beatmap's rate to match any speed adjustments in visual tests.
+    /// </summary>
+    public abstract class TestCaseRateAdjustedBeatmap : ScreenTestCase
     {
         protected override void Update()
         {


Spaces -> tabs

Spaces -> tabs

--- src/Foundation/NSObject2.cs
+++ src/Foundation/NSObject2.cs
@@ -23,10 +23,10 @@
 				throw new ArgumentNullException ("coder");

 			if (IsDirectBinding) {
-                                Messaging.void_objc_msgSend_intptr (this.Handle, selAwakeFromNib, coder.Handle);
-                        } else {
-                                Messaging.void_objc_msgSendSuper_intptr (this.SuperHandle, selAwakeFromNib, coder.Handle);
-                        }
+				Messaging.void_objc_msgSend_intptr (this.Handle, selAwakeFromNib, coder.Handle);
+			} else {
+				Messaging.void_objc_msgSendSuper_intptr (this.SuperHandle, selAwakeFromNib, coder.Handle);
+			}
 		}

 		[Export ("conformsToProtocol:")]
@@ -35,10 +35,10 @@
 			bool does;

 			if (IsDirectBinding) {
-                                does = Messaging.bool_objc_msgSend_intptr (this.Handle, selConformsToProtocol, protocol);
-                        } else {
-                                does = Messaging.bool_objc_msgSendSuper_intptr (this.SuperHandle, selConformsToProtocol, protocol);
-                        }
+				does = Messaging.bool_objc_msgSend_intptr (this.Handle, selConformsToProtocol, protocol);
+			} else {
+				does = Messaging.bool_objc_msgSendSuper_intptr (this.SuperHandle, selConformsToProtocol, protocol);
+			}

 			if (does)
 				return true;


ensure Children Property is used instead of private Field

--- src/GraphicObjects/Group.cs
+++ src/GraphicObjects/Group.cs
@@ -43,7 +43,7 @@
         public virtual T AddChild<T>(T child)
         {
 			GraphicObject g = child as GraphicObject;
-            children.Add(g);
+            Children.Add(g);
             g.Parent = this as GraphicObject;
 			g.RegisterForLayouting (LayoutingType.Sizing);
 			g.LayoutChanged += OnChildLayoutChanges;
@@ -54,35 +54,35 @@
 			child.LayoutChanged -= OnChildLayoutChanges;
 			child.ClearBinding ();
 			child.Parent = null;
-            children.Remove(child);
+            Children.Remove(child);
 			this.RegisterForLayouting (LayoutingType.Sizing);
         }
 		public virtual void ClearChildren()
 		{
-			while(children.Count > 0){
-				GraphicObject g = children[children.Count-1];
+			while(Children.Count > 0){
+				GraphicObject g = Children[Children.Count-1];
 				g.LayoutChanged -= OnChildLayoutChanges;
 				g.ClearBinding ();
 				g.Parent = null;
-				children.RemoveAt(children.Count-1);
+				Children.RemoveAt(Children.Count-1);
 			}
 			this.RegisterForLayouting (LayoutingType.Sizing);
 			ChildrenCleared.Raise (this, new EventArgs ());
 		}
 		public void putWidgetOnTop(GraphicObject w)
 		{
-			if (children.Contains(w))
+			if (Children.Contains(w))
 			{
-				children.Remove(w);
-				children.Add(w);
+				Children.Remove(w);
+				Children.Add(w);
 			}
 		}
 		public void putWidgetOnBottom(GraphicObject w)
 		{
-			if (children.Contains(w))
+			if (Children.Contains(w))
 			{
-				children.Remove(w);
-				children.Insert(0, w);
+				Children.Remove(w);
+				Children.Insert(0, w);
 			}
 		}

@@ -91,7 +91,7 @@
 			get {
 				if (!base.DrawingIsValid)
 					return false;
-				foreach (GraphicObject g in children) {
+				foreach (GraphicObject g in Children) {
 					if (!g.DrawingIsValid)
 						return false;
 				}
@@ -101,7 +101,7 @@
 		public override void ResolveBindings ()
 		{
 			base.ResolveBindings ();
-			foreach (GraphicObject w in children)
+			foreach (GraphicObject w in Children)
 				w.ResolveBindings ();
 		}
 		public override GraphicObject FindByName (string nameToFind)
@@ -109,7 +109,7 @@
 			if (Name == nameToFind)
 				return this;

-			foreach (GraphicObject w in children) {
+			foreach (GraphicObject w in Children) {
 				GraphicObject r = w.FindByName (nameToFind);
 				if (r != null)
 					return r;
@@ -118,7 +118,7 @@
 		}
 		public override bool Contains (GraphicObject goToFind)
 		{
-			foreach (GraphicObject w in children) {
+			foreach (GraphicObject w in Children) {
 				if (w == goToFind)
 					return true;
 				if (w.Contains (goToFind))
@@ -138,14 +138,14 @@
 			//position smaller objects in group when group size is fit
 			switch (layoutType) {
 			case LayoutingType.Width:
-				foreach (GraphicObject c in children) {
+				foreach (GraphicObject c in Children) {
 					if (!c.Visible)
 						continue;
 					c.RegisterForLayouting (LayoutingType.X | LayoutingType.Width);
 				}
 				break;
 			case LayoutingType.Height:
-				foreach (GraphicObject c in children) {
+				foreach (GraphicObject c in Children) {
 					if (!c.Visible)
 						continue;
 					c.RegisterForLayouting (LayoutingType.Y | LayoutingType.Height);				}
@@ -166,10 +166,10 @@
 					//search for the new largest child
 					largestChild = null;
 					maxChildrenWidth = 0;
-					for (int i = 0; i < children.Count; i++) {
-						if (children [i].Slot.Width > maxChildrenWidth) {
-							maxChildrenWidth = children [i].Slot.Width;
-							largestChild = children [i];
+					for (int i = 0; i < Children.Count; i++) {
+						if (Children [i].Slot.Width > maxChildrenWidth) {
+							maxChildrenWidth = Children [i].Slot.Width;
+							largestChild = Children [i];
 						}
 					}
 					if (this.Bounds.Width < 0)
@@ -186,10 +186,10 @@
 					//search for the new tallest child
 					tallestChild = null;
 					maxChildrenHeight = 0;
-					for (int i = 0; i < children.Count; i++) {
-						if (children [i].Slot.Height > maxChildrenHeight) {
-							maxChildrenHeight = children [i].Slot.Height;
-							tallestChild = children [i];
+					for (int i = 0; i < Children.Count; i++) {
+						if (Children [i].Slot.Height > maxChildrenHeight) {
+							maxChildrenHeight = Children [i].Slot.Height;
+							tallestChild = Children [i];
 						}
 					}
 					if (this.Bounds.Height < 0)
@@ -208,7 +208,7 @@
 			CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
 			gr.Clip ();

-			foreach (GraphicObject g in children) {
+			foreach (GraphicObject g in Children) {
 				g.Paint (ref gr);
 			}
 			gr.Restore ();
@@ -228,7 +228,7 @@
 					CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
 					gr.Clip ();

-					foreach (GraphicObject c in children) {
+					foreach (GraphicObject c in Children) {
 						if (!c.Visible)
 							continue;
 						if (Clipping.intersect(c.Slot + ClientRectangle.Position))
@@ -256,7 +256,7 @@
 				HostContainer.hoverWidget = this;
 				onMouseEnter (this, e);
 			}
-			foreach (GraphicObject g in children)
+			foreach (GraphicObject g in Children)
 			{
 				if (g.MouseIsIn(e.Position))
 				{
@@ -302,7 +302,7 @@
         {
             base.WriteXml(writer);

-            foreach (GraphicObject go in children)
+            foreach (GraphicObject go in Children)
             {
                 writer.WriteStartElement(go.GetType().Name);
                 (go as IXmlSerializable).WriteXml(writer);
@@ -313,7 +313,7 @@
 		#endregion

 		public override void ClearBinding(){
-			foreach (GraphicObject c in children)
+			foreach (GraphicObject c in Children)
 				c.ClearBinding ();
 			base.ClearBinding ();
 		}


Improve performance in parser

Improve performance in parser

Currently, we do a bunch of checks each time Match() is called. However,
in many cases the current token is the expected token.

Also, we use Peek(-1) to get the previous token which would require
bounds checking -- which we don't even do. However, this check would
slow down a bunch of other operations that use Peek(). So instead,
introduce a new method GetPreviousToken() which can perform the check.

--- src/NQuery/Syntax/Parser.cs
+++ src/NQuery/Syntax/Parser.cs
@@ -66,6 +66,14 @@
             return _tokens[i];
         }

+        private SyntaxToken GetPreviousToken()
+        {
+            var previousIndex = _tokenIndex - 1;
+            return previousIndex < 0
+                ? null
+                : _tokens[previousIndex];
+        }
+
         private SyntaxToken NextToken()
         {
             var result = Current;
@@ -90,6 +98,9 @@

         private SyntaxToken Match(SyntaxKind kind)
         {
+            if (Current.Kind == kind)
+                return NextToken();
+
             // Normally, our behavior is to insert missing tokens if the current token doesn't
             // match our expected token. The root of the parser will make sure that after we've
             // completed parsing the main element (i.e. query or expression) the only remaining
@@ -149,14 +160,12 @@
             if (kind == SyntaxKind.IdentifierToken && Current.Kind.IsKeyword() && IsPreviousTokenOnSameLine())
                 return SkipAndInsertMissingToken(SyntaxKind.IdentifierToken);

-            return Current.Kind == kind
-                       ? NextToken()
-                       : InsertMissingToken(kind);
+            return InsertMissingToken(kind);
         }

         private bool IsPreviousTokenOnSameLine()
         {
-            var previous = Peek(-1);
+            var previous = GetPreviousToken();
             if (previous == null)
                 return true;


Use Trace.WriteLine rather than Debug.WriteLine in LogWriter

Should fix #165

--- src/NetSparkle/LogWriter.cs
+++ src/NetSparkle/LogWriter.cs
@@ -60,7 +60,7 @@
             }
             else
             {
-                Debug.WriteLine(tag + " " + message, arguments);
+                Trace.WriteLine(string.Format(tag + " " + message, arguments));
             }
         }
     }


layout fix to uncrop long taming durations

--- ARKBreedingStats/TamingFoodControl.Designer.cs
+++ ARKBreedingStats/TamingFoodControl.Designer.cs
@@ -29,11 +29,11 @@
         private void InitializeComponent()
         {
             this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.PanelColorIndicator = new System.Windows.Forms.Panel();
             this.labelDuration = new System.Windows.Forms.Label();
             this.button1 = new System.Windows.Forms.Button();
             this.labelFoodUsed = new System.Windows.Forms.Label();
             this.numericUpDown1 = new ARKBreedingStats.uiControls.Nud();
-            this.PanelColorIndicator = new System.Windows.Forms.Panel();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
             this.SuspendLayout();
@@ -48,10 +48,17 @@
             this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.groupBox1.Location = new System.Drawing.Point(0, 0);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(299, 45);
+            this.groupBox1.Size = new System.Drawing.Size(307, 45);
             this.groupBox1.TabIndex = 1;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "groupBox1";
+            //
+            // PanelColorIndicator
+            //
+            this.PanelColorIndicator.Location = new System.Drawing.Point(6, 19);
+            this.PanelColorIndicator.Name = "PanelColorIndicator";
+            this.PanelColorIndicator.Size = new System.Drawing.Size(20, 20);
+            this.PanelColorIndicator.TabIndex = 4;
             //
             // labelDuration
             //
@@ -101,20 +108,13 @@
             this.numericUpDown1.TabIndex = 0;
             this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
             //
-            // PanelColorIndicator
-            //
-            this.PanelColorIndicator.Location = new System.Drawing.Point(6, 19);
-            this.PanelColorIndicator.Name = "PanelColorIndicator";
-            this.PanelColorIndicator.Size = new System.Drawing.Size(20, 20);
-            this.PanelColorIndicator.TabIndex = 4;
-            //
             // TamingFoodControl
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.groupBox1);
             this.Name = "TamingFoodControl";
-            this.Size = new System.Drawing.Size(299, 45);
+            this.Size = new System.Drawing.Size(307, 45);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();


the base interval is redundant

the base interval is redundant

--- ksp_plugin_adapter/orbit_analyser.cs
+++ ksp_plugin_adapter/orbit_analyser.cs
@@ -205,8 +205,8 @@
           "Subcycle",
           $"{recurrence_string(recurrence.subcycle)} days".ToString(Culture.culture));
       LabeledField("Equatorial shift", $"{recurrence.equatorial_shift * (180 / Math.PI):N2}° ({recurrence.equatorial_shift * primary.Radius / 1000:N0} km)".ToString(Culture.culture));
-      LabeledField("Base interval", $"{recurrence.base_interval * (180 / Math.PI):N2}° ({recurrence.base_interval * primary.Radius / 1000:N0} km)".ToString(Culture.culture));
       LabeledField("Grid interval", $"{recurrence.grid_interval * (180 / Math.PI):N2}° ({recurrence.grid_interval * primary.Radius / 1000:N0} km)".ToString(Culture.culture));
+      Style.HorizontalLine();
       using (new UnityEngine.GUILayout.HorizontalScope()) {
         UnityEngine.GUILayout.Label("Longitudes of equatorial crossings of revolution #", UnityEngine.GUILayout.ExpandWidth(false));
         string text = UnityEngine.GUILayout.TextField(


Update CubicBezierPathToolViewModel.cs

Update CubicBezierPathToolViewModel.cs

--- src/Core2D/ViewModels/Editor/Tools/Path/CubicBezierPathToolViewModel.cs
+++ src/Core2D/ViewModels/Editor/Tools/Path/CubicBezierPathToolViewModel.cs
@@ -151,7 +151,23 @@

     public void BeginDown(InputArgs args)
     {
-        NextPoint(args);
+        var editor = ServiceProvider.GetService<ProjectEditorViewModel>();
+        if (editor?.Project is null)
+        {
+            return;
+        }
+
+        if (editor.Project.Options?.SinglePressMode ?? true)
+        {
+            if (_currentState == State.Point1 || _currentState == State.Point4 || _currentState == State.Point2)
+            {
+                NextPoint(args);
+            }
+        }
+        else
+        {
+            NextPoint(args);
+        }
     }

     public void BeginUp(InputArgs args)
@@ -164,7 +180,7 @@

         if (editor.Project.Options?.SinglePressMode ?? true)
         {
-            if (_currentState != State.Point1)
+            if (_currentState == State.Point4 || _currentState == State.Point2 || _currentState == State.Point3)
             {
                 NextPoint(args);
             }


Cors should be logic

Cors should be logic

--- src/Glimpse.Server.Web/Infrastructure/MiddlewareResourceComposerCors.cs
+++ src/Glimpse.Server.Web/Infrastructure/MiddlewareResourceComposerCors.cs
@@ -4,7 +4,7 @@

 namespace Glimpse.Server.Infrastructure
 {
-    public class MiddlewareResourceComposerCors : IMiddlewareResourceComposer
+    public class MiddlewareResourceComposerCors : IMiddlewareLogicComposer
     {
         public void Register(IApplicationBuilder appBuilder)
         {


Fixes Admin Node Creation in SaaS recipe (#2699)

--- src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Create.cshtml
+++ src/OrchardCore.Modules/OrchardCore.AdminTrees/Views/Node/Create.cshtml
@@ -2,9 +2,9 @@

@RenderTitleSegments(T["Create Node"])

-

+

 <form asp-action="Create" method="post">
-    @await DisplayAsync(Model.Editor)
+    @await DisplayAsync(Model.Editor.Content)

     <input type="hidden" asp-for="AdminTreeId" />
     <input type="hidden" asp-for="AdminNodeId" />