different strategy to enable flexible swizzling

--- Scripts/Utilities/VectorSwizzleExtensions.cs
+++ Scripts/Utilities/VectorSwizzleExtensions.cs
@@ -22,12 +22,21 @@
 THE SOFTWARE.
 \***************************************************************************/

+using System;
 using System.Collections.Generic;
 using senritsu.UnityGridTools.Scripts.IntVectors;
 using UnityEngine;

 namespace senritsu.UnityGridTools.Scripts.Utilities
 {
+    public class InvalidNumberOfComponentsException<T> : InvalidOperationException
+    {
+        public InvalidNumberOfComponentsException(string swizzleSpec) : base(string.Format("Invalid number of components, cannot swizzle '{0}' to {1}", swizzleSpec, typeof(T).Name))
+        {
+
+        }
+    }
+
     public static class VectorSwizzleExtensions
     {
         private static readonly Dictionary<char, int> ComponentMapping = new Dictionary<char, int>
@@ -111,47 +120,343 @@
             return i >= 3 ? 0 : v[i];
         }

-        public static Vector2 Swizzle(this Vector2 v, string components)
-        {
+        public static Vector2 SwizzleVector2(this Vector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector2>(components);
+            }
+
             return new Vector2(
-                components.Length > 0 ? GetComponent(v, components[0]) : 0,
-                components.Length > 1 ? GetComponent(v, components[1]) : 0
-                );
-        }
-
-        public static Vector3 Swizzle(this Vector3 v, string components)
-        {
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static Vector2 SwizzleVector2(this IntVector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector2>(components);
+            }
+
+            return new Vector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static Vector2 SwizzleVector2(this Vector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector2>(components);
+            }
+
+            return new Vector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static Vector2 SwizzleVector2(this IntVector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector2>(components);
+            }
+
+            return new Vector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static Vector2 SwizzleVector2(this Vector4 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector2>(components);
+            }
+
+            return new Vector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static IntVector2 SwizzleIntVector2(this Vector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector2>(components);
+            }
+
+            return new IntVector2(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1]))
+                );
+        }
+
+        public static IntVector2 SwizzleIntVector2(this IntVector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector2>(components);
+            }
+
+            return new IntVector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static IntVector2 SwizzleIntVector2(this Vector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector2>(components);
+            }
+
+            return new IntVector2(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1]))
+                );
+        }
+
+        public static IntVector2 SwizzleIntVector2(this IntVector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector2>(components);
+            }
+
+            return new IntVector2(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1])
+                );
+        }
+
+        public static IntVector2 SwizzleIntVector2(this Vector4 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector2>(components);
+            }
+
+            return new IntVector2(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1]))
+                );
+        }
+
+        public static Vector3 SwizzleVector3(this Vector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector3>(components);
+            }
+
             return new Vector3(
-                components.Length > 0 ? GetComponent(v, components[0]) : 0,
-                components.Length > 1 ? GetComponent(v, components[1]) : 0,
-                components.Length > 2 ? GetComponent(v, components[2]) : 0
-                );
-        }
-
-        public static Vector4 Swizzle(this Vector4 v, string components)
-        {
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector3 SwizzleVector3(this IntVector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector3>(components);
+            }
+
+            return new Vector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector3 SwizzleVector3(this Vector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector3>(components);
+            }
+
+            return new Vector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector3 SwizzleVector3(this IntVector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector3>(components);
+            }
+
+            return new Vector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector3 SwizzleVector3(this Vector4 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector3>(components);
+            }
+
+            return new Vector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static IntVector3 SwizzleIntVector3(this Vector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector3>(components);
+            }
+
+            return new IntVector3(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1])),
+                Mathf.RoundToInt(GetComponent(v, components[2]))
+                );
+        }
+
+        public static IntVector3 SwizzleIntVector3(this IntVector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector3>(components);
+            }
+
+            return new IntVector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static IntVector3 SwizzleIntVector3(this Vector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector3>(components);
+            }
+
+            return new IntVector3(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1])),
+                Mathf.RoundToInt(GetComponent(v, components[2]))
+                );
+        }
+
+        public static IntVector3 SwizzleIntVector3(this IntVector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector3>(components);
+            }
+
+            return new IntVector3(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static IntVector3 SwizzleIntVector3(this Vector4 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<IntVector3>(components);
+            }
+
+            return new IntVector3(
+                Mathf.RoundToInt(GetComponent(v, components[0])),
+                Mathf.RoundToInt(GetComponent(v, components[1])),
+                Mathf.RoundToInt(GetComponent(v, components[2]))
+                );
+        }
+
+        public static Vector4 SwizzleVector4(this Vector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector4>(components);
+            }
+
             return new Vector4(
-                components.Length > 0 ? GetComponent(v, components[0]) : 0,
-                components.Length > 1 ? GetComponent(v, components[1]) : 0,
-                components.Length > 2 ? GetComponent(v, components[2]) : 0,
-                components.Length > 3 ? GetComponent(v, components[3]) : 0
-                );
-        }
-
-        public static IntVector2 Swizzle(this IntVector2 v, string components)
-        {
-            return new IntVector2(
-                components.Length > 0 ? GetComponent(v, components[0]) : 0,
-                components.Length > 1 ? GetComponent(v, components[1]) : 0
-                );
-        }
-
-        public static IntVector3 Swizzle(this IntVector3 v, string components)
-        {
-            return new IntVector3(
-                components.Length > 0 ? GetComponent(v, components[0]) : 0,
-                components.Length > 1 ? GetComponent(v, components[1]) : 0,
-                components.Length > 2 ? GetComponent(v, components[2]) : 0
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector4 SwizzleVector4(this IntVector2 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector4>(components);
+            }
+
+            return new Vector4(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector4 SwizzleVector4(this Vector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector4>(components);
+            }
+
+            return new Vector4(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector4 SwizzleVector4(this IntVector3 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector4>(components);
+            }
+
+            return new Vector4(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
+                );
+        }
+
+        public static Vector4 SwizzleVector4(this Vector4 v, string components)
+        {
+            if (components.Length != 2)
+            {
+                throw new InvalidNumberOfComponentsException<Vector4>(components);
+            }
+
+            return new Vector4(
+                GetComponent(v, components[0]),
+                GetComponent(v, components[1]),
+                GetComponent(v, components[2])
                 );
         }
     }


Fix outdated comment

Fix outdated comment

--- osu.Framework/Graphics/Pooling/PoolableDrawable.cs
+++ osu.Framework/Graphics/Pooling/PoolableDrawable.cs
@@ -24,7 +24,7 @@
         private IDrawablePool pool;

         /// <summary>
-        /// A flag to keep the drawable present to guarantee <see cref="prepare"/> can be performed as a scheduled call.
+        /// A flag to keep the drawable present to guarantee the prepare call can be performed as a scheduled call.
         /// </summary>
         private bool waitingForPrepare;


readonlytextinput - constructor

readonlytextinput - constructor

--- Sensus.Shared/UI/Inputs/ReadOnlyTextInput.cs
+++ Sensus.Shared/UI/Inputs/ReadOnlyTextInput.cs
@@ -22,7 +22,9 @@
 	{
 		public ReadOnlyTextInput()
 		{
-
+			StoreCompletionRecords = false;
+			Complete = true;
+			Required = false;
 		}

 		public override object Value
@@ -61,10 +63,6 @@
 					textLabel.TextType = TextType.Html;
 				}

-				StoreCompletionRecords = false;
-				Complete = true;
-				Required = false;
-
 				base.SetView(new StackLayout
 				{
 					Orientation = StackOrientation.Vertical,


Update AccountServices.cs

Update AccountServices.cs


- v3.2.11

- v3.2.11

--- Shuttle.Core.Host/Properties/AssemblyInfo.cs
+++ Shuttle.Core.Host/Properties/AssemblyInfo.cs
@@ -25,10 +25,10 @@
 [assembly: AssemblyTitle("Shuttle.Core.Host for .NET Framework 4.6.1")]
 #endif

-[assembly: AssemblyVersion("3.2.10.0")]
+[assembly: AssemblyVersion("3.2.11.0")]
 [assembly: AssemblyCopyright("Copyright © Eben Roux 2016")]
 [assembly: AssemblyProduct("Shuttle.Core")]
 [assembly: AssemblyCompany("Shuttle")]
 [assembly: AssemblyConfiguration("Release")]
-[assembly: AssemblyInformationalVersion("3.2.10")]
+[assembly: AssemblyInformationalVersion("3.2.11")]
 [assembly: ComVisible(false)]


remove SQL_LOGIN restriction in CacheLogi

--- Signum.Engine.Extensions/Cache/CacheLogic.cs
+++ Signum.Engine.Extensions/Cache/CacheLogic.cs
@@ -349,7 +349,9 @@
             var type = Database.View<SysServerPrincipals>().Where(a => a.name == currentUser).Select(a => a.type_desc).Single();

             if (type != "SQL_LOGIN")
-                throw new InvalidOperationException("The current login '{0}' is a {1} instead of a SQL_LOGIN. Avoid using Integrated Security with Cache Logic".Formato(currentUser, type));
+            {
+                //throw new InvalidOperationException("The current login '{0}' is a {1} instead of a SQL_LOGIN. Avoid using Integrated Security with Cache Logic".Formato(currentUser, type));
+            }
         }

         private static InvalidOperationException EnableBlocker(DatabaseName database)


Remove logging partial class which is now redundant

(It supplied members that are now generated.)

--- apis/Google.Cloud.Logging.V2/Google.Cloud.Logging.V2/LoggingServiceV2ClientPartial.cs
+++ apis/Google.Cloud.Logging.V2/Google.Cloud.Logging.V2/LoggingServiceV2ClientPartial.cs
@@ -1,153 +0,0 @@
-// Copyright 2018 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// This file can be removed when the equivalent code is generated.
-
-using gax = Google.Api.Gax;
-using gaxgrpc = Google.Api.Gax.Grpc;
-using scg = System.Collections.Generic;
-
-namespace Google.Cloud.Logging.V2
-{
-    public abstract partial class LoggingServiceV2Client
-    {
-        /// <summary>
-        /// Lists log entries.  Use this method to retrieve log entries from
-        /// Stackdriver Logging.  For ways to export log entries, see
-        /// [Exporting Logs](/logging/docs/export).
-        /// </summary>
-        /// <param name="resourceNames">
-        /// Required. Names of one or more parent resources from which to
-        /// retrieve log entries:
-        ///
-        ///     "projects/[PROJECT_ID]"
-        ///     "organizations/[ORGANIZATION_ID]"
-        ///     "billingAccounts/[BILLING_ACCOUNT_ID]"
-        ///     "folders/[FOLDER_ID]"
-        ///
-        /// Projects listed in the `project_ids` field are added to this list.
-        /// </param>
-        /// <param name="filter">
-        /// Optional. A filter that chooses which log entries to return.  See [Advanced
-        /// Logs Filters](/logging/docs/view/advanced_filters).  Only log entries that
-        /// match the filter are returned.  An empty filter matches all log entries in
-        /// the resources listed in `resource_names`. Referencing a parent resource
-        /// that is not listed in `resource_names` will cause the filter to return no
-        /// results.
-        /// The maximum length of the filter is 20000 characters.
-        /// </param>
-        /// <param name="orderBy">
-        /// Optional. How the results should be sorted.  Presently, the only permitted
-        /// values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
-        /// option returns entries in order of increasing values of
-        /// `LogEntry.timestamp` (oldest first), and the second option returns entries
-        /// in order of decreasing timestamps (newest first).  Entries with equal
-        /// timestamps are returned in order of their `insert_id` values.
-        /// </param>
-        /// <param name="pageToken">
-        /// The token returned from the previous request.
-        /// A value of <c>null</c> or an empty string retrieves the first page.
-        /// </param>
-        /// <param name="pageSize">
-        /// The size of page to request. The response will not be larger than this, but may be smaller.
-        /// A value of <c>null</c> or 0 uses a server-defined page size.
-        /// </param>
-        /// <param name="callSettings">
-        /// If not null, applies overrides to this RPC call.
-        /// </param>
-        /// <returns>
-        /// A pageable asynchronous sequence of <see cref="LogEntry"/> resources.
-        /// </returns>
-        public virtual gax::PagedAsyncEnumerable<ListLogEntriesResponse, LogEntry> ListLogEntriesAsync(
-            scg::IEnumerable<string> resourceNames,
-            string filter,
-            string orderBy,
-            string pageToken = null,
-            int? pageSize = null,
-            gaxgrpc::CallSettings callSettings = null) => ListLogEntriesAsync(
-                new ListLogEntriesRequest
-                {
-                    ResourceNames = { gax::GaxPreconditions.CheckNotNull(resourceNames, nameof(resourceNames)) },
-                    Filter = filter ?? "", // Optional
-                    OrderBy = orderBy ?? "", // Optional
-                    PageToken = pageToken ?? "",
-                    PageSize = pageSize ?? 0,
-                },
-                callSettings);
-
-        /// <summary>
-        /// Lists log entries.  Use this method to retrieve log entries from
-        /// Stackdriver Logging.  For ways to export log entries, see
-        /// [Exporting Logs](/logging/docs/export).
-        /// </summary>
-        /// <param name="resourceNames">
-        /// Required. Names of one or more parent resources from which to
-        /// retrieve log entries:
-        ///
-        ///     "projects/[PROJECT_ID]"
-        ///     "organizations/[ORGANIZATION_ID]"
-        ///     "billingAccounts/[BILLING_ACCOUNT_ID]"
-        ///     "folders/[FOLDER_ID]"
-        ///
-        /// Projects listed in the `project_ids` field are added to this list.
-        /// </param>
-        /// <param name="filter">
-        /// Optional. A filter that chooses which log entries to return.  See [Advanced
-        /// Logs Filters](/logging/docs/view/advanced_filters).  Only log entries that
-        /// match the filter are returned.  An empty filter matches all log entries in
-        /// the resources listed in `resource_names`. Referencing a parent resource
-        /// that is not listed in `resource_names` will cause the filter to return no
-        /// results.
-        /// The maximum length of the filter is 20000 characters.
-        /// </param>
-        /// <param name="orderBy">
-        /// Optional. How the results should be sorted.  Presently, the only permitted
-        /// values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
-        /// option returns entries in order of increasing values of
-        /// `LogEntry.timestamp` (oldest first), and the second option returns entries
-        /// in order of decreasing timestamps (newest first).  Entries with equal
-        /// timestamps are returned in order of their `insert_id` values.
-        /// </param>
-        /// <param name="pageToken">
-        /// The token returned from the previous request.
-        /// A value of <c>null</c> or an empty string retrieves the first page.
-        /// </param>
-        /// <param name="pageSize">
-        /// The size of page to request. The response will not be larger than this, but may be smaller.
-        /// A value of <c>null</c> or 0 uses a server-defined page size.
-        /// </param>
-        /// <param name="callSettings">
-        /// If not null, applies overrides to this RPC call.
-        /// </param>
-        /// <returns>
-        /// A pageable sequence of <see cref="LogEntry"/> resources.
-        /// </returns>
-        public virtual gax::PagedEnumerable<ListLogEntriesResponse, LogEntry> ListLogEntries(
-            scg::IEnumerable<string> resourceNames,
-            string filter,
-            string orderBy,
-            string pageToken = null,
-            int? pageSize = null,
-            gaxgrpc::CallSettings callSettings = null) => ListLogEntries(
-                new ListLogEntriesRequest
-                {
-                    ResourceNames = { gax::GaxPreconditions.CheckNotNull(resourceNames, nameof(resourceNames)) },
-                    Filter = filter ?? "", // Optional
-                    OrderBy = orderBy ?? "", // Optional
-                    PageToken = pageToken ?? "",
-                    PageSize = pageSize ?? 0,
-                },
-                callSettings);
-    }
-}


Detect language

Detect language

--- SimpleDnsCrypt/ViewModels/LoaderViewModel.cs
+++ SimpleDnsCrypt/ViewModels/LoaderViewModel.cs
@@ -189,10 +189,13 @@
 				}
 			}

+			var selectedLanguage = languages.SingleOrDefault(l => l.ShortCode.Equals(LocalizeDictionary.Instance.Culture.TwoLetterISOLanguageName)) ??
+			                       languages.SingleOrDefault(l => l.ShortCode.Equals(LocalizeDictionary.Instance.Culture.Name));
+
 			_mainViewModel = new MainViewModel(_windowManager, _events)
 			{
 				Languages = languages,
-				SelectedLanguage = languages.SingleOrDefault(l => l.ShortCode.Equals(LocalizeDictionary.Instance.Culture.Name))
+				SelectedLanguage = selectedLanguage
 			};

 			InitializeApplication();


Added Utils.EnableEvent* group of methods.

--- GUI/GUIUtils.cs
+++ GUI/GUIUtils.cs
@@ -62,6 +62,22 @@
 		}

 		#region KSP_UI
+		public static void EnableEvent(BaseEvent evt, bool enable, bool gui, bool editor)
+		{
+			evt.active = enable;
+			evt.guiActive = gui;
+			evt.guiActiveEditor = editor;
+		}
+
+		public static void EnableEvent(BaseEvent evt, bool enable = true)
+		{ EnableEvent(evt, enable, enable, enable); }
+
+		public static void EnableEventGUI(BaseEvent evt, bool enable = true)
+		{ EnableEvent(evt, enable, enable, false); }
+
+		public static void EnableEventEditor(BaseEvent evt, bool enable = true)
+		{ EnableEvent(evt, enable, false, enable); }
+
 		public static void EnableField(BaseField field, bool enable = true, UI_Scene scene = UI_Scene.All)
 		{
 			if((scene & UI_Scene.Flight) == UI_Scene.Flight) field.guiActive       = enable;


Change RegEx rule to handle null values in three ways: return false, return true or convert the null to an empty string and then evaluate the expression.

--- cslacs/Csla/Validation/CommonRules.cs
+++ cslacs/Csla/Validation/CommonRules.cs
@@ -452,16 +452,23 @@
     public static bool RegExMatch(object target, RuleArgs e)
     {
       bool ruleSatisfied = false;
+      RegExRuleArgs args = (RegExRuleArgs)e;

       object value = Utilities.CallByName(target, e.PropertyName, CallType.Get);
+      if (value == null && args.NullResult == RegExRuleArgs.NullResultOptions.ConvertToEmptyString)
+          value=string.Empty;
+
       if (value == null)
       {
-        ruleSatisfied = ((RegExRuleArgs)e).NullResult;
+        // if the value is null at this point
+        // then return the pre-defined result value
+        ruleSatisfied = (args.NullResult == RegExRuleArgs.NullResultOptions.ReturnTrue);
       }
       else
       {
-        Regex rx = ((RegExRuleArgs)e).RegEx;
-        ruleSatisfied = rx.IsMatch(value.ToString());
+        // the value is not null, so run the
+        // regular expression
+        ruleSatisfied = args.RegEx.IsMatch(value.ToString());
       }

       if (!ruleSatisfied)
@@ -494,8 +501,40 @@
     /// </summary>
     public class RegExRuleArgs : RuleArgs
     {
+      #region NullResultOptions
+
+      /// <summary>
+      /// List of options for the NullResult
+      /// property.
+      /// </summary>
+      public enum NullResultOptions
+      {
+        /// <summary>
+        /// Indicates that a null value
+        /// should always result in the
+        /// rule returning false.
+        /// </summary>
+        ReturnFalse,
+        /// <summary>
+        /// Indicates that a null value
+        /// should always result in the
+        /// rule returning true.
+        /// </summary>
+        ReturnTrue,
+        /// <summary>
+        /// Indicates that a null value
+        /// should be converted to an
+        /// empty string before the
+        /// regular expression is
+        /// evaluated.
+        /// </summary>
+        ConvertToEmptyString
+      }
+
+      #endregion
+
       Regex _regEx;
-      bool _nullResult;
+      NullResultOptions _nullResult;

       /// <summary>
       /// The <see cref="RegEx"/> object used to validate
@@ -510,7 +549,7 @@
       /// Gets a value indicating whether a null value
       /// means the rule will return true or false.
       /// </summary>
-      public bool NullResult
+      public NullResultOptions NullResult
       {
         get
         {
@@ -527,7 +566,7 @@
         : base(propertyName)
       {
         _regEx = new Regex(GetPattern(pattern));
-        _nullResult = false;
+        _nullResult = NullResultOptions.ReturnFalse;
       }

       /// <summary>
@@ -539,7 +578,7 @@
         : base(propertyName)
       {
         _regEx = new Regex(pattern);
-        _nullResult = false;
+        _nullResult = NullResultOptions.ReturnFalse;
       }

       /// <summary>
@@ -551,7 +590,7 @@
         : base(propertyName)
       {
         _regEx = regEx;
-        _nullResult = false;
+        _nullResult = NullResultOptions.ReturnFalse;
       }

       /// <summary>
@@ -560,14 +599,13 @@
       /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="pattern">Built-in regex pattern to use.</param>
       /// <param name="nullResult">
-      /// Value indicating whether a null property value should
-      /// result in the rule automatically returning true or false.
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
       /// </param>
-      public RegExRuleArgs(string propertyName, RegExPatterns pattern, bool nullResult)
+      public RegExRuleArgs(string propertyName, RegExPatterns pattern, NullResultOptions nullResult)
         : base(propertyName)
       {
         _regEx = new Regex(GetPattern(pattern));
-        _nullResult = false;
         _nullResult = nullResult;
       }

@@ -577,10 +615,10 @@
       /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="pattern">Custom regex pattern to use.</param>
       /// <param name="nullResult">
-      /// Value indicating whether a null property value should
-      /// result in the rule automatically returning true or false.
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
       /// </param>
-      public RegExRuleArgs(string propertyName, string pattern, bool nullResult)
+      public RegExRuleArgs(string propertyName, string pattern, NullResultOptions nullResult)
         : base(propertyName)
       {
         _regEx = new Regex(pattern);
@@ -593,10 +631,10 @@
       /// <param name="propertyName">Name of the property to validate.</param>
       /// <param name="regEx"><see cref="RegEx"/> object to use.</param>
       /// <param name="nullResult">
-      /// Value indicating whether a null property value should
-      /// result in the rule automatically returning true or false.
+      /// Value indicating how a null value should be
+      /// handled by the rule method.
       /// </param>
-      public RegExRuleArgs(string propertyName, System.Text.RegularExpressions.Regex regEx, bool nullResult)
+      public RegExRuleArgs(string propertyName, System.Text.RegularExpressions.Regex regEx, NullResultOptions nullResult)
         : base(propertyName)
       {
         _regEx = regEx;


Fixes return issue in the PC

Fixes return issue in the PC

--- GameInstance.cs
+++ GameInstance.cs
@@ -463,35 +463,39 @@

                 Choice = Console.ReadLine();
-                if (int.TryParse(Choice, out parsedChoice) && parsedChoice >= 0 && parsedChoice < player.GetSharpmonsInPC().Count%(page*8))
-                {
-                    if(player.GetSharpmons().Count < 6)
-                    {
-                        Console.Write("Placing");
-                        player.GetSharpmonsInPC()[(page-1)*8+parsedChoice].ToString();
-                        Console.WriteLine("in your inventory.");
-                        player.GetSharpmons().Add((player.GetSharpmonsInPC()[(page-1)*8+parsedChoice]));
-                        player.GetSharpmonsInPC().RemoveAt((page-1)*8+parsedChoice);
-                        Loading(200, 5);
-                        return;
-                    }
-                    else
-                    {
-                        Console.WriteLine("You already have the maximum number of sharpmons in your inventory.\nReturning to the PC's menu.");
-                        Loading(300, 9);
-                        return;
-                    }
-                }
-                else if(int.TryParse(Choice, out parsedChoice) && parsedChoice == 8)
-                {
-                    page++;
-                    continue;
-                }
-                else if(int.TryParse(Choice, out parsedChoice) && parsedChoice == 9)
-                {
-                    page--;
-                    continue;
-                }
+                if(int.TryParse(Choice, out parsedChoice))
+                {
+                    if (parsedChoice >= 0 && parsedChoice < player.GetSharpmonsInPC().Count%8)
+                    {
+                        if(player.GetSharpmons().Count < 6)
+                        {
+                            Console.Write("Placing");
+                            player.GetSharpmonsInPC()[(page-1)*8+parsedChoice].ToString();
+                            Console.WriteLine("in your inventory.");
+                            player.GetSharpmons().Add((player.GetSharpmonsInPC()[(page-1)*8+parsedChoice]));
+                            player.GetSharpmonsInPC().RemoveAt((page-1)*8+parsedChoice);
+                            Loading(200, 5);
+                            return;
+                        }
+                        else
+                        {
+                            Console.WriteLine("You already have the maximum number of sharpmons in your inventory.\nReturning to the PC's menu.");
+                            Loading(300, 9);
+                            return;
+                        }
+                    }
+                    else if(parsedChoice == 8 && page < pageMax)
+                    {
+                        page++;
+                        continue;
+                    }
+                    else if(parsedChoice == 9 && page > 1)
+                    {
+                        page--;
+                        continue;
+                    }
+                }
+
                 else if(Choice == "")
                 {
                     return;


fix 2

fix 2

--- source/DotNetBay.Data.EF/EFMainRepository.cs
+++ source/DotNetBay.Data.EF/EFMainRepository.cs
@@ -51,7 +51,7 @@

         public Bid GetBidByTransactionId(Guid transactionId)
         {
-            return this.context.Bids.FirstOrDefault(b => b.TransactionId == transactionId);
+            return this.context.Bids.Include(b => b.Auction).Include(b => b.Bidder).FirstOrDefault(b => b.TransactionId == transactionId);
         }

         public Member Add(Member member)


Add DistanceChanged event, require and store ref to parent Splitter

- Issue MatterHackers/MCCentral#2236
Library panel should maintain its width across application restarts

--- Gui/Splitter.cs
+++ Gui/Splitter.cs
@@ -34,18 +34,27 @@
 {
 	public class Splitter : GuiWidget
 	{
+		public event EventHandler DistanceChanged;
+
 		private class SplitterBar : GuiWidget
 		{
+			private Splitter parentSplitter;
+
 			private bool mouseDownOnBar = false;
 			private Vector2 DownPosition;

-			public SplitterBar()
+			public SplitterBar(Splitter splitter)
 			{
+				this.parentSplitter = splitter;
 				this.Cursor = Cursors.VSplit;
 			}

+			double mouseDownPosition = -1;
+
 			override public void OnMouseDown(MouseEventArgs mouseEvent)
 			{
+				mouseDownPosition = parentSplitter.SplitterDistance;
+
 				if (PositionWithinLocalBounds(mouseEvent.X, mouseEvent.Y))
 				{
 					mouseDownOnBar = true;
@@ -61,6 +70,11 @@

 			override public void OnMouseUp(MouseEventArgs mouseEvent)
 			{
+				if (mouseDownPosition != parentSplitter.SplitterDistance)
+				{
+					parentSplitter.DistanceChanged?.Invoke(this, null);
+				}
+
 				mouseDownOnBar = false;
 				base.OnMouseUp(mouseEvent);
 			}
@@ -72,7 +86,7 @@
 					Vector2 mousePosition = new Vector2(mouseEvent.X, mouseEvent.Y);
 					mousePosition += OriginRelativeParent;
 					double deltaX = mousePosition.X - DownPosition.X;
-					double newSplitterPosition = ((Splitter)Parent).SplitterDistance + deltaX;
+					double newSplitterPosition = parentSplitter.SplitterDistance + deltaX;

 					if (newSplitterPosition < Parent.LocalBounds.Left + Parent.Padding.Left)
 					{
@@ -83,21 +97,23 @@
 						newSplitterPosition = Parent.LocalBounds.Right - Width - Parent.Padding.Right;
 					}

-					((Splitter)Parent).SplitterDistance = newSplitterPosition;
+					parentSplitter.SplitterDistance = newSplitterPosition;
 					DownPosition = mousePosition;
 				}
 				base.OnMouseMove(mouseEvent);
 			}
 		}

-		private SplitterBar splitterBar = new SplitterBar()
-		{
-			BackgroundColor = Color.Transparent
-		};
+		private SplitterBar splitterBar;

 		public Splitter()
 		{
-			splitterBar.Width = 6;
+			 splitterBar = new SplitterBar(this)
+			 {
+				 BackgroundColor = Color.Transparent,
+				 Width = 6,
+			 };
+
 			SplitterDistance = 120;

 			AddChild(Panel1);


fixes: CS0188 'RemoteServer.EmbeddableRemoteServerTopLevelImpl.LostFocus' hides inherited member 'OffscreenTopLevelImplBase.LostFocus'.

--- src/Avalonia.Controls/Remote/RemoteServer.cs
+++ src/Avalonia.Controls/Remote/RemoteServer.cs
@@ -15,9 +15,6 @@
             public EmbeddableRemoteServerTopLevelImpl(IAvaloniaRemoteTransportConnection transport) : base(transport)
             {
             }
-#pragma warning disable 67
-            public Action LostFocus { get; set; }
-
         }

         public RemoteServer(IAvaloniaRemoteTransportConnection transport)


Updates to azure file storage.

Updates to azure file storage.

--- src/AzureStorage/Storage/AzureFileStorage.cs
+++ src/AzureStorage/Storage/AzureFileStorage.cs
@@ -90,15 +90,11 @@
             BlobContinuationToken continuationToken = null;
             var blobs = new List<CloudBlockBlob>();
             do {
-                var listingResult = await _container.ListBlobsSegmentedAsync(prefix, true, BlobListingDetails.Metadata, null, continuationToken, null, null, cancellationToken);
+                var listingResult = await _container.ListBlobsSegmentedAsync(prefix, true, BlobListingDetails.Metadata, limit, continuationToken, null, null, cancellationToken);

                 continuationToken = listingResult.ContinuationToken;
                 blobs.AddRange(listingResult.Results.OfType<CloudBlockBlob>().MatchesPattern(patternRegex));
-            }
-            while (continuationToken != null && blobs.Count < limit);
-
-            if (limit.HasValue)
-                blobs = blobs.Take(limit.Value).ToList();
+            } while (continuationToken != null && blobs.Count < limit);

             return blobs.Select(blob => blob.ToFileInfo());
         }


BL-3368 remove obsolete license notes in lang other than '*'

(when saving new ones in proper lang, or deliberately
removing them)

--- src/BloomExe/Book/BookCopyrightAndLicense.cs
+++ src/BloomExe/Book/BookCopyrightAndLicense.cs
@@ -95,6 +95,9 @@
 			var description = metadata.License.GetDescription(collectionSettings.LicenseDescriptionLanguagePriorities, out languageUsedForDescription);
 			dom.SetBookSetting("licenseDescription", languageUsedForDescription, description);

+			// Book may have old licenseNotes, typically in 'en'. This can certainly show up again if licenseNotes in '*' is removed,
+			// and maybe anyway. Safest to remove it altogether if we are setting it using the new scheme.
+			dom.RemoveBookSetting("licenseNotes");
 			dom.SetBookSetting("licenseNotes", "*", metadata.License.RightsStatement);

 			// we could do away with licenseImage in the bloomDataDiv, since the name is always the same, but we keep it for backward compatibility


Fixed LooseArchive throwing an exception when it shouldn't

--- LooseArchive.cs
+++ LooseArchive.cs
@@ -24,9 +24,7 @@
             var path = resType.Extensions.Select(x => String.Format("{0}{1}", joined, x))
                 .FirstOrDefault(x => File.Exists(x));

-            if (path == null) {
-                throw new FileNotFoundException(joined);
-            }
+            if (path == null) return null;

             using (var stream = File.OpenRead(path)) {
                 return resType.Load(stream);


Disabled user cache:

Disabled user cache:

--- src/Collectively.Api/Storages/UserStorage.cs
+++ src/Collectively.Api/Storages/UserStorage.cs
@@ -34,6 +34,6 @@
             => await _storageClient.GetAsync<UserSession>($"user-sessions/{id}");

         public async Task<Maybe<PagedResult<UserInfo>>> BrowseAsync(BrowseUsers query)
-            => await _storageClient.GetFilteredCollectionUsingCacheAsync<UserInfo, BrowseUsers>(query, "users");
+            => await _storageClient.GetFilteredCollectionAsync<UserInfo, BrowseUsers>(query, "users");
     }
 }


Update doc with correct default port number for condep node

--- src/ConDep.Console/Deploy/CmdDeployParser.cs
+++ src/ConDep.Console/Deploy/CmdDeployParser.cs
@@ -32,7 +32,7 @@
                     {"c|cams|continueAfterMarkedServer", "Will continue deployment to remaining servers. Used after ConDep has previously executed with the stopAfterMarkedServer switch.\n", v => _options.ContinueAfterMarkedServer = v != null},
                     {"dryrun", "Will output the execution sequence without actually executing it.", v => _options.DryRun = v != null},
                     {"nodeTimeout=", "Timeout in milliseconds before calls to the ConDep server api (ConDep Node) will time out (default is 100 seconds).", v => _options.ApiTimout = Convert.ToInt32(v) },
-                    {"nodePort=", "Http port to use for remote ConDep node(s). Default is port 80.", v => _options.NodePort = Convert.ToInt32(v)}
+                    {"nodePort=", "Http port to use for remote ConDep node(s). Default is port 4444.", v => _options.NodePort = Convert.ToInt32(v)}
                 };

         }


Updated unit tests.

Updated unit tests.

--- src/ConnectQl.Tests/ConnectQlContextTests.cs
+++ src/ConnectQl.Tests/ConnectQlContextTests.cs
@@ -1,6 +1,24 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+// MIT License
+//
+// Copyright (c) 2017 Maarten van Sambeek.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.

 namespace ConnectQl.Tests
 {
@@ -12,6 +30,9 @@

     using Xunit;

+    /// <summary>
+    /// Tests for the <see cref="ConnectQlContext"/>.
+    /// </summary>
     [Trait("Category", "ConnectQlContext")]
     public class ConnectQlContextTests
     {
@@ -27,22 +48,30 @@
         /// <param name="firstResultSetCount">
         /// The number of results in the first result.
         /// </param>
+        /// <param name="firstResultValue">
+        /// The first value in the result.
+        /// </param>
         /// <returns>
         /// The <see cref="Task"/>.
         /// </returns>
-        [Theory(DisplayName = "ExecuteAsync should return a result set with the specified number of items")]
-        [InlineData("SELECT * FROM SPLIT('1,2,3', ',') splitted", 1, 3)]
-        [InlineData("SELECT * FROM SPLIT('1,2,3', ',') splitted SELECT * FROM SPLIT('1,2,3', ',') splitted", 2, 3)]
-        [InlineData("SELECT splitted.item FROM SPLIT('1,2,3', ',') splitted GROUP BY splitted.Item", 1, 3)]
-        [InlineData("SELECT COUNT(splitted.item) FROM SPLIT('1,2,3', ',') splitted GROUP BY 0", 1, 1)]
-        [InlineData("SELECT AVG(INT(splitted.item)) FROM SPLIT('1,2,3', ',') splitted GROUP BY 0", 1, 1)]
-        public async Task CurrentShouldBeDefault([NotNull] string query, int numResults, int firstResultSetCount)
+        [Theory(DisplayName = "ExecuteAsync should return a result set with the specified number of items. ")]
+        [InlineData("SELECT * FROM SPLIT('1,2,3', ',') splitted", 1, 3, "1")]
+        [InlineData("SELECT * FROM SPLIT('1,2,3', ',') splitted ORDER BY splitted.item DESC", 1, 3, "3")]
+        [InlineData("SELECT * FROM SPLIT('1,2,3', ',') splitted SELECT * FROM SPLIT('1,2,3', ',') splitted", 2, 3, "1")]
+        [InlineData("SELECT splitted.item FROM SPLIT('1,2,3', ',') splitted GROUP BY splitted.Item", 1, 3, "1")]
+        [InlineData("SELECT COUNT(splitted.item) FROM SPLIT('1,2,3', ',') splitted GROUP BY 0", 1, 1, 3)]
+        [InlineData("SELECT AVG(INT(splitted.item)) FROM SPLIT('1,2,3', ',') splitted GROUP BY 0", 1, 1, 2)]
+        public async Task CurrentShouldBeDefault([NotNull] string query, int numResults, int firstResultSetCount, object firstResultValue)
         {
             var context = new ConnectQlContext();
             var result = await context.ExecuteAsync(query);

             Assert.Equal(numResults, result.QueryResults.Count);
             Assert.Equal(firstResultSetCount, await result.QueryResults[0].Rows.CountAsync());
+
+            var row = await result.QueryResults[0].Rows.FirstAsync();
+
+            Assert.Equal(firstResultValue, row[row.ColumnNames[0]]);
         }
     }
 }


Update BoundsArc.cs

Update BoundsArc.cs

--- src/Core2D/Editor/Bounds/Shapes/BoundsArc.cs
+++ src/Core2D/Editor/Bounds/Shapes/BoundsArc.cs
@@ -14,7 +14,9 @@
         public IPointShape TryToGetPoint(IBaseShape shape, Point2 target, double radius, IDictionary<Type, IBounds> registered)
         {
             if (!(shape is IArcShape arc))
+            {
                 throw new ArgumentNullException(nameof(shape));
+            }

             var pointHitTest = registered[typeof(IPointShape)];

@@ -44,7 +46,9 @@
         public bool Contains(IBaseShape shape, Point2 target, double radius, IDictionary<Type, IBounds> registered)
         {
             if (!(shape is IArcShape arc))
+            {
                 throw new ArgumentNullException(nameof(shape));
+            }

             return ArcBounds(arc).Contains(target);
         }
@@ -52,7 +56,9 @@
         public bool Overlaps(IBaseShape shape, Rect2 target, double radius, IDictionary<Type, IBounds> registered)
         {
             if (!(shape is IArcShape arc))
+            {
                 throw new ArgumentNullException(nameof(shape));
+            }

             return ArcBounds(arc).IntersectsWith(target);
         }


Update PathToolMove.cs

Update PathToolMove.cs

[skip ci]

--- src/Core2D/Editor/Tools/Path/PathToolMove.cs
+++ src/Core2D/Editor/Tools/Path/PathToolMove.cs
@@ -39,32 +39,11 @@
         }

         /// <inheritdoc/>
-        public override void Move(double x, double y, ModifierFlags modifier)
+        public override void LeftDown(InputArgs args)
         {
-            base.Move(x, y, modifier);
+            base.LeftDown(args);
             var editor = _serviceProvider.GetService<ProjectEditor>();
-            double sx = editor.Project.Options.SnapToGrid ? ProjectEditor.Snap(x, editor.Project.Options.SnapX) : x;
-            double sy = editor.Project.Options.SnapToGrid ? ProjectEditor.Snap(y, editor.Project.Options.SnapY) : y;
-            switch (_currentState)
-            {
-                case State.Move:
-                    {
-                        if (editor.Project.Options.TryToConnect)
-                        {
-                            editor.TryToHoverShape(sx, sy);
-                        }
-                    }
-                    break;
-            }
-        }
-
-        /// <inheritdoc/>
-        public override void LeftDown(double x, double y, ModifierFlags modifier)
-        {
-            base.LeftDown(x, y, modifier);
-            var editor = _serviceProvider.GetService<ProjectEditor>();
-            double sx = editor.Project.Options.SnapToGrid ? ProjectEditor.Snap(x, editor.Project.Options.SnapX) : x;
-            double sy = editor.Project.Options.SnapToGrid ? ProjectEditor.Snap(y, editor.Project.Options.SnapY) : y;
+            (double sx, double sy) = editor.TryToSnap(args);
             switch (_currentState)
             {
                 case State.Move:
@@ -78,7 +57,26 @@
                                 editor.Project.Options.DefaultIsFilled,
                                 editor.Project.Options.DefaultIsClosed);

-                        editor.CurrentPathTool.LeftDown(x, y, modifier);
+                        editor.CurrentPathTool.LeftDown(args);
+                    }
+                    break;
+            }
+        }
+
+        /// <inheritdoc/>
+        public override void Move(InputArgs args)
+        {
+            base.Move(args);
+            var editor = _serviceProvider.GetService<ProjectEditor>();
+            (double sx, double sy) = editor.TryToSnap(args);
+            switch (_currentState)
+            {
+                case State.Move:
+                    {
+                        if (editor.Project.Options.TryToConnect)
+                        {
+                            editor.TryToHoverShape(sx, sy);
+                        }
                     }
                     break;
             }


little fix to SqlServerSqlProvider.cs allowing milliseconds to be considered in queries

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@1112 33146b6e-df29-0410-a1ca-39be37fb9416

--- src/DbLinq.SqlServer/SqlServerSqlProvider.cs
+++ src/DbLinq.SqlServer/SqlServerSqlProvider.cs
@@ -69,7 +69,7 @@

         public override SqlStatement GetLiteral(DateTime literal)
         {
-            return "'" + literal.ToString("o").Split('.')[0] + "'";
+            return "'" + literal.ToString("o").Substring(0,23) + "'";
         }

         public override string GetParameterName(string nameBase)


Added some try/catches to BinaryFormatterUtils

--- src/Dccelerator.Core/BinaryFormatterUtils.cs
+++ src/Dccelerator.Core/BinaryFormatterUtils.cs
@@ -1,6 +1,7 @@
 #if NET40 || NET45

 using System;
+using System.Diagnostics;
 using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;

@@ -22,14 +23,17 @@
                 return entity as byte[];

             if (_nullableGuid.IsAssignableFrom(type))
-                return entity.SafeCastTo<Guid?>().Value.ToByteArray();
-
-
-            var formatter = new BinaryFormatter();
+                return entity.SafeCastTo<Guid?>()?.ToByteArray();

             using (var stream = new MemoryStream()) {
-                formatter.Serialize(stream, entity);
-                return stream.ToArray();
+                try {
+                    new BinaryFormatter().Serialize(stream, entity);
+                    return stream.ToArray();
+                }
+                catch (Exception e) {
+                    Internal.TraceEvent(TraceEventType.Error, $"Can't serialize entity {entity} to {nameof(Byte)}[].\n\n{e}");
+                    return null;
+                }
             }
         }


Extract SDF and MSDF evaluation into their own functions

--- MSDFGen/MSDF.cs
+++ MSDFGen/MSDF.cs
@@ -124,63 +124,69 @@
             for (int y = yStart; y < yEnd; y++) {
                 int row = shape.InverseYAxis ? yEnd - (y - yStart) - 1 : y;
                 for (int x = xStart; x < xEnd; x++) {
-                    double dummy;
-                    Vector2 p = new Vector2(x + 0.5f, y + 0.5f) / scale - region.Position - translate;
-                    double negDist = -SignedDistance.Infinite.distance;
-                    double posDist = SignedDistance.Infinite.distance;
-                    int winding = 0;
-
-                    for (int i = 0; i < contourCount; i++) {
-                        Contour contour = shape.Contours[i];
-                        SignedDistance minDistance = new SignedDistance(-1e240, 1);
-
-                        for (int j = 0; j < contour.Edges.Count; j++) {
-                            EdgeSegment edge = contour.Edges[j];
-                            SignedDistance distance = edge.GetSignedDistance(p, out dummy);
-                            if (distance < minDistance) {
-                                minDistance = distance;
-                            }
-                        }
-
-                        contourSD[i] = minDistance.distance;
-                        if (windings[i] > 0 && minDistance.distance >= 0 && Math.Abs(minDistance.distance) < Math.Abs(posDist)) {
-                            posDist = minDistance.distance;
-                        }
-
-                        if (windings[i] < 0 && minDistance.distance <= 0 && Math.Abs(minDistance.distance) < Math.Abs(negDist)) {
-                            negDist = minDistance.distance;
-                        }
-                    }
-
-                    double sd = SignedDistance.Infinite.distance;
-
-                    if (posDist >= 0 && Math.Abs(posDist) <= Math.Abs(negDist)) {
-                        sd = posDist;
-                        winding = 1;
-                        for (int i = 0; i < contourCount; i++) {
-                            if (windings[i] > 0 && contourSD[i] > sd && Math.Abs(contourSD[i]) < Math.Abs(negDist)) {
-                                sd = contourSD[i];
-                            }
-                        }
-                    } else if (negDist <= 0 && Math.Abs(negDist) <= Math.Abs(posDist)) {
-                        sd = negDist;
-                        winding = -1;
-                        for (int i = 0; i < contourCount; i++) {
-                            if (windings[i] < 0 && contourSD[i] < sd && Math.Abs(contourSD[i]) < Math.Abs(posDist)) {
-                                sd = contourSD[i];
-                            }
-                        }
-                    }
-
-                    for (int i = 0; i < contourCount; i++) {
-                        if (windings[i] != winding && Math.Abs(contourSD[i]) < Math.Abs(sd)) {
-                            sd = contourSD[i];
-                        }
-                    }
-
-                    output[x, row] = (float)(sd / range) + 0.5f;
-                }
-            }
+                    output[x, row] = EvaluateSDF(shape, windings, contourSD, x, y, range, scale, region.Position + translate);
+                }
+            }
+        }
+
+        static float EvaluateSDF(Shape shape, int[] windings, double[] contourSD, int x, int y, double range, Vector2 scale, Vector2 translate) {
+            int contourCount = contourSD.Length;
+
+            double dummy;
+            Vector2 p = new Vector2(x + 0.5f, y + 0.5f) / scale - translate;
+            double negDist = -SignedDistance.Infinite.distance;
+            double posDist = SignedDistance.Infinite.distance;
+            int winding = 0;
+
+            for (int i = 0; i < contourCount; i++) {
+                Contour contour = shape.Contours[i];
+                SignedDistance minDistance = new SignedDistance(-1e240, 1);
+
+                for (int j = 0; j < contour.Edges.Count; j++) {
+                    EdgeSegment edge = contour.Edges[j];
+                    SignedDistance distance = edge.GetSignedDistance(p, out dummy);
+                    if (distance < minDistance) {
+                        minDistance = distance;
+                    }
+                }
+
+                contourSD[i] = minDistance.distance;
+                if (windings[i] > 0 && minDistance.distance >= 0 && Math.Abs(minDistance.distance) < Math.Abs(posDist)) {
+                    posDist = minDistance.distance;
+                }
+
+                if (windings[i] < 0 && minDistance.distance <= 0 && Math.Abs(minDistance.distance) < Math.Abs(negDist)) {
+                    negDist = minDistance.distance;
+                }
+            }
+
+            double sd = SignedDistance.Infinite.distance;
+
+            if (posDist >= 0 && Math.Abs(posDist) <= Math.Abs(negDist)) {
+                sd = posDist;
+                winding = 1;
+                for (int i = 0; i < contourCount; i++) {
+                    if (windings[i] > 0 && contourSD[i] > sd && Math.Abs(contourSD[i]) < Math.Abs(negDist)) {
+                        sd = contourSD[i];
+                    }
+                }
+            } else if (negDist <= 0 && Math.Abs(negDist) <= Math.Abs(posDist)) {
+                sd = negDist;
+                winding = -1;
+                for (int i = 0; i < contourCount; i++) {
+                    if (windings[i] < 0 && contourSD[i] < sd && Math.Abs(contourSD[i]) < Math.Abs(posDist)) {
+                        sd = contourSD[i];
+                    }
+                }
+            }
+
+            for (int i = 0; i < contourCount; i++) {
+                if (windings[i] != winding && Math.Abs(contourSD[i]) < Math.Abs(sd)) {
+                    sd = contourSD[i];
+                }
+            }
+
+            return (float)(sd / range) + 0.5f;
         }

         struct EdgePoint {
@@ -211,137 +217,142 @@
             for (int y = yStart; y < yEnd; y++) {
                 int row = shape.InverseYAxis ? yEnd - (y - yStart) - 1 : y;
                 for (int x = xStart; x < xEnd; x++) {
-                    Vector2 p = new Vector2(x + 0.5f, y + 0.5f) / scale - region.Position - translate;
-
-                    EdgePoint sr = new EdgePoint {
-                        minDistance = new SignedDistance(-1e240, 1)
-                    };
-                    EdgePoint sg = new EdgePoint {
-                        minDistance = new SignedDistance(-1e240, 1)
-                    };
-                    EdgePoint sb = new EdgePoint {
-                        minDistance = new SignedDistance(-1e240, 1)
-                    };
-
-                    double d = Math.Abs(SignedDistance.Infinite.distance);
-                    double negDist = -SignedDistance.Infinite.distance;
-                    double posDist = SignedDistance.Infinite.distance;
-                    int winding = 0;
-
-                    for (int i = 0; i < contourCount; i++) {
-                        Contour contour = shape.Contours[i];
-                        EdgePoint r = new EdgePoint {
-                            minDistance = new SignedDistance(-1e240, 1)
-                        };
-                        EdgePoint g = new EdgePoint {
-                            minDistance = new SignedDistance(-1e240, 1)
-                        };
-                        EdgePoint b = new EdgePoint {
-                            minDistance = new SignedDistance(-1e240, 1)
-                        };
-
-                        for (int j = 0; j < contour.Edges.Count; j++) {
-                            EdgeSegment edge = contour.Edges[j];
-                            double param;
-
-                            SignedDistance distance = edge.GetSignedDistance(p, out param);
-                            if ((edge.Color & EdgeColor.Red) == EdgeColor.Red && distance < r.minDistance) {
-                                r.minDistance = distance;
-                                r.nearEdge = edge;
-                                r.nearParam = param;
-                            }
-                            if ((edge.Color & EdgeColor.Green) == EdgeColor.Green && distance < g.minDistance) {
-                                g.minDistance = distance;
-                                g.nearEdge = edge;
-                                g.nearParam = param;
-                            }
-                            if ((edge.Color & EdgeColor.Blue) == EdgeColor.Blue && distance < b.minDistance) {
-                                b.minDistance = distance;
-                                b.nearEdge = edge;
-                                b.nearParam = param;
-                            }
-                        }
-
-                        if (r.minDistance < sr.minDistance) sr = r;
-                        if (g.minDistance < sg.minDistance) sg = g;
-                        if (b.minDistance < sb.minDistance) sb = b;
-
-                        double medMinDistance = Math.Abs(Median(r.minDistance.distance, g.minDistance.distance, b.minDistance.distance));
-
-                        if (medMinDistance < d) {
-                            d = medMinDistance;
-                            winding = -windings[i];
-                        }
-
-                        if (r.nearEdge != null) {
-                            r.nearEdge.DistanceToPseudoDistance(ref r.minDistance, p, r.nearParam);
-                        }
-                        if (g.nearEdge != null) {
-                            g.nearEdge.DistanceToPseudoDistance(ref g.minDistance, p, g.nearParam);
-                        }
-                        if (b.nearEdge != null) {
-                            b.nearEdge.DistanceToPseudoDistance(ref b.minDistance, p, b.nearParam);
-                        }
-
-                        medMinDistance = Median(r.minDistance.distance, g.minDistance.distance, b.minDistance.distance);
-
-                        contourSD[i].r = r.minDistance.distance;
-                        contourSD[i].g = g.minDistance.distance;
-                        contourSD[i].b = b.minDistance.distance;
-                        contourSD[i].med = medMinDistance;
-
-                        if (windings[i] > 0 && medMinDistance >= 0 && Math.Abs(medMinDistance) < Math.Abs(posDist)) {
-                            posDist = medMinDistance;
-                        }
-                        if (windings[i] < 0 && medMinDistance <= 0 && Math.Abs(medMinDistance) < Math.Abs(negDist)) {
-                            negDist = medMinDistance;
-                        }
-                    }
-
-                    if (sr.nearEdge != null) sr.nearEdge.DistanceToPseudoDistance(ref sr.minDistance, p, sr.nearParam);
-                    if (sg.nearEdge != null) sg.nearEdge.DistanceToPseudoDistance(ref sg.minDistance, p, sg.nearParam);
-                    if (sb.nearEdge != null) sb.nearEdge.DistanceToPseudoDistance(ref sb.minDistance, p, sb.nearParam);
-
-                    MultiDistance msd = new MultiDistance {
-                        r = SignedDistance.Infinite.distance,
-                        g = SignedDistance.Infinite.distance,
-                        b = SignedDistance.Infinite.distance,
-                        med = SignedDistance.Infinite.distance,
-                    };
-
-                    if (posDist >=0 && Math.Abs(posDist) <= Math.Abs(negDist)) {
-                        msd.med = SignedDistance.Infinite.distance;
-                        winding = 1;
-                        for (int i = 0; i < contourCount; i++) {
-                            if (windings[i] > 0 && contourSD[i].med > msd.med && Math.Abs(contourSD[i].med) < Math.Abs(negDist)) {
-                                msd = contourSD[i];
-                            }
-                        }
-                    } else if (negDist <= 0 && Math.Abs(negDist) <= Math.Abs(posDist)) {
-                        msd.med = -SignedDistance.Infinite.distance;
-                        winding = -1;
-                        for (int i = 0; i < contourCount; i++) {
-                            if (windings[i] < 0 && contourSD[i].med < msd.med && Math.Abs(contourSD[i].med) < Math.Abs(posDist)) {
-                                msd = contourSD[i];
-                            }
-                        }
-                    }
-
-                    for (int i = 0; i < contourCount; i++) {
-                        if (windings[i] != winding && Math.Abs(contourSD[i].med) < Math.Abs(msd.med)) {
-                            msd = contourSD[i];
-                        }
-                    }
-
-                    if (Median(sr.minDistance.distance, sg.minDistance.distance, sb.minDistance.distance) == msd.med) {
-                        msd.r = sr.minDistance.distance;
-                        msd.g = sg.minDistance.distance;
-                        msd.b = sb.minDistance.distance;
-                    }
-
-                    output[x, row] = new Color3((float)(msd.r / range) + 0.5f, (float)(msd.g / range) + 0.5f, (float)(msd.b / range) + 0.5f);
-                }
-            }
+                    output[x, row] = EvaluateMSDF(shape, windings, contourSD, x, y, range, scale, region.Position + translate);
+                }
+            }
+        }
+
+        static Color3 EvaluateMSDF(Shape shape, int[] windings, MultiDistance[] contourSD, int x, int y, double range, Vector2 scale, Vector2 translate) {
+            int contourCount = contourSD.Length;
+            Vector2 p = new Vector2(x + 0.5f, y + 0.5f) / scale - translate;
+
+            EdgePoint sr = new EdgePoint {
+                minDistance = new SignedDistance(-1e240, 1)
+            };
+            EdgePoint sg = new EdgePoint {
+                minDistance = new SignedDistance(-1e240, 1)
+            };
+            EdgePoint sb = new EdgePoint {
+                minDistance = new SignedDistance(-1e240, 1)
+            };
+
+            double d = Math.Abs(SignedDistance.Infinite.distance);
+            double negDist = -SignedDistance.Infinite.distance;
+            double posDist = SignedDistance.Infinite.distance;
+            int winding = 0;
+
+            for (int i = 0; i < contourCount; i++) {
+                Contour contour = shape.Contours[i];
+                EdgePoint r = new EdgePoint {
+                    minDistance = new SignedDistance(-1e240, 1)
+                };
+                EdgePoint g = new EdgePoint {
+                    minDistance = new SignedDistance(-1e240, 1)
+                };
+                EdgePoint b = new EdgePoint {
+                    minDistance = new SignedDistance(-1e240, 1)
+                };
+
+                for (int j = 0; j < contour.Edges.Count; j++) {
+                    EdgeSegment edge = contour.Edges[j];
+                    double param;
+
+                    SignedDistance distance = edge.GetSignedDistance(p, out param);
+                    if ((edge.Color & EdgeColor.Red) == EdgeColor.Red && distance < r.minDistance) {
+                        r.minDistance = distance;
+                        r.nearEdge = edge;
+                        r.nearParam = param;
+                    }
+                    if ((edge.Color & EdgeColor.Green) == EdgeColor.Green && distance < g.minDistance) {
+                        g.minDistance = distance;
+                        g.nearEdge = edge;
+                        g.nearParam = param;
+                    }
+                    if ((edge.Color & EdgeColor.Blue) == EdgeColor.Blue && distance < b.minDistance) {
+                        b.minDistance = distance;
+                        b.nearEdge = edge;
+                        b.nearParam = param;
+                    }
+                }
+
+                if (r.minDistance < sr.minDistance) sr = r;
+                if (g.minDistance < sg.minDistance) sg = g;
+                if (b.minDistance < sb.minDistance) sb = b;
+
+                double medMinDistance = Math.Abs(Median(r.minDistance.distance, g.minDistance.distance, b.minDistance.distance));
+
+                if (medMinDistance < d) {
+                    d = medMinDistance;
+                    winding = -windings[i];
+                }
+
+                if (r.nearEdge != null) {
+                    r.nearEdge.DistanceToPseudoDistance(ref r.minDistance, p, r.nearParam);
+                }
+                if (g.nearEdge != null) {
+                    g.nearEdge.DistanceToPseudoDistance(ref g.minDistance, p, g.nearParam);
+                }
+                if (b.nearEdge != null) {
+                    b.nearEdge.DistanceToPseudoDistance(ref b.minDistance, p, b.nearParam);
+                }
+
+                medMinDistance = Median(r.minDistance.distance, g.minDistance.distance, b.minDistance.distance);
+
+                contourSD[i].r = r.minDistance.distance;
+                contourSD[i].g = g.minDistance.distance;
+                contourSD[i].b = b.minDistance.distance;
+                contourSD[i].med = medMinDistance;
+
+                if (windings[i] > 0 && medMinDistance >= 0 && Math.Abs(medMinDistance) < Math.Abs(posDist)) {
+                    posDist = medMinDistance;
+                }
+                if (windings[i] < 0 && medMinDistance <= 0 && Math.Abs(medMinDistance) < Math.Abs(negDist)) {
+                    negDist = medMinDistance;
+                }
+            }
+
+            if (sr.nearEdge != null) sr.nearEdge.DistanceToPseudoDistance(ref sr.minDistance, p, sr.nearParam);
+            if (sg.nearEdge != null) sg.nearEdge.DistanceToPseudoDistance(ref sg.minDistance, p, sg.nearParam);
+            if (sb.nearEdge != null) sb.nearEdge.DistanceToPseudoDistance(ref sb.minDistance, p, sb.nearParam);
+
+            MultiDistance msd = new MultiDistance {
+                r = SignedDistance.Infinite.distance,
+                g = SignedDistance.Infinite.distance,
+                b = SignedDistance.Infinite.distance,
+                med = SignedDistance.Infinite.distance,
+            };
+
+            if (posDist >= 0 && Math.Abs(posDist) <= Math.Abs(negDist)) {
+                msd.med = SignedDistance.Infinite.distance;
+                winding = 1;
+                for (int i = 0; i < contourCount; i++) {
+                    if (windings[i] > 0 && contourSD[i].med > msd.med && Math.Abs(contourSD[i].med) < Math.Abs(negDist)) {
+                        msd = contourSD[i];
+                    }
+                }
+            } else if (negDist <= 0 && Math.Abs(negDist) <= Math.Abs(posDist)) {
+                msd.med = -SignedDistance.Infinite.distance;
+                winding = -1;
+                for (int i = 0; i < contourCount; i++) {
+                    if (windings[i] < 0 && contourSD[i].med < msd.med && Math.Abs(contourSD[i].med) < Math.Abs(posDist)) {
+                        msd = contourSD[i];
+                    }
+                }
+            }
+
+            for (int i = 0; i < contourCount; i++) {
+                if (windings[i] != winding && Math.Abs(contourSD[i].med) < Math.Abs(msd.med)) {
+                    msd = contourSD[i];
+                }
+            }
+
+            if (Median(sr.minDistance.distance, sg.minDistance.distance, sb.minDistance.distance) == msd.med) {
+                msd.r = sr.minDistance.distance;
+                msd.g = sg.minDistance.distance;
+                msd.b = sb.minDistance.distance;
+            }
+
+            return new Color3((float)(msd.r / range) + 0.5f, (float)(msd.g / range) + 0.5f, (float)(msd.b / range) + 0.5f);
         }
     }
 }


styles: Fix admin avatar dropdown menu #113

--- src/Fan.Web/Areas/Admin/Pages/_Layout.cshtml
+++ src/Fan.Web/Areas/Admin/Pages/_Layout.cshtml
@@ -49,33 +49,25 @@
                 <v-toolbar-side-icon @@click.stop="drawer = !drawer"></v-toolbar-side-icon>
                 <v-toolbar-title class="hidden-sm-and-down">@coreSettings.Title</v-toolbar-title>
                 <v-spacer></v-spacer>
-                <v-menu offset-y origin="center center" :nudge-bottom="6" transition="scale-transition">
-                    <v-btn icon large flat slot="activator">
+                <v-menu light offset-y left transition="scale-transition">
+                    <v-btn icon slot="activator">
                         <v-avatar size="32px">
                             <img gravatar-email="@currentUser.Email" title="@currentUser.DisplayName" />
                         </v-avatar>
                     </v-btn>
-                    <v-list>
+                    <v-list dense>
                         <v-list-tile @@click="">
-                            <v-list-tile-action>
-                                <v-icon>account_circle</v-icon>
-                            </v-list-tile-action>
-                            <v-list-tile-content>
-                                <v-list-tile-title>Profile</v-list-tile-title>
-                            </v-list-tile-content>
+                            <v-icon class="cat-action-icon">account_circle</v-icon>
+                            <v-list-tile-title>Profile</v-list-tile-title>
                         </v-list-tile>
                         <v-list-tile @@click="logout">
-                            <v-list-tile-action>
-                                <v-icon>power_settings_new</v-icon>
-                            </v-list-tile-action>
-                            <v-list-tile-content>
-                                <v-list-tile-title>Logout</v-list-tile-title>
-                            </v-list-tile-content>
+                            <v-icon class="cat-action-icon">power_settings_new</v-icon>
+                            <v-list-tile-title>Logout</v-list-tile-title>
                         </v-list-tile>
                     </v-list>
                 </v-menu>
-                <v-btn icon href="/" title="Go to my blog">
-                    <v-icon>exit_to_app</v-icon>
+                <v-btn icon href="/" title="View blog">
+                    <v-icon>public</v-icon>
                 </v-btn>
             </v-toolbar>
             @* Content *@


Update Robin-Manuel Thiel's Twitter Handle (#375)

--- src/Firehose.Web/Authors/RobinManuelThiel.cs
+++ src/Firehose.Web/Authors/RobinManuelThiel.cs
@@ -16,10 +16,10 @@

         public string FirstName => "Robin-Manuel";
         public string LastName => "Thiel";
-        public string ShortBioOrTagLine => "Technical Evangelist at Microsoft by day, tinker and fiddler by night. Loves everything with a power plug or IP address.";
+        public string ShortBioOrTagLine => "Techie at Microsoft by day, tinker and fiddler by night. Loves everything with a power plug or IP address.";
         public string StateOrRegion => "Munich, Germany";
         public string EmailAddress => string.Empty;
-        public string TwitterHandle => "einRobby";
+        public string TwitterHandle => "robinmanuelt";
         public string GitHubHandle => "robinmanuelthiel";
         public GeoPosition Position => new GeoPosition(48.177622, 11.5912643);
         public Uri WebSite => new Uri("https://pumpingco.de/");


Fix small typo in the footer (#83)

Fix small typo in the footer (#83)

--- src/Firehose.Web/Views/Shared/_Layout.cshtml
+++ src/Firehose.Web/Views/Shared/_Layout.cshtml
@@ -42,7 +42,7 @@

-
Do you blog about Xamarin? Add yourself to the aggregator by sending in a pull-request to our repository on GitHub. Planet Xamairn is not affiliated with Xamarin Inc. or Microsoft and is a open-source project maintained by the community for the community.

+
Do you blog about Xamarin? Add yourself to the aggregator by sending in a pull-request to our repository on GitHub. Planet Xamarin is not affiliated with Xamarin Inc. or Microsoft and is a open-source project maintained by the community for the community.


Changed code according to discussion in #85

--- src/GitReleaseNotes/ReleaseNotesGenerator.cs
+++ src/GitReleaseNotes/ReleaseNotesGenerator.cs
@@ -1,4 +1,5 @@
-using GitTools;
+using System.Collections.Generic;
+using GitTools;
 using GitTools.Git;
 using GitTools.IssueTrackers;

@@ -106,26 +107,84 @@
                 ??
                 tagToStartFrom.Commit.Author.When;

-            var closedIssues = issueTracker.GetIssues("status in (closed, done)");
-            //var closedIssues = issueTracker.GetClosedIssues(context.IssueTracker, findIssuesSince).ToArray();
-
-            var semanticReleases = (
-                from release in releases
-                let releaseNoteItems = closedIssues
-                    .Where(i => (release.When == null || i.DateClosed < release.When) && (release.PreviousReleaseDate == null || i.DateClosed > release.PreviousReleaseDate))
-                    //.Select(i => new ReleaseNoteItem(i.Title, i.Id, i.Url, i.Labels, i.DateClosed, i.Contributors))
-                    .Select(i => new ReleaseNoteItem(i.Title, i.Id, i.Url, i.Labels, i.DateClosed, new Contributor[] { /*TODO: implement*/ }))
-                    .ToList<IReleaseNoteLine>()
-                let beginningSha = release.FirstCommit == null ? null : release.FirstCommit.Substring(0, 10)
-                let endSha = release.LastCommit == null ? null : release.LastCommit.Substring(0, 10)
-                select new SemanticRelease(release.Name, release.When, releaseNoteItems, new ReleaseDiffInfo
-                {
-                    BeginningSha = beginningSha,
-                    EndSha = endSha,
-                    //DiffUrlFormat = issueTracker.DiffUrlFormat
-                })).ToList();
-
-            return new SemanticReleaseNotes(semanticReleases, categories).Merge(previousReleaseNotes);
+            var closedIssues = issueTracker.GetIssues(includeOpen: false);
+
+            // As discussed here: https://github.com/GitTools/GitReleaseNotes/issues/85
+
+            var semanticReleases = new Dictionary<string, SemanticRelease>();
+
+            foreach (var issue in closedIssues)
+            {
+                // 1) Include all issues from the issue tracker that are assigned to this release
+                foreach (var fixVersion in issue.FixVersions)
+                {
+                    if (!semanticReleases.ContainsKey(fixVersion.Name))
+                    {
+                        semanticReleases.Add(fixVersion.Name, new SemanticRelease(fixVersion.Name, fixVersion.ReleaseDate));
+                    }
+
+                    var semanticRelease = semanticReleases[fixVersion.Name];
+
+                    var releaseNoteItem = new ReleaseNoteItem(issue.Title, issue.Id, issue.Url, issue.Labels,
+                        issue.DateClosed, new Contributor[] { /*TODO: implement*/ });
+
+                    semanticRelease.ReleaseNoteLines.Add(releaseNoteItem);
+                }
+
+                // 2) Get closed issues from the issue tracker that have no fixversion but are closed between the last release and this release
+                if (issue.FixVersions.Count == 0)
+                {
+                    foreach (var release in releases)
+                    {
+                        if (issue.DateClosed.HasValue &&
+                            issue.DateClosed.Value > release.PreviousReleaseDate &&
+                            issue.DateClosed <= release.When)
+                        {
+                            if (!semanticReleases.ContainsKey(release.Name))
+                            {
+                                var beginningSha = release.FirstCommit != null ? release.FirstCommit.Substring(0, 10) : null;
+                                var endSha = release.LastCommit != null ? release.LastCommit.Substring(0, 10) : null;
+
+                                semanticReleases.Add(release.Name, new SemanticRelease(release.Name, release.When, new ReleaseDiffInfo
+                                {
+                                    BeginningSha = beginningSha,
+                                    EndSha = endSha,
+                                    //DiffUrlFormat = issueTracker.DiffUrlFormat
+                                }));
+                            }
+
+                            var semanticRelease = semanticReleases[release.Name];
+
+                            var releaseNoteItem = new ReleaseNoteItem(issue.Title, issue.Id, issue.Url, issue.Labels,
+                                issue.DateClosed, new Contributor[] { /*TODO: implement*/ });
+
+                            semanticRelease.ReleaseNoteLines.Add(releaseNoteItem);
+                        }
+                    }
+                }
+            }
+
+            // 3) Remove any duplicates
+            // TODO
+
+
+            //var semanticReleases = (
+            //    from release in releases
+            //    let releaseNoteItems = closedIssues
+            //        .Where(i => (release.When == null || i.DateClosed < release.When) && (release.PreviousReleaseDate == null || i.DateClosed > release.PreviousReleaseDate))
+            //        //.Select(i => new ReleaseNoteItem(i.Title, i.Id, i.Url, i.Labels, i.DateClosed, i.Contributors))
+            //        .Select(i => new ReleaseNoteItem(i.Title, i.Id, i.Url, i.Labels, i.DateClosed, new Contributor[] { /*TODO: implement*/ }))
+            //        .ToList<IReleaseNoteLine>()
+            //    let beginningSha = release.FirstCommit == null ? null : release.FirstCommit.Substring(0, 10)
+            //    let endSha = release.LastCommit == null ? null : release.LastCommit.Substring(0, 10)
+            //    select new SemanticRelease(release.Name, release.When, releaseNoteItems, new ReleaseDiffInfo
+            //    {
+            //        BeginningSha = beginningSha,
+            //        EndSha = endSha,
+            //        //DiffUrlFormat = issueTracker.DiffUrlFormat
+            //    })).ToList();
+
+            return new SemanticReleaseNotes(semanticReleases.Values, categories).Merge(previousReleaseNotes);
         }

         private static DateTimeOffset? IssueStartDateBasedOnPreviousReleaseNotes(IRepository gitRepo,


Return normal json for standard json request

--- src/Halcyon/HAL/JsonHALMediaTypeFormatter.cs
+++ src/Halcyon/HAL/JsonHALMediaTypeFormatter.cs
@@ -15,7 +15,7 @@

         private readonly string[] jsonMedaiTypes;

-        public JsonHALMediaTypeFormatter(string[] halJsonMedaiTypes = null, string[] jsonMedaiTypes = null)
+        public JsonHALMediaTypeFormatter(string[] halJsonMedaiTypes = null, string[] jsonMediaTypes = null)
             : base() {
             if (halJsonMedaiTypes == null) {
                 halJsonMedaiTypes = new string[] { HalJsonType };
@@ -25,11 +25,11 @@
                 SupportedMediaTypes.Add(new MediaTypeHeaderValue(mediaType));
             }

-            foreach(var mediaType in jsonMedaiTypes.Where(t => t != JsonMediaTypeFormatter.DefaultMediaType.MediaType)) {
+            foreach(var mediaType in jsonMediaTypes.Where(t => t != JsonMediaTypeFormatter.DefaultMediaType.MediaType)) {
                 SupportedMediaTypes.Add(new MediaTypeHeaderValue(mediaType));
             }

-            this.jsonMedaiTypes = jsonMedaiTypes;
+            this.jsonMedaiTypes = jsonMediaTypes;
         }

         public override bool CanReadType(Type type) {
@@ -50,7 +50,8 @@
             if(type == typeof(HALModel) && value != null) {
                 var halResponse = ((HALModel)value);

-                if (!halResponse.Config.ForceHAL && jsonMedaiTypes.Contains(content.Headers.ContentType.MediaType)) {
+                string mediaType = content.Headers.ContentType.MediaType;
+                if (!halResponse.Config.ForceHAL && (jsonMedaiTypes.Contains(mediaType) || mediaType == JsonMediaTypeFormatter.DefaultMediaType.MediaType)) {
                     value = halResponse.ToPlainResponse();
                 }
             }


Rolled version number

Rolled version number

--- src/Html2Markdown/Properties/AssemblyInfo.cs
+++ src/Html2Markdown/Properties/AssemblyInfo.cs
@@ -31,4 +31,4 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.12.*")]
+[assembly: AssemblyVersion("2.0.13.*")]


Minor changes.

Minor changes.

--- src/Inflatable/QueryProvider/QueryResults.cs
+++ src/Inflatable/QueryProvider/QueryResults.cs
@@ -67,7 +67,7 @@
         /// Gets the values.
         /// </summary>
         /// <value>The values.</value>
-        public IList<Dynamo> Values { get; }
+        public List<Dynamo> Values { get; }

         /// <summary>
         /// Gets the cached items as a list.
@@ -141,8 +141,9 @@
         {
             if (!CanCopy(results, idProperties))
                 return;
-            foreach (var Value in results.Values)
+            for (int i = 0, resultsValuesCount = results.Values.Count; i < resultsValuesCount; i++)
             {
+                var Value = results.Values[i];
                 var MyValue = Values.FirstOrDefault(x => idProperties.All(y => y.GetColumnInfo()[0].GetValue(x).Equals(y.GetColumnInfo()[0].GetValue(Value))));
                 if (MyValue != null)
                     Value.CopyTo(MyValue);
@@ -163,8 +164,9 @@
                 Values.Add(results.Values);
                 return;
             }
-            foreach (var Value in results.Values)
+            for (int i = 0, resultsValuesCount = results.Values.Count; i < resultsValuesCount; i++)
             {
+                var Value = results.Values[i];
                 var MyValue = Values.FirstOrDefault(x => idProperties.All(y => y.GetColumnInfo()[0].GetValue(x).Equals(y.GetColumnInfo()[0].GetValue(Value))));
                 if (MyValue == null)
                     Values.Add(Value);


More logs not for MASTER

More logs not for MASTER

--- resharper/resharper-unity/src/Unity/UnityEditorIntegration/Packages/PackageManager.cs
+++ resharper/resharper-unity/src/Unity/UnityEditorIntegration/Packages/PackageManager.cs
@@ -16,6 +16,7 @@
 using JetBrains.Threading;
 using JetBrains.Util;
 using JetBrains.Util.Logging;
+using Newtonsoft.Json;

 #nullable enable

@@ -307,8 +308,13 @@

             return myLogger.CatchSilent(() =>
             {
-                var packagesLockJson = PackagesLockJson.FromJson(myPackagesLockPath.ReadAllText2().Text);
-
+                var json = myPackagesLockPath.ReadAllText2().Text;
+                myLogger.Info($"package json text:\n{json}");
+                var packagesLockJson = PackagesLockJson.FromJson(json);
+                foreach (var (key, value) in packagesLockJson.Dependencies)
+                {
+                    myLogger.Info($"{key}:{value.Source} data:{JsonConvert.SerializeObject(value)}");
+                }
                 var packages = new List<PackageData>();
                 foreach (var (id, details) in packagesLockJson.Dependencies)
                     packages.Add(GetPackageData(id, details, builtInPackagesFolder));


Remove magic number

Remove magic number

--- NBitcoin/Key.cs
+++ NBitcoin/Key.cs
@@ -14,6 +14,8 @@
 {
 	public class Key : IBitcoinSerializable, IDestination
 	{
+        private const int KEY_SIZE = 32;
+
 		public static Key Parse(string wif, Network network = null)
 		{
 			return Network.CreateFromBase58Data<BitcoinSecret>(wif, network).PrivateKey;
@@ -37,9 +39,10 @@
 		{

 		}
+
 		public Key(bool fCompressedIn)
 		{
-			byte[] data = new byte[32];
+			byte[] data = new byte[KEY_SIZE];

 			do
 			{
@@ -52,7 +55,7 @@
 		{
 			if(count == -1)
 				count = data.Length;
-			if(count != 32)
+			if(count != KEY_SIZE)
 			{
 				throw new FormatException("The size of an EC key should be 32");
 			}
@@ -66,7 +69,7 @@

 		private void SetBytes(byte[] data, int count, bool fCompressedIn)
 		{
-			vch = new byte[32];
+			vch = new byte[KEY_SIZE];
 			Array.Copy(data, 0, vch, 0, count);
 			IsCompressed = fCompressedIn;
 			_ECKey = new ECKey(vch, true);
@@ -83,12 +86,12 @@
         0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
     };
 			bool fIsZero = true;
-			for(int i = 0 ; i < 32 && fIsZero ; i++)
+			for(int i = 0 ; i < KEY_SIZE && fIsZero ; i++)
 				if(vch[i] != 0)
 					fIsZero = false;
 			if(fIsZero)
 				return false;
-			for(int i = 0 ; i < 32 ; i++)
+			for(int i = 0 ; i < KEY_SIZE ; i++)
 			{
 				if(vch[i] < vchMax[i])
 					return true;
@@ -193,7 +196,6 @@
 			Array.Copy(l, 32, lr, 0, 32);
 			ccChild = lr;

-
 			BigInteger parse256LL = new BigInteger(1, ll);
 			BigInteger kPar = new BigInteger(1, vch);
 			BigInteger N = ECKey.CURVE.N;
@@ -229,6 +231,7 @@
 		{
 			return new BitcoinSecret(this, network);
 		}
+
 		/// <summary>
 		/// Same than GetBitcoinSecret
 		/// </summary>


Fixed compile issues

Fixed compile issues

--- Pacman/Ghost.cs
+++ Pacman/Ghost.cs
@@ -8,47 +8,47 @@

 namespace Pacman
 {
-    class Ghost
-    {
-        /// <summary>
-        /// Indicates the state ghosts are in.
-        /// </summary>
-        public GhostState state = GhostState.Chase;
-        private static CircleShape body;
+	class Ghost
+	{
+		/// <summary>
+		/// Indicates the state ghosts are in.
+		/// </summary>
+		public GhostState state = GhostState.Chase;
+		private static CircleShape body;

-        private static bool GotPacman;
+		private static bool GotPacman;

-        public const float UPDATE_TICKRATE = 0.3f;
+		public const float UPDATE_TICKRATE = 0.3f;

-        private int iPos;
-        private int jPos;
-        private float totalTime;
-        private int[,] distances;
-        private Direction nextMove;
+		private int iPos;
+		private int jPos;
+		private float totalTime;
+		private int[,] distances;
+		private Direction nextMove;

-        public Direction direction = Direction.Down;
+		public Direction direction = Direction.Down;

-        static Ghost()
-        {
-            body = new CircleShape(Grid.TILE_SIZE / 2f);
-            body.FillColor = Color.Red;
-            GotPacman = false;
-        }
+		static Ghost()
+		{
+			body = new CircleShape(Grid.TILE_SIZE / 2f);
+			body.FillColor = Color.Red;
+			GotPacman = false;
+		}

-        public Ghost()
-        {
+		public Ghost()
+		{

-            distances = new int[Grid.GRID_WIDTH, Grid.GRID_HEIGHT];
-            GotPacman = false;
+			distances = new int[Grid.GRID_WIDTH, Grid.GRID_HEIGHT];
+			GotPacman = false;

-            iPos = 14;
-            jPos = 13;
-            nextMove = Direction.None;
+			iPos = 14;
+			jPos = 13;
+			nextMove = Direction.None;

-        }
+		}

-	    public void Draw(RenderWindow window)
-	    {
+		public void Draw(RenderWindow window)
+		{
 			if (!GotPacman)
 			{
 				body.Position = new Vector2f(iPos * Grid.TILE_SIZE, jPos * Grid.TILE_SIZE + Grid.DRAW_OFFSET);
@@ -56,101 +56,100 @@
 			}
 		}

-	    public void Update(float time, Grid grid, Pacman pacman)
-	    {
+		public void Update(float time, Grid grid, Pacman pacman)
+		{

-		    totalTime += time;
-		    if (grid.IsPelletActive)
-		    {
-			    state = GhostState.Frightened;
-		    }
+			totalTime += time;
+			if (grid.IsPelletActive)
+			{
+				state = GhostState.Frightened;
+			}

-		    distances = PathFinding.InitMoves(distances, iPos, jPos);
-		    PathFinding.CalculateMoves(grid, iPos, jPos, pacman.iPos, pacman.jPos, ref distances);
-		    //for (int i = 0; i < distances.GetLength(1); i++)
-		    //{
-		    //	for (int j = 0; j < distances.GetLength(0); j++)
-		    //	{
-		    //		if (distances[j, i] != int.MaxValue)
-		    //			Console.Write(((distances[j, i] <= 9) ? "0" + distances[j, i] : distances[j, i] + "") + " ");
-		    //		else
-		    //		{
-		    //			Console.Write("XX ");
-		    //		}
-		    //	}
-		    //	Console.WriteLine();
-		    //}
-		    nextMove = PathFinding.FindFirstMove(distances, pacman.iPos, pacman.jPos, pacman.iPos, pacman.jPos, nextMove);
+			distances = PathFinding.InitMoves(distances, iPos, jPos);
+			PathFinding.CalculateMoves(grid, iPos, jPos, pacman.iPos, pacman.jPos, ref distances);
+			//for (int i = 0; i < distances.GetLength(1); i++)
+			//{
+			//	for (int j = 0; j < distances.GetLength(0); j++)
+			//	{
+			//		if (distances[j, i] != int.MaxValue)
+			//			Console.Write(((distances[j, i] <= 9) ? "0" + distances[j, i] : distances[j, i] + "") + " ");
+			//		else
+			//		{
+			//			Console.Write("XX ");
+			//		}
+			//	}
+			//	Console.WriteLine();
+			//}
+			nextMove = PathFinding.FindFirstMove(distances, pacman.iPos, pacman.jPos, pacman.iPos, pacman.jPos, nextMove);

-		    if (state == GhostState.Frightened)
-		    {
+			if (state == GhostState.Frightened)
+			{

-		    }
+			}

-		    else if (state == GhostState.Scatter)
-		    {
+			else if (state == GhostState.Scatter)
+			{

-			    if (iPos == pacman.iPos && jPos == pacman.jPos && !GotPacman)
-			    {
+				if (iPos == pacman.iPos && jPos == pacman.jPos && !GotPacman)
+				{

-				    GotPacman = true;
-				    pacman.Caught();
-            }
+					GotPacman = true;
+					pacman.Caught();
+				}

-			    }
-			    //Console.WriteLine(nextMove);
+			}
+			//Console.WriteLine(nextMove);

-			    if (totalTime > 0.2f)
-			    {
-				    totalTime = 0;
-				    switch (nextMove)
-				    {
-					    case Direction.Down:
-						    jPos++;
-						    break;
+			if (totalTime > 0.2f)
+			{
+				totalTime = 0;
+				switch (nextMove)
+				{
+					case Direction.Down:
+						jPos++;
+						break;

-					    case Direction.Left:
-						    iPos--;
-						    break;
+					case Direction.Left:
+						iPos--;
+						break;

-					    case Direction.Right:
-						    iPos++;
-						    break;
+					case Direction.Right:
+						iPos++;
+						break;

-					    case Direction.Up:
-						    jPos--;
-						    break;
+					case Direction.Up:
+						jPos--;
+						break;

-				    }
-			    }
-		    }
-	    }
-
-        private void ChangeToFrightenedMode()
-        {
-            body.FillColor = Color.Blue;
-            SuddenlyChangeDirection();
+				}
+			}
 		}

-        private void SuddenlyChangeDirection()
-        {
-            if (nextMove == Direction.Up)
-                nextMove = Direction.Down;
-            else if (nextMove == Direction.Down)
-                nextMove = Direction.Up;
-            else if (nextMove == Direction.Left)
-                nextMove = Direction.Right;
-            else if (nextMove == Direction.Right)
-                nextMove = Direction.Left;
-        }
+		private void ChangeToFrightenedMode()
+		{
+			body.FillColor = Color.Blue;
+			SuddenlyChangeDirection();
+		}

-        //private void isGhostAtCrossroads()
-        //{
-        //    if (distances[iPos + 1, jPos] == )
-        //}
+		private void SuddenlyChangeDirection()
+		{
+			if (nextMove == Direction.Up)
+				nextMove = Direction.Down;
+			else if (nextMove == Direction.Down)
+				nextMove = Direction.Up;
+			else if (nextMove == Direction.Left)
+				nextMove = Direction.Right;
+			else if (nextMove == Direction.Right)
+				nextMove = Direction.Left;
+		}
+
+		//private void isGhostAtCrossroads()
+		//{
+		//    if (distances[iPos + 1, jPos] == )
+		//}

-    }
+	}
 }