surpress exceptions by default. kinda like a one shot...

--- Impromptu/Threading.cs
+++ Impromptu/Threading.cs
@@ -1,18 +1,29 @@
 using System;
 using System.Threading;
+using System.Diagnostics;

 namespace Impromptu
 {
     public static class Threading
     {
-        public static bool TryExecute(TimeSpan timeout, Action action, bool abort = true)
+        public static bool TryExecute(TimeSpan timeout, Action action, bool abort = true, bool surpressExceptions = true)
         {
-            var thread = new Thread(() => action());
-            thread.Start();
-            var completed = thread.Join(timeout);
-            if(!completed && abort)
-                thread.Abort();
-            return completed;
+            try
+            {
+                var thread = new Thread(() => action());
+                thread.Start();
+                var completed = thread.Join(timeout);
+                if(!completed && abort)
+                    thread.Abort();
+                return completed;
+            }
+            catch(Exception ex)
+            {
+                Trace.WriteLine(ex);
+                if(!surpressExceptions)
+                    throw;
+            }
+            return false;
         }
     }
 }


Removed attempt at setting content-length header as causing exception.

--- src/GitVersionCore/BuildServers/AppVeyor.cs
+++ src/GitVersionCore/BuildServers/AppVeyor.cs
@@ -39,9 +39,9 @@
             {
                 request.Headers = new WebHeaderCollection();
             }
+
             var bytesLength = bytes.Length;
-            request.Headers["Content-Length"] = bytesLength.ToString();
-
+            //request.Headers["Content-Length"] = bytesLength.ToString();
             // request.ContentLength = bytes.Length;
             request.ContentType = "application/json";


Fix minor indendation issue

Fix minor indendation issue

--- BeardedManStudios/Source/Forge/Networking/Objects/NetworkObject.cs
+++ BeardedManStudios/Source/Forge/Networking/Objects/NetworkObject.cs
@@ -445,9 +445,9 @@

                 // Send the message back to the sending client so that it can finish setting up the network object
 #if STEAMWORKS
-                    if (networker is SteamP2PServer)
-                        ((SteamP2PServer)networker).Send(frame.Sender, createObject, true);
-                    else if (networker is UDPServer)
+                if (networker is SteamP2PServer)
+                    ((SteamP2PServer)networker).Send(frame.Sender, createObject, true);
+                else if (networker is UDPServer)
 #else
                 if (networker is UDPServer)
 #endif


NonWOW64Registry: work in progress

NonWOW64Registry: work in progress

--- src/Kirkin.Experimental/NonWOW64Registry.cs
+++ src/Kirkin.Experimental/NonWOW64Registry.cs
@@ -5,7 +5,7 @@
 namespace Kirkin
 {
     /// <summary>
-    /// Registry access proxy which does not use WOW6432Node even if running in a 32-bit process.
+    /// Registry proxy which does not use WOW6432Node even if running in a 32-bit process.
     /// </summary>
     public static class NonWOW64Registry
     {
@@ -14,6 +14,19 @@
         private static RegistryKey _currentUser;
         private static RegistryKey _localMachine;

+        private static RegistryView RegistryView
+        {
+            get
+            {
+                return Environment.Is64BitOperatingSystem
+                    ? RegistryView.Registry64
+                    : RegistryView.Default;
+            }
+        }
+
+        /// <summary>
+        /// HKEY_CURRENT_USER base key.
+        /// </summary>
         public static RegistryKey CurrentUser
         {
             get
@@ -22,14 +35,8 @@
                 {
                     lock (_lock)
                     {
-                        if (_currentUser == null)
-                        {
-                            RegistryView view = RegistryView.Default;
-
-                            if (Environment.Is64BitOperatingSystem)
-                                view = RegistryView.Registry64;// Force non-WOW6432Node access even if running as x86.
-
-                            _currentUser = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, view);
+                        if (_currentUser == null) {
+                            _currentUser = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView);
                         }
                     }
                 }
@@ -38,6 +45,9 @@
             }
         }

+        // <summary>
+        /// HKEY_LOCAL_MACHINE base key.
+        /// </summary>
         public static RegistryKey LocalMachine
         {
             get
@@ -46,14 +56,8 @@
                 {
                     lock (_lock)
                     {
-                        if (_localMachine == null)
-                        {
-                            RegistryView view = RegistryView.Default;
-
-                            if (Environment.Is64BitOperatingSystem)
-                                view = RegistryView.Registry64;// Force non-WOW6432Node access even if running as x86.
-
-                            _localMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, view);
+                        if (_localMachine == null) {
+                            _localMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView);
                         }
                     }
                 }
@@ -62,11 +66,14 @@
             }
         }

+        /// <summary>
+        /// Gets a value from a registry key.
+        /// </summary>
         public static object GetValue(string keyName, string valueName, object defaultValue)
         {
-            string hiveName = HiveNameFromFullPath(keyName);
+            SplitPath(keyName, out string hiveName, out string subKeyName);
+
             RegistryKey baseKey = BaseKeyFromHive(GetRegistryHive(hiveName));
-            string subKeyName = SubKeyNameFromFullPath(keyName);

             using (RegistryKey key = baseKey.OpenSubKey(subKeyName, writable: false))
             {
@@ -76,26 +83,38 @@
             }
         }

+        /// <summary>
+        /// Writes a value to a registry key.
+        /// </summary>
+        public static void SetValue(string keyName, string valueName, object value)
+        {
+            SetValue(keyName, valueName, value, RegistryValueKind.Unknown);
+        }
+
+        /// <summary>
+        /// Writes a value to a registry key.
+        /// </summary>
         public static void SetValue(string keyName, string valueName, object value, RegistryValueKind valueKind)
         {
-            string hiveName = HiveNameFromFullPath(keyName);
+            SplitPath(keyName, out string hiveName, out string subKeyName);
+
             RegistryKey baseKey = BaseKeyFromHive(GetRegistryHive(hiveName));
-            string subKeyName = SubKeyNameFromFullPath(keyName);
-            RegistryKey key = null;

-            try
-            {
-                key = baseKey.OpenSubKey(subKeyName, writable: true);
-
-                if (key == null)
-                    key = baseKey.CreateSubKey(subKeyName);
-
+            using (RegistryKey key = baseKey.OpenSubKey(subKeyName, writable: true) ?? baseKey.CreateSubKey(subKeyName)) {
                 key.SetValue(valueName, value);
             }
-            finally
-            {
-                key?.Dispose();
+        }
+
+        private static void SplitPath(string registryPath, out string hiveName, out string subKeyName)
+        {
+            int firstDelimiterIndex = registryPath.IndexOf('\\');
+
+            if (firstDelimiterIndex == -1) {
+                throw new FormatException("Malformed registry path.");
             }
+
+            hiveName = registryPath.Substring(0, firstDelimiterIndex);
+            subKeyName = registryPath.Substring(firstDelimiterIndex + 1);
         }

         private static RegistryKey BaseKeyFromHive(RegistryHive hive)
@@ -104,28 +123,6 @@
             if (hive == RegistryHive.CurrentUser) return CurrentUser;

             throw new ArgumentException($"Unhandled registry hive: '{hive}'.");
-        }
-
-        private static string HiveNameFromFullPath(string registryPath)
-        {
-            int firstDelimiterIndex = registryPath.IndexOf('\\');
-
-            if (firstDelimiterIndex == -1) {
-                throw new FormatException("Malformed registry path.");
-            }
-
-            return registryPath.Substring(0, firstDelimiterIndex);
-        }
-
-        private static string SubKeyNameFromFullPath(string registryPath)
-        {
-            int firstDelimiterIndex = registryPath.IndexOf('\\');
-
-            if (firstDelimiterIndex == -1) {
-                throw new FormatException("Malformed registry path.");
-            }
-
-            return registryPath.Substring(firstDelimiterIndex + 1);
         }

         private static RegistryHive GetRegistryHive(string name)


Fixing broken threaded session test.

Fixing broken threaded session test.

--- Bumblebee.IntegrationTests/Bumblebee/Setup/ThreadedSessionTests.cs
+++ Bumblebee.IntegrationTests/Bumblebee/Setup/ThreadedSessionTests.cs
@@ -82,23 +82,22 @@
         }

         [Test]
-        public void given_different_thread_and_same_driver_envrionments_when_comparing_should_not_be_equal()
+        public void given_different_thread_and_same_driver_environments_when_comparing_should_not_be_equal()
         {
             var sessions = new ConcurrentDictionary<Guid, Session>();

-            var tasks = Enumerable.Repeat(0, 2)
-                .Select(x => Guid.NewGuid())
-                .Select(x => Task.Run(() =>
-                {
-                    var session = Threaded<Session>
-                        .With<PhantomJS>();
-                    sessions.TryAdd(Guid.NewGuid(), session);
-                }));
+            Action action = () =>
+            {
+                var session = Threaded<Session>
+                    .With<PhantomJS>();
+                sessions.TryAdd(Guid.NewGuid(), session);
+            };
+
+            var tasks = Enumerable
+                .Repeat(0, 2)
+                .Select(x => Task.Run(action));

-            foreach (var task in tasks)
-            {
-                task.Wait();
-            }
+            Task.WaitAll(tasks.ToArray());

             var session1 = sessions.ToArray()[0].Value;
             var session2 = sessions.ToArray()[1].Value;


Revert "CommandDefinition: show parameters as optional"

This reverts commit 4346d3be31f854a5df9f46b295713c16feb96871.

--- src/Kirkin/CommandLine/CommandDefinition.cs
+++ src/Kirkin/CommandLine/CommandDefinition.cs
@@ -269,9 +269,8 @@

             if (Parameter != null)
             {
-                sb.Append(" [");
+                sb.Append(' ');
                 sb.Append(Parameter);
-                sb.Append(']');
             }

             foreach (ICommandParameter option in Options)


add IsNumericType

add IsNumericType

--- Common/ServiceStack.Text/ServiceStack.Text/ReflectionExtensions.cs
+++ Common/ServiceStack.Text/ServiceStack.Text/ReflectionExtensions.cs
@@ -82,6 +82,35 @@
 				return interfaces[0];

 			return null;
+		}
+
+		public static bool IsNumericType(this Type type)
+		{
+			if (!type.IsValueType) return false;
+			return type.IsIntegerType() || type.IsRealNumberType();
+		}
+
+		public static bool IsIntegerType(this Type type)
+		{
+			if (!type.IsValueType) return false;
+			var underlyingType = Nullable.GetUnderlyingType(type);
+			return underlyingType == typeof (byte)
+		       || underlyingType == typeof (sbyte)
+		       || underlyingType == typeof (short)
+		       || underlyingType == typeof (ushort)
+		       || underlyingType == typeof (int)
+		       || underlyingType == typeof (uint)
+		       || underlyingType == typeof (long)
+		       || underlyingType == typeof (ulong);
+		}
+
+		public static bool IsRealNumberType(this Type type)
+		{
+			if (!type.IsValueType) return false;
+			var underlyingType = Nullable.GetUnderlyingType(type);
+			return underlyingType == typeof(float)
+			   || underlyingType == typeof(double)
+			   || underlyingType == typeof(decimal);
 		}

 		public static Type GetTypeWithGenericInterfaceOf(this Type type, Type genericInterfaceType)


Fixed a bug where DATE-TIME properties that were forced to UTC may still exhibit VALUE=DATE;

--- DDay.iCal/Serialization/iCalendar/DataTypes/Date_TimeSerializer.cs
+++ DDay.iCal/Serialization/iCalendar/DataTypes/Date_TimeSerializer.cs
@@ -79,6 +79,11 @@
                         else if (dt.Types.Contains(valueType))
                             valueType = InvertType(valueType);
                     }
+                    else if (obj is ForceUTCAttribute)
+                    {
+                        valueType = "DATE-TIME";
+                        break;
+                    }
                 }

                 // Check to see if the value type is the default value type for this item


Fix ComposeUp usage in DockerComposeCompositeService

--- Ductus.FluentDocker/Services/Impl/DockerComposeCompositeService.cs
+++ Ductus.FluentDocker/Services/Impl/DockerComposeCompositeService.cs
@@ -81,6 +81,7 @@
         _config.NoRecreate, _config.NoBuild, _config.ForceBuild,
         _config.TimeoutSeconds == TimeSpan.Zero ? (TimeSpan?) null : _config.TimeoutSeconds, _config.RemoveOrphans,
         _config.UseColor,
+        false,
         _config.Services,
         host.Certificates, _config.ComposeFilePath.ToArray());


Formatting only

Formatting only

--- Loxone.Client/CultureHelper.cs
+++ Loxone.Client/CultureHelper.cs
@@ -32,9 +32,9 @@
             {
                 // Try neutral culture if a specific was not found.
                 culture = all
-                .Where(c => c.IsNeutralCulture &&
-                       string.Equals(c.ThreeLetterWindowsLanguageName, languageName, StringComparison.OrdinalIgnoreCase))
-                .FirstOrDefault();
+                    .Where(c => c.IsNeutralCulture &&
+                           string.Equals(c.ThreeLetterWindowsLanguageName, languageName, StringComparison.OrdinalIgnoreCase))
+                    .FirstOrDefault();
             }

             return culture;


Removed unused code.

Removed unused code.

--- Assets/HoloToolkit/Input/Scripts/Voice/Editor/SpeechInputHandlerEditor.cs
+++ Assets/HoloToolkit/Input/Scripts/Voice/Editor/SpeechInputHandlerEditor.cs
@@ -33,7 +33,7 @@
             }
             else
             {
-                SpeechInputHandler handler = this.target as SpeechInputHandler;
+                SpeechInputHandler handler = target as SpeechInputHandler;
                 string duplicateKeyword = handler.keywords.GroupBy(keyword => keyword.Keyword.ToLower()).Where(group => group.Count() > 1).Select(group => group.Key).FirstOrDefault();
                 if (duplicateKeyword != null)
                 {
@@ -51,8 +51,7 @@
             EditorGUI.indentLevel++;

             // remove the keywords already assigned from the registered list
-            GameObject selectedObject = Selection.activeGameObject;
-            SpeechInputHandler handler = this.target as SpeechInputHandler;
+            SpeechInputHandler handler = target as SpeechInputHandler;
             string[] availableKeywords = registeredKeywords.Except(handler.keywords.Select(keywordAndResponse => keywordAndResponse.Keyword)).ToArray();

             // keyword rows


Fixed merge error

Fixed merge error

--- Assets/MRTK/Examples/Demos/HandTracking/Scripts/LeapCoreAssetsDetector.cs
+++ Assets/MRTK/Examples/Demos/HandTracking/Scripts/LeapCoreAssetsDetector.cs
@@ -24,6 +24,9 @@
             text.color = Color.green;
 #endif // UNITY_WSA && !UNITY_EDITOR
 #else
+            text.text = "This project has not met the requirements to use the Leap Data Provider. For more information, visit the MRTK Leap Motion Documentation";
+            text.color = Color.red;
+#endif
         }
     }
 }


Auto property

Auto property

--- Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs
+++ Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Pointers/GGVPointer.cs
@@ -27,9 +27,8 @@
         private Handedness lastControllerHandedness;

         #region IMixedRealityPointer
+
         private IMixedRealityController controller;
-        private IMixedRealityInputSource inputSourceParent;
-

         /// <inheritdoc />
         public IMixedRealityController Controller
@@ -43,7 +42,7 @@
                 {
                     gameObject.name = $"{Controller.ControllerHandedness}_GGVPointer";
                     pointerName = gameObject.name;
-                    inputSourceParent = controller.InputSource;
+                    InputSourceParent = controller.InputSource;
                 }
             }
         }
@@ -80,7 +79,7 @@
             }
         }

-        public IMixedRealityInputSource InputSourceParent => inputSourceParent;
+        public IMixedRealityInputSource InputSourceParent { get; private set; }

         public IMixedRealityCursor BaseCursor { get; set; }


Tooltip update

Tooltip update

--- Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Sliders/PinchSlider.cs
+++ Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Sliders/PinchSlider.cs
@@ -65,8 +65,8 @@
                 UpdateThumbVisuals();
             }
         }
-
-        [Tooltip("The gameObject that contains the trackVisuals.")]
+
+        [Tooltip("The gameObject that contains the trackVisuals. This will get rotated to match the slider axis")]
         [SerializeField]
         private GameObject trackVisuals = null;
         public GameObject TrackVisuals
@@ -82,7 +82,7 @@
             }
         }

-        [Tooltip("The gameObject that contains the tickMarks.")]
+        [Tooltip("The gameObject that contains the tickMarks.  This will get rotated to match the slider axis")]
         [SerializeField]
         private GameObject tickMarks = null;
         public GameObject TickMarks


Fix sign-in query

Fix sign-in query

Fix sign-in query that now seems to be going a comparison on
null/not-null, which causes the query to return no results.

--- src/LondonTravel.Site/Identity/UserStore.cs
+++ src/LondonTravel.Site/Identity/UserStore.cs
@@ -143,7 +143,7 @@
             }

             var results = await _client.GetAsync<LondonTravelUser>(
-                (p) => p.Logins.Contains(new LondonTravelLoginInfo() { LoginProvider = loginProvider, ProviderKey = providerKey }),
+                (p) => p.Logins.Contains(new LondonTravelLoginInfo() { LoginProvider = loginProvider, ProviderKey = providerKey, ProviderDisplayName = loginProvider }),
                 cancellationToken);

             return results.FirstOrDefault();


Lucene.Net.Core.Search.BooleanScorer refactor: camelCased private fields, changed internal fields to properties, changed Size() > Size (property)

--- src/Lucene.Net.Core/Search/BooleanScorer.cs
+++ src/Lucene.Net.Core/Search/BooleanScorer.cs
@@ -60,27 +60,27 @@
     {
         private sealed class BooleanScorerCollector : Collector
         {
-            private BucketTable BucketTable; // LUCENENET TODO: Rename (private)
-            private int Mask; // LUCENENET TODO: Rename (private)
-            private Scorer Scorer_Renamed; // LUCENENET TODO: Rename (private)
+            private BucketTable bucketTable;
+            private int mask;
+            private Scorer scorer;

             public BooleanScorerCollector(int mask, BucketTable bucketTable)
             {
-                this.Mask = mask;
-                this.BucketTable = bucketTable;
+                this.mask = mask;
+                this.bucketTable = bucketTable;
             }

             public override void Collect(int doc)
             {
-                BucketTable table = BucketTable;
+                BucketTable table = bucketTable;
                 int i = doc & BucketTable.MASK;
                 Bucket bucket = table.Buckets[i];

                 if (bucket.Doc != doc) // invalid bucket
                 {
                     bucket.Doc = doc; // set doc
-                    bucket.Score = Scorer_Renamed.Score(); // initialize score
-                    bucket.Bits = Mask; // initialize mask
+                    bucket.Score = scorer.Score(); // initialize score
+                    bucket.Bits = mask; // initialize mask
                     bucket.Coord = 1; // initialize coord

                     bucket.Next = table.First; // push onto valid list
@@ -88,8 +88,8 @@
                 } // valid bucket
                 else
                 {
-                    bucket.Score += Scorer_Renamed.Score(); // increment score
-                    bucket.Bits |= Mask; // add bits in mask
+                    bucket.Score += scorer.Score(); // increment score
+                    bucket.Bits |= mask; // add bits in mask
                     bucket.Coord++; // increment coord
                 }
             }
@@ -106,7 +106,7 @@
             {
                 set
                 {
-                    this.Scorer_Renamed = value;
+                    this.scorer = value;
                 }
             }

@@ -118,16 +118,22 @@

         internal sealed class Bucket
         {
-            internal int Doc = -1; // tells if bucket is valid // LUCENENET TODO: Make property
-            internal double Score; // incremental score // LUCENENET TODO: Make property
+            internal int Doc { get; set; } // tells if bucket is valid
+            internal double Score { get; set; } // incremental score

             // TODO: break out bool anyProhibited, int
             // numRequiredMatched; then we can remove 32 limit on
             // required clauses
-            internal int Bits; // used for bool constraints // LUCENENET TODO: Make property
-
-            internal int Coord; // count of terms in score // LUCENENET TODO: Make property
-            internal Bucket Next; // next valid bucket // LUCENENET TODO: Make property
+            internal int Bits { get; set; } // used for bool constraints
+
+            internal int Coord { get; set; } // count of terms in score
+            internal Bucket Next { get; set; } // next valid bucket
+
+            public Bucket()
+            {
+                // Initialize properties
+                Doc = -1;
+            }
         }

         /// <summary>
@@ -155,23 +161,23 @@
                 return new BooleanScorerCollector(mask, this);
             }

-            public int Size() // LUCENENET TODO: Rename Count (or Length?)
-            {
-                return SIZE;
+            public int Size // LUCENENET TODO: Rename Count (or Length?)
+            {
+                get { return SIZE; }
             }
         }

         internal sealed class SubScorer
         {
-            public BulkScorer Scorer; // LUCENENET TODO: Make property
+            public BulkScorer Scorer { get; set; }

             // TODO: re-enable this if BQ ever sends us required clauses
             //public boolean required = false;
-            public bool Prohibited; // LUCENENET TODO: Make property
-
-            public Collector Collector; // LUCENENET TODO: Make property
-            public SubScorer Next; // LUCENENET TODO: Make property
-            public bool More; // LUCENENET TODO: Make property
+            public bool Prohibited { get; set; }
+
+            public Collector Collector { get; set; }
+            public SubScorer Next { get; set; }
+            public bool More { get; set; }

             public SubScorer(BulkScorer scorer, bool required, bool prohibited, Collector collector, SubScorer next)
             {
@@ -189,41 +195,41 @@
             }
         }

-        private SubScorer Scorers = null; // LUCENENET TODO: Rename (private)
+        private SubScorer scorers = null;
         private BucketTable bucketTable = new BucketTable();
-        private readonly float[] CoordFactors; // LUCENENET TODO: Rename (private)
+        private readonly float[] coordFactors;

         // TODO: re-enable this if BQ ever sends us required clauses
         //private int requiredMask = 0;
-        private readonly int MinNrShouldMatch; // LUCENENET TODO: Rename (private)
-
-        private int End; // LUCENENET TODO: Rename (private)
-        private Bucket Current; // LUCENENET TODO: Rename (private)
+        private readonly int minNrShouldMatch;
+
+        private int end;
+        private Bucket current;

         // Any time a prohibited clause matches we set bit 0:
         private const int PROHIBITED_MASK = 1;

-        private readonly Weight Weight; // LUCENENET TODO: Rename (private)
+        private readonly Weight weight;

         internal BooleanScorer(BooleanWeight weight, bool disableCoord, int minNrShouldMatch, IList<BulkScorer> optionalScorers, IList<BulkScorer> prohibitedScorers, int maxCoord)
         {
-            this.MinNrShouldMatch = minNrShouldMatch;
-            this.Weight = weight;
+            this.minNrShouldMatch = minNrShouldMatch;
+            this.weight = weight;

             foreach (BulkScorer scorer in optionalScorers)
             {
-                Scorers = new SubScorer(scorer, false, false, bucketTable.NewCollector(0), Scorers);
+                scorers = new SubScorer(scorer, false, false, bucketTable.NewCollector(0), scorers);
             }

             foreach (BulkScorer scorer in prohibitedScorers)
             {
-                Scorers = new SubScorer(scorer, false, true, bucketTable.NewCollector(PROHIBITED_MASK), Scorers);
-            }
-
-            CoordFactors = new float[optionalScorers.Count + 1];
-            for (int i = 0; i < CoordFactors.Length; i++)
-            {
-                CoordFactors[i] = disableCoord ? 1.0f : weight.Coord(i, maxCoord);
+                scorers = new SubScorer(scorer, false, true, bucketTable.NewCollector(PROHIBITED_MASK), scorers);
+            }
+
+            coordFactors = new float[optionalScorers.Count + 1];
+            for (int i = 0; i < coordFactors.Length; i++)
+            {
+                coordFactors[i] = disableCoord ? 1.0f : weight.Coord(i, maxCoord);
             }
         }

@@ -239,10 +245,10 @@
             {
                 bucketTable.First = null;

-                while (Current != null) // more queued
+                while (current != null) // more queued
                 {
                     // check prohibited & required
-                    if ((Current.Bits & PROHIBITED_MASK) == 0)
+                    if ((current.Bits & PROHIBITED_MASK) == 0)
                     {
                         // TODO: re-enable this if BQ ever sends us required
                         // clauses
@@ -253,47 +259,47 @@
                         // that should work)... but in theory an outside
                         // app could pass a different max so we must check
                         // it:
-                        if (Current.Doc >= max)
+                        if (current.Doc >= max)
                         {
-                            tmp = Current;
-                            Current = Current.Next;
+                            tmp = current;
+                            current = current.Next;
                             tmp.Next = bucketTable.First;
                             bucketTable.First = tmp;
                             continue;
                         }

-                        if (Current.Coord >= MinNrShouldMatch)
+                        if (current.Coord >= minNrShouldMatch)
                         {
-                            fs.score = (float)(Current.Score * CoordFactors[Current.Coord]);
-                            fs.doc = Current.Doc;
-                            fs.freq = Current.Coord;
-                            collector.Collect(Current.Doc);
+                            fs.score = (float)(current.Score * coordFactors[current.Coord]);
+                            fs.doc = current.Doc;
+                            fs.freq = current.Coord;
+                            collector.Collect(current.Doc);
                         }
                     }

-                    Current = Current.Next; // pop the queue
+                    current = current.Next; // pop the queue
                 }

                 if (bucketTable.First != null)
                 {
-                    Current = bucketTable.First;
-                    bucketTable.First = Current.Next;
+                    current = bucketTable.First;
+                    bucketTable.First = current.Next;
                     return true;
                 }

                 // refill the queue
                 more = false;
-                End += BucketTable.SIZE;
-                for (SubScorer sub = Scorers; sub != null; sub = sub.Next)
+                end += BucketTable.SIZE;
+                for (SubScorer sub = scorers; sub != null; sub = sub.Next)
                 {
                     if (sub.More)
                     {
-                        sub.More = sub.Scorer.Score(sub.Collector, End);
+                        sub.More = sub.Scorer.Score(sub.Collector, end);
                         more |= sub.More;
                     }
                 }
-                Current = bucketTable.First;
-            } while (Current != null || more);
+                current = bucketTable.First;
+            } while (current != null || more);

             return false;
         }
@@ -302,7 +308,7 @@
         {
             StringBuilder buffer = new StringBuilder();
             buffer.Append("boolean(");
-            for (SubScorer sub = Scorers; sub != null; sub = sub.Next)
+            for (SubScorer sub = scorers; sub != null; sub = sub.Next)
             {
                 buffer.Append(sub.Scorer.ToString());
                 buffer.Append(" ");


Removed unnecessary cast from Core.Store.NIOFSDirectory

--- src/Lucene.Net.Core/Store/NIOFSDirectory.cs
+++ src/Lucene.Net.Core/Store/NIOFSDirectory.cs
@@ -216,7 +216,7 @@
                 }
                 else
                 {
-                    bb = ByteBuffer.Wrap((byte[])(Array)b, offset, len);
+                    bb = ByteBuffer.Wrap(b, offset, len);
                 }

                 int readOffset = bb.Position;


changed name to sound better

changed name to sound better

--- Coop_Listing_Site/Coop_Listing_Site/Models/ViewModels/OpportunityModel.cs
+++ Coop_Listing_Site/Coop_Listing_Site/Models/ViewModels/OpportunityModel.cs
@@ -35,6 +35,7 @@
         public string Qualifications { get; set; }
         [Display(Name = "Minimum Required G.P.A.")]
         public double GPA { get; set; }
+        [Display(Name = "Paid")]
         public bool Paid { get; set; }
         [Display(Name = "Pay rate")]
         public string Wage { get; set; }


Renamed key for Url.

Renamed key for Url.

--- Magick.NET.Web/MagickModule.cs
+++ Magick.NET.Web/MagickModule.cs
@@ -39,7 +39,7 @@

     private static IHttpHandler HandleRequest(HttpContext context)
     {
-      Uri url = (Uri)context.Items["MagickScriptModule.Url"];
+      Uri url = (Uri)context.Items["ImageMagick.Web.MagickModule.Url"];

       foreach (IUrlResolver scriptUrlResolver in _ScriptUrlResolvers)
       {
@@ -74,7 +74,7 @@
     private void OnBeginRequest(object sender, EventArgs arguments)
     {
       HttpContext context = ((HttpApplication)sender).Context;
-      context.Items["MagickScriptModule.Url"] = context.Request.Url;
+      context.Items["ImageMagick.Web.MagickModule.Url"] = context.Request.Url;
     }

     private void OnPostAuthorizeRequest(object sender, EventArgs arguments)


JsonRpcConnection read optimizations

JsonRpcConnection read optimizations

--- src/MiningCore/JsonRpc/JsonRpcConnection.cs
+++ src/MiningCore/JsonRpc/JsonRpcConnection.cs
@@ -49,13 +49,13 @@

                         if (!string.IsNullOrEmpty(data))
                         {
-                            sb.Append(data);
-
-                            if (sb.Length < MaxRequestLength)
+                            if (sb.Length + data.Length < MaxRequestLength)
                             {
+                                sb.Append(data);
                                 int index;

-                                while ((index = sb.ToString().IndexOf('\n')) != -1)
+                                // scan for lines and emit
+                                while (sb.Length > 0 && (index = sb.ToString().IndexOf('\n')) != -1)
                                 {
                                     var line = sb.ToString(0, index);
                                     sb.Remove(0, index + 1);


Emit HighestModSeqChanged when we get untagged FETCH responses with a higher MODSEQ value

--- MailKit/Net/Imap/ImapFolder.cs
+++ MailKit/Net/Imap/ImapFolder.cs
@@ -5095,8 +5095,10 @@
 			var token = engine.ReadToken (ic.CancellationToken);
 			var labels = new MessageLabelsChangedEventArgs (index);
 			var flags = new MessageFlagsChangedEventArgs (index);
+			var modSeq = new ModSeqChangedEventArgs (index);
 			var ctx = (FetchStreamContext) ic.UserData;
 			var section = new StringBuilder ();
+			bool modSeqChanged = false;
 			bool labelsChanged = false;
 			bool flagsChanged = false;
 			var buf = new byte[4096];
@@ -5271,6 +5273,10 @@
 					if (token.Type != ImapTokenType.CloseParen)
 						throw ImapEngine.UnexpectedToken (ImapEngine.GenericItemSyntaxErrorFormat, atom, token);

+					if (modseq > HighestModSeq)
+						UpdateHighestModSeq (modseq);
+
+					modSeq.ModSeq = modseq;
 					labels.ModSeq = modseq;
 					flags.ModSeq = modseq;
 					break;
@@ -5295,10 +5301,13 @@
 				throw ImapEngine.UnexpectedToken (ImapEngine.GenericUntaggedResponseSyntaxErrorFormat, "FETCH", token);

 			if (flagsChanged)
-				ic.Folder.OnMessageFlagsChanged (flags);
+				OnMessageFlagsChanged (flags);

 			if (labelsChanged)
-				ic.Folder.OnMessageLabelsChanged (labels);
+				OnMessageLabelsChanged (labels);
+
+			if (modSeqChanged)
+				OnModSeqChanged (modSeq);
 		}

 		/// <summary>
@@ -9744,6 +9753,9 @@
 					if (token.Type != ImapTokenType.CloseParen)
 						throw ImapEngine.UnexpectedToken (ImapEngine.GenericItemSyntaxErrorFormat, atom, token);

+					if (modseq > HighestModSeq)
+						UpdateHighestModSeq (modseq);
+
 					modSeqChangedEventArgs.ModSeq = modseq;
 					labelsChangedEventArgs.ModSeq = modseq;
 					flagsChangedEventArgs.ModSeq = modseq;


use referer as lower priority

use referer as lower priority

--- KQAnalytics3/src/KQAnalytics3/Modules/DataCollectEndpointModule.cs
+++ KQAnalytics3/src/KQAnalytics3/Modules/DataCollectEndpointModule.cs
@@ -60,9 +60,9 @@
                     {
                         // Attempt to get page URL
                         hitReq.PageIdentifier =
-                            Request.Headers.Referrer // Referer
-                            ?? Request.Query.u // Query string
-                            ?? Request.Form.u; // Form data
+                            Request.Query.u // Query string
+                            ?? Request.Form.u // Form data
+                            ?? Request.Headers.Referrer; // Referer
                     }
                     req = hitReq;
                 }


fix join ulrs

fix join ulrs

--- src/MorphSDK/Client/MorphServerApiClient.cs
+++ src/MorphSDK/Client/MorphServerApiClient.cs
@@ -23,7 +23,7 @@
         protected readonly string UserAgent = "MorphServerApiClient/0.1";
         protected HttpClient _httpClient;
         protected readonly string _api_v1 = "api/v1/";
-        protected readonly string _defaultSpaceName = "Default";
+        protected readonly string _defaultSpaceName = "default";

         public MorphServerApiClient(string apiHost)
         {
@@ -159,6 +159,7 @@
         /// <returns></returns>
         public async Task<RunningTaskStatus> StartTaskAsync(string spaceName, Guid taskId, CancellationToken cancellationToken)
         {
+            spaceName = PrepareSpaceName(spaceName);
             var url = "runningtasks/" + taskId.ToString("D");
             using (var response = await GetHttpClient().PostAsync(url, null, cancellationToken))
             {
@@ -181,6 +182,7 @@
         /// <returns></returns>
         public async Task<RunningTaskStatus> GetRunningTaskStatusAsync(string spaceName, Guid taskId, CancellationToken cancellationToken)
         {
+            spaceName = PrepareSpaceName(spaceName);
             var nvc = new NameValueCollection();
             nvc.Add("_", DateTime.Now.Ticks.ToString());
             var url = string.Format("runningtasks/{0}{1}", taskId.ToString("D"), nvc.ToQueryString());
@@ -205,6 +207,7 @@
         /// <returns></returns>
         public async Task StopTaskAsync(string spaceName, Guid taskId, CancellationToken cancellationToken)
         {
+            spaceName = PrepareSpaceName(spaceName);
             var url = "runningtasks/" + taskId.ToString("D");
             using (var response = await GetHttpClient().DeleteAsync(url, cancellationToken))
             {
@@ -244,10 +247,10 @@

         public async Task DownloadFileAsync(string spaceName, string remoteFolderPath, Func<DownloadFileInfo, bool> handleFile, Stream streamToWriteTo, CancellationToken cancellationToken)
         {
+            spaceName = PrepareSpaceName(spaceName);
             var nvc = new NameValueCollection();
             nvc.Add("_", DateTime.Now.Ticks.ToString());
-            remoteFolderPath = PreparePath(remoteFolderPath);
-            var url = string.Format("space/{0}/files/{1}{2}", spaceName ?? _defaultSpaceName, remoteFolderPath, nvc.ToQueryString());
+            var url = JoinUrl("space", spaceName, "files", remoteFolderPath) + nvc.ToQueryString();
             // it's necessary to add HttpCompletionOption.ResponseHeadersRead to disable caching
             using (HttpResponseMessage response = await GetHttpClient().GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken))
                 if (response.IsSuccessStatusCode)
@@ -308,7 +311,7 @@

         }

-
+
         public async Task UploadFileAsync(string spaceName, string localFilePath, string destFolderPath, CancellationToken cancellationToken, bool overrideFileifExists = false)
         {
             if (!File.Exists(localFilePath))
@@ -327,10 +330,10 @@
         {
             try
             {
+                spaceName = PrepareSpaceName(spaceName);
                 string boundary = "EasyMorphCommandClient--------" + Guid.NewGuid().ToString("N");
-                destFolderPath = PreparePath(destFolderPath);
-                string url = string.Format("space/{0}/files/{1}", spaceName ?? _defaultSpaceName, destFolderPath);
-                //var cts = new CancellationTokenSource();
+                string url = JoinUrl("space", spaceName, "files", destFolderPath);
+
                 using (var content = new MultipartFormDataContent(boundary))
                 {
                     var downloadProgress = new FileProgress(fileName, fileSize);
@@ -377,11 +380,11 @@

         public async Task<SpaceBrowsingInfo> BrowseSpaceAsync(string spaceName, string folderPath, CancellationToken cancellationToken)
         {
-            folderPath = PreparePath(folderPath);
+            spaceName = PrepareSpaceName(spaceName);
             var nvc = new NameValueCollection();
             nvc.Add("_", DateTime.Now.Ticks.ToString());

-            var url = string.Format("space/{0}/browse/{1}{2}", spaceName ?? _defaultSpaceName, folderPath, nvc.ToQueryString());
+            var url = JoinUrl("space", spaceName, "browse", folderPath) + nvc.ToQueryString();
             using (var response = await GetHttpClient().GetAsync(url, cancellationToken))
             {
                 var dto = await HandleResponse<SpaceBrowsingResponseDto>(response);
@@ -392,9 +395,8 @@

         public async Task<bool> IsFileExistsAsync(string spaceName, string serverFolder, string fileName, CancellationToken cancellationToken)
         {
-            serverFolder = PreparePath(serverFolder);
-            string path = PreparePath(serverFolder + "/" + fileName);
-            var url = string.Format("space/{0}/files/{1}", spaceName ?? _defaultSpaceName, path);
+            spaceName = PrepareSpaceName(spaceName);
+            var url = JoinUrl("space", spaceName, "files", serverFolder, fileName);
             try
             {
                 using (var requestMessage = new HttpRequestMessage()
@@ -416,16 +418,39 @@
         }

-        private string PreparePath(string urlPath)
-        {
-            return urlPath?.Replace('\\', '/')?.Trim('/');
+
+        private string PrepareSpaceName(string spaceName)
+        {
+            return string.IsNullOrWhiteSpace(spaceName) ? _defaultSpaceName : spaceName.ToLower();
+        }
+
+        private string JoinUrl(params string[] urls)
+        {
+            var result = string.Empty;
+            for (var i = 0; i < urls.Length; i++)
+            {
+                var p = urls[i];
+                if (p == null)
+                    continue;
+
+                p = p.Replace('\\', '/');
+                p = p.Trim(new[] { '/' });
+                if (string.IsNullOrWhiteSpace(p))
+                    continue;
+
+                if (result != string.Empty)
+                    result += "/";
+                result += p;
+
+            }
+            return result;
         }

         public async Task DeleteFileAsync(string spaceName, string serverFolder, string fileName, CancellationToken cancellationToken)
         {
-            serverFolder = PreparePath(serverFolder);
-            string path = PreparePath(serverFolder + "/" + fileName);
-            var url = string.Format("space/{0}/files/{1}", spaceName ?? _defaultSpaceName, path);
+
+            spaceName = PrepareSpaceName(spaceName);
+            var url = JoinUrl("space", spaceName, "files", serverFolder, fileName);

             using (HttpResponseMessage response = await GetHttpClient().DeleteAsync(url, cancellationToken))
             {


#280 Exception: Proxy Authentication required

--- KeeAnywhere/StorageProviders/Dropbox/DropboxStorageConfigurator.cs
+++ KeeAnywhere/StorageProviders/Dropbox/DropboxStorageConfigurator.cs
@@ -78,7 +78,7 @@

             var code = query["code"];

-            var response = await db.DropboxOAuth2Helper.ProcessCodeFlowAsync(code, clientId, null, redirectUri, null, codeVerifier);
+            var response = await db.DropboxOAuth2Helper.ProcessCodeFlowAsync(code, clientId, null, redirectUri, ProxyTools.CreateHttpClient(), codeVerifier);
             var api = DropboxHelper.GetApi(response.AccessToken);
             var owner = await api.Users.GetCurrentAccountAsync();


Fixed ImapFolder.GetStream() when contentOnly is true

Fixes issue #190

--- MailKit/Net/Imap/ImapFolder.cs
+++ MailKit/Net/Imap/ImapFolder.cs
@@ -5216,7 +5216,7 @@
 			if (ic.Result != ImapCommandResult.Ok)
 				throw ImapCommandException.Create ("FETCH", ic);

-			if (!streams.TryGetValue (part.PartSpecifier, out stream))
+			if (!streams.TryGetValue (partSpecifier, out stream))
 				throw new ImapCommandException ("The IMAP server did not return the requested stream.");

 			return stream;
@@ -5314,7 +5314,7 @@
 			if (ic.Result != ImapCommandResult.Ok)
 				throw ImapCommandException.Create ("FETCH", ic);

-			if (!streams.TryGetValue (string.Empty, out stream))
+			if (!streams.TryGetValue (partSpecifier, out stream))
 				throw new ImapCommandException ("The IMAP server did not return the requested stream.");

 			return stream;


- Fixing build after name change to ARSmartDispatcherController

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@1527 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- MonoRail/TestScaffolding/Controllers/ARDataBinderTestController.cs
+++ MonoRail/TestScaffolding/Controllers/ARDataBinderTestController.cs
@@ -22,7 +22,7 @@
 	using TestScaffolding.Model;

-	public class ARDataBinderTestController : ARSmartDispatchController
+	public class ARDataBinderTestController : ARSmartDispatcherController
 	{
 		public ARDataBinderTestController() : base ()
 		{


Fixed logic for parsing literal tokens.

Fixed logic for parsing literal tokens.

--- MailKit/Net/Imap/ImapStream.cs
+++ MailKit/Net/Imap/ImapStream.cs
@@ -553,7 +553,7 @@
 				*inptr = (byte) '\n';
 			} while (true);

-			if (int.TryParse (builder.ToString (), out literalDataLeft) || literalDataLeft < 0)
+			if (!int.TryParse (builder.ToString (), out literalDataLeft) || literalDataLeft < 0)
 				return new ImapToken (ImapTokenType.Error, ImapTokenType.Literal);

 			Mode = ImapStreamMode.Literal;


update header of FindFiles method

update header of FindFiles method

--- Objectivity.Test.Automation.Tests.NUnit/DataDriven/CompareFiles.cs
+++ Objectivity.Test.Automation.Tests.NUnit/DataDriven/CompareFiles.cs
@@ -51,10 +51,10 @@
         }

         /// <summary>
-        /// The get files.
+        /// Get files to compare.
         /// </summary>
         /// <returns>
-        /// The <see cref="IEnumerable"/>.
+        /// Pairs of files to compare <see cref="IEnumerable"/>.
         /// </returns>
         private static IEnumerable<TestCaseData> FindFiles(FileType type)
         {


Fixing broken bundle

Fixing broken bundle

--- Mood/App_Start/BundleConfig.cs
+++ Mood/App_Start/BundleConfig.cs
@@ -8,7 +8,7 @@
         public static void RegisterBundles(BundleCollection bundles)
         {
             bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
-                "~/Scripts/dep/jquery/dist/jquery.js"));
+                "~/Scripts/jquery-{version}.js"));

             bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                 "~/Scripts/jquery.unobtrusive*",


Fix DllImport should have been UnmanagedFunctionPointer

--- NOpenCL/UnsafeNativeMethods.cs
+++ NOpenCL/UnsafeNativeMethods.cs
@@ -1463,7 +1463,7 @@
         [DllImport(ExternDll.OpenCL)]
         private static extern ErrorCode clSetEventCallback(EventSafeHandle @event, ExecutionStatus executionCallbackType, EventCallback eventNotify, IntPtr userData);

-        [DllImport(ExternDll.OpenCL)]
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         public delegate void EventCallback(EventSafeHandle @event, ExecutionStatus eventCommandExecutionStatus, IntPtr userData);

         [DllImport(ExternDll.OpenCL)]


Don't dispose placeholder values when unloading content

--- src/OpenSage.Game/Content/ContentManager.cs
+++ src/OpenSage.Game/Content/ContentManager.cs
@@ -117,13 +117,13 @@
                 {
                     uploadBatch.End();
                 }
+
+                _cachedObjects.Add(filePath, asset);
             }
             else
             {
                 asset = contentLoader.PlaceholderValue;
             }
-
-            _cachedObjects.Add(filePath, asset);

             return (T) asset;
         }


Turn on ClearType mode when rendering text in the Options page.

--- src/Options/PackageSourcesOptionsControl.cs
+++ src/Options/PackageSourcesOptionsControl.cs
@@ -271,13 +271,15 @@

         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Drawing.Graphics.MeasureString(System.String,System.Drawing.Font,System.Int32,System.Drawing.StringFormat)")]
         private void PackageSourcesListBox_DrawItem(object sender, DrawItemEventArgs e) {
+            Graphics graphics = e.Graphics;
+
             // Draw the background of the ListBox control for each item.
             if (e.BackColor.Name == KnownColor.Highlight.ToString()) {
                 using (var gradientBrush = new LinearGradientBrush(e.Bounds, SelectionFocusGradientLightColor, SelectionFocusGradientDarkColor, 90.0F)) {
-                    e.Graphics.FillRectangle(gradientBrush, e.Bounds);
+                    graphics.FillRectangle(gradientBrush, e.Bounds);
                 }
                 using (var borderPen = new Pen(SelectionFocusBorderColor)) {
-                    e.Graphics.DrawRectangle(borderPen, e.Bounds.Left, e.Bounds.Top, e.Bounds.Width - 1, e.Bounds.Height - 1);
+                    graphics.DrawRectangle(borderPen, e.Bounds.Left, e.Bounds.Top, e.Bounds.Width - 1, e.Bounds.Height - 1);
                 }
             }
             else {
@@ -286,7 +288,7 @@
                                       ? Color.FromKnownColor(KnownColor.Window)
                                       : Color.FromArgb(0xF6, 0xF6, 0xF6);
                 using (Brush backBrush = new SolidBrush(backColor)) {
-                    e.Graphics.FillRectangle(backBrush, e.Bounds);
+                    graphics.FillRectangle(backBrush, e.Bounds);
                 }
             }

@@ -311,9 +313,9 @@

                 // draw the enabled/disabled checkbox
                 CheckBoxState checkBoxState = currentItem.IsEnabled ? CheckBoxState.CheckedNormal : CheckBoxState.UncheckedNormal;
-                Size checkBoxSize = CheckBoxRenderer.GetGlyphSize(e.Graphics, checkBoxState);
+                Size checkBoxSize = CheckBoxRenderer.GetGlyphSize(graphics, checkBoxState);
                 CheckBoxRenderer.DrawCheckBox(
-                    e.Graphics,
+                    graphics,
                     new Point(edgeMargin, e.Bounds.Top + edgeMargin),
                     checkBoxState);

@@ -324,26 +326,35 @@
                     _checkBoxSize = checkBoxSize;
                 }

-                // draw each package source as
-                //
-                // [checkbox] Name
-                //            Source (italics)
-
-                // resize the bound rectangle to make room for the checkbox above
-                var textBounds = new Rectangle(
-                    e.Bounds.Left + checkBoxSize.Width + edgeMargin + textMargin,
-                    e.Bounds.Top,
-                    e.Bounds.Width - checkBoxSize.Width - edgeMargin - textMargin,
-                    e.Bounds.Height);
-
-                e.Graphics.DrawString(currentItem.Name, e.Font, foreBrush, textBounds, drawFormat);
-                SizeF nameSize = e.Graphics.MeasureString(currentItem.Name, e.Font, textBounds.Width, drawFormat);
-
-                var sourceBounds = NewBounds(textBounds, 0, (int)nameSize.Height);
-                e.Graphics.DrawString(currentItem.Source, italicFont, sourceBrush, sourceBounds, drawFormat);
+                GraphicsState oldState = graphics.Save();
+                try {
+                    // turn on high quality text rendering mode
+                    graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
+
+                    // draw each package source as
+                    //
+                    // [checkbox] Name
+                    //            Source (italics)
+
+                    // resize the bound rectangle to make room for the checkbox above
+                    var textBounds = new Rectangle(
+                        e.Bounds.Left + checkBoxSize.Width + edgeMargin + textMargin,
+                        e.Bounds.Top,
+                        e.Bounds.Width - checkBoxSize.Width - edgeMargin - textMargin,
+                        e.Bounds.Height);
+
+                    graphics.DrawString(currentItem.Name, e.Font, foreBrush, textBounds, drawFormat);
+                    SizeF nameSize = graphics.MeasureString(currentItem.Name, e.Font, textBounds.Width, drawFormat);
+
+                    var sourceBounds = NewBounds(textBounds, 0, (int)nameSize.Height);
+                    graphics.DrawString(currentItem.Source, italicFont, sourceBrush, sourceBounds, drawFormat);
+                }
+                finally {
+                    graphics.Restore(oldState);
+                }

                 // If the ListBox has focus, draw a focus rectangle around the selected item.
-                e.DrawFocusRectangle();
+                e.DrawFocusRectangle();
             }
         }


Moving IsUsingDepthTesting from CCWindow to CCLayer:

* potentially users may want to toggle depth test when drawing different layers
* CCLayer modification was fused into previous commit

--- src/CCWindow.cs
+++ src/CCWindow.cs
@@ -54,12 +54,6 @@
             }
         }

-        public bool IsUseDepthTesting
-        {
-            get { return DrawManager.DepthTest; }
-            set { DrawManager.DepthTest = value; }
-        }
-
         public bool DisplayStats
         {
             get { return Stats.IsEnabled; }
@@ -139,7 +133,6 @@

             IsUseAlphaBlending = true;
-            IsUseDepthTesting = false;

             this.XnaWindow = xnaWindow;
             xnaWindow.OrientationChanged += OnOrientationChanged;


Added new assertion helpers for testing expected exceptions.

--- Joy.Test/HelpedTest.cs
+++ Joy.Test/HelpedTest.cs
@@ -18,14 +18,72 @@

         protected void AssertThrows(Type expectedExceptionType, Action action, string message, params object[] formatArgs)
         {
+            AssertThrows(expectedExceptionType, AsVoidish(action), message, formatArgs);
+        }
+
+        protected void AssertThrows(Type expectedExceptionType, string expectedExceptionMessage, Action action, string message, params object[] formatArgs)
+        {
+            AssertThrows(expectedExceptionType, expectedExceptionMessage, AsVoidish(action), message, formatArgs);
+        }
+
+        protected void AssertThrows<TResult>(Type expectedExceptionType, Func<TResult> function)
+        {
+            AssertThrows(expectedExceptionType, function, null, null);
+        }
+
+        protected void AssertThrows<TResult>(Type expectedExceptionType, Func<TResult> function, string message)
+        {
+            AssertThrows(expectedExceptionType, function, message, null);
+        }
+
+        protected void AssertThrows<TResult>(Type expectedExceptionType, Func<TResult> function, string message, params object[] formatArgs)
+        {
+            AssertThrows(expectedExceptionType, null, function, message, formatArgs);
+        }
+
+        protected void AssertThrows<TResult>(Type expectedExceptionType, string expectedExceptionMessage, Func<TResult> function, string message = null, params object[] formatArgs)
+        {
             try
             {
-                action();
-                Assert.Fail(BuildCompositeMessage(message, formatArgs, "The expected exception was not thrown."));
+                TResult result = function();
+                Assert.Fail(BuildCompositeMessage(message, formatArgs, result is Voidish
+                        ? $"Expected {expectedExceptionType} not thrown."
+                        : $"Expected {expectedExceptionType} not thrown; returned instead: [{result}]"));
+            }
+            catch (Exception e) when (expectedExceptionType.IsAssignableFrom(e.GetType()))
+            {
+                if (expectedExceptionMessage != null)
+                    Assert.AreEqual(expectedExceptionMessage, e.Message, BuildCompositeMessage(message, formatArgs, "Unexpected exception message."));
+            }
+        }
+
+        protected void AssertEqualThrows(Action expected, Action actual, string message = null, params object[] formatArgs)
+        {
+            AssertEqualThrows(AsVoidish(expected), AsVoidish(actual), message, formatArgs);
+        }
+
+        protected void AssertEqualThrows<TResult>(Func<TResult> expected, Func<TResult> actual, string message = null, params object[] formatArgs)
+        {
+            var expectedResult = CatchingAll(expected);
+            if (expectedResult.Item2 == null)
+                throw new ArgumentException(
+                    expectedResult.Item1 is Voidish
+                        ? "Provided delegate must throw an exception."
+                        : $"Provided delegate must throw an exception; instead returned [{expectedResult.Item1}].",
+                    "expected");
+
+            AssertThrows(expectedResult.Item2.GetType(), expectedResult.Item2.Message, actual, message, formatArgs);
+        }
+
+        private Tuple<TResult, Exception> CatchingAll<TResult>(Func<TResult> function)
+        {
+            try
+            {
+                return new Tuple<TResult, Exception>(function(), null);
             }
             catch (Exception e)
             {
-                Assert.IsInstanceOfType(e, expectedExceptionType, BuildCompositeMessage(message, formatArgs, "Incorrect exception type was thrown: {0}", e));
+                return new Tuple<TResult, Exception>(default(TResult), e);
             }
         }

@@ -40,9 +98,20 @@
                     : ' ' + userMessage
                 : string.Empty;

-            return userPrefix + (detailFormatArgs.Any()
+            return userPrefix + ' ' + (detailFormatArgs.Any()
                 ? string.Format(detailMessage, detailFormatArgs)
                 : detailMessage );
         }
+
+        private struct Voidish { }
+
+        private Func<Voidish> AsVoidish(Action action)
+        {
+            return () =>
+            {
+                action();
+                return default(Voidish);
+            };
+        }
     }
 }


Always run at least one frame of a test rom

--- elbgb_test/Program.cs
+++ elbgb_test/Program.cs
@@ -162,11 +162,11 @@

                 int framesRun = 0;

-                while (framesRun++ < Config.FrameLimit && hash != expectedHash)
+                do
                 {
                     gameboy.RunFrame();
                     hash = framesink.HashFrame();
-                }
+                } while (++framesRun < Config.FrameLimit && hash != expectedHash);

                 framesink.SaveFrameAsPng(Path.ChangeExtension(testRom, "png"));
             }


Fixed typo in ParentStatus.cshtml.

Fixed typo in ParentStatus.cshtml.


DataQualityMonitoring: Updated AlarmAdapter to set false as default value for AlarmLog property.

--- Source/Libraries/Adapters/DataQualityMonitoring/AlarmAdapter.cs
+++ Source/Libraries/Adapters/DataQualityMonitoring/AlarmAdapter.cs
@@ -151,7 +151,7 @@
         /// </summary>
         [ConnectionStringParameter,
         Description("Define the flag indicating whether to use the alarm log to track recently modified alarm states."),
-        DefaultValue(true)]
+        DefaultValue(false)]
         public bool UseAlarmLog
         {
             get
@@ -239,7 +239,7 @@
             if (settings.TryGetValue("useAlarmLog", out setting))
                 m_useAlarmLog = setting.ParseBoolean();
             else
-                m_useAlarmLog = true;
+                m_useAlarmLog = false;

             if (!settings.TryGetValue("bulkInsertLimit", out setting) || !int.TryParse(setting, out m_bulkInsertLimit))
                 m_bulkInsertLimit = 300;


Sync shared code from runtime (#42763)

Sync shared code from runtime (#42763)

Co-authored-by: Tratcher <17a1bcfb12b91d5a94bc2a853ed1356b563f4b10@users.noreply.github.com>

--- src/Shared/runtime/NetEventSource.Common.cs
+++ src/Shared/runtime/NetEventSource.Common.cs
@@ -441,7 +441,7 @@
         #region Custom WriteEvent overloads

         [NonEvent]
-        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")]
+        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primitive values.")]
         private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3, string? arg4)
         {
             if (IsEnabled())
@@ -486,7 +486,7 @@
         }

         [NonEvent]
-        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")]
+        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primitive values.")]
         private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, byte[]? arg3)
         {
             if (IsEnabled())


Localloc: initial implementation.

Localloc: initial implementation.

--- src/SharpLang.Compiler/Compiler.Function.cs
+++ src/SharpLang.Compiler/Compiler.Function.cs
@@ -816,6 +816,28 @@
                     break;
                 }
                 #endregion
+
+                case Code.Localloc:
+                {
+                    var numElements = stack.Pop();
+
+                    ValueRef numElementsCasted;
+                    if (numElements.StackType == StackValueType.NativeInt)
+                    {
+                        numElementsCasted = LLVM.BuildPtrToInt(builder, numElements.Value, int32Type, string.Empty);
+                    }
+                    else
+                    {
+                        numElementsCasted = LLVM.BuildIntCast(builder, numElements.Value, int32Type, string.Empty);
+                    }
+
+
+                    var alloca = LLVM.BuildArrayAlloca(builder, LLVM.Int8TypeInContext(context), numElementsCasted, string.Empty);
+                    alloca = LLVM.BuildPointerCast(builder, alloca, intPtr.DataType, string.Empty);
+
+                    stack.Add(new StackValue(StackValueType.NativeInt, intPtr, alloca));
+                    break;
+                }

                 case Code.Castclass:
                 case Code.Isinst:


Shanq fix on vector/scalar division

Shanq fix on vector/scalar division

--- src/SharpVk.Shanq/ShanqExpressionVisitor.cs
+++ src/SharpVk.Shanq/ShanqExpressionVisitor.cs
@@ -262,7 +262,9 @@
             {
                 int length = this.vectorLibrary.GetVectorLength(expression.Left.Type);

-                var statement = new SpirvStatement(Op.OpCompositeConstruct, Enumerable.Repeat<object>(right, length).ToArray());
+                var resultType = this.Visit(Expression.Constant(expression.Left.Type));
+
+                var statement = new SpirvStatement(Op.OpCompositeConstruct, new object[] { resultType }.Concat(Enumerable.Repeat<object>(right, length)).ToArray());
                 right = this.file.GetNextResultId();

                 this.file.AddFunctionStatement(right, statement);


Lazy load the emoji icon completion source

--- Intellisense/EmojiCompletionSource.cs
+++ Intellisense/EmojiCompletionSource.cs
@@ -12,15 +12,59 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Windows.Media;
 using Microsoft.VisualStudio.Language.Intellisense;
 using Microsoft.VisualStudio.Text;

 namespace Emoji.Intellisense
 {
+	class EmojiCompletion : Completion
+	{
+		private Emoji _emoji;
+		private string _name;
+
+		public EmojiCompletion(Emoji emoji)
+			: base()
+		{
+			_emoji = emoji;
+			_name = $":{emoji.Name}:";
+		}
+
+		public override string InsertionText
+		{
+			get { return _name; }
+			set { throw new InvalidOperationException(); }
+		}
+
+		public override string DisplayText
+		{
+			get { return _name; }
+			set { throw new InvalidOperationException(); }
+		}
+
+		public override string Description
+		{
+			get { return _name; }
+			set { throw new InvalidOperationException(); }
+		}
+
+		public override ImageSource IconSource
+		{
+			get { return _emoji.Bitmap(); }
+			set { throw new InvalidOperationException(); }
+		}
+
+		public override string IconAutomationText
+		{
+			get { return _name; }
+			set { throw new InvalidOperationException(); }
+		}
+	}
+
 	class EmojiCompletionSource : ICompletionSource
 	{
 		private readonly ITextBuffer _buffer;
-		private readonly List<Completion> _emojiCompletions;
+		private readonly List<EmojiCompletion> _emojiCompletions;
 		private bool _disposed = false;

 		public EmojiCompletionSource(ITextBuffer buffer, IEmojiStore emojiStore)
@@ -28,14 +72,8 @@
 			_buffer = buffer;

 			_emojiCompletions = emojiStore.Emojis()
-				.Select(EmojiCompletion)
+				.Select(e => new EmojiCompletion(e))
 				.ToList();
-		}
-
-		private static Completion EmojiCompletion(Emoji emoji)
-		{
-			var name = $":{emoji.Name}:";
-			return new Completion(name, name, name, emoji.Bitmap(), name);
 		}

 		public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets)


Rewrite our NuGet Pkg unzipper to not use NuGet.Core

--- src/Squirrel/UpdateManager.ApplyReleases.cs
+++ src/Squirrel/UpdateManager.ApplyReleases.cs
@@ -12,6 +12,8 @@
 using Splat;
 using System.Threading;
 using Squirrel.Shell;
+using ICSharpCode.SharpZipLib.Zip;
+using ICSharpCode.SharpZipLib.Core;

 namespace Squirrel
 {
@@ -211,79 +213,51 @@
                 fixPinnedExecutables(zf.Version.Version);
             }

-            async Task<string> installPackageToAppDir(UpdateInfo updateInfo, ReleaseEntry release)
-            {
-                var pkg = new ZipPackage(Path.Combine(updateInfo.PackageDirectory, release.Filename));
-                var target = getDirectoryForRelease(release.Version);
-
-                // NB: This might happen if we got killed partially through applying the release
-                if (target.Exists) {
-                    this.Log().Warn("Found partially applied release folder, killing it: " + target.FullName);
-                    await Utility.DeleteDirectory(target.FullName);
-                }
-
-                target.Create();
-
-                // Copy all of the files out of the lib/ dirs in the NuGet package
-                // into our target App directory.
-                //
-                // NB: We sort this list in order to guarantee that if a Net20
-                // and a Net40 version of a DLL get shipped, we always end up
-                // with the 4.0 version.
-                this.Log().Info("Writing files to app directory: {0}", target.FullName);
-
-                var toWrite = pkg.GetLibFiles().Where(x => pathIsInFrameworkProfile(x))
-                    .OrderBy(x => x.Path)
-                    .ToList();
-
-                // NB: Because of the above NB, we cannot use ForEachAsync here, we
-                // have to copy these files in-order. Once we fix assembly resolution,
-                // we can kill both of these NBs.
-                await Task.Run(() => toWrite.ForEach(x => copyFileToLocation(target, x)));
-                await pkg.GetContentFiles().ForEachAsync(x => copyFileToLocation(target, x));
-
-                return target.FullName;
-            }
-
-            bool findShortTemporaryDir(out string path)
-            {
-                var dir = Environment.ExpandEnvironmentVariables("%HOMEDRIVE%\\ProgramData\\sqtmp");
-                try {
-                    Directory.CreateDirectory(dir);
-                    path = dir;
-                    return true;
-                } catch (IOException ex) {
-                    this.Log().WarnException("Couldn't create short temp dir, trying normal one", ex);
-                    path = Path.GetTempPath();
-                    return false;
-                }
-            }
-
-            void copyFileToLocation(FileSystemInfo target, IPackageFile x)
-            {
-                var targetPath = Path.Combine(target.FullName, x.EffectivePath);
-
-                var fi = new FileInfo(targetPath);
-                if (fi.Exists) fi.Delete();
-
-                var dir = new DirectoryInfo(Path.GetDirectoryName(targetPath));
-                if (!dir.Exists) dir.Create();
-
-                this.ErrorIfThrows(() => {
-                    using (var inf = x.GetStream())
-                    using (var of = fi.Open(FileMode.CreateNew, FileAccess.Write)) {
-                        inf.CopyTo(of);
-                    }
-                }, "Failed to write file: " + target.FullName);
-            }
-
-            static bool pathIsInFrameworkProfile(IPackageFile packageFile)
-            {
-                if (!packageFile.Path.StartsWith("lib", StringComparison.InvariantCultureIgnoreCase)) {
-                    return false;
-                }
-
-                return true;
+            Task<string> installPackageToAppDir(UpdateInfo updateInfo, ReleaseEntry release)
+            {
+                return Task.Run(async () => {
+                    var zipper = new FastZip();
+                    var target = getDirectoryForRelease(release.Version);
+
+                    // NB: This might happen if we got killed partially through applying the release
+                    if (target.Exists) {
+                        this.Log().Warn("Found partially applied release folder, killing it: " + target.FullName);
+                        await Utility.DeleteDirectory(target.FullName);
+                    }
+
+                    target.Create();
+
+                    this.Log().Info("Writing files to app directory: {0}", target.FullName);
+                    zipper.ExtractZip(
+                        Path.Combine(updateInfo.PackageDirectory, release.Filename),
+                        target.FullName, FastZip.Overwrite.Always, (o) => true, null, @"lib", true);
+
+                    // Move all of the files out of the lib/ dirs in the NuGet package
+                    // into our target App directory.
+                    //
+                    // NB: We sort this list in order to guarantee that if a Net20
+                    // and a Net40 version of a DLL get shipped, we always end up
+                    // with the 4.0 version.
+                    var libDir = target.GetDirectories().First(x => x.Name.Equals("lib", StringComparison.OrdinalIgnoreCase));
+                    var toMove = libDir.GetDirectories().OrderBy(x => x.Name);
+
+                    toMove.ForEach(ld => {
+                        ld.GetDirectories()
+                            .ForEachAsync(subdir => subdir.MoveTo(subdir.FullName.Replace(ld.FullName, target.FullName)))
+                            .Wait();
+
+                        ld.GetFiles()
+                            .ForEachAsync(file => {
+                                var tgt = Path.Combine(target.FullName, file.Name);
+                                this.Log().Info("Moving file {0} to {1}", file.FullName, tgt);
+                                file.MoveTo(tgt);
+                            })
+                            .Wait();
+                    });
+
+                    await Utility.DeleteDirectory(libDir.FullName);
+                    return target.FullName;
+                });
             }

             async Task<ReleaseEntry> createFullPackagesFromDeltas(IEnumerable<ReleaseEntry> releasesToApply, ReleaseEntry currentVersion)
@@ -324,22 +298,6 @@

                 // Recursively combine the rest of them
                 return await createFullPackagesFromDeltas(releasesToApply.Skip(1), entry);
-            }
-
-            void cleanUpOldVersions(Version currentlyExecutingVersion, Version newCurrentVersion)
-            {
-                var directory = new DirectoryInfo(rootAppDirectory);
-                if (!directory.Exists) {
-                    this.Log().Warn("cleanUpOldVersions: the directory '{0}' does not exist", rootAppDirectory);
-                    return;
-                }
-
-                foreach (var v in getReleases()) {
-                    var version = v.Name.ToVersion();
-                    if (version == currentlyExecutingVersion || version == newCurrentVersion) continue;
-
-                    Utility.DeleteDirectoryAtNextReboot(v.FullName);
-                }
             }

             void executeSelfUpdate(Version currentVersion)
@@ -679,7 +637,6 @@

                 return Path.Combine(dir, title + ".lnk");
             }
-
         }
     }
 }


removed code comment

removed code comment

--- JabbR/Infrastructure/TextTransform.cs
+++ JabbR/Infrastructure/TextTransform.cs
@@ -12,7 +12,6 @@
     {
         private readonly IJabbrRepository _repository;
         public const string HashTagPattern = @"(?:(?<=\s)|^)#([A-Za-z0-9-_.]{1,30}\w*)";
-        //public const string HashTagPattern = @"(?:(?<=\s)|^)#(\w*[A-Za-z_-]+\w*)";

         public TextTransform(IJabbrRepository repository)
         {


tests making sure evering thing is coerently wrong..

--- OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs
+++ OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs
@@ -1388,7 +1388,7 @@
                 "\n            LSL_Types.list m = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger(2), new LSL_Types.LSLInteger(3));" +
                 "\n            LSL_Types.Vector3 v = new LSL_Types.Vector3(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0));" +
                 "\n            LSL_Types.Vector3 w = new LSL_Types.Vector3(new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(0.1), new LSL_Types.LSLFloat(0.5));" +
-                "\n            LSL_Types.Quaternion r = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0));" +
+                "\n            LSL_Types.Quaternion r = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(1.0));" +
                 "\n            LSL_Types.Quaternion u = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.8), new LSL_Types.LSLFloat(0.7), new LSL_Types.LSLFloat(0.6), llSomeFunc());" +
                 "\n            LSL_Types.LSLString k = new LSL_Types.LSLString(\"\");" +
                 "\n            LSL_Types.LSLString n = new LSL_Types.LSLString(\"ping\");" +


unified removal

unified removal

--- TIKSN.Framework.Full/Settings/WindowsRegistrySettingsService.cs
+++ TIKSN.Framework.Full/Settings/WindowsRegistrySettingsService.cs
@@ -37,12 +37,12 @@

         public void RemoveLocalSetting(string name)
         {
-            RemoveSetting(RegistryHive.CurrentUser, name);
+            Process<object>(RegistryHive.CurrentUser, name, null, RemoveSetting);
         }

         public void RemoveRoamingSetting(string name)
         {
-            RemoveSetting(RegistryHive.LocalMachine, name);
+            Process<object>(RegistryHive.LocalMachine, name, null, RemoveSetting);
         }

         public void SetLocalSetting<T>(string name, T value)
@@ -86,17 +86,11 @@
             }
         }

-        private void RemoveSetting(RegistryHive hiveKey, string name)
+        private T RemoveSetting<T>(RegistryKey subKey, string name, T value)
         {
-            ValidateOptions();
+            subKey.DeleteValue(name);

-            using (var rootKey = RegistryKey.OpenBaseKey(hiveKey, _options.Value.RegistryView))
-            {
-                using (var registrySubKey = rootKey.OpenSubKey(_options.Value.SubKey))
-                {
-                    registrySubKey.DeleteValue(name);
-                }
-            }
+            return value;
         }

         private T SetSetting<T>(RegistryKey subKey, string name, T value)


currentn -> current

currentn -> current

--- src/TraceEvent/Samples/40_SimpleTraceLog.cs
+++ src/TraceEvent/Samples/40_SimpleTraceLog.cs
@@ -195,7 +195,7 @@
             Out.WriteLine("Zipping the raw files into a single '{0}' file.", dataFileName);

             // At this point you have multiple ETL files that don't have all the information
-            // inside them necessary for analysis off the currentn machine.    To do analysis
+            // inside them necessary for analysis off the current machine.    To do analysis
             // of the machine you need to merge the ETL files (which can be done with
             //        TraceEventSession.MergeInPlace(dataFileName, Out);
             // However this does not get the symbolic information (NGEN PDBS) needed to


use lowercase for issues to make v3 work.

--- OctoNet/Models/Dto/IssueDto.cs
+++ OctoNet/Models/Dto/IssueDto.cs
@@ -6,18 +6,18 @@
     public class IssueDto
     {
         [JsonProperty("title")]
-        public string Title { get; set; }
+        public string title { get; set; }

         [JsonProperty("body")]
-        public string Body { get; set; }
+        public string body { get; set; }

         [JsonProperty("assignee")]
-        public string Assignee { get; set; }
+        public string assignee { get; set; }

         [JsonProperty("milestone")]
-        public string Milestone { get; set; }
+        public string milestone { get; set; }

         [JsonProperty("labels")]
-        public string[] Labels { get; set; }
+        public string[] labels { get; set; }
     }
 }


Remove an error check

Remove an error check

I'm struggling to make sense of this code, and anything I can do to
simplify things will help.

I don't know of any cases where this check matters; unit tests all
pass. Let it go.

--- Source/Pash.System.Management/Pash/Implementation/LocalPipeline.cs
+++ Source/Pash.System.Management/Pash/Implementation/LocalPipeline.cs
@@ -119,9 +119,6 @@
             // TODO: implement script execution
             foreach (Command command in Commands)
             {
-                if (string.IsNullOrEmpty(command.CommandText))
-                    continue;
-
                 CommandProcessorBase commandProcessor;

                 try


Add utility process sub-type support, C#

IdentifyChromeProcesses exists both as a Python script and as a
TraceProcessor written in C#. Eventually I should probably migrate to
just using the C# version, but for now I'm maintaining them both. See
the previous change for a full description of utility-process sub-types.

--- TraceProcessors/IdentifyChromeProcesses/IdentifyChromeProcesses.cs
+++ TraceProcessors/IdentifyChromeProcesses/IdentifyChromeProcesses.cs
@@ -111,6 +111,8 @@

         // Dictionary of Pids and their types.
         var typesByPid = new Dictionary<int, string>();
+        // Dictionary of Pids and their sub-types.
+        var subTypesByPid = new Dictionary<int, string>();

         // Find the space-terminated word after 'type='.
         // Mark the first .* as lazy/ungreedy/reluctant so that if there are multiple
@@ -118,6 +120,8 @@
         // first one will win. Or, at least, that's what the comments in the Python
         // version of this said.
         var r = new Regex(@".*? --type=(?<type>[^ ]*) .*");
+        // Find the utility sub-type, if present.
+        var r_sub = new Regex(@".*? --utility-sub-type=(?<subtype>[^ ]*) .*");
         foreach (var entry in processSummaries)
         {
             var process = entry.Key;
@@ -156,6 +160,10 @@
                 }

                 typesByPid[pid] = type;
+
+                var match_sub = r_sub.Match(process.CommandLine);
+                if (match_sub.Success)
+                    subTypesByPid[pid] = match_sub.Groups["subtype"].ToString();

                 // Retrieve or create the list of processes associated with this
                 // browser (parent) pid.
@@ -336,17 +344,20 @@
                 type.Value.Sort();
                 foreach (var pid in type.Value)
                 {
+                    string subTypeText = "";
+                    if (subTypesByPid.ContainsKey(pid))
+                        subTypeText = " (" + subTypesByPid[pid] + ")";
                     if (showCPUUsage)
                     {
                         Console.Write("\n        ");
                         execTimes.TryGetValue(pid, out CPUUsageDetails details);
                         if (details.contextSwitches > 0)
-                            Console.Write("{0,5} - {1,6} context switches, {2,8:0.00} ms CPU", pid, details.contextSwitches, details.ns / 1e6);
+                            Console.Write("{0,5} - {1,6} context switches, {2,8:0.00} ms CPU{3}", pid, details.contextSwitches, details.ns / 1e6, subTypeText);
                         else
-                            Console.Write("{0,5}", pid);
+                            Console.Write("{0,5}{1}", pid, subTypeText);
                     }
                     else
-                        Console.Write("{0} ", pid);
+                        Console.Write("{0}{1} ", pid, subTypeText);
                 }
                 Console.WriteLine();
             }


Added the action button functionality.

Added the action button functionality.

--- UnityProject/Assets/Scripts/Clothing/Eyewear/NightVisionGoggles.cs
+++ UnityProject/Assets/Scripts/Clothing/Eyewear/NightVisionGoggles.cs
@@ -3,6 +3,7 @@
 using UnityEngine;
 using Mirror;
 using CameraEffects;
+using UI.Action;

 public class NightVisionGoggles : NetworkBehaviour, IServerInventoryMove, ICheckedInteractable<HandActivate>
 {
@@ -18,6 +19,7 @@
 	private bool isOn = true;

 	private Pickupable pickupable;
+	private ItemActionButton actionButton;

 	private void OnStartClient()
 	{
@@ -29,9 +31,20 @@
 		}
 	}
 	private void Awake()
-		{
-			pickupable = GetComponent<Pickupable>();
-		}
+	{
+		pickupable = GetComponent<Pickupable>();
+		actionButton = GetComponent<ItemActionButton>();
+	}
+
+	private void OnEnable()
+	{
+		actionButton.ServerActionClicked += turnOnGoggles;
+	}
+
+	private void OnDisable()
+	{
+		actionButton.ServerActionClicked -= turnOnGoggles;
+	}

 	//IServerInventoryMove should be replaced with IClienInventoryMove but that needs more functionality first
 	public void OnInventoryMoveServer(InventoryMove info)


Changed how blood loss damage is calculated to ensure that too much blood loss will always be fatal.

--- UnityProject/Assets/Scripts/Health/Living/LivingHealthBehaviour.cs
+++ UnityProject/Assets/Scripts/Health/Living/LivingHealthBehaviour.cs
@@ -429,10 +429,11 @@
 	/// Blood Loss and Toxin damage:
 	int CalculateOverallBloodLossDamage()
 	{
+		float maxBloodDmg = Mathf.Abs(HealthThreshold.Dead) + maxHealth;
 		float bloodDmg = 0f;
 		if (bloodSystem.BloodLevel < (int)BloodVolume.SAFE)
 		{
-			bloodDmg = (1f - ((float)bloodSystem.BloodLevel / (float)BloodVolume.NORMAL)) * 100f;
+			bloodDmg = Mathf.Lerp(0f, maxBloodDmg, 1f - (bloodSystem.BloodLevel / (float)BloodVolume.NORMAL));
 		}

 		if (bloodSystem.ToxinLevel > 1f)
@@ -441,7 +442,7 @@
 			//There will need to be some kind of blood / toxin ratio and severity limits determined
 		}

-		return Mathf.RoundToInt(Mathf.Clamp(bloodDmg, 0f, 101f));
+		return Mathf.RoundToInt(Mathf.Clamp(bloodDmg, 0f, maxBloodDmg));
 	}

 	/// ---------------------------


Fix ATI1N and ATI2N after refactor

Fix ATI1N and ATI2N after refactor

--- ValveResourceFormat/Resource/ResourceTypes/TextureDecompressors.cs
+++ ValveResourceFormat/Resource/ResourceTypes/TextureDecompressors.cs
@@ -313,7 +313,7 @@
                 {
                     ulong block1 = r.ReadUInt64();
                     int ofs = ((i * 4) + (j * 4 * w)) * 4;
-                    Decompress8BitBlock(i * 4, w, ofs, block1, data, w);
+                    Decompress8BitBlock(i * 4, w, ofs, block1, data, w * 4);

                     for (int y = 0; y < 4; y++)
                     {
@@ -346,8 +346,8 @@
                     ulong block1 = r.ReadUInt64();
                     ulong block2 = r.ReadUInt64();
                     int ofs = ((i * 4) + (j * 4 * w)) * 4;
-                    Decompress8BitBlock(i * 4, w, ofs + 2, block1, data, w); //r
-                    Decompress8BitBlock(i * 4, w, ofs + 1, block2, data, w); //g
+                    Decompress8BitBlock(i * 4, w, ofs + 2, block1, data, w * 4); //r
+                    Decompress8BitBlock(i * 4, w, ofs + 1, block2, data, w * 4); //g
                     for (int y = 0; y < 4; y++)
                     {
                         for (int x = 0; x < 4; x++)


Change MainSkill* defaults to match Skill.Default

--- WPFSKillTree/Computation/ViewModels/MainSkillSelectionViewModel.cs
+++ WPFSKillTree/Computation/ViewModels/MainSkillSelectionViewModel.cs
@@ -44,13 +44,13 @@
             _skillDefinitions = skillDefinitions;
             var selectedSkillItemSlotStat = builderFactories.MetaStatBuilders.MainSkillItemSlot
                 .BuildToStats(Entity.Character).Single();
-            _selectedSkillItemSlot = nodeFactory.CreateConfiguration(selectedSkillItemSlotStat, new NodeValue(0));
+            _selectedSkillItemSlot = nodeFactory.CreateConfiguration(selectedSkillItemSlotStat, new NodeValue((int) Skill.Default.ItemSlot));
             var selectedSkillSocketIndexStat = builderFactories.MetaStatBuilders.MainSkillSocketIndex
                 .BuildToStats(Entity.Character).Single();
-            _selectedSkillSocketIndex = nodeFactory.CreateConfiguration(selectedSkillSocketIndexStat, new NodeValue(0));
+            _selectedSkillSocketIndex = nodeFactory.CreateConfiguration(selectedSkillSocketIndexStat, new NodeValue(Skill.Default.SocketIndex));
             var selectedSkillSkillIndexStat = builderFactories.MetaStatBuilders.MainSkillSkillIndex
                 .BuildToStats(Entity.Character).Single();
-            _selectedSkillSkillIndex = nodeFactory.CreateConfiguration(selectedSkillSkillIndexStat, new NodeValue(0));
+            _selectedSkillSkillIndex = nodeFactory.CreateConfiguration(selectedSkillSkillIndexStat, new NodeValue(Skill.Default.SkillIndex));
             var selectedSkillPartStat = builderFactories.StatBuilders.MainSkillPart
                 .BuildToStats(Entity.Character).Single();
             _selectedSkillPart = nodeFactory.CreateConfiguration(selectedSkillPartStat, new NodeValue(0));


Squashed 'Externals/Core/' changes from a158f94..ead6b30

ead6b30 Fire Sms changes before ( version before going to QA)

git-subtree-dir: Externals/Core
git-subtree-split: ead6b304c252412e3832f773386ce5012a64732a

--- PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Message/MessageSMSDto.cs
+++ PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Message/MessageSMSDto.cs
@@ -10,6 +10,8 @@
         public string MessageBody { get; set; }
         [DataMember]
         public Guid FromPhoneGuid { get; set; }
+
+        public string RecipentPhoneNumber { get; set; }

 	}
 }


Add an Explicit test that tries to use AsParallel(). It will hang after the exercise is completed, if the solution is the same as mine.

--- ParallelWorkshopTests/Ex10WaitHalfWay/LimitedModeCharacterCounterTests.cs
+++ ParallelWorkshopTests/Ex10WaitHalfWay/LimitedModeCharacterCounterTests.cs
@@ -13,16 +13,28 @@
         [Test]
         public void GetCharCounts_ShouldSucceed_WhenSeveralInstancesRunConcurrently()
         {
+            LimitedModeCharacterCounter[] counters = CreateCounters();
+            Task[] tasks = counters.Select(c => (Task)Task.Factory.StartNew(() => c.GetCharCounts())).ToArray();
+            Task.WaitAll(tasks);
+        }
+
+        [Test, Explicit("This will probably hang, once you make it use your Barrier-based solution. Can you work out why?")]
+        public void GetCharCounts_UsingAsParallel()
+        {
+            LimitedModeCharacterCounter[] counters = CreateCounters();
+            var results = counters.AsParallel().Select(c => c.GetCharCounts()).ToArray();
+            Assert.That(results, Is.Not.Empty);
+        }
+
+        private static LimitedModeCharacterCounter[] CreateCounters()
+        {
             const int NumConcurrent = 10;
             ITextFile[] allFiles = EmbeddedFiles.AllFiles.ToArray();
             IEnumerable<ITextFile> textFiles = Enumerable.Range(0, NumConcurrent).Select(i => allFiles[i % allFiles.Length]);

             // To solve the exercise, you may need to pass additional synchronisation information to the constructor.
             var counters = textFiles.Select(textFile => new LimitedModeCharacterCounter(textFile)).ToArray();
-
-            // When you've succeeded, try changing this to use AsParallel(). Does it still work? It didn't for me. Explain why!
-            Task[] tasks = counters.Select(c => (Task)Task.Factory.StartNew(() => c.GetCharCounts())).ToArray();
-            Task.WaitAll(tasks);
+            return counters;
         }
     }
 }


(vav): recognize archives version 100.

(vav): recognize archives version 100.


Revert "Bug last action is not registered..."

This reverts commit 903f27c2ddeb0e14e142e44c41d7fe3124d46f12.


Copying tweak.

Copying tweak.


Don't ignore dependencies

Don't ignore dependencies

--- LBi.LostDoc.Packaging/AddInManager.cs
+++ LBi.LostDoc.Packaging/AddInManager.cs
@@ -132,7 +132,7 @@
                 if (requiredPackage == null)
                 {
                     requiredPackage = this.Repository.Get(packageReference.Id, false);
-                    this._packageManager.InstallPackage(requiredPackage.NuGetPackage, true, !requiredPackage.IsReleaseVersion);
+                    this._packageManager.InstallPackage(requiredPackage.NuGetPackage, false, !requiredPackage.IsReleaseVersion);
                 }
             }


Cleanup and moving data to json format

Cleanup and moving data to json format

--- src/Umbraco.Web/Editors/MemberController.cs
+++ src/Umbraco.Web/Editors/MemberController.cs
@@ -34,6 +34,7 @@
 using umbraco;
 using Constants = Umbraco.Core.Constants;
 using Examine;
+using Newtonsoft.Json;

 namespace Umbraco.Web.Editors
 {
@@ -237,7 +238,7 @@
                         throw new HttpResponseException(HttpStatusCode.NotFound);
                     }

-                    var provider = Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider();
+                    var provider = Core.Security.MembershipProviderExtensions.GetMembersMembershipProvider();

                     emptyContent = new Member(contentType);
                     emptyContent.AdditionalData["NewPassword"] = Membership.GeneratePassword(provider.MinRequiredPasswordLength, provider.MinRequiredNonAlphanumericCharacters);
@@ -397,7 +398,7 @@
             UpdateName(contentItem);

             //map the custom properties - this will already be set for new entities in our member binder
-            contentItem.PersistedContent.Email = contentItem.Email;
+            contentItem.PersistedContent.Email = contentItem.Email;
             contentItem.PersistedContent.Username = contentItem.Username;

             //use the base method to map the rest of the properties
@@ -800,26 +801,29 @@
             //since we want to write the property types last, we'll re-order this list
             var propertyTypesProperties = memberProperties.Where(x => x.PropertyType == typeof(PropertyCollection)).ToList();
             foreach (var propertyType in propertyTypesProperties)
-            {
                 memberProperties.Remove(propertyType);
-            }
+
             //now re-add them to the end (there will only be one, but we'll do this just to be complete)
             foreach (var propertyTypesProperty in propertyTypesProperties)
-            {
                 memberProperties.Add(propertyTypesProperty);
-            }

             var fileName = $"{member.Name}_{member.Email}.txt";

+            var exportProperties = new List<PropertyExportModel>();
+            foreach (var memberProperty in memberProperties)
+            {
+                var exportItems = ReportWriter.GetPropertyExportItems(member, memberProperty);
+                if (exportItems != null)
+                    exportProperties.AddRange(exportItems);
+            }
+
             using (var memoryStream = new MemoryStream())
             {
                 using (var textWriter = new StreamWriter(memoryStream))
-                {
-                    foreach (var memberProperty in memberProperties)
-                    {
-                        ReportWriter.WritePropertyValue(member, memberProperty, textWriter);
-                    }
-
+                {
+                    var output = JsonConvert.SerializeObject(exportProperties, Formatting.Indented);
+                    textWriter.WriteLine("Member export");
+                    textWriter.Write(output);
                     textWriter.Flush();
                 }

@@ -832,7 +836,6 @@

                 return httpResponseMessage;
             }
-
         }

         private static class ReportWriter
@@ -855,63 +858,60 @@
                 "ContentType",
                 "DeletedDate"
             };
-            private static readonly List<string> PropertiesFilter = new List<string>
-            {
-                "PropertyType",
-                "Version",
-                "Id",
-                "HasIdentity",
-                "Key",
-                "DeletedDate"
-            };
-
-            public static void WritePropertyValue(object owner, PropertyInfo prop, StreamWriter textWriter)
+
+            public static List<PropertyExportModel> GetPropertyExportItems(IMember owner, PropertyInfo prop)
             {
                 if (owner == null) throw new ArgumentNullException(nameof(owner));
                 if (prop == null) throw new ArgumentNullException(nameof(prop));
-                if (textWriter == null) throw new ArgumentNullException(nameof(textWriter));
                 if (MemberPropertyFilter.Contains(prop.Name))
-                    return;
-
+                    return null;
+
+                var exportProperties = new List<PropertyExportModel>();
                 var propertyValue = prop.GetValue(owner, null) ?? string.Empty;
                 var type = prop.PropertyType;

-                if (propertyValue is DateTime time)
-                {
-                    textWriter.WriteLine(prop.Name + " : " + time.ToIsoString());
-                }
-                else if (type == typeof(PropertyCollection))
-                {
-                    textWriter.WriteLine("");
-                    textWriter.WriteLine("PROPERTIES");
-                    textWriter.WriteLine("**********");
-
+                if (type == typeof(PropertyCollection))
+                {
                     if (propertyValue is PropertyCollection propertyCollection)
                     {
                         foreach (var property in propertyCollection)
                         {
-                            var propProperties = property.GetType().GetProperties();
-
-                            textWriter.WriteLine("Name : " + property.PropertyType.Name);
-
-                            foreach (var p in propProperties)
+                            var propertyExportModel = new PropertyExportModel
                             {
-                                if (PropertiesFilter.Contains(p.Name)) continue;
-
-                                WritePropertyValue(property, p, textWriter); //recurse
-                            }
-
-                            textWriter.WriteLine("------------------------");
+                                Id = property.Id,
+                                Alias = property.Alias,
+                                Value = property.Value,
+                                CreateDate = property.CreateDate,
+                                UpdateDate = property.UpdateDate
+                            };
+                            exportProperties.Add(propertyExportModel);
                         }
                     }
                 }
                 else
                 {
-                    textWriter.WriteLine(prop.Name + " : " + propertyValue);
-                }
-            }
-        }
-
-
+                    var propertyExportModel = new PropertyExportModel
+                    {
+                        Name = prop.Name,
+                        Value = propertyValue,
+                        CreateDate = null,
+                        UpdateDate = null
+                    };
+                    exportProperties.Add(propertyExportModel);
+                }
+
+                return exportProperties;
+            }
+        }
+    }
+
+    internal class PropertyExportModel
+    {
+        public int Id { get; set; }
+        public string Alias { get; set; }
+        public string Name { get; set; }
+        public object Value { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
     }
 }


- Update version number in AssemblyInfo of Demos.
Ticket #21

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@1550 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Projects/AxiomDemos/Source/Browser/CommandLine/Properties/AssemblyInfo.cs
+++ Projects/AxiomDemos/Source/Browser/CommandLine/Properties/AssemblyInfo.cs
@@ -26,7 +26,7 @@
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("0.7.1.*")]
+[assembly: AssemblyVersion("0.7.5.*")]

 //
 // In order to sign your assembly you must specify a key to use. Refer to the


Deprecate the Remote property on Branch

Deprecate the Remote property on Branch

--- LibGit2Sharp/Branch.cs
+++ LibGit2Sharp/Branch.cs
@@ -182,6 +182,7 @@
         ///   the tracked branch.
         /// </para>
         /// </summary>
+        [Obsolete("This property is deprecated. Use Repository.Network.Remotes[] using the RemoteName property")]
         public virtual Remote Remote
         {
             get


v2.3.3

v2.3.3

- Refactor all config-related behavior, ensuring personal config is properly loaded.
- Removed ability to resize chirps. Large chirps messed up the banner size.
- Try and send banner "to the back", again.


New clientlib ver

New clientlib ver


Prevent double "file://" prefix in XmlDomExtensions

--- Palaso/Xml/XmlDomExtensions.cs
+++ Palaso/Xml/XmlDomExtensions.cs
@@ -46,12 +46,17 @@

 		private static void AddSheet(this XmlDocument dom, XmlNode head, string cssFilePath, string namespaceIfDesired)
 		{
+			//we're going to add file:// later
+			cssFilePath = cssFilePath.Replace("file:///", "");
+			cssFilePath = cssFilePath.Replace("file://", "");
+			cssFilePath = "file://" + cssFilePath;
+
 			var link = string.IsNullOrEmpty(namespaceIfDesired) ? dom.CreateElement("link") : dom.CreateElement("link", namespaceIfDesired);
 			link.SetAttribute("rel", "stylesheet");

 			if(cssFilePath.Contains(Path.DirectorySeparatorChar.ToString())) // review: not sure about relative vs. complete paths
 			{
-				link.SetAttribute("href", "file://" + cssFilePath);
+				link.SetAttribute("href", cssFilePath);
 			}
 			else //at least with gecko/firefox, something like "file://foo.css" is never found, so just give it raw
 			{


Fix the synchronization task to wait on the next tx/block event.

After the first transaction notifications request was processed, the
task that the top of the loop would wait on was not advanced to the
next item.  This would cause the Task.WhenAny to immediately return
the previously handled transaction notifications task.  After
acquiring the wallet mutex, the task would then block waiting for the
next item in the buffer (which may not exist yet).  This would end up
blocking the UI from accessing the wallet for siginificat periods of
time (until the next block or transaction is notified) and also block
any outstanding account notifications from being handled.

--- Paymetheus.Rpc/WalletClient.cs
+++ Paymetheus.Rpc/WalletClient.cs
@@ -468,6 +468,7 @@
                             {
                                 var changes = notifications.Buffer.Receive();
                                 w.ApplyTransactionChanges(changes);
+                                txChangesTask = notifications.Buffer.OutputAvailableAsync();
                             }
                         }
                     }