Unit tests should test both obsolete methods as well as the new methods replacing them

--- src/UnitTestProject1/Time/TimeTests.cs
+++ src/UnitTestProject1/Time/TimeTests.cs
@@ -6,6 +6,8 @@
 using Skybrud.Essentials.Time;
 using Skybrud.Essentials.Time.Extensions;

+#pragma warning disable 618
+
 namespace UnitTestProject1.Time {

     [TestClass]
@@ -24,6 +26,7 @@

             foreach (var sample in samples) {
                 Assert.AreEqual(sample.Age, TimeHelper.GetAge(sample.Date, fakeNow), "\n\n" + sample.Date + " (TimeHelper)");
+                Assert.AreEqual(sample.Age, TimeUtils.GetAge(sample.Date, fakeNow), "\n\n" + sample.Date + " (TimeUtils)");
                 Assert.AreEqual(sample.Age, sample.Date.GetAge(fakeNow), "\n\n" + sample.Date + " (extension method)");
             }

@@ -85,6 +88,41 @@
             Assert.AreEqual("30th", TimeHelper.GetDayNumberAndSuffix(new DateTime(2014, 1, 30)));
             Assert.AreEqual("31st", TimeHelper.GetDayNumberAndSuffix(new DateTime(2014, 1, 31)));

+            Assert.AreEqual("1st", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 1)));
+            Assert.AreEqual("2nd", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 2)));
+            Assert.AreEqual("3rd", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 3)));
+            Assert.AreEqual("4th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 4)));
+            Assert.AreEqual("5th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 5)));
+            Assert.AreEqual("6th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 6)));
+            Assert.AreEqual("7th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 7)));
+            Assert.AreEqual("8th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 8)));
+            Assert.AreEqual("9th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 9)));
+
+            Assert.AreEqual("10th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 10)));
+            Assert.AreEqual("11th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 11)));
+            Assert.AreEqual("12th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 12)));
+            Assert.AreEqual("13th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 13)));
+            Assert.AreEqual("14th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 14)));
+            Assert.AreEqual("15th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 15)));
+            Assert.AreEqual("16th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 16)));
+            Assert.AreEqual("17th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 17)));
+            Assert.AreEqual("18th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 18)));
+            Assert.AreEqual("19th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 19)));
+
+            Assert.AreEqual("20th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 20)));
+            Assert.AreEqual("21st", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 21)));
+            Assert.AreEqual("22nd", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 22)));
+            Assert.AreEqual("23rd", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 23)));
+            Assert.AreEqual("24th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 24)));
+            Assert.AreEqual("25th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 25)));
+            Assert.AreEqual("26th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 26)));
+            Assert.AreEqual("27th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 27)));
+            Assert.AreEqual("28th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 28)));
+            Assert.AreEqual("29th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 29)));
+
+            Assert.AreEqual("30th", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 30)));
+            Assert.AreEqual("31st", TimeUtils.GetDayNumberAndSuffix(new DateTime(2014, 1, 31)));
+
         }

         [TestMethod]
@@ -125,6 +163,41 @@
             Assert.AreEqual("th", TimeHelper.GetDaySuffix(new DateTime(2014, 1, 30)));
             Assert.AreEqual("st", TimeHelper.GetDaySuffix(new DateTime(2014, 1, 31)));

+            Assert.AreEqual("st", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 1)));
+            Assert.AreEqual("nd", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 2)));
+            Assert.AreEqual("rd", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 3)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 4)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 5)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 6)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 7)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 8)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 9)));
+
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 10)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 11)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 12)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 13)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 14)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 15)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 16)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 17)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 18)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 19)));
+
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 20)));
+            Assert.AreEqual("st", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 21)));
+            Assert.AreEqual("nd", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 22)));
+            Assert.AreEqual("rd", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 23)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 24)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 25)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 26)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 27)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 28)));
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 29)));
+
+            Assert.AreEqual("th", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 30)));
+            Assert.AreEqual("st", TimeUtils.GetDaySuffix(new DateTime(2014, 1, 31)));
+
         }

         [TestMethod]
@@ -142,6 +215,7 @@

             foreach (var sample in samples) {
                 Assert.AreEqual(sample.Week, TimeHelper.GetIso8601WeekNumber(sample.Date), "\n\n" + sample.Date + " (TimeHelper)");
+                Assert.AreEqual(sample.Week, TimeUtils.GetIso8601WeekNumber(sample.Date), "\n\n" + sample.Date + " (TimeUtils)");
                 Assert.AreEqual(sample.Week, sample.Date.GetIso8601WeekNumber(), "\n\n" + sample.Date + " (extension method)");
             }

@@ -158,6 +232,14 @@
             Assert.AreEqual(false, TimeHelper.IsWeekday(new DateTime(2014, 2, 15)), "\n\n (TimeHelper)");
             Assert.AreEqual(false, TimeHelper.IsWeekday(new DateTime(2014, 2, 16)), "\n\n (TimeHelper)");

+            Assert.AreEqual(true, TimeUtils.IsWeekday(new DateTime(2014, 2, 10)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekday(new DateTime(2014, 2, 11)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekday(new DateTime(2014, 2, 12)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekday(new DateTime(2014, 2, 13)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekday(new DateTime(2014, 2, 14)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekday(new DateTime(2014, 2, 15)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekday(new DateTime(2014, 2, 16)), "\n\n (TimeUtils)");
+
             Assert.AreEqual(true, new DateTime(2014, 2, 10).IsWeekday(), "\n\n (extension method)");
             Assert.AreEqual(true, new DateTime(2014, 2, 11).IsWeekday(), "\n\n (extension method)");
             Assert.AreEqual(true, new DateTime(2014, 2, 12).IsWeekday(), "\n\n (extension method)");
@@ -178,6 +260,14 @@
             Assert.AreEqual(false, TimeHelper.IsWeekend(new DateTime(2014, 2, 14)), "\n\n (TimeHelper)");
             Assert.AreEqual(true, TimeHelper.IsWeekend(new DateTime(2014, 2, 15)), "\n\n (TimeHelper)");
             Assert.AreEqual(true, TimeHelper.IsWeekend(new DateTime(2014, 2, 16)), "\n\n (TimeHelper)");
+
+            Assert.AreEqual(false, TimeUtils.IsWeekend(new DateTime(2014, 2, 10)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekend(new DateTime(2014, 2, 11)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekend(new DateTime(2014, 2, 12)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekend(new DateTime(2014, 2, 13)), "\n\n (TimeUtils)");
+            Assert.AreEqual(false, TimeUtils.IsWeekend(new DateTime(2014, 2, 14)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekend(new DateTime(2014, 2, 15)), "\n\n (TimeUtils)");
+            Assert.AreEqual(true, TimeUtils.IsWeekend(new DateTime(2014, 2, 16)), "\n\n (TimeUtils)");

             Assert.AreEqual(false, new DateTime(2014, 2, 10).IsWeekend(), "\n\n (extension method)");
             Assert.AreEqual(false, new DateTime(2014, 2, 11).IsWeekend(), "\n\n (extension method)");
@@ -232,6 +322,9 @@
                 Assert.AreEqual(sample.IsLeapYear, TimeHelper.IsLeapYear(sample.Year), "\n\n" + sample.Year + " (TimeHelper)");
                 Assert.AreEqual(sample.IsLeapYear, TimeHelper.IsLeapYear(dt), "\n\n" + sample.Year + " (TimeHelper)");

+                Assert.AreEqual(sample.IsLeapYear, TimeUtils.IsLeapYear(sample.Year), "\n\n" + sample.Year + " (TimeUtils)");
+                Assert.AreEqual(sample.IsLeapYear, TimeUtils.IsLeapYear(dt), "\n\n" + sample.Year + " (TimeUtils)");
+
                 Assert.AreEqual(sample.IsLeapYear, dt.IsLeapYear(), "\n\n" + sample.Year + " (extension method)");

             }
@@ -376,6 +469,7 @@

             foreach (var sample in samples) {
                 Assert.AreEqual(sample.Expected, TimeHelper.GetFirstDayOfMonth(sample.Date), "TimeHelper");
+                Assert.AreEqual(sample.Expected, TimeUtils.GetFirstDayOfMonth(sample.Date), "TimeUtils");
                 Assert.AreEqual(sample.Expected, sample.Date.GetFirstDayOfMonth(), "Extension method");
             }

@@ -403,6 +497,7 @@

             foreach (var sample in samples) {
                 Assert.AreEqual(sample.Expected, TimeHelper.GetLastDayOfMonth(sample.Date), "TimeHelper");
+                Assert.AreEqual(sample.Expected, TimeUtils.GetLastDayOfMonth(sample.Date), "TimeUtils");
                 Assert.AreEqual(sample.Expected, sample.Date.GetLastDayOfMonth(), "Extension method");
             }

@@ -424,12 +519,15 @@
             foreach (var sample in samples) {

                 Assert.AreEqual(sample.Monday, TimeHelper.GetFirstDayOfWeek(sample.Date), "\n\n" + sample.Date + " (TimeHelper - implicit)");
+                Assert.AreEqual(sample.Monday, TimeUtils.GetFirstDayOfWeek(sample.Date), "\n\n" + sample.Date + " (TimeUtils - implicit)");
                 Assert.AreEqual(sample.Monday, sample.Date.GetFirstDayOfWeek(), "\n\n" + sample.Date + " (Extension method - implicit)");

                 Assert.AreEqual(sample.Monday, TimeHelper.GetFirstDayOfWeek(sample.Date, DayOfWeek.Monday), "\n\n" + sample.Date + " (TimeHelper - explicit: Monday)");
+                Assert.AreEqual(sample.Monday, TimeUtils.GetFirstDayOfWeek(sample.Date, DayOfWeek.Monday), "\n\n" + sample.Date + " (TimeUtils - explicit: Monday)");
                 Assert.AreEqual(sample.Monday, sample.Date.GetFirstDayOfWeek(DayOfWeek.Monday), "\n\n" + sample.Date + " (Extension method - explicit: Monday)");

                 Assert.AreEqual(sample.Sunday, TimeHelper.GetFirstDayOfWeek(sample.Date, DayOfWeek.Sunday), "\n\n" + sample.Date + " (TimeHelper - explicit: Sunday)");
+                Assert.AreEqual(sample.Sunday, TimeUtils.GetFirstDayOfWeek(sample.Date, DayOfWeek.Sunday), "\n\n" + sample.Date + " (TimeUtils - explicit: Sunday)");
                 Assert.AreEqual(sample.Sunday, sample.Date.GetFirstDayOfWeek(DayOfWeek.Sunday), "\n\n" + sample.Date + " (Extension method - explicit: Sunday)");

             }
@@ -452,12 +550,15 @@
             foreach (var sample in samples) {

                 Assert.AreEqual(sample.Monday, TimeHelper.GetLastDayOfWeek(sample.Date), "\n\n" + sample.Date + " (TimeHelper - implicit)");
+                Assert.AreEqual(sample.Monday, TimeUtils.GetLastDayOfWeek(sample.Date), "\n\n" + sample.Date + " (TimeUtils - implicit)");
                 Assert.AreEqual(sample.Monday, sample.Date.GetLastDayOfWeek(), "\n\n" + sample.Date + " (Extension method - implicit)");

                 Assert.AreEqual(sample.Monday, TimeHelper.GetLastDayOfWeek(sample.Date, DayOfWeek.Monday), "\n\n" + sample.Date + " (TimeHelper - explicit: Monday)");
+                Assert.AreEqual(sample.Monday, TimeUtils.GetLastDayOfWeek(sample.Date, DayOfWeek.Monday), "\n\n" + sample.Date + " (TimeUtils - explicit: Monday)");
                 Assert.AreEqual(sample.Monday, sample.Date.GetLastDayOfWeek(DayOfWeek.Monday), "\n\n" + sample.Date + " (Extension method - explicit: Monday)");

                 Assert.AreEqual(sample.Sunday, TimeHelper.GetLastDayOfWeek(sample.Date, DayOfWeek.Sunday), "\n\n" + sample.Date + " (TimeHelper - explicit: Sunday)");
+                Assert.AreEqual(sample.Sunday, TimeUtils.GetLastDayOfWeek(sample.Date, DayOfWeek.Sunday), "\n\n" + sample.Date + " (TimeUtils - explicit: Sunday)");
                 Assert.AreEqual(sample.Sunday, sample.Date.GetLastDayOfWeek(DayOfWeek.Sunday), "\n\n" + sample.Date + " (Extension method - explicit: Sunday)");

             }
@@ -475,6 +576,7 @@
             for (int i = 0; i < expected.Length; i++) {
                 DateTime dt = new DateTime(2014, i + 1, 15);
                 Assert.AreEqual(expected[i], TimeHelper.GetMonthName(dt));
+                Assert.AreEqual(expected[i], TimeUtils.GetMonthName(dt));
                 Assert.AreEqual(expected[i], dt.GetMonthName());
             }

@@ -494,6 +596,7 @@
                 for (int i = 0; i < sample.Value.Length; i++) {
                     DateTime dt = new DateTime(2014, i + 1, 15);
                     Assert.AreEqual(sample.Value[i], TimeHelper.GetLocalMonthName(dt));
+                    Assert.AreEqual(sample.Value[i], TimeUtils.GetLocalMonthName(dt));
                     Assert.AreEqual(sample.Value[i], dt.GetLocalMonthName());
                 }
             }
@@ -514,6 +617,7 @@
                     DateTime dt = new DateTime(2014, i + 1, 15);
                     CultureInfo culture = new CultureInfo(sample.Key);
                     Assert.AreEqual(sample.Value[i], TimeHelper.GetLocalMonthName(dt, culture));
+                    Assert.AreEqual(sample.Value[i], TimeUtils.GetLocalMonthName(dt, culture));
                     Assert.AreEqual(sample.Value[i], dt.GetLocalMonthName(culture));
                 }
             }
@@ -534,6 +638,7 @@
             for (int i = 0; i < expected.Length; i++) {
                 DateTime dt = start.AddDays(i);
                 Assert.AreEqual(expected[i], TimeHelper.GetDayName(dt));
+                Assert.AreEqual(expected[i], TimeUtils.GetDayName(dt));
                 Assert.AreEqual(expected[i], dt.GetDayName());
             }

@@ -555,6 +660,7 @@
                 for (int i = 0; i < sample.Value.Length; i++) {
                     DateTime dt = start.AddDays(i);
                     Assert.AreEqual(sample.Value[i], TimeHelper.GetLocalDayName(dt));
+                    Assert.AreEqual(sample.Value[i], TimeUtils.GetLocalDayName(dt));
                     Assert.AreEqual(sample.Value[i], dt.GetLocalDayName());
                 }
             }
@@ -577,6 +683,7 @@
                     DateTime dt = start.AddDays(i);
                     CultureInfo culture = new CultureInfo(sample.Key);
                     Assert.AreEqual(sample.Value[i], TimeHelper.GetLocalDayName(dt, culture));
+                    Assert.AreEqual(sample.Value[i], TimeUtils.GetLocalDayName(dt, culture));
                     Assert.AreEqual(sample.Value[i], dt.GetLocalDayName(new CultureInfo(sample.Key)));
                 }
             }
@@ -661,4 +768,6 @@

     }

-}+}
+
+#pragma warning restore 618


Fix wrong file path used in ReferencesResponse

--- src/PowerShellEditorServices.Transport.Stdio/Response/ReferencesResponse.cs
+++ src/PowerShellEditorServices.Transport.Stdio/Response/ReferencesResponse.cs
@@ -35,7 +35,7 @@
                                 Offset = reference.ScriptRegion.EndColumnNumber
                             },
                             IsWriteAccess = true,
-                            File = thisFile,
+                            File = reference.FilePath,
                             LineText = reference.SourceLine
                         });
                 }


binary serialization contains assembly versioning wich break tests

--- src/System.Net.IPNetwork.TestProject.Source/SerializeBinaryFormatterTest.cs
+++ src/System.Net.IPNetwork.TestProject.Source/SerializeBinaryFormatterTest.cs
@@ -14,6 +14,7 @@
     {

         [TestMethod]
+        [Ignore] //("Assembly version is writen in binary serilaization.")
         public void Test_Serialize_BinaryFormatter()
         {
             var ipnetwork = IPNetwork.Parse("10.0.0.1/8");


Switched the input framework from carbon to quartz.

--- src/WCS.MAIN/Functions/osxFunctions.cs
+++ src/WCS.MAIN/Functions/osxFunctions.cs
@@ -36,7 +36,7 @@
         private const uint      KCGHIDEEVENTTAP                  = 0;            // Event tapping point
         private const bool      CARBON_KEYDOWN                   = true;         // Flag to init the event as Keydown
         private const string    CORE_AUDIO_LIB_PATH              = "AudioUnit.framework/AudioUnit";             // Core Audio P/Invoke lib.
-        private const string    CARBON_LIB_PATH                  = "Carbon.framework/Versions/A/Carbon";        // Carbon P/Invoke lib.
+        private const string    QUARTZ_LIB_PATH                  = "Quartz.framework/Versions/A/Quartz";        // Quartz P/Invoke lib.
         private const string    GET_DATA_FAIL_LOG_MESSAGE        = "AudioObjectGetPropertyData failed with: ";  // It will always log the same thing so, might aswell make my job easier.
         private const string    PROP_FAIL_LOG_MESSAGE            = "Couldn't find properties.";                 // Same above.
         private       uint      SIZE                             = 0;            // A global var to prevent redefiniton
@@ -109,17 +109,17 @@
             public CGPoint(bool initFromMonoCursor) { x = Cursor.Position.X; y = Cursor.Position.Y; }
         }

-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern CGEventRef CGEventCreateKeyboardEvent(__notused__ source, uint keyCode, bool isKeyDown);
-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern CGEventRef CGEventCreateMouseEvent(__notused__ source, int mouseType, CGPoint mouseCursorPosition, int mouseButton);
-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern CGEventRef CGEventCreateScrollWheelEvent(__notused__ source, int units, uint wheelCount, int v, int h);
-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern void CGEventPost(uint tap, CGEventRef CGEventPtr);
-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern void CGEventKeyboardSetUnicodeString(CGEventRef evtPtr, int strcount, byte[] unicodeString);
-        [DllImport(CARBON_LIB_PATH)]
+        [DllImport(QUARTZ_LIB_PATH)]
         static extern void CFRelease(CGEventRef CGEventPtr);

         public osxFunctions()


Update AddAssignmentStatements to not try and generate a throw expression for VB

--- src/Workspaces/Core/Portable/Shared/Extensions/SyntaxGeneratorExtensions.cs
+++ src/Workspaces/Core/Portable/Shared/Extensions/SyntaxGeneratorExtensions.cs
@@ -258,7 +258,12 @@
             // already declared as nullable to indicate that null is ok.  Adding a null check
             // just disallows something that should be allowed.
             var shouldAddNullCheck = addNullChecks && parameter.Type.CanAddNullCheck() && !parameter.Type.IsNullable();
-            if (shouldAddNullCheck && preferThrowExpression)
+
+            // Throw expressions are not supported in VB, so even if they are preferred we can't
+            // correctly generate one
+            var useThrowExpression = preferThrowExpression && semanticModel.Language != LanguageNames.VisualBasic;
+
+            if (shouldAddNullCheck && useThrowExpression)
             {
                 // Generate: this.x = x ?? throw ...
                 assignStatements.Add(CreateAssignWithNullCheckStatement(


Fixed a compiler error where 'null' was being assigned to an IntPtr.

--- src/api/dcps/sacs/code/DDS/OpenSplice/CustomMarshalers/DatabaseMarshaler.cs
+++ src/api/dcps/sacs/code/DDS/OpenSplice/CustomMarshalers/DatabaseMarshaler.cs
@@ -142,7 +142,7 @@
         {
             // TODO: readerInfo == null should throw an exception
             int samplesToRead = 0;
-            IntPtr dataSampleBuf = null;
+            IntPtr dataSampleBuf = IntPtr.Zero;

             if (samples != null)
             {


updates migration to make it a little faster

--- src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSixTwoZero/AdditionalIndexesAndKeys.cs
+++ src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSixTwoZero/AdditionalIndexesAndKeys.cs
@@ -1,7 +1,9 @@
 using System;
 using System.Linq;
 using Umbraco.Core.Configuration;
+using Umbraco.Core.Persistence.DatabaseModelDefinitions;
 using Umbraco.Core.Persistence.Migrations.Initial;
+using Umbraco.Core.Persistence.SqlSyntax;

 namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixTwoZero
 {
@@ -10,24 +12,31 @@
     {
         public override void Up()
         {
-            var dbSchema = new DatabaseSchemaCreation(Context.Database);
-            var schemaResult = dbSchema.ValidateSchema();
+
+            var dbIndexes = SqlSyntaxContext.SqlSyntaxProvider.GetDefinedIndexes(Context.Database)
+                .Select(x => new DbIndexDefinition()
+                {
+                    TableName = x.Item1,
+                    IndexName = x.Item2,
+                    ColumnName = x.Item3,
+                    IsUnique = x.Item4
+                }).ToArray();

             //do not create any indexes if they already exist in the database

-            if (schemaResult.DbIndexDefinitions.Any(x => x.IndexName == "IX_umbracoNodeTrashed") == false)
+            if (dbIndexes.Any(x => x.IndexName == "IX_umbracoNodeTrashed") == false)
             {
                 Create.Index("IX_umbracoNodeTrashed").OnTable("umbracoNode").OnColumn("trashed").Ascending().WithOptions().NonClustered();
             }
-            if (schemaResult.DbIndexDefinitions.Any(x => x.IndexName == "IX_cmsContentVersion_ContentId") == false)
+            if (dbIndexes.Any(x => x.IndexName == "IX_cmsContentVersion_ContentId") == false)
             {
                 Create.Index("IX_cmsContentVersion_ContentId").OnTable("cmsContentVersion").OnColumn("ContentId").Ascending().WithOptions().NonClustered();
             }
-            if (schemaResult.DbIndexDefinitions.Any(x => x.IndexName == "IX_cmsDocument_published") == false)
+            if (dbIndexes.Any(x => x.IndexName == "IX_cmsDocument_published") == false)
             {
                 Create.Index("IX_cmsDocument_published").OnTable("cmsDocument").OnColumn("published").Ascending().WithOptions().NonClustered();
             }
-            if (schemaResult.DbIndexDefinitions.Any(x => x.IndexName == "IX_cmsDocument_newest") == false)
+            if (dbIndexes.Any(x => x.IndexName == "IX_cmsDocument_newest") == false)
             {
                 Create.Index("IX_cmsDocument_newest").OnTable("cmsDocument").OnColumn("newest").Ascending().WithOptions().NonClustered();
             }


Fix - Corretto reperimento codice chiamata

--- src/backend/SO115App.FakePersistenceJSon/GestioneIntervento/GetMaxCodice.cs
+++ src/backend/SO115App.FakePersistenceJSon/GestioneIntervento/GetMaxCodice.cs
@@ -27,7 +27,7 @@
             if (ListaRichieste != null)
                 MaxIdSintesi = Convert.ToInt16(ListaRichieste.OrderByDescending(x => x.Codice).FirstOrDefault().Codice.Split('-')[1]);
             else
-                MaxIdSintesi = 1;
+                MaxIdSintesi = 0;

             return MaxIdSintesi;


Simplify

Simplify

--- src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentProjects/DependentProjectsFinder.cs
+++ src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentProjects/DependentProjectsFinder.cs
@@ -35,12 +35,6 @@
         /// </summary>
         private static readonly ConditionalWeakTable<Solution, DependentProjectMap> s_dependentProjectsCache =
             new ConditionalWeakTable<Solution, DependentProjectMap>();
-
-        /// <summary>
-        /// Used to create a new concurrent dependent projects map for a given assembly when needed.
-        /// </summary>
-        private static readonly ConditionalWeakTable<Solution, DependentProjectMap>.CreateValueCallback s_createDependentProjectsMapCallback =
-            _ => new DependentProjectMap();

         /// <summary>
         /// Returns the set of <see cref="Project"/>s in <paramref name="solution"/> that <paramref name="symbol"/>
@@ -110,7 +104,7 @@
             else
             {
                 // We cache the dependent projects for non-private symbols to speed up future calls.
-                var dependentProjectsMap = s_dependentProjectsCache.GetValue(solution, s_createDependentProjectsMapCallback);
+                var dependentProjectsMap = s_dependentProjectsCache.GetValue(solution, _ => new DependentProjectMap());
                 var definitionProject = new DefinitionProject(sourceProjectId: sourceProject?.Id, assemblyName: containingAssembly.Name.ToLower());

                 var asyncLazy = dependentProjectsMap.GetOrAdd(


fixed string comparisons

fixed string comparisons

--- test/Selenium.WebDriver.Extensions.IntegrationTests/Tests/WebDriverExtensions.JQuerySelectorTests.cs
+++ test/Selenium.WebDriver.Extensions.IntegrationTests/Tests/WebDriverExtensions.JQuerySelectorTests.cs
@@ -47,8 +47,8 @@
         {
             var text = this.Browser.JQuery("#id1").Text();
             var trimmedText = text.Replace(Environment.NewLine, string.Empty).Trim();
-            Assert.True(trimmedText.StartsWith("jQuery"));
-            Assert.True(trimmedText.EndsWith("Selenium"));
+            Assert.True(trimmedText.StartsWith("jQuery", StringComparison.OrdinalIgnoreCase));
+            Assert.True(trimmedText.EndsWith("Selenium", StringComparison.OrdinalIgnoreCase));
         }

         [Fact]
@@ -56,8 +56,8 @@
         {
             var text = this.Browser.JQuery("#id1").Html();
             var trimmedText = text.Replace(Environment.NewLine, string.Empty).Trim();
-            Assert.True(trimmedText.StartsWith("jQuery"));
-            Assert.True(trimmedText.EndsWith("Selenium"));
+            Assert.True(trimmedText.StartsWith("jQuery", StringComparison.OrdinalIgnoreCase));
+            Assert.True(trimmedText.EndsWith("Selenium", StringComparison.OrdinalIgnoreCase));
         }

         [Fact]


Changed Enumerate from an extension method to an instance that takes sql. This allows for streaming of results rather than bulk-fetch

--- Massive.cs
+++ Massive.cs
@@ -59,19 +59,7 @@
             }
             return result;
         }
-        /// <summary>
-        /// Enumerates the reader yielding the result - thanks to Jeroen Haegebaert
-        /// </summary>
-        public static IEnumerable Enumerate(this IDataReader rdr) {
-            while (rdr.Read()) {
-                var e = new ExpandoObject();
-                var d = e as IDictionary<string,object>;
-                for (var i = 0; i < rdr.FieldCount; i++)
-                    d.Add(rdr.GetName(i), rdr[i]);
-                yield return e;
-
-            }
-        }
+
         /// <summary>
         /// Turns the object into an ExpandoObject
         /// </summary>
@@ -117,6 +105,21 @@
             }
             _factory = DbProviderFactories.GetFactory(_providerName);
             _connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
+        }
+        /// <summary>
+        /// Enumerates the reader yielding the result - thanks to Jeroen Haegebaert
+        /// </summary>
+        public IEnumerable<dynamic> Enumerate(string sql, params object[] args) {
+            using (var conn = OpenConnection()) {
+                var rdr = CreateCommand(sql, conn, args).ExecuteReader(CommandBehavior.CloseConnection);
+                while (rdr.Read()) {
+                    var e = new ExpandoObject();
+                    var d = e as IDictionary<string, object>;
+                    for (var i = 0; i < rdr.FieldCount; i++)
+                        d.Add(rdr.GetName(i), rdr[i]);
+                    yield return e;
+                }
+            }
         }
         /// <summary>
         /// Runs a query against the database


Modified a few for EndPointManager.cs

Modified a few for EndPointManager.cs

--- websocket-sharp/Net/EndPointManager.cs
+++ websocket-sharp/Net/EndPointManager.cs
@@ -94,7 +94,7 @@

     private static IPAddress convertToAddress (string hostName)
     {
-      if (hostName == "*")
+      if (hostName == "*" || hostName == "+")
         return IPAddress.Any;

       IPAddress addr;


.NET: Suppress API parity check for SSL in ClientConnectorConfiguration

--- modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ClientConnectorConfigurationParityTest.cs
+++ modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/ClientConnectorConfigurationParityTest.cs
@@ -25,6 +25,13 @@
     /// </summary>
     public class ClientConnectorConfigurationParityTest
     {
+        /** Members that are missing on .NET side and should be added in future. */
+        private static readonly string[] MissingMembers =
+        {
+            // IGNITE-7228
+            "isSslEnabled", "isUseIgniteSslContextFactory", "isSslClientAuth", "SslContextFactory"
+        };
+
         /// <summary>
         /// Tests the ignite configuration parity.
         /// </summary>
@@ -32,8 +39,8 @@
         public void TestConnectorConfiguration()
         {
             ParityTest.CheckConfigurationParity(
-                @"modules\core\src\main\java\org\apache\ignite\configuration\ClientConnectorConfiguration.java",
-                typeof(ClientConnectorConfiguration));
+                @"modules\core\src\main\java\org\apache\ignite\configuration\ClientConnectorConfiguration.java",
+                typeof(ClientConnectorConfiguration), knownMissingProperties: MissingMembers);
         }
     }
 }


[packages,zlib,1.2.11] Warning suppressions for VisualC builds

--- packages/zlib-1.2.11/bam/Scripts/zlib.cs
+++ packages/zlib-1.2.11/bam/Scripts/zlib.cs
@@ -50,6 +50,79 @@
             this.CreateHeaderContainer("$(packagedir)/*.h");
             var source = this.CreateCSourceContainer("$(packagedir)/*.c");

+            source["crc32.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.DisableWarnings.AddUnique("4127"); // zlib-1.2.11\crc32.c(215): warning C4127: conditional expression is constant
+                        }
+                    }));
+
+            source["deflate.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.DisableWarnings.AddUnique("4127"); // zlib-1.2.11\deflate.c(1495): warning C4127: conditional expression is constant
+                            compiler.DisableWarnings.AddUnique("4244"); // zlib-1.2.11\deflate.c(1693): warning C4244: '=': conversion from 'unsigned int' to 'Bytef', possible loss of data
+                        }
+                    }));
+
+            source["gzlib.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.PreprocessorDefines.Add("_CRT_SECURE_NO_WARNINGS"); // zlib-1.2.11\gzlib.c(193): warning C4996: 'wcstombs': This function or variable may be unsafe
+                            compiler.DisableWarnings.AddUnique("4996"); // zlib-1.2.11\gzlib.c(245): warning C4996: 'open': The POSIX name for this item is deprecated
+                        }
+                    }));
+
+            source["gzread.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.PreprocessorDefines.Add("_CRT_SECURE_NO_WARNINGS"); // zlib-1.2.11\gzread.c(41): warning C4996: 'strerror': This function or variable may be unsafe
+                            compiler.DisableWarnings.AddUnique("4996"); // zlib-1.2.11\gzread.c(35): warning C4996: 'read': The POSIX name for this item is deprecated.
+                            compiler.DisableWarnings.AddUnique("4245"); // zlib-1.2.11\gzread.c(317): warning C4245: '=': conversion from 'int' to 'unsigned int', signed/unsigned mismatch
+                            compiler.DisableWarnings.AddUnique("4267"); // zlib-1.2.11\gzread.c(319): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data
+                        }
+                    }));
+
+            source["gzwrite.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.PreprocessorDefines.Add("_CRT_SECURE_NO_WARNINGS"); // zlib-1.2.11\gzwrite.c(91): warning C4996: 'strerror': This function or variable may be unsafe
+                            compiler.DisableWarnings.AddUnique("4996"); // zlib-1.2.11\gzwrite.c(89): warning C4996: 'write': The POSIX name for this item is deprecated
+                            compiler.DisableWarnings.AddUnique("4267"); // zlib-1.2.11\gzwrite.c(212): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data
+                        }
+                    }));
+
+            source["trees.c"].ForEach(item =>
+                item.PrivatePatch(settings =>
+                    {
+                        var vcCompiler = settings as VisualCCommon.ICommonCompilerSettings;
+                        if (null != vcCompiler)
+                        {
+                            var compiler = settings as C.ICommonCompilerSettings;
+                            compiler.DisableWarnings.AddUnique("4244"); // zlib-1.2.11\trees.c(724): warning C4244: '+=': conversion from 'int' to 'ush', possible loss of data
+                        }
+                    }));
+
             this.PublicPatch((settings, appliedTo) =>
                 {
                     var compiler = settings as C.ICommonCompilerSettings;
@@ -72,6 +145,7 @@
                         visualCCompiler.WarningLevel = VisualCCommon.EWarningLevel.Level4;
                         compiler.PreprocessorDefines.Add("_WINDOWS");
                         compiler.PreprocessorDefines.Add("ZLIB_DLL");
+                        compiler.DisableWarnings.AddUnique("4131"); // zlib-1.2.11\adler32.c(64): warning C4131: 'adler32_z': uses old-style declarator
                     }

                     var mingwCompiler = settings as MingwCommon.ICommonCompilerSettings;
@@ -156,7 +230,7 @@
                         var visualCCompiler = settings as VisualCCommon.ICommonCompilerSettings;
                         if (null != visualCCompiler)
                         {
-                            visualCCompiler.WarningLevel = VisualCCommon.EWarningLevel.Level4;
+                            visualCCompiler.WarningLevel = VisualCCommon.EWarningLevel.Level2;

                         #if false
                             var compiler = settings as C.ICommonCompilerSettings;
@@ -257,7 +331,7 @@
                         var visualCCompiler = settings as VisualCCommon.ICommonCompilerSettings;
                         if (null != visualCCompiler)
                         {
-                            visualCCompiler.WarningLevel = VisualCCommon.EWarningLevel.Level4;
+                            visualCCompiler.WarningLevel = VisualCCommon.EWarningLevel.Level2;
                         }

                         var mingwCompiler = settings as MingwCommon.ICommonCompilerSettings;


All tests pass

All tests pass


Accounts: fix indentation in a couple of lines


Added throttling app support

Added throttling app support

--- UnitTests/CSharpRunner/TestHelper.cs
+++ UnitTests/CSharpRunner/TestHelper.cs
@@ -2,14 +2,26 @@
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Runtime.InteropServices;
+using System.Threading;
 using Vanara.InteropServices;

 namespace Vanara.PInvoke.Tests
 {
 	public static class TestHelper
 	{
+		private const string testApp = @"C:\Users\dahall\Documents\Visual Studio 2017\Projects\TestSysConsumption\bin\Debug\netcoreapp3.0\TestSysConsumption.exe";
+
+		public static Process RunThrottleApp() => Process.Start(testApp);
+
+		public static void SetThrottle(string type, bool on)
+		{
+			using (var evt = new EventWaitHandle(false, EventResetMode.AutoReset, (on ? "" : "End") + type))
+				evt.Set();
+		}
+
 		public static IList<string> GetNestedStructSizes(this Type type, params string[] filters)
 		{
 			var output = new List<string>();


IHyphenationCallback example

IHyphenationCallback example

--- ApiExamples/CSharp/ApiExamples/ExHyphenation.cs
+++ ApiExamples/CSharp/ApiExamples/ExHyphenation.cs
@@ -5,6 +5,8 @@
 // "as is", without warranty of any kind, either expressed or implied.
 //////////////////////////////////////////////////////////////////////////

+using System;
+using System.Collections.Generic;
 using System.IO;
 using Aspose.Words;
 using NUnit.Framework;
@@ -14,24 +16,53 @@
     [TestFixture]
     public class ExHyphenation : ApiExampleBase
     {
-        [Test]
+        //ExStart
+        //ExFor:Hyphenation
+        //ExFor:Hyphenation.Callback
+        //ExFor:Hyphenation.RegisterDictionary(String, Stream)
+        //ExFor:Hyphenation.RegisterDictionary(String, String)
+        //ExFor:IHyphenationCallback
+        //ExFor:IHyphenationCallback.RequestDictionary(System.String)
+        //ExSummary:Shows how to open and register a dictionary from a file.
+        [Test] //ExSKip
         public void RegisterDictionaryEx()
         {
-            //ExStart
-            //ExFor:Hyphenation
-            //ExFor:Hyphenation.RegisterDictionary(String, Stream)
-            //ExFor:Hyphenation.RegisterDictionary(String, String)
-            //ExSummary:Shows how to open and register a dictionary from a file.
             Document doc = new Document(MyDir + "Document.doc");
-
-            // Register by String
-            Hyphenation.RegisterDictionary("en-US", MyDir + "hyph_en_US.dic");

             // Register by stream
             Stream dictionaryStream = new FileStream(MyDir + "hyph_de_CH.dic", FileMode.Open);
             Hyphenation.RegisterDictionary("de-CH", dictionaryStream);
-            //ExEnd
+
+            // Register by string via callback
+            Hyphenation.Callback = new HyphenationPrinter();
+            Hyphenation.Callback.RequestDictionary("en-US");
         }
+
+        /// <summary>
+        /// Associates ISO language codes with dictionary files for their respective languages
+        /// </summary>
+        private class HyphenationPrinter : IHyphenationCallback
+        {
+            public HyphenationPrinter()
+            {
+                mDictionaryFilenames = new Dictionary<string, string>
+                {
+                    { "en-US", MyDir + "hyph_en_US.dic" },
+                    { "de-CH", MyDir + "hyph_de_CH.dic" }
+                };
+            }
+
+            public void RequestDictionary(string language)
+            {
+                if (mDictionaryFilenames.ContainsKey(language) && !Hyphenation.IsDictionaryRegistered(language))
+                {
+                    Hyphenation.RegisterDictionary(language, mDictionaryFilenames[language]);
+                }
+            }
+
+            private readonly Dictionary<string, string> mDictionaryFilenames;
+        }
+        //ExEnd

         [Test]
         public void IsDictionaryRegisteredEx()


made it possible to go back to adventure mode

--- Assets/Scripts/GameState/GameStateController.cs
+++ Assets/Scripts/GameState/GameStateController.cs
@@ -285,7 +285,16 @@
                 else if(isShortcutKeyDown(_sandboxKey))
                 {
                     Logger.Log("GameStateController::Update sandbox key pressed from level="+getCurrentLevel(), Logger.Level.INFO);
-                    setAndSaveLevelName(_sandboxLevel1);
+                    string destination = _sandboxLevel1;
+                    string currentLevelCode = null;
+                    if(MemoryManager.get ().tryGetData(GameStateController._currentLevelKey, out currentLevelCode))
+                    {
+                        if(destination == currentLevelCode)
+                        {
+                            destination = _adventureLevel1;
+                        }
+                    }
+                    setAndSaveLevelName(destination);
                     restart();
                 }
                 break;


Documented DataContractContentSerializer.Create.

--- AtomEventStore/DataContractContentSerializer.cs
+++ AtomEventStore/DataContractContentSerializer.cs
@@ -107,6 +107,25 @@
             return new XmlAtomContent(value);
         }

+        /// <summary>
+        /// Creates a new instance of the
+        /// <see cref="DataContractContentSerializer"/> class.
+        /// </summary>
+        /// <param name="assembly">
+        /// An <see cref="Assembly" /> used to find all types annotated with
+        /// <see cref="System.Runtime.Serialization.DataContractAttribute"/>
+        /// attributes, and pull the associated local and namespace names
+        /// out of them.
+        /// </param>
+        /// <exception cref="System.ArgumentNullException">
+        /// <paramref name="assembly" /> is <see langword="null" />.
+        /// </exception>
+        /// <exception cref="System.InvalidOperationException">
+        /// <paramref name="assembly" /> doesn't contain any public types
+        /// annotated with
+        /// <see cref="System.Runtime.Serialization.DataContractAttribute"/>
+        /// class.
+        /// </exception>
         public static DataContractContentSerializer Create(Assembly assembly)
         {
             if (assembly == null)


Updated Attest.Testing.NUnit assembly version.

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


Add Day of Week to SUTA details

Add Day of Week to SUTA details

Fixes #488

--- Battery-Commander.Web/Views/SUTA/Details.cshtml
+++ Battery-Commander.Web/Views/SUTA/Details.cshtml
@@ -16,12 +16,12 @@

             @Html.DisplayNameFor(model => model.StartDate)
-            @Html.DisplayFor(model => model.StartDate)
+            @Html.DisplayFor(model => model.StartDate) @Model.StartDate.DayOfWeek

             @Html.DisplayNameFor(model => model.EndDate)
-            @Html.DisplayFor(model => model.EndDate)
+            @Html.DisplayFor(model => model.EndDate) @Model.EndDate.DayOfWeek


stupid

stupid

--- game/Assets/scripts/AI/EnemyBehavior.cs
+++ game/Assets/scripts/AI/EnemyBehavior.cs
@@ -102,11 +102,11 @@

 	void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
 		if (stream.isWriting) {
-
+			stream.SendNext (transform.position);
+			stream.SendNext (transform.rotation);
 		} else if(stream.isReading) {
 			realPosition = (Vector3)stream.ReceiveNext();
 			realRotation = (Quaternion)stream.ReceiveNext();
-			gameObject.GetComponent<Health>().currentHitPoints = (float)stream.ReceiveNext();

 			if(gotFirstUpdate == false) {
 				transform.position = realPosition;


Small changes for tests.

Small changes for tests.

--- svn/trunk/Source/Samples/OpenCL/Test/Program.cs
+++ svn/trunk/Source/Samples/OpenCL/Test/Program.cs
@@ -95,17 +95,17 @@

             var inArr = new int32
                              //[]
-                             [1002]
-                             // { 2, 1, 2 }
+                             [3002]
+                             //{ 2, 1, 2 }
                              //{2, 2, 2, 2, 2, 2, 2, 1, 2 }
                             //{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2 }
                             //{ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2 }
                             ;
-            for (int _i = 0; _i < 1002; _i++) { inArr[_i] = 2; }
-            inArr[1001] = 1;
+            for (int _i = 0; _i < 3002; _i++) { inArr[_i] = 2; }
+            inArr[3001] = 1;
             int32 size = inArr.Length;

-            var rules = new Rule[] {new Rule(1,2,3,0,0),new Rule(2,1,0,0,0),new Rule(3,2,0,0,0),new Rule(2,3,2,0,0)
+            var rules = new Rule[] {new Rule(1,2,3,0,0),new Rule(2,3,2,0,0),new Rule(2,1,0,0,0),new Rule(3,2,0,0,0)
             };

             int32 nTerms = 3;
@@ -125,7 +125,7 @@
                 return;
             }

-            var commandQueue = new CommandQueue(provider, provider.Devices.First());
+            var commandQueue = new CommandQueue(provider, provider.Devices.First());

             var bArr = new int32[size * size * nTerms * magicConst_c];
             var rulesArr = new int32[rules.Length * magicConst];
@@ -154,19 +154,18 @@
                 rulesArr[_base + 2] = rules[i].c;
                 //rulesArr[_base + 3] = rules[i].lblNum;
                 //rulesArr[_base + 4] = rules[i].lblWeight;
-            }
-
-            var buffer = new Buffer<int32>(provider, Operations.ReadWrite, Memory.Device, bArr);
+            }
+
+            var buffer = new Buffer<int32>(provider, Operations.ReadWrite, Memory.Device, bArr);
             var db = new Buffer<int32>(provider, Operations.ReadWrite, Memory.Device, new int32[1]);

             var processRow =
-                provider.Compile<_1D, int32, int32, int32, int32, int32, Buffer<int32>, Buffer<int32>>(
-                (range, l, rule_a, rule_b, rule_c, k, a, _db) =>
+                provider.Compile<_1D, int32, int32, int32, int32, int32, Buffer<int32>>(
+                (range, l, rule_a, rule_b, rule_c, k, a) =>
                     from r in range
                     let i = r.GlobalID0
                     let nT = nTerms
                     let _base = nT * size
-                    //let __db = 0==1 ? 2 : 3
                     let left_base_idx = (k * _base) + i * nT
                     let right_base_idx = ((l - k - 1) * _base) + (k + i + 1) * nT
                     let left = a[left_base_idx + (rule_b - 1)]
@@ -175,28 +174,22 @@
                     let v = (rule_c != 0 & rule_c == right & rule_b == left)
                             ? rule_a
                             : a[res_id]
-                    select new[]
-                        {
-                            //(rule_c != 0 && rule_c == right && rule_b == left)
-                            //? a[res_id] <= rule_a
-                            //: db[0] <= 0});
-            a[res_id] <= v });
+                    select new[] {a[res_id] <= v});

             for (int l = 1; l < size; l++)
             {
-
-                    for (int rId = 0; rId < rules.Length; rId++)
+                for (int rId = 0; rId < rules.Length; rId++)
+                {
+                    for (int k = 0; k < l; k++)
                     {
-                        for (int k = 0; k < l; k++)
-                        {
                         var rule_base = rId * magicConst;
                         var rule_a = rulesArr[rule_base];
                         var rule_b = rulesArr[rule_base + 1];
                         var rule_c = rulesArr[rule_base + 2];
-                        commandQueue.Add(processRow.Run(new _1D(size - l), l, rule_a,rule_b,rule_c, k, buffer,db)).Barrier();
+                        commandQueue.Add(processRow.Run(new _1D(size - l), l, rule_a, rule_b, rule_c, k, buffer)).Barrier();
                     }
                 }
-                commandQueue.Finish();
+                commandQueue.Finish();
             }
             //commandQueue.Finish();
             commandQueue.Add(buffer.Read(0, size * size * nTerms * magicConst_c, bArr)).Finish();


Added some extra properties/functions to DynamicNull to provide a way to check to see if a child doc type actually exists. .HasProperty will check for a property existence but because the child types are returned as DynamicNull, you couldn't check for null equality. Use DynamicNull's .IsNull (true) or .HasValue (false) or .Count() (0) or a typeof check

--- umbraco.MacroEngines.Juno/RazorDynamicNode/DynamicNull.cs
+++ umbraco.MacroEngines.Juno/RazorDynamicNode/DynamicNull.cs
@@ -26,6 +26,10 @@
         {
             return this;
         }
+        public int Count()
+        {
+            return 0;
+        }
         public override string ToString()
         {
             return string.Empty;
@@ -35,5 +39,19 @@
             result = this;
             return true;
         }
+        public bool IsNull
+        {
+            get
+            {
+                return true;
+            }
+        }
+        public bool HasValue
+        {
+            get
+            {
+                return false;
+            }
+        }
     }
 }


Added extra columns in the Raw data Viewer tab: Latitude, Longitude, Elevation & TimeStamp

--- Visualizer/OperationDataProcessor.cs
+++ Visualizer/OperationDataProcessor.cs
@@ -16,6 +16,7 @@
 using System.Linq;
 using AgGateway.ADAPT.ApplicationDataModel.LoggedData;
 using AgGateway.ADAPT.ApplicationDataModel.Representations;
+using AgGateway.ADAPT.ApplicationDataModel.Shapes;

 namespace AgGateway.ADAPT.Visualizer
 {
@@ -26,6 +27,12 @@
         public DataTable ProcessOperationData(OperationData operationData)
         {
             _dataTable = new DataTable();
+
+            //Add extra columns
+            _dataTable.Columns.Add(new DataColumn("Latitude")); //Y
+            _dataTable.Columns.Add(new DataColumn("Longitude")); //X
+            _dataTable.Columns.Add(new DataColumn("Elevation")); //Z
+            _dataTable.Columns.Add(new DataColumn("TimeStamp")); //time

             if (operationData.GetSpatialRecords != null)
             {
@@ -86,6 +93,12 @@
                 }
             }

+            //Fill in the other cells
+            dataRow["Latitude"] = (spatialRecord.Geometry as Point).Y.ToString(); //Y
+            dataRow["Longitude"] = (spatialRecord.Geometry as Point).X.ToString(); //X
+            dataRow["Elevation"] = (spatialRecord.Geometry as Point).Z.ToString(); //Z
+            dataRow["TimeStamp"] = spatialRecord.Timestamp.ToString();
+
             _dataTable.Rows.Add(dataRow);
         }


Cleanup

Cleanup

--- NtfsDetails/Program.cs
+++ NtfsDetails/Program.cs
@@ -1,4 +1,5 @@
-using System;
+
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;


Do not introduce an additional trailing newline on encryption

--- pass-winmenu/src/ExternalPrograms/GPG.cs
+++ pass-winmenu/src/ExternalPrograms/GPG.cs
@@ -134,7 +134,7 @@
 				// Explicitly define the encoding to not send a BOM, to ensure other platforms can handle our output.
 				using (var writer = new StreamWriter(gpgProc.StandardInput.BaseStream, new UTF8Encoding(false)))
 				{
-					writer.WriteLine(input);
+					writer.Write(input);
 					writer.Flush();
 					writer.Close();
 				}


Fixed IT with google

Fixed IT with google


Release 1.21.1

Release 1.21.1

--- Version.cs
+++ Version.cs
@@ -6,6 +6,6 @@

 namespace TweetDuck {
 	internal static class Version {
-		public const string Tag = "1.21.0.1";
+		public const string Tag = "1.21.1";
 	}
 }


Update CSharpSyntaxFacts.cs

Update CSharpSyntaxFacts.cs

--- src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Services/SyntaxFacts/CSharpSyntaxFacts.cs
+++ src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Services/SyntaxFacts/CSharpSyntaxFacts.cs
@@ -279,7 +279,7 @@
             => node.Kind() == SyntaxKind.ThrowExpression;

         public bool IsPredefinedType(SyntaxToken token)
-            => TryGetPredefinedType(token, out var actualType);
+            => TryGetPredefinedType(token, out var _);

         public bool IsPredefinedType(SyntaxToken token, PredefinedType type)
             => TryGetPredefinedType(token, out var actualType) && actualType == type;


CP-13008: Allow pGPUs to be broken up in other fractions than eighths

--- XenAdmin/Controls/GPU/GpuShinyBar.cs
+++ XenAdmin/Controls/GPU/GpuShinyBar.cs
@@ -62,7 +62,16 @@
             foreach (VGPU vgpu in vGPUs)
                 vms[vgpu] = vgpu.Connection.Resolve(vgpu.VM);

-            maxCapacity = !Helpers.FeatureForbidden(pGPU, Host.RestrictVgpu) && pGPU.HasVGpu ? 8 : 1;
+            maxCapacity = 1;
+            if (!Helpers.FeatureForbidden(pGPU, Host.RestrictVgpu) && pGPU.HasVGpu && pGPU.supported_VGPU_max_capacities != null)
+            {
+                foreach (var n in pGPU.supported_VGPU_max_capacities.Values)
+                {
+                    if (n > maxCapacity)
+                        maxCapacity = n;
+                }
+            }
+
             capacity = vGPUs.Count > 0 && pGPU.supported_VGPU_max_capacities.ContainsKey(vGPUs[0].type)
                 ? pGPU.supported_VGPU_max_capacities[vGPUs[0].type] : maxCapacity;
         }


Set Mac DatePicker to calendar style.

Set Mac DatePicker to calendar style.

--- Xwt.Mac/Xwt.Mac/DatePickerBackend.cs
+++ Xwt.Mac/Xwt.Mac/DatePickerBackend.cs
@@ -40,6 +40,9 @@
 		{
 			base.Initialize ();
 			ViewObject = new MacDatePicker ();
+			NSDatePicker datePicker = (NSDatePicker)ViewObject;
+			datePicker.DatePickerStyle = NSDatePickerStyle.ClockAndCalendar;
+			datePicker.DatePickerElements = NSDatePickerElementFlags.YearMonthDate;
 		}

 		public override void EnableEvent (object eventId)


Add one more extension test

Add one more extension test

--- test/NeinLinq.EntityFrameworkCore.Tests/EntityFrameworkCoreExtensionTest.cs
+++ test/NeinLinq.EntityFrameworkCore.Tests/EntityFrameworkCoreExtensionTest.cs
@@ -50,6 +50,36 @@
         using var serviceProvider = services.BuildServiceProvider();

         var context = serviceProvider.GetRequiredService<TestContext>();
+
+        _ = context.Database.EnsureDeleted();
+        _ = context.Database.EnsureCreated();
+
+        context.Models.AddRange(
+            new Model { Name = "Heinz" },
+            new Model { Name = "Narf" },
+            new Model { Name = "Wat" }
+        );
+
+        _ = context.SaveChanges();
+
+        var query = from m in context.Models
+                    where m.IsNarf
+                    select m.Id;
+
+        Assert.Equal(1, query.Count());
+    }
+
+    [Fact]
+    public void Query_WithLambdaInjectionUsingOverride_ResolvesLambdaInjection()
+    {
+        var services = new ServiceCollection();
+
+        _ = services.AddDbContext<TestWithOverrideContext>(options =>
+            options.UseSqlite("Data Source=EntityFrameworkCoreExtensionTest.db"));
+
+        using var serviceProvider = services.BuildServiceProvider();
+
+        var context = serviceProvider.GetRequiredService<TestWithOverrideContext>();

         _ = context.Database.EnsureDeleted();
         _ = context.Database.EnsureCreated();
@@ -231,6 +261,20 @@
         }
     }

+    private class TestWithOverrideContext : DbContext
+    {
+        public DbSet<Model> Models { get; }
+
+        public TestWithOverrideContext(DbContextOptions<TestWithOverrideContext> options)
+            : base(options)
+        {
+            Models = Set<Model>();
+        }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+            => optionsBuilder.WithLambdaInjection(typeof(Model));
+    }
+
     private class Rewriter : ExpressionVisitor
     {
         public override string ToString()


Avoid global state in snapshot (#5429) (#5434)

Co-authored-by: Steve Gordon <20cbefa6cf5e4734053fcc91d5e666c145843ef8@hotmail.co.uk>

--- tests/Tests/Modules/SnapshotAndRestore/Snapshot/CoordinatedSnapshotTests.cs
+++ tests/Tests/Modules/SnapshotAndRestore/Snapshot/CoordinatedSnapshotTests.cs
@@ -40,8 +40,8 @@
 			{
 				CreateSnapshotStep, u => u
 					.Calls<SnapshotDescriptor, SnapshotRequest, ISnapshotRequest, SnapshotResponse>(
-						v => new SnapshotRequest($"{v}-repository", $"{v}-source") { Indices = $"{v}-index", WaitForCompletion = true },
-						(v, d) => d.Index($"{v}-index").WaitForCompletion(true),
+						v => new SnapshotRequest($"{v}-repository", $"{v}-source") { Indices = $"{v}-index", WaitForCompletion = true, IncludeGlobalState = false },
+						(v, d) => d.Index($"{v}-index").WaitForCompletion(true).IncludeGlobalState(false),
 						(v, c, f) => c.Snapshot.Snapshot($"{v}-repository", $"{v}-source", f),
 						(v, c, f) => c.Snapshot.SnapshotAsync($"{v}-repository", $"{v}-source", f),
 						(_, c, r) => c.Snapshot.Snapshot(r),


[WatchPuzzle] fix countdown label

[WatchPuzzle] fix countdown label


Updated version number

Updated version number

--- build/Version.cs
+++ build/Version.cs
@@ -38,4 +38,4 @@

 // Semantic version (http://semver.org). Assembly version changes less than the semver; semver must increment for every release.

-[assembly: AssemblyInformationalVersion("0.9.2-beta")]
+[assembly: AssemblyInformationalVersion("0.9.3-beta")]


remove propertyType field

remove propertyType field

--- src/AspectCore.Abstractions.Resolution/Generators/AccessorPropertyGenerator.cs
+++ src/AspectCore.Abstractions.Resolution/Generators/AccessorPropertyGenerator.cs
@@ -106,7 +106,6 @@

         private class AccessorPropertyMethodBodyGenerator : MethodBodyGenerator
         {
-            private readonly Type propertyType;
             private readonly FieldBuilder fieldBuilder;

             public AccessorPropertyMethodBodyGenerator(MethodBuilder declaringMember, FieldBuilder fieldBuilder) : base(declaringMember)


Fix nullable annotations to address some nullable warnings

Now that we're building this project on net6.0, we have usable nullable
warnings.

--- src/Features/Lsif/Generator/ResultSetTracking/SymbolHoldingResultSetTracker.cs
+++ src/Features/Lsif/Generator/ResultSetTracking/SymbolHoldingResultSetTracker.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.
-
-#nullable enable annotations

 using System;
 using System.Collections.Generic;
@@ -37,7 +35,7 @@

         private TrackedResultSet GetTrackedResultSet(ISymbol symbol)
         {
-            TrackedResultSet trackedResultSet;
+            TrackedResultSet? trackedResultSet;

             // First acquire a simple read lock to see if we already have a result set; we do this with
             // just a read lock to ensure we aren't contending a lot if the symbol already exists which


Update comments.

Update comments.

--- src/LimitsMiddleware.OwinAppBuilder/AppBuilderExtensions.MaxBandwidthGlobal.cs
+++ src/LimitsMiddleware.OwinAppBuilder/AppBuilderExtensions.MaxBandwidthGlobal.cs
@@ -11,7 +11,7 @@
     public static partial class AppBuilderExtensions
     {
         /// <summary>
-        /// Limits the bandwith used by the subsequent stages in the owin pipeline.
+        /// Limits the bandwith used globally by the subsequent stages in the owin pipeline.
         /// </summary>
         /// <param name="app">The IAppBuilder instance.</param>
         /// <param name="maxBytesPerSecond">The maximum number of bytes per second to be transferred. Use 0 or a negative
@@ -25,7 +25,7 @@
         }

         /// <summary>
-        /// Limits the bandwith used by the subsequent stages in the owin pipeline.
+        /// Limits the bandwith used globally by the subsequent stages in the owin pipeline.
         /// </summary>
         /// <param name="app">The IAppBuilder instance.</param>
         /// <param name="getMaxBytesPerSecond">A delegate to retrieve the maximum number of bytes per second to be transferred.


Little Refactoring

Little Refactoring

Why didn't I realize I could do this once JsonObject implemented
IEnumerable?

--- XtoJSON.cs
+++ XtoJSON.cs
@@ -419,8 +419,8 @@
 	public void Clear() { data.Clear(); }

 	public void Set(JsonObject other) {
-		foreach (var pair in other.GetData()) {
-			this[pair.Key.stringVal] = pair.Value;
+		foreach (var pair in other) {
+			this[pair.Key] = pair.Value;
 		}
 	}


Adds two more functional functions

Adds two more functional functions

Scale and SumOfNumbers

and commentary.

--- XtoJSON.cs
+++ XtoJSON.cs
@@ -1444,6 +1444,58 @@
 		return result;
 	}

+	/// <summary> Sums numbers that are inside of a JsonObject.
+	/// Optionally, another parameter can be provided, lim.
+	/// lim defines what keys are used in the sum. </summary>
+	public static double SumOfNumbers(this JsonObject thing, JsonArray lim = null) {
+		double sum = 0;
+
+		if (lim == null) {
+			foreach (var pair in thing) {
+				if (pair.Value.isNumber) { sum += pair.Value.numVal; }
+			}
+		} else {
+			foreach (var key in lim) {
+				if (key.isString) {
+					var val = thing[key.stringVal];
+					if (val.isNumber) { sum += val.numVal; }
+				}
+			}
+		}
+
+		return sum;
+	}
+
+	/// <summary>
+	/// Multiply two 'vectors' componentwise, and return the result.
+	/// Optionally, another parameter can be provided, lim
+	/// lim defines which dimensions are present in the result.
+	/// without lim, the result contains the INTERSECTION between lhs and rhs as vectors.
+	/// </summary>
+	public static JsonObject Scale(this JsonObject lhs, JsonObject rhs, JsonArray lim = null) {
+		JsonObject result = new JsonObject();
+
+		if (lim == null) {
+			foreach (var lpair in lhs) {
+				if (lpair.Value.isNumber) {
+					var rval = rhs[lpair.Key.stringVal];
+					if (rval.isNumber) {
+						result[lpair.Key.stringVal] = rval.numVal * lpair.Value.numVal;
+					}
+				}
+			}
+		} else {
+			foreach (var val in lim) {
+				if (val.isString) {
+					string key = val.stringVal;
+					result[key] = lhs.GetFloat(key) * rhs.GetFloat(key);
+				}
+			}
+		}
+
+		return result;
+	}
+
 	/// <summary> Multiply the left side object (as a 'vector') by the right hand side object (as a 'matrix').
 	/// a 'vector' is a JsonObject with only string:float value pairs considered.
 	/// a 'matrix' is a JsonObject with only string:'vector' pairs considered.
@@ -1475,6 +1527,8 @@
 		return result;
 	}

+
+
 	/// <summary> Calculates one result of a multiplication of one 'vector' times one 'row' of a matrix </summary>
 	public static double MultiplyRow(this JsonObject lhs, JsonObject rhs) {
 		double d = 0;


Removed unused class CriteriasDescriptor


permission issues

permission issues

--- src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs
+++ src/System.Diagnostics.EventLog/tests/EventLogTests/EventLogWriteEntryTests.cs
@@ -256,7 +256,7 @@
             }
         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void WriteEntryWithoutSource()
         {
             using (EventLog eventLog = new EventLog())
@@ -266,7 +266,7 @@

         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void WriteEntryWithInvalidType()
         {
             using (EventLog eventLog = new EventLog())
@@ -277,7 +277,7 @@
             }
         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void WriteEntryWithNullOrEmptySource()
         {
             Assert.Throws<ArgumentException>(() => EventLog.WriteEntry(null, message));
@@ -334,14 +334,14 @@
             }
         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void WriteEventInstanceNull()
         {
             string source = "Source_" + nameof(WriteEventInstanceNull);
             Assert.Throws<ArgumentNullException>(() => EventLog.WriteEvent(source, null, insertStrings));
         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void WriteEventMessageValues_OutOfRange()
         {
             string source = "Source_" + nameof(WriteEventMessageValues_OutOfRange);
@@ -365,7 +365,7 @@
             }
         }

-        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
+        [ConditionalTheory(typeof(Helpers), nameof(Helpers.IsElevatedAndSupportsEventLogs))]
         public void SourceNameMaxLengthExceeded()
         {
             string source = new string('s', 254);


added log info

added log info

--- src/TigerStudio.API/Modules/TigerStudio.Wechat/Controllers/WechatController.cs
+++ src/TigerStudio.API/Modules/TigerStudio.Wechat/Controllers/WechatController.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -16,6 +17,7 @@
         [Route("")]
         public IHttpActionResult Get(string signature, string timestamp, string nonce, string echostr)
         {
+            Trace.TraceInformation(string.Format("Signature: {0}, Timestamp: {1}, Nonce: {2}, Echostr: {3}", signature, timestamp, nonce, echostr));
             if (CheckSignature(signature, timestamp, nonce))
                 return Ok(echostr);


furthur tweak

furthur tweak

--- src/TigerStudio.API/Modules/TigerStudio.Wechat/Controllers/WechatController.cs
+++ src/TigerStudio.API/Modules/TigerStudio.Wechat/Controllers/WechatController.cs
@@ -54,7 +54,7 @@
                     new ImageObject()
                     {
                         Description = "this is a test message",
-                        ImageUrl = "http://fdfs.xmcdn.com/group6/M07/7E/75/wKgDhFT9UqzDtzQ0AAG7SYHnY2k769.jpg",
+                        ImageUrl = "http://mmbiz.qpic.cn/mmbiz/u1YPNZkLJC6zYpt4jJJXRyYiaXMzrVyIFqeRicRUq4kmhzzAAjTIzYAp8EJ7BXbQ4ibicsv9sjr18QBbwkoAxO75GA/640?tp=webp&wxfrom=5",
                         Title = "test",
                         Url =
                             "http://mp.weixin.qq.com/s?__biz=MzA5NTU0MTMzOQ==&mid=204860621&idx=1&sn=ce5c822c25bc7526c36a4ca104bf04c8#rd"


Creating a "System" content type breaks Umbraco (#9005)

--- src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
+++ src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using Umbraco.Core;
@@ -24,6 +25,13 @@
         {
             //don't do anything if we're not enabled
             if (!_config.Enable) yield break;
+
+            //list of reserved/disallowed aliases for content/media/member types - more can be added as the need arises
+            var reservedModelAliases = new[] { "system" };
+            if(reservedModelAliases.Contains(model.Alias, StringComparer.OrdinalIgnoreCase))
+            {
+                yield return new ValidationResult($"The model alias {model.Alias} is a reserved term and cannot be used", new[] { "Alias" });
+            }

             var properties = model.Groups.SelectMany(x => x.Properties)
                 .Where(x => x.Inherited == false)


Updated to HTTPS for kerry.lothrop.de (#334). (#359)

--- src/Firehose.Web/Authors/KerryLothrop.cs
+++ src/Firehose.Web/Authors/KerryLothrop.cs
@@ -13,11 +13,11 @@
         public string EmailAddress => string.Empty;
         public string TwitterHandle => "kwlothrop";

-        public Uri WebSite => new Uri("http://kerry.lothrop.de/");
+        public Uri WebSite => new Uri("https://kerry.lothrop.de/");

         public IEnumerable<Uri> FeedUris
         {
-            get { yield return new Uri("http://kerry.lothrop.de/en/feed/"); }
+            get { yield return new Uri("https://kerry.lothrop.de/en/feed/"); }
         }

         public string GravatarHash => "250241b2800a1de895a75ce039bcfef4";


C#: Disable the write-through of the logger, as this is a theoretical slowdown, and results in less readable log files when multiple extractors are running concurrently.

--- csharp/extractor/Semmle.Util/Logger.cs
+++ csharp/extractor/Semmle.Util/Logger.cs
@@ -72,7 +72,6 @@
                     Directory.CreateDirectory(dir);
                 writer = new PidStreamWriter(new FileStream(outputFile, FileMode.Append, FileAccess.Write,
                     FileShare.ReadWrite, 8192));
-                writer.AutoFlush = true;
             }
             catch (Exception ex)  // lgtm[cs/catch-of-all-exceptions]
             {


Don't exclude System.IO.Pipelines from TargetingPack version check (#39287)

--- src/Framework/test/TargetingPackTests.cs
+++ src/Framework/test/TargetingPackTests.cs
@@ -104,22 +104,17 @@

         Assert.All(dlls, path =>
         {
-            // Skip netstandard2.0 System.IO.Pipelines assembly. References have old versions.
-            var filename = Path.GetFileName(path);
-            if (!string.Equals("System.IO.Pipelines.dll", filename, StringComparison.OrdinalIgnoreCase))
-            {
-                using var fileStream = File.OpenRead(path);
-                using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
-                var reader = peReader.GetMetadataReader(MetadataReaderOptions.Default);
-
-                Assert.All(reader.AssemblyReferences, handle =>
-                {
-                    var reference = reader.GetAssemblyReference(handle);
-                    var result = 0 == reference.Version.Revision;
-
-                    Assert.True(result, $"In {filename}, {reference.GetAssemblyName()} has unexpected version {reference.Version}.");
-                });
-            }
+            using var fileStream = File.OpenRead(path);
+            using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
+            var reader = peReader.GetMetadataReader(MetadataReaderOptions.Default);
+
+            Assert.All(reader.AssemblyReferences, handle =>
+            {
+                var reference = reader.GetAssemblyReference(handle);
+                var result = (0 == reference.Version.Revision && 0 == reference.Version.Build);
+
+                Assert.True(result, $"In {Path.GetFileName(path)}, {reference.GetAssemblyName()} has unexpected version {reference.Version}.");
+            });
         });
     }


MAchine -> Machine

MAchine -> Machine

--- src/HeapDump/Debugger/IMetadataImport.cs
+++ src/HeapDump/Debugger/IMetadataImport.cs
@@ -1278,7 +1278,7 @@

         //         STDMETHOD(GetPEKind)(                   // S_OK or error.
         //         DWORD* pdwPEKind,                   // [OUT] The kind of PE (0 - not a PE)
-        //         DWORD* pdwMAchine) PURE;            // [OUT] Machine as defined in NT header
+        //         DWORD* pdwMachine) PURE;            // [OUT] Machine as defined in NT header
         void GetPEKind_();

         //         STDMETHOD(GetVersionString)(            // S_OK or error.


Added Exists & IdList for Caller

Added Exists & IdList for Caller

--- src/Hprose.RPC.Plugins/Reverse/Caller.cs
+++ src/Hprose.RPC.Plugins/Reverse/Caller.cs
@@ -8,7 +8,7 @@
 |                                                          |
 |  Caller class for C#.                                    |
 |                                                          |
-|  LastModified: Mar 12, 2019                              |
+|  LastModified: Mar 20, 2019                              |
 |  Author: Ma Bingyao <andot@hprose.com>                   |
 |                                                          |
 \*________________________________________________________*/
@@ -28,12 +28,12 @@
         private ConcurrentDictionary<string, ConcurrentQueue<(int, string, object[])>> Calls { get; } = new ConcurrentDictionary<string, ConcurrentQueue<(int, string, object[])>>();
         private ConcurrentDictionary<string, ConcurrentDictionary<int, TaskCompletionSource<object>>> Results { get; } = new ConcurrentDictionary<string, ConcurrentDictionary<int, TaskCompletionSource<object>>>();
         private ConcurrentDictionary<string, TaskCompletionSource<(int, string, object[])[]>> Responders { get; } = new ConcurrentDictionary<string, TaskCompletionSource<(int, string, object[])[]>>();
-        private ConcurrentDictionary<string, TaskCompletionSource<bool>> Timers { get; } = new ConcurrentDictionary<string, TaskCompletionSource<bool>>();
+        private ConcurrentDictionary<string, bool> Onlines { get; } = new ConcurrentDictionary<string, bool>();
         public Service Service { get; private set; }
         public TimeSpan Timeout { get; set; } = new TimeSpan(0, 2, 0);
         public Caller(Service service) {
             Service = service;
-            Service.Add<ServiceContext, string>(Close, "!!")
+            Service.Add<ServiceContext>(Close, "!!")
                    .Add<ServiceContext, Task<(int, string, object[])[]>>(Begin, "!")
                    .Add<(int, object, string)[], ServiceContext>(End, "=")
                    .Use(Handler);
@@ -65,15 +65,20 @@
                 }
             }
         }
-        private string Close(ServiceContext context) {
+        private string Stop(ServiceContext context) {
             var id = GetId(context);
             if (Responders.TryRemove(id, out var responder)) {
                 responder?.TrySetResult(null);
             }
             return id;
         }
+        private void Close(ServiceContext context) {
+            var id = Stop(context);
+            Onlines.TryRemove(id, out var _);
+        }
         private async Task<(int, string, object[])[]> Begin(ServiceContext context) {
-            var id = Close(context);
+            var id = Stop(context);
+            Onlines.TryAdd(id, true);
             var responder = new TaskCompletionSource<(int, string, object[])[]>();
             if (!Send(id, responder)) {
                 Responders.AddOrUpdate(id, responder, (_, oldResponder) => {
@@ -162,6 +167,12 @@
             }
         }
 #endif
+        public bool Exists(string id) {
+            return Onlines.ContainsKey(id);
+        }
+        public IList<string> IdList() {
+            return new List<string>(Onlines.Keys);
+        }
         private Task<object> Handler(string name, object[] args, Context context, NextInvokeHandler next) {
             context = new CallerContext(this, context as ServiceContext);
             return next(name, args, context);


Fixed deserialisation bug on tasks, fixed #42

--- bukkitgui2/AddOn/Tasker/Task.cs
+++ bukkitgui2/AddOn/Tasker/Task.cs
@@ -185,28 +185,29 @@
 							}
 							break;
 					}
-					// in case 1 part wasn't loaded, fix (for UI purposes) and deactivate
-					if (this.Trigger == null)
-					{
-						this.Trigger = new CurrentTimeTrigger {Parameters = "00:00:00"};
-						this.Enabled = false;
-					}
-					if (this.Actions == null)
-					{
-						this.Actions = new List<IAction>();
-						this.Enabled = false;
-					}
-					if (string.IsNullOrEmpty(Name))
-					{
-						this.Name = "UNNAMED_" + new Random().Next(1000, 9999);
-						this.Enabled = false;
-					}
+
 				}
 				catch (Exception e)
 				{
 					Logger.Log(LogLevel.Warning, "Task", "Failed to parse task setting: " + dataFragments[0], e.Message);
 				}
 			}
+			// in case 1 part wasn't loaded, fix (for UI purposes) and deactivate
+			if (this.Trigger == null)
+			{
+				this.Trigger = new CurrentTimeTrigger {Parameters = "00:00:00"};
+				this.Enabled = false;
+			}
+			if (this.Actions == null)
+			{
+				this.Actions = new List<IAction>();
+				this.Enabled = false;
+			}
+			if (string.IsNullOrEmpty(Name))
+			{
+				this.Name = "UNNAMED_" + new Random().Next(1000, 9999);
+				this.Enabled = false;
+			}
 			return this;
 		}


Fixed: data races inside sql journal engine

--- src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/JournalDbEngine.cs
+++ src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/JournalDbEngine.cs
@@ -51,18 +51,14 @@
         /// Settings applied to journal mapped from HOCON config file.
         /// </summary>
         public readonly JournalSettings Settings;
-
-        /// <summary>
-        /// List of cancellation tokens for each of the currently pending database operations.
-        /// </summary>
-        protected readonly LinkedList<CancellationTokenSource> PendingOperations;
-
+
         /// <summary>
         /// Timestamp provider used for generation of timestamps for incoming persistent messages.
         /// </summary>
         protected readonly ITimestampProvider TimestampProvider;

         private readonly ActorSystem _system;
+        private readonly CancellationTokenSource _pendingRequestsCancellation;

         protected JournalDbEngine(ActorSystem system)
         {
@@ -72,7 +68,7 @@
             QueryMapper = new DefaultJournalQueryMapper(_system.Serialization);
             TimestampProvider = CreateTimestampProvider();

-            PendingOperations = new LinkedList<CancellationTokenSource>();
+            _pendingRequestsCancellation = new CancellationTokenSource();
         }

         /// <summary>
@@ -118,24 +114,7 @@
         /// </summary>
         public void Close()
         {
-            StopPendingOperations();
-        }
-
-        /// <summary>
-        /// Stops all currently executing database operations.
-        /// </summary>
-        protected void StopPendingOperations()
-        {
-            // stop all operations executed in the background
-            var node = PendingOperations.First;
-            while (node != null)
-            {
-                var curr = node;
-                node = node.Next;
-
-                curr.Value.Cancel();
-                PendingOperations.Remove(curr);
-            }
+            _pendingRequestsCancellation.Cancel();
         }

         void IDisposable.Dispose()
@@ -154,9 +133,8 @@

                 var sqlCommand = QueryBuilder.SelectEvents(hints);
                 CompleteCommand(sqlCommand, connection);
-
-                var tokenSource = GetCancellationTokenSource();
-                var reader = await sqlCommand.ExecuteReaderAsync(tokenSource.Token);
+
+                var reader = await sqlCommand.ExecuteReaderAsync(_pendingRequestsCancellation.Token);
                 try
                 {
                     while (reader.Read())
@@ -168,7 +146,6 @@
                 }
                 finally
                 {
-                    PendingOperations.Remove(tokenSource);
                     reader.Close();
                 }
             }
@@ -192,9 +169,8 @@

                 var sqlCommand = QueryBuilder.SelectMessages(persistenceId, fromSequenceNr, toSequenceNr, max);
                 CompleteCommand(sqlCommand, connection);
-
-                var tokenSource = GetCancellationTokenSource();
-                var reader = await sqlCommand.ExecuteReaderAsync(tokenSource.Token);
+
+                var reader = await sqlCommand.ExecuteReaderAsync(_pendingRequestsCancellation.Token);

                 try
                 {
@@ -207,7 +183,6 @@
                 }
                 finally
                 {
-                    PendingOperations.Remove(tokenSource);
                     reader.Close();
                 }
             }
@@ -224,9 +199,8 @@

                 var sqlCommand = QueryBuilder.SelectHighestSequenceNr(persistenceId);
                 CompleteCommand(sqlCommand, connection);
-                var tokenSource = GetCancellationTokenSource();
-
-                var seqNr = await sqlCommand.ExecuteScalarAsync(tokenSource.Token);
+
+                var seqNr = await sqlCommand.ExecuteScalarAsync(_pendingRequestsCancellation.Token);
                 return seqNr is long ? Convert.ToInt64(seqNr) : 0L;
             }
         }
@@ -288,13 +262,6 @@
         {
             sqlCommand.Connection = connection;
             sqlCommand.CommandTimeout = (int)Settings.ConnectionTimeout.TotalMilliseconds;
-        }
-
-        private CancellationTokenSource GetCancellationTokenSource()
-        {
-            var source = new CancellationTokenSource();
-            PendingOperations.AddLast(source);
-            return source;
         }

         private JournalEntry ToJournalEntry(IPersistentRepresentation message)


v7.0.0

--- buildconfig.cake
+++ buildconfig.cake
@@ -1,6 +1,6 @@
 public class BuildConfig
 {
-    private const string Version = "6.0.1";
+    private const string Version = "7.0.0";

     public readonly string SrcDir = "./src/";
     public readonly string OutDir = "./build/";


Fix SC forcing osu! to do "soft" db reload once in a while

Happens once in a while when memory pooling is enabled.

--- osu!StreamCompanion/Code/Modules/MapDataReplacements/PP/PpReplacements.cs
+++ osu!StreamCompanion/Code/Modules/MapDataReplacements/PP/PpReplacements.cs
@@ -46,11 +46,12 @@

             if (!File.Exists(mapLocation)) return ret;
             FileInfo file = new FileInfo(mapLocation);
-
+            Thread.Sleep(50);//If we acquire lock before osu it'll force "soft" beatmap reprocessing(no data loss, but time consuming).
             while (FileIsLocked(file))
             {
                 Thread.Sleep(1);
             }
+
             if (file.Length == 0) return ret;
             try
             {


Set a sane default for new slider blueprints

--- osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderPlacementBlueprint.cs
+++ osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderPlacementBlueprint.cs
@@ -8,12 +8,14 @@
 using osu.Framework.Graphics;
 using osu.Framework.Input;
 using osu.Framework.Input.Events;
+using osu.Game.Beatmaps.ControlPoints;
 using osu.Game.Graphics;
 using osu.Game.Rulesets.Edit;
 using osu.Game.Rulesets.Objects;
 using osu.Game.Rulesets.Objects.Types;
 using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
 using osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components;
+using osu.Game.Screens.Edit;
 using osuTK;
 using osuTK.Input;

@@ -67,6 +69,9 @@
             inputManager = GetContainingInputManager();
         }

+        [Resolved]
+        private EditorBeatmap editorBeatmap { get; set; }
+
         public override void UpdateTimeAndPosition(SnapResult result)
         {
             base.UpdateTimeAndPosition(result);
@@ -75,6 +80,10 @@
             {
                 case SliderPlacementState.Initial:
                     BeginPlacement();
+
+                    var nearestDifficultyPoint = editorBeatmap.HitObjects.LastOrDefault(h => h.GetEndTime() < HitObject.StartTime)?.DifficultyControlPoint?.DeepClone() as DifficultyControlPoint;
+
+                    HitObject.DifficultyControlPoint = nearestDifficultyPoint ?? new DifficultyControlPoint();
                     HitObject.Position = ToLocalSpace(result.ScreenSpacePosition);
                     break;


Исправлено создание экземпляра движка.

Исправлено создание экземпляра движка.

--- test-soap/Program.cs
+++ test-soap/Program.cs
@@ -12,6 +12,7 @@
 using System.Xml.Schema;
 using System.Xml.Serialization;
 using OneScript.Soap;
+using ScriptEngine;
 using ScriptEngine.HostedScript.Library;
 using ScriptEngine.Machine;
 using ScriptEngine.HostedScript.Library.Xml;
@@ -21,7 +22,8 @@
 {
 	class MainClass : ScriptEngine.HostedScript.IHostApplication
 	{
-		private ScriptEngine.HostedScript.HostedScriptEngine engine = null;
+		// private ScriptEngine.HostedScript.HostedScriptEngine engine = null;
+		private ScriptingEngine engine = null;
 		private readonly string[] _args;

 		MainClass(string[] args)
@@ -92,7 +94,7 @@

 		public void TestEchoService()
 		{
-			var def = new Definitions("http://vm21297.hv8.ru:10080/httpservice/ws/echo.1cws?wsdl", "default", "");
+			var def = new Definitions("http://sv-ws-83-tmp:8084/httpservice/ws/echo.1cws?wsdl", "default", "");
 			var proxy = Proxy.Constructor(def, "http://dmpas/echo", "EchoService", "EchoServiceSoap") as Proxy;
 			proxy.User = "default";

@@ -111,6 +113,11 @@
 			{
 				int methodIndex = proxy.FindMethod("Echo" + callData.Key);

+				if (methodIndex == -1)
+				{
+					continue;
+				}
+
 				IValue result;
 				proxy.CallAsFunction(methodIndex, new IValue[] {callData.Value}, out result);

@@ -121,10 +128,13 @@

 		private void StartEngine()
 		{
-			engine = new ScriptEngine.HostedScript.HostedScriptEngine();
+			var Environment =new RuntimeEnvironment();
+			engine = new ScriptingEngine();
+			engine.Environment = Environment;
+			engine.AttachAssembly(System.Reflection.Assembly.GetAssembly(typeof(XmlReaderImpl)), Environment);
+			engine.AttachAssembly(System.Reflection.Assembly.GetAssembly(typeof(XdtoObjectType)), Environment);
+			engine.AttachAssembly(System.Reflection.Assembly.GetAssembly(typeof(Definitions)), Environment);
 			engine.Initialize();
-			engine.AttachAssembly(System.Reflection.Assembly.GetAssembly(typeof(XdtoObjectType)));
-			engine.AttachAssembly(System.Reflection.Assembly.GetAssembly(typeof(Definitions)));
 		}

 		public void TestXdto()
@@ -252,24 +262,6 @@
 				}
 			}
 		}
-
-		public void TestSomeInternals()
-		{
-			var ss = LoadSchema(@"TestData/Schema01.xsd");
-			var f = new XdtoFactory(ss);
-			var t = f.Type(uri: "unnamedComplexType", name: "TheComplexType") as XdtoObjectType;
-			var v = f.Create(t) as XdtoDataObject;
-			var fGet = t.Properties.FindMethod("Получить");
-			IValue p;
-			t.Properties.CallAsFunction(fGet, new[] {ValueFactory.Create("Element")}, out p);
-			Console.WriteLine(p);
-
-			var source = LoadFromAssemblyResource(@"testsoap.Scripts.router.os");
-
-			var process = engine.CreateProcess(this, source);
-
-			process.Start();
-		}

 		public void Run()
 		{
@@ -277,16 +269,14 @@

 			StartEngine();

-			TestSomeInternals();
-
-			TestUnnamedComplexType();
-
-			TestModel();
-			TestAllModels();
+			// TestUnnamedComplexType();
+
+			// TestModel();
+			// TestAllModels();

 			TestXdto();

-			// TestEchoService ();
+			TestEchoService ();
 			// TestWsdl ();
 		}


more forwards

more forwards

--- src/csharp/Grpc.Core/ForwardedTypes.cs
+++ src/csharp/Grpc.Core/ForwardedTypes.cs
@@ -70,6 +70,7 @@
 [assembly:TypeForwardedToAttribute(typeof(SslCredentials))]
 [assembly:TypeForwardedToAttribute(typeof(Status))]
 [assembly:TypeForwardedToAttribute(typeof(StatusCode))]
+[assembly:TypeForwardedToAttribute(typeof(VerifyPeerCallback))]
 [assembly:TypeForwardedToAttribute(typeof(VerifyPeerContext))]
 [assembly:TypeForwardedToAttribute(typeof(VersionInfo))]
 [assembly:TypeForwardedToAttribute(typeof(WriteOptions))]


Cryptography class is now accessible for everyone

--- src/epvpapi/Generation/Cryptography.cs
+++ src/epvpapi/Generation/Cryptography.cs
@@ -4,7 +4,7 @@

 namespace epvpapi.Generation
 {
-    class Cryptography
+    public class Cryptography
     {
         public static string GetMD5(string str)
         {


Add ability to force initialize interactable

--- Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs
+++ Assets/MixedRealityToolkit.SDK/Features/UX/Interactable/Scripts/Interactable.cs
@@ -643,20 +643,7 @@

         protected virtual void Awake()
         {
-            isInitialized = true;
-
-            if (States == null)
-            {
-                States = GetDefaultInteractableStates();
-            }
-
-            InputAction = ResolveInputAction(InputActionId);
-
-            CurrentDimension = startDimensionIndex;
-
-            RefreshSetup();
-
-            IsEnabled = enabledOnStart;
+            Initialize();
         }

         protected virtual void OnEnable()
@@ -756,6 +743,36 @@
         #endregion MonoBehaviour Implementation

         #region Interactable Initiation
+
+        /// <summary>
+        /// Initialize and setup this Interactable component.
+        /// Generally called on Awake() but may be utilized to force intialization of buttons that are disabled on start
+        /// </summary>
+        public void Initialize()
+        {
+            if (!isInitialized)
+            {
+                isInitialized = true;
+
+                InternalInitialize();
+            }
+        }
+
+        protected virtual void InternalInitialize()
+        {
+            if (States == null)
+            {
+                States = GetDefaultInteractableStates();
+            }
+
+            InputAction = ResolveInputAction(InputActionId);
+
+            CurrentDimension = startDimensionIndex;
+
+            RefreshSetup();
+
+            IsEnabled = enabledOnStart;
+        }

         /// <summary>
         /// Force re-initialization of Interactable from events, themes and state references


dingen

dingen

--- IntelliCloud/IntelliCloud.Service.IntegrationTest/Services/AnswerServiceTest.cs
+++ IntelliCloud/IntelliCloud.Service.IntegrationTest/Services/AnswerServiceTest.cs
@@ -439,12 +439,6 @@
         }
         #endregion Error handling tests

-        #region GetAnswers tests
-
-        // TODO add tests for the getanswers method
-
-        #endregion
-
         #endregion Tests

         #endregion Methods


Don't run in code-style

Don't run in code-style

--- src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpUseNotPatternTests.cs
+++ src/Analyzers/CSharp/Tests/UsePatternMatching/CSharpUseNotPatternTests.cs
@@ -18,6 +18,8 @@

     public partial class CSharpUseNotPatternTests
     {
+#if !CODE_STYLE
+
         [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseNotPattern)]
         [WorkItem(46699, "https://github.com/dotnet/roslyn/issues/46699")]
         public async Task UseNotPattern()
@@ -47,6 +49,7 @@
                 LanguageVersion = LanguageVersion.CSharp9,
             }.RunAsync();
         }
+
         [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseNotPattern)]
         public async Task UnavailableInCSharp8()
         {
@@ -65,5 +68,7 @@
                 LanguageVersion = LanguageVersion.CSharp8,
             }.RunAsync();
         }
+
+#endif
     }
 }


Fixed documentation comment of RangeFacetCountCollector.GetCountDistribution.

--- src/BoboBrowse.Net/BoboBrowse.Net/Facets/Impl/RangeFacetCountCollector.cs
+++ src/BoboBrowse.Net/BoboBrowse.Net/Facets/Impl/RangeFacetCountCollector.cs
@@ -54,7 +54,7 @@
         }

         /// <summary>
-        /// gets distribution of the value arrays. This is only valid when predefined ranges are available.
+        /// gets distribution of the value arrays. When predefined ranges are available, this returns distribution by predefined ranges.
         /// </summary>
         /// <returns></returns>
         public virtual int[] GetCountDistribution()


Test that generated GlobalSuppressions.cs has no trailing whitespace

--- src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs
+++ src/EditorFeatures/CSharpTest/Diagnostics/Suppression/SuppressionTests.cs
@@ -3,11 +3,10 @@
 using System;
 using System.Collections.Immutable;
 using System.Linq;
+using System.Text.RegularExpressions;
 using System.Threading;
 using System.Threading.Tasks;
-using Microsoft.CodeAnalysis.CodeActions;
 using Microsoft.CodeAnalysis.CodeFixes;
-using Microsoft.CodeAnalysis.CodeFixes.Suppression;
 using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.CSharp.CodeFixes.Suppression;
 using Microsoft.CodeAnalysis.CSharp.Diagnostics.SimplifyTypeNames;
@@ -807,6 +806,39 @@
                 }

                 [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSuppression)]
+                public async Task GeneratedCodeShouldNotHaveTrailingWhitespace()
+                {
+                    var expected = $@"
+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project.
+// Project-level suppressions either have no target or are given
+// a specific target and scoped to a namespace, type, member, etc.
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(""InfoDiagnostic"", ""InfoDiagnostic:InfoDiagnostic"", Justification = ""{FeaturesResources.Pending}"", Scope = ""type"", Target = ""~T:Class"")]
+
+";
+
+                    Assert.All(Regex.Split(expected, "\r?\n"), line => Assert.False(HasTrailingWhitespace(line)));
+
+                    await TestAsync(
+            @"
+using System;
+
+[|class Class|]
+{
+    int Method()
+    {
+        int x = 0;
+    }
+}", expected);
+                }
+
+                private static bool HasTrailingWhitespace(string line)
+                {
+                    return line.LastOrNullable() is char last && char.IsWhiteSpace(last);
+                }
+
+                [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsSuppression)]
                 public async Task TestSuppressionOnSimpleType()
                 {
                     await TestAsync(


credscan fix (#32249)

credscan fix (#32249)

--- src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs
+++ src/Middleware/ResponseCaching/test/ResponseCachingPolicyProviderTests.cs
@@ -72,7 +72,7 @@
             var sink = new TestSink();
             var context = TestUtils.CreateTestContext(sink);
             context.HttpContext.Request.Method = HttpMethods.Get;
-            context.HttpContext.Request.Headers.Authorization = "Basic plaintextUN:plaintextPW";
+            context.HttpContext.Request.Headers.Authorization = "Placeholder";

             Assert.False(new ResponseCachingPolicyProvider().AttemptResponseCaching(context));
             TestUtils.AssertLoggedMessages(


Attempting to make sure that the collapsible area is open during the code generation test

--- Lombiq.HelpfulExtensions.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs
+++ Lombiq.HelpfulExtensions.Tests.UI/Extensions/TestCaseUITestContextExtensions.cs
@@ -105,13 +105,12 @@
         await context.EnableFeatureDirectlyAsync(FeatureIds.CodeGeneration);

         await context.GoToContentTypeEditorAsync("Page");
-        // Not trying repeated clicks, not to cause the code container to collapse.
-        await context.ClickReliablyOnAsync(By.ClassName("toggle-showing-generated-migration-code"), 1);
+        await context.ClickReliablyOnAsync(By.ClassName("toggle-showing-generated-migration-code"));

         context.Get(By.Id("generated-migration-code").OfAnyVisibility()).GetValue().ShouldBe(GeneratedMigrationCodes.Page);

-        // Making sure that the code is visible.
-        context.ScrollTo(By.Id("generated-migration-code-container"));
+        // Making sure that the collapsible area is open.
+        context.Get(By.CssSelector("#generated-migration-code-container.collapse.show"));

         // Checking the first line of the CodeMirror editor.
         context.Get(By.CssSelector(".CodeMirror-line .cm-variable")).Text.ShouldBe("_contentDefinitionManager");


9669.1

--- a_mini/projects/PixelFarm/Typography/Typography.Contours/GlyphDynamicOutline.cs
+++ a_mini/projects/PixelFarm/Typography/Typography.Contours/GlyphDynamicOutline.cs
@@ -364,7 +364,7 @@
             float fit_x_offset = _avg_xdiff;
             ////experiment
             ////for subpixel rendering
-            // fit_x_offset -= -0.33f; //use use with subpixel, we shift it to the left 1/3 of 1 px
+            fit_x_offset -= -0.33f; //use use with subpixel, we shift it to the left 1/3 of 1 px

 #if DEBUG
             dbugWriteLine("===begin===" + _avg_xdiff);