down to 7 failing tests

down to 7 failing tests

--- src/Storage.Net/Blob/ListOptions.cs
+++ src/Storage.Net/Blob/ListOptions.cs
@@ -1,11 +1,30 @@
 namespace Storage.Net.Blob
 {
+   /// <summary>
+   /// Options for listing storage content
+   /// </summary>
    public class ListOptions
    {
+      private string _prefix;
+
       public string FolderPath { get; set; }

-      public string Prefix { get; set; }
+      /// <summary>
+      /// Prefix to filter the name by
+      /// </summary>
+      public string Prefix
+      {
+         get => _prefix;
+         set
+         {
+            GenericValidation.CheckBlobPrefix(value);
+            _prefix = Prefix;
+         }
+      }

+      /// <summary>
+      /// When true, operation will recursively navigate down the folders
+      /// </summary>
       public bool Recurse { get; set; }
    }
 }


Make several methods in Executor that were public into protected methods. They should of never been public. They were because of the now removed IExecutorHandler interface.

--- src/Symbooglix/Executor/Executor.cs
+++ src/Symbooglix/Executor/Executor.cs
@@ -372,7 +372,7 @@
             }
         }

-        private void ExecuteInstruction()
+        protected void ExecuteInstruction()
         {
             Absy currentInstruction = CurrentState.GetCurrentStackFrame().CurrentInstruction.Current;
             if (currentInstruction == null)
@@ -452,7 +452,7 @@
         // otherwise procedureParams should be a listof Expr for the procedure.
         // Note there is not need to make a copy of these Expr because a Boogie
         // procedure is not allowed to modify passed in parameters.
-        public void EnterImplementation(Implementation Impl, List<Expr> implementationParams)
+        protected void EnterImplementation(Implementation Impl, List<Expr> implementationParams)
         {
             bool isProgramEntryPoint = CurrentState.Mem.Stack.Count == 0;

@@ -586,7 +586,7 @@
             }
         }

-        public void EnterAndLeaveProcedure(Procedure proc, List<Expr> procedureParams)
+        protected void EnterAndLeaveProcedure(Procedure proc, List<Expr> procedureParams)
         {
             Debug.Assert(CurrentState.Mem.Stack.Count > 0, "Can't enter a procedure without first entering an implementation");
             StackFrame callingStackFrame = CurrentState.GetCurrentStackFrame();
@@ -702,7 +702,7 @@
             CurrentState.Mem.PopStackFrame();
         }

-        public void Handle(ReturnCmd c)
+        protected void Handle(ReturnCmd c)
         {
             var VMR = new VariableMapRewriter(CurrentState);

@@ -786,7 +786,7 @@
         }

-        public void Handle(AssignCmd c)
+        protected void Handle(AssignCmd c)
         {
             int index=0;
             VariableMapRewriter r = new VariableMapRewriter(CurrentState);
@@ -836,7 +836,7 @@
             }
         }

-        public void Handle(AssertCmd c)
+        protected void Handle(AssertCmd c)
         {
             HandleBreakPoints(c);
             VariableMapRewriter r = new VariableMapRewriter(CurrentState);
@@ -1033,7 +1033,7 @@
             return true; // We are still in the current state
         }

-        public void Handle(AssumeCmd c)
+        protected void Handle(AssumeCmd c)
         {
             HandleBreakPoints(c);
             VariableMapRewriter r = new VariableMapRewriter(CurrentState);
@@ -1048,7 +1048,7 @@
             HandleAssumeLikeCommand(dupAndrw, new TerminatedAtUnsatisfiableAssume(c), c.GetProgramLocation());
         }

-        public void Handle(GotoCmd c)
+        protected void Handle(GotoCmd c)
         {
             Debug.Assert(c.labelTargets.Count() > 0);

@@ -1068,7 +1068,7 @@
             CurrentState.GetCurrentStackFrame().TransferToBlock(c.labelTargets[0]);
         }

-        public void Handle(CallCmd c)
+        protected void Handle(CallCmd c)
         {
             var args = new List<Expr>();
             var reWritter = new VariableMapRewriter(CurrentState);
@@ -1099,17 +1099,17 @@
             }
         }

-        public void Handle(AssertEnsuresCmd c)
+        protected void Handle(AssertEnsuresCmd c)
         {
             throw new NotImplementedException ();
         }

-        public void Handle(AssertRequiresCmd c)
+        protected void Handle(AssertRequiresCmd c)
         {
             throw new NotImplementedException ();
         }

-        public void Handle(HavocCmd c)
+        protected void Handle(HavocCmd c)
         {
             for (int index=0; index < c.Vars.Count ; ++index)
             {
@@ -1121,7 +1121,7 @@
             }
         }

-        public void Handle(YieldCmd c)
+        protected void Handle(YieldCmd c)
         {
             throw new NotImplementedException ();
         }


edge adding methods

edge adding methods

--- Graph/Graph.cs
+++ Graph/Graph.cs
@@ -61,4 +61,17 @@
 		public void AddVertex (string label)
 		{
 		}
+
+		// Add an edge using labels of existing vertices.
+		public void AddDirectedEdge(string TailLabel, string HeadLabel)
+		{
+
+		}
+
+		// Add an edge using two Vertex objects.
+		public void AddUndirectedEdge(string label1, string label2)
+		{
+			this.AddDirectedEdge (label1, label2);
+			this.AddDirectedEdge (label2, label1);
+		}
 }


Add helper static class for creating new HOTSequences.

--- HOTSequence.cs
+++ HOTSequence.cs
@@ -6,6 +6,14 @@
 {
 	public class HOTSequence
 	{
+		public static HOTSequence New
+		{
+			get
+			{
+				return new HOTSequence();
+			}
+		}
+
 		protected class SequenceOp
 		{
 			public enum OpType


Fix the PDU size in communication setup

Fix the PDU size in communication setup

[7, 80] resulted in 1872; [7, 128] (or [0x07, 0x80] in hex) results in
the 1920 as specified in comments.


Fix cursor run off crash.

Fix cursor run off crash.

--- SadConsole/Cursor.cs
+++ SadConsole/Cursor.cs
@@ -239,7 +239,7 @@
             (int x, int y) = _position;
             x += 1;

-            if (_position.X >= _editor.BufferWidth)
+            if (x >= _editor.BufferWidth)
             {
                 x = 0;
                 y += 1;


DateTimeの時間を変更するユーティリティー

DateTimeの時間を変更するユーティリティー

--- Sdx/Util/Datetime.cs
+++ Sdx/Util/Datetime.cs
@@ -11,5 +11,27 @@
     {
       return dateTime.AddTicks(-(dateTime.Ticks % TimeSpan.TicksPerSecond));
     }
+
+    /// <summary>
+    /// 時間を変更した、あたらしいDateTimeを返します。
+    /// </summary>
+    /// <param name="dateTime"></param>
+    /// <param name="hours"></param>
+    /// <param name="minutes"></param>
+    /// <param name="seconds"></param>
+    /// <param name="milliseconds"></param>
+    /// <returns></returns>
+    public static System.DateTime ChangeTime(System.DateTime dateTime, int hours, int minutes, int seconds, int milliseconds = 0)
+    {
+      return new DateTime(
+        dateTime.Year,
+        dateTime.Month,
+        dateTime.Day,
+        hours,
+        minutes,
+        seconds,
+        milliseconds,
+        dateTime.Kind);
+    }
   }
 }


remove unnecassary warning disables

remove unnecassary warning disables

--- Semver/SemVersion.cs
+++ Semver/SemVersion.cs
@@ -34,13 +34,11 @@
                 TimeSpan.FromSeconds(0.5));

 #if !NETSTANDARD
-#pragma warning disable CA1801 // Parameter unused
         ///
         /// Deserialize a <see cref="SemVersion"/>.
         ///
         /// <exception cref="ArgumentNullException">The <paramref name="info"/> parameter is null.</exception>
         private SemVersion(SerializationInfo info, StreamingContext context)
-#pragma warning restore CA1801 // Parameter unused
         {
             if (info == null) throw new ArgumentNullException(nameof(info));
             var semVersion = Parse(info.GetString("SemVersion"));
@@ -344,10 +342,8 @@
             var r = CompareByPrecedence(other);
             if (r != 0) return r;

-#pragma warning disable CA1062 // Validate arguments of public methods
             // If other is null, CompareByPrecedence() returns 1
             return CompareComponent(Build, other.Build);
-#pragma warning restore CA1062 // Validate arguments of public methods
         }

         ///
@@ -492,7 +488,6 @@
         }
 #endif

-#pragma warning disable CA2225 // Operator overloads have named alternates
         ///
         /// Implicit conversion from <see cref="string"/> to <see cref="SemVersion"/>.
         ///
@@ -502,7 +497,6 @@
         /// <exception cref="ArgumentException">The version number has an invalid format.</exception>
         /// <exception cref="OverflowException">The Major, Minor, or Patch versions are larger than int.MaxValue.</exception>
         public static implicit operator SemVersion(string version)
-#pragma warning restore CA2225 // Operator overloads have named alternates
         {
             return Parse(version);
         }


Added null check incase devforum title comes back null.

--- src/WizBot/Modules/Roblox/Roblox.cs
+++ src/WizBot/Modules/Roblox/Roblox.cs
@@ -135,7 +135,10 @@
                                             .AddField("Username",
                                                 $"[{rInfo["username"]}](https://devforum.roblox.com/u/{rDevForum["user"]!["username"]})",
                                                 true)
-                                            .AddField("Title", $"{rDevForum["user"]!["title"]}", true)
+                                            .AddField("Title",
+                                                string.IsNullOrEmpty($"{rDevForum["user"]!["title"]}")
+                                                    ? none
+                                                    : ($"{rDevForum["user"]!["title"]}"), true)
                                             .AddField("Trust Level", $"{rDevForum["user"]!["trust_level"]}", true)
                                             .AddField("Bio", (string.IsNullOrEmpty($"{rDevForum["user"]!["bio_raw"]}")
                                                 ? none


partless experiments, atmosphere, descriptions

--- Source/DMContract.cs
+++ Source/DMContract.cs
@@ -178,7 +178,10 @@
 		protected override string GetDescription()
 		{
 			string story = DMUtils.storyList[rand.Next(0, DMUtils.storyList.Count)];
-			return string.Format(story, this.agent.Name, DMUtils.availableScience.FirstOrDefault(v => v.Value == DMscience).Key, body.theName, aPart.title, targetSituation); ;
+			if (aPart != null)
+				return string.Format(story, this.agent.Name, DMUtils.availableScience.FirstOrDefault(v => v.Value == DMscience).Key, body.theName, aPart.title, targetSituation);
+			else
+				return string.Format(story, this.agent.Name, DMUtils.availableScience.FirstOrDefault(v => v.Value == DMscience).Key, body.theName, "Kerbal", targetSituation);
 		}

 		protected override string GetSynopsys()
@@ -234,7 +237,15 @@
 			name = node.GetValue("ScienceExperiment");
 			if (DMUtils.availableScience.TryGetValue(name, out DMscience))
 			{
-				aPart = ResearchAndDevelopment.Instance.GetTechState(DMscience.sciNode).partsPurchased.FirstOrDefault(p => p.name == DMscience.sciPart);
+				try
+				{
+					aPart = ResearchAndDevelopment.Instance.GetTechState(DMscience.sciNode).partsPurchased.FirstOrDefault(p => p.name == DMscience.sciPart);
+				}
+				catch
+				{
+					DMUtils.DebugLog("No Valid Part Associated With This Experiment");
+					aPart = null;
+				}
 				ScienceExperiment tryExp = DMscience.exp;
 				if (tryExp != null)
 					exp = tryExp;
@@ -298,10 +309,20 @@
 				expSitList.Add(ExperimentSituations.FlyingHigh);
 			if (((ExperimentSituations)i & ExperimentSituations.FlyingLow) == ExperimentSituations.FlyingLow && b.atmosphere)
 				expSitList.Add(ExperimentSituations.FlyingLow);
-			if (((ExperimentSituations)i & ExperimentSituations.InSpaceHigh) == ExperimentSituations.InSpaceHigh && !exp.requireAtmosphere)
-				expSitList.Add(ExperimentSituations.InSpaceHigh);
-			if (((ExperimentSituations)i & ExperimentSituations.InSpaceLow) == ExperimentSituations.InSpaceLow && !exp.requireAtmosphere)
-				expSitList.Add(ExperimentSituations.InSpaceLow);
+			if (((ExperimentSituations)i & ExperimentSituations.InSpaceHigh) == ExperimentSituations.InSpaceHigh)
+			{
+				if (!exp.requireAtmosphere)
+					expSitList.Add(ExperimentSituations.InSpaceHigh);
+				else if (b.atmosphere)
+					expSitList.Add(ExperimentSituations.InSpaceHigh);
+			}
+			if (((ExperimentSituations)i & ExperimentSituations.InSpaceLow) == ExperimentSituations.InSpaceLow)
+			{
+				if (!exp.requireAtmosphere)
+					expSitList.Add(ExperimentSituations.InSpaceLow);
+				else if (b.atmosphere)
+					expSitList.Add(ExperimentSituations.InSpaceLow);
+			}
 			if (((ExperimentSituations)i & ExperimentSituations.SrfLanded) == ExperimentSituations.SrfLanded && b.pqsController != null)
 			{
 				if (!exp.requireAtmosphere)


fixed menu screen with no options

fixed menu screen with no options

--- Source/MenuScreen.cs
+++ Source/MenuScreen.cs
@@ -121,51 +121,63 @@

 			if (input.IsMenuSelect(ControllingPlayer, out playerIndex))
 			{
+				MenuSelect(playerIndex);
+			}
+			else if (input.IsMenuCancel(ControllingPlayer, out playerIndex))
+			{
+				OnCancel(playerIndex);
+			}
+		}
+
+		protected virtual void MenuUp()
+		{
+			if (MenuEntries.Count > 1)
+			{
+				SelectedEntry--;
+
+				if (SelectedEntry < 0)
+				{
+					SelectedEntry = MenuEntries.Count - 1;
+				}
+
+				//play menu noise
+				ScreenManager.MenuChange.Play();
+
+				ResetInputTimer();
+			}
+		}
+
+		protected virtual void MenuDown()
+		{
+			if (MenuEntries.Count > 1)
+			{
+				SelectedEntry++;
+
+				if (SelectedEntry >= MenuEntries.Count)
+				{
+					SelectedEntry = 0;
+				}
+
+				//play menu noise
+				ScreenManager.MenuChange.Play();
+
+				ResetInputTimer();
+			}
+		}
+
+		/// <summary>
+		/// User hit the "menu select" button.
+		/// </summary>
+		/// <param name="playerIndex"></param>
+		protected virtual void MenuSelect(PlayerIndex playerIndex)
+		{
+			if (MenuEntries.Count > 1)
+			{
 				//play menu noise
 				ScreenManager.MenuSelect.Play();

 				//run the sleected evetn
 				OnSelectEntry(SelectedEntry, playerIndex);
-
-				ResetInputTimer();
-			}
-			else if (input.IsMenuCancel(ControllingPlayer, out playerIndex))
-			{
-				OnCancel(playerIndex);
-			}
-		}
-
-		protected virtual void MenuUp()
-		{
-			if (MenuEntries.Count > 1)
-			{
-				SelectedEntry--;
-
-				if (SelectedEntry < 0)
-				{
-					SelectedEntry = MenuEntries.Count - 1;
-				}
-
-				//play menu noise
-				ScreenManager.MenuChange.Play();
-
-				ResetInputTimer();
-			}
-		}
-
-		protected virtual void MenuDown()
-		{
-			if (MenuEntries.Count > 1)
-			{
-				SelectedEntry++;
-
-				if (SelectedEntry >= MenuEntries.Count)
-				{
-					SelectedEntry = 0;
-				}
-
-				//play menu noise
-				ScreenManager.MenuChange.Play();

 				ResetInputTimer();
 			}


Fixed incident

Fixed incident

--- Tyvj/Helpers/Gravatar.cs
+++ Tyvj/Helpers/Gravatar.cs
@@ -15,38 +15,49 @@
     {
         public static void RefreshGravatar(int UserID)
         {
-            using (var db = new DB())
+            try
             {
-                var user = db.Users.Find(UserID);
-                if (user.Gravatar != null)
+                using (var db = new DB())
                 {
-                    if (DateTime.Now >= user.LastLoginTime.AddDays(3) || user.Avatar.Count() == 0)
+                    var user = db.Users.Find(UserID);
+                    if (user.Gravatar != null)
                     {
-                        var wc = new WebClient();
-                        user.Avatar = wc.DownloadData(GetAvatarURL(user.Gravatar, 180));
-                        db.SaveChanges();
+                        if (DateTime.Now >= user.LastLoginTime.AddDays(3) || user.Avatar.Count() == 0)
+                        {
+                            var wc = new WebClient();
+                            user.Avatar = wc.DownloadData(GetAvatarURL(user.Gravatar, 180));
+                            db.SaveChanges();
+                        }
                     }
                 }
             }
+            catch { }
         }

         public static string GetAvatarURL(string email, int size)
         {
-            string md5 = ToHexString(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(email)));
-            string url = string.Format("http://gravatar.duoshuo.com/avatar/{0}?s={1}&d=mm", md5, size);
-            return url;
+            try
+            {
+                string md5 = ToHexString(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(email)));
+                string url = string.Format("http://gravatar.duoshuo.com/avatar/{0}?s={1}&d=mm", md5, size);
+                return url;
+            }
+            catch { return "https://avatars3.githubusercontent.com/u/28256913?v=3&s=200"; }
         }

         static string ToHexString(byte[] bytes)
         {
-            StringBuilder sb = new StringBuilder();
-            foreach (byte b in bytes)
+            try
             {
-                string tmp = Convert.ToString(b, 16);
-                if (tmp.Length == 1) sb.Append('0').Append(tmp);
-                else sb.Append(tmp);
-            }
-            return sb.ToString();
+                StringBuilder sb = new StringBuilder();
+                foreach (byte b in bytes)
+                {
+                    string tmp = Convert.ToString(b, 16);
+                    if (tmp.Length == 1) sb.Append('0').Append(tmp);
+                    else sb.Append(tmp);
+                }
+                return sb.ToString();
+            } catch { return string.Empty; }
         }
     }
 }


cleaned up using statements

cleaned up using statements

--- log4net.Azure/AzureLoggingEventEntity.cs
+++ log4net.Azure/AzureLoggingEventEntity.cs
@@ -1,8 +1,8 @@
 using System;
 using System.Collections;
 using System.Text;
+using log4net.Core;
 using Microsoft.WindowsAzure.StorageClient;
-using log4net.Core;

 namespace log4net.Appender.Azure
 {


Documented Fields<T>.

Documented Fields<T>.

--- Src/Albedo/Fields.cs
+++ Src/Albedo/Fields.cs
@@ -7,8 +7,75 @@

 namespace Ploeh.Albedo
 {
+    ///
+    /// Provides strongly-typed, refactoring-safe access to
+    /// <see cref="FieldInfo" /> instances.
+    ///
+    /// <typeparam name="T">The type containing the desired field.</typeparam>
+    /// <remarks>
+    /// <para>
+    /// While you can use the standard Reflection API (such as
+    /// <see cref="Type.GetField(string)" />) to obtain a
+    /// <see cref="FieldInfo" /> instance, the problem is that it relies on
+    /// identifying the field by name, using a string. This isn't refactoring-
+    /// safe, so if you change the field name, your Reflection code may break.
+    /// Fields<T> provides a strongly-typed alternative,
+    /// utilizing LINQ expressions.
+    /// </para>
+    /// </remarks>
+    /// <seealso cref="Select{TField}(Expression{Func{T, TField}})" />
+    /// <seealso cref="Methods{T}" />
+    /// <seealso cref="Properties{T}" />
     public class Fields<T>
     {
+        ///
+        /// Selects a <see cref="FieldInfo" /> instance based on a
+        /// strongly-typed, refactoring-safe LINQ expression.
+        ///
+        /// <typeparam name="TField">The type of the desired field.</typeparam>
+        /// <param name="fieldSelector">
+        /// A LINQ expression that identifies the desired field.
+        /// </param>
+        /// <returns>
+        /// A <see cref="FieldInfo" /> instance representing the field
+        /// identified by <paramref name="fieldSelector" />
+        /// </returns>
+        /// <remarks>
+        /// <para>
+        /// The Select method provides a strongly-typed, refactoring-safe way
+        /// to get a <see cref="FieldInfo" /> instance. It supports both normal
+        /// method invocation syntax, as well as LINQ syntax.
+        /// </para>
+        /// </remarks>
+        /// <example>
+        /// This example demonstrates how to use <see cref="Fields{T}" /> with
+        /// normal method invocation syntax. ClassWithFields
+        /// is a custom class with a public field called Text.
+        /// The Select method returns a
+        /// FieldInfo instance representing the
+        /// Text field.
+        ///
+        /// FieldInfo fi = new Fields<ClassWithFields>().Select(v => v.Text);
+        ///
+        /// This example demonstrates how to use <see cref="Fields{T}" /> with
+        /// LINQ syntax. ClassWithFields is a custom class
+        /// with a public field called Text. The
+        /// Select method returns a FieldInfo
+        /// instance representing the Text field.
+        ///
+        /// FieldInfo fi = from v in new Fields<ClassWithFields>()
+        ///                select v.Text;
+        ///
+        /// </example>
+        /// <exception cref="System.ArgumentNullException">
+        /// <paramref name="fieldSelector" /> is null.
+        /// </exception>
+        /// <exception cref="System.ArgumentException">
+        /// The expression's body isn't a MemberExpression or it doesn't
+        /// identify a field. The code block supplied should identify a field.
+        /// Example: x => x.Bar.
+        /// </exception>
+        /// <seealso cref="Fields{T}" />
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "The expression is strongly typed in order to prevent the caller from passing any sort of expression. It doesn't fully capture everything the caller might throw at it, but it does constrain the caller as well as possible. This enables the developer to get a compile-time exception instead of a run-time exception in most cases where an invalid expression is being supplied.")]
         public FieldInfo Select<TField>(Expression<Func<T, TField>> fieldSelector)
         {


Don't queue anon dedi comp

Don't queue anon dedi comp

--- Steam/PICSChanges.cs
+++ Steam/PICSChanges.cs
@@ -193,7 +193,7 @@
             {
                 DbWorker.ExecuteNonQuery("UPDATE `Subs` SET `LastUpdated` = CURRENT_TIMESTAMP() WHERE `SubID` = @SubID", new MySqlParameter("@SubID", package.ID));

-                if (package.ID == 0 || ignoredPackages.ContainsKey(package.ID))
+                if (package.ID == 0 || package.ID == 17906 || ignoredPackages.ContainsKey(package.ID))
                 {
                     Log.WriteDebug("PICSChanges Store Queue", "Ignoring sub {0}", package.ID);


AT_Utils.UI:DialogFactory: added contexts and SimpleDialog.onDestroy

To prevent spawning of multiple dialogs from the same context.

--- Unity/UI/SimpleDialog.cs
+++ Unity/UI/SimpleDialog.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.Events;
 using UnityEngine.UI;
@@ -7,6 +8,7 @@
 {
     public class DialogFactory : MonoBehaviour
     {
+        private static readonly HashSet<object> contexts = new HashSet<object>();
         private static DialogFactory Instance { get; set; }

         protected virtual RectTransform dialogParent => GetComponentInParent<Canvas>()?.transform as RectTransform;
@@ -25,6 +27,7 @@
             DontDestroyOnLoad(gameObject);
             if(prefab != null)
                 prefab.SetActive(false);
+            contexts.Clear();
         }

         protected virtual void setupDialog(SimpleDialog dialog) { }
@@ -40,6 +43,8 @@
             Instance.setupDialog(dialog);
             return dialog;
         }
+
+        public static bool ContextIsActive(object context) => contexts.Contains(context);

         public static SimpleDialog Create(
             string message,
@@ -47,11 +52,15 @@
             UnityAction onConfirm,
             UnityAction onCancel = null,
             UnityAction onClose = null,
+            UnityAction onDestroy = null,
             string confirmText = "Yes",
             string cancelText = "No",
-            bool destroyOnClose = true
+            bool destroyOnClose = true,
+            object context = null
         )
         {
+            if(context != null && contexts.Contains(context))
+                return null;
             var dialog = newInstance();
             if(dialog == null)
                 return null;
@@ -63,11 +72,18 @@
             dialog.title.text = title;
             dialog.message.text = message;
             dialog.DestroyOnClose = destroyOnClose;
+            if(context != null)
+            {
+                contexts.Add(context);
+                dialog.onDestroy.AddListener(() => contexts.Remove(context));
+            }
             dialog.onConfirm.AddListener(onConfirm);
             if(onCancel != null)
                 dialog.onCancel.AddListener(onCancel);
             if(onClose != null)
                 dialog.onClose.AddListener(onClose);
+            if(onDestroy != null)
+                dialog.onDestroy.AddListener(onDestroy);
             return dialog;
         }

@@ -77,12 +93,23 @@
             UnityAction onConfirm,
             UnityAction onCancel = null,
             UnityAction onClose = null,
+            UnityAction onDestroy = null,
             string confirmText = "Yes",
             string cancelText = "No",
-            bool destroyOnClose = true
+            bool destroyOnClose = true,
+            object context = null
         )
         {
-            var dialog = Create(message, title, onConfirm, onCancel, onClose, confirmText, cancelText, destroyOnClose);
+            var dialog = Create(message,
+                title,
+                onConfirm,
+                onCancel,
+                onClose,
+                onDestroy,
+                confirmText,
+                cancelText,
+                destroyOnClose,
+                context);
             if(dialog == null)
                 return null;
             dialog.Show();
@@ -91,25 +118,53 @@

         public static SimpleDialog Info(
             string message,
-            string title
+            string title,
+            object context = null
         ) =>
-            Show(message, title, null, null, null, "Close", null);
+            Show(message,
+                title,
+                null,
+                null,
+                null,
+                null,
+                "Close",
+                null,
+                context: context);

         public static SimpleDialog Warning(
             string message,
-            string title = null
+            string title = null,
+            object context = null
         ) =>
-            Show(message, title ?? "Warning", null, null, null, "Close", null);
+            Show(message,
+                title ?? "Warning",
+                null,
+                null,
+                null,
+                null,
+                "Close",
+                null,
+                context: context);

         public static SimpleDialog Danger(
             string message,
             UnityAction onConfirm,
             UnityAction onCancel = null,
             UnityAction onClose = null,
-            string title = null
+            UnityAction onDestroy = null,
+            string title = null,
+            object context = null
         )
         {
-            var dialog = Create(message, title ?? "Warning", onConfirm, onCancel, onClose, "Yes", "Cancel");
+            var dialog = Create(message,
+                title ?? "Warning",
+                onConfirm,
+                onCancel,
+                onClose,
+                onDestroy,
+                "Yes",
+                "Cancel",
+                context: context);
             if(dialog == null)
                 return null;
             dialog.confirmButtonColorizer.SetColor(Colors.Danger);
@@ -124,6 +179,7 @@
         public UnityEvent onConfirm = new UnityEvent();
         public UnityEvent onCancel = new UnityEvent();
         public UnityEvent onClose = new UnityEvent();
+        public UnityEvent onDestroy = new UnityEvent();

         public Button
             confirmButton,
@@ -152,9 +208,11 @@
         {
             if(gameObject.activeInHierarchy)
                 sendEvent(onClose, nameof(onClose));
+            sendEvent(onDestroy, nameof(onDestroy));
             onConfirm.RemoveAllListeners();
             onCancel.RemoveAllListeners();
             onClose.RemoveAllListeners();
+            onDestroy.RemoveAllListeners();
             confirmButton.onClick.RemoveAllListeners();
             cancelButton.onClick.RemoveAllListeners();
         }


Entry: allow passing LocalizationMetadata through --meta

--- Vernacular.Tool/Entry.cs
+++ Vernacular.Tool/Entry.cs
@@ -49,6 +49,7 @@
             string android_input_strings_xml = null;
             string android_output_strings_xml = null;
             string analyer_config_path = null;
+            LocalizationMetadata metadata = null;
             bool analyze = false;
             bool log = false;
             bool verbose = false;
@@ -73,6 +74,16 @@
                 { "android-output-strings-xml=", "Output file of localized Android Strings.xml " +
                     "for preserving hand-maintained string resources", v => android_output_strings_xml = v },
                 { "l|log", "Display logging", v => log = v != null },
+                { "m|meta=", "Add localization metadata (key=value)", v => {
+                    var parts = v.Split (new [] { '=' }, 2);
+                    if (parts != null && parts.Length == 2) {
+                        if (metadata == null) {
+                            metadata = new LocalizationMetadata ();
+                        }
+
+                        metadata.Add (parts[0].Trim (), parts[1].Trim ());
+                    }
+                } },
                 { "v|verbose", "Verbose logging", v => verbose = v != null },
                 { "h|help", "Show this help message and exit", v => show_help = v != null }
             };
@@ -162,9 +173,14 @@
                 }
             }

-            foreach (var localized_string in parser.Parse ()) {
-                generator.Add (localized_string);
-
+            if (metadata != null) {
+                generator.Add (metadata);
+            }
+
+            foreach (var localization_unit in parser.Parse ()) {
+                generator.Add (localization_unit);
+
+                var localized_string = localization_unit as LocalizedString;
                 if (analyzer != null) {
                     analyzer.Add (localized_string);
                 }


Stopped using openwrite.

Stopped using openwrite.

--- Viewer/FileController.cs
+++ Viewer/FileController.cs
@@ -90,7 +90,7 @@
                 {
                     Directory.CreateDirectory(directory);
                 }
-                using (Stream stream = File.OpenWrite(file))
+                using (Stream stream = File.Open(file, FileMode.Create, FileAccess.Write))
                 {
                     await x.Contents[0].CopyToAsync(stream);
                 }


Adding line breaks to the generated html of HintField

--- Views/Fields.Hint.cshtml
+++ Views/Fields.Hint.cshtml
@@ -1 +1 @@
-@Html.Raw(Model.Hint)+
@Html.Raw(((string)Model.Hint).Replace(Environment.NewLine, "

"))


Minor quality-of-life features

Minor quality-of-life features

--- Views/MainWindow.xaml.cs
+++ Views/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
 using clipman.Utility;
 using System;
+using System.ComponentModel;
 using System.Globalization;
 using System.Windows;
 using System.Windows.Controls;
@@ -55,9 +56,15 @@
             {
                 return clearCommand ?? (clearCommand = new Commands.Command(param =>
                 {
-                    ToggleSettingsPanel(false);
-                    searchBox.Clear();
-                    searchBox.Focus();
+                    if (settingsPanelOpen)
+                    {
+                        ToggleSettingsPanel(false);
+                    }
+                    else
+                    {
+                        searchBox.Clear();
+                        searchBox.Focus();
+                    }
                 }));
             }
         }
@@ -115,7 +122,7 @@
             clipList.DataContext = clipViewModel;
             clipViewModel.ClipLimit = settings.ClipLimit;

-            settingsPanelViewModel = new ViewModels.SettingsPanelViewModel();
+            settingsPanelViewModel = new ViewModels.SettingsPanelViewModel(settings);
             settingsPanel.DataContext = settingsPanelViewModel;

             clipboardManager = new Clipboard.ClipboardManager();
@@ -223,25 +230,23 @@
             }

             Storyboard bubbleStoryboard;
+            Storyboard buttonAnim;
+
             if (settingsPanelOpen)
             {
                 bubbleStoryboard = FindResource("SettingsBubbleDown") as Storyboard;
+                buttonAnim = FindResource("XToBurger") as Storyboard;
+
+                searchBox.Focus();
+                searchBox.SelectAll();
             }
             else
             {
                 bubbleStoryboard = FindResource("SettingsBubbleUp") as Storyboard;
-            }
+                buttonAnim = FindResource("BurgerToX") as Storyboard;
+            }
+
             settingsPanel.BeginStoryboard(bubbleStoryboard);
-
-            Storyboard buttonAnim;
-            if (settingsPanelOpen)
-            {
-                buttonAnim = FindResource("XToBurger") as Storyboard;
-            }
-            else
-            {
-                buttonAnim = FindResource("BurgerToX") as Storyboard;
-            }
             buttonAnim.Begin(settingsPanelToggleButton, settingsPanelToggleButton.Template);

             settingsPanelOpen = open;


settings rework + debug stuff

settings rework + debug stuff

--- TCC.Core/App.xaml.cs
+++ TCC.Core/App.xaml.cs
@@ -1,5 +1,5 @@
-using System;
-using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+using System;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
@@ -7,10 +7,8 @@
 using System.Reflection;
 using System.Text;
 using System.Threading;
-using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Threading;
-using Newtonsoft.Json.Linq;
 using TCC.Data;
 using TCC.Parsing;
 using TCC.Sniffing;
@@ -58,11 +56,12 @@
             UpdateManager.CheckDatabaseVersion();

             SplashScreen.SetText("Loading settings...");
-            SettingsManager.LoadWindowSettings();
-            SettingsManager.LoadSettings();
+            var sr = new SettingsReader();
+            sr.LoadWindowSettings();
+            sr.LoadSettings();

             SplashScreen.SetText("Pre-loading databases...");
-            SessionManager.InitDatabases(string.IsNullOrEmpty(SettingsManager.LastRegion) ? "EU-EN" : SettingsManager.LastRegion == "EU" ? "EU-EN" : SettingsManager.LastRegion);
+            SessionManager.InitDatabases(string.IsNullOrEmpty(Settings.LastRegion) ? "EU-EN" : Settings.LastRegion == "EU" ? "EU-EN" : Settings.LastRegion);

             SplashScreen.SetText("Initializing windows...");
             WindowManager.Init();
@@ -80,13 +79,16 @@
             SessionManager.CurrentPlayer.Class = Class.None;
             SessionManager.CurrentPlayer.Name = "player";
             SessionManager.CurrentPlayer.EntityId = 10;
-            TimeManager.Instance.SetServerTimeZone(SettingsManager.LastRegion);
+            TimeManager.Instance.SetServerTimeZone(Settings.LastRegion);
             ChatWindowManager.Instance.AddTccMessage(_version);
             SplashScreen.CloseWindowSafe();

             UpdateManager.StartCheck();
-            //ClassWindowViewModel.Instance.CurrentClass = Class.Gunner;
-
+
+            //ClassWindowViewModel.Instance.CurrentClass = Class.Priest;
+            //EntitiesManager.SpawnNPC(920, 3000, 10, Visibility.Visible);
+            //Task.Delay(2000).ContinueWith(t => BossGageWindowViewModel.Instance.AddOrUpdateBoss(10,5250000000,3240000000,true, HpChangeSource.BossGage));
+            //Task.Delay(4000).ContinueWith(t => BossGageWindowViewModel.Instance.AddOrUpdateBoss(10,5250000000,2240000000,true, HpChangeSource.BossGage));
             //EntitiesManager.SpawnNPC(950,3000,10,Visibility.Visible);
             //EntitiesManager.SpawnNPC(970,1000,11,Visibility.Visible);
             //EntitiesManager.SpawnNPC(970,2000,12,Visibility.Visible);
@@ -253,7 +255,7 @@

         public static void Restart()
         {
-            SettingsManager.SaveSettings();
+            SettingsWriter.Save();
             Process.Start("TCC.exe");
             CloseApp();
         }
@@ -285,15 +287,15 @@
                 c.UploadStringAsync(new Uri("https://us-central1-tcc-report.cloudfunctions.net/stat"),
                     Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(js.ToString())));

-                SettingsManager.StatSent = true;
-                SettingsManager.SaveSettings();
+                Settings.StatSent = true;
+                SettingsWriter.Save();
             }
         }

         public static void CloseApp()
         {
             TeraSniffer.Instance.Enabled = false;
-            SettingsManager.SaveSettings();
+            SettingsWriter.Save();
             WindowManager.Dispose();
             Proxy.CloseConnection();
             UpdateManager.StopTimer();


XpsPrinter: move up Capabilities

XpsPrinter: move up Capabilities

--- WpfUtility/XpsPrinter.cs
+++ WpfUtility/XpsPrinter.cs
@@ -102,19 +102,19 @@
             }
         }

+        public PrintCapabilities Capabilities {
+            get {
+                return _queue == null ?
+                    null :
+                    _queue.GetPrintCapabilities();
+            }
+        }
+
         public PrintTicket Ticket {
             get {
                 return _queue == null ?
                     null :
                     _queue.UserPrintTicket;
-            }
-        }
-
-        public PrintCapabilities Capabilities {
-            get {
-                return _queue == null ?
-                    null :
-                    _queue.GetPrintCapabilities();
             }
         }


Revert "Remove resetting of verbosity"

Revert "Remove resetting of verbosity"

This reverts commit dc1978b1

--- build/Build.cs
+++ build/Build.cs
@@ -180,6 +180,7 @@
             DotNetTest(_ => _
                 .SetConfiguration(Configuration)
                 .SetNoBuild(ExecutingTargets.Contains(Compile))
+                .ResetVerbosity()
                 .SetResultsDirectory(OutputDirectory)
                 .When(InvokedTargets.Contains(Coverage) || IsServerBuild, _ => _
                     .EnableCollectCoverage()


work in progress

work in progress

--- XibParser/NSColorList.cs
+++ XibParser/NSColorList.cs
@@ -29,6 +29,7 @@
     public class NSColorList : NSObject
     {
         new public static Class Class = new Class(typeof(NSColorList));
+        new public static NSColorList Alloc() { return new NSColorList(); }

         protected NSString _name;
         protected NSString _fullFileName;


Interface and generic types support added to `DynamicType`.

--- Tests/DynamicType.cs
+++ Tests/DynamicType.cs
@@ -34,11 +34,12 @@
     [Serializable]
     public class DynamicType
     {
-        public static DynamicType CreateClass(string name, DynamicType baseClass = null)
+        public static DynamicType CreateClass(string name, DynamicType baseClass = null, DynamicType genericArgument = null)
         {
             var result = new DynamicType(KindOfDynamicType.Class);
             result.name = name;
             result.baseClass = baseClass;
+            result.genericArgument = genericArgument;
             return result;
         }

@@ -50,6 +51,14 @@
             return result;
         }

+        public static DynamicType CreateInterface(string name)
+        {
+            var result = new DynamicType(KindOfDynamicType.Interface);
+            result.name = name;
+            result.baseClass = null;
+            return result;
+        }
+
         public DynamicType WithField(string name, DynamicType type)
         {
             fields.Add(name, new FieldDescriptor { DynamicType = type });
@@ -92,19 +101,28 @@

         private Type InnerCreateType(ModuleBuilder moduleBuilder)
         {
-            TypeBuilder typeBuilder;
-            if(type == KindOfDynamicType.Struct)
-            {
-                typeBuilder = moduleBuilder.DefineType(name,
-                    TypeAttributes.Public |
-                    TypeAttributes.Sealed |
-                    TypeAttributes.SequentialLayout |
-                    TypeAttributes.Serializable,
-                    typeof(ValueType));
-            }
-            else
-            {
+            TypeBuilder typeBuilder = null;
+            switch(type)
+            {
+            case KindOfDynamicType.Struct:
+                    typeBuilder = moduleBuilder.DefineType(name,
+                        TypeAttributes.Public |
+                        TypeAttributes.Sealed |
+                        TypeAttributes.SequentialLayout |
+                        TypeAttributes.Serializable,
+                        typeof(ValueType));
+                break;
+            case KindOfDynamicType.Interface:
+                typeBuilder = moduleBuilder.DefineType(name, TypeAttributes.Interface | TypeAttributes.Public | TypeAttributes.Abstract);
+                break;
+            case KindOfDynamicType.Class:
                 typeBuilder = moduleBuilder.DefineType(name, TypeAttributes.Class | TypeAttributes.Public);
+                if(genericArgument != null)
+                {
+                    typeBuilder.DefineGenericParameters(new [] { "TFirst" });
+                }
+
+                break;
             }

             if(baseClass != null)
@@ -132,7 +150,12 @@
                 }
             }

-            return typeBuilder.CreateType();
+            var result = typeBuilder.CreateType();
+            if(genericArgument != null)
+            {
+                result = result.MakeGenericType(genericArgument.InnerCreateType(moduleBuilder));
+            }
+            return result;
         }

         public object Instantiate()
@@ -164,6 +187,7 @@
         private string name;
         private Dictionary<string, FieldDescriptor> fields = new Dictionary<string, FieldDescriptor>();
         private DynamicType baseClass;
+        private DynamicType genericArgument;

         private static readonly AssemblyName AssemblyName = new AssemblyName("TestAssembly");
         private const int counter = 0;
@@ -184,7 +208,8 @@
         private enum KindOfDynamicType
         {
             Class,
-            Struct
+            Struct,
+            Interface
         }
     }
 }


Get rid of static

Get rid of static

--- BARABAS.cs
+++ BARABAS.cs
@@ -204,7 +204,7 @@
 };

 // statuses for ore and ingots
-static readonly Dictionary < string, float > ore_status = new Dictionary < string, float > {
+readonly Dictionary < string, float > ore_status = new Dictionary < string, float > {
   { COBALT, 0 },
   { GOLD, 0 },
   { ICE, 0 },
@@ -217,9 +217,9 @@
   { URANIUM, 0 },
   { STONE, 0 },
 };
-readonly Dictionary < string, float > ingot_status = new Dictionary < string, float > (ore_status);
-readonly Dictionary < string, float > storage_ore_status = new Dictionary < string, float > (ore_status);
-readonly Dictionary < string, float > storage_ingot_status = new Dictionary < string, float > (ore_status);
+readonly Dictionary < string, float > ingot_status;
+readonly Dictionary < string, float > storage_ore_status;
+readonly Dictionary < string, float > storage_ingot_status;

 /* local data storage, updated once every few cycles */
 List < IMyTerminalBlock > local_blocks = null;
@@ -4773,6 +4773,11 @@
    config_block = GridTerminalSystem.GetBlockWithId(id) as IMyTextPanel;
   }
  }
+
+ // initialize readonly vars
+ ingot_status = new Dictionary < string, float > (ore_status);
+ storage_ore_status = new Dictionary < string, float > (ore_status);
+ storage_ingot_status = new Dictionary < string, float > (ore_status);
 }

 public void Main() {


Implement timer mode

Implement timer mode

By default, update once every 100 ticks, but if we're triggered from the
timer, don't update.

--- BARABAS.cs
+++ BARABAS.cs
@@ -117,6 +117,7 @@
             CRISIS_MODE_LOCKUP
         };
         CrisisMode crisis_mode;
+        bool timer_mode = false;

         Action[] states = null;

@@ -5825,6 +5826,8 @@
         // constructor
         public Program()
         {
+            Runtime.UpdateFrequency = UpdateFrequency.Update100;
+
             // kick off state machine
             states = new Action[] {
                 s_refreshGrids,
@@ -5914,13 +5917,25 @@
             storage_ingot_status = new Dictionary<string, float>(ore_status);
         }

-        public void Main()
+        public void Main(string arg, UpdateType ut)
         {
             if (!canRun())
             {
                 return;
             }
             int num_states = 0;
+
+            // if we're activated by a timer, go into timer mode and do not ever
+            // update the UpdateFrequency
+            if (ut == UpdateType.Trigger)
+            {
+                timer_mode = true;
+                Runtime.UpdateFrequency = UpdateFrequency.None;
+            } else
+            {
+                timer_mode = false;
+                Runtime.UpdateFrequency = UpdateFrequency.Update100;
+            }

             // zero out IL counters
             cur_cycle_count = 0;


Amélioration de la méthode Shuffle

Amélioration de la méthode Shuffle

--- Utils/ShuffleList.cs
+++ Utils/ShuffleList.cs
@@ -7,17 +7,12 @@
     {
         public void Shuffle()
         {
-            List<T> shuffled = new List<T>();
             Random random = new Random();
-            while (Count > 0)
+            for (int count = Count; count > 0; count--)
             {
-                int i = random.Next(Count);
-                shuffled.Add(this[i]);
+                int i = random.Next(count);
+                Add(this[i]);
                 RemoveAt(i);
-            }
-            foreach (T item in shuffled)
-            {
-                Add(item);
             }
         }
     }


Fix bug with furnaces list

Fix bug with furnaces list

--- BARABAS.cs
+++ BARABAS.cs
@@ -668,7 +668,7 @@
 List < IMyTerminalBlock > getArcFurnaces(bool force_update = false) {
 	if (local_arc_furnaces != null && !force_update) {
 		// if we didn't refresh the list yet, get a random subset
-		if (!null_list.Contains(local_arc_furnaces)) {
+		if (!null_list.Contains(local_arc_furnaces_subset)) {
 			local_arc_furnaces_subset = randomSubset(local_arc_furnaces, 30);
 		}
 		return removeNulls(local_arc_furnaces_subset, 2);


Add comments to stop timer.

Add comments to stop timer.

--- Various/StopTimer.cs
+++ Various/StopTimer.cs
@@ -2,16 +2,32 @@

 namespace Xevle.Core
 {
+	/// <summary>
+	/// Stop timer class to stop times.
+	/// </summary>
 	public class StopTimer
 	{
 		#region Private variables
+		/// <summary>
+		/// The start time.
+		/// </summary>
 		Int64 startTime;
+
+		/// <summary>
+		/// The stop time.
+		/// </summary>
 		Int64 stopTime;

+		/// <summary>
+		/// The state of the timer.
+		/// </summary>
 		StopTimerState timerState;
 		#endregion

 		#region Constructor
+		/// <summary>
+		/// Initializes a new instance of the <see cref="Xevle.Core.StopTimer"/> class.
+		/// </summary>
 		public StopTimer()
 		{
 			startTime = 0;
@@ -183,5 +199,4 @@
 		}
 		#endregion
 	}
-}
-
+}


Fixed issue with new merge options

Fixed issue with new merge options

--- VersionrCore/Area.cs
+++ VersionrCore/Area.cs
@@ -2622,7 +2622,6 @@
                     if (updateHeads.Any(x => x.ID == parentVersion.ID))
                     {
                         // merge extra head into current version
-                        options.Reintegrate = true;
                         Merge(updateHeads.First(x => x.ID != parentVersion.ID).ID.ToString(), false, options);
                         return;
                     }


Move branding image to separate row

Move branding image to separate row

- This allows our two headers to appear side-by-side
- This also allows us to play around with ordering on different device sizes

--- input/index.cshtml
+++ input/index.cshtml
@@ -10,15 +10,19 @@

+

+

+
+

+

+

+

-

-
-

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms


add read/write for multiple spectra and spectra names

--- WasatchNET/EEPROM.cs
+++ WasatchNET/EEPROM.cs
@@ -40,7 +40,7 @@
         internal const int MAX_PAGES_REAL = 512;

         internal const int LIBRARY_START_PAGE = 10;
-        internal const int LIBRARY_STOP_PAGE = 74;
+        internal const int LIBRARY_STOP_PAGE = 506;

         /// <summary>
         /// Current EEPROM format
@@ -909,6 +909,17 @@
         }
         byte _matchingThreshold = 90;

+        public byte librarySize
+        {
+            get { return _librarySize; }
+            set
+            {
+                _librarySize = value;
+                EEPROMChanged?.Invoke(this, new EventArgs());
+            }
+        }
+        byte _librarySize = 1;
+
         /////////////////////////////////////////////////////////////////////////
         // Pages 10-73 (subformat HANDHELD_DEVICE)
         /////////////////////////////////////////////////////////////////////////
@@ -943,6 +954,17 @@
                     model = value;
             }
         }
+
+        public List<string> lib_names
+        {
+            get { return _lib_names; }
+            set
+            {
+                _lib_names = value;
+                EEPROMChanged?.Invoke(this, new EventArgs());
+            }
+        }
+        List<string> _lib_names;

         /////////////////////////////////////////////////////////////////////////
         //
@@ -1305,6 +1327,32 @@
                         matchingMinRampPixels = ParseData.toUInt8(pages[7], 4);
                         matchingMinPeakHeight = ParseData.toUInt16(pages[7], 5);
                         matchingThreshold = ParseData.toUInt8(pages[7], 7);
+                        librarySize = ParseData.toUInt8(pages[7], 8);
+                        List<string> read_names = new List<string>();
+                        int num_names = 0;
+                        int name_page;
+                        int start_index;
+                        for(int i = 0; i < librarySize; i++)
+                        {
+                            if(num_names < 4)
+                            {
+                                name_page = 8;
+                            }
+                            else
+                            {
+                                name_page = 9;
+                            }
+                            /*
+                             * Compacted this with some math so thought a comment was good
+                             * i % 4 because each page holds 4 names so at 4 the index becomes 0 again
+                             * and then each length is 16 so that's constant and the start just gets
+                             * mulitplied by 16 each time
+                             * */
+                            start_index = (i % 4) * 16;
+                            read_names.Add(ParseData.toString(pages[name_page],start_index,16));
+                            num_names++;
+                        }
+                        lib_names = read_names;

                         logger.debug("loading handheld device library spectrum");
                         librarySpectrum = new List<UInt16>();
@@ -1312,7 +1360,7 @@
                         {
                             for (int pagePixel = 0; pagePixel < 32; pagePixel++)
                             {
-                                if (librarySpectrum.Count >= activePixelsHoriz)
+                                if (librarySpectrum.Count >= activePixelsHoriz*librarySize)
                                     break;

                                 UInt16 lsb = pages[page][pagePixel * 2];
@@ -1936,20 +1984,23 @@
                     if (!ParseData.writeByte(matchingMinRampPixels,     pages[7], 4)) return false;
                     if (!ParseData.writeUInt16(matchingMinPeakHeight,   pages[7], 5)) return false;
                     if (!ParseData.writeByte(matchingThreshold,         pages[7], 7)) return false;
-
+                    if (!ParseData.writeByte(librarySize,               pages[7], 8)) return false;
+                    int names_written = 0;
+                    int name_page;
                     if (librarySpectrum == null)
                     {
                         logger.error("EEPROM.writeLibrary: no librarySpectrum");
                         return false;
                     }

-                    if (librarySpectrum.Count > 2048)
+                    if (librarySpectrum.Count > 1952*8)
                     {
-                        logger.error("EEPROM.writeLibrary: librarySpectrum only sized for 2048 pixels");
+                        logger.error("EEPROM.writeLibrary: librarySpectrum only sized for 8 spectra of size 1952 pixels");
                         return false;
                     }

                     int pixel = 0;
+                    logger.info($"Wasatch.NET: writing spectrum of length {librarySpectrum.Count}");
                     while (pixel < librarySpectrum.Count)
                     {
                         int page = LIBRARY_START_PAGE + pixel / 32;
@@ -1972,6 +2023,21 @@
                             return false;
                         }
                         pixel++;
+                    }
+                    int start_index;
+                    foreach(string libName in lib_names)
+                    {
+                        if(names_written < 4)
+                        {
+                            name_page = 8;
+                        }
+                        else
+                        {
+                            name_page = 9;
+                        }
+                        start_index = (names_written % 4) * 16;
+                        if (!ParseData.writeString(libName, pages[name_page], start_index, libName.Length - 1)) return false;
+                        names_written++;
                     }
                 }
             }


Update marshalling for delegates

Update marshalling for delegates

--- iMobileDevice.Generator/Argument.cs
+++ iMobileDevice.Generator/Argument.cs
@@ -79,11 +79,8 @@

             bool isPointer = false;

-            if (functionKind == FunctionType.Delegate)
-            {
-                parameter.Type = new CodeTypeReference(typeof(IntPtr));
-            }
-            else if (functionKind != FunctionType.Free
+            if (functionKind != FunctionType.Free
+                && functionKind != FunctionType.Delegate
                 && type.IsDoubleCharPointer()
                 && !name.Contains("data")
                 && name != "appids")
@@ -93,14 +90,14 @@

                 parameter.CustomAttributes.Add(MarshalAsUtf8String());
             }
-            else if (type.IsTripleCharPointer() && generator.StringArrayMarshalerType != null)
+            else if (functionKind != FunctionType.Delegate && type.IsTripleCharPointer() && generator.StringArrayMarshalerType != null)
             {
                 parameter.Type = new CodeTypeReference(typeof(ReadOnlyCollection<string>));
                 parameter.Direction = FieldDirection.Out;

                 parameter.CustomAttributes.Add(MarshalAsDeclaration(UnmanagedType.CustomMarshaler, new CodeTypeReference(generator.StringArrayMarshalerType.Name)));
             }
-            else if ((type.IsArrayOfCharPointers() || type.IsDoublePtrToConstChar()))
+            else if (functionKind != FunctionType.Delegate && (type.IsArrayOfCharPointers() || type.IsDoublePtrToConstChar()))
             {
                 parameter.Type = new CodeTypeReference(typeof(ReadOnlyCollection<string>));
                 parameter.Direction = FieldDirection.In;
@@ -132,7 +129,7 @@
                             case CXTypeKind.CXType_Char_S:
                                 // In some of the read/write functions, const char is also used to represent data -- in that
                                 // case, it maps to a byte[] array or just an IntPtr.
-                                if (functionKind != FunctionType.PInvoke && type.IsPtrToConstChar())
+                                if (functionKind != FunctionType.PInvoke && functionKind != FunctionType.Delegate && type.IsPtrToConstChar())
                                 {
                                     if (!name.Contains("data") && name != "signature")
                                     {
@@ -144,7 +141,7 @@
                                         parameter.Type = new CodeTypeReference(typeof(byte[]));
                                     }
                                 }
-                                else if (functionKind != FunctionType.PInvoke && type.IsPtrToChar() && name.Contains("data"))
+                                else if (functionKind != FunctionType.PInvoke && functionKind != FunctionType.Delegate && type.IsPtrToChar() && name.Contains("data"))
                                 {
                                     parameter.Type = new CodeTypeReference(typeof(byte[]));
                                 }
@@ -170,13 +167,23 @@
                                 break;

                             case CXTypeKind.CXType_Record:
-                                var recordTypeCursor = clang.getTypeDeclaration(pointee);
-                                var recordType = clang.getCursorType(recordTypeCursor);
-
-                                // Get the CLR name for the record
-                                var clrName = generator.NameMapping[recordType.ToString()];
-                                parameter.Type = new CodeTypeReference(clrName);
-                                isPointer = true;
+                                if (functionKind != FunctionType.Delegate)
+                                {
+                                    var recordTypeCursor = clang.getTypeDeclaration(pointee);
+                                    var recordType = clang.getCursorType(recordTypeCursor);
+
+                                    // Get the CLR name for the record
+                                    var clrName = generator.NameMapping[recordType.ToString()];
+                                    parameter.Type = new CodeTypeReference(clrName);
+                                    isPointer = true;
+                                }
+                                else
+                                {
+                                    // if it's not a const, it's best to go with IntPtr
+                                    parameter.Type = new CodeTypeReference(typeof(IntPtr));
+                                    isPointer = true;
+                                }
+
                                 break;

                             default:
@@ -218,6 +225,7 @@
                             // For IntPtrs, we don't know - so we play on the safe side.
                             parameter.Direction = FieldDirection.Ref;
                         }
+
                         break;

                     case FunctionType.New:


Fix MixerMessage method names

Fix MixerMessage method names

--- gstreamer-sharp/MixerMessage.cs
+++ gstreamer-sharp/MixerMessage.cs
@@ -31,7 +31,7 @@
 		[DllImport("gstinterfaces-0.10.dll")]
 		static extern void gst_mixer_message_parse_option_changed(IntPtr message, out IntPtr options, out IntPtr value);

-		public static void MessageParseOptionChanged(Gst.Message message, out Gst.Interfaces.MixerOptions options, out string value) {
+		public static void ParseOptionChanged(Gst.Message message, out Gst.Interfaces.MixerOptions options, out string value) {
 			IntPtr native_value;
 			IntPtr native_options;

@@ -44,7 +44,7 @@
 		[DllImport("gstinterfaces-0.10.dll")]
 		static extern void gst_mixer_message_parse_record_toggled(IntPtr message, out IntPtr track, out bool record);

-		public static void MessageParseRecordToggled(Gst.Message message, out Gst.Interfaces.MixerTrack track, out bool record) {
+		public static void ParseRecordToggled(Gst.Message message, out Gst.Interfaces.MixerTrack track, out bool record) {
 			IntPtr native_ptr;

 			gst_mixer_message_parse_record_toggled(message == null ? IntPtr.Zero : message.Handle, out native_ptr, out record);
@@ -54,7 +54,7 @@
 		[DllImport("gstinterfaces-0.10.dll")]
 		static extern void gst_mixer_message_parse_volume_changed(IntPtr message, out IntPtr track, out IntPtr volumes, out int num_channels);

-		public static void MessageParseVolumeChanged(Gst.Message message, out Gst.Interfaces.MixerTrack track, out int[] volumes) {
+		public static void ParseVolumeChanged(Gst.Message message, out Gst.Interfaces.MixerTrack track, out int[] volumes) {
 			IntPtr native_track;
 			IntPtr native_volumes;
 			int n_native_volumes;
@@ -71,7 +71,7 @@
 		[DllImport("gstinterfaces-0.10.dll")]
 		static extern void gst_mixer_message_parse_options_list_changed(IntPtr message, out IntPtr options);

-		public static void MessageParseOptionsListChanged(Gst.Message message, out Gst.Interfaces.MixerOptions options) {
+		public static void ParseOptionsListChanged(Gst.Message message, out Gst.Interfaces.MixerOptions options) {
 			IntPtr native_options;

 			gst_mixer_message_parse_options_list_changed(message == null ? IntPtr.Zero : message.Handle, out native_options);


fix Source.Queue XML doc (#3291)

fix Source.Queue XML doc (#3291)

--- src/core/Akka.Streams/Dsl/Source.cs
+++ src/core/Akka.Streams/Dsl/Source.cs
@@ -762,7 +762,7 @@
         /// Can also complete with <see cref="QueueOfferResult.Failure"/> - when stream failed
         /// or <see cref="QueueOfferResult.QueueClosed"/> when downstream is completed.
         ///
-        /// The strategy <see cref="OverflowStrategy.Backpressure"/> will not complete <see cref="ISourceQueueWithComplete{T}.OfferAsync"/> until buffer is full.
+        /// The strategy <see cref="OverflowStrategy.Backpressure"/> will not complete <see cref="ISourceQueueWithComplete{T}.OfferAsync"/> when buffer is full.
         ///
         /// The buffer can be disabled by using <paramref name="bufferSize"/> of 0 and then received messages will wait
         /// for downstream demand unless there is another message waiting for downstream demand, in that case


Fix to allow all db distance entries to be imported

--- EDDiscovery/DB/SQLiteDBUserClass.cs
+++ EDDiscovery/DB/SQLiteDBUserClass.cs
@@ -265,7 +265,7 @@
             using (SQLiteConnectionOld conn = new SQLiteConnectionOld())
             {
                 //                                                0      1      2
-                using (DbCommand cmd = conn.CreateCommand("SELECT NameA, NameB, Dist FROM Distances WHERE Status >= 3"))
+                using (DbCommand cmd = conn.CreateCommand("SELECT NameA, NameB, Dist FROM Distances WHERE Status >= 1"))    // any distance pairs okay
                 {
                     using (DbDataReader reader = cmd.ExecuteReader())
                     {
@@ -376,7 +376,6 @@
                     }

                     txn.Commit();
-                    Console.WriteLine("Converted VS->JT");
                 }
             }


Move focus to the new system when we enter a system.

--- EDDiscovery/TravelHistoryControl.cs
+++ EDDiscovery/TravelHistoryControl.cs
@@ -872,6 +872,11 @@
             {
                 _discoveryForm.Map.UpdateVisited(visitedSystems);      // update in UI thread.
             });
+
+            // Move focus to new row
+            dataGridViewTravel.ClearSelection();
+            dataGridViewTravel.Rows[0].Cells[0].Selected =true; // This won't raise the CellClick handler, which updates the rest of the form
+            dataGridViewTravel_CellClick(dataGridViewTravel, new DataGridViewCellEventArgs(0, 0));
         }

         private int GetVisitsCount(string name)


set always sleep option.

set always sleep option.

--- Emcaster/Sockets/AsyncByteWriter.cs
+++ Emcaster/Sockets/AsyncByteWriter.cs
@@ -28,6 +28,7 @@
         private long _flushedBytes = 0;
         private long _flushes = 0;
         private long _sleepTime = 0;
+        private int _alwaysSleep = -1;

         public AsyncByteWriter(PgmSource pubber, int maxBufferSizeInBytes)
             : this(pubber.Socket, maxBufferSizeInBytes)
@@ -52,6 +53,12 @@
         {
             set { _minFlushSize = value; }
             get { return _minFlushSize; }
+        }
+
+        public int AlwaysSleep
+        {
+            set { _alwaysSleep = value; }
+            get { return _alwaysSleep;  }
         }

         public bool PrintStats
@@ -135,12 +142,20 @@
                 }
                 if (length < _minFlushSize)
                 {
-                    Thread.Sleep(_sleepOnMin);
-                    if (_printStats)
-                    {
-                        _sleepTime += _sleepOnMin;
-                    }
-                }
+                    Sleep(_sleepOnMin);
+                }else if(_alwaysSleep >=0)
+                {
+                    Sleep(_alwaysSleep);
+                }
+            }
+        }
+
+        private void Sleep(int sleep)
+        {
+            Thread.Sleep(sleep);
+            if (_printStats)
+            {
+                _sleepTime += sleep;
             }
         }


Fix default tree store creation

Fix default tree store creation

--- Xwt/Xwt/TreeStore.cs
+++ Xwt/Xwt/TreeStore.cs
@@ -39,10 +39,13 @@

 		class TreeStoreBackendHost: BackendHost<TreeStore,ITreeStoreBackend>
 		{
-			protected override void OnBackendCreated ()
+			protected override IBackend OnCreateBackend ()
 			{
-				Backend.Initialize (Parent.fields.Select (f => f.FieldType).ToArray ());
-				base.OnBackendCreated ();
+				var b = base.OnCreateBackend ();
+				if (b == null)
+					b = new DefaultTreeStoreBackend ();
+				((ITreeStoreBackend)b).Initialize (Parent.fields.Select (f => f.FieldType).ToArray ());
+				return b;
 			}
 		}


Default to Central Standard Time

Default to Central Standard Time

Parsing abbreviations is difficult  to do

--- Facebook-Messenger-Export/Moment.cs
+++ Facebook-Messenger-Export/Moment.cs
@@ -23,9 +23,11 @@
         /// <param name="zoneString">Simple abbreviation like "EST"</param>
         public Moment(string timeString, string zoneString)
         {
-            IDictionary<string, string> something = TZNames.GetFixedTimeZoneAbbreviations("en-US");
-            Time = DateTime.ParseExact(timeString, "dddd, MMMM d, yyyy 'at' h:mmtt", CultureInfo.InvariantCulture);
-            Zone = TimeZoneInfo.FindSystemTimeZoneById(zoneString);
+            //IDictionary<string, string> something = TZNames.GetFixedTimeZoneAbbreviations("en-US");
+
+            Time = DateTime.ParseExact(timeString, "dddd, MMMM d, yyyy 'at' h:mmtt", CultureInfo.InvariantCulture);
+            //    Zone = TimeZoneInfo.FindSystemTimeZoneById(zoneString);
+            Zone = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");

         }


fixed path fox linux.

fixed path fox linux.

--- Flubu.Tests/SolutionLoadingTests.cs
+++ Flubu.Tests/SolutionLoadingTests.cs
@@ -13,7 +13,7 @@
         [Fact]
         public void LoadSolution_OldCsprojAndNewCsproj_Succesfull()
         {
-            var solution = VSSolution.Load(@"TestData\Test.sln");
+            var solution = VSSolution.Load(@"TestData/Test.sln");
             Assert.Equal(11, solution.Projects.Count);
             Assert.Equal(12, solution.SolutionVersion);
             Assert.Equal("Hsl.Simobil.SelfCare.WebApi", solution.Projects[0].ProjectName);


Change UpdateMovement to be private

Change UpdateMovement to be private

--- Game_Algo/Game_Algo/PlayerSprite.cs
+++ Game_Algo/Game_Algo/PlayerSprite.cs
@@ -15,7 +15,7 @@
             : base(textureImage, position, spriteSize, sheetSize, gameMap)
         { }

-        public void UpdateMovement()
+        private void UpdateMovement()
         {
             KeyboardState ks = Keyboard.GetState();
             if (ks.IsKeyDown(Keys.Up) || ks.IsKeyDown(Keys.W))


fixed vertical scrollbar with global scaling

--- GeonBit.UI/Source/Entities/Panel.cs
+++ GeonBit.UI/Source/Entities/Panel.cs
@@ -182,7 +182,7 @@
                 _destRectInternal.Y -= _scrollbar.Value;

                 // update scrollbar position
-                _scrollbar.SetOffset(new Vector2(-_scrollbar.GetActualDestRect().Width, -_destRectInternal.Y));
+                _scrollbar.SetOffset(new Vector2(-_scrollbar.GetActualDestRect().Width, -_destRectInternal.Y / GeonBit.UI.UserInterface.Active.GlobalScale));
                 if (_scrollbar.Parent != null)
                 {
                     _scrollbar.BringToFront();


Fix NRE in CCGeometryNode setting sampler state when Texture is null.

Fix #309

--- src/misc_nodes/CCGeometryNode.cs
+++ src/misc_nodes/CCGeometryNode.cs
@@ -127,7 +127,7 @@
                     lastTexture = textureExists ? geometryPacket.Texture.XNATexture : null;
                     lastAttributes = geometry.InstanceAttributes;
                     DrawManager.XnaGraphicsDevice.Textures[0] = lastTexture;
-                    DrawManager.XnaGraphicsDevice.SamplerStates[0] = textureExists ? geometryPacket.Texture.SamplerState : null;
+                    DrawManager.XnaGraphicsDevice.SamplerStates[0] = textureExists ? geometryPacket.Texture.SamplerState : SamplerState.LinearClamp;
                 }

                 int[] itemIndicies = geometryPacket.Indicies;


Updated test layout

Updated test layout

--- Griddly/Views/Shared/_Layout.cshtml
+++ Griddly/Views/Shared/_Layout.cshtml
@@ -3,7 +3,7 @@

     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>@ViewBag.Title - My ASP.NET Application</title>
+    <title>@ViewBag.Title - Griddly Test</title>
     @Styles.Render("~/Content/css")
     @Scripts.Render("~/bundles/modernizr")

@@ -16,7 +16,7 @@

                 </button>
-                @Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" })
+                @Html.ActionLink("Griddly Test", "Index", "Home", null, new { @class = "navbar-brand" })


Bump version to 17.0.0.44222

Bump version to 17.0.0.44222

--- HearthDb/Properties/AssemblyInfo.cs
+++ HearthDb/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("16.6.0.43246")]
-[assembly: AssemblyFileVersion("16.6.0.43246")]
+[assembly: AssemblyVersion("17.0.0.44222")]
+[assembly: AssemblyFileVersion("17.0.0.44222")]


GtkUtilities: Remove a DllImport that is not used anymore

--- Hyena.Gui/Hyena.Gui/GtkUtilities.cs
+++ Hyena.Gui/Hyena.Gui/GtkUtilities.cs
@@ -154,9 +154,6 @@
             return ShowUri (screen, uri, Gtk.Global.CurrentEventTime);
         }

-        [System.Runtime.InteropServices.DllImport ("libgtk-win32-2.0-0.dll")]
-        private static extern unsafe bool gtk_show_uri (IntPtr screen, IntPtr uri, uint timestamp, out IntPtr error);
-
         [Obsolete ("Use Gtk.Global.ShowUri() from gtk# 3.x")]
         public static bool ShowUri (Gdk.Screen screen, string uri, uint timestamp)
         {


GtkUtilities: Port ColorBlend from Gdk.Color to Gdk.RGBA

As the colors are used for drawing, it's much easier to have them as
Gdk.RGBA anyway.

--- Hyena.Gui/Hyena.Gui/GtkUtilities.cs
+++ Hyena.Gui/Hyena.Gui/GtkUtilities.cs
@@ -88,7 +88,7 @@
             }
         }

-        public static Gdk.Color ColorBlend (Gdk.Color a, Gdk.Color b)
+        public static Gdk.RGBA ColorBlend (Gdk.RGBA a, Gdk.RGBA b)
         {
             // at some point, might be nice to allow any blend?
             double blend = 0.5;
@@ -99,23 +99,18 @@

             double blendRatio = 1.0 - blend;

-            int aR = a.Red >> 8;
-            int aG = a.Green >> 8;
-            int aB = a.Blue >> 8;
-
-            int bR = b.Red >> 8;
-            int bG = b.Green >> 8;
-            int bB = b.Blue >> 8;
-
-            double mR = aR + bR;
-            double mG = aG + bG;
-            double mB = aB + bB;
+            double mR = a.Red + b.Red;
+            double mG = a.Green + b.Green;
+            double mB = a.Blue + b.Blue;

             double blR = mR * blendRatio;
             double blG = mG * blendRatio;
             double blB = mB * blendRatio;

-            Gdk.Color color = new Gdk.Color ((byte)blR, (byte)blG, (byte)blB);
+            Gdk.RGBA color = new Gdk.RGBA ();
+            color.Red = blR;
+            color.Green = blG;
+            color.Blue = blB;
             return color;
         }


Add AdjustAlpha ImageBuffer extension method

--- ImageProcessing/ExtensionMethods.cs
+++ ImageProcessing/ExtensionMethods.cs
@@ -74,6 +74,45 @@
 			return outputImage;
 		}

+		public static ImageBuffer AjustAlpha(this ImageBuffer sourceImage, double factor)
+		{
+			var outputImage = new ImageBuffer(sourceImage);
+
+			switch (outputImage.BitDepth)
+			{
+				case 32:
+					{
+						int height = outputImage.Height;
+						int width = outputImage.Width;
+						byte[] imageABuffer = outputImage.GetBuffer();
+
+						for (int y = 0; y < height; y++)
+						{
+							int offsetA = outputImage.GetBufferOffsetY(y);
+
+							for (int x = 0; x < width; x++)
+							{
+								var alpha = imageABuffer[offsetA + 3];
+								if (alpha > 0)
+								{
+									imageABuffer[offsetA + 3] = (byte) (alpha * factor);
+								}
+
+								offsetA += 4;
+							}
+						}
+
+						outputImage.SetRecieveBlender(new BlenderPreMultBGRA());
+					}
+					break;
+
+				default:
+					throw new NotImplementedException();
+			}
+
+			return outputImage;
+		}
+
 		public static ImageBuffer ReplaceColor(this ImageBuffer sourceImage, RGBA_Bytes existingColor, RGBA_Bytes newColor, bool keepExistingAlpha = true)
 		{
 			var outputImage = new ImageBuffer(sourceImage);


Renamed method

Renamed method

--- Joinrpg/Views/GameField/Edit.cshtml
+++ Joinrpg/Views/GameField/Edit.cshtml
@@ -130,7 +130,7 @@
             </div>
         </div>

-        @if (Model.FieldViewType.PriceEditable())
+        @if (Model.FieldViewType.SupportsPricingOnField())
         {
             <div class="form-group">
                 @Html.LabelFor(model => model.Price, htmlAttributes: new { @class = "control-label col-md-3" })


finish cuda SVM linear kernel

finish cuda SVM linear kernel


Fix exception on tear-down of InsertTests.

--- Lang/DotNet/UnitTest/InsertTests.cs
+++ Lang/DotNet/UnitTest/InsertTests.cs
@@ -44,62 +44,65 @@
         private void DoInsert(FdoIConnection conn)
         {
             string geomName = null;
-            FdoIDescribeSchema desc = conn.CreateCommand((int)FdoCommandType.FdoCommandType_DescribeSchema) as FdoIDescribeSchema;
-            Assert.NotNull(desc);
-            FdoFeatureSchemaCollection schemas = desc.Execute();
-            Assert.NotNull(schemas);
-            FdoFeatureClass clsDef = schemas.GetClassDefinition(null, "World_Countries") as FdoFeatureClass;
-            Assert.NotNull(clsDef);
-            FdoGeometricPropertyDefinition geomProp = clsDef.GetGeometryProperty();
-            Assert.NotNull(geomProp);
-            geomName = geomProp.Name;
-
-            FdoIInsert insertCmd = conn.CreateCommand((int)FdoCommandType.FdoCommandType_Insert) as FdoIInsert;
-            Assert.NotNull(insertCmd);
-
-            insertCmd.SetFeatureClassName("World_Countries");
-
-            FdoFgfGeometryFactory geomFactory = FdoFgfGeometryFactory.GetInstance();
-            FdoPropertyValueCollection propVals = insertCmd.GetPropertyValues();
-
-            FdoStringValue nameVal = FdoStringValue.Create();
-            Assert.True(nameVal.IsNull());
-            FdoStringValue keyVal = FdoStringValue.Create();
-            Assert.True(keyVal.IsNull());
-            FdoStringValue mapkeyVal = FdoStringValue.Create();
-            Assert.True(mapkeyVal.IsNull());
-            FdoGeometryValue geomVal = FdoGeometryValue.Create();
-            Assert.True(geomVal.IsNull());
-
-            FdoPropertyValue pName = FdoPropertyValue.Create("NAME", nameVal);
-            FdoPropertyValue pKey = FdoPropertyValue.Create("KEY", keyVal);
-            FdoPropertyValue pMapKey = FdoPropertyValue.Create("MAPKEY", mapkeyVal);
-            FdoPropertyValue pGeom = FdoPropertyValue.Create(geomName, geomVal);
-
-            propVals.Add(pName);
-            propVals.Add(pKey);
-            propVals.Add(pMapKey);
-            propVals.Add(pGeom);
-
-            //Set the actual values
-            nameVal.String = "My Own Country";
-            keyVal.String = "MOC";
-            mapkeyVal.String = "MOC123";
-            FdoIGeometry geom = geomFactory.CreateGeometry("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
-            FdoByteArrayHandle fgf = geomFactory.GetFgfBytes(geom);
-            geomVal.SetGeometryBytes(fgf);
-
-            int inserted = GetInsertedFeatures(insertCmd);
-            Assert.AreEqual(1, inserted, "Expected 1 feature inserted");
-
-            int count = GetFeatureCountForName(conn, "My Own Country");
-            Assert.AreEqual(1, count, "Expected 1 feature");
-
-            mapkeyVal.String = "MOC234";
-            Assert.AreEqual(1, GetInsertedFeatures(insertCmd), "Expected 1 feature inserted");
-            Assert.AreEqual(2, GetFeatureCountForName(conn, "My Own Country"));
-            Assert.AreEqual(1, GetFeatureCountForMapKey(conn, "MOC123"));
-            Assert.AreEqual(1, GetFeatureCountForMapKey(conn, "MOC234"));
+            using (FdoIDescribeSchema desc = conn.CreateCommand((int)FdoCommandType.FdoCommandType_DescribeSchema) as FdoIDescribeSchema)
+            {
+                Assert.NotNull(desc);
+                FdoFeatureSchemaCollection schemas = desc.Execute();
+                Assert.NotNull(schemas);
+                FdoFeatureClass clsDef = schemas.GetClassDefinition(null, "World_Countries") as FdoFeatureClass;
+                Assert.NotNull(clsDef);
+                FdoGeometricPropertyDefinition geomProp = clsDef.GetGeometryProperty();
+                Assert.NotNull(geomProp);
+                geomName = geomProp.Name;
+            }
+            using (FdoIInsert insertCmd = conn.CreateCommand((int)FdoCommandType.FdoCommandType_Insert) as FdoIInsert)
+            {
+                Assert.NotNull(insertCmd);
+
+                insertCmd.SetFeatureClassName("World_Countries");
+
+                FdoFgfGeometryFactory geomFactory = FdoFgfGeometryFactory.GetInstance();
+                FdoPropertyValueCollection propVals = insertCmd.GetPropertyValues();
+
+                FdoStringValue nameVal = FdoStringValue.Create();
+                Assert.True(nameVal.IsNull());
+                FdoStringValue keyVal = FdoStringValue.Create();
+                Assert.True(keyVal.IsNull());
+                FdoStringValue mapkeyVal = FdoStringValue.Create();
+                Assert.True(mapkeyVal.IsNull());
+                FdoGeometryValue geomVal = FdoGeometryValue.Create();
+                Assert.True(geomVal.IsNull());
+
+                FdoPropertyValue pName = FdoPropertyValue.Create("NAME", nameVal);
+                FdoPropertyValue pKey = FdoPropertyValue.Create("KEY", keyVal);
+                FdoPropertyValue pMapKey = FdoPropertyValue.Create("MAPKEY", mapkeyVal);
+                FdoPropertyValue pGeom = FdoPropertyValue.Create(geomName, geomVal);
+
+                propVals.Add(pName);
+                propVals.Add(pKey);
+                propVals.Add(pMapKey);
+                propVals.Add(pGeom);
+
+                //Set the actual values
+                nameVal.String = "My Own Country";
+                keyVal.String = "MOC";
+                mapkeyVal.String = "MOC123";
+                FdoIGeometry geom = geomFactory.CreateGeometry("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
+                FdoByteArrayHandle fgf = geomFactory.GetFgfBytes(geom);
+                geomVal.SetGeometryBytes(fgf);
+
+                int inserted = GetInsertedFeatures(insertCmd);
+                Assert.AreEqual(1, inserted, "Expected 1 feature inserted");
+
+                int count = GetFeatureCountForName(conn, "My Own Country");
+                Assert.AreEqual(1, count, "Expected 1 feature");
+
+                mapkeyVal.String = "MOC234";
+                Assert.AreEqual(1, GetInsertedFeatures(insertCmd), "Expected 1 feature inserted");
+                Assert.AreEqual(2, GetFeatureCountForName(conn, "My Own Country"));
+                Assert.AreEqual(1, GetFeatureCountForMapKey(conn, "MOC123"));
+                Assert.AreEqual(1, GetFeatureCountForMapKey(conn, "MOC234"));
+            }
         }

         private static int GetInsertedFeatures(FdoIInsert insertCmd)


Made CloudBlob.CopyState virtual

Made CloudBlob.CopyState virtual

--- Lib/Common/Blob/CloudBlob.Common.cs
+++ Lib/Common/Blob/CloudBlob.Common.cs
@@ -342,7 +342,7 @@
         /// Gets the state of the most recent or pending copy operation.
         /// </summary>
         /// <value>A <see cref="CopyState"/> object containing the copy state, or <c>null</c> if there is no copy state for the blob.</value>
-        public CopyState CopyState
+        public virtual CopyState CopyState
         {
             get
             {


Designer what are you doing

Designer what are you doing

--- Mappy/UI/Forms/MainForm.Designer.cs
+++ Mappy/UI/Forms/MainForm.Designer.cs
@@ -83,16 +83,16 @@
             this.aboutMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.sidebarTabs = new System.Windows.Forms.TabControl();
             this.sectionsTab = new System.Windows.Forms.TabPage();
+            this.sectionsView = new Mappy.UI.Controls.SectionView();
             this.featuresTab = new System.Windows.Forms.TabPage();
+            this.featureView = new Mappy.UI.Controls.FeatureView();
             this.startPositionsTab = new System.Windows.Forms.TabPage();
+            this.startPositionsView1 = new Mappy.UI.Controls.StartPositionsView();
             this.attributesTab = new System.Windows.Forms.TabPage();
             this.seaLevelValueLabel = new System.Windows.Forms.Label();
             this.seaLevelLabel = new System.Windows.Forms.Label();
             this.seaLevelTrackbar = new System.Windows.Forms.TrackBar();
             this.mapView = new Mappy.UI.Controls.ImageLayerView();
-            this.sectionsView = new Mappy.UI.Controls.SectionView();
-            this.featureView = new Mappy.UI.Controls.FeatureView();
-            this.startPositionsView1 = new Mappy.UI.Controls.StartPositionsView();
             toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
             toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
             toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
@@ -539,7 +539,7 @@
             // aboutMenuItem
             //
             this.aboutMenuItem.Name = "aboutMenuItem";
-            this.aboutMenuItem.Size = new System.Drawing.Size(116, 22);
+            this.aboutMenuItem.Size = new System.Drawing.Size(152, 22);
             this.aboutMenuItem.Text = "&About...";
             this.aboutMenuItem.Click += new System.EventHandler(this.AboutMenuItemClick);
             //
@@ -567,6 +567,16 @@
             this.sectionsTab.Text = "Sections";
             this.sectionsTab.UseVisualStyleBackColor = true;
             //
+            // sectionsView
+            //
+            this.sectionsView.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.sectionsView.Location = new System.Drawing.Point(3, 3);
+            this.sectionsView.Margin = new System.Windows.Forms.Padding(4);
+            this.sectionsView.Name = "sectionsView";
+            this.sectionsView.Sections = null;
+            this.sectionsView.Size = new System.Drawing.Size(201, 506);
+            this.sectionsView.TabIndex = 3;
+            //
             // featuresTab
             //
             this.featuresTab.Controls.Add(this.featureView);
@@ -578,6 +588,16 @@
             this.featuresTab.Text = "Features";
             this.featuresTab.UseVisualStyleBackColor = true;
             //
+            // featureView
+            //
+            this.featureView.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.featureView.Features = null;
+            this.featureView.Location = new System.Drawing.Point(3, 3);
+            this.featureView.Margin = new System.Windows.Forms.Padding(4);
+            this.featureView.Name = "featureView";
+            this.featureView.Size = new System.Drawing.Size(201, 506);
+            this.featureView.TabIndex = 0;
+            //
             // startPositionsTab
             //
             this.startPositionsTab.Controls.Add(this.startPositionsView1);
@@ -588,6 +608,15 @@
             this.startPositionsTab.TabIndex = 2;
             this.startPositionsTab.Text = "Starts";
             this.startPositionsTab.UseVisualStyleBackColor = true;
+            //
+            // startPositionsView1
+            //
+            this.startPositionsView1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.startPositionsView1.Location = new System.Drawing.Point(3, 3);
+            this.startPositionsView1.Margin = new System.Windows.Forms.Padding(4);
+            this.startPositionsView1.Name = "startPositionsView1";
+            this.startPositionsView1.Size = new System.Drawing.Size(201, 506);
+            this.startPositionsView1.TabIndex = 0;
             //
             // attributesTab
             //
@@ -657,35 +686,6 @@
             this.mapView.Text = "imageLayerView1";
             this.mapView.Scroll += new System.Windows.Forms.ScrollEventHandler(this.MapViewScroll);
             this.mapView.ClientSizeChanged += new System.EventHandler(this.MapPanel1SizeChanged);
-            //
-            // sectionsView
-            //
-            this.sectionsView.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.sectionsView.Location = new System.Drawing.Point(3, 3);
-            this.sectionsView.Margin = new System.Windows.Forms.Padding(4);
-            this.sectionsView.Name = "sectionsView";
-            this.sectionsView.Sections = null;
-            this.sectionsView.Size = new System.Drawing.Size(201, 506);
-            this.sectionsView.TabIndex = 3;
-            //
-            // featureView
-            //
-            this.featureView.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.featureView.Features = null;
-            this.featureView.Location = new System.Drawing.Point(3, 3);
-            this.featureView.Margin = new System.Windows.Forms.Padding(4);
-            this.featureView.Name = "featureView";
-            this.featureView.Size = new System.Drawing.Size(201, 506);
-            this.featureView.TabIndex = 0;
-            //
-            // startPositionsView1
-            //
-            this.startPositionsView1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.startPositionsView1.Location = new System.Drawing.Point(3, 3);
-            this.startPositionsView1.Margin = new System.Windows.Forms.Padding(4);
-            this.startPositionsView1.Name = "startPositionsView1";
-            this.startPositionsView1.Size = new System.Drawing.Size(201, 506);
-            this.startPositionsView1.TabIndex = 0;
             //
             // MainForm
             //


Dispose old images

Dispose old images

--- MonoHaven.Client/Game/GameObject.cs
+++ MonoHaven.Client/Game/GameObject.cs
@@ -36,6 +36,8 @@
 					var negc = neg != null ? neg.Center : Point.Empty;
 					using (var bitmap = ImageUtils.Combine(imageData))
 					{
+						if (image != null)
+							image.Dispose();
 						image = new Texture(bitmap);
 						image.DrawOffset = new Point(-negc.X, -negc.Y);
 					}


Issue #34: Searching for a term that contains a slash crashes MSBTE

--- MsBuildTaskExplorer/SolutionInfo.cs
+++ MsBuildTaskExplorer/SolutionInfo.cs
@@ -141,24 +141,32 @@
             }
 	    }

-        private static bool GetFilter(string relativeFilePath, string targetName, string originalFilter)
-        {
-	        var filter = targetName != ENSURE_NUGET_PACKAGE_BUILD_IMPORTS;
-	        var filters = originalFilter?.Split('|');
-	        if (filter && filters != null)
+        private bool GetFilter(string relativeFilePath, string targetName, string originalFilter)
+        {
+	        try
 	        {
-		        if (filters.Length == 1)
+		        var filter = targetName != ENSURE_NUGET_PACKAGE_BUILD_IMPORTS;
+		        var filters = originalFilter?.Split('|');
+		        if (filter && filters != null)
 		        {
-			        filter = Regex.IsMatch(targetName, filters[0], RegexOptions.IgnoreCase);
+			        if (filters.Length == 1)
+			        {
+				        filter = Regex.IsMatch(targetName, filters[0], RegexOptions.IgnoreCase);
+			        }
+			        else if (filters.Length == 2)
+			        {
+				        filter = Regex.IsMatch(targetName, filters[1], RegexOptions.IgnoreCase)
+				                 && Regex.IsMatch(relativeFilePath, filters[0], RegexOptions.IgnoreCase);
+			        }
 		        }
-		        else if (filters.Length == 2)
-		        {
-			        filter = Regex.IsMatch(targetName, filters[1], RegexOptions.IgnoreCase)
-			                 && Regex.IsMatch(relativeFilePath, filters[0], RegexOptions.IgnoreCase);
-		        }
+
+		        return filter;
 	        }
-
-	        return filter;
+	        catch (ArgumentException ex)
+	        {
+		        WriteOutputLine(ex.ToString());
+                return false;
+	        }
         }

         public void WriteOutputLine(string value)


Perf improvement on golomb filter building

--- NBitcoin/BIP158/GolombRiceFilter.cs
+++ NBitcoin/BIP158/GolombRiceFilter.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using NBitcoin.Crypto;
 using NBitcoin.Protocol;
@@ -490,7 +491,9 @@
 			if (outpoint == null)
 				throw new ArgumentNullException(nameof(outpoint));

-			_values.Add(outpoint.ToBytes());
+			MemoryStream ms = new MemoryStream(32 + 4);
+			outpoint.ReadWrite(new BitcoinStream(ms, true));
+			_values.Add(ms.ToArrayEfficient());
 			return this;
 		}


'1.0.191'

--- Node.Net/Properties/AssemblyInfo.cs
+++ Node.Net/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.190")]
-[assembly: AssemblyFileVersion("1.0.190")]
+[assembly: AssemblyVersion("1.0.191")]
+[assembly: AssemblyFileVersion("1.0.191")]


Major overhaul; use ActiveUserEvent for progress reporting; handle

    * src/BurnCore.cs: Major overhaul; use ActiveUserEvent for progress
    reporting; handle threading and events much better; massive clean up

--- src/BurnCore.cs
+++ src/BurnCore.cs
@@ -318,7 +318,7 @@
                 return;
             }

-            user_event.Message = "Waiting for Media";
+            user_event.Message = Catalog.GetString("Waiting for Media");

             Core.ProxyToMainThread(delegate {
                 HigMessageDialog dialog = new HigMessageDialog(null, DialogFlags.Modal, MessageType.Info,


If fusion is not available, catch the exception. In addition, allow for direct assembly lookups - previously, if an assembly reference was a full path it might not be added, even if it existed.

--- OmniSharp/Solution/CSharpProject.cs
+++ OmniSharp/Solution/CSharpProject.cs
@@ -242,7 +242,12 @@
         {
             if (evaluatedInclude.IndexOf(',') >= 0)
                 evaluatedInclude = evaluatedInclude.Substring(0, evaluatedInclude.IndexOf(','));
-            foreach (string searchPath in assemblySearchPaths)
+
+			string directAssemblyFile = (evaluatedInclude + ".dll").FixPath();
+			if (File.Exists(directAssemblyFile))
+					return directAssemblyFile;
+
+			foreach (string searchPath in assemblySearchPaths)
             {
                 string assemblyFile = Path.Combine(searchPath, evaluatedInclude + ".dll").FixPath();
                 if (File.Exists(assemblyFile))
@@ -253,8 +258,16 @@

         public static string FindAssemblyInNetGac(string evaluatedInclude)
         {
-            AssemblyNameReference assemblyNameReference = AssemblyNameReference.Parse(evaluatedInclude);
-            return GacInterop.FindAssemblyInNetGac(assemblyNameReference);
+			try
+			{
+	            AssemblyNameReference assemblyNameReference = AssemblyNameReference.Parse(evaluatedInclude);
+	            return GacInterop.FindAssemblyInNetGac(assemblyNameReference);
+			}
+			catch(System.TypeInitializationException)
+			{
+				Console.WriteLine ("Fusion not available - cannot get {0} from the gac.", evaluatedInclude);
+				return null;
+			}
         }


Throw exceptions if calling AsXml or Save on the OrphanProject

--- OmniSharp/Solution/OrphanProject.cs
+++ OmniSharp/Solution/OrphanProject.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Xml.Linq;
 using ICSharpCode.NRefactory.CSharp;
 using ICSharpCode.NRefactory.TypeSystem;
@@ -43,12 +44,12 @@

         public XDocument AsXml()
         {
-            return XDocument.Load(FileName);
+            throw new NotImplementedException();
         }

         public void Save(XDocument project)
         {
-            project.Save(FileName);
+            throw new NotImplementedException();
         }
     }
 }


Updated xmldoc

Updated xmldoc

--- PInvoke/Shell32/KnownFolderIdExt.cs
+++ PInvoke/Shell32/KnownFolderIdExt.cs
@@ -34,10 +34,10 @@
 		public static T GetRegistryProperty<T>(this KNOWNFOLDERID id, string valueName) =>
 			(T)Microsoft.Win32.Registry.GetValue(RegPath + id.Guid().ToString("B"), valueName, default(T));

-		/// Retrieves the Guid associated with a <see cref="KNOWNFOLDERID"/>.
-		/// <param name="id">The known folder.</param>
-		/// <returns>The GUID.</returns>
-		public static Guid Guid(this KNOWNFOLDERID id) => AssociateAttribute.GetGuidFromEnum(id);
+        /// Retrieves the Guid associated with a <see cref="KNOWNFOLDERID"/>.
+        /// <param name="id">The known folder.</param>
+        /// <returns>The GUID associated with the <paramref name="id"/> or <see cref="Guid.Empty"/> if no association exists.</returns>
+        public static Guid Guid(this KNOWNFOLDERID id) => AssociateAttribute.GetGuidFromEnum(id);

 		/// Retrieves the IShellItem associated with a <see cref="KNOWNFOLDERID"/>.
 		/// <param name="id">The known folder.</param>


Another EINTR case

Another EINTR case

--- Unix.cs
+++ Unix.cs
@@ -289,7 +289,12 @@
 		//TODO: consider memory management
 		public void Close ()
 		{
-			int r = close (Handle);
+			int r = 0;
+
+			do {
+				r = close (Handle);
+			} while (r < 0 && UnixError.ShouldRetry);
+
 			if (r < 0)
 				throw UnixError.GetLastUnixException ();


Modified quirk fix method to be more generalized

--- SiloSim/PLC.cs
+++ SiloSim/PLC.cs
@@ -259,7 +259,7 @@
             {
                 if (dataPayload.Substring(2, 2) == "07")
                 {
-                    string modifiedResponse = response.Substring(6, response.Length - 6).Replace("10", "1010");
+                    string modifiedResponse = QuirkFix(response.Substring(6, response.Length - 6));
                     data = src + dst + cmd + response.Substring(0, 6) + modifiedResponse; //weird quirk
                 }
             }
@@ -305,6 +305,25 @@
             string hexString4 = target4.ToString("X4");
             string inventoryString = hexString0 + "0000"+ hexString1 + "0000" + hexString2 + "0000" + hexString3 + "0000" + hexString4 + "0000";
             return inventoryString;
+        }
+
+        static string QuirkFix(string response)
+        {
+            string quirkString = response;
+            if (response.Length % 2 == 0)
+            {
+                quirkString = "";
+                for (int i = 0; i < (response.Length / 2); i++)
+                {
+                    string byteString = response.Substring(i * 2, 2);
+                    if (byteString == "10")
+                    {
+                        quirkString = quirkString + byteString;
+                    }
+                    quirkString = quirkString + byteString;
+                }
+            }
+            return quirkString;
         }

         public static string ByteArrayToString(byte[] ba)