Evaluate only << and >> for list values otherwise use standard binary expressions

--- src/Scriban/Runtime/ScriptBinaryExpression.cs
+++ src/Scriban/Runtime/ScriptBinaryExpression.cs
@@ -28,6 +28,7 @@
             if (Operator == ScriptBinaryOperator.EmptyCoalescing)
             {
                 context.Result = leftValue ?? rightValue;
+                return;
             }
             else if (Operator == ScriptBinaryOperator.And || Operator == ScriptBinaryOperator.Or)
             {
@@ -41,17 +42,23 @@
                 {
                     context.Result = leftBoolValue || rightBoolValue;
                 }
-            }
-            else if (leftValue is IList || rightValue is IList)
-            {
-                // Special path for IList to allow custom binary expression
-                context.Result = ScriptArray.CustomOperator.EvaluateBinaryExpression(this, leftValue,
-                    rightValue);
+
+                return;
             }
             else
             {
                 switch (Operator)
                 {
+                    case ScriptBinaryOperator.ShiftLeft:
+                    case ScriptBinaryOperator.ShiftRight:
+                        if (leftValue is IList || rightValue is IList)
+                        {
+                            // Special path for IList to allow custom binary expression
+                            context.Result = ScriptArray.CustomOperator.EvaluateBinaryExpression(this, leftValue,
+                                rightValue);
+                            return;
+                        }
+                        break;
                     case ScriptBinaryOperator.CompareEqual:
                     case ScriptBinaryOperator.CompareNotEqual:
                     case ScriptBinaryOperator.CompareGreater:
@@ -81,11 +88,11 @@
                         {
                             context.Result = Calculate(Operator, leftValue, leftType, rightValue, rightType);
                         }
-                        break;
-                    default:
-                        throw new InvalidOperationException($"Operator [{Operator}] is not implemented");
-                }
-            }
+                        return;
+                }
+            }
+
+            throw new ScriptRuntimeException(Span, $"Operator [{Operator.ToText()}] is not implemented for the left [{Left}] / right [{Right}]");
         }

         public override string ToString()


Fixed potential crash with iOS OnePassword Support

--- src/SimpleAuth.OnePassword.iOS/OnePassword.cs
+++ src/SimpleAuth.OnePassword.iOS/OnePassword.cs
@@ -11,7 +11,7 @@
 	{
 		public static void Activate()
 		{
-			if (!AgileBits.OnePasswordExtension.SharedExtension.IsAppExtensionAvailable)
+			if (!AgileBits.OnePasswordExtension.SharedExtension?.IsAppExtensionAvailable ?? false)
 				return;
 			SimpleAuth.iOS.WebAuthenticatorViewController.RightButtonItem = new UIBarButtonItem(UIImage.FromBundle("onepassword-navbar.png"),UIBarButtonItemStyle.Plain,
 				async (s, e) =>


removed a debuging console output

removed a debuging console output

--- src/SuperSocket.WebSocket/WebSocketPackage.cs
+++ src/SuperSocket.WebSocket/WebSocketPackage.cs
@@ -84,7 +84,6 @@
             if (Head == null)
             {
                 (Head, Tail) = second.DestructSequence();
-                Console.WriteLine($"Reset Head:{this.GetHashCode()}");
                 return;
             }


Null reference check

Null reference check

--- BSolutions.Brecons/BSolutions.Brecons.Core/Extensions/BindingExtensions.cs
+++ BSolutions.Brecons/BSolutions.Brecons.Core/Extensions/BindingExtensions.cs
@@ -75,7 +75,7 @@
         public static object GetModelValue(this FormTagHelperBase tagHelper, TagHelperContext context)
         {
             var modelExpression = GetModelExpression(tagHelper, context);
-            return modelExpression.Model;
+            return modelExpression?.Model;
         }

         /// <summary>


Command timeout fix.

Command timeout fix.

Set command timeout when creating new command.

--- Code/Database/Revenj.DatabasePersistence.Postgres/PostgresDatabaseQuery.cs
+++ Code/Database/Revenj.DatabasePersistence.Postgres/PostgresDatabaseQuery.cs
@@ -63,7 +63,7 @@

 		public IDbCommand NewCommand()
 		{
-			return new NpgsqlCommand();
+			return new NpgsqlCommand { CommandTimeout = Connection.CommandTimeout };
 		}

 		public bool InTransaction


Add 3+ cases for FileOperationSubRequestDataType,FileOperationSubRequestType,FileOperationSubResponseType,FileOperationRequestTypes

--- FileSyncandWOPI/Source/SharedTestSuite/SharedTestCase/S17_FileOperation.cs
+++ FileSyncandWOPI/Source/SharedTestSuite/SharedTestCase/S17_FileOperation.cs
@@ -198,8 +198,6 @@
                 Site.Assert.AreEqual<ErrorCodeType>(
                     ErrorCodeType.InvalidArgument,
                     errorCode,
-                    "MS-FSSHTTP",
-                    11267,
                     @"[In Appendix B: Product Behavior] If the specified attributes[FileOperationRequestType attribute] are not provided, the implementation does return an ""InvalidArgument"" error code as part of the SubResponseData element associated with the file opeartion subresponse. (Microsoft Office 2010 suites/Microsoft SharePoint Foundation 2010/Microsoft SharePoint Server 2010/Microsoft SharePoint Workspace 2010/Microsoft Office 2016/Microsoft SharePoint Server 2016 follow this behavior.)");
             }
         }


remove any extra double quotes from parsed string literals

--- FluentCommandLineParser/Internals/Parsers/StringCommandLineOptionParser.cs
+++ FluentCommandLineParser/Internals/Parsers/StringCommandLineOptionParser.cs
@@ -38,7 +38,7 @@
         /// <returns></returns>
         public string Parse(string value)
         {
-            return value;
+            return value.TrimStart('"').TrimEnd('"');
         }

         /// <summary>


Fix tested code.

Fix tested code.

--- Gu.Localization.Analyzers.Tests/GULOC01KeyExistsAnalyzerTests/HappyPath.cs
+++ Gu.Localization.Analyzers.Tests/GULOC01KeyExistsAnalyzerTests/HappyPath.cs
@@ -644,11 +644,11 @@
     {
         public Foo()
         {
-            var translate = ResourceManager.GetString(nameof(Resources.Key), CultureInfo.GetCultureInfo(""sv-SE""));
-        }
-    }
-}";
-            AnalyzerAssert.Valid(Analyzer, ResourcesCode, TranslateCode, testCode);
+            var translate = Resources.ResourceManager.GetString(nameof(Resources.Key), CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
         }

         [Test]
@@ -661,11 +661,11 @@
     {
         public Foo()
         {
-            var translate = Properties.ResourceManager.GetString(nameof(Properties.Resources.Key), CultureInfo.GetCultureInfo(""sv-SE""));
-        }
-    }
-}";
-            AnalyzerAssert.Valid(Analyzer, ResourcesCode, TranslateCode, testCode);
+            var translate = Properties.Resources.ResourceManager.GetString(nameof(Properties.Resources.Key), CultureInfo.GetCultureInfo(""sv-SE""));
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, ResourcesCode, testCode);
         }
     }
 }


Fix test with better assert.

Fix test with better assert.

--- Gu.Localization.Analyzers.Tests/GULOC08DuplicateNeutralTests/Diagnostic.cs
+++ Gu.Localization.Analyzers.Tests/GULOC08DuplicateNeutralTests/Diagnostic.cs
@@ -38,17 +38,8 @@
             var diagnostics = Analyze.GetDiagnostics(sln, Analyzer).Single();
             Assert.AreEqual(4, diagnostics.Length);

-            Assert.AreEqual("GULOC07", diagnostics[0].Id);
-            StringAssert.EndsWith("Resources.Designer.cs", diagnostics[0].Location.SourceTree.FilePath);
-
-            Assert.AreEqual("GULOC08", diagnostics[1].Id);
-            StringAssert.EndsWith("Resources.Designer.cs", diagnostics[1].Location.SourceTree.FilePath);
-
-            Assert.AreEqual("GULOC07", diagnostics[2].Id);
-            StringAssert.EndsWith("Resources.Designer.cs", diagnostics[2].Location.SourceTree.FilePath);
-
-            Assert.AreEqual("GULOC08", diagnostics[3].Id);
-            StringAssert.EndsWith("Resources.Designer.cs", diagnostics[3].Location.SourceTree.FilePath);
+            CollectionAssert.AreEquivalent(new[] { "GULOC07", "GULOC07", "GULOC08", "GULOC08" }, diagnostics.Select(x => x.Id).ToArray());
+            CollectionAssert.AreEquivalent(new[] { "Resources.Designer.cs", "Resources.Designer.cs", "Resources.Designer.cs", "Resources.Designer.cs" }, diagnostics.Select(x => Path.GetFileName(x.Location.SourceTree.FilePath)).ToArray());
         }
     }
 }


Rename Bounds

Rename Bounds

--- Gu.Wpf.UiAutomation/AutomationElements/Infrastructure/AutomationElement.cs
+++ Gu.Wpf.UiAutomation/AutomationElements/Infrastructure/AutomationElement.cs
@@ -62,17 +62,17 @@
         /// <summary>
         /// The current used automation object.
         /// </summary>
-        public double ActualWidth => this.BoundingRectangle.Width;
+        public double ActualWidth => this.Bounds.Width;

         /// <summary>
         /// The current used automation object.
         /// </summary>
-        public double ActualHeight => this.BoundingRectangle.Height;
+        public double ActualHeight => this.Bounds.Height;

         /// <summary>
         /// The current used automation object.
         /// </summary>
-        public Rect BoundingRectangle
+        public Rect Bounds
         {
             get
             {


Fixed #12

Fixed #12

--- IdentityModel/Thinktecture.IdentityModel/Tokens/Http/HttpAuthentication.cs
+++ IdentityModel/Thinktecture.IdentityModel/Tokens/Http/HttpAuthentication.cs
@@ -7,6 +7,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.Specialized;
+using System.IdentityModel.Protocols.WSTrust;
 using System.IdentityModel.Tokens;
 using System.Linq;
 using System.Net.Http;
@@ -259,6 +260,7 @@
                 AppliesToAddress = Configuration.SessionToken.Audience.AbsoluteUri,
                 TokenIssuerName = Configuration.SessionToken.IssuerName,
                 SigningCredentials = new HmacSigningCredentials(Configuration.SessionToken.SigningKey),
+                Lifetime = new Lifetime(DateTime.UtcNow, DateTime.UtcNow.Add(Configuration.SessionToken.DefaultTokenLifetime)),
                 Subject = principal.Identities.First()
             };

@@ -275,7 +277,7 @@
         {
             var response = new JObject();
             response["access_token"] = sessionToken;
-            response["expires_in"] = DateTime.UtcNow.Add(Configuration.SessionToken.DefaultTokenLifetime).ToEpochTime();
+            response["expires_in"] = Configuration.SessionToken.DefaultTokenLifetime.TotalSeconds;

             return response.ToString();
         }


Changed Button to AdvImage for more flexibility (doesn't have to be a click it, do this)

--- Prototype3/Game.cs
+++ Prototype3/Game.cs
@@ -72,11 +72,11 @@
 }

 /// <summary>
-/// Click it, fires click event.
+/// Interactive image. You can mouse over it, click on it etc.
 /// </summary>
-class Button
+class AdvImage
 {
-    private Sprite sprite;
+    public Sprite sprite { get; set; }
     public event EventHandler Click;

     /// <summary>
@@ -84,9 +84,10 @@
     /// </summary>
     /// <param name="InSprite">Sprite representing button</param>
     /// <param name="InWindow">Parent window</param>
-    public Button(Sprite InSprite, Window InWindow)
+    public AdvImage(string ImgPath, Window InWindow)
     {
-        sprite = InSprite;
+        Texture texture = new Texture(ImgPath);
+        sprite = new Sprite(texture);
         InWindow.MouseButtonPressed +=
             new EventHandler<MouseButtonEventArgs>(OnClick);
     }


Remove shadowing method

Remove shadowing method

--- OpenStardriveServer/Domain/Systems/Propulsion/Engines/EnginesTransforms.cs
+++ OpenStardriveServer/Domain/Systems/Propulsion/Engines/EnginesTransforms.cs
@@ -9,7 +9,6 @@
 public interface IEnginesTransforms : IStandardTransforms<EnginesState>
 {
     TransformResult<EnginesState> SetSpeed(EnginesState state, SetSpeedPayload payload);
-    TransformResult<EnginesState> SetDamaged(EnginesState state, string systemName, DamagedSystemsPayload payload);
     TransformResult<EnginesState> SetCurrentPower(EnginesState state, string systemName, CurrentPowerPayload payload);
     TransformResult<EnginesState> SetRequiredPower(EnginesState state, string systemName, RequiredPowerPayload payload);
     TransformResult<EnginesState> UpdateHeat(EnginesState state, ChronometerPayload payload);


Copy all of invariant culture's data in stubbed out globalization

We've been piecemeal copying parts of the invariant culture over to our temporary culture implementation.  But as I've hit additional pieces needed, I decided to just copy over everything so that hopefully we don't bump up against this again.

--- src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs
+++ src/mscorlib/corefx/System/Globalization/CultureData.Unix.cs
@@ -43,17 +43,83 @@
         private unsafe bool InitCultureData()
         {
             // TODO: Implement this fully.
-            sWindowsName = "";
-            sRealName = "";
-            sSpecificCulture = "";
-            sName = "";
-            bNeutral = false;
-            sNegativeSign = "-";
-            sThousandSeparator = ",";
-            sDecimalSeparator = ".";
-            sCurrency = "\u00A4";
-            sMonetaryDecimal = ".";
-            sMonetaryThousand = ",";
+
+            // For now, just use all of the Invariant's data
+            CultureData invariant = CultureData.Invariant;
+
+            this.sRealName = invariant.sRealName;
+            this.sWindowsName = invariant.sWindowsName;
+
+            // Identity
+            this.sName = invariant.sName;
+            this.sParent = invariant.sParent;
+            this.bNeutral = invariant.bNeutral;
+            this.sEnglishDisplayName = invariant.sEnglishDisplayName;
+            this.sNativeDisplayName = invariant.sNativeDisplayName;
+            this.sSpecificCulture = invariant.sSpecificCulture;
+
+            // Language
+            this.sISO639Language = invariant.sISO639Language;
+            this.sLocalizedLanguage = invariant.sLocalizedLanguage;
+            this.sEnglishLanguage = invariant.sEnglishLanguage;
+            this.sNativeLanguage = invariant.sNativeLanguage;
+
+            // Region
+            this.sRegionName = invariant.sRegionName;
+            this.sEnglishCountry = invariant.sEnglishCountry;
+            this.sNativeCountry = invariant.sNativeCountry;
+            this.sISO3166CountryName = invariant.sISO3166CountryName;
+
+            // Numbers
+            this.sPositiveSign = invariant.sPositiveSign;
+            this.sNegativeSign = invariant.sNegativeSign;
+            this.saNativeDigits = invariant.saNativeDigits;
+            this.iDigits = invariant.iDigits;
+            this.iNegativeNumber = invariant.iNegativeNumber;
+            this.waGrouping = invariant.waGrouping;
+            this.sDecimalSeparator = invariant.sDecimalSeparator;
+            this.sThousandSeparator = invariant.sThousandSeparator;
+            this.sNaN = invariant.sNaN;
+            this.sPositiveInfinity = invariant.sPositiveInfinity;
+            this.sNegativeInfinity = invariant.sNegativeInfinity;
+
+            // Percent
+            this.iNegativePercent = invariant.iNegativePercent;
+            this.iPositivePercent = invariant.iPositivePercent;
+            this.sPercent = invariant.sPercent;
+            this.sPerMille = invariant.sPerMille;
+
+            // Currency
+            this.sCurrency = invariant.sCurrency;
+            this.sIntlMonetarySymbol = invariant.sIntlMonetarySymbol;
+            this.iCurrencyDigits = invariant.iCurrencyDigits;
+            this.iCurrency = invariant.iCurrency;
+            this.iNegativeCurrency = invariant.iNegativeCurrency;
+            this.waMonetaryGrouping = invariant.waMonetaryGrouping;
+            this.sMonetaryDecimal = invariant.sMonetaryDecimal;
+            this.sMonetaryThousand = invariant.sMonetaryThousand;
+
+            // Misc
+            this.iMeasure = invariant.iMeasure;
+            this.sListSeparator = invariant.sListSeparator;
+
+            // Time
+            this.sAM1159 = invariant.sAM1159;
+            this.sPM2359 = invariant.sPM2359;
+            this.saLongTimes = invariant.saLongTimes;
+            this.saShortTimes = invariant.saShortTimes;
+            this.saDurationFormats = invariant.saDurationFormats;
+
+            // Calendar specific data
+            this.iFirstDayOfWeek = invariant.iFirstDayOfWeek;
+            this.iFirstWeekOfYear = invariant.iFirstWeekOfYear;
+            this.waCalendars = invariant.waCalendars;
+
+            // Store for specific data about each calendar
+            this.calendars = invariant.calendars;
+
+            // Text information
+            this.iReadingLayout = invariant.iReadingLayout;

             return true;
         }


Fixed AlarmServiceUrl update to Node table in ConfigurationSetupUtility so that it works with Oracle.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openPG/Main;C76370

--- Source/Tools/ConfigurationSetupUtility/Screens/SetupCompleteScreen.xaml.cs
+++ Source/Tools/ConfigurationSetupUtility/Screens/SetupCompleteScreen.xaml.cs
@@ -350,7 +350,7 @@
         private void ValidateNodeSettings()
         {
             const string settingsQuery = "SELECT Settings FROM Node WHERE ID = '{0}'";
-            const string updateQuery = "UPDATE Node SET Settings = @settings WHERE ID = '{0}'";
+            string updateQuery = "UPDATE Node SET Settings = @settings WHERE ID = '{0}'";

             object selectedNodeId;
             string nodeIDQueryString;
@@ -381,6 +381,9 @@
                     // If the AlarmServiceUrl does not exist in node settings, add it and then update the database record
                     if (!nodeSettings.TryGetValue("AlarmServiceUrl", out alarmServiceUrl))
                     {
+                        if (connection.GetType().Name == "OracleConnection")
+                            updateQuery = updateQuery.Replace('@', ':');
+
                         nodeSettings.Add("AlarmServiceUrl", "http://localhost:5019/alarmservices");
                         nodeSettingsConnectionString = nodeSettings.JoinKeyValuePairs();
                         connection.ExecuteNonQuery(string.Format(updateQuery, nodeIDQueryString), nodeSettingsConnectionString);


send more information if the !tpmods command is disabled

--- TwitchPlaysAssembly/Src/MessageResponders/MiscellaneousMessageResponder.cs
+++ TwitchPlaysAssembly/Src/MessageResponders/MiscellaneousMessageResponder.cs
@@ -475,7 +475,11 @@
 		}
 		else if (text.Equals("tpmods", StringComparison.InvariantCultureIgnoreCase) || text.Equals("moderators", StringComparison.InvariantCultureIgnoreCase))
 		{
-			if (!TwitchPlaySettings.data.EnableModeratorsCommand) return;
+			if (!TwitchPlaySettings.data.EnableModeratorsCommand)
+			{
+				IRCConnection.Instance.SendMessage("The moderators command has been disabled.");
+				return;
+			}
 			Dictionary<string, AccessLevel> moderators = new Dictionary<string, AccessLevel>(UserAccess.GetUsers());
 			string finalmessage = "Current moderators: ";


Expose exception when initializing PerfCounterEnvironmentStatistics (#6260)

--- src/TelemetryConsumers/Orleans.TelemetryConsumers.Counters/Statistics/PerfCounterEnvironmentStatistics.cs
+++ src/TelemetryConsumers/Orleans.TelemetryConsumers.Counters/Statistics/PerfCounterEnvironmentStatistics.cs
@@ -118,10 +118,11 @@
                 TotalPhysicalMemory = Capacity;
                 countersAvailable = true;
             }
-            catch (Exception)
+            catch (Exception ex)
             {
                 logger.Warn(ErrorCode.PerfCounterConnectError,
-                    "Error initializing CPU & Memory perf counters - you need to repair Windows perf counter config on this machine with 'lodctr /r' command");
+                    "Error initializing CPU & Memory perf counters - you need to repair Windows perf counter config on this machine with 'lodctr /r' command",
+                    ex);
             }
         }


address PR feedback

address PR feedback

--- src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.RemoteHostClientService.cs
+++ src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.RemoteHostClientService.cs
@@ -38,7 +38,7 @@

             private SolutionChecksumUpdater _checksumUpdater;
             private CancellationTokenSource _shutdownCancellationTokenSource;
-            private Task<RemoteHostClient> _instanceTask;
+            private Task<RemoteHostClient> _remoteClientTask;

             public RemoteHostClientService(
                 IAsynchronousOperationListener listener,
@@ -60,7 +60,7 @@
             {
                 lock (_gate)
                 {
-                    if (_instanceTask != null)
+                    if (_remoteClientTask != null)
                     {
                         // already enabled
                         return;
@@ -92,7 +92,7 @@
                     // create solution checksum updater
                     _checksumUpdater = new SolutionChecksumUpdater(this, token);

-                    _instanceTask = Task.Run(() => EnableAsync(token), token);
+                    _remoteClientTask = Task.Run(() => EnableAsync(token), token);
                 }
             }

@@ -102,14 +102,14 @@

                 lock (_gate)
                 {
-                    if (_instanceTask == null)
+                    if (_remoteClientTask == null)
                     {
                         // already disabled
                         return;
                     }

-                    var instanceTask = _instanceTask;
-                    _instanceTask = null;
+                    var instanceTask = _remoteClientTask;
+                    _remoteClientTask = null;

                     RemoveGlobalAssets();

@@ -149,7 +149,7 @@
                 Task<RemoteHostClient> instanceTask;
                 lock (_gate)
                 {
-                    instanceTask = _instanceTask;
+                    instanceTask = _remoteClientTask;
                 }

                 if (instanceTask == null)
@@ -232,7 +232,7 @@
                     lock (_gate)
                     {
                         // RemoteHost has been disabled
-                        _instanceTask = null;
+                        _remoteClientTask = null;
                     }
                 }
                 else
@@ -240,11 +240,11 @@
                     lock (_gate)
                     {
                         // save last remoteHostClient
-                        s_lastInstanceTask = _instanceTask;
+                        s_lastInstanceTask = _remoteClientTask;

                         // save NoOpRemoteHostClient to instance so that all RemoteHost call becomes
                         // No Op. this basically have same effect as disabling all RemoteHost features
-                        _instanceTask = Task.FromResult<RemoteHostClient>(new RemoteHostClient.NoOpClient(_workspace));
+                        _remoteClientTask = Task.FromResult<RemoteHostClient>(new RemoteHostClient.NoOpClient(_workspace));
                     }

                     // s_lastInstanceTask info should be saved in the dump
@@ -261,9 +261,14 @@
                     var allowRestarting = _workspace.Options.GetOption(RemoteHostOptions.RestartRemoteHostAllowed);
                     if (allowRestarting)
                     {
+                        // this is hidden restart option. by default, user can't restart remote host that got killed
+                        // by users
                         infoBarUIs.Add(
-                            new ErrorReportingUI("Restart OOP", ErrorReportingUI.UIKind.Button, async () =>
-                            await RequestNewRemoteHostAsync(CancellationToken.None).ConfigureAwait(false), closeAfterAction: true));
+                            new ErrorReportingUI("Restart external process", ErrorReportingUI.UIKind.Button, () =>
+                            {
+                                // start off new remote host
+                                var unused = RequestNewRemoteHostAsync(CancellationToken.None);
+                            }, closeAfterAction: true));
                     }

                     _workspace.Services.GetService<IErrorReportingService>().ShowGlobalErrorInfo(
@@ -274,27 +279,27 @@

             public async Task RequestNewRemoteHostAsync(CancellationToken cancellationToken)
             {
-                var instance = await GetRemoteHostClientAsync(cancellationToken).ConfigureAwait(false);
-                if (instance == null)
+                var existingClient = await TryGetRemoteHostClientAsync(cancellationToken).ConfigureAwait(false);
+                if (existingClient == null)
                 {
                     return;
                 }
-

                 // log that remote host is restarted
                 Logger.Log(FunctionId.RemoteHostClientService_Restarted, KeyValueLogMessage.NoProperty);

                 // we are going to kill the existing remote host, connection change is expected
-                instance.ConnectionChanged -= OnConnectionChanged;
+                existingClient.ConnectionChanged -= OnConnectionChanged;

                 lock (_gate)
                 {
+                    // create new remote host client
                     var token = _shutdownCancellationTokenSource.Token;
-                    _instanceTask = Task.Run(() => EnableAsync(token), token);
+                    _remoteClientTask = Task.Run(() => EnableAsync(token), token);
                 }

                 // shutdown
-                instance.Shutdown();
+                existingClient.Shutdown();
             }
         }
     }


use kind and services

use kind and services

--- src/Features/Core/Portable/ExternalAccess/UnitTesting/SolutionCrawler/UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs
+++ src/Features/Core/Portable/ExternalAccess/UnitTesting/SolutionCrawler/UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs
@@ -39,8 +39,10 @@
                 private readonly UnitTestingNormalPriorityProcessor _normalPriorityProcessor;
                 private readonly UnitTestingLowPriorityProcessor _lowPriorityProcessor;

+#if false // Not used in unit testing crawling
                 // NOTE: IDiagnosticAnalyzerService can be null in test environment.
                 private readonly Lazy<IDiagnosticAnalyzerService?> _lazyDiagnosticAnalyzerService;
+#endif

                 /// <summary>
                 /// The keys in this are either a string or a (string, Guid) tuple. See <see cref="UnitTestingSolutionCrawlerLogger.LogIncrementalAnalyzerProcessorStatistics"/>
@@ -62,7 +64,9 @@
                     _registration = registration;
                     _cacheService = registration.Services.GetService<IProjectCacheService>();

+#if false // Not used in unit testing crawling
                     _lazyDiagnosticAnalyzerService = new Lazy<IDiagnosticAnalyzerService?>(() => GetDiagnosticAnalyzerService(analyzerProviders));
+#endif

                     var analyzersGetter = new UnitTestingAnalyzersGetter(analyzerProviders);

@@ -87,16 +91,18 @@
                     _lowPriorityProcessor = new UnitTestingLowPriorityProcessor(listener, this, lazyAllAnalyzers, globalNotificationService, lowBackOffTimeSpan, shutdownToken);
                 }

+#if false // Not used in unit testing crawling
                 private static IDiagnosticAnalyzerService? GetDiagnosticAnalyzerService(IEnumerable<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>> analyzerProviders)
                 {
                     // alternatively, we could just MEF import IDiagnosticAnalyzerService directly
                     // this can be null in test env.
                     return (IDiagnosticAnalyzerService?)analyzerProviders.Where(p => p.Value is IDiagnosticAnalyzerService).SingleOrDefault()?.Value;
                 }
+#endif

                 private static ImmutableArray<IUnitTestingIncrementalAnalyzer> GetIncrementalAnalyzers(UnitTestingRegistration registration, UnitTestingAnalyzersGetter analyzersGetter, bool onlyHighPriorityAnalyzer)
                 {
-                    var orderedAnalyzers = analyzersGetter.GetOrderedAnalyzers(registration.Services, onlyHighPriorityAnalyzer);
+                    var orderedAnalyzers = analyzersGetter.GetOrderedAnalyzers(registration.WorkspaceKind, registration.Services, onlyHighPriorityAnalyzer);

                     UnitTestingSolutionCrawlerLogger.LogAnalyzers(registration.CorrelationId, registration.WorkspaceKind, orderedAnalyzers, onlyHighPriorityAnalyzer);
                     return orderedAnalyzers;
@@ -402,18 +408,18 @@
                 private class UnitTestingAnalyzersGetter
                 {
                     private readonly List<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>> _analyzerProviders;
-                    private readonly Dictionary<SolutionServices, ImmutableArray<(IUnitTestingIncrementalAnalyzer analyzer, bool highPriorityForActiveFile)>> _analyzerMap = new();
+                    private readonly Dictionary<(string workspaceKind, SolutionServices services), ImmutableArray<(IUnitTestingIncrementalAnalyzer analyzer, bool highPriorityForActiveFile)>> _analyzerMap = new();

                     public UnitTestingAnalyzersGetter(IEnumerable<Lazy<IUnitTestingIncrementalAnalyzerProvider, UnitTestingIncrementalAnalyzerProviderMetadata>> analyzerProviders)
                     {
                         _analyzerProviders = analyzerProviders.ToList();
                     }

-                    public ImmutableArray<IUnitTestingIncrementalAnalyzer> GetOrderedAnalyzers(SolutionServices services, bool onlyHighPriorityAnalyzer)
+                    public ImmutableArray<IUnitTestingIncrementalAnalyzer> GetOrderedAnalyzers(string workspaceKind, SolutionServices services, bool onlyHighPriorityAnalyzer)
                     {
                         lock (_analyzerMap)
                         {
-                            if (!_analyzerMap.TryGetValue(services, out var analyzers))
+                            if (!_analyzerMap.TryGetValue((workspaceKind, services), out var analyzers))
                             {
                                 // Sort list so DiagnosticIncrementalAnalyzers (if any) come first.
                                 analyzers = _analyzerProviders.Select(p => (analyzer: p.Value.CreateIncrementalAnalyzer(), highPriorityForActiveFile: p.Metadata.HighPriorityForActiveFile))
@@ -421,7 +427,7 @@
                                                 .OrderBy(t => t.analyzer!.Priority)
                                                 .ToImmutableArray()!;

-                                _analyzerMap[services] = analyzers;
+                                _analyzerMap[(workspaceKind, services)] = analyzers;
                             }

                             if (onlyHighPriorityAnalyzer)


spelling: suitability

spelling: suitability

Signed-off-by: Josh Soref <7fda0ea80b045d4a8202409eeeb3f1e704f52758@users.noreply.github.com>

--- csharp/extractor/Semmle.Util/FuzzyDictionary.cs
+++ csharp/extractor/Semmle.Util/FuzzyDictionary.cs
@@ -17,7 +17,7 @@
     /// The algorithm locates the closest match to a string based on a "distance function".
     ///
     /// Whilst many distance functions are possible, a bespoke algorithm is used here,
-    /// for efficiency and suitablility for the domain.
+    /// for efficiency and suitability for the domain.
     ///
     /// The distance is defined as the Hamming Distance of the numbers in the string.
     /// Each string is split into the base "form" (stripped of numbers) and a vector of


git-tfs-id: [http://quagmire.cuemon.dk:8080/tfs/MuchMoreCollection]$/MUCHMORE/Main/Source/DnxCore/Cuemon Framework Core/src;C5610

--- Cuemon.Xml/XmlObfuscator.cs
+++ Cuemon.Xml/XmlObfuscator.cs
@@ -197,22 +197,22 @@
         }

         /// <summary>
-        /// Revert the obfuscated XML document of <paramref name="value"/> to its original state by applying the mappaple XML document of <paramref name="mapping"/>.
-        /// </summary>
-        /// <param name="value">The obfuscated <see cref="Stream"/> to revert.</param>
-        /// <param name="mapping">A <see cref="Stream"/> containing mappaple values necessary to revert <paramref name="value"/> to its original state.</param>
+        /// Revert the obfuscated XML document of <paramref name="obfuscated"/> to its original state by applying the mappaple XML document of <paramref name="mapping"/>.
+        /// </summary>
+        /// <param name="obfuscated">The obfuscated <see cref="Stream"/> to revert.</param>
+        /// <param name="mapping">A <see cref="Stream"/> containing mappaple values necessary to revert <paramref name="obfuscated"/> to its original state.</param>
         /// <returns>A <see cref="Stream"/> object where the obfuscated XML document has been reverted to its original XML document.</returns>
-        public override Stream Revert(Stream value, Stream mapping)
-        {
-            if (value == null) throw new ArgumentNullException(nameof(value));
+        public override Stream Revert(Stream obfuscated, Stream mapping)
+        {
+            if (obfuscated == null) throw new ArgumentNullException(nameof(obfuscated));
             if (mapping == null) throw new ArgumentNullException(nameof(mapping));
             long obfustatedStartingPosition = -1;
             long mappingStartingPosition = -1;

-            if (value.CanSeek)
-            {
-                obfustatedStartingPosition = value.Position;
-                value.Position = 0;
+            if (obfuscated.CanSeek)
+            {
+                obfustatedStartingPosition = obfuscated.Position;
+                obfuscated.Position = 0;
             }
             if (mapping.CanSeek)
             {
@@ -231,7 +231,7 @@
                 tempOutput = new MemoryStream();
                 using (var writer = XmlWriter.Create(tempOutput, XmlWriterUtility.CreateSettings(o => o.Encoding = Encoding)))
                 {
-                    using (var reader = XmlReader.Create(value))
+                    using (var reader = XmlReader.Create(obfuscated))
                     {
                         while (reader.Read())
                         {
@@ -292,7 +292,7 @@
                if (tempOutput != null) { tempOutput.Dispose(); }
             }

-            if (value.CanSeek) { value.Seek(obfustatedStartingPosition, SeekOrigin.Begin); }
+            if (obfuscated.CanSeek) { obfuscated.Seek(obfustatedStartingPosition, SeekOrigin.Begin); }
             if (mapping.CanSeek) { mapping.Seek(mappingStartingPosition, SeekOrigin.Begin); }

             return output;


Fixed a bug that causes a crash if a null value if passed to the _ctor() of Text

git-svn-id: 95472bb50cfb75dbf91fed26dc933cae36d5c45c@28 1ca100b6-b014-4248-a4f8-5dbb9f49130a

--- DDay.iCal/DataTypes/Text.cs
+++ DDay.iCal/DataTypes/Text.cs
@@ -18,7 +18,8 @@
         public Text() { }
         public Text(string value) : this()
         {
-            CopyFrom(Parse(value));
+            if (value != null)
+                CopyFrom(Parse(value));
         }

         #endregion


Re-generated code with correctly cased enums.

--- DanTup.DartAnalysis/Json.cs
+++ DanTup.DartAnalysis/Json.cs
@@ -71,7 +71,7 @@

 	public enum AnalysisService
 	{
-		FOLDING, HIGHLIGHTS, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES
+		Folding, Highlights, Navigation, Occurrences, Outline, Overrides
 	}

 	public class AnalysisStatus
@@ -98,7 +98,7 @@

 	public enum CompletionRelevance
 	{
-		LOW, DEFAULT, HIGH
+		Low, Default, High
 	}

 	public class CompletionSuggestion
@@ -201,12 +201,12 @@

 	public enum CompletionSuggestionKind
 	{
-		ARGUMENTLIST, CLASS, CLASSALIAS, CONSTRUCTOR, FIELD, FUNCTION, FUNCTIONTYPEALIAS, GETTER, IMPORT, LIBRARYPREFIX, LOCALVARIABLE, METHOD, METHODNAME, NAMEDARGUMENT, OPTIONALARGUMENT, PARAMETER, SETTER, TOPLEVELVARIABLE, TYPEPARAMETER
+		ArgumentList, Class, ClassAlias, Constructor, Field, Function, FunctionTypeAlias, Getter, Import, LibraryPrefix, LocalVariable, Method, MethodName, NamedArgument, OptionalArgument, Parameter, Setter, TopLevelVariable, TypeParameter
 	}

 	public enum DebugService
 	{
-		LAUNCHDATA
+		LaunchData
 	}

 	public class Element
@@ -247,7 +247,7 @@

 	public enum ElementKind
 	{
-		CLASS, CLASSTYPEALIAS, COMPILATIONUNIT, CONSTRUCTOR, GETTER, FIELD, FUNCTION, FUNCTIONTYPEALIAS, LIBRARY, LOCALVARIABLE, METHOD, SETTER, TOPLEVELVARIABLE, TYPEPARAMETER, UNKNOWN, UNITTESTGROUP, UNITTESTTEST
+		Class, ClassTypeAlias, CompilationUnit, Constructor, Getter, Field, Function, FunctionTypeAlias, Library, LocalVariable, Method, Setter, TopLevelVariable, TypeParameter, Unknown, UnitTestGroup, UnitTestTest
 	}

 	public class Error
@@ -281,12 +281,12 @@

 	public enum ErrorSeverity
 	{
-		INFO, WARNING, ERROR
+		Info, Warning, Error
 	}

 	public enum ErrorType
 	{
-		COMPILETIMEERROR, HINT, STATICTYPEWARNING, STATICWARNING, SYNTACTICERROR, TODO
+		CompileTimeError, Hint, StaticTypeWarning, StaticWarning, SyntacticError, Todo
 	}

 	public class ExecutableFile
@@ -303,12 +303,12 @@

 	public enum ExecutableKind
 	{
-		CLIENT, EITHER, SERVER
+		Client, Either, Server
 	}

 	public enum FoldingKind
 	{
-		COMMENT, CLASSMEMBER, DIRECTIVES, DOCUMENTATIONCOMMENT, TOPLEVELDECLARATION
+		Comment, ClassMember, Directives, DocumentationComment, TopLevelDeclaration
 	}

 	public class FoldingRegion
@@ -345,7 +345,7 @@

 	public enum HighlightRegionType
 	{
-		ANNOTATION, BUILTIN, CLASS, COMMENTBLOCK, COMMENTDOCUMENTATION, COMMENTENDOFLINE, CONSTRUCTOR, DIRECTIVE, DYNAMICTYPE, FIELD, FIELDSTATIC, FUNCTION, FUNCTIONDECLARATION, FUNCTIONTYPEALIAS, GETTERDECLARATION, IDENTIFIERDEFAULT, IMPORTPREFIX, KEYWORD, LITERALBOOLEAN, LITERALDOUBLE, LITERALINTEGER, LITERALLIST, LITERALMAP, LITERALSTRING, LOCALVARIABLE, LOCALVARIABLEDECLARATION, METHOD, METHODDECLARATION, METHODDECLARATIONSTATIC, METHODSTATIC, PARAMETER, SETTERDECLARATION, TOPLEVELVARIABLE, TYPENAMEDYNAMIC, TYPEPARAMETER
+		Annotation, BuiltIn, Class, CommentBlock, CommentDocumentation, CommentEndOfLine, Constructor, Directive, DynamicType, Field, FieldStatic, Function, FunctionDeclaration, FunctionTypeAlias, GetterDeclaration, IdentifierDefault, ImportPrefix, Keyword, LiteralBoolean, LiteralDouble, LiteralInteger, LiteralList, LiteralMap, LiteralString, LocalVariable, LocalVariableDeclaration, Method, MethodDeclaration, MethodDeclarationStatic, MethodStatic, Parameter, SetterDeclaration, TopLevelVariable, TypeNameDynamic, TypeParameter
 	}

 	public class HoverInformation
@@ -450,7 +450,7 @@

 	public enum LinkedEditSuggestionKind
 	{
-		METHOD, PARAMETER, TYPE, VARIABLE
+		Method, Parameter, Type, Variable
 	}

 	public class Location
@@ -602,7 +602,7 @@

 	public enum RefactoringKind
 	{
-		CONVERTGETTERTOMETHOD, CONVERTMETHODTOGETTER, EXTRACTLOCALVARIABLE, EXTRACTMETHOD, INLINELOCALVARIABLE, INLINEMETHOD, RENAME
+		ConvertGetterToMethod, ConvertMethodToGetter, ExtractLocalVariable, ExtractMethod, InlineLocalVariable, InlineMethod, Rename
 	}

 	public class RefactoringProblem
@@ -624,7 +624,7 @@

 	public enum RefactoringProblemSeverity
 	{
-		INFO, WARNING, ERROR, FATAL
+		Info, Warning, Error, Fatal
 	}

 	public class RemoveContentOverlay
@@ -661,12 +661,12 @@

 	public enum SearchResultKind
 	{
-		DECLARATION, INVOCATION, READ, READWRITE, REFERENCE, WRITE
+		Declaration, Invocation, Read, ReadWrite, Reference, Write
 	}

 	public enum ServerService
 	{
-		STATUS
+		Status
 	}

 	public class SourceChange


tidy using.

tidy using.

--- uSync8.ContentEdition/Mapping/Mappers/BlockListMapper.cs
+++ uSync8.ContentEdition/Mapping/Mappers/BlockListMapper.cs
@@ -1,18 +1,10 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using Microsoft.Owin.Security.DataProtection;

 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;

-using Umbraco.Core;
-using Umbraco.Core.Models;
 using Umbraco.Core.Services;
-using Umbraco.Core.Services.Implement;

 using uSync8.Core;
 using uSync8.Core.Dependency;


fix build errors after rebase

fix build errors after rebase

--- test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
+++ test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
@@ -648,10 +648,9 @@
             var projectDirectory = TestAssets.Get(projectName)
                 .CreateInstance()
                 .WithSourceFiles()
-                .Root
-                .FullName;
-
-            MigrateProject(projectDirectory);
+                .Root;
+
+            MigrateProject(projectDirectory.FullName);
             Restore(projectDirectory, projectName);
             BuildMSBuild(projectDirectory, projectName);
         }


Implements IEquatable

Implements IEquatable

--- dotnet/cbcm-csharp/cbcmschema/BrowserDevices.cs
+++ dotnet/cbcm-csharp/cbcmschema/BrowserDevices.cs
@@ -1,245 +1,274 @@
-// <auto-generated />
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-//    using cbcmSchema.Browserdevices;
-//
-//    var browserDevices = BrowserDevices.FromJson(jsonString);
-
-namespace cbcmSchema.Browserdevices
-{
-    using System;
-    using System.Collections.Generic;
-
-    using System.Globalization;
-    using Newtonsoft.Json;
-    using Newtonsoft.Json.Converters;
-
-    public partial class BrowserDevices
-    {
-        [JsonProperty("browsers", NullValueHandling = NullValueHandling.Ignore)]
-        public List<BrowserDevicesBrowser> Browsers { get; set; }
-
-        [JsonProperty("nextPageToken", NullValueHandling = NullValueHandling.Ignore)]
-        public string NextPageToken { get; set; }
-    }
-
-    public partial class BrowserDevicesBrowser
-    {
-        [JsonProperty("deviceId", NullValueHandling = NullValueHandling.Ignore)]
-        public Guid? DeviceId { get; set; }
-
-        [JsonProperty("lastPolicyFetchTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastPolicyFetchTime { get; set; }
-
-        [JsonProperty("osPlatform", NullValueHandling = NullValueHandling.Ignore)]
-        public string OsPlatform { get; set; }
-
-        [JsonProperty("osArchitecture", NullValueHandling = NullValueHandling.Ignore)]
-        public string OsArchitecture { get; set; }
-
-        [JsonProperty("osVersion", NullValueHandling = NullValueHandling.Ignore)]
-        public string OsVersion { get; set; }
-
-        [JsonProperty("machineName", NullValueHandling = NullValueHandling.Ignore)]
-        public string MachineName { get; set; }
-
-        [JsonProperty("lastRegistrationTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastRegistrationTime { get; set; }
-
-        [JsonProperty("extensionCount", NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public long? ExtensionCount { get; set; }
-
-        [JsonProperty("policyCount", NullValueHandling = NullValueHandling.Ignore)]
-        [JsonConverter(typeof(ParseStringConverter))]
-        public long? PolicyCount { get; set; }
-
-        [JsonProperty("lastDeviceUser", NullValueHandling = NullValueHandling.Ignore)]
-        public string LastDeviceUser { get; set; }
-
-        [JsonProperty("lastActivityTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastActivityTime { get; set; }
-
-        [JsonProperty("osPlatformVersion", NullValueHandling = NullValueHandling.Ignore)]
-        public string OsPlatformVersion { get; set; }
-
-        [JsonProperty("browserVersions", NullValueHandling = NullValueHandling.Ignore)]
-        public List<string> BrowserVersions { get; set; }
-
-        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastStatusReportTime { get; set; }
-
-        [JsonProperty("lastDeviceUsers", NullValueHandling = NullValueHandling.Ignore)]
-        public List<LastDeviceUser> LastDeviceUsers { get; set; }
-
-        [JsonProperty("machinePolicies", NullValueHandling = NullValueHandling.Ignore)]
-        public List<MachinePolicy> MachinePolicies { get; set; }
-
-        [JsonProperty("browsers", NullValueHandling = NullValueHandling.Ignore)]
-        public List<BrowserBrowser> Browsers { get; set; }
-
-        [JsonProperty("serialNumber", NullValueHandling = NullValueHandling.Ignore)]
-        public string SerialNumber { get; set; }
-
-        [JsonProperty("virtualDeviceId", NullValueHandling = NullValueHandling.Ignore)]
-        public string VirtualDeviceId { get; set; }
-
-        [JsonProperty("orgUnitPath", NullValueHandling = NullValueHandling.Ignore)]
-        public string OrgUnitPath { get; set; }
-
-        [JsonProperty("deviceIdentifiersHistory", NullValueHandling = NullValueHandling.Ignore)]
-        public DeviceIdentifiersHistory DeviceIdentifiersHistory { get; set; }
-    }
-
-    public partial class BrowserBrowser
-    {
-        [JsonProperty("browserVersion", NullValueHandling = NullValueHandling.Ignore)]
-        public string BrowserVersion { get; set; }
-
-        [JsonProperty("channel", NullValueHandling = NullValueHandling.Ignore)]
-        public string Channel { get; set; }
-
-        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastStatusReportTime { get; set; }
-
-        [JsonProperty("executablePath", NullValueHandling = NullValueHandling.Ignore)]
-        public string ExecutablePath { get; set; }
-
-        [JsonProperty("plugins", NullValueHandling = NullValueHandling.Ignore)]
-        public List<Plugin> Plugins { get; set; }
-
-        [JsonProperty("profiles", NullValueHandling = NullValueHandling.Ignore)]
-        public List<Profile> Profiles { get; set; }
-    }
-
-    public partial class Plugin
-    {
-        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
-        public string Name { get; set; }
-
-        [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
-        public string Description { get; set; }
-
-        [JsonProperty("filename", NullValueHandling = NullValueHandling.Ignore)]
-        public string Filename { get; set; }
-    }
-
-    public partial class Profile
-    {
-        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
-        public string Name { get; set; }
-
-        [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
-        public string Id { get; set; }
-
-        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastStatusReportTime { get; set; }
-
-        [JsonProperty("lastPolicyFetchTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastPolicyFetchTime { get; set; }
-
-        [JsonProperty("chromeSignedInUserEmail", NullValueHandling = NullValueHandling.Ignore)]
-        public string ChromeSignedInUserEmail { get; set; }
-
-        [JsonProperty("extensions", NullValueHandling = NullValueHandling.Ignore)]
-        public List<Extension> Extensions { get; set; }
-    }
-
-    public partial class Extension
-    {
-        [JsonProperty("extensionId", NullValueHandling = NullValueHandling.Ignore)]
-        public string ExtensionId { get; set; }
-
-        [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)]
-        public string Version { get; set; }
-
-        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
-        public string Name { get; set; }
-
-        [JsonProperty("appType", NullValueHandling = NullValueHandling.Ignore)]
-        public string AppType { get; set; }
-
-        [JsonProperty("installType", NullValueHandling = NullValueHandling.Ignore)]
-        public string InstallType { get; set; }
-    }
-
-    public partial class DeviceIdentifiersHistory
-    {
-    }
-
-    public partial class LastDeviceUser
-    {
-        [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)]
-        public string UserName { get; set; }
-
-        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
-        public DateTimeOffset? LastStatusReportTime { get; set; }
-    }
-
-    public partial class MachinePolicy
-    {
-        [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
-        public string Source { get; set; }
-
-        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
-        public string Name { get; set; }
-
-        [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
-        public string Value { get; set; }
-    }
-
-    public partial class BrowserDevices
-    {
-        public static BrowserDevices FromJson(string json) => JsonConvert.DeserializeObject<BrowserDevices>(json, cbcmSchema.Browserdevices.Converter.Settings);
-    }
-
-    public static class Serialize
-    {
-        public static string ToJson(this BrowserDevices self) => JsonConvert.SerializeObject(self, cbcmSchema.Browserdevices.Converter.Settings);
-    }
-
-    internal static class Converter
-    {
-        public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
-        {
-            MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
-            DateParseHandling = DateParseHandling.None,
-            Converters =
-            {
-                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
-            },
-        };
-    }
-
-    internal class ParseStringConverter : JsonConverter
-    {
-        public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
-
-        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
-        {
-            if (reader.TokenType == JsonToken.Null) return null;
-            var value = serializer.Deserialize<string>(reader);
-            long l;
-            if (Int64.TryParse(value, out l))
-            {
-                return l;
-            }
-            throw new Exception("Cannot unmarshal type long");
-        }
-
-        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
-        {
-            if (untypedValue == null)
-            {
-                serializer.Serialize(writer, null);
-                return;
-            }
-            var value = (long)untypedValue;
-            serializer.Serialize(writer, value.ToString());
-            return;
-        }
-
-        public static readonly ParseStringConverter Singleton = new ParseStringConverter();
-    }
-}
+// <auto-generated />
+//
+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
+//
+//    using cbcmSchema.Browserdevices;
+//
+//    var browserDevices = BrowserDevices.FromJson(jsonString);
+
+namespace cbcmSchema.Browserdevices
+{
+    using System;
+    using System.Collections.Generic;
+
+    using System.Globalization;
+    using Newtonsoft.Json;
+    using Newtonsoft.Json.Converters;
+
+    public partial class BrowserDevices
+    {
+        [JsonProperty("browsers", NullValueHandling = NullValueHandling.Ignore)]
+        public List<BrowserDevicesBrowser> Browsers { get; set; }
+
+        [JsonProperty("nextPageToken", NullValueHandling = NullValueHandling.Ignore)]
+        public string NextPageToken { get; set; }
+    }
+
+    public partial class BrowserDevicesBrowser : IEquatable<BrowserDevicesBrowser>
+    {
+        [JsonProperty("deviceId", NullValueHandling = NullValueHandling.Ignore)]
+        public string DeviceId { get; set; }
+
+        [JsonProperty("lastPolicyFetchTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastPolicyFetchTime { get; set; }
+
+        [JsonProperty("osPlatform", NullValueHandling = NullValueHandling.Ignore)]
+        public string OsPlatform { get; set; }
+
+        [JsonProperty("osArchitecture", NullValueHandling = NullValueHandling.Ignore)]
+        public string OsArchitecture { get; set; }
+
+        [JsonProperty("osVersion", NullValueHandling = NullValueHandling.Ignore)]
+        public string OsVersion { get; set; }
+
+        [JsonProperty("machineName", NullValueHandling = NullValueHandling.Ignore)]
+        public string MachineName { get; set; }
+
+        [JsonProperty("lastRegistrationTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastRegistrationTime { get; set; }
+
+        [JsonProperty("extensionCount", NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public long? ExtensionCount { get; set; }
+
+        [JsonProperty("policyCount", NullValueHandling = NullValueHandling.Ignore)]
+        [JsonConverter(typeof(ParseStringConverter))]
+        public long? PolicyCount { get; set; }
+
+        [JsonProperty("lastDeviceUser", NullValueHandling = NullValueHandling.Ignore)]
+        public string LastDeviceUser { get; set; }
+
+        [JsonProperty("lastActivityTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastActivityTime { get; set; }
+
+        [JsonProperty("osPlatformVersion", NullValueHandling = NullValueHandling.Ignore)]
+        public string OsPlatformVersion { get; set; }
+
+        [JsonProperty("browserVersions", NullValueHandling = NullValueHandling.Ignore)]
+        public List<string> BrowserVersions { get; set; }
+
+        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastStatusReportTime { get; set; }
+
+        [JsonProperty("lastDeviceUsers", NullValueHandling = NullValueHandling.Ignore)]
+        public List<LastDeviceUser> LastDeviceUsers { get; set; }
+
+        [JsonProperty("machinePolicies", NullValueHandling = NullValueHandling.Ignore)]
+        public List<MachinePolicy> MachinePolicies { get; set; }
+
+        [JsonProperty("browsers", NullValueHandling = NullValueHandling.Ignore)]
+        public List<BrowserBrowser> Browsers { get; set; }
+
+        [JsonProperty("serialNumber", NullValueHandling = NullValueHandling.Ignore)]
+        public string SerialNumber { get; set; }
+
+        [JsonProperty("virtualDeviceId", NullValueHandling = NullValueHandling.Ignore)]
+        public string VirtualDeviceId { get; set; }
+
+        [JsonProperty("orgUnitPath", NullValueHandling = NullValueHandling.Ignore)]
+        public string OrgUnitPath { get; set; }
+
+        [JsonProperty("deviceIdentifiersHistory", NullValueHandling = NullValueHandling.Ignore)]
+        public DeviceIdentifiersHistory DeviceIdentifiersHistory { get; set; }
+
+        public override string ToString()
+        {
+            return this.DeviceId;
+        }
+
+        public override bool Equals(object obj)
+        {
+            if (obj == null) return false;
+
+            BrowserDevicesBrowser lhs = obj as BrowserDevicesBrowser;
+
+            if (lhs == null) return false;
+
+            if (String.IsNullOrEmpty(lhs.DeviceId)) return false;
+
+            return String.Compare(lhs.DeviceId, this.DeviceId, true) == 0;
+        }
+
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
+        public bool Equals(BrowserDevicesBrowser other)
+        {
+            if (other == null) return false;
+            return this.DeviceId.Equals(other.DeviceId);
+        }
+    }
+
+    public partial class BrowserBrowser
+    {
+        [JsonProperty("browserVersion", NullValueHandling = NullValueHandling.Ignore)]
+        public string BrowserVersion { get; set; }
+
+        [JsonProperty("channel", NullValueHandling = NullValueHandling.Ignore)]
+        public string Channel { get; set; }
+
+        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastStatusReportTime { get; set; }
+
+        [JsonProperty("executablePath", NullValueHandling = NullValueHandling.Ignore)]
+        public string ExecutablePath { get; set; }
+
+        [JsonProperty("plugins", NullValueHandling = NullValueHandling.Ignore)]
+        public List<Plugin> Plugins { get; set; }
+
+        [JsonProperty("profiles", NullValueHandling = NullValueHandling.Ignore)]
+        public List<Profile> Profiles { get; set; }
+    }
+
+    public partial class Plugin
+    {
+        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
+        public string Name { get; set; }
+
+        [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
+        public string Description { get; set; }
+
+        [JsonProperty("filename", NullValueHandling = NullValueHandling.Ignore)]
+        public string Filename { get; set; }
+    }
+
+    public partial class Profile
+    {
+        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
+        public string Name { get; set; }
+
+        [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
+        public string Id { get; set; }
+
+        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastStatusReportTime { get; set; }
+
+        [JsonProperty("lastPolicyFetchTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastPolicyFetchTime { get; set; }
+
+        [JsonProperty("chromeSignedInUserEmail", NullValueHandling = NullValueHandling.Ignore)]
+        public string ChromeSignedInUserEmail { get; set; }
+
+        [JsonProperty("extensions", NullValueHandling = NullValueHandling.Ignore)]
+        public List<Extension> Extensions { get; set; }
+    }
+
+    public partial class Extension
+    {
+        [JsonProperty("extensionId", NullValueHandling = NullValueHandling.Ignore)]
+        public string ExtensionId { get; set; }
+
+        [JsonProperty("version", NullValueHandling = NullValueHandling.Ignore)]
+        public string Version { get; set; }
+
+        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
+        public string Name { get; set; }
+
+        [JsonProperty("appType", NullValueHandling = NullValueHandling.Ignore)]
+        public string AppType { get; set; }
+
+        [JsonProperty("installType", NullValueHandling = NullValueHandling.Ignore)]
+        public string InstallType { get; set; }
+    }
+
+    public partial class DeviceIdentifiersHistory
+    {
+    }
+
+    public partial class LastDeviceUser
+    {
+        [JsonProperty("userName", NullValueHandling = NullValueHandling.Ignore)]
+        public string UserName { get; set; }
+
+        [JsonProperty("lastStatusReportTime", NullValueHandling = NullValueHandling.Ignore)]
+        public DateTimeOffset? LastStatusReportTime { get; set; }
+    }
+
+    public partial class MachinePolicy
+    {
+        [JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
+        public string Source { get; set; }
+
+        [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
+        public string Name { get; set; }
+
+        [JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
+        public string Value { get; set; }
+    }
+
+    public partial class BrowserDevices
+    {
+        public static BrowserDevices FromJson(string json) => JsonConvert.DeserializeObject<BrowserDevices>(json, cbcmSchema.Browserdevices.Converter.Settings);
+    }
+
+    public static class Serialize
+    {
+        public static string ToJson(this BrowserDevices self) => JsonConvert.SerializeObject(self, cbcmSchema.Browserdevices.Converter.Settings);
+    }
+
+    internal static class Converter
+    {
+        public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
+        {
+            MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
+            DateParseHandling = DateParseHandling.None,
+            Converters =
+            {
+                new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
+            },
+        };
+    }
+
+    internal class ParseStringConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            if (reader.TokenType == JsonToken.Null) return null;
+            var value = serializer.Deserialize<string>(reader);
+            long l;
+            if (Int64.TryParse(value, out l))
+            {
+                return l;
+            }
+            throw new Exception("Cannot unmarshal type long");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            if (untypedValue == null)
+            {
+                serializer.Serialize(writer, null);
+                return;
+            }
+            var value = (long)untypedValue;
+            serializer.Serialize(writer, value.ToString());
+            return;
+        }
+
+        public static readonly ParseStringConverter Singleton = new ParseStringConverter();
+    }
+}


Litecart - ускорение теста CheckCountriesAlphabeticallySorted

Названия стран считываются в список строк, а затем анализируется уже
этот список

--- litecart/litecart/AdminPageTests.cs
+++ litecart/litecart/AdminPageTests.cs
@@ -58,11 +58,18 @@

             IList<IWebElement> countries = driver.FindElements(By.XPath(CountriesXpath));

+            List<string> countriesNames = new List<string>();
+
+            for (int i=0; i<countries.Count; i++)
+            {
+                countriesNames.Add(countries[i].Text);
+            }
+
             bool isSortingByAsc = true;

-            for (int i=0; i<countries.Count-1; i++)
+            for (int i=0; i<countriesNames.Count-1; i++)
             {
-                if(countries[i].Text.CompareTo(countries[i+1].Text)==1)
+                if(countriesNames[i].CompareTo(countriesNames[i+1])==1)
                 {
                     isSortingByAsc = false;
                     break;


DEV-30489; fix: indentaion

DEV-30489; fix: indentaion

--- Acrolinx.Sidebar/AcrolinxSidebar.cs
+++ Acrolinx.Sidebar/AcrolinxSidebar.cs
@@ -605,14 +605,14 @@
         {
             if (!e.IsSuccess)
             {
-                 Logger.AcroLog.Error("The server doesn't seem to be responding. Is the address correct? Error code: " + e.WebErrorStatus.ToString());
+                Logger.AcroLog.Error("The server doesn't seem to be responding. Is the address correct? Error code: " + e.WebErrorStatus.ToString());
             }
         }

         private void webView2_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
         {
             // Access web view instance only after intialization is complete
-
+
             string filter = "*/sidebar/v??/index.html*";
             webView2.CoreWebView2.AddWebResourceRequestedFilter(filter, CoreWebView2WebResourceContext.All);

@@ -642,7 +642,7 @@

         private void webView2_Resize(object sender, EventArgs e)
         {
-           AdjustSidebarZoomLevelByWidth();
+            AdjustSidebarZoomLevelByWidth();
         }

         private void AdjustSidebarZoomLevelByWidth()
@@ -650,7 +650,8 @@
             var scaling = Util.GraphicUtil.GetScaling();
             var sidebarConstantWidth = 300;
             var width = webView2.Parent.ClientSize.Width;
-            if (width > 0) {
+            if (width > 0)
+            {
                 webView2.ZoomFactor = webView2.Parent.ClientSize.Width / (sidebarConstantWidth * scaling);
             }
         }
@@ -661,4 +662,4 @@
             webView2.Dispose();
         }
     }
-}+}


Delete BME280_eRegisters.cs

Delete BME280_eRegisters.cs

--- AdafruitBME280/BME280_eRegisters.cs
+++ AdafruitBME280/BME280_eRegisters.cs
@@ -1,47 +0,0 @@
-namespace HiGHTECHNiX.AutoPlant.Drivers.AdafruitBME280
-{
-    public enum eRegisters : byte
-    {
-        BME280_REGISTER_DIG_T1 = 0x88,
-        BME280_REGISTER_DIG_T2 = 0x8A,
-        BME280_REGISTER_DIG_T3 = 0x8C,
-
-        BME280_REGISTER_DIG_P1 = 0x8E,
-        BME280_REGISTER_DIG_P2 = 0x90,
-        BME280_REGISTER_DIG_P3 = 0x92,
-        BME280_REGISTER_DIG_P4 = 0x94,
-        BME280_REGISTER_DIG_P5 = 0x96,
-        BME280_REGISTER_DIG_P6 = 0x98,
-        BME280_REGISTER_DIG_P7 = 0x9A,
-        BME280_REGISTER_DIG_P8 = 0x9C,
-        BME280_REGISTER_DIG_P9 = 0x9E,
-
-        BME280_REGISTER_DIG_H1 = 0xA1,
-        BME280_REGISTER_DIG_H2 = 0xE1,
-        BME280_REGISTER_DIG_H3 = 0xE3,
-        BME280_REGISTER_DIG_H4 = 0xE4,
-        BME280_REGISTER_DIG_H5 = 0xE5,
-        BME280_REGISTER_DIG_H6 = 0xE7,
-
-        BME280_REGISTER_CHIPID = 0xD0,
-        BME280_REGISTER_VERSION = 0xD1,
-        BME280_REGISTER_SOFTRESET = 0xE0,
-
-        BME280_REGISTER_CAL26 = 0xE1,  // R calibration stored in 0xE1-0xF0
-
-        BME280_REGISTER_CONTROLHUMID = 0xF2,
-        BME280_REGISTER_CONTROL = 0xF4,
-        BME280_REGISTER_CONFIG = 0xF5,
-
-        BME280_REGISTER_PRESSUREDATA_MSB = 0xF7,
-        BME280_REGISTER_PRESSUREDATA_LSB = 0xF8,
-        BME280_REGISTER_PRESSUREDATA_XLSB = 0xF9, // bits <7:4>
-
-        BME280_REGISTER_TEMPDATA_MSB = 0xFA,
-        BME280_REGISTER_TEMPDATA_LSB = 0xFB,
-        BME280_REGISTER_TEMPDATA_XLSB = 0xFC, // bits <7:4>
-
-        BME280_REGISTER_HUMIDDATA_MSB = 0xFD,
-        BME280_REGISTER_HUMIDDATA_LSB = 0xFE,
-    };
-}


Use NRT

Use NRT

--- src/Features/Core/Portable/AddAnonymousTypeMemberName/AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs
+++ src/Features/Core/Portable/AddAnonymousTypeMemberName/AbstractAddAnonymousTypeMemberNameCodeFixProvider.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 disable

 using System;
 using System.Collections.Generic;
@@ -55,18 +53,18 @@
                 context.Diagnostics);
         }

-        private async Task<TAnonymousObjectMemberDeclaratorSyntax> GetMemberDeclaratorAsync(
+        private async Task<TAnonymousObjectMemberDeclaratorSyntax?> GetMemberDeclaratorAsync(
             Document document, Diagnostic diagnostic, CancellationToken cancellationToken)
         {
             var span = diagnostic.Location.SourceSpan;
-            var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
+            var root = await document.GetRequiredSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
             var node = root.FindNode(span, getInnermostNodeForTie: true) as TExpressionSyntax;
             if (node?.Span != span)
             {
                 return null;
             }

-            if (!(node.Parent is TAnonymousObjectMemberDeclaratorSyntax declarator))
+            if (node.Parent is not TAnonymousObjectMemberDeclaratorSyntax declarator)
             {
                 return null;
             }
@@ -77,7 +75,7 @@
                 return null;
             }

-            if (!(declarator.Parent is TAnonymousObjectInitializer))
+            if (declarator.Parent is not TAnonymousObjectInitializer)
             {
                 return null;
             }
@@ -93,7 +91,7 @@
             // it so the user can pick a better name if they want.
             var annotation = diagnostics.Length == 1 ? RenameAnnotation.Create() : null;

-            var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
+            var semanticModel = await document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
             foreach (var diagnostic in diagnostics)
             {
                 await FixOneAsync(
@@ -104,7 +102,7 @@

         private async Task FixOneAsync(
             Document document, SemanticModel semanticModel, Diagnostic diagnostic,
-            SyntaxEditor editor, SyntaxAnnotation annotation, CancellationToken cancellationToken)
+            SyntaxEditor editor, SyntaxAnnotation? annotation, CancellationToken cancellationToken)
         {
             var declarator = await GetMemberDeclaratorAsync(document, diagnostic, cancellationToken).ConfigureAwait(false);
             if (declarator == null)
@@ -112,20 +110,20 @@
                 return;
             }

-            var semanticFacts = document.GetLanguageService<ISemanticFactsService>();
+            var semanticFacts = document.GetRequiredLanguageService<ISemanticFactsService>();
             var name = semanticFacts.GenerateNameForExpression(semanticModel, GetExpression(declarator), capitalize: true, cancellationToken);
             if (string.IsNullOrEmpty(name))
             {
                 return;
             }

-            var syntaxFacts = document.GetLanguageService<ISyntaxFactsService>();
+            var syntaxFacts = document.GetRequiredLanguageService<ISyntaxFactsService>();
             editor.ReplaceNode(
                 declarator,
                 (current, generator) =>
                 {
                     var currentDeclarator = (TAnonymousObjectMemberDeclaratorSyntax)current;
-                    var initializer = (TAnonymousObjectInitializer)currentDeclarator.Parent;
+                    var initializer = (TAnonymousObjectInitializer)currentDeclarator.GetRequiredParent();
                     var existingNames = GetAnonymousObjectMemberNames(initializer);
                     var anonymousType = current.Parent;
                     var uniqueName = NameGenerator.EnsureUniqueness(name, existingNames, syntaxFacts.IsCaseSensitive);


Use the right platform, and handle TargetPath and P2P refs properly

--- src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioProjectTracker_IVsSolutionLoadEvents.cs
+++ src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioProjectTracker_IVsSolutionLoadEvents.cs
@@ -3,6 +3,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.Immutable;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
@@ -112,24 +113,27 @@
             var workspaceProjectContextFactory = componentModel.GetService<IWorkspaceProjectContextFactory>();

             var dte = _serviceProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
-            var solutionConfig = dte.Solution.SolutionBuild.ActiveConfiguration;
+            var solutionConfig = (EnvDTE80.SolutionConfiguration2)dte.Solution.SolutionBuild.ActiveConfiguration;

             var start = DateTimeOffset.UtcNow;
             OutputToOutputWindow($"Getting project information - start");
             // Capture the context so that we come back on the UI thread, and do the actual project creation there.
             var projectInfos = await deferredProjectWorkspaceService.GetDeferredProjectInfoForConfigurationAsync(
-                $"{solutionConfig.Name}|Any CPU",
+                $"{solutionConfig.Name}|{solutionConfig.PlatformName}",
                 cancellationToken).ConfigureAwait(true);
             AssertIsForeground();
             OutputToOutputWindow($"Getting project information - done (took {DateTimeOffset.UtcNow - start})");

             OutputToOutputWindow($"Creating projects - start");
+            var targetPathsToProjectPaths = BuildTargetPathMap(projectInfos);
+            //var targetPathsToProjectPaths = projectInfos.ToImmutableDictionary(kvp => kvp.Value.TargetPath, kvp => kvp.Key);
             foreach (var projectFilename in projectInfos.Keys)
             {
                 CreateProjectFromArgumentsAndReferences(
                     workspaceProjectContextFactory,
                     projectFilename,
-                    projectInfos);
+                    projectInfos,
+                    targetPathsToProjectPaths);
             }
             OutputToOutputWindow($"Creating projects - done (took {DateTimeOffset.UtcNow - start})");

@@ -139,6 +143,27 @@
             OutputToOutputWindow($"Pushing to workspace - done (took {DateTimeOffset.UtcNow - start})");
         }

+        private static ImmutableDictionary<string, string> BuildTargetPathMap(IReadOnlyDictionary<string, DeferredProjectInformation> projectInfos)
+        {
+            var builder = ImmutableDictionary.CreateBuilder<string, string>();
+            foreach (var item in projectInfos)
+            {
+                var targetPath = item.Value.TargetPath;
+                if (targetPath != null)
+                {
+                    if (!builder.ContainsKey(targetPath))
+                    {
+                        builder[item.Value.TargetPath] = item.Key;
+                    }
+                    else
+                    {
+                        Debug.Fail($"Already have a target path of '{item.Value.TargetPath}', with value '{builder[item.Value.TargetPath]}'.");
+                    }
+                }
+            }
+            return builder.ToImmutable();
+        }
+
         private void OutputToOutputWindow(string message)
         {
             if (_pane != null)
@@ -150,7 +175,8 @@
         private IWorkspaceProjectContext CreateProjectFromArgumentsAndReferences(
             IWorkspaceProjectContextFactory workspaceProjectContextFactory,
             string projectFilename,
-            IReadOnlyDictionary<string, DeferredProjectInformation> allProjectInfos)
+            IReadOnlyDictionary<string, DeferredProjectInformation> allProjectInfos,
+            IReadOnlyDictionary<string, string> targetPathsToProjectPaths)
         {
             var languageName = GetLanguageOfProject(projectFilename);
             if (languageName == null)
@@ -182,7 +208,6 @@
                 return project as IWorkspaceProjectContext;
             }

-            // TODO: We need to actually get an output path somehow.
             OutputToOutputWindow($"\tCreating '{projectName}':\t{commandLineArguments.SourceFiles.Length} source files,\t{commandLineArguments.MetadataReferences.Length} references.");
             var solution5 = _serviceProvider.GetService(typeof(SVsSolution)) as IVsSolution5;
             var projectGuid = solution5.GetGuidOfProjectFile(projectFilename);
@@ -192,7 +217,7 @@
                 projectFilename,
                 projectGuid: projectGuid,
                 hierarchy: null,
-                binOutputPath: null);
+                binOutputPath: projectInfo.TargetPath);

             projectContext.SetOptions(projectInfo.CommandLineArguments.Join(" "));

@@ -206,11 +231,7 @@
                 projectContext.AddAdditionalFile(sourceFile.Path);
             }

-            foreach (var reference in commandLineArguments.MetadataReferences)
-            {
-                projectContext.AddMetadataReference(reference.Reference, reference.Properties);
-            }
-
+            var addedProjectReferences = new HashSet<string>();
             foreach (var projectReference in projectInfo.ProjectReferences)
             {
                 var projectReferencePath = projectReference.Substring("/ProjectReference:".Length);
@@ -220,12 +241,14 @@
                     referencedProject = (AbstractProject)CreateProjectFromArgumentsAndReferences(
                         workspaceProjectContextFactory,
                         projectReferencePath,
-                        allProjectInfos);
+                        allProjectInfos,
+                        targetPathsToProjectPaths);
                 }

                 var referencedProjectContext = referencedProject as IWorkspaceProjectContext;
                 if (referencedProjectContext != null)
                 {
+                    addedProjectReferences.Add(projectReferencePath);
                     projectContext.AddProjectReference(
                         referencedProjectContext,
                         new MetadataReferenceProperties());
@@ -248,6 +271,16 @@
                 }
             }

+            foreach (var reference in commandLineArguments.MetadataReferences)
+            {
+                string possibleProjectReference;
+                if (!targetPathsToProjectPaths.TryGetValue(reference.Reference, out possibleProjectReference) ||
+                    !addedProjectReferences.Contains(possibleProjectReference))
+                {
+                    projectContext.AddMetadataReference(reference.Reference, reference.Properties);
+                }
+            }
+
             foreach (var reference in commandLineArguments.AnalyzerReferences)
             {
                 projectContext.AddAnalyzerReference(reference.FilePath);


Updated to use confidence level

Updated to use confidence level

--- AngleSharp/Foundation/TextSource.cs
+++ AngleSharp/Foundation/TextSource.cs
@@ -22,6 +22,7 @@
         readonly Byte[] _buffer;
         readonly Char[] _chars;

+        EncodingConfidence _confidence;
         Boolean _finished;
         Encoding _encoding;
         Int32 _index;
@@ -48,6 +49,7 @@
         {
             _finished = true;
             _content.Append(source.Replace("\r\n", "\n"));
+            _confidence = EncodingConfidence.Certain;
         }

         /// <summary>
@@ -61,6 +63,7 @@
         {
             _baseStream = baseStream;
             _content = Pool.NewStringBuilder();
+            _confidence = EncodingConfidence.Tentative;
         }

         #endregion
@@ -93,18 +96,33 @@
             get { return _encoding; }
             set
             {
-                if (value != _encoding)
+                if (_confidence != EncodingConfidence.Tentative)
+                    return;
+
+                if (_encoding.IsUnicode())
                 {
-                    //Get previous interpretation of the rest
-                    var length = _content.Length - _index;
-                    var rest = _content.ToString(_index, length);
-                    //Get raw bytes from old encoding
-                    var raw = _encoding.GetBytes(rest);
-                    //Set new encoding
-                    _encoding = value;
-                    //Remove former rest and re-append with new encoding
-                    _content.Remove(_index, length).Append(_encoding.GetString(raw, 0, raw.Length));
+                    _confidence = EncodingConfidence.Certain;
+                    return;
                 }
+
+                if (value.IsUnicode())
+                    value = DocumentEncoding.UTF8;
+
+                if (value == _encoding)
+                {
+                    _confidence = EncodingConfidence.Certain;
+                    return;
+                }
+
+                //Get previous interpretation of the rest
+                var length = _content.Length - _index;
+                var rest = _content.ToString(_index, length);
+                //Get raw bytes from old encoding
+                var raw = _encoding.GetBytes(rest);
+                //Set new encoding
+                _encoding = value;
+                //Remove former rest and re-append with new encoding
+                _content.Remove(_index, length).Append(_encoding.GetString(raw, 0, raw.Length));
             }
         }

@@ -327,5 +345,16 @@
         }

         #endregion
+
+        #region Confidence
+
+        enum EncodingConfidence
+        {
+            Tentative,
+            Certain,
+            Irrelevant
+        }
+
+        #endregion
     }
 }


Clear out tests in discounted groups

Clear out tests in discounted groups

--- Anlab.Mvc/Services/IOrderService.cs
+++ Anlab.Mvc/Services/IOrderService.cs
@@ -145,7 +145,18 @@
             order.ClientName = order.ClientName;
             order.JsonDetails = orderToCopy.JsonDetails;
             var orderDetails = order.GetOrderDetails();
-            var tests = CalculateTestDetails(order);
+            var tests = CalculateTestDetails(order).ToList();
+
+            var groupTestIds = tests.Where(a => a.Id.StartsWith("G-")).Select(a => a.Id).ToArray();
+
+            if (groupTestIds.Any())
+            {
+                var testsToRemove = await _labworksService.GetTestsForDiscountedGroups(groupTestIds);
+                if (testsToRemove.Any())
+                {
+                    tests.RemoveAll(a => testsToRemove.Contains(a.Id));
+                }
+            }

             orderDetails.SelectedTests = tests.ToArray();
             orderDetails.Total = orderDetails.SelectedTests.Sum(x => x.Total) + (orderDetails.Payment.IsInternalClient ? orderDetails.InternalProcessingFee : orderDetails.ExternalProcessingFee);


lined up collider instead of model

lined up collider instead of model

--- Assets/scripts/entity/PaddleBase.cs
+++ Assets/scripts/entity/PaddleBase.cs
@@ -56,6 +56,7 @@
         if (Physics.Raycast(transform.position + offset, Vector3.forward, out hit, 10, mask))
         {
             float paddleColliderHalfSize = 1f;
+            paddleColliderHalfSize = GetComponent<MeshCollider>().bounds.size.y/2; //collision precise
             paddleLimitZ = hit.point.z - paddleColliderHalfSize;
         }

@@ -81,9 +82,8 @@
         {

             //Stop momentum caused by switching controllers
-            Vector3 zero = new Vector3(0, 0, 0);
-            rigidBody.velocity = zero;
-            rigidBody.angularVelocity = zero;
+            rigidBody.velocity = Vector3.zero;
+            rigidBody.angularVelocity = Vector3.zero;

             // Invert for one side
             if (transform.position.x < 0) dir *= -1;
@@ -100,6 +100,7 @@
     {

         // Clamp Z if we're outside an arbitrary value
+        //  Assumed symettric table
         if(transform.position.z < -paddleLimitZ || transform.position.z > paddleLimitZ)
         {
             transform.position = new Vector3(


window style for custom stat overrides

window style for custom stat overrides

--- ARKBreedingStats/mods/CustomStatOverridesEditor.Designer.cs
+++ ARKBreedingStats/mods/CustomStatOverridesEditor.Designer.cs
@@ -329,6 +329,7 @@
             this.ClientSize = new System.Drawing.Size(1432, 730);
             this.Controls.Add(this.splitContainer1);
             this.Controls.Add(this.menuStrip1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
             this.MainMenuStrip = this.menuStrip1;
             this.Name = "CustomStatOverridesEditor";
             this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;


refs #96 Do not register the event handler

--- Application/MatchGenerator/ViewModel/MemberListViewModel.cs
+++ Application/MatchGenerator/ViewModel/MemberListViewModel.cs
@@ -47,7 +47,6 @@
 			set
 			{
 				SetProperty(ref MembersField, new ObservableCollection<IMemberListItemViewModel>(value));
-				MembersField.CollectionChanged += CollectionChanged;
 				OnPropertyChanged(nameof(SelectedMembers));
 			}
 		}


Changed log message upon scenario registration.

--- Debugging/ScenarioTester.cs
+++ Debugging/ScenarioTester.cs
@@ -61,9 +61,9 @@
                                     lst = new SortedList<string, ScenarioConstructor>();
                                     scenarios.Add(aname, lst);
                                 }
-                                Utils.Log("Trying to add {}.{} to scenarios: {}", aname, type.Name, lst);//debug
                                 lst.Add(Utils.ParseCamelCase(type.Name).Replace("_", " "),
                                         () => cinfo.Invoke(null) as ITestScenario);
+                                Utils.Log("Added {}.{} to testing scenarios.", aname, type.Name);
                             }
                         }
                     }
@@ -76,7 +76,6 @@
                 }
             }
             else Destroy(gameObject);
-            Utils.Log("Scenarios: {}", scenarios);//debug
         }

         protected virtual void setup_test(ITestScenario test)


workingOnReply

workingOnReply

--- eFormSDK.Integration.Tests/SqlControllerTest.cs
+++ eFormSDK.Integration.Tests/SqlControllerTest.cs
@@ -5370,19 +5370,75 @@
         [Test]
         public void SQL_File_FileProcessed_isProcessed()
         {
+            uploaded_data ud = new uploaded_data();
+
+            //ud.checksum = "checksum1";
+            //ud.file_location = "file_location";
+            //ud.file_name = "fileName";
+            ud.local = 0;
+            ud.workflow_state = Constants.WorkflowStates.PreCreated;
+            ud.version = 1;
+
+            DbContext.uploaded_data.Add(ud);
+            DbContext.SaveChanges();
+
+
+            // Act
+            sut.FileProcessed("url", "myChecksum", "myFileLocation", "myFileName", ud.id);
+            List<uploaded_data> uploadedDataResult = DbContext.uploaded_data.AsNoTracking().ToList();
+            //var versionedMatches = DbContext.uploaded_data_versions.AsNoTracking().ToList(); TODO 05/01/2018
+
+            // Assert
+
+            Assert.NotNull(uploadedDataResult);
+            Assert.NotNull(ud);
+            Assert.AreEqual(Constants.WorkflowStates.Created, uploadedDataResult[0].workflow_state);
+            Assert.AreEqual(1, uploadedDataResult[0].local);
+            Assert.AreEqual(2, uploadedDataResult[0].version);
+            Assert.AreEqual("myChecksum", uploadedDataResult[0].checksum);
+            Assert.AreEqual("myFileLocation", uploadedDataResult[0].file_location);
+            Assert.AreEqual("myFileName", uploadedDataResult[0].file_name);
+            Assert.AreEqual(ud.id, uploadedDataResult[0].id);

         }

         [Test]
         public void SQL_File_GetUploadedData_doesGetUploadedData()
         {
+            uploaded_data ud = new uploaded_data();
+
+            DbContext.uploaded_data.Add(ud);
+            DbContext.SaveChanges();
+
+
+            sut.GetUploadedData(ud.id);
+            List<uploaded_data> uploadedDataResult = DbContext.uploaded_data.AsNoTracking().ToList();
+
+
+            Assert.NotNull(ud);
+            Assert.NotNull(uploadedDataResult);
+            Assert.AreEqual(ud.id, uploadedDataResult[0].id);

         }

         [Test]
         public void SQL_File_DeleteFile_doesFileGetDeleted()
         {
-
+            uploaded_data ud = new uploaded_data();
+
+            ud.workflow_state = Constants.WorkflowStates.Created;
+            ud.version = 1;
+
+            //Act
+            sut.DeleteFile(ud.id);
+            List<uploaded_data> uploadedDataResult = DbContext.uploaded_data.AsNoTracking().ToList();
+
+            //Assert
+            Assert.NotNull(ud);
+            Assert.NotNull(uploadedDataResult);
+            Assert.AreEqual(Constants.WorkflowStates.Removed, uploadedDataResult[0].workflow_state);
+            Assert.AreEqual(2, uploadedDataResult[0].version);
+            Assert.AreEqual(ud.id, uploadedDataResult[0].id);
         }


Fixed stack overflow in 3d bounding box intersection code

--- Assets/BriLib/Scripts/Octree/ThreeDimensionalBoundingBox.cs
+++ Assets/BriLib/Scripts/Octree/ThreeDimensionalBoundingBox.cs
@@ -41,8 +41,21 @@
             var bottomRightBack = Intersects(highX, lowY, highZ);
             var bottomRightFront = Intersects(highX, lowY, lowZ);

-            return topLeftBack || topLeftFront || bottomLeftBack || bottomLeftFront
-                || topRightBack || topRightFront || bottomRightBack || bottomRightFront || otherBox.Intersects(this);
+            var myLeft = X - Radius;
+            var myRight = X + Radius;
+            var myBottom = Y - Radius;
+            var myTop = Y + Radius;
+            var myFront = Z - Radius;
+            var myBack = Z + Radius;
+
+            var xIsInside = (myLeft >= lowX && myRight <= highX);
+            var yIsInside = (myBottom >= lowY && myTop <= highY);
+            var zIsInside = (myFront >= lowZ && myBack <= highZ);
+            var isInside = xIsInside && yIsInside && zIsInside;
+
+            return topLeftBack || topLeftFront || bottomLeftBack || bottomLeftFront
+                || topRightBack || topRightFront || bottomRightBack || bottomRightFront
+                || isInside;
         }

         public float BoundsDistance(float x, float y, float z)


Code support for Work item Id#615 Improve Database class

--- trunk/Solutions/CslaGenFork/CodeGen/AdvancedGenerator.cs
+++ trunk/Solutions/CslaGenFork/CodeGen/AdvancedGenerator.cs
@@ -215,6 +215,14 @@

             if (_generateDatabaseClass)
             {
+                var tempDbFilename = GetFolderPath(unit, GenerationStep.Business);
+                tempDbFilename += "Database";
+                if (objInfo.OutputLanguage == CodeLanguage.CSharp)
+                    tempDbFilename += ".cs";
+                else if (objInfo.OutputLanguage == CodeLanguage.VB)
+                    tempDbFilename += ".vb";
+                if(File.Exists(tempDbFilename))
+                    File.Delete(tempDbFilename);
                 GenerateUtilityFile("Database", objInfo, unit, GenerationStep.Business);
             }
             else


Fixed usage TraceInfo in context

Fixed usage TraceInfo in context

--- src/ZipkinTracer/Http/ZipkinMessageHandler.cs
+++ src/ZipkinTracer/Http/ZipkinMessageHandler.cs
@@ -37,6 +37,8 @@
 				request.Headers.Add(TraceInfo.ParentSpanIdHeaderName, traceInfo.ParentSpanId);
 				request.Headers.Add(TraceInfo.SampledHeaderName, traceInfo.IsSampled.ToString());

+				request.Properties[TraceInfo.TraceInfoKey] = traceInfo;
+
 				var response = await base.SendAsync(request, cancellationToken);

 				// end record span