Prepare for background light addition.

Prepare for background light addition.

(Needed for better background/environment shader control).

--- Database/LightDatabase.cs
+++ Database/LightDatabase.cs
@@ -35,6 +35,18 @@
 		/// record what Guid corresponds to what light in cycles
 		/// </summary>
 		private readonly Dictionary<Guid, CclLight> _rhCclLights = new Dictionary<Guid, CclLight>();
+
+		public readonly Guid BackgroundLightGuid = new Guid("e9bb5342-bbd7-466a-8cd1-96f471e57e65");
+
+		public LightDatabase()
+		{
+			/*CyclesLight bgLight = new CyclesLight()
+			{
+				UseMis = true,
+				Type = ccl.LightType.Background,
+			};
+			AddLight(bgLight);*/
+		}

 		/// <summary>
 		/// Return true if any changes have been recorded by the ChangeQueue


Fixed PrisonCourtyard safe zone name

Fixed PrisonCourtyard safe zone name

--- DeadCellsStats/Globals.cs
+++ DeadCellsStats/Globals.cs
@@ -10,7 +10,7 @@
 		public static string Range = "DATA";
 		public static string[] FightZones = { "PrisonStart", "PrisonCourtyard", "SewerShort", "Ossuary", "PrisonRoof",
 			"SewerDepths", "PrisonDepths", "Bridge", "StiltVillage", "Cemetery", "BeholderPit" };
-		public static string[] SafeZones = { "T_PrisonCourtyard", "T_SewerShort", "T_Ossuary", "T_PrisonRoof",
+		public static string[] SafeZones = { "T_Courtyard", "T_SewerShort", "T_Ossuary", "T_PrisonRoof",
 			"T_SewerDepths", "T_PrisonDepths", "T_Bridge", "T_StiltVillage", "T_Cemetery", "T_BeholderPit" };
 	}
 }


small fix

small fix

--- Debugger/SceneExplorer.cs
+++ Debugger/SceneExplorer.cs
@@ -374,6 +374,7 @@
                 {
                     rtLiveView.previewTexture = (RenderTexture)value;
                     rtLiveView.caller = caller + "." + field.Name;
+                    rtLiveView.visible = true;
                 }
             }


Separated behavior for IList, ICollection, and IEnumerable.

--- Debugger/SceneExplorer.cs
+++ Debugger/SceneExplorer.cs
@@ -891,6 +891,306 @@
             return false;
         }

+        private bool IsCollection(object myProperty)
+        {
+            if (typeof(ICollection).IsAssignableFrom(myProperty.GetType())
+                || typeof(ICollection<>).IsAssignableFrom(myProperty.GetType()))
+                return true;
+
+            return false;
+        }
+
+        private bool IsList(object myProperty)
+        {
+            if (typeof(IList).IsAssignableFrom(myProperty.GetType())
+                || typeof(IList<>).IsAssignableFrom(myProperty.GetType()))
+                return true;
+
+            return false;
+        }
+
+        private void OnSceneTreeReflectIList(ReferenceChain refChain, System.Object myProperty)
+        {
+            if (!SceneTreeCheckDepth(refChain)) return;
+
+            var list = myProperty as IList;
+            if (list == null)
+            {
+                return;
+            }
+
+            var oldRefChain = refChain;
+
+
+            var collectionSize = list.Count;
+
+            GUILayout.BeginHorizontal();
+            GUILayout.Space(treeIdentSpacing * refChain.Ident);
+            GUILayout.Label("Collection size: " + collectionSize);
+
+            if (!selectedArrayStartIndices.ContainsKey(refChain))
+            {
+                selectedArrayStartIndices.Add(refChain, 0);
+            }
+
+            if (!selectedArrayEndIndices.ContainsKey(refChain))
+            {
+                selectedArrayEndIndices.Add(refChain, 32);
+            }
+
+            var arrayStart = selectedArrayStartIndices[refChain];
+            var arrayEnd = selectedArrayEndIndices[refChain];
+
+            GUIControls.IntField(oldRefChain.ToString() + ".arrayStart", "Start index", ref arrayStart, 0.0f, true, true);
+            GUIControls.IntField(oldRefChain.ToString() + ".arrayEnd", "End index", ref arrayEnd, 0.0f, true, true);
+            GUILayout.Label("(32 items max)");
+            GUILayout.FlexibleSpace();
+            GUILayout.EndHorizontal();
+
+            arrayStart = Mathf.Clamp(arrayStart, 0, collectionSize - 1);
+            arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
+            if (arrayStart > arrayEnd)
+            {
+                arrayEnd = arrayStart;
+            }
+
+            if (arrayEnd - arrayStart > 32)
+            {
+                arrayEnd = arrayStart + 32;
+                arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
+            }
+
+            selectedArrayStartIndices[refChain] = arrayStart;
+            selectedArrayEndIndices[refChain] = arrayEnd;
+
+            for (int i = arrayStart; i <= arrayEnd; i++)
+            {
+                refChain = oldRefChain.Add(i);
+
+                var type = list[i].GetType();
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Space(treeIdentSpacing * refChain.Ident);
+
+                GUI.contentColor = Color.white;
+
+                if (TypeUtil.IsReflectableType(type) && !IsEnumerable(type))
+                {
+                    if (expandedObjects.ContainsKey(refChain))
+                    {
+                        if (GUILayout.Button("-", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Remove(refChain);
+                        }
+                    }
+                    else
+                    {
+                        if (GUILayout.Button("+", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Add(refChain, true);
+                        }
+                    }
+                }
+
+                GUI.contentColor = config.typeColor;
+
+                GUILayout.Label(type.ToString() + " ");
+
+                GUI.contentColor = config.nameColor;
+
+                GUILayout.Label(String.Format("{0}.[{1}]", oldRefChain.LastItemName, i));
+
+                GUI.contentColor = Color.white;
+
+                GUILayout.Label(" = ");
+
+                GUI.contentColor = config.valueColor;
+
+                if (list[i] == null || !TypeUtil.IsBuiltInType(list[i].GetType()))
+                {
+                    GUILayout.Label(list[i] == null ? "null" : list[i].ToString());
+                }
+                else
+                {
+                    try
+                    {
+                        var newValue = GUIControls.EditorValueField(refChain, list[i].GetHashCode().ToString(), list[i].GetType(), list[i]);
+                        if (newValue != list[i])
+                        {
+                            list[i] = newValue;
+                        }
+                    }
+                    catch (Exception)
+                    {
+                        GUILayout.Label(list[i] == null ? "null" : list[i].ToString());
+                    }
+                }
+
+                GUI.contentColor = Color.white;
+
+                GUILayout.FlexibleSpace();
+                GUILayout.EndHorizontal();
+
+                if (TypeUtil.IsReflectableType(type) && expandedObjects.ContainsKey(refChain))
+                {
+                    if (list[i] is GameObject)
+                    {
+                        var go = list[i] as GameObject;
+                        foreach (var component in go.GetComponents<Component>())
+                        {
+                            OnSceneTreeComponent(refChain, component);
+                        }
+                    }
+                    else if (list[i] is Transform)
+                    {
+                        OnSceneTreeReflectUnityEngineTransform(refChain, (Transform)list[i]);
+                    }
+                    else
+                    {
+                        OnSceneTreeReflect(refChain, list[i]);
+                    }
+                }
+            }
+        }
+
+        private void OnSceneTreeReflectICollection(ReferenceChain refChain, System.Object myProperty)
+        {
+            if (!SceneTreeCheckDepth(refChain)) return;
+
+            var collection = myProperty as ICollection;
+            if (collection == null)
+            {
+                return;
+            }
+
+            int count = 0;
+            var oldRefChain = refChain;
+
+
+            var collectionSize = collection.Count;
+
+            GUILayout.BeginHorizontal();
+            GUILayout.Space(treeIdentSpacing * refChain.Ident);
+            GUILayout.Label("Collection size: " + collectionSize);
+
+            if (!selectedArrayStartIndices.ContainsKey(refChain))
+            {
+                selectedArrayStartIndices.Add(refChain, 0);
+            }
+
+            if (!selectedArrayEndIndices.ContainsKey(refChain))
+            {
+                selectedArrayEndIndices.Add(refChain, 32);
+            }
+
+            var arrayStart = selectedArrayStartIndices[refChain];
+            var arrayEnd = selectedArrayEndIndices[refChain];
+
+            GUIControls.IntField(oldRefChain.ToString() + ".arrayStart", "Start index", ref arrayStart, 0.0f, true, true);
+            GUIControls.IntField(oldRefChain.ToString() + ".arrayEnd", "End index", ref arrayEnd, 0.0f, true, true);
+            GUILayout.Label("(32 items max)");
+            GUILayout.FlexibleSpace();
+            GUILayout.EndHorizontal();
+
+            arrayStart = Mathf.Clamp(arrayStart, 0, collectionSize - 1);
+            arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
+            if (arrayStart > arrayEnd)
+            {
+                arrayEnd = arrayStart;
+            }
+
+            if (arrayEnd - arrayStart > 32)
+            {
+                arrayEnd = arrayStart + 32;
+                arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
+            }
+
+            selectedArrayStartIndices[refChain] = arrayStart;
+            selectedArrayEndIndices[refChain] = arrayEnd;
+
+            foreach (var value in collection)
+            {
+                if (count < arrayStart)
+                {
+                    count++;
+                    continue;
+                }
+
+                refChain = oldRefChain.Add(count);
+
+                var type = value.GetType();
+
+                GUILayout.BeginHorizontal();
+                GUILayout.Space(treeIdentSpacing * refChain.Ident);
+
+                GUI.contentColor = Color.white;
+
+                if (TypeUtil.IsReflectableType(type) && !IsEnumerable(type))
+                {
+                    if (expandedObjects.ContainsKey(refChain))
+                    {
+                        if (GUILayout.Button("-", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Remove(refChain);
+                        }
+                    }
+                    else
+                    {
+                        if (GUILayout.Button("+", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Add(refChain, true);
+                        }
+                    }
+                }
+
+                GUI.contentColor = config.typeColor;
+
+                GUILayout.Label(type.ToString() + " ");
+
+                GUI.contentColor = config.nameColor;
+
+                GUILayout.Label(String.Format("{0}.[{1}]", oldRefChain.LastItemName, count));
+
+                GUI.contentColor = Color.white;
+
+                GUILayout.Label(" = ");
+
+                GUI.contentColor = config.valueColor;
+                GUILayout.Label(value == null ? "null" : value.ToString());
+
+                GUI.contentColor = Color.white;
+
+                GUILayout.FlexibleSpace();
+                GUILayout.EndHorizontal();
+
+                if (TypeUtil.IsReflectableType(type) && expandedObjects.ContainsKey(refChain))
+                {
+                    if (value is GameObject)
+                    {
+                        var go = value as GameObject;
+                        foreach (var component in go.GetComponents<Component>())
+                        {
+                            OnSceneTreeComponent(refChain, component);
+                        }
+                    }
+                    else if (value is Transform)
+                    {
+                        OnSceneTreeReflectUnityEngineTransform(refChain, (Transform)value);
+                    }
+                    else
+                    {
+                        OnSceneTreeReflect(refChain, value);
+                    }
+                }
+
+                count++;
+                if (count > arrayEnd)
+                {
+                    break;
+                }
+            }
+        }
+
         private void OnSceneTreeReflectIEnumerable(ReferenceChain refChain, System.Object myProperty)
         {
             if (!SceneTreeCheckDepth(refChain)) return;
@@ -904,211 +1204,81 @@
             int count = 0;
             var oldRefChain = refChain;

-            var collection = enumerable as ICollection;
-
-            if (collection != null)
-            {
-                var collectionSize = collection.Count;
+            foreach (var value in enumerable)
+            {
+                refChain = oldRefChain.Add(count);
+
+                var type = value.GetType();

                 GUILayout.BeginHorizontal();
                 GUILayout.Space(treeIdentSpacing * refChain.Ident);
-                GUILayout.Label("Collection size: " + collectionSize);
-
-                if (!selectedArrayStartIndices.ContainsKey(refChain))
-                {
-                    selectedArrayStartIndices.Add(refChain, 0);
-                }
-
-                if (!selectedArrayEndIndices.ContainsKey(refChain))
-                {
-                    selectedArrayEndIndices.Add(refChain, 32);
-                }
-
-                var arrayStart = selectedArrayStartIndices[refChain];
-                var arrayEnd = selectedArrayEndIndices[refChain];
-
-                GUIControls.IntField(oldRefChain.ToString() + ".arrayStart", "Start index", ref arrayStart, 0.0f, true, true);
-                GUIControls.IntField(oldRefChain.ToString() + ".arrayEnd", "End index", ref arrayEnd, 0.0f, true, true);
-                GUILayout.Label("(32 items max)");
+
+                GUI.contentColor = Color.white;
+
+                if (TypeUtil.IsReflectableType(type) && !IsEnumerable(type))
+                {
+                    if (expandedObjects.ContainsKey(refChain))
+                    {
+                        if (GUILayout.Button("-", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Remove(refChain);
+                        }
+                    }
+                    else
+                    {
+                        if (GUILayout.Button("+", GUILayout.ExpandWidth(false)))
+                        {
+                            expandedObjects.Add(refChain, true);
+                        }
+                    }
+                }
+
+                GUI.contentColor = config.typeColor;
+
+                GUILayout.Label(type.ToString() + " ");
+
+                GUI.contentColor = config.nameColor;
+
+                GUILayout.Label(String.Format("{0}.[{1}]", oldRefChain.LastItemName, count));
+
+                GUI.contentColor = Color.white;
+
+                GUILayout.Label(" = ");
+
+                GUI.contentColor = config.valueColor;
+
+                GUILayout.Label(value == null ? "null" : value.ToString());
+
+                GUI.contentColor = Color.white;
+
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();

-                arrayStart = Mathf.Clamp(arrayStart, 0, collectionSize - 1);
-                arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
-                if (arrayStart > arrayEnd)
-                {
-                    arrayEnd = arrayStart;
-                }
-
-                if (arrayEnd - arrayStart > 32)
-                {
-                    arrayEnd = arrayStart + 32;
-                    arrayEnd = Mathf.Clamp(arrayEnd, 0, collectionSize - 1);
-                }
-
-                selectedArrayStartIndices[refChain] = arrayStart;
-                selectedArrayEndIndices[refChain] = arrayEnd;
-
-                foreach (var value in enumerable)
-                {
-                    if (count < arrayStart)
-                    {
-                        count++;
-                        continue;
-                    }
-
-                    refChain = oldRefChain.Add(count);
-
-                    var type = value.GetType();
-
-                    GUILayout.BeginHorizontal();
-                    GUILayout.Space(treeIdentSpacing * refChain.Ident);
-
-                    GUI.contentColor = Color.white;
-
-                    if (TypeUtil.IsReflectableType(type) && !IsEnumerable(type))
-                    {
-                        if (expandedObjects.ContainsKey(refChain))
-                        {
-                            if (GUILayout.Button("-", GUILayout.ExpandWidth(false)))
-                            {
-                                expandedObjects.Remove(refChain);
-                            }
-                        }
-                        else
-                        {
-                            if (GUILayout.Button("+", GUILayout.ExpandWidth(false)))
-                            {
-                                expandedObjects.Add(refChain, true);
-                            }
-                        }
-                    }
-
-                    GUI.contentColor = config.typeColor;
-
-                    GUILayout.Label(type.ToString() + " ");
-
-                    GUI.contentColor = config.nameColor;
-
-                    GUILayout.Label(String.Format("{0}.[{1}]", oldRefChain.LastItemName, count));
-
-                    GUI.contentColor = Color.white;
-
-                    GUILayout.Label(" = ");
-
-                    GUI.contentColor = config.valueColor;
-                    GUILayout.Label(value == null ? "null" : value.ToString());
-
-                    GUI.contentColor = Color.white;
-
-                    GUILayout.FlexibleSpace();
-                    GUILayout.EndHorizontal();
-
-                    if (TypeUtil.IsReflectableType(type) && expandedObjects.ContainsKey(refChain))
-                    {
-                        if (value is GameObject)
-                        {
-                            var go = value as GameObject;
-                            foreach (var component in go.GetComponents<Component>())
-                            {
-                                OnSceneTreeComponent(refChain, component);
-                            }
-                        }
-                        else if (value is Transform)
-                        {
-                            OnSceneTreeReflectUnityEngineTransform(refChain, (Transform)value);
-                        }
-                        else
-                        {
-                            OnSceneTreeReflect(refChain, value);
-                        }
-                    }
-
-                    count++;
-                    if (count > arrayEnd)
-                    {
-                        break;
-                    }
-                }
-            }
-            else
-            {
-                foreach (var value in enumerable)
-                {
-                    refChain = oldRefChain.Add(count);
-
-                    var type = value.GetType();
-
-                    GUILayout.BeginHorizontal();
-                    GUILayout.Space(treeIdentSpacing * refChain.Ident);
-
-                    GUI.contentColor = Color.white;
-
-                    if (TypeUtil.IsReflectableType(type) && !IsEnumerable(type))
-                    {
-                        if (expandedObjects.ContainsKey(refChain))
-                        {
-                            if (GUILayout.Button("-", GUILayout.ExpandWidth(false)))
-                            {
-                                expandedObjects.Remove(refChain);
-                            }
-                        }
-                        else
-                        {
-                            if (GUILayout.Button("+", GUILayout.ExpandWidth(false)))
-                            {
-                                expandedObjects.Add(refChain, true);
-                            }
-                        }
-                    }
-
-                    GUI.contentColor = config.typeColor;
-
-                    GUILayout.Label(type.ToString() + " ");
-
-                    GUI.contentColor = config.nameColor;
-
-                    GUILayout.Label(String.Format("{0}.[{1}]", oldRefChain.LastItemName, count));
-
-                    GUI.contentColor = Color.white;
-
-                    GUILayout.Label(" = ");
-
-                    GUI.contentColor = config.valueColor;
-
-                    GUILayout.Label(value == null ? "null" : value.ToString());
-
-                    GUI.contentColor = Color.white;
-
-                    GUILayout.FlexibleSpace();
-                    GUILayout.EndHorizontal();
-
-                    if (TypeUtil.IsReflectableType(type) && expandedObjects.ContainsKey(refChain))
-                    {
-                        if (value is GameObject)
-                        {
-                            var go = value as GameObject;
-                            foreach (var component in go.GetComponents<Component>())
-                            {
-                                OnSceneTreeComponent(refChain, component);
-                            }
-                        }
-                        else if (value is Transform)
-                        {
-                            OnSceneTreeReflectUnityEngineTransform(refChain, (Transform)value);
-                        }
-                        else
-                        {
-                            OnSceneTreeReflect(refChain, value);
-                        }
-                    }
-
-                    count++;
-                    if (count >= 1024)
-                    {
-                        OnSceneTreeMessage(refChain, "Array too large to display");
-                        break;
-                    }
+                if (TypeUtil.IsReflectableType(type) && expandedObjects.ContainsKey(refChain))
+                {
+                    if (value is GameObject)
+                    {
+                        var go = value as GameObject;
+                        foreach (var component in go.GetComponents<Component>())
+                        {
+                            OnSceneTreeComponent(refChain, component);
+                        }
+                    }
+                    else if (value is Transform)
+                    {
+                        OnSceneTreeReflectUnityEngineTransform(refChain, (Transform)value);
+                    }
+                    else
+                    {
+                        OnSceneTreeReflect(refChain, value);
+                    }
+                }
+
+                count++;
+                if (count >= 1024)
+                {
+                    OnSceneTreeMessage(refChain, "Array too large to display");
+                    break;
                 }
             }
         }
@@ -1138,6 +1308,18 @@
                 if (type == typeof(UnityEngine.Transform))
                 {
                     OnSceneTreeReflectUnityEngineTransform(refChain, (UnityEngine.Transform)obj);
+                    return;
+                }
+
+                if(IsList(obj))
+                {
+                    OnSceneTreeReflectIList(refChain, obj);
+                    return;
+                }
+
+                if(IsCollection(obj))
+                {
+                    OnSceneTreeReflectICollection(refChain, obj);
                     return;
                 }


AddedEndpoint Name

AddedEndpoint Name

--- samples/unobtrusive/Version_5/Client/Program.cs
+++ samples/unobtrusive/Version_5/Client/Program.cs
@@ -5,6 +5,8 @@
     public static void Main()
     {
         BusConfiguration busConfiguration = new BusConfiguration();
+
+        busConfiguration.EndpointName("Samples.Unobtrusive.Client");

         busConfiguration.EnableInstallers();
         busConfiguration.UsePersistence<InMemoryPersistence>();


Cleaned up priority queue stuff.

Cleaned up priority queue stuff.

--- DungeonRising/Schedule.cs
+++ DungeonRising/Schedule.cs
@@ -20,52 +20,35 @@
         }
         public int CompareTo(Turn other)
         {
-            return (this.Delay - other.Delay < 0.0) ? -1 : (this.Delay - other.Delay > 0.0) ? 1 : 0;
+            return (this.Delay - other.Delay < 0.0) ? -1 : (this.Delay - other.Delay > 0.0) ? 1 : (this.Actor.CompareTo(other.Actor));
         }
+
     }
+
+
     public class Schedule
     {
-        protected IntervalHeap<Turn> scheduled;
-        protected HashDictionary<string, ArrayList<IPriorityQueueHandle<Turn>>> lookups;
+        protected SortedArray<Turn> scheduled;
         public Schedule()
         {
-            scheduled = new IntervalHeap<Turn>(512);
-            lookups = new HashDictionary<string, ArrayList<IPriorityQueueHandle<Turn>>>();
+            scheduled = new SortedArray<Turn>(512);
         }
         public void AddTurn(string actor, double delay)
         {
             Turn t = new Turn(actor, delay);
             IPriorityQueueHandle<Turn> h = null;
-            scheduled.Add(ref h, t);
-            if(lookups.Contains(actor))
-            {
-                lookups[actor].Add(h);
-            }
-            else
-            {
-                lookups[actor] = new ArrayList<IPriorityQueueHandle<Turn>> { h };
-            }
+            scheduled.Add(t);
+
         }
         public Turn NextTurn()
         {
-            IPriorityQueueHandle<Turn> h = null;
-            Turn nxt = scheduled.DeleteMin(out h);
-            if(lookups.Contains(nxt.Actor))
+            Turn nxt = scheduled.DeleteMin();
+
+            foreach (Turn t in scheduled)
             {
-                lookups[nxt.Actor].Remove(h);
-                if(lookups[nxt.Actor].Count == 0)
-                {
-                    lookups.Remove(nxt.Actor);
-                }
+                t.Delay -= nxt.Delay;
             }
-            foreach (KeyValuePair<string, ArrayList<IPriorityQueueHandle<Turn>>> kv in lookups)
-            {
-                foreach(IPriorityQueueHandle<Turn> hand in kv.Value)
-                {
-                    scheduled[hand].Delay -= nxt.Delay;
-                }
-            }
-            //scheduled.UpdateAll(-(nxt.ActSpeed));
+
             return nxt;
         }
         public Turn PeekTurn()
@@ -74,13 +57,12 @@
         }
         public void CancelTurn(string cancelled)
         {
-            if(lookups.Contains(cancelled))
+            foreach (Turn t in scheduled)
             {
-                foreach(IPriorityQueueHandle<Turn> h in lookups[cancelled])
+                if (t.Actor == cancelled)
                 {
-                    scheduled.Delete(h);
+                    scheduled.Remove(t);
                 }
-                lookups.Remove(cancelled);
             }
         }
     }


Fixed double clicking the tray icon opens the wrong dialog.

git-svn-id: bf0bd98e94caaaf89d4dca54eab1bef459ce3438@314 59da171f-624f-0410-aa54-27559c288bec

--- Duplicati/GUI/MainForm.cs
+++ Duplicati/GUI/MainForm.cs
@@ -109,13 +109,13 @@

         private void TrayIcon_MouseDoubleClick(object sender, MouseEventArgs e)
         {
-            ShowWizard();
+            ShowStatus();
         }

         private void TrayIcon_MouseClick(object sender, MouseEventArgs e)
         {
             if (e.Button == MouseButtons.Left)
-                ShowWizard();
+                ShowStatus();
         }

         private void DelayDurationMenu_Click(object sender, EventArgs e)


2020 upgrade

2020 upgrade

--- Editor/StringsImporter.cs
+++ Editor/StringsImporter.cs
@@ -4,8 +4,9 @@
 using System.Linq;
 using System.Text;
 using UnityEditor;
+using UnityEditor.AssetImporters;
 using UnityEditor.Callbacks;
-using UnityEditor.Experimental.AssetImporters;
+

 namespace SpaceTrader.Util.EditorUtil {
     [ScriptedImporter(1, "ini")]
@@ -116,4 +117,4 @@
             ctx.AddObjectToAsset(Path.GetFileName(ctx.assetPath), strings);
         }
     }
-}+}


Implement ISerializationCallbackReceiver

--- EventsComponent/Events.cs
+++ EventsComponent/Events.cs
@@ -7,7 +7,7 @@
 namespace ATP.AnimationPathTools.EventsComponent {

     [RequireComponent(typeof (Animator))]
-    public class Events : MonoBehaviour {
+    public class Events : MonoBehaviour, ISerializationCallbackReceiver {
         #region FIELDS

         [SerializeField]
@@ -134,6 +134,7 @@
             if (Animator.PathData != null) {
                 UnsubscribeFromEvents();
                 SubscribeToEvents();
+                InitializeSlots();
             }
             else {
                 UnsubscribeFromEvents();
@@ -218,6 +219,15 @@
         }

         #endregion
+
+        // todo move to region
+        public void OnBeforeSerialize() {
+        }
+
+        public void OnAfterDeserialize() {
+            SubscribeToEvents();
+        }
+
     }

 }


Implement adding/removing slots

Implement adding/removing slots

--- EventsComponent/Events.cs
+++ EventsComponent/Events.cs
@@ -98,6 +98,7 @@

         private void Reset() {
             Animator = GetComponent<Animator>();
+            nodeEventSlots = new List<NodeEventSlot>();

             InitializeSlots();
             LoadRequiredResources();
@@ -106,16 +107,28 @@
         }

         private void InitializeSlots() {
-            // Instantiate slots list.
-            nodeEventSlots = new List<NodeEventSlot>();
             // Get number of nodes in the path.
             var nodesNo = Animator.PathData.NodesNo;

-            // For each path node..
-            for (int i = 0; i < nodesNo; i++) {
-                // Add empty slot.
+            // Calculate how many slots to add/remove.
+            var slotsDiff = NodeEventSlots.Count - nodesNo;
+
+            if (slotsDiff > 0) {
+                // Remove slots.
+                for (int i = 0; i < slotsDiff; i++) {
+                    NodeEventSlots.RemoveAt(NodeEventSlots.Count - 1);
+                }
+            }
+            else {
+                // Add slots
                 NodeEventSlots.Add(new NodeEventSlot());
             }
+
+            Utilities.Assert(
+                () => nodesNo == NodeEventSlots.Count,
+                string.Format("Number of nodes ({0}) in the path and event slots ({1}) differ.",
+                nodesNo,
+                NodeEventSlots.Count));
         }

         private void LoadRequiredResources() {
@@ -162,7 +175,7 @@
             }
             else {
                 UnsubscribeFromEvents();
-                NodeEventSlots.Clear();
+                //NodeEventSlots.Clear();
             }
         }


Update TTTags.cs

Update TTTags.cs

Added Apache License 2.0 notice

--- FIX_AutoFlatten/TTTags.cs
+++ FIX_AutoFlatten/TTTags.cs
@@ -1,3 +1,16 @@
+/**
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+**/

 using System;


Use a different finalizer registration function

--- runtime/GC.cs
+++ runtime/GC.cs
@@ -17,7 +17,7 @@
         private static extern GC_obj* GC_malloc(GC_size_t size);

         [#builtin_attribute(NoThrowAttribute)]
-        private static extern void GC_register_finalizer(
+        private static extern void GC_register_finalizer_ignore_self(
             GC_obj* obj,
             GC_finalization_proc* finalizer,
             GC_obj* finalizerContext,
@@ -58,9 +58,16 @@
             GC_obj* obj,
             GC_finalization_delegate finalizer)
         {
+            // TODO: maybe switch to 'GC_register_finalizer_no_order', which allows
+            // the GC to collect cyclic graphs of finalizable objects at the cost of
+            // allowing finalizers to access dangling pointers. This is what the
+            // reference implementation does, but maybe topological ordering is better.
+            // http://www.hboehm.info/gc/finalization.html makes an argument for the
+            // current finalization scheme.
+
             GC_finalization_proc* oldFinalizer;
             GC_obj* oldFinalizerContext;
-            GC_register_finalizer(
+            GC_register_finalizer_ignore_self(
                 obj,
                 LoadDelegateFunctionPointerInternal(RunFinalizer),
                 #builtin_ref_to_ptr(finalizer),


Minor code cleanup at firefoxexample

Minor code cleanup at firefoxexample

--- FirefoxExample/Program.cs
+++ FirefoxExample/Program.cs
@@ -1,59 +1,55 @@
 using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
+using System.Drawing.Imaging;
 using System.Net;
-using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Web.Script.Serialization;
+using WebWhatsappAPI;
 using WebWhatsappAPI.Firefox;
-

 namespace FirefoxExample
 {
-    class Program
+    internal class Program
     {
-        static FirefoxWApp driver;
-        static void Main(string[] args)
+        private static FirefoxWApp _driver;
+
+        private static void Main(string[] args)
         {
-            driver = new FirefoxWApp();
-            driver.StartDriver();
+            _driver = new FirefoxWApp();
+            _driver.StartDriver();

             //Wait till we are on the login page
-            while(!driver.OnLoginPage())
+            while(!_driver.OnLoginPage())
             {
                 Thread.Sleep(1000);
                 Console.WriteLine("Not on login page");
             }
-
-            //We are on the login page so wait for login(also save QR to file)
-            driver.GetQRImage().Save("QR.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); //Get QR code and save to file
-            int counter = 0;
-            while (driver.OnLoginPage())
+
+            while (_driver.GetQrImage() == null)
             {
-                Thread.Sleep(2000);
-                counter++;
-                if(counter > 15)
+                Thread.Sleep(1000);
+                try
                 {
-                    driver.GetQRImage().Save("QR.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); //QR probably updated so re-save
-                    counter = 0;
+                    _driver.GetQrImage().Save("QR.jpg", ImageFormat.Jpeg);
                 }
-                Console.WriteLine("Please login");
+                catch
+                {
+
+                }
             }

             Console.WriteLine("You have logged in");

             //IMPORTANT: Setup for the auto-replier(this.OnMsgRec)
-            driver.OnMsgRecieved += OnMsgRec;
-            Task.Run(driver.MessageScanner);
+            _driver.OnMsgRecieved += OnMsgRec;
+            Task.Run(_driver.MessageScanner);
             //IMPORTANT

             Console.WriteLine("Use CTRL+C to exit");
             while (true)
             {
                 //Check if phone is connected, because why not
-                if (!driver.IsPhoneConnected())
+                if (!_driver.IsPhoneConnected())
                 {
                     Console.WriteLine("Phone is not connected");
                 }
@@ -62,21 +58,20 @@
         }

         //Function which will recieve all messages
-        static void OnMsgRec(WebWhatsappAPI.BaseClass.MsgArgs arg)
+        private static void OnMsgRec(BaseClass.MsgArgs arg)
         {
             //show message with timestamp in console
-            Console.WriteLine(arg.Sender + " Wrote: " + arg.Msg + " at " + arg.TimeStamp.ToString());
+            Console.WriteLine(arg.Sender + " Wrote: " + arg.Msg + " at " + arg.TimeStamp);

-            JavaScriptSerializer ser = new JavaScriptSerializer();
-            using (WebClient wc = new WebClient())
+            var ser = new JavaScriptSerializer();
+            using (var wc = new WebClient())
             {
                 //Get random qoute from someone
                 var json = wc.DownloadString("https://random-quote-generator.herokuapp.com/api/quotes/random");
                 dynamic usr = ser.DeserializeObject(json);

                 //Send message to the origional Sender
-                driver.SendMessage(usr["quote"] + "\n -" + usr["author"], arg.Sender);
-                return;
+                _driver.SendMessage(usr["quote"] + "\n -" + usr["author"], arg.Sender);
             }

         }


Updated test data

Updated test data

--- source/WebHost/Areas/InitialConfiguration/TestData.cs
+++ source/WebHost/Areas/InitialConfiguration/TestData.cs
@@ -177,6 +177,7 @@
                         RequireConsent = true,
                         TokenLifetime = 60,
                         AllowRefreshToken = true,
+                        AllowRememberConsentDecision = true,
                         SigningKey = new SymmetricKey { Name="demo signing key", Value = Convert.FromBase64String("1fTiS2clmPTUlNcpwYzd5i4AEFJ2DEsd8TcUsllmaKQ=") }
                     };
                     db.Applications.Add(application);


added support for multiple -ItemPossition values - select more than one item

--- HL7Tools/SelectHL7Item.cs
+++ HL7Tools/SelectHL7Item.cs
@@ -13,8 +13,7 @@

 // TO DO: create help XML file https://msdn.microsoft.com/en-us/library/bb525433(v=vs.85).aspx

-namespace HL7Tools
-{
+namespace HL7Tools {
 	using System;
 	using System.Collections.Generic;
 	using System.IO;
@@ -24,14 +23,14 @@
 	// CmdLet: Select-HL7Item
 	// Returns a specific item from the message based on the location
 	[Cmdlet(VerbsCommon.Select, "HL7Item")]
-	public class SelectHL7Item : PSCmdlet
-	{
-		private string itemPosition;
+	public class SelectHL7Item : PSCmdlet {
+		private string[] itemPosition;
 		private string[] paths;
 		private bool expandWildcards = false;
 		private string[] filter = new string[] { };
 		private bool filterConditionsMet = true;
 		private string encoding = "UTF-8";
+		private bool abortProcessing = false;

 		// Parameter set for the -Path and -LiteralPath parameters. A parameter set ensures these options are mutually exclusive.
 		// A LiteralPath is used in situations where the filename actually contains wild card characters (eg File[1-10].txt) and you want
@@ -44,8 +43,7 @@
 		]
 		[Alias("PSPath", "Name", "Filename")]
 		[ValidateNotNullOrEmpty]
-		public string[] LiteralPath
-		{
+		public string[] LiteralPath {
 			get { return this.paths; }
 			set { this.paths = value; }
 		}
@@ -59,11 +57,9 @@

 		]
 		[ValidateNotNullOrEmpty]
-		public string[] Path
-		{
+		public string[] Path {
 			get { return this.paths; }
-			set
-			{
+			set {
 				this.expandWildcards = true;
 				this.paths = value;
 			}
@@ -76,8 +72,7 @@
 			HelpMessage = "Position of the item to return, e.g. PID-3.1"
 		)]
 		[Alias("Item")]
-		public string ItemPosition
-		{
+		public string[] ItemPosition {
 			get { return this.itemPosition; }
 			set { this.itemPosition = value; }
 		}
@@ -87,8 +82,7 @@
 			Mandatory = false,
 			Position = 2,
 			HelpMessage = "Filter on message contents")]
-		public string[] Filter
-		{
+		public string[] Filter {
 			get { return this.filter; }
 			set { this.filter = value; }
 		}
@@ -99,37 +93,50 @@
 			Position = 3,
 			HelpMessage = "Text encoding ('UTF-8' | 'ISO-8859-1'")]
 		[ValidateSet("UTF-8", "ISO-8859-1")]
-		public string Encoding
-		{
+		public string Encoding {
 			get { return this.encoding; }
 			set { this.encoding = value; }
 		}
+
+		/// <summary>
+		/// Powershell BeginProcessing
+		/// </summary>
+		protected override void BeginProcessing() {
+			base.BeginProcessing();
+
+			// confirm the item location parameter is valid before processing any files
+			foreach (string position in this.itemPosition) {
+				if (!Common.IsItemLocationValid(position)) {
+					ArgumentException ex = new ArgumentException(position + " does not appear to be a valid HL7 item possition");
+					ErrorRecord error = new ErrorRecord(ex, "InvalidElement", ErrorCategory.InvalidArgument, position);
+					this.WriteError(error);
+					abortProcessing = true;
+					return;
+				}
+			}
+
+			// confirm the filter parameter is valid before processing any files
+			foreach (string currentFilter in this.filter) {
+				// confirm each filter is formatted correctly
+				if (!Common.IsFilterValid(currentFilter)) {
+					ArgumentException ex = new ArgumentException(currentFilter + " does not appear to be a valid filter");
+					ErrorRecord error = new ErrorRecord(ex, "InvalidFilter", ErrorCategory.InvalidArgument, currentFilter);
+					this.WriteError(error);
+					abortProcessing = true;
+					return;
+				}
+			}
+		}
+

 		/// <summary>
 		/// get the HL7 item provided via the cmdlet parameter HL7ItemPosition
 		/// </summary>
-		protected override void ProcessRecord()
-		{
-			// confirm the item location parameter is valid before processing any files
-			if (!Common.IsHL7LocationStringValid(this.itemPosition))
-			{
-				ArgumentException ex = new ArgumentException(this.itemPosition + " does not appear to be a valid HL7 item");
-				ErrorRecord error = new ErrorRecord(ex, "InvalidElement", ErrorCategory.InvalidArgument, this.itemPosition);
-				this.WriteError(error);
+		protected override void ProcessRecord() {
+			base.ProcessRecord();
+
+			if (abortProcessing) {
 				return;
-			}
-
-			// confirm the filter parameter is valid before processing any files
-			foreach (string currentFilter in this.filter)
-			{
-				// confirm each filter is formatted correctly
-				if (!Common.IsFilterValid(currentFilter))
-				{
-					ArgumentException ex = new ArgumentException(currentFilter + " does not appear to be a valid filter");
-					ErrorRecord error = new ErrorRecord(ex, "InvalidFilter", ErrorCategory.InvalidArgument, currentFilter);
-					this.WriteError(error);
-					return;
-				}
 			}

 			// set the text encoding
@@ -137,8 +144,7 @@
 			WriteVerbose("Encoding: " + encoder.EncodingName);

 			// expand the file or directory information provided in the -Path or -LiteralPath parameters
-			foreach (string path in paths)
-			{
+			foreach (string path in paths) {
 				// This will hold information about the provider containing the items that this path string might resolve to.
 				ProviderInfo provider;

@@ -149,122 +155,112 @@
 				List<string> filePaths = new List<string>();

 				// if the path provided is a directory, expand the files in the directory and add these to the list.
-				if (Directory.Exists(path))
-				{
+				if (Directory.Exists(path)) {
 					filePaths.AddRange(Directory.GetFiles(path));
 				}

 				// not a directory, could be a wildcard or literal filepath
-				else
-				{
+				else {
 					// expand wildcards. This assumes if the user listed a directory it is literal
-					if (expandWildcards)
-					{
+					if (expandWildcards) {
 						// Turn *.txt into foo.txt,foo2.txt etc. If path is just "foo.txt," it will return unchanged. If the filepath expands into a directory ignore it.
-						foreach (string expandedFilePath in this.GetResolvedProviderPathFromPSPath(path, out provider))
-						{
-							if (!Directory.Exists(expandedFilePath))
-							{
+						foreach (string expandedFilePath in this.GetResolvedProviderPathFromPSPath(path, out provider)) {
+							if (!Directory.Exists(expandedFilePath)) {
 								filePaths.Add(expandedFilePath);
 							}
 						}
 					}
-					else
-					{
+					else {
 						// no wildcards, so don't try to expand any * or ? symbols.
 						filePaths.Add(this.SessionState.Path.GetUnresolvedProviderPathFromPSPath(path, out provider, out drive));
 					}
 					// ensure that this path (or set of paths after wildcard expansion)
 					// is on the filesystem. A wildcard can never expand to span multiple providers.
-					if (Common.IsFileSystemPath(provider, path) == false)
-					{
+					if (Common.IsFileSystemPath(provider, path) == false) {
 						// no, so skip to next path in paths.
 						continue;
 					}
 				}

 				// At this point, we have a list of paths on the filesystem, process each file.
-				foreach (string filePath in filePaths)
-				{
+				foreach (string filePath in filePaths) {
 					// If the file does not exist display an error and return.
-					if (!File.Exists(filePath))
-					{
+					if (!File.Exists(filePath)) {
 						FileNotFoundException fileException = new FileNotFoundException("File not found", filePath);
 						ErrorRecord fileNotFoundError = new ErrorRecord(fileException, "FileNotFound", ErrorCategory.ObjectNotFound, filePath);
 						WriteError(fileNotFoundError);
 						return;
 					}

-					// if the ItemPosition parameter is not in the correct format display an error and return
-					if (!Common.IsItemLocationValid(this.itemPosition))
-					{
-						ArgumentException argException = new ArgumentException("The -ItemPosition parameter does not appear to be in the correct format.", this.itemPosition);
-						ErrorRecord parameterError = new ErrorRecord(argException, "ParameterNotValid", ErrorCategory.InvalidArgument, this.itemPosition);
-						WriteError(parameterError);
-						return;
-					}
-
+					/*
+										// if the ItemPosition parameter is not in the correct format display an error and return
+										if (!Common.IsItemLocationValid(this.itemPosition))
+										{
+											ArgumentException argException = new ArgumentException("The -ItemPosition parameter does not appear to be in the correct format.", this.itemPosition);
+											ErrorRecord parameterError = new ErrorRecord(argException, "ParameterNotValid", ErrorCategory.InvalidArgument, this.itemPosition);
+											WriteError(parameterError);
+											return;
+										}
+					*/
 					// process the message
-					try
-					{
+					try {
 						// assume the filter is true, until a failed match is found
 						this.filterConditionsMet = true;
 						// load the file into a HL7Message object for processing
 						string fileContents = File.ReadAllText(filePath, encoder);
 						HL7Message message = new HL7Message(fileContents);
 						// if a filter was supplied, evaluate if the file matches the filter condition
-						if (this.filter != null)
-						{
+						if (this.filter != null) {
 							// check to see is all of the filter conditions are met (ie AND all filters supplied).
-							foreach (string currentFilter in this.filter)
-							{
+							foreach (string currentFilter in this.filter) {
 								bool anyItemMatch = false;
 								string filterItem = Common.GetFilterItem(currentFilter);
 								string filterValue = Common.GetFilterValue(currentFilter);
 								// for repeating fields, only one of the items returned has to match for the filter to be evaluated as true.
-								foreach (string itemValue in message.GetHL7ItemValue(filterItem))
-								{
+								foreach (string itemValue in message.GetHL7ItemValue(filterItem)) {
 									// convert both values to upper case for a case insentive match
-									if (itemValue.ToUpper() == filterValue.ToUpper())
-									{
+									if (itemValue.ToUpper() == filterValue.ToUpper()) {
 										anyItemMatch = true;
 									}
 								}
 								// if none of the repeating field items match, then fail the filter match for this file.
-								if (!anyItemMatch)
-								{
+								if (!anyItemMatch) {
 									this.filterConditionsMet = false;
 								}
 							}
 						}

 						// if the filter supplied matches this message (or no filter provided) then process the file to optain the HL7 item requested
-						if (filterConditionsMet)
-						{
-							string[] hl7Items = message.GetHL7ItemValue(itemPosition);
-							// if the hl7Items array is  empty, the item was not found in the message
-							if (hl7Items.Length == 0)
-							{
-								WriteWarning("Item " + this.itemPosition + " not found in the message " + filePath);
+						if (filterConditionsMet) {
+							// create a PSObject
+							PSObject result = new PSObject();
+							result.Properties.Add(new PSNoteProperty("FilePath", filePath));
+
+							foreach (string hl7ItemPossition in itemPosition) {
+								string[] hl7Items = message.GetHL7ItemValue(hl7ItemPossition);
+								// if the hl7Items array is  empty, the item was not found in the message
+								if (hl7Items.Length == 0) {
+									WriteWarning("Item " + hl7ItemPossition + " not found in the message " + filePath);
+									result.Properties.Add(new PSNoteProperty(hl7ItemPossition.ToString(), null));
+								}
+
+								//  items were returned, add properties to PSObject
+								else {
+									// if only a single value returned, save it as a string, not a string[]
+									if (hl7Items.Length == 1) {
+										result.Properties.Add(new PSNoteProperty(hl7ItemPossition.ToString(), hl7Items[0]));
+									}
+									else {
+										result.Properties.Add(new PSNoteProperty(hl7ItemPossition.ToString(), hl7Items));
+									}
+								}
 							}
-
-							//  items were returned
-							else
-							{
-								// create a PSObject, dynamically add propertynames based on the HL7 item(s) being returned
-								PSObject result = new PSObject();
-								result.Properties.Add(new PSNoteProperty("FilePath", filePath));
-								result.Properties.Add(new PSNoteProperty(this.itemPosition.ToString(), hl7Items));
-								//result.Properties.Add(new PSNoteProperty("OBX-3", hl7Items));
-
-								WriteObject(result);
-							}
+							WriteObject(result);
 						}
 					}

 					// if the file does not start with a MSH segment, the constructor will throw an exception.
-					catch (System.ArgumentException)
-					{
+					catch (System.ArgumentException) {
 						ArgumentException argException = new ArgumentException("The file does not appear to be a valid HL7 v2 message", filePath);
 						ErrorRecord invalidFileError = new ErrorRecord(argException, "FileNotValid", ErrorCategory.InvalidData, filePath);
 						WriteError(invalidFileError);


Remove exec on non-existent cursor.cs

Remove exec on non-existent cursor.cs

Remove exec on non-existent cursor.cs from App Core main.cs.

--- modules/AppCore/1/main.cs
+++ modules/AppCore/1/main.cs
@@ -26,7 +26,6 @@
     exec("./scripts/constants.cs");
     exec("./scripts/defaultPreferences.cs");
     exec("./scripts/canvas.cs");
-	exec("./scripts/cursor.cs");
     exec("./scripts/openal.cs");

     // Initialize the canvas


Messed up on call to board settings.

Messed up on call to board settings.

--- yafsrc/YetAnotherForum.NET/install/default.aspx.cs
+++ yafsrc/YetAnotherForum.NET/install/default.aspx.cs
@@ -55,7 +55,7 @@
 				if ( !IsInstalled )
 				{
 					// fake the board settings
-					YafContext.Current.BoardSettings = new YafBoardSettings( null );
+					YafContext.Current.BoardSettings = new YafBoardSettings();
 				}

 				TimeZones.DataSource = YafStaticData.TimeZones( "english.xml" );


Added LogTrace() to C# client lib.

Added LogTrace() to C# client lib.

--- src/Application/Client/CSharp/ScalienClient/Client.cs
+++ src/Application/Client/CSharp/ScalienClient/Client.cs
@@ -306,6 +306,15 @@
         }

         /// <summary>
+        /// Send a log message thru the unedrlying C++ client library.
+        /// </summary>
+        /// <param name="msg">The message.</param>
+        public static void LogTrace(string msg)
+        {
+            scaliendb_client.SDBP_LogTrace(msg);
+        }
+
+        /// <summary>
         /// The maximum time the client library will wait to complete operations, in miliseconds. Default 120 seconds.
         /// </summary>
         /// <param name="timeout">The global timeout in miliseconds.</param>


Fix bug with folder ignores

Fix bug with folder ignores

--- IgnoreSharp/IgnoreRule.cs
+++ IgnoreSharp/IgnoreRule.cs
@@ -40,6 +40,7 @@
             if (!pattern.Contains("/"))
             {
                 // If there are no path separators in the rule, treat asterisks the same way as double asterisks
+                // This handles wildcards for file extensions (e.g. *.txt)
                 pattern = Regex.Replace(pattern, @"\*+", ".*");
             }
             else
@@ -55,13 +56,18 @@

             pattern = Regex.Replace(pattern, @"\?", ".");

-            // Match start of line
-            pattern = "^" + pattern;
-
-            // If this is a directory ignore rule, we want to match anything which *starts* with the rule as well
-            // as literal matches, so only add the end of line token if this is a file rule
-            if(!directoryOnly)
+            // If this is a directory ignore rule, we want to match anything which *starts* with the rule (as well
+            // as literal matches), so only add the end of line token if this is a file rule
+            if (directoryOnly)
+            {
+                // Replace the final trailing slash with a rule that matches either that *or* the end of the path
+                pattern = pattern.Remove(pattern.Length - 1);
+                pattern = pattern + @"(?:/|$)";
+            }
+            else
+            {
                 pattern = pattern + "$";
+            }

             // TODO: Is this supposed to be case-sensitive?
             // Glob on Unix is case-sensitive, but running tests on Windows it seems that the casing of .gitignore rules makes no difference...


Updated to change the inheritance

Updated to change the inheritance

--- iOS/MaterialComponents/source/MaterialComponents/ApiDefinition.cs
+++ iOS/MaterialComponents/source/MaterialComponents/ApiDefinition.cs
@@ -1178,7 +1178,10 @@
         IntPtr Constructor(TypographySchemeDefaults defaults);
     }

-    [Protocol(Name = "MDCContainerScheming")]
+    [Protocol]
+    [Model(AutoGeneratedName = true)]
+    [BaseType(typeof(NSObject),
+        Name = "MDCContainerScheming")]
     interface ContainerScheming
     {
         [Abstract]
@@ -1197,7 +1200,7 @@

     [BaseType(typeof(NSObject),
         Name = "MDCContainerScheme")]
-    interface ContainerScheme : IContainerScheming
+    interface ContainerScheme : ContainerScheming

     {
         [Export("colorScheme", ArgumentSemantic.Assign)]


fix bug on ReadonlyFieldAnalyzer | getting semantic model would throw

This is probably a bug in Roslyn, as there is no TryGetSemanticModel
method, so we just ignore the tree when this happens

--- src/CSharp/CodeCracker/Usage/ReadonlyFieldAnalyzer.cs
+++ src/CSharp/CodeCracker/Usage/ReadonlyFieldAnalyzer.cs
@@ -46,7 +46,17 @@
             SyntaxNode root;
             if (!context.Tree.TryGetRoot(out root)) return;
             var types = GetTypesInRoot(root);
-            var semanticModel = compilation.GetSemanticModel(context.Tree);
+            SemanticModel semanticModel;
+            try
+            {
+                semanticModel = compilation.GetSemanticModel(context.Tree);
+            }
+#pragma warning disable CC0003
+            catch
+#pragma warning restore CC0003
+            {
+                return;
+            }
             foreach (var type in types)
             {
                 var fieldDeclarations = type.ChildNodes().OfType<FieldDeclarationSyntax>();


#295 Catel.Fody Fails to weave properties that are referenced across multiple projects

--- src/Catel.Fody/Extensions/CecilExtensions.assembly.cs
+++ src/Catel.Fody/Extensions/CecilExtensions.assembly.cs
@@ -38,8 +38,12 @@

         public static bool IsNetCoreLibrary(this AssemblyDefinition assemblyDefinition)
         {
+            if (IsNetStandardLibrary(assemblyDefinition))
+            {
+                return false;
+            }
+
             var mainModule = assemblyDefinition.MainModule;
-
             if (mainModule.Types.Count == 1)
             {
                 return true;


Removed old code

Removed old code

--- src/CodedExceptions/Configuration/AssemblyIdentity.cs
+++ src/CodedExceptions/Configuration/AssemblyIdentity.cs
@@ -228,17 +228,10 @@
 			return false;
 		}

-
-//#pragma warning disable IDE0079 // suppression is necessary
-//#pragma warning disable CS8602 // thisValue is guarded by NullCompare
-//#pragma warning disable CS8604 // thisValue is guarded by NullCompare
 		return NullCompare(Name, other.Name, (thisValue, otherValue) => string.Equals(thisValue, otherValue, StringComparison.OrdinalIgnoreCase))
 			&& NullCompare(Version, other.Version, (thisValue, otherValue) => thisValue!.Equals(otherValue)) &&
 			NullCompare(Culture, other.Culture, (thisValue, otherValue) => string.Equals(thisValue, otherValue, StringComparison.OrdinalIgnoreCase)) &&
 			NullCompare(_publicKeyToken, other._publicKeyToken, (thisValue, otherValue) => CompareKeyTokens(thisValue, otherValue));
-//#pragma warning restore CS8604
-//#pragma warning restore CS8602
-//#pragma warning restore IDE0079

 	}


Nullable: ThreadPool (dotnet/coreclr#23600)

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/Threading/ThreadPool.cs
+++ src/Common/src/CoreLib/System/Threading/ThreadPool.cs
@@ -11,13 +11,13 @@
 **
 =============================================================================*/

+#nullable enable
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
 using System.Diagnostics.Tracing;
 using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
 using System.Runtime.InteropServices;
 using System.Threading.Tasks;
 using Internal.Runtime.CompilerServices;
@@ -117,7 +117,7 @@
         internal sealed class WorkStealingQueue
         {
             private const int INITIAL_SIZE = 32;
-            internal volatile object[] m_array = new object[INITIAL_SIZE]; // SOS's ThreadPool command depends on this name
+            internal volatile object?[] m_array = new object[INITIAL_SIZE]; // SOS's ThreadPool command depends on this name
             private volatile int m_mask = INITIAL_SIZE - 1;

 #if DEBUG
@@ -189,7 +189,7 @@
                         if (count >= m_mask)
                         {
                             // We're full; expand the queue by doubling its size.
-                            var newArray = new object[m_array.Length << 1];
+                            var newArray = new object?[m_array.Length << 1];
                             for (int i = 0; i < m_array.Length; i++)
                                 newArray[i] = m_array[(i + head) & m_mask];

@@ -217,7 +217,7 @@
                 // Fast path: check the tail. If equal, we can skip the lock.
                 if (m_array[(m_tailIndex - 1) & m_mask] == obj)
                 {
-                    object unused = LocalPop();
+                    object? unused = LocalPop();
                     Debug.Assert(unused == null || unused == obj);
                     return unused != null;
                 }
@@ -268,10 +268,10 @@
                 return false;
             }

-            public object LocalPop() => m_headIndex < m_tailIndex ? LocalPopCore() : null;
+            public object? LocalPop() => m_headIndex < m_tailIndex ? LocalPopCore() : null;

             [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread safety")]
-            private object LocalPopCore()
+            private object? LocalPopCore()
             {
                 while (true)
                 {
@@ -289,7 +289,7 @@
                     if (m_headIndex <= tail)
                     {
                         int idx = tail & m_mask;
-                        object obj = Volatile.Read(ref m_array[idx]);
+                        object? obj = Volatile.Read(ref m_array[idx]);

                         // Check for nulls in the array.
                         if (obj == null) continue;
@@ -309,7 +309,7 @@
                             {
                                 // Element still available. Take it.
                                 int idx = tail & m_mask;
-                                object obj = Volatile.Read(ref m_array[idx]);
+                                object? obj = Volatile.Read(ref m_array[idx]);

                                 // Check for nulls in the array.
                                 if (obj == null) continue;
@@ -335,7 +335,7 @@

             public bool CanSteal => m_headIndex < m_tailIndex;

-            public object TrySteal(ref bool missedSteal)
+            public object? TrySteal(ref bool missedSteal)
             {
                 while (true)
                 {
@@ -354,7 +354,7 @@
                                 if (head < m_tailIndex)
                                 {
                                     int idx = head & m_mask;
-                                    object obj = Volatile.Read(ref m_array[idx]);
+                                    object? obj = Volatile.Read(ref m_array[idx]);

                                     // Check for nulls in the array.
                                     if (obj == null) continue;
@@ -457,7 +457,7 @@
             if (loggingEnabled)
                 System.Diagnostics.Tracing.FrameworkEventSource.Log.ThreadPoolEnqueueWorkObject(callback);

-            ThreadPoolWorkQueueThreadLocals tl = null;
+            ThreadPoolWorkQueueThreadLocals? tl = null;
             if (!forceGlobal)
                 tl = ThreadPoolWorkQueueThreadLocals.threadLocals;

@@ -479,10 +479,10 @@
             return tl != null && tl.workStealingQueue.LocalFindAndPop(callback);
         }

-        public object Dequeue(ThreadPoolWorkQueueThreadLocals tl, ref bool missedSteal)
+        public object? Dequeue(ThreadPoolWorkQueueThreadLocals tl, ref bool missedSteal)
         {
             WorkStealingQueue localWsq = tl.workStealingQueue;
-            object callback;
+            object? callback;

             if ((callback = localWsq.LocalPop()) == null && // first try the local queue
                 !workItems.TryDequeue(out callback)) // then try the global queue
@@ -546,7 +546,7 @@
             // false later, but only if we're absolutely certain that the queue is empty.
             //
             bool needAnotherThread = true;
-            object outerWorkItem = null;
+            object? outerWorkItem = null;
             try
             {
                 //
@@ -568,7 +568,7 @@
                 {
                     bool missedSteal = false;
                     // Use operate on workItem local to try block so it can be enregistered
-                    object workItem = outerWorkItem = workQueue.Dequeue(tl, ref missedSteal);
+                    object? workItem = outerWorkItem = workQueue.Dequeue(tl, ref missedSteal);

                     if (workItem == null)
                     {
@@ -715,7 +715,7 @@
             {
                 if (null != workQueue)
                 {
-                    object cb;
+                    object? cb;
                     while ((cb = workStealingQueue.LocalPop()) != null)
                     {
                         Debug.Assert(null != cb);
@@ -739,9 +739,9 @@
         }
     }

-    public delegate void WaitCallback(object state);
-
-    public delegate void WaitOrTimerCallback(object state, bool timedOut);  // signaled or timed out
+    public delegate void WaitCallback(object? state);
+
+    public delegate void WaitOrTimerCallback(object? state, bool timedOut);  // signaled or timed out

     internal abstract class QueueUserWorkItemCallbackBase : IThreadPoolWorkItem
     {
@@ -770,19 +770,20 @@

     internal sealed class QueueUserWorkItemCallback : QueueUserWorkItemCallbackBase
     {
-        private WaitCallback _callback; // SOS's ThreadPool command depends on this name
-        private readonly object _state;
+        private WaitCallback? _callback; // SOS's ThreadPool command depends on this name
+        private readonly object? _state;
         private readonly ExecutionContext _context;

         private static readonly Action<QueueUserWorkItemCallback> s_executionContextShim = quwi =>
         {
+            Debug.Assert(quwi._callback != null);
             WaitCallback callback = quwi._callback;
             quwi._callback = null;

             callback(quwi._state);
         };

-        internal QueueUserWorkItemCallback(WaitCallback callback, object state, ExecutionContext context)
+        internal QueueUserWorkItemCallback(WaitCallback callback, object? state, ExecutionContext context)
         {
             Debug.Assert(context != null);

@@ -801,7 +802,7 @@

     internal sealed class QueueUserWorkItemCallback<TState> : QueueUserWorkItemCallbackBase
     {
-        private Action<TState> _callback; // SOS's ThreadPool command depends on this name
+        private Action<TState>? _callback; // SOS's ThreadPool command depends on this name
         private readonly TState _state;
         private readonly ExecutionContext _context;

@@ -818,6 +819,7 @@
         {
             base.Execute();

+            Debug.Assert(_callback != null);
             Action<TState> callback = _callback;
             _callback = null;

@@ -827,10 +829,10 @@

     internal sealed class QueueUserWorkItemCallbackDefaultContext : QueueUserWorkItemCallbackBase
     {
-        private WaitCallback _callback; // SOS's ThreadPool command depends on this name
-        private readonly object _state;
-
-        internal QueueUserWorkItemCallbackDefaultContext(WaitCallback callback, object state)
+        private WaitCallback? _callback; // SOS's ThreadPool command depends on this name
+        private readonly object? _state;
+
+        internal QueueUserWorkItemCallbackDefaultContext(WaitCallback callback, object? state)
         {
             Debug.Assert(callback != null);

@@ -843,6 +845,7 @@
             ExecutionContext.CheckThreadPoolAndContextsAreDefault();
             base.Execute();

+            Debug.Assert(_callback != null);
             WaitCallback callback = _callback;
             _callback = null;

@@ -854,7 +857,7 @@

     internal sealed class QueueUserWorkItemCallbackDefaultContext<TState> : QueueUserWorkItemCallbackBase
     {
-        private Action<TState> _callback; // SOS's ThreadPool command depends on this name
+        private Action<TState>? _callback; // SOS's ThreadPool command depends on this name
         private readonly TState _state;

         internal QueueUserWorkItemCallbackDefaultContext(Action<TState> callback, TState state)
@@ -870,6 +873,7 @@
             ExecutionContext.CheckThreadPoolAndContextsAreDefault();
             base.Execute();

+            Debug.Assert(_callback != null);
             Action<TState> callback = _callback;
             _callback = null;

@@ -879,15 +883,15 @@
         }
     }

-    internal class _ThreadPoolWaitOrTimerCallback
+    internal sealed class _ThreadPoolWaitOrTimerCallback
     {
         private WaitOrTimerCallback _waitOrTimerCallback;
-        private ExecutionContext _executionContext;
-        private object _state;
+        private ExecutionContext? _executionContext;
+        private object? _state;
         private static readonly ContextCallback _ccbt = new ContextCallback(WaitOrTimerCallback_Context_t);
         private static readonly ContextCallback _ccbf = new ContextCallback(WaitOrTimerCallback_Context_f);

-        internal _ThreadPoolWaitOrTimerCallback(WaitOrTimerCallback waitOrTimerCallback, object state, bool flowExecutionContext)
+        internal _ThreadPoolWaitOrTimerCallback(WaitOrTimerCallback waitOrTimerCallback, object? state, bool flowExecutionContext)
         {
             _waitOrTimerCallback = waitOrTimerCallback;
             _state = state;
@@ -916,7 +920,7 @@
         {
             Debug.Assert(helper != null, "Null state passed to PerformWaitOrTimerCallback!");
             // call directly if it is an unsafe call OR EC flow is suppressed
-            ExecutionContext context = helper._executionContext;
+            ExecutionContext? context = helper._executionContext;
             if (context == null)
             {
                 WaitOrTimerCallback callback = helper._waitOrTimerCallback;
@@ -935,7 +939,7 @@
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
-             object state,
+             object? state,
              uint millisecondsTimeOutInterval,
              bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
              )
@@ -949,7 +953,7 @@
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
-             object state,
+             object? state,
              uint millisecondsTimeOutInterval,
              bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
              )
@@ -962,7 +966,7 @@
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
-             object state,
+             object? state,
              int millisecondsTimeOutInterval,
              bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
              )
@@ -975,7 +979,7 @@
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
-             object state,
+             object? state,
              int millisecondsTimeOutInterval,
              bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
              )
@@ -988,7 +992,7 @@
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
             WaitHandle waitObject,
             WaitOrTimerCallback callBack,
-            object state,
+            object? state,
             long millisecondsTimeOutInterval,
             bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
         )
@@ -1003,7 +1007,7 @@
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
             WaitHandle waitObject,
             WaitOrTimerCallback callBack,
-            object state,
+            object? state,
             long millisecondsTimeOutInterval,
             bool executeOnlyOnce    // NOTE: we do not allow other options that allow the callback to be queued as an APC
         )
@@ -1018,7 +1022,7 @@
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
                           WaitHandle waitObject,
                           WaitOrTimerCallback callBack,
-                          object state,
+                          object? state,
                           TimeSpan timeout,
                           bool executeOnlyOnce
                           )
@@ -1034,7 +1038,7 @@
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
                           WaitHandle waitObject,
                           WaitOrTimerCallback callBack,
-                          object state,
+                          object? state,
                           TimeSpan timeout,
                           bool executeOnlyOnce
                           )
@@ -1050,7 +1054,7 @@
         public static bool QueueUserWorkItem(WaitCallback callBack) =>
             QueueUserWorkItem(callBack, null);

-        public static bool QueueUserWorkItem(WaitCallback callBack, object state)
+        public static bool QueueUserWorkItem(WaitCallback callBack, object? state)
         {
             if (callBack == null)
             {
@@ -1062,8 +1066,8 @@
             ExecutionContext context = ExecutionContext.Capture();

             object tpcallBack = (context == null || context.IsDefault) ?
-                new QueueUserWorkItemCallbackDefaultContext(callBack, state) :
-                (object)new QueueUserWorkItemCallback(callBack, state, context);
+                new QueueUserWorkItemCallbackDefaultContext(callBack!, state) :
+                (object)new QueueUserWorkItemCallback(callBack!, state, context);

             ThreadPoolGlobals.workQueue.Enqueue(tpcallBack, forceGlobal: true);

@@ -1082,8 +1086,8 @@
             ExecutionContext context = ExecutionContext.Capture();

             object tpcallBack = (context == null || context.IsDefault) ?
-                new QueueUserWorkItemCallbackDefaultContext<TState>(callBack, state) :
-                (object)new QueueUserWorkItemCallback<TState>(callBack, state, context);
+                new QueueUserWorkItemCallbackDefaultContext<TState>(callBack!, state) :
+                (object)new QueueUserWorkItemCallback<TState>(callBack!, state, context);

             ThreadPoolGlobals.workQueue.Enqueue(tpcallBack, forceGlobal: !preferLocal);

@@ -1111,19 +1115,19 @@
                     ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.state);
                 }

-                UnsafeQueueUserWorkItemInternal((object)state, preferLocal);
+                UnsafeQueueUserWorkItemInternal((object)state!, preferLocal);
                 return true;
             }

             EnsureInitialized();

             ThreadPoolGlobals.workQueue.Enqueue(
-                new QueueUserWorkItemCallbackDefaultContext<TState>(callBack, state), forceGlobal: !preferLocal);
+                new QueueUserWorkItemCallbackDefaultContext<TState>(callBack!, state), forceGlobal: !preferLocal);

             return true;
         }

-        public static bool UnsafeQueueUserWorkItem(WaitCallback callBack, object state)
+        public static bool UnsafeQueueUserWorkItem(WaitCallback callBack, object? state)
         {
             if (callBack == null)
             {
@@ -1132,7 +1136,7 @@

             EnsureInitialized();

-            object tpcallBack = new QueueUserWorkItemCallbackDefaultContext(callBack, state);
+            object tpcallBack = new QueueUserWorkItemCallbackDefaultContext(callBack!, state);

             ThreadPoolGlobals.workQueue.Enqueue(tpcallBack, forceGlobal: true);

@@ -1152,7 +1156,7 @@
                 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.callBack);
             }

-            UnsafeQueueUserWorkItemInternal(callBack, preferLocal);
+            UnsafeQueueUserWorkItemInternal(callBack!, preferLocal);
             return true;
         }

@@ -1188,10 +1192,10 @@
             {
                 if (wsq != null && wsq.m_array != null)
                 {
-                    object[] items = wsq.m_array;
+                    object?[] items = wsq.m_array;
                     for (int i = 0; i < items.Length; i++)
                     {
-                        object item = items[i];
+                        object? item = items[i];
                         if (item != null)
                         {
                             yield return item;
@@ -1206,10 +1210,10 @@
             ThreadPoolWorkQueue.WorkStealingQueue wsq = ThreadPoolWorkQueueThreadLocals.threadLocals.workStealingQueue;
             if (wsq != null && wsq.m_array != null)
             {
-                object[] items = wsq.m_array;
+                object?[] items = wsq.m_array;
                 for (int i = 0; i < items.Length; i++)
                 {
-                    object item = items[i];
+                    object? item = items[i];
                     if (item != null)
                         yield return item;
                 }


Delete PropertyViewModel.cs

Delete PropertyViewModel.cs

[skip ci]

--- src/Core2D.vNext/ViewModels/Data/PropertyViewModel.cs
+++ src/Core2D.vNext/ViewModels/Data/PropertyViewModel.cs
@@ -1,64 +0,0 @@
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
-using System.Windows.Input;
-using Core2D.Model;
-
-namespace Core2D.ViewModels
-{
-    public sealed class PropertyViewModel : NodeViewModelBase<ShapeViewModel>
-    {
-        private CompositeDisposable Disposable { get; } = new CompositeDisposable();
-
-        public XProperty Property { get; }
-
-        public ICommand NewPropertyBeforeCommand { get; }
-
-        public ICommand NewPropertyAfterCommand { get; }
-
-        public ICommand RemovePropertyCommand { get; }
-
-        public ICommand CutPropertyCommand { get; }
-
-        public ICommand CopyPropertyCommand { get; }
-
-        public ICommand PastePropertyCommand { get; }
-
-        public PropertyViewModel(XProperty property, ShapeViewModel owner)
-        {
-            Owner = owner;
-
-            Property = property;
-
-            NewPropertyBeforeCommand = new ObservableCommand()
-                .OnExecuted(x => Owner.NewPropertyBefore(this), Disposable)
-                .AddTo(Disposable);
-
-            NewPropertyAfterCommand = new ObservableCommand()
-                .OnExecuted(x => Owner.NewPropertyAfter(this), Disposable)
-                .AddTo(Disposable);
-
-            RemovePropertyCommand = new ObservableCommand()
-                .OnExecuted(x => Owner.RemoveProperty(this), Disposable)
-                .AddTo(Disposable);
-
-            CutPropertyCommand = new ObservableCommand()
-                .OnExecuted(x => Owner.CutProperty(this), Disposable)
-                .AddTo(Disposable);
-
-            CopyPropertyCommand = new ObservableCommand()
-                .OnExecuted(x => Owner.CopyProperty(this), Disposable)
-                .AddTo(Disposable);
-
-            PastePropertyCommand = new ObservableCommand()
-                .AddPredicate(Clipboard.ObserveProperty(x => x.HasData, true))
-                .AddPredicate(Clipboard.ObserveProperty(x => x.DataType, true).Select(x => x == typeof(XProperty)))
-                .OnExecuted(x => Owner.PasteProperty(this), Disposable)
-                .AddTo(Disposable);
-        }
-
-        public override void Dispose()
-        {
-            Disposable?.Dispose();
-        }
-    }
-}


Changed string formatting

Changed string formatting

--- src/CryptoKnight.Server.Console/InputOutputHandler.cs
+++ src/CryptoKnight.Server.Console/InputOutputHandler.cs
@@ -28,7 +28,7 @@

         private void WritePrompt(string str)
         {
-            _output.Write(str + "> ");
+            _output.Write($"{str}> ");
         }
     }
 }


#18 * rewrote importing comparer

#18 * rewrote importing comparer

--- src/DbLocalizationProvider/Import/ResourceImporter.cs
+++ src/DbLocalizationProvider/Import/ResourceImporter.cs
@@ -92,27 +92,19 @@
                 var existing = existingResources.FirstOrDefault(r => r.ResourceKey == incomingResource.ResourceKey);
                 if(existing != null)
                 {
-                    var differentLanguages = new List<string>();
-                    // resource with this key exists already, double check translations
-                    foreach (var incomingTranslation in incomingResource.Translations)
-                    {
-                        if(!existing.Translations.Any(t => t.Language.Equals(incomingTranslation.Language) && t.Value.Equals(incomingTranslation.Value)))
+                    var comparer = new TranslationComparer();
+
+                    // if we use Except - we need to compare both directions
+                    var differences = existing.Translations.Except(incomingResource.Translations, comparer)
+                                              .Concat(incomingResource.Translations.Except(existing.Translations, comparer))
+                                              .ToList();
+
+                    // some of the translations are different - so marking this resource as potential update
+                    if(differences.Any())
+                        result.Add(new DetectedImportChange(ChangeType.Update, incomingResource, existing)
                         {
-                            differentLanguages.Add(incomingTranslation.Language);
-                        }
-                    }
-
-                    if(differentLanguages.Any())
-                    {
-                        // some of the translations are different - so marking this resource as potential update
-                        result.Add(new DetectedImportChange(ChangeType.Update, incomingResource, existing) { ChangedLanguages = differentLanguages });
-                    }
-
-                    //var areTranslationsSame = incomingResource.Translations.ScrambledEquals(existing.Translations, new TranslationComparer());
-                    //if(!areTranslationsSame)
-                    //{
-
-                    //}
+                            ChangedLanguages = differences.Select(t => t.Language).Distinct().ToList()
+                        });
                 }
                 else
                 {


XML comment fixed

XML comment fixed

--- src/DotVVM.Framework/Controls/CheckableControlBase.cs
+++ src/DotVVM.Framework/Controls/CheckableControlBase.cs
@@ -37,7 +37,7 @@

         /// <summary>
         /// Gets or sets the value that will be used as a result when the control is checked.
-        /// Use this property in combination with the CheckedValue or CheckedValues property.
+        /// Use this property in combination with the CheckedItem or CheckedItems property.
         /// </summary>
         public object CheckedValue
         {


Give up if the first record isn't a bof record.

--- src/ExcelDataReader/Core/BinaryFormat/XlsWorksheet.cs
+++ src/ExcelDataReader/Core/BinaryFormat/XlsWorksheet.cs
@@ -453,6 +453,8 @@
                 return;

             XlsBiffBOF bof = biffStream.Read() as XlsBiffBOF;
+            if (bof == null)
+                return;
             XlsBiffRecord rec = biffStream.Read();
             if (rec == null || rec is XlsBiffEof)
                 return;


Increases height buffer size when lines can't be clear anymore

--- src/FlubuCore/Infrastructure/Terminal/FlubuConsole.cs
+++ src/FlubuCore/Infrastructure/Terminal/FlubuConsole.cs
@@ -425,7 +425,7 @@

             if (lineToDelete >= Console.BufferHeight)
             {
-                Console.BufferHeight = Console.BufferHeight + 3;
+                Console.BufferHeight = Console.BufferHeight + 1000;
             }

             Console.CursorTop = lineToDelete;


fixed CTRL+C when startup check failed

fixed CTRL+C when startup check failed

--- src/GestionePrenotazioni.Host/Support/Bootstrapper.cs
+++ src/GestionePrenotazioni.Host/Support/Bootstrapper.cs
@@ -68,6 +68,9 @@
             while (StartupCheck() == false)
             {
                 _logger.InfoFormat("Some precondition to start the service are not met. Will retry in 3 seconds!");
+
+                if (isStopped)
+                    return;
                 Thread.Sleep(3000);
             }


Made naming even more consistent

Made naming even more consistent

--- src/GitHub.App/ViewModels/PullRequestListViewModel.cs
+++ src/GitHub.App/ViewModels/PullRequestListViewModel.cs
@@ -113,7 +113,7 @@
             CreatePullRequest.Subscribe(_ => DoCreatePullRequest());

             OpenPullRequestOnGitHub = ReactiveCommand.Create();
-            OpenPullRequestOnGitHub.Subscribe(x => DoOpenPROnGitHub((int)x));
+            OpenPullRequestOnGitHub.Subscribe(x => DoOpenPullRequestOnGitHub((int)x));

             constructing = false;
         }
@@ -344,7 +344,7 @@
             navigate.OnNext(d);
         }

-        void DoOpenPROnGitHub(int pullRequest)
+        void DoOpenPullRequestOnGitHub(int pullRequest)
         {
             var repoUrl = SelectedRepository.CloneUrl.ToRepositoryUrl();
             var url = repoUrl.Append("pull/" + pullRequest);


SlideImage: 右にスライドを作成

SlideImage: 右にスライドを作成

--- ImageSlider/SlideImage.cs
+++ ImageSlider/SlideImage.cs
@@ -65,7 +65,8 @@
         public enum ImageSlideMode
         {
             Normal,
-            Slide,
+            Slide_Right,
+            Slide_Left,
         }

         /// <summary>
@@ -124,7 +125,7 @@
             // 強制的に描画する画像がある場合
             if (ForceImage != null)
             {
-                g.DrawImageUnscaled(ForceImage, getImageDrawRect(ForceImage, 0, 0));
+                g.DrawImage(ForceImage, getImageDrawRect(ForceImage, 0, 0));
             }

             // 画像データが無かったらリターン
@@ -135,13 +136,38 @@
             int no2 = (int)rate + 1;

             // 描画
-            if (slideMode == ImageSlideMode.Normal)         // 通常切り替え
-            {
-
-            }
-
+            if (slideMode == ImageSlideMode.Normal)                 // 通常切り替え
+            {
+                if (no1 < 0 || no1 >= imageDatas.Length) return;
+                var image = imageDatas[no1].Bitmap;
+                g.DrawImage(image, getImageDrawRect(image, 0, 0));
+            }
+            else if (slideMode == ImageSlideMode.Slide_Right)       // 右にスライド
+            {
+                float r = rate - no1;
+                if (no1 >= 0 && no1 < imageDatas.Length)
+                {
+                    var image1 = imageDatas[no1].Bitmap;
+                    int px1 = (int)(Width * r);
+                    g.SetClip(new Rectangle(px1, 0, Width, Height));
+                    g.DrawImage(image1, getImageDrawRect(image1, px1, 0));
+
+                    if (no2 == imageDatas.Length) no2 = 0;
+                    var image2 = imageDatas[no2].Bitmap;
+                    var px2 = px1 - Width;
+                    g.SetClip(new Rectangle(px2, 0, Width, Height));
+                    g.DrawImage(image2, getImageDrawRect(image2, px2, 0));
+                }
+            }
         }

+        /// <summary>
+        /// 画像の描画領域を取得する
+        /// </summary>
+        /// <param name="image"></param>
+        /// <param name="x"></param>
+        /// <param name="y"></param>
+        /// <returns></returns>
         Rectangle getImageDrawRect(Image image, int x, int y)
         {
             if (sizeMode == ImageSizeMode.Normal)           // 通常


Changed the Interception test calculation

Moved Interception test into MeasureResolvePerformance(,). Changed the
approach to measure time in order it would be alike and its result was
higher

--- IocPerformance/Program.cs
+++ IocPerformance/Program.cs
@@ -70,11 +70,6 @@

             MeasureResolvePerformance(container, result);

-            if (container.SupportsInterception)
-            {
-                result.InterceptionTime = MeasureProxy(container);
-            }
-
             CheckInstanceProperties(container);

             container.Dispose();
@@ -145,6 +140,7 @@
             var multipleWatch = new Stopwatch();
             var propertyWatch = new Stopwatch();
             var childContainerWatch = new Stopwatch();
+            var interceptionTimeWatch = new Stopwatch();

             for (int i = 0; i < LoopCount; i++)
             {
@@ -208,6 +204,16 @@

                     childContainerWatch.Stop();
                 }
+
+                if(container.SupportsInterception)
+                {
+                    interceptionTimeWatch.Start();
+                    var result = (ICalculator)container.ResolveProxy(typeof(ICalculator));
+
+                    // Call method because part of the time spent with a proxy is how long does it take to execute a proxied method
+                    result.Add(5, 10);
+                    interceptionTimeWatch.Stop();
+                }
             }

             outputResult.SingletonTime = singletonWatch.ElapsedMilliseconds;
@@ -239,21 +245,11 @@
             {
                 outputResult.ChildContainerTime = childContainerWatch.ElapsedMilliseconds * (LoopCount / ChildContainerLoopCount);
             }
-        }
-
-        private static long MeasureProxy(IContainerAdapter container)
-        {
-            var watch = Stopwatch.StartNew();
-
-            for (int i = 0; i < LoopCount; i++)
-            {
-                var result = (ICalculator)container.ResolveProxy(typeof(ICalculator));
-
-                // Call method because part of the time spent with a proxy is how long does it take to execute a proxied method
-                result.Add(5, 10);
-            }
-
-            return watch.ElapsedMilliseconds;
+
+            if (container.SupportsInterception)
+            {
+                outputResult.InterceptionTime = interceptionTimeWatch.ElapsedMilliseconds;
+            }
         }

         private static void CollectMemory()


ExcludedProperties - Use HashSet instead of List

--- src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
+++ src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
@@ -14,7 +14,7 @@
     public class ElasticSearchTarget : TargetWithLayout, IElasticSearchTarget
     {
         private IElasticLowLevelClient _client;
-        private List<string> _excludedProperties = new List<string>(new[] { "CallerMemberName", "CallerFilePath", "CallerLineNumber", "MachineName", "ThreadId" });
+        private HashSet<string> _excludedProperties = new HashSet<string>(new[] { "CallerMemberName", "CallerFilePath", "CallerLineNumber", "MachineName", "ThreadId" });
         private readonly JsonSerializerSettings _jsonSerializerSettings = CreateJsonSerializerSettings();

         static JsonSerializerSettings CreateJsonSerializerSettings()
@@ -149,7 +149,7 @@
             _client = new ElasticLowLevelClient(config);

             if (!string.IsNullOrEmpty(ExcludedProperties))
-                _excludedProperties = ExcludedProperties.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
+                _excludedProperties = new HashSet<string>(ExcludedProperties.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
         }

         protected override void Write(AsyncLogEventInfo logEvent)


[Fixes #6783] Workaround for PostgreSQL without breaking SQL server

--- src/Orchard/Data/Migration/AutomaticDataMigrations.cs
+++ src/Orchard/Data/Migration/AutomaticDataMigrations.cs
@@ -85,9 +85,16 @@
             var schemaBuilder = new SchemaBuilder(_dataMigrationInterpreter);
             var distributedLockSchemaBuilder = new DistributedLockSchemaBuilder(_shellSettings, schemaBuilder);
             if (!distributedLockSchemaBuilder.SchemaExists()) {
+
                 // Workaround to avoid some Transaction issue for PostgreSQL.
+                if (_shellSettings.DataProvider.Equals("PostgreSql", StringComparison.OrdinalIgnoreCase)) {
+                    _transactionManager.RequireNew();
+                    distributedLockSchemaBuilder.CreateSchema();
+                    return;
+                }
+
+                distributedLockSchemaBuilder.CreateSchema();
                 _transactionManager.RequireNew();
-                distributedLockSchemaBuilder.CreateSchema();
             }
         }
     }


Updated trip controller to list valid bookings for a trip by trip reference.

--- src/Pegasus/Pegasus.Web/Controllers/TripController.cs
+++ src/Pegasus/Pegasus.Web/Controllers/TripController.cs
@@ -78,16 +78,16 @@
             }
         }

-        // GET api/trip/getTripDetails?tripReference={tripReference}
+        // GET api/trip/getTripDetails?tripRef={tripRef}
         [HttpGet]
-        public async Task<IActionResult> GetTripDetails([FromQuery]string tripReference)
-        {
-            try
-            {
-                var trip = await _tripRepository.GetByTripReferenceAsync(tripReference);
+        public async Task<IActionResult> GetTripDetails([FromQuery]string tripRef)
+        {
+            try
+            {
+                var trip = await _tripRepository.GetByTripReferenceAsync(tripRef);
                 if (trip == null)
                 {
-                    return NotFound(tripReference);
+                    return NotFound(tripRef);
                 }

                 var tripResponse = new TripResponseModel
@@ -126,6 +126,72 @@
             }
         }

+        // GET api/trip/getTripBookings?tripRef={tripRef}
+        [HttpGet]
+        public async Task<IActionResult> GetTripBookings([FromQuery]string tripRef)
+        {
+            try
+            {
+                var trip = await this._tripRepository.GetByTripReferenceAsync(tripRef);
+                if (trip == null)
+                {
+                    _logger.LogError("Trip not found for {0} - {1}", nameof(tripRef), tripRef);
+                    return NotFound(tripRef);
+                }
+
+                var bookings = await this._bookingRepository.GetByTripReferenceAsync(tripRef);
+                if (bookings?.Count() == 0)
+                {
+                    _logger.LogError("Booking not found for {0} - {1}", nameof(tripRef), tripRef);
+                    return NotFound();
+                }
+
+                var bookingResponse = bookings
+                    .Where(b => b.Status != BookingStatus.Cancelled)
+                    .Select(booking =>
+                {
+                    // Retrieve seat information for this booking from trip
+                    var bookedSeats = new List<Seat>();
+                    foreach (var seat in booking.BookedSeats)
+                    {
+                        var tripSeat = trip.Seats.FirstOrDefault(s => s.SeatNumber == seat);
+                        if (tripSeat != null)
+                        {
+                            bookedSeats.Add(tripSeat);
+                        }
+                    }
+
+                    return new BookingResponseModel
+                    {
+                        BookingReference = booking.BookingReference,
+                        BookingStatus = booking.Status.ToString(),
+                        FromCity = trip.Details.FromCity,
+                        ToCity = trip.Details.ToCity,
+                        DepartureTime = trip.Details.DepartureTime,
+                        ArrivalTime = trip.Details.ArrivalTime,
+                        BookedSeats = bookedSeats.Select(s => new BookingResponseModel.Seat
+                        {
+                            SeatNumber = s.SeatNumber,
+                            SeatPosition = s.Position.ToString()
+                        }),
+                        VehicleDetails = new BookingResponseModel.Vehicle
+                        {
+                            TrafficServiceProvider = trip.Tsp,
+                            VehicleNumber = trip.Vin,
+                            VehicleName = trip.VehicleName
+                        }
+                    };
+                });
+
+                return Ok(bookingResponse);
+            }
+            catch (Exception ex)
+            {
+                _logger.LogError("{0}", ex);
+                throw;
+            }
+        }
+
         // POST api/trip/add
         [HttpPost]
         public async Task<IActionResult> Add([FromBody]TripRequestModel tripRequest)


Changed method invocation type transform to use the target-type for the vhdl target (previously used the source-type)

--- src/SME.VHDL/Transformations/InjectTypeConversions.cs
+++ src/SME.VHDL/Transformations/InjectTypeConversions.cs
@@ -230,12 +230,15 @@
 			else if (el is AST.InvocationExpression)
 			{
 				var ie = el as AST.InvocationExpression;
+                var method = (AST.Method)ie.Target;
 				var changed = false;
-				foreach (var a in ie.ArgumentExpressions)
-				{
+
+                for (var i = 0; i < ie.ArgumentExpressions.Length; i++)
+				{
+                    var a = ie.ArgumentExpressions[i];
 					if (a is AST.PrimitiveExpression)
 					{
-						var tvhdl = State.TypeScope.GetVHDLType(a.SourceResultType);
+                        var tvhdl = State.TypeScope.GetVHDLType(method.Parameters[i].CecilType);
 						changed |= VHDLTypeConversion.ConvertExpression(State, Method, a, tvhdl, a.SourceResultType, false) != a;
 					}
 				}


fix Duplicate schemaIds detected for types

close #152

--- src/Server/Bit.WebApi/Extensions/OpenApiExtensions.cs
+++ src/Server/Bit.WebApi/Extensions/OpenApiExtensions.cs
@@ -28,6 +28,7 @@
             doc.OperationFilter<SwaggerDefaultValuesOperationFilter>();
             doc.OperationFilter<ExamplesOperationFilter>();
             doc.OperationFilter<DescriptionOperationFilter>();
+            doc.UseFullTypeNameInSchemaIds();

             doc.OAuth2("oauth2")
                 .Flow("password")


Allow closing tabs with middle-click. Fixes https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/148

--- src/StructuredLogViewer/Controls/DocumentWell.xaml.cs
+++ src/StructuredLogViewer/Controls/DocumentWell.xaml.cs
@@ -7,6 +7,7 @@
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
+using System.Windows.Input;

 namespace StructuredLogViewer.Controls
 {
@@ -20,6 +21,19 @@
             tabControl.ItemsSource = Tabs;
             tabsView = CollectionViewSource.GetDefaultView(Tabs);
             Tabs.CollectionChanged += Tabs_CollectionChanged;
+
+            var style = new Style();
+            style.Setters.Add(new EventSetter(MouseDownEvent, (MouseButtonEventHandler)OnMouseDownEvent));
+
+            tabControl.ItemContainerStyle = style;
+        }
+
+        private void OnMouseDownEvent(object sender, MouseButtonEventArgs args)
+        {
+            if (args.MiddleButton == MouseButtonState.Pressed && sender is SourceFileTab sourceFileTab)
+            {
+                Tabs.Remove(sourceFileTab);
+            }
         }

         private void Tabs_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)