[tfs-changeset: 1674357]

[tfs-changeset: 1674357]

--- src/System.Private.CoreLib/src/System/MDArray.cs
+++ src/System.Private.CoreLib/src/System/MDArray.cs
@@ -136,7 +136,7 @@
         public static ref T Address(T[,] array, int index1, int index2)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -156,8 +156,8 @@

         public static void Set(T[,] array, int index1, int index2, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
-            {
+            if (RuntimeHelpers.IsReference<T>())
+            {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }

@@ -215,7 +215,7 @@
         public static ref T Address(T[,,] array, int index1, int index2, int index3)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -235,7 +235,7 @@

         public static void Set(T[,,] array, int index1, int index2, int index3, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -299,7 +299,7 @@
         public static ref T Address(T[,,,] array, int index1, int index2, int index3, int index4)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -319,7 +319,7 @@

         public static void Set(T[,,,] array, int index1, int index2, int index3, int index4, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -388,7 +388,7 @@
         public static ref T Address(T[,,,,] array, int index1, int index2, int index3, int index4, int index5)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -408,7 +408,7 @@

         public static void Set(T[,,,,] array, int index1, int index2, int index3, int index4, int index5, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -482,7 +482,7 @@
         public static ref T Address(T[,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -502,7 +502,7 @@

         public static void Set(T[,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -581,7 +581,7 @@
         public static ref T Address(T[,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -601,7 +601,7 @@

         public static void Set(T[,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -685,7 +685,7 @@
         public static ref T Address(T[,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -705,7 +705,7 @@

         public static void Set(T[,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -794,7 +794,7 @@
         public static ref T Address(T[,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -814,7 +814,7 @@

         public static void Set(T[,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -908,7 +908,7 @@
         public static ref T Address(T[,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -928,7 +928,7 @@

         public static void Set(T[,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1027,7 +1027,7 @@
         public static ref T Address(T[,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1047,7 +1047,7 @@

         public static void Set(T[,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1151,7 +1151,7 @@
         public static ref T Address(T[,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1171,7 +1171,7 @@

         public static void Set(T[,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1280,7 +1280,7 @@
         public static ref T Address(T[,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1300,7 +1300,7 @@

         public static void Set(T[,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1414,7 +1414,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1434,7 +1434,7 @@

         public static void Set(T[,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1553,7 +1553,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1573,7 +1573,7 @@

         public static void Set(T[,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1697,7 +1697,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1717,7 +1717,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -1846,7 +1846,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -1866,7 +1866,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2000,7 +2000,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2020,7 +2020,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2159,7 +2159,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2179,7 +2179,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2323,7 +2323,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2343,7 +2343,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2492,7 +2492,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2512,7 +2512,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2666,7 +2666,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2686,7 +2686,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -2845,7 +2845,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -2865,7 +2865,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -3029,7 +3029,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -3049,7 +3049,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -3218,7 +3218,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -3238,7 +3238,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -3412,7 +3412,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -3432,7 +3432,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -3611,7 +3611,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -3631,7 +3631,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -3815,7 +3815,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27, index28);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -3835,7 +3835,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -4024,7 +4024,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27, index28, index29);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -4044,7 +4044,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -4238,7 +4238,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27, index28, index29, index30);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -4258,7 +4258,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -4457,7 +4457,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30, int index31)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27, index28, index29, index30, index31);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -4477,7 +4477,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30, int index31, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }
@@ -4681,7 +4681,7 @@
         public static ref T Address(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30, int index31, int index32)
         {
             ref T returnValue = ref InternalAddress(array, index1, index2, index3, index4, index5, index6, index7, index8, index9, index10, index11, index12, index13, index14, index15, index16, index17, index18, index19, index20, index21, index22, index23, index24, index25, index26, index27, index28, index29, index30, index31, index32);
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 if (!EETypePtr.EETypePtrOf<T>().FastEquals(array.EETypePtr.ArrayElementType))
                     throw new ArrayTypeMismatchException();
@@ -4701,7 +4701,7 @@

         public static void Set(T[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,] array, int index1, int index2, int index3, int index4, int index5, int index6, int index7, int index8, int index9, int index10, int index11, int index12, int index13, int index14, int index15, int index16, int index17, int index18, int index19, int index20, int index21, int index22, int index23, int index24, int index25, int index26, int index27, int index28, int index29, int index30, int index31, int index32, T value)
         {
-            if (!EETypePtr.EETypePtrOf<T>().IsValueType)
+            if (RuntimeHelpers.IsReference<T>())
             {
                 RuntimeImports.RhCheckArrayStore(array, value);
             }


Use Equals instead of equality operator

Use Equals instead of equality operator

--- src/Utilities/DoNotCatchGeneralUnlessRethrown.cs
+++ src/Utilities/DoNotCatchGeneralUnlessRethrown.cs
@@ -141,7 +141,7 @@

             private bool IsCaughtTypeDisallowed(ITypeSymbol caughtType)
             {
-                return caughtType == null || _disallowedCatchTypes.Any(type => caughtType == type);
+                return caughtType == null || _disallowedCatchTypes.Any(type => caughtType.Equals(type));
             }
         }
     }


Nicifiet command layout

Nicifiet command layout

--- Twitchmote/Forms/FormCommands.Designer.cs
+++ Twitchmote/Forms/FormCommands.Designer.cs
@@ -40,33 +40,33 @@
             //
             // labelTitle
             //
-            this.labelTitle.AutoSize = true;
-            this.labelTitle.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelTitle.Location = new System.Drawing.Point(12, 9);
+            this.labelTitle.Font = new System.Drawing.Font("Pokemon Pixel Font", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.labelTitle.Location = new System.Drawing.Point(18, 9);
             this.labelTitle.Name = "labelTitle";
-            this.labelTitle.Size = new System.Drawing.Size(82, 18);
+            this.labelTitle.Size = new System.Drawing.Size(254, 27);
             this.labelTitle.TabIndex = 0;
             this.labelTitle.Text = "Twitchmote";
+            this.labelTitle.TextAlign = System.Drawing.ContentAlignment.TopCenter;
             //
             // labelCommands
             //
             this.labelCommands.AutoSize = true;
             this.labelCommands.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelCommands.Location = new System.Drawing.Point(12, 45);
+            this.labelCommands.Location = new System.Drawing.Point(12, 69);
             this.labelCommands.Name = "labelCommands";
-            this.labelCommands.Size = new System.Drawing.Size(72, 18);
+            this.labelCommands.Size = new System.Drawing.Size(72, 180);
             this.labelCommands.TabIndex = 1;
-            this.labelCommands.Text = "commands";
+            this.labelCommands.Text = "commands\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n10";
             //
             // labelGame
             //
-            this.labelGame.AutoSize = true;
             this.labelGame.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelGame.Location = new System.Drawing.Point(100, 9);
+            this.labelGame.Location = new System.Drawing.Point(15, 41);
             this.labelGame.Name = "labelGame";
-            this.labelGame.Size = new System.Drawing.Size(45, 18);
+            this.labelGame.Size = new System.Drawing.Size(257, 18);
             this.labelGame.TabIndex = 2;
             this.labelGame.Text = "label1";
+            this.labelGame.TextAlign = System.Drawing.ContentAlignment.TopCenter;
             //
             // timer
             //
@@ -78,7 +78,7 @@
             //
             this.labelTimer.AutoSize = true;
             this.labelTimer.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelTimer.Location = new System.Drawing.Point(12, 27);
+            this.labelTimer.Location = new System.Drawing.Point(193, 266);
             this.labelTimer.Name = "labelTimer";
             this.labelTimer.Size = new System.Drawing.Size(62, 18);
             this.labelTimer.TabIndex = 3;
@@ -88,7 +88,7 @@
             //
             this.labelServerTimeTag.AutoSize = true;
             this.labelServerTimeTag.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelServerTimeTag.Location = new System.Drawing.Point(12, 234);
+            this.labelServerTimeTag.Location = new System.Drawing.Point(12, 266);
             this.labelServerTimeTag.Name = "labelServerTimeTag";
             this.labelServerTimeTag.Size = new System.Drawing.Size(93, 18);
             this.labelServerTimeTag.TabIndex = 4;
@@ -98,7 +98,7 @@
             //
             this.labelServerTime.AutoSize = true;
             this.labelServerTime.Font = new System.Drawing.Font("Pokemon Pixel Font", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelServerTime.Location = new System.Drawing.Point(111, 234);
+            this.labelServerTime.Location = new System.Drawing.Point(111, 266);
             this.labelServerTime.Name = "labelServerTime";
             this.labelServerTime.Size = new System.Drawing.Size(64, 18);
             this.labelServerTime.TabIndex = 5;
@@ -109,7 +109,7 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.ControlText;
-            this.ClientSize = new System.Drawing.Size(284, 261);
+            this.ClientSize = new System.Drawing.Size(284, 293);
             this.Controls.Add(this.labelServerTime);
             this.Controls.Add(this.labelServerTimeTag);
             this.Controls.Add(this.labelTimer);


Offset points and add points outside of area

--- source/CjClutter.ObjLoader.Test/DiamondSquareTests.cs
+++ source/CjClutter.ObjLoader.Test/DiamondSquareTests.cs
@@ -70,9 +70,9 @@

             result.Should().ContainInOrder(new[]
             {
-                0,      1.625,  1,
-                2.625,  3.5,    3.125,
-                4,      4.325,  8
+                0,      2.375,  1,
+                3.375,  3.5,    3.875,
+                4,      6.125,  8
             });
         }


Point release. 1.7.3.2

Point release. 1.7.3.2

--- source/ElasticsearchInside/Properties/AssemblyInfo.cs
+++ source/ElasticsearchInside/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("5f88eacd-89aa-434d-a369-c20564f9b06b")]
-[assembly: AssemblyInformationalVersion("1.7.3.1")]
+[assembly: AssemblyInformationalVersion("1.7.3.2")]
 [assembly: InternalsVisibleTo("ElasticsearchInside.Tests")]


Cleaned up code a bit from previous merge

--- src/ZXing.Net.Mobile/iOS/MobileBarcodeScanner.cs
+++ src/ZXing.Net.Mobile/iOS/MobileBarcodeScanner.cs
@@ -147,22 +147,17 @@

 						viewController.OnScannedResult += barcodeResult => {

-                            ((UIViewController)viewController).InvokeOnMainThread(() =>
-                            {
+                            ((UIViewController)viewController).InvokeOnMainThread(() => {
+
                                 viewController.Cancel();

                                 // Handle error situation that occurs when user manually closes scanner in the same moment that a QR code is detected
-                                try
-                                {
-                                    ((UIViewController) viewController).DismissViewController(true, () =>
-                                    {
+                                try {
+                                    ((UIViewController) viewController).DismissViewController(true, () => {
                                         result = barcodeResult;
                                         scanResultResetEvent.Set();
                                     });
-                                }
-                                catch (ObjectDisposedException)
-
-                                {
+                                } catch (ObjectDisposedException) {
                                     // In all likelihood, iOS has decided to close the scanner at this point. But just in case it executes the
                                     // post-scan code instead, set the result so we will not get a NullReferenceException.
                                     result = barcodeResult;


Removing ANDROID | IOS restriction from PlayGamesHelperObject so things
compile in the editor.

Change-Id: I1e159d51b8356a46c94e0eda05bbb884af2f60f9

--- source/PluginDev/Assets/GooglePlayGames/OurUtils/PlayGamesHelperObject.cs
+++ source/PluginDev/Assets/GooglePlayGames/OurUtils/PlayGamesHelperObject.cs
@@ -13,7 +13,6 @@
 //  See the License for the specific language governing permissions and
 //    limitations under the License.
 // </copyright>
-#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

 namespace GooglePlayGames.OurUtils
 {
@@ -220,4 +219,3 @@
         }
     }
 }
-#endif


Gaming live - online detection change

Gaming live - online detection change

--- Ubiquitous2/Model/Chats/GamingLiveChat.cs
+++ Ubiquitous2/Model/Chats/GamingLiveChat.cs
@@ -376,6 +376,7 @@
             {
                 lock (pingLock)
                 {
+                    Log.WriteInfo("Gaminglive ping to {0}", ChannelName);
                     secondWebSocket = new WebSocketBase();
                     secondWebSocket.Host = webSocket.Host;
                     secondWebSocket.Origin = webSocket.Origin;
@@ -389,13 +390,16 @@

             webSocket.ConnectHandler = () =>
                 {
+                    if( JoinCallback != null )
+                        JoinCallback(this);
+                    isJoined = true;
                     Chat.Status.IsLoggedIn = !Chat.IsAnonymous;
                     Chat.Status.IsConnected = true;
                     Chat.Status.IsStarting = false;
                 };

             webSocket.DisconnectHandler = () =>
-            {
+            {
                 if (LeaveCallback != null)
                     LeaveCallback(this);
             };
@@ -406,11 +410,12 @@
         }
         private void ReadRawMessage(string rawMessage)
         {
-            if (!isJoined && JoinCallback != null)
-            {
-                JoinCallback(this);
-                isJoined = true;
-            }
+            Log.WriteInfo("Gaminglive raw message: {0}", rawMessage);
+            //if (!isJoined && JoinCallback != null)
+            //{
+            //    JoinCallback(this);
+            //    isJoined = true;
+            //}

             if( !String.IsNullOrWhiteSpace(rawMessage))
             {
@@ -449,6 +454,7 @@
         public override void Leave()
         {
             Log.WriteInfo("Gaminglive leaving {0}", ChannelName);
+            pingTimer.Change(Timeout.Infinite, Timeout.Infinite);
             statsPoller.Stop();
             webSocket.Disconnect();
         }


Internal change.

Internal change.

PiperOrigin-RevId: 284715129

--- source/plugin/Assets/GoogleMobileAds/Api/MobileAds.cs
+++ source/plugin/Assets/GoogleMobileAds/Api/MobileAds.cs
@@ -13,6 +13,8 @@
 // limitations under the License.

 using System;
+
+using UnityEngine;

 using GoogleMobileAds.Common;


Updated MultiValueFacetDataCache.cs to 4.0.2 compatibility.

--- src/BoboBrowse.Net/BoboBrowse.Net/Facets/Data/MultiValueFacetDataCache.cs
+++ src/BoboBrowse.Net/BoboBrowse.Net/Facets/Data/MultiValueFacetDataCache.cs
@@ -17,7 +17,7 @@
 //* See the License for the specific language governing permissions and
 //* limitations under the License.

-// Version compatibility level: 3.2.0
+// Version compatibility level: 4.0.2
 namespace BoboBrowse.Net.Facets.Data
 {
     using BoboBrowse.Net.Facets.Range;
@@ -64,7 +64,7 @@
             return _nestedArray.GetNumItems(docid);
         }

-        public override void Load(string fieldName, IndexReader reader, TermListFactory listFactory)
+        public override void Load(string fieldName, AtomicReader reader, TermListFactory listFactory)
         {
             this.Load(fieldName, reader, listFactory, new BoboSegmentReader.WorkArea());
         }
@@ -76,109 +76,69 @@
         /// <param name="reader"></param>
         /// <param name="listFactory"></param>
         /// <param name="workArea"></param>
-        public virtual void Load(string fieldName, IndexReader reader, TermListFactory listFactory, BoboSegmentReader.WorkArea workArea)
-        {
-            long t0 = Environment.TickCount;
+        public virtual void Load(string fieldName, AtomicReader reader, TermListFactory listFactory, BoboSegmentReader.WorkArea workArea)
+        {
+            string field = string.Intern(fieldName);
             int maxdoc = reader.MaxDoc;
             BigNestedIntArray.BufferedLoader loader = GetBufferedLoader(maxdoc, workArea);

-            TermEnum tenum = null;
-            TermDocs tdoc = null;
             ITermValueList list = (listFactory == null ? (ITermValueList)new TermStringList() : listFactory.CreateTermList());
             List<int> minIDList = new List<int>();
             List<int> maxIDList = new List<int>();
             List<int> freqList = new List<int>();
             OpenBitSet bitset = new OpenBitSet();
-            int negativeValueCount = GetNegativeValueCount(reader, string.Intern(fieldName));
-            int t = 0; // current term number
+            int negativeValueCount = GetNegativeValueCount(reader, field);
+            int t = 1; // valid term id starts from 1
             list.Add(null);
             minIDList.Add(-1);
             maxIDList.Add(-1);
             freqList.Add(0);
-            t++;

             _overflow = false;
+            Terms terms = reader.Terms(field);
+            if (terms != null)
+            {
+                TermsEnum termsEnum = terms.Iterator(null);
+                BytesRef text;
+                while ((text = termsEnum.Next()) != null)
+                {
+                    string strText = text.Utf8ToString();
+                    list.Add(strText);
+
+                    Term term = new Term(field, strText);
+                    DocsEnum docsEnum = reader.TermDocsEnum(term);
+                    int df = 0;
+                    int minID = -1;
+                    int maxID = -1;
+                    int docID = -1;
+                    int valId = (t - 1 < negativeValueCount) ? (negativeValueCount - t + 1) : t;
+                    while ((docID = docsEnum.NextDoc()) != DocsEnum.NO_MORE_DOCS)
+                    {
+                        df++;
+                        if (!loader.Add(docID, valId)) LogOverflow(fieldName);
+                        minID = docID;
+                        bitset.FastSet(docID);
+                        while (docsEnum.NextDoc() != DocsEnum.NO_MORE_DOCS)
+                        {
+                            docID = docsEnum.DocID();
+                            df++;
+                            if (!loader.Add(docID, valId)) LogOverflow(fieldName);
+                            bitset.FastSet(docID);
+                        }
+                        maxID = docID;
+                    }
+                    freqList.Add(df);
+                    minIDList.Add(minID);
+                    maxIDList.Add(maxID);
+                    t++;
+                }
+            }
+
+            list.Seal();
+
             try
             {
-                tdoc = reader.TermDocs();
-                tenum = reader.Terms(new Term(fieldName, ""));
-                if (tenum != null)
-                {
-                    do
-                    {
-                        Term term = tenum.Term;
-                        if (term == null || !fieldName.Equals(term.Field))
-                            break;
-
-                        string val = term.Text;
-
-                        if (val != null)
-                        {
-                            list.Add(val);
-
-                            tdoc.Seek(tenum);
-                            //freqList.add(tenum.docFreq()); // removed because the df doesn't take into account the num of deletedDocs
-                            int df = 0;
-                            int minID = -1;
-                            int maxID = -1;
-                            int valId = (t - 1 < negativeValueCount) ? (negativeValueCount - t + 1) : t;
-                            if (tdoc.Next())
-                            {
-                                df++;
-                                int docid = tdoc.Doc;
-
-                                if (!loader.Add(docid, valId))
-                                    LogOverflow(fieldName);
-                                minID = docid;
-                                bitset.Set(docid);
-                                while (tdoc.Next())
-                                {
-                                    df++;
-                                    docid = tdoc.Doc;
-
-                                    if (!loader.Add(docid, valId))
-                                        LogOverflow(fieldName);
-                                    bitset.Set(docid);
-                                }
-                                maxID = docid;
-                            }
-                            freqList.Add(df);
-                            minIDList.Add(minID);
-                            maxIDList.Add(maxID);
-                        }
-
-                        t++;
-                    }
-                    while (tenum.Next());
-                }
-            }
-            finally
-            {
-                try
-                {
-                    if (tdoc != null)
-                    {
-                        tdoc.Dispose();
-                    }
-                }
-                finally
-                {
-                    if (tenum != null)
-                    {
-                        tenum.Dispose();
-                    }
-                }
-            }
-
-            list.Seal();
-
-            try
-            {
                 _nestedArray.Load(maxdoc + 1, loader);
-            }
-            catch (System.IO.IOException e)
-            {
-                throw e;
             }
             catch (Exception e)
             {
@@ -191,24 +151,21 @@
             this.maxIDs = maxIDList.ToArray();

             int doc = 0;
-            while (doc <= maxdoc && !_nestedArray.Contains(doc, 0, true))
+            while (doc < maxdoc && !_nestedArray.Contains(doc, 0, true))
             {
                 ++doc;
             }
-            if (doc <= maxdoc)
+            if (doc < maxdoc)
             {
                 this.minIDs[0] = doc;
-                doc = maxdoc;
-                while (doc > 0 && !_nestedArray.Contains(doc, 0, true))
+                doc = maxdoc - 1;
+                while (doc >= 0 && !_nestedArray.Contains(doc, 0, true))
                 {
                     --doc;
                 }
-                if (doc > 0)
-                {
-                    this.maxIDs[0] = doc;
-                }
-            }
-            this.freqs[0] = maxdoc + 1 - (int)bitset.Cardinality();
+                this.maxIDs[0] = doc;
+            }
+            this.freqs[0] = maxdoc - (int)bitset.Cardinality();
         }

         /// <summary>
@@ -218,33 +175,28 @@
         /// <param name="reader"></param>
         /// <param name="listFactory"></param>
         /// <param name="sizeTerm"></param>
-        public virtual void Load(string fieldName, IndexReader reader, TermListFactory listFactory, Term sizeTerm)
-        {
+        public virtual void Load(string fieldName, AtomicReader reader, TermListFactory listFactory, Term sizeTerm)
+        {
+            string field = string.Intern(fieldName);
             int maxdoc = reader.MaxDoc;
             BigNestedIntArray.Loader loader = new AllocOnlyLoader(_maxItems, sizeTerm, reader);
-            int negativeValueCount = GetNegativeValueCount(reader, string.Intern(fieldName));
+            int negativeValueCount = GetNegativeValueCount(reader, field);
             try
             {
                 _nestedArray.Load(maxdoc + 1, loader);
             }
-            catch (System.IO.IOException e)
-            {
-                throw e;
-            }
             catch (Exception e)
             {
                 throw new RuntimeException("failed to load due to " + e.ToString(), e);
             }

-            TermEnum tenum = null;
-            TermDocs tdoc = null;
             ITermValueList list = (listFactory == null ? (ITermValueList)new TermStringList() : listFactory.CreateTermList());
             List<int> minIDList = new List<int>();
             List<int> maxIDList = new List<int>();
             List<int> freqList = new List<int>();
             OpenBitSet bitset = new OpenBitSet();

-            int t = 0; // current term number
+            int t = 1; // valid term id starts from 1
             list.Add(null);
             minIDList.Add(-1);
             maxIDList.Add(-1);
@@ -252,73 +204,44 @@
             t++;

             _overflow = false;
-            try
-            {
-                tdoc = reader.TermDocs();
-                tenum = reader.Terms(new Term(fieldName, ""));
-                if (tenum != null)
-                {
-                    do
+
+            Terms terms = reader.Terms(field);
+            if (terms != null)
+            {
+                TermsEnum termsEnum = terms.Iterator(null);
+                BytesRef text;
+                while ((text = termsEnum.Next()) != null)
+                {
+                    string strText = text.Utf8ToString();
+                    list.Add(strText);
+
+                    Term term = new Term(field, strText);
+                    DocsEnum docsEnum = reader.TermDocsEnum(term);
+
+                    int df = 0;
+                    int minID = -1;
+                    int maxID = -1;
+                    int docID = -1;
+                    while ((docID = docsEnum.NextDoc()) != DocsEnum.NO_MORE_DOCS)
                     {
-                        Term term = tenum.Term;
-                        if (term == null || !fieldName.Equals(term.Field))
-                            break;
-
-                        string val = term.Text;
-
-                        if (val != null)
+                        df++;
+                        if (!_nestedArray.AddData(docID, t)) LogOverflow(fieldName);
+                        minID = docID;
+                        bitset.FastSet(docID);
+                        int valId = (t - 1 < negativeValueCount) ? (negativeValueCount - t + 1) : t;
+                        while (docsEnum.NextDoc() != DocsEnum.NO_MORE_DOCS)
                         {
-                            list.Add(val);
-
-                            tdoc.Seek(tenum);
-                            //freqList.add(tenum.docFreq()); // removed because the df doesn't take into account the num of deletedDocs
-                            int df = 0;
-                            int minID = -1;
-                            int maxID = -1;
-                            if (tdoc.Next())
-                            {
-                                df++;
-                                int docid = tdoc.Doc;
-                                if (!_nestedArray.AddData(docid, t))
-                                    LogOverflow(fieldName);
-                                minID = docid;
-                                bitset.FastSet(docid);
-                                int valId = (t - 1 < negativeValueCount) ? (negativeValueCount - t + 1) : t;
-                                while (tdoc.Next())
-                                {
-                                    df++;
-                                    docid = tdoc.Doc;
-                                    if (!_nestedArray.AddData(docid, valId))
-                                        LogOverflow(fieldName);
-                                    bitset.FastSet(docid);
-                                }
-                                maxID = docid;
-                            }
-                            freqList.Add(df);
-                            minIDList.Add(minID);
-                            maxIDList.Add(maxID);
+                            docID = docsEnum.DocID();
+                            df++;
+                            if (!_nestedArray.AddData(docID, valId)) LogOverflow(fieldName);
+                            bitset.FastSet(docID);
                         }
-
-                        t++;
+                        maxID = docID;
                     }
-                    while (tenum.Next());
-                }
-            }
-            finally
-            {
-                try
-                {
-                    if (tdoc != null)
-                    {
-                        tdoc.Dispose();
-                    }
-                }
-                finally
-                {
-                    if (tenum != null)
-                    {
-                        tenum.Dispose();
-                    }
+                    freqList.Add(df);
+                    minIDList.Add(minID);
+                    maxIDList.Add(maxID);
+                    t++;
                 }
             }

@@ -330,24 +253,21 @@
             this.maxIDs = maxIDList.ToArray();

             int doc = 0;
-            while (doc <= maxdoc && !_nestedArray.Contains(doc, 0, true))
+            while (doc < maxdoc && !_nestedArray.Contains(doc, 0, true))
             {
                 ++doc;
             }
-            if (doc <= maxdoc)
+            if (doc < maxdoc)
             {
                 this.minIDs[0] = doc;
-                doc = maxdoc;
-                while (doc > 0 && !_nestedArray.Contains(doc, 0, true))
+                doc = maxdoc - 1;
+                while (doc >= 0 && !_nestedArray.Contains(doc, 0, true))
                 {
                     --doc;
                 }
-                if (doc > 0)
-                {
-                    this.maxIDs[0] = doc;
-                }
-            }
-            this.freqs[0] = maxdoc + 1 - (int)bitset.Cardinality();
+                this.maxIDs[0] = doc;
+            }
+            this.freqs[0] = maxdoc - (int)bitset.Cardinality();
         }

         protected virtual void LogOverflow(string fieldName)
@@ -398,11 +318,11 @@
         /// </summary>
         public sealed class AllocOnlyLoader : BigNestedIntArray.Loader
         {
-            private IndexReader _reader;
-            private Term _sizeTerm;
-            private int _maxItems;
-
-            public AllocOnlyLoader(int maxItems, Term sizeTerm, IndexReader reader)
+            private readonly AtomicReader _reader;
+            private readonly Term _sizeTerm;
+            private readonly int _maxItems;
+
+            public AllocOnlyLoader(int maxItems, Term sizeTerm, AtomicReader reader)
             {
                 _maxItems = Math.Min(maxItems, BigNestedIntArray.MAX_ITEMS);
                 _sizeTerm = sizeTerm;
@@ -411,30 +331,20 @@

             public override void Load()
             {
-                TermPositions tp = null;
-                byte[] payloadBuffer = new byte[4]; // four bytes for an int
-                try
-                {
-                    tp = _reader.TermPositions(_sizeTerm);
-
-                    if (tp == null)
-                        return;
-
-                    while (tp.Next())
+                DocsAndPositionsEnum docPosEnum = _reader.TermPositionsEnum(_sizeTerm);
+                if (docPosEnum == null)
+                {
+                    return;
+                }
+                int docID = -1;
+                while ((docID = docPosEnum.NextDoc()) != DocsEnum.NO_MORE_DOCS)
+                {
+                    if (docPosEnum.Freq() > 0)
                     {
-                        if (tp.Freq > 0)
-                        {
-                            tp.NextPosition();
-                            tp.GetPayload(payloadBuffer, 0);
-                            int len = BytesToInt(payloadBuffer);
-                            Allocate(tp.Doc, Math.Min(len, _maxItems), true);
-                        }
+                        docPosEnum.NextPosition();
+                        int len = BytesToInt(docPosEnum.Payload.Bytes);
+                        Allocate(docID, Math.Min(len, _maxItems), true);
                     }
-                }
-                finally
-                {
-                    if (tp != null)
-                        tp.Dispose();
                 }
             }

@@ -447,16 +357,16 @@

     public sealed class MultiFacetDocComparatorSource : DocComparatorSource
     {
-        private MultiDataCacheBuilder cacheBuilder;
+        private readonly MultiDataCacheBuilder cacheBuilder;
         public MultiFacetDocComparatorSource(MultiDataCacheBuilder multiDataCacheBuilder)
         {
             cacheBuilder = multiDataCacheBuilder;
         }

-        public override DocComparator GetComparator(IndexReader reader, int docbase)
-        {
-            if (!reader.GetType().Equals(typeof(BoboSegmentReader)))
-                throw new ArgumentException("reader must be instance of BoboIndexReader");
+        public override DocComparator GetComparator(AtomicReader reader, int docbase)
+        {
+            if (!(reader is BoboSegmentReader))
+                throw new ArgumentException("reader must be instance of " + typeof(BoboSegmentReader).Name);
             BoboSegmentReader boboReader = (BoboSegmentReader)reader;
             MultiValueFacetDataCache dataCache = (MultiValueFacetDataCache)cacheBuilder.Build(boboReader);
             return new MultiFacetDocComparator(dataCache);


Make OnInitializeAsync synchronous because of its nature. This closes #1152 (#1153)

--- src/Client/Xamarin/Bit.Client.Xamarin.Prism/ViewModel/BitViewModelBase.cs
+++ src/Client/Xamarin/Bit.Client.Xamarin.Prism/ViewModel/BitViewModelBase.cs
@@ -141,7 +141,7 @@
             try
             {
                 await Task.Yield();
-                await OnInitializeAsync(parameters);
+                OnInitialize(parameters);
             }
             catch (Exception exp)
             {
@@ -149,9 +149,9 @@
             }
         }

-        public virtual Task OnInitializeAsync(INavigationParameters parameters)
+        public virtual void OnInitialize(INavigationParameters parameters)
         {
-            return Task.CompletedTask;
+
         }

         public void OnNavigatedTo(INavigationContext navigationContext)


Avoid NRE stopping jobs on shutdown (BGO #587373)

--- src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs
+++ src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs
@@ -89,6 +89,10 @@
                 Dialog.Respond(Gtk.ResponseType.Ok);
                 return;
             }
+
+            if (ListView == null || ListView.Model == null) {
+                return;
+            }

             for(int i = 0, n = ListView.Model.IterNChildren(); i < n; i++) {
                 TreeIter iter;


Fixed RequireNsfwAttribute definition

Fixed RequireNsfwAttribute definition

--- src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs
+++ src/Discord.Net.Commands/Attributes/Preconditions/RequireNsfwAttribute.cs
@@ -9,7 +9,7 @@
     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
     public class RequireNsfwAttribute : PreconditionAttribute
     {
-        public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IDependencyMap map)
+        public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services)
         {
             if (context.Channel.IsNsfw)
                 return Task.FromResult(PreconditionResult.FromSuccess());


Add tesT

Add tesT

--- src/EditorFeatures/CSharpTest/SimplifyTypeNames/SimplifyTypeNamesTests.cs
+++ src/EditorFeatures/CSharpTest/SimplifyTypeNames/SimplifyTypeNamesTests.cs
@@ -1798,6 +1798,48 @@

         [WorkItem(542100, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542100")]
         [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSimplifyTypeNames)]
+        public async Task TestPreventSimplificationToNameInCurrentScope2()
+        {
+            await TestInRegularAndScript1Async(
+@"namespace N
+{
+    class Program
+    {
+        class Goo
+        {
+            public static void Bar()
+            {
+            }
+        }
+
+        static void Main(int Goo)
+        {
+            [|N.Program.Goo.Bar|]();
+        }
+    }
+}",
+
+@"namespace N
+{
+    class Program
+    {
+        class Goo
+        {
+            public static void Bar()
+            {
+            }
+        }
+
+        static void Main(int Goo)
+        {
+            Program.Goo.Bar();
+        }
+    }
+}");
+        }
+
+        [WorkItem(542100, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542100")]
+        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSimplifyTypeNames)]
         public async Task TestAllowSimplificationToNameInNestedScope()
         {
             await TestInRegularAndScriptAsync(


Deconstruct.

Deconstruct.

--- src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Searcher.cs
+++ src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Searcher.cs
@@ -122,14 +122,12 @@

                 // Now, process all visible docs that were not from the active project.
                 var tasks = new List<Task>();
-                foreach (var group in visibleDocs.GroupBy(d => d.Project))
-                {
-                    var currentProject = group.Key;
-
+                foreach (var (currentProject, priorityDocs) in visibleDocs.GroupBy(d => d.Project))
+                {
                     // make sure we only process this project if we didn't already process it above.
                     if (processedProjects.Add(currentProject))
                     {
-                        tasks.Add(Task.Run(() => SearchAsync(currentProject, group.ToImmutableArray()), _cancellationToken));
+                        tasks.Add(Task.Run(() => SearchAsync(currentProject, priorityDocs.ToImmutableArray()), _cancellationToken));
                     }
                 }


made navigate to to report partial load information

--- src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Searcher.cs
+++ src/EditorFeatures/Core.Wpf/NavigateTo/NavigateToItemProvider.Searcher.cs
@@ -6,9 +6,9 @@
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.CodeAnalysis.Host;
 using Microsoft.CodeAnalysis.Internal.Log;
 using Microsoft.CodeAnalysis.NavigateTo;
-using Microsoft.CodeAnalysis.PooledObjects;
 using Microsoft.CodeAnalysis.Shared.TestHooks;
 using Microsoft.CodeAnalysis.Shared.Utilities;
 using Microsoft.CodeAnalysis.Text.Shared.Extensions;
@@ -91,7 +91,18 @@
                 }
                 finally
                 {
-                    _callback.Done();
+                    var service = _solution.Workspace.Services.GetService<IWorkspaceStatusService>();
+                    if (!await service.IsFullyLoadedAsync(_cancellationToken).ConfigureAwait(false) &&
+                        _callback is INavigateToCallback2 callback2)
+                    {
+                        // providing this extra information will make UI to show indication to users
+                        // that result might not contain full data
+                        callback2.Done(IncompleteReason.SolutionLoading);
+                    }
+                    else
+                    {
+                        _callback.Done();
+                    }
                 }
             }


Cleaned up double-check pattern

Cleaned up double-check pattern

--- src/Elasticsearch.Net.Aws/Elasticsearch.Net.Aws/InstanceProfileService.cs
+++ src/Elasticsearch.Net.Aws/Elasticsearch.Net.Aws/InstanceProfileService.cs
@@ -12,34 +12,31 @@
         private const string Server = "http://169.254.169.254";
         private const string RolesPath = "/latest/meta-data/iam/security-credentials/";
         private const string SuccessCode = "Success";
-        private static InstanceProfileCredentials _cachedCredentials;
+        private static volatile InstanceProfileCredentials _cachedCredentials;
         private static readonly object CacheLock = new object();

         internal static InstanceProfileCredentials GetCredentials()
         {
             var cachedCredentials = GetCachedCredentials();
-            if (cachedCredentials != null)
-                return cachedCredentials;
+            if (cachedCredentials != null) return cachedCredentials;

             lock (CacheLock)
             {
-                if (GetCachedCredentials() == null)
-                {
-                    var role = GetFirstRole();
-                    if (role == null) return null;
-                    var json = GetContents(new Uri(Server + RolesPath + role));
-                    var credentials = JsonConvert.DeserializeObject<InstanceProfileCredentials>(json);
+                cachedCredentials = GetCachedCredentials();
+                if (cachedCredentials != null) return cachedCredentials;

-                    if (credentials.Code != SuccessCode)
-                        return null;
+                var role = GetFirstRole();
+                if (role == null) return null;
+                var json = GetContents(new Uri(Server + RolesPath + role));
+                var credentials = JsonConvert.DeserializeObject<InstanceProfileCredentials>(json);

-                    credentials.LastObtained = DateTime.UtcNow;
+                if (credentials.Code != SuccessCode)
+                    return null;

-                    _cachedCredentials = credentials;
-                }
+                credentials.LastObtained = DateTime.UtcNow;
+
+                return _cachedCredentials = credentials;
             }
-
-            return GetCachedCredentials();
         }

         private static InstanceProfileCredentials GetCachedCredentials()


Add functionality to allow for start.span and startspan in AnalyzeIfStatement

--- src/MetaCompilation/MetaCompilation/MetaCompilation/DiagnosticAnalyzer.cs
+++ src/MetaCompilation/MetaCompilation/MetaCompilation/DiagnosticAnalyzer.cs
@@ -1395,16 +1395,46 @@
                     return emptyResult;
                 }

-                var expressionName = memberExpression.Expression as IdentifierNameSyntax;
-                if (expressionName == null || expressionName.Identifier.Text != keywordIdentifierToken.Text)
-                {
-                    return emptyResult;
-                }
-
-                var expressionMember = memberExpression.Name as IdentifierNameSyntax;
-                if (expressionMember == null || expressionMember.Identifier.Text != "SpanStart")
-                {
-                    return emptyResult;
+                var identifierExpressionName = memberExpression.Expression as IdentifierNameSyntax;
+                var memberExpressionName = memberExpression.Expression as MemberAccessExpressionSyntax;
+                if (identifierExpressionName == null && memberExpressionName == null)
+                {
+                    return emptyResult;
+                }
+
+                if (identifierExpressionName != null)
+                {
+                    if (identifierExpressionName.Identifier.Text != keywordIdentifierToken.Text)
+                    {
+                        return emptyResult;
+                    }
+
+                    var expressionMember = memberExpression.Name as IdentifierNameSyntax;
+                    if (expressionMember == null || expressionMember.Identifier.Text != "SpanStart")
+                    {
+                        return emptyResult;
+                    }
+                }
+
+                if (memberExpressionName != null)
+                {
+                    var identifierExpression = memberExpressionName.Expression as IdentifierNameSyntax;
+                    if (identifierExpression == null || identifierExpression.Identifier.Text != keywordIdentifierToken.Text)
+                    {
+                        return emptyResult;
+                    }
+
+                    var memberName = memberExpressionName.Name as IdentifierNameSyntax;
+                    if (memberName == null || memberName.Identifier.Text != "Span")
+                    {
+                        return emptyResult;
+                    }
+
+                    var finalName = memberExpression.Name as IdentifierNameSyntax;
+                    if (finalName == null || finalName.Identifier.Text != "Start")
+                    {
+                        return emptyResult;
+                    }
                 }

                 return startToken;
@@ -1439,16 +1469,46 @@
                     return emptyResult;
                 }

-                var expressionName = memberExpression.Expression as IdentifierNameSyntax;
-                if (expressionName == null || expressionName.Identifier.Text != openParenToken.Text)
-                {
-                    return emptyResult;
-                }
-
-                var expressionMember = memberExpression.Name as IdentifierNameSyntax;
-                if (expressionMember == null || expressionMember.Identifier.Text != "SpanStart")
-                {
-                    return emptyResult;
+                var identifierExpressionName = memberExpression.Expression as IdentifierNameSyntax;
+                var memberExpressionName = memberExpression.Expression as MemberAccessExpressionSyntax;
+                if (identifierExpressionName == null && memberExpressionName == null)
+                {
+                    return emptyResult;
+                }
+
+                if (identifierExpressionName != null)
+                {
+                    if (identifierExpressionName.Identifier.Text != openParenToken.Text)
+                    {
+                        return emptyResult;
+                    }
+
+                    var expressionMember = memberExpression.Name as IdentifierNameSyntax;
+                    if (expressionMember == null || expressionMember.Identifier.Text != "SpanStart")
+                    {
+                        return emptyResult;
+                    }
+                }
+
+                if (memberExpressionName != null)
+                {
+                    var identifierExpression = memberExpressionName.Expression as IdentifierNameSyntax;
+                    if (identifierExpression == null || identifierExpression.Identifier.Text != openParenToken.Text)
+                    {
+                        return emptyResult;
+                    }
+
+                    var memberName = memberExpressionName.Name as IdentifierNameSyntax;
+                    if (memberName == null || memberName.Identifier.Text != "Span")
+                    {
+                        return emptyResult;
+                    }
+
+                    var finalName = memberExpression.Name as IdentifierNameSyntax;
+                    if (finalName == null || finalName.Identifier.Text != "Start")
+                    {
+                        return emptyResult;
+                    }
                 }

                 return endToken;


error logging for .iam

error logging for .iam

--- src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs
+++ src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs
@@ -19,7 +19,7 @@
         [Group]
         public class SelfAssignedRolesCommands
         {
-
+
             [NadekoCommand, Usage, Description, Aliases]
             [RequireContext(ContextType.Guild)]
             [RequirePermission(GuildPermission.ManageMessages)]
@@ -183,9 +183,10 @@
                 {
                     await guildUser.AddRolesAsync(role).ConfigureAwait(false);
                 }
-                catch (Exception)
+                catch (Exception ex)
                 {
                     await channel.SendMessageAsync($":anger:`I am unable to add that role to you. I can't add roles to owners or other roles higher than my role in the role hierarchy.`").ConfigureAwait(false);
+                    Console.WriteLine(ex);
                     return;
                 }
                 var msg = await channel.SendMessageAsync($":ok:You now have {role.Name} role.").ConfigureAwait(false);


DefaultProcessorType - makes static and adds lock

As discussed on PR #223 review: https://github.com/leekelleher/umbraco-ditto/pull/223#discussion_r136792514

--- src/Our.Umbraco.Ditto/ComponentModel/Processors/DittoProcessorRegistry.cs
+++ src/Our.Umbraco.Ditto/ComponentModel/Processors/DittoProcessorRegistry.cs
@@ -28,7 +28,12 @@
         /// <summary>
         /// The default processor type, (defaults to `UmbracoProperty`).
         /// </summary>
-        private Type DefaultProcessorType = typeof(UmbracoPropertyAttribute);
+        private static Type DefaultProcessorType = typeof(UmbracoPropertyAttribute);
+
+        /// <summary>
+        /// The lock object to make DefaultProcessorType access thread safe.
+        /// </summary>
+        private static readonly object DefaultProcessorTypeLock = new object();

         /// <summary>
         /// Prevents a default instance of the <see cref="DittoProcessorRegistry"/> class from being created.
@@ -57,7 +62,10 @@
         public void RegisterDefaultProcessorType<TProcessorAttributeType>()
             where TProcessorAttributeType : DittoProcessorAttribute, new()
         {
-            this.DefaultProcessorType = typeof(TProcessorAttributeType);
+            lock (DefaultProcessorTypeLock)
+            {
+                DefaultProcessorType = typeof(TProcessorAttributeType);
+            }
         }

         /// <summary>
@@ -108,7 +116,10 @@
                 return attr.ProcessorType;
             }

-            return this.DefaultProcessorType;
+            lock (DefaultProcessorTypeLock)
+            {
+                return DefaultProcessorType;
+            }
         }

         /// <summary>


Moving the check

Moving the check

--- src/Persistence/MassTransit.MongoDbIntegration/Audit/MongoDbAuditStore.cs
+++ src/Persistence/MassTransit.MongoDbIntegration/Audit/MongoDbAuditStore.cs
@@ -38,14 +38,14 @@

         static MongoDbAuditStore()
         {
+            if (BsonClassMap.IsClassMapRegistered(typeof(AuditDocument)))
+                return;
+
             // easiest way to metadata since keys wont become element names, therefore subject to validation
             // will allow keys like $correlationId to be kept
             var headersSerializer = new DictionaryInterfaceImplementerSerializer<AuditHeaders, string, string>(
                 DictionaryRepresentation.ArrayOfDocuments
             );
-
-            if (BsonClassMap.IsClassMapRegistered(typeof(AuditDocument)))
-                return;

             BsonClassMap.RegisterClassMap<AuditDocument>(x =>
             {


Compile Expressions stelem & ldelem for enums as underlying type.

Currently the larger fully-typed version is used, but they can be
loaded and stored as their underlying types, with shorter codes which
is also close to the C# compiler's behaviour.

--- src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
+++ src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/ILGen.cs
@@ -192,10 +192,6 @@
             if (!type.GetTypeInfo().IsValueType)
             {
                 il.Emit(OpCodes.Ldelem_Ref);
-            }
-            else if (type.GetTypeInfo().IsEnum)
-            {
-                il.Emit(OpCodes.Ldelem, type);
             }
             else
             {
@@ -245,11 +241,6 @@
         {
             Debug.Assert(type != null);

-            if (type.GetTypeInfo().IsEnum)
-            {
-                il.Emit(OpCodes.Stelem, type);
-                return;
-            }
             switch (type.GetTypeCode())
             {
                 case TypeCode.Boolean:


(GH-1086) Removed unnecessary using statement

--- src/Cake.Common.Tests/Unit/ReleaseNotesParserTests.cs
+++ src/Cake.Common.Tests/Unit/ReleaseNotesParserTests.cs
@@ -1,8 +1,6 @@
 // Licensed to the .NET Foundation under one or more agreements.
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
-
-using System.Linq;
 using Cake.Core;
 using Xunit;


Must clear bundles before re-initializing.

--- src/Cassette/CacheAwareBundleCollectionInitializer.cs
+++ src/Cassette/CacheAwareBundleCollectionInitializer.cs
@@ -45,6 +45,7 @@

         void AddBundlesFromConfigurations()
         {
+            bundles.Clear();
             bundleConfigurations.Configure(bundles);
         }


Fix warnings about invalid parameter name and unused variable

--- src/Common/src/TypeSystem/Common/TypeSystemHelpers.cs
+++ src/Common/src/TypeSystem/Common/TypeSystemHelpers.cs
@@ -87,7 +87,7 @@
         /// if method is Bar<string>.M(), then this returns Bar<T>.M()
         /// but if Foo : Bar<string>, then this returns Bar<string>.M()
         /// </summary>
-        /// <param name="typeExamine">A potentially derived type</param>
+        /// <param name="targetType">A potentially derived type</param>
         /// <param name="method">A base class's virtual method</param>
         static public MethodDesc FindMethodOnTypeWithMatchingTypicalMethod(this TypeDesc targetType, MethodDesc method)
         {
@@ -146,8 +146,6 @@
                 return null;
             }

-            TypeDesc canonMT = constrainedType;
-
             MethodDesc method;

             MethodDesc genInterfaceMethod = interfaceMethod.GetMethodDefinition();


Update BaseHttpClient.cs

Update BaseHttpClient.cs

Ensure tests pass.

--- src/CommonLibrariesForNET/Internals/BaseHttpClient.cs
+++ src/CommonLibrariesForNET/Internals/BaseHttpClient.cs
@@ -18,7 +18,7 @@
         protected string ApiVersion;
         protected readonly HttpClient HttpClient;

-        internal BaseHttpClient(string instanceUrl, string apiVersion, string contentType, HttpClient httpClient, bool callerWillDisposeHttpClient)
+        internal BaseHttpClient(string instanceUrl, string apiVersion, string contentType, HttpClient httpClient, bool callerWillDisposeHttpClient = false)
         {
             if (string.IsNullOrEmpty(instanceUrl)) throw new ArgumentNullException("instanceUrl");
             if (string.IsNullOrEmpty(apiVersion)) throw new ArgumentNullException("apiVersion");


continue if disables

continue if disables

--- src/Core/Services/Implementations/LicensingService.cs
+++ src/Core/Services/Implementations/LicensingService.cs
@@ -80,16 +80,19 @@
                 if(totalLicensedOrgs > 1)
                 {
                     await DisableOrganizationAsync(org, license, "Multiple organizations.");
+                    continue;
                 }

                 if(!license.VerifyData(org, _globalSettings))
                 {
                     await DisableOrganizationAsync(org, license, "Invalid data.");
+                    continue;
                 }

                 if(!license.VerifySignature(_certificate))
                 {
                     await DisableOrganizationAsync(org, license, "Invalid signature.");
+                    continue;
                 }
             }
         }


Fixed the wrapping of free functions when using the single-file option.

Signed-off-by: Dimitar Dobrev <ca751a5c976abad79158718440750fc638d19ebc@yahoo.com>

--- src/Generator/Generators/CSharp/CSharpTextTemplate.cs
+++ src/Generator/Generators/CSharp/CSharpTextTemplate.cs
@@ -214,7 +214,7 @@
             {
                 PushBlock(CSharpBlockKind.Functions);
                 WriteLine("public unsafe partial class {0}",
-                    TranslationUnits[0].FileNameWithoutExtension);
+                    context.TranslationUnit.FileNameWithoutExtension);
                 WriteStartBraceIndent();

                 PushBlock(CSharpBlockKind.InternalsClass);


SboTransaction Error fix

SboTransaction Error fix

--- src/ITCO.SboAddon.Framework/Helpers/SboTransaction.cs
+++ src/ITCO.SboAddon.Framework/Helpers/SboTransaction.cs
@@ -26,7 +26,7 @@

         public void Dispose()
         {
-            if (!transactionEnded)
+            if (!transactionEnded && _company.InTransaction)
                 _company.EndTransaction(BoWfTransOpt.wf_Commit);
         }
     }


FastMethodInvoker bug fix

FastMethodInvoker bug fix

--- src/Kirkin.Tests/Reflection/FastMethodInvokerTests.cs
+++ src/Kirkin.Tests/Reflection/FastMethodInvokerTests.cs
@@ -8,6 +8,15 @@
 {
     public class FastMethodInvokerTests
     {
+        [Fact]
+        public void MathMaxInvoke()
+        {
+            MethodInfo method = typeof(Math).GetMethod("Max", new[] { typeof(int), typeof(int) });
+            FastMethodInvoker invoker = new FastMethodInvoker(method);
+
+            Assert.Equal(2, invoker.Invoke(null, 1, 2));
+        }
+
         [Fact]
         public void TestActionNoArgs()
         {
@@ -80,6 +89,7 @@

         /// <summary>
         /// Provides functionality similar to <see cref="System.Reflection.MethodInfo"/> Invoke method.
+        /// Leverages compiled expression trees to improve on reflection's performance while maintaining a similar API.
         /// </summary>
         public sealed class FastMethodInvoker
         {
@@ -127,18 +137,12 @@
                     );
                 }

-                ParameterExpression instanceExpression = null;
-                MethodCallExpression callExpression = null;
+                // Unfortunately needs to be allocated even for static method calls.
+                ParameterExpression instanceExpression = Expression.Parameter(typeof(object), "instance");

-                if (MethodInfo.IsStatic)
-                {
-                    callExpression = Expression.Call(null, MethodInfo, argumentExpressions);
-                }
-                else
-                {
-                    instanceExpression = Expression.Parameter(typeof(object), "instance");
-                    callExpression = Expression.Call(Expression.Convert(instanceExpression, MethodInfo.ReflectedType), MethodInfo, argumentExpressions);
-                }
+                MethodCallExpression callExpression = MethodInfo.IsStatic
+                    ? Expression.Call(null, MethodInfo, argumentExpressions)
+                    : Expression.Call(Expression.Convert(instanceExpression, MethodInfo.ReflectedType), MethodInfo, argumentExpressions);

                 if (MethodInfo.ReturnType == typeof(void))
                 {


+ dir issues abound

+ dir issues abound

--- bigdataanalytics-azurefunction/run.csx
+++ bigdataanalytics-azurefunction/run.csx
@@ -11,7 +11,7 @@

     string workingDir = Directory.GetCurrentDirectory();
     log.Info("Not working out of this directory > " + workingDir);
-    log.Info(@"Working path from D:\home\site\wwwroot\bigdataanalytics-azurefunction\");
+    log.Info(@"Instead we use this VM directory > D:\home\site\wwwroot\bigdataanalytics-azurefunction");

     MainAsync().Wait();


feat(IUsuarioRepositorio): adicionar método a interface.

--- src/modulo-05-.NET/LojaNinja.MVC/LojaNinja.Dominio/IUsuarioRepositorio.cs
+++ src/modulo-05-.NET/LojaNinja.MVC/LojaNinja.Dominio/IUsuarioRepositorio.cs
@@ -10,5 +10,6 @@
     {
         Usuario BuscarUsuarioPorAutenticacao(string email, string senha);
         void InserirUsuario(Usuario user);
+        List<string> ObterListaDeUsuarios();
     }
 }


- Specify the namespace when looking for the AssemblyName property #361

--- src/nbuildkit/tasks/nBuildKit.MsBuild.Tasks/Code/UpdateProjectSettings.cs
+++ src/nbuildkit/tasks/nBuildKit.MsBuild.Tasks/Code/UpdateProjectSettings.cs
@@ -88,13 +88,13 @@
         private static string FindAssemblyName(XDocument doc, string projectPath)
         {
             // The document may have a namespace
-            var ns = doc.Root.GetDefaultNamespace();
-
-            var namespacedProjectName = XName.Get(ProjectNodeName, ns.NamespaceName);
+            var ns = doc.Root.GetDefaultNamespace().NamespaceName;
+
+            var namespacedProjectName = XName.Get(ProjectNodeName, ns);
             var projectNode = doc.Element(namespacedProjectName);

-            // New project format. See if we redirect to the assembly info file
-            var assemblyNameNode = FindElementInPropertyGroup(projectNode, "AssemblyName");
+            var namespacedAssemblyName = XName.Get("AssemblyName", ns);
+            var assemblyNameNode = projectNode.Descendants(namespacedAssemblyName).FirstOrDefault();

             if (assemblyNameNode != null)
             {


Fixing some of the path issues which break the mono build.

--- src/test/Test.FAKECore/Globbing/Directories/GlobbingOfDirectoriesSpecs.cs
+++ src/test/Test.FAKECore/Globbing/Directories/GlobbingOfDirectoriesSpecs.cs
@@ -37,7 +37,7 @@

     public class when_scanning_in_zip : when_extracting_zip
     {
-        private Because of = () => Files = Globbing("*", "SampleApp/bin/");
+        private Because of = () => Files = Globbing("*", "SampleApp/bin");

         It should_match_3_files = () => Files.Length.ShouldEqual(3);
         It should_find_ilmerge = () => Files[0].ShouldEndWith("ilmerge.exclude");


removed unnecessary virtual

removed unnecessary virtual

--- src/Numerics/LinearAlgebra/Double/Factorization/QR.cs
+++ src/Numerics/LinearAlgebra/Double/Factorization/QR.cs
@@ -43,7 +43,7 @@
         /// <summary>
         /// Gets or sets orthogonal Q matrix
         /// </summary>
-        protected virtual Matrix MatrixQ
+        protected Matrix MatrixQ
         {
             get;
             set;
@@ -52,7 +52,7 @@
         /// <summary>
         /// Gets or sets upper triangular factor R
         /// </summary>
-        protected virtual Matrix MatrixR
+        protected Matrix MatrixR
         {
             get;
             set;