last renaming from IMultipleBarcodeReader to IBarcodeReader

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS05/]$/ZXingNet/trunk;C90248

--- Source/lib/IBarcodeReader.Multiple.WriteableBitmap.cs
+++ Source/lib/IBarcodeReader.Multiple.WriteableBitmap.cs
@@ -25,14 +25,14 @@
    /// <summary>
    /// Interface for a smart class to decode multiple barcodes inside a bitmap object
    /// </summary>
-   [System.CLSCompliant(false)]
-   public partial interface IMultipleBarcodeReader
+   public partial interface IBarcodeReader
    {
       /// <summary>
       /// Decodes the specified barcode bitmap.
       /// </summary>
       /// <param name="barcodeBitmap">The barcode bitmap.</param>
       /// <returns>the result data or null</returns>
+      [System.CLSCompliant(false)]
       Result[] DecodeMultiple(WriteableBitmap barcodeBitmap);
    }
 }


Fix that SettingsCodeFixProvider is considered a 'normal' codefix

--- StyleCop.Analyzers.Status.Generator/SolutionReader.cs
+++ StyleCop.Analyzers.Status.Generator/SolutionReader.cs
@@ -86,6 +86,7 @@
                 .Select(t => Activator.CreateInstance(t, true))
                 .OfType<CodeFixProvider>()
                 .Where(x => x != null)
+                .Where(x => x.GetType().Name != "SettingsFileCodeFixProvider")
                 .ToArray());
         }


Fix background color for SystemConsoleHostTheme

--- source/Nuke.Common/Execution/Theming/SystemConsoleHostTheme.cs
+++ source/Nuke.Common/Execution/Theming/SystemConsoleHostTheme.cs
@@ -115,7 +115,7 @@
                 () =>
                 {
                     Console.ForegroundColor = style.Foreground ?? previousForeground;
-                    Console.ForegroundColor = style.Background ?? previousBackground;
+                    Console.BackgroundColor = style.Background ?? previousBackground;
                 },
                 () =>
                 {


Fixed some comments in the navigation service.

--- System.Windows.Mvvm.Services.Navigation/IViewModel.cs
+++ System.Windows.Mvvm.Services.Navigation/IViewModel.cs
@@ -25,26 +25,26 @@
         #region Methods

         /// <summary>
-        /// Is called when the view model is created (before the user is navigated to the view and before the OnNavigateTo even is called). After the view model was created, it is cached and reused until it is destroyed, therefore OnActivate
+        /// Is called when the view model is created (before the user is navigated to the view and before the OnNavigateToAsync event is called). After the view model was created, it is cached and reused until it is destroyed, therefore OnActivateAsync
         /// is only called once in the life cycle of a view model.
         /// </summary>
         Task OnActivateAsync();

         /// <summary>
-        /// Is called before the view model is navigated to. Other than OnActivate, OnNavigateTo is called everytime the user navigates to this view model.
+        /// Is called before the view model is navigated to. Other than OnActivateAsync, OnNavigateToAsync is called everytime the user navigates to this view model.
         /// </summary>
         /// <param name="e">The event arguments, that allows the navigation to be cancelled.</param>
         Task OnNavigateToAsync(NavigationEventArgs e);

         /// <summary>
-        /// Is called before the view model is navigated away from. Other than OnDeactivate, OnNavigateFrom is called everytime the user navigates away from this view model.
+        /// Is called before the view model is navigated away from. Other than OnDeactivateAsync, OnNavigateFromAsync is called everytime the user navigates away from this view model.
         /// </summary>
         /// <param name="e">The event arguments, that allows the navigation to be cancelled.</param>
         Task OnNavigateFromAsync(NavigationEventArgs e);

         /// <summary>
         /// Is called when the view model gets deactivated. The view model only gets deactivated when the navigation stack of the window, that contains the view of this view model, is cleared, or when the windows, containing the view of
-        /// this view model, is closed. Therefore OnDeactivate is only called once in the life cycle of a view model.
+        /// this view model, is closed. Therefore OnDeactivateAsync is only called once in the lifecycle of a view model.
         /// </summary>
         Task OnDeactivateAsync();


Update ConcurrentPriorityQueueTests.cs

Update ConcurrentPriorityQueueTests.cs

--- Tests/FunctionalTests/ConcurrentPriorityQueueTests.cs
+++ Tests/FunctionalTests/ConcurrentPriorityQueueTests.cs
@@ -14,5 +14,24 @@
             }
             return new ConcurrentPriorityQueue<int>();
         }
+        [TestMethod]
+        public void ToArray()
+        {
+            ConcurrentPriorityQueue<int> target = new ConcurrentPriorityQueue<int>();
+
+            const int count = 10;
+            for (int i = 0; i < count; i++)
+            {
+                target.Add(i);
+            }
+
+            var result = target.ToArray();
+
+            // Priority queue is max-based so greater items comes first
+            for (int i = 0; i < count; i++)
+            {
+                Assert.AreEqual(count - i - 1, result[i]);
+            }
+        }
     }
 }


357 BasicProjectTests failures
 Partial fix, ProjectConfiguration - this is crashing VS, we need to get onto the UI thread to interact w/ the hierarchy

Speculatively checking this in w/o code review to get latest test numbers as this failure blocks a lot of tests

--- Common/Product/SharedProject/Automation/OAProject.cs
+++ Common/Product/SharedProject/Automation/OAProject.cs
@@ -226,20 +226,22 @@
         /// </summary>
         public virtual EnvDTE.ConfigurationManager ConfigurationManager {
             get {
-                if (this.configurationManager == null) {
-                    IVsExtensibility3 extensibility = this.project.Site.GetService(typeof(IVsExtensibility)) as IVsExtensibility3;
-
-                    Utilities.CheckNotNull(extensibility);
-
-                    object configurationManagerAsObject;
-                    ErrorHandler.ThrowOnFailure(extensibility.GetConfigMgr(this.project, VSConstants.VSITEMID_ROOT, out configurationManagerAsObject));
-
-                    Utilities.CheckNotNull(configurationManagerAsObject);
-
-                    this.configurationManager = (ConfigurationManager)configurationManagerAsObject;
-                }
-
-                return this.configurationManager;
+                return UIThread.Instance.RunSync(() => {
+                    if (this.configurationManager == null) {
+                        IVsExtensibility3 extensibility = this.project.Site.GetService(typeof(IVsExtensibility)) as IVsExtensibility3;
+
+                        Utilities.CheckNotNull(extensibility);
+
+                        object configurationManagerAsObject;
+                        ErrorHandler.ThrowOnFailure(extensibility.GetConfigMgr(this.project, VSConstants.VSITEMID_ROOT, out configurationManagerAsObject));
+
+                        Utilities.CheckNotNull(configurationManagerAsObject);
+
+                        this.configurationManager = (ConfigurationManager)configurationManagerAsObject;
+                    }
+
+                    return this.configurationManager;
+                });
             }
         }


Remove setting AdminLogPlayer.RoundId explicitly

--- Content.Server/Administration/Logs/AdminLogSystem.cs
+++ Content.Server/Administration/Logs/AdminLogSystem.cs
@@ -250,8 +250,7 @@
         {
             var player = new AdminLogPlayer
             {
-                PlayerUserId = id,
-                RoundId = CurrentRoundId
+                PlayerUserId = id
             };

             log.Players.Add(player);


- svn trouble resolved now

- svn trouble resolved now

Imported from NetOffice r73591
https://netoffice.codeplex.com/SourceControl/changeset/73591

--- Net2.0/Examples/PowerPoint/C#/Example06/Form1.Designer.cs
+++ Net2.0/Examples/PowerPoint/C#/Example06/Form1.Designer.cs
@@ -87,7 +87,6 @@
             this.Controls.Add(this.button1);
             this.Name = "Form1";
             this.Text = "Example06 - Using events";
-            this.Load += new System.EventHandler(this.Form1_Load);
             this.ResumeLayout(false);
             this.PerformLayout();


WIP: https://github.com/valdisiljuconoks/LocalizationProvider/issues/203 * some npgsql optimization

--- src/DbLocalizationProvider.Storage.PostgreSQL/SchemaUpdater.cs
+++ src/DbLocalizationProvider.Storage.PostgreSQL/SchemaUpdater.cs
@@ -35,13 +35,16 @@
                 };

                 var reader = cmd.ExecuteReader();
-                var doesNotExistsTables = !reader.HasRows;
+                var existsTables = reader.HasRows;
                 reader.Close();

-                if (doesNotExistsTables)
+                if (existsTables)
                 {
-                    // there is no tables, let's create
-                    cmd.CommandText = @"CREATE TABLE public.""LocalizationResources""
+                    return;
+                }
+
+                // there is no tables, let's create
+                cmd.CommandText = @"CREATE TABLE public.""LocalizationResources""
                         (
                             ""Id"" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
                             ""Author""  character varying(100) COLLATE pg_catalog.""default"" NOT NULL,
@@ -53,9 +56,9 @@
                             ""Notes"" character varying(3000) NULL,
                             CONSTRAINT ""PK_LocalizationResources"" PRIMARY KEY (""Id""))
                         ";
-                    cmd.ExecuteNonQuery();
+                cmd.ExecuteNonQuery();

-                    cmd.CommandText = @"CREATE TABLE public.""LocalizationResourceTranslations""
+                cmd.CommandText = @"CREATE TABLE public.""LocalizationResourceTranslations""
                         (
                             ""Id"" bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
                             ""Language"" character varying(10) NOT NULL,
@@ -63,24 +66,23 @@
                             ""Value"" character varying NULL,
                             ""ModificationDate"" timestamp without time zone NOT NULL,
                         CONSTRAINT ""PK_LocalizationResourceTranslations"" PRIMARY KEY (""Id""))";
-                    cmd.ExecuteNonQuery();
+                cmd.ExecuteNonQuery();

-                    cmd.CommandText = @"ALTER TABLE public.""LocalizationResourceTranslations""
+                cmd.CommandText = @"ALTER TABLE public.""LocalizationResourceTranslations""
                             ADD CONSTRAINT ""FK_LocalizationResourceTranslations_LocalizationResources_ResourceId"" FOREIGN KEY (""ResourceId"")
                             REFERENCES public.""LocalizationResources"" (""Id"") MATCH SIMPLE
                             ON UPDATE NO ACTION
                             ON DELETE CASCADE
                             NOT VALID";
-                    cmd.ExecuteNonQuery();
+                cmd.ExecuteNonQuery();

-                    cmd.CommandText =
-                        @"CREATE INDEX ""ix_FK_LocalizationResourceTranslations_LocalizationResources_ResourceId"" ON public.""LocalizationResourceTranslations""(""ResourceId"")";
-                    cmd.ExecuteNonQuery();
+                cmd.CommandText =
+                    @"CREATE INDEX ""ix_FK_LocalizationResourceTranslations_LocalizationResources_ResourceId"" ON public.""LocalizationResourceTranslations""(""ResourceId"")";
+                cmd.ExecuteNonQuery();

-                    cmd.CommandText =
-                        @"CREATE UNIQUE INDEX ""ix_UniqueTranslationForLanguage"" ON public.""LocalizationResourceTranslations"" USING btree (""Language"" ASC NULLS LAST, ""ResourceId"" ASC NULLS LAST)";
-                    cmd.ExecuteNonQuery();
-                }
+                cmd.CommandText =
+                    @"CREATE UNIQUE INDEX ""ix_UniqueTranslationForLanguage"" ON public.""LocalizationResourceTranslations"" USING btree (""Language"" ASC NULLS LAST, ""ResourceId"" ASC NULLS LAST)";
+                cmd.ExecuteNonQuery();
             }
         }
     }


Added more informative exception message when a remote call failed due to Transport issues in the Tcp project.

--- NetworkedService/NetworkedService.Transport.Tcp/Client.cs
+++ NetworkedService/NetworkedService.Transport.Tcp/Client.cs
@@ -29,13 +29,19 @@

         public RemoteResult CallMethod(RemoteCommand remoteCommand)
         {
-            var client = TryConnect(_address);
+            try
+            {
+                var client = TryConnect(_address);

-            var msg = _commandSerializer.SerializeCommand(remoteCommand);
+                var msg = _commandSerializer.SerializeCommand(remoteCommand);

-            client.WriteFullPacket(msg);
-            var reply = client.ReadFullPacket();
-            return _commandSerializer.DeserializeResult(reply);
+                client.WriteFullPacket(msg);
+                var reply = client.ReadFullPacket();
+                return _commandSerializer.DeserializeResult(reply);
+            } catch(SocketException se)
+            {
+                throw new InvalidOperationException(string.Format("Failed to call remote method on {0}:{1}", _address.Address.ToString(), _address.Port), se);
+            }
         }

         public static Func<IServiceProvider, Client> Factory(string hostname, int port)


Remove unused logger

Remove unused logger

--- src/GitHub.TeamFoundation.14/Base/TeamExplorerServiceHolder.cs
+++ src/GitHub.TeamFoundation.14/Base/TeamExplorerServiceHolder.cs
@@ -1,9 +1,7 @@
 using System;
 using System.ComponentModel.Composition;
 using GitHub.Extensions;
-using GitHub.Logging;
 using GitHub.Services;
-using Serilog;
 using Microsoft.TeamFoundation.Controls;
 using Microsoft.VisualStudio.Shell;
 using Microsoft.VisualStudio.Threading;
@@ -14,8 +12,6 @@
     [PartCreationPolicy(CreationPolicy.Shared)]
     public class TeamExplorerServiceHolder : ITeamExplorerServiceHolder
     {
-        static readonly ILogger log = LogManager.ForContext<TeamExplorerServiceHolder>();
-
         IServiceProvider serviceProvider;

         /// <summary>


Fixed StyleCop violation

Fixed StyleCop violation

--- OpenIIoT.Core.Tests/Configuration/ConfigurationManager.cs
+++ OpenIIoT.Core.Tests/Configuration/ConfigurationManager.cs
@@ -48,12 +48,12 @@
                                                                                ▀████▀
                                                                                ▀▀                            */

+using System;
 using Moq;
 using OpenIIoT.SDK;
 using OpenIIoT.SDK.Common;
 using OpenIIoT.SDK.Common.Exceptions;
 using OpenIIoT.SDK.Platform;
-using System;
 using Utility.OperationResult;
 using Xunit;


HT-441: Added code to detect error when computing string differences so we can try to get needed info to debug.

--- src/HearThis/Utils/StringDifferences/StringDifferenceFinder.cs
+++ src/HearThis/Utils/StringDifferences/StringDifferenceFinder.cs
@@ -13,6 +13,7 @@
 using System.Linq;
 using System.Text;
 using SIL.Extensions;
+using SIL.Reporting;
 using static Icu.Character;
 using static System.Char;

@@ -65,23 +66,35 @@
 				throw new ArgumentException("String must not be null or empty", nameof(origStr));
 			if (string.IsNullOrEmpty(newStr))
 				throw new ArgumentException("String must not be null or empty", nameof(newStr));
-			foreach (var segment in ComputeDifferences(origStr, newStr))
-			{
-				switch (segment.Type)
-				{
-					case DifferenceType.Same:
-						OriginalStringDifferences.Add(segment);
-						NewStringDifferences.Add(segment);
-						break;
-					case DifferenceType.Addition:
-						NewStringDifferences.Add(segment);
-						break;
-					case DifferenceType.Deletion:
-						OriginalStringDifferences.Add(segment);
-						break;
-					default:
-						throw new ArgumentOutOfRangeException();
-				}
+			try
+			{
+				foreach (var segment in ComputeDifferences(origStr, newStr))
+				{
+					switch (segment.Type)
+					{
+						case DifferenceType.Same:
+							OriginalStringDifferences.Add(segment);
+							NewStringDifferences.Add(segment);
+							break;
+						case DifferenceType.Addition:
+							NewStringDifferences.Add(segment);
+							break;
+						case DifferenceType.Deletion:
+							OriginalStringDifferences.Add(segment);
+							break;
+						default:
+							throw new ArgumentOutOfRangeException();
+					}
+				}
+			}
+			catch (Exception e)
+			{
+				Logger.WriteError(e);
+				ErrorReport.NotifyUserOfProblem(e, $"A problem occurred trying to compute differences between {origStr} and {newStr} (HT-441). Please report this.");
+				OriginalStringDifferences.Clear();
+				OriginalStringDifferences.Add(new StringDifferenceSegment(DifferenceType.Deletion, origStr));
+				NewStringDifferences.Clear();
+				OriginalStringDifferences.Add(new StringDifferenceSegment(DifferenceType.Addition, newStr));
 			}
 		}

@@ -359,8 +372,8 @@

 			if (common.Length > 1)
 			{
-				var iOrig = origStr.IndexOf(common);
-				var iNew = newStr.IndexOf(common);
+				var iOrig = origStr.IndexOf(common, StringComparison.Ordinal);
+				var iNew = newStr.IndexOf(common, StringComparison.Ordinal);
 				if (iNew < iOrig)
 					ExpandCommonSubstringIfNeeded(ref iNew, ref iOrig, ref common, newStr, origStr);
 				else


fix issue with GetMediaEntry if the face requested wasn't set to a media texture

--- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -112,7 +112,8 @@
             else
             {
                 // TODO: Really need a proper copy constructor down in libopenmetaverse
-                return MediaEntry.FromOSD(media[face].GetOSD());
+                MediaEntry me = media[face];
+                return (null == me ? null : MediaEntry.FromOSD(me.GetOSD()));
             }
         }


DataTransfer: EntryTunnel updated - call disconnect on error

--- CustomBlocks/DataTransfer/EntryTunnel/EntryTunnel.cs
+++ CustomBlocks/DataTransfer/EntryTunnel/EntryTunnel.cs
@@ -96,30 +96,6 @@
 			});
 		}

-		private void SwitchToOffline(Exception ex)
-		{
-			try
-			{
-				evCtl.Raise(this, new TunnelStateEventArgs(TunnelState.Offline, ex), () =>
-				{
-					if (state == TunnelState.Offline)
-						throw new OfflineSwitchException();
-					state = TunnelState.Offline;
-				});
-			}
-			catch (OfflineSwitchException) { }
-		}
-
-		private void SwitchToOfflineTask(Exception ex)
-		{
-			Interlocked.Increment(ref stateChangeWorkers);
-			Task.Run(()=>
-			{
-				SwitchToOffline(ex);
-				Interlocked.Decrement(ref stateChangeWorkers);
-			});
-		}
-
 		public ISafeEvent<TunnelStateEventArgs> StateChangeEvent { get { return ev; } }

 		public int ReadData(int sz, byte[] buffer, int offset = 0)
@@ -133,7 +109,7 @@
 			{
 				if (state != TunnelState.Online)
 					throw new TunnelEofException(ex);
-				SwitchToOfflineTask(ex);
+				CommitDisconnect(ex, false);
 				throw;
 			}
 			finally
@@ -157,7 +133,7 @@
 			}
 			catch (Exception ex)
 			{
-				SwitchToOfflineTask(ex);
+				CommitDisconnect(ex, false);
 				throw;
 			}
 			finally
@@ -177,7 +153,7 @@
 			{
 				if (state != TunnelState.Online)
 					throw new TunnelEofException(ex);
-				SwitchToOfflineTask(ex);
+				CommitDisconnect(ex, false);
 				throw;
 			}
 			finally
@@ -201,7 +177,7 @@
 			}
 			catch (Exception ex)
 			{
-				SwitchToOfflineTask(ex);
+				CommitDisconnect(ex, false);
 				throw;
 			}
 			finally
@@ -210,7 +186,7 @@
 			}
 		}

-		private void CommitDisconnect()
+		private void CommitDisconnect(Exception iEx, bool releaseLocks)
 		{
 			Interlocked.Increment(ref stateChangeWorkers);
 			Task.Run(() =>
@@ -223,17 +199,20 @@
 						{
 							if (state == TunnelState.Offline)
 								throw new OfflineSwitchException();
-							Exception tEx = null;
 							try { downstream.Disconnect(); }
-							catch (Exception ex) { tEx = ex; }
+							catch (Exception ex) { if (iEx == null) iEx = ex; }
 							state = TunnelState.Offline;
-							return new TunnelStateEventArgs(TunnelState.Offline, tEx);
+							return new TunnelStateEventArgs(TunnelState.Offline, iEx);
 						}
 						finally
 						{
-							// we need this to allow user's event handlers to call read\write methods
-							readLock.Release();
-							writeLock.Release();
+							if (releaseLocks)
+							{
+								// we need this to allow user's event handlers to call read\write methods
+								// if we blocked it before raising event
+								readLock.Release();
+								writeLock.Release();
+							}
 						}
 					});
 				}
@@ -246,14 +225,14 @@
 		{
 			writeLock.Wait();
 			readLock.Wait();
-			CommitDisconnect();
+			CommitDisconnect(null, true);
 		}

 		public async Task DisconnectAsync()
 		{
 			await writeLock.WaitAsync();
 			await readLock.WaitAsync();
-			CommitDisconnect();
+			CommitDisconnect(null, true);
 		}

 		public void Dispose()


update

update

--- Demos/GridViewer/ModernRendering/Models/WellModel.cs
+++ Demos/GridViewer/ModernRendering/Models/WellModel.cs
@@ -55,11 +55,12 @@
             {
                 if (positionBufferPtr != null) { return positionBufferPtr; }

-                using (var buffer = new VertexAttributeBuffer<vec3>(varNameInShader, VertexAttributeConfig.Vec3, BufferUsage.StaticDraw))
+                int length = (faceCount * 2 + 2) * (pipeline.Count - 1);
+                VertexAttributeBufferPtr bufferPtr = VertexAttributeBufferPtr.Create(typeof(vec3), length, VertexAttributeConfig.Vec3, BufferUsage.StaticDraw, varNameInShader);
+                unsafe
                 {
-                    int vertexCount = (faceCount * 2 + 2) * (pipeline.Count - 1);
-                    buffer.Alloc(vertexCount);
-                    var array = (vec3*)buffer.Header.ToPointer();
+                    IntPtr pointer = bufferPtr.MapBuffer(MapBufferAccess.WriteOnly);
+                    var array = (vec3*)pointer.ToPointer();
                     int index = 0;
                     var max = new vec3(float.MinValue, float.MinValue, float.MinValue);
                     var min = new vec3(float.MaxValue, float.MaxValue, float.MaxValue);
@@ -84,12 +85,11 @@
                             array[index++] = tmp2;
                         }
                     }
+                    bufferPtr.UnmapBuffer();
                     this.ModelSize = max - min;
-
-                    positionBufferPtr = buffer.GetBufferPtr();
+                    this.positionBufferPtr = bufferPtr;
                 }
-
-                return positionBufferPtr;
+                return this.positionBufferPtr;
             }
             else if (bufferName == strBrightness)
             {


Fixes error introduced in #1477 (#1478)

Fixes error introduced in #1477 (#1478)

--- src/Microsoft.VisualStudio.Services.Agent/VstsAgentWebProxy.cs
+++ src/Microsoft.VisualStudio.Services.Agent/VstsAgentWebProxy.cs
@@ -120,7 +120,7 @@
             }

             string proxyBypassFile = IOUtil.GetProxyBypassFilePath();
-            if (proxyBypassFile.Exists(proxyBypassFile))
+            if (File.Exists(proxyBypassFile))
             {
                 Trace.Info($"Delete .proxybypass file: {proxyBypassFile}");
                 IOUtil.DeleteFile(proxyBypassFile);


Fix stream dump sometimes is not out.

Fix stream dump sometimes is not out.

--- src/MsgPack.Rpc.Server/Rpc/Server/Protocols/ServerTransport.cs
+++ src/MsgPack.Rpc.Server/Rpc/Server/Protocols/ServerTransport.cs
@@ -513,12 +513,6 @@
 			Contract.Assert( context != null );
 			Contract.Assert( invalidRequestHeaderProvider != null );

-			if ( invalidRequestHeaderProvider != null && MsgPackRpcServerProtocolsTrace.ShouldTrace( MsgPackRpcServerProtocolsTrace.DumpInvalidRequestHeader ) )
-			{
-				var array = invalidRequestHeaderProvider();
-				MsgPackRpcServerProtocolsTrace.TraceData( MsgPackRpcServerProtocolsTrace.DumpInvalidRequestHeader, BitConverter.ToString( array ), array );
-			}
-
 			this.HandleDeserializationError( context, RpcError.MessageRefusedError, "Invalid stream.", message, invalidRequestHeaderProvider );
 		}

@@ -565,6 +559,12 @@
 				messageId == null ? "(null)" : messageId.ToString(),
 				rpcError
 			);
+
+			if ( invalidRequestHeaderProvider != null && MsgPackRpcServerProtocolsTrace.ShouldTrace( MsgPackRpcServerProtocolsTrace.DumpInvalidRequestHeader ) )
+			{
+				var array = invalidRequestHeaderProvider();
+				MsgPackRpcServerProtocolsTrace.TraceData( MsgPackRpcServerProtocolsTrace.DumpInvalidRequestHeader, BitConverter.ToString( array ), array );
+			}

 			// Try send error response.
 			this.SendError( context.SessionId, messageId, rpcError );


Update UserController to use FacebookGraphService

--- src/Nether.Web/Features/Identity/Controllers/UserController.cs
+++ src/Nether.Web/Features/Identity/Controllers/UserController.cs
@@ -23,15 +23,16 @@
     public class UserController : ControllerBase
     {
         private readonly IUserStore _userStore;
-        private ILogger<UserController> _logger;
+        private readonly FacebookGraphService _facebookGraphService;
+        private readonly ILogger _logger;

         public UserController(IUserStore userStore,
-            IConfiguration configuration,
+            FacebookGraphService facebookGraphService,
             ILogger<UserController> logger)
         {
             _userStore = userStore;
+            _facebookGraphService = facebookGraphService;
             _logger = logger;
-            _configuration = configuration;
         }

         /// <summary>
@@ -113,18 +114,18 @@
                 return this.ValidationFailed(new ErrorDetail("facebookToken", "Missing Facebook token."));
             }

-            // we need to verify the token first
+           // we need to verify the token first
             // since only Facebook is supported, we default to it, but in the future, this will likely move
             // to a provider-based pattern
-            var providerId = await GetFacebookUserIdFromTokenAsync(userLoginModel.FacebookToken);
-
-            if (string.IsNullOrEmpty(providerId))
+            var result = await _facebookGraphService.TokenDebugAsync(userLoginModel.FacebookToken);
+            if (!result.IsValid || string.IsNullOrEmpty(result.UserId))
             {
+                _logger.LogTrace("Facebook token validation failed: {0}", result.Error.Message);
                 return this.ValidationFailed(new ErrorDetail("facebookToken", "Facebook token is either invalid or could not be validated."));
             }

-            user.Logins = user.Logins ?? new List<Login>();
-            var login = user.Logins?.FirstOrDefault(l => l.ProviderType == providerType && l.ProviderId == providerId);
+            var providerId = result.UserId;
+            var login = user.Logins.FirstOrDefault(l => l.ProviderType == providerType && l.ProviderId == providerId);
             if (login == null)
             {
                 login = new Login
@@ -136,8 +137,7 @@
             }
             else
             {
-                // TODO: should we return a validation error here?
-                return NoContent();
+                login.ProviderId = providerId;
             }

             await _userStore.SaveUserAsync(user);
@@ -145,57 +145,5 @@
             //return CreatedAtRoute(nameof(DeleteUserLogin), new { providerType, providerId }, null);
             return CreatedAtRoute(nameof(PostUserLogin), login);
         }
-
-        private IConfiguration _configuration;
-
-        private async Task<string> GetFacebookUserIdFromTokenAsync(string token)
-        {
-            // Call facebook graph api to validate the token
-
-            // As per https://developers.facebook.com/docs/facebook-login/access-tokens/#apptokens, we're using "appid|appsecret" for the app token
-            var appId = _configuration["Identity:SignInMethods:Facebook:AppId"];
-            var appSecret = _configuration["Identity:SignInMethods:Facebook:AppSecret"];
-            var appToken = appId + "|" + appSecret;
-
-
-            var client = CreateHttpClient();
-            var response = await client.GetAsync($"/debug_token?input_token={token}&access_token={appToken}");
-
-            dynamic body = await response.Content.ReadAsAsync<dynamic>();
-
-            if (body.data == null)
-            {
-                // Get here if (for example) the token is for a different application
-                var message = (string)body.error.message;
-                _logger.LogError("FacebookSignIn: error validating token: {0}", message);
-                return null;
-            }
-
-            bool isValid = (bool)body.data.is_valid;
-            var userId = (string)body.data.user_id;
-            if (!isValid)
-            {
-                var message = (string)body.data.error.message;
-                _logger.LogError("FacebookSignIn: invalid token: {0}", message);
-                return null;
-            }
-
-            return userId;
-        }
-
-        private static HttpClient CreateHttpClient()
-        {
-            return new HttpClient()
-            {
-                BaseAddress = new Uri("https://graph.facebook.com/"),
-                DefaultRequestHeaders =
-                {
-                    Accept =
-                    {
-                        new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")
-                    }
-                }
-            };
-        }
     }
 }


Registering types as themselves.

Registering types as themselves.

This enables scenarios where you want to instantiate a particular type without having to manually resolve all of its dependencies.

--- src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs
+++ src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs
@@ -69,7 +69,7 @@
                         foreach (var interfaceType in item.Type.GetInterfaces()
                             .Where(itf => typeof(IDependency).IsAssignableFrom(itf)
                                       && !typeof(IEventHandler).IsAssignableFrom(itf))) {
-                            registration = registration.As(interfaceType);
+                            registration = registration.As(interfaceType).AsSelf();
                             if (typeof(ISingletonDependency).IsAssignableFrom(interfaceType)) {
                                 registration = registration.InstancePerMatchingLifetimeScope("shell");
                             }


(#0): Set current LogFactory in Extendable Service Extension

--- src/RawRabbit.Extensions/Client/IServiceCollectionExtension.cs
+++ src/RawRabbit.Extensions/Client/IServiceCollectionExtension.cs
@@ -10,6 +10,7 @@
 using RawRabbit.Extensions.MessageSequence.Repository;
 using RawRabbit.Extensions.TopologyUpdater.Core;
 using RawRabbit.Extensions.TopologyUpdater.Core.Abstraction;
+using RawRabbit.Logging;

 namespace RawRabbit.Extensions.Client
 {
@@ -42,13 +43,21 @@
 			return vNext.IServiceCollectionExtensions
 				.AddRawRabbit(collection, config, custom)
 				.AddRawRabbitExtensions<TMessageContext>()
-				.AddSingleton<IBusClient>(c => new ExtendableBusClient(collection.BuildServiceProvider()));
+				.AddSingleton<IBusClient>(c =>
+				{
+					LogManager.CurrentFactory = c.GetService<ILoggerFactory>();
+					return new ExtendableBusClient(collection.BuildServiceProvider());
+				});
 		}

 		public static IServiceCollection AddRawRabbit(this IServiceCollection collection, Action<IConfigurationBuilder> config = null, Action<IServiceCollection> custom = null)
 		{
 			return AddRawRabbit<MessageContext>(collection, config, custom)
-				.AddSingleton<IBusClient>(provider => new ExtendableBusClient(collection.BuildServiceProvider()));
+				.AddSingleton<IBusClient>(provider =>
+				{
+					LogManager.CurrentFactory = provider.GetService<ILoggerFactory>();
+					return new ExtendableBusClient(collection.BuildServiceProvider());
+				});
 		}

 		public static IServiceCollection AddRawRabbit(this IServiceCollection collection, IConfigurationSection section, Action<IServiceCollection> custom = null)


master version

master version

--- src/SbManager/Models/ViewModelBuilders/QueueMessagesBuilder.cs
+++ src/SbManager/Models/ViewModelBuilders/QueueMessagesBuilder.cs
@@ -58,7 +58,7 @@
                 msg.ContentType = m.ContentType;
                 msg.IsBodyConsumed = m.IsBodyConsumed;
                 msg.DeliveryCount = m.DeliveryCount;
-                msg.CustomProperties = m.Properties.ToDictionary(kvp => kvp.Key, kvp => (kvp.Value ?? "").ToString());
+                msg.CustomProperties = m.Properties.ToDictionary(kvp => kvp.Key, kvp => kvp.Value == null ? null : kvp.Value.ToString());
                 msg.Body = m.GetBodyString();

                 resp.Messages.Add(msg);


185: just arrange code

185: just arrange code

--- src/SharpConnect.MySql/0_Public_TaskAsync/MySqlConnection_A.cs
+++ src/SharpConnect.MySql/0_Public_TaskAsync/MySqlConnection_A.cs
@@ -11,21 +11,16 @@
         public Task OpenAsync()
         {
             var tcs = new TaskCompletionSource<int>();
-            Open(() =>
-            {
-                tcs.SetResult(0);
-            });
+            Open(() => tcs.SetResult(0));
             return tcs.Task;
         }
         public Task CloseAsync()
         {
             var tcs = new TaskCompletionSource<int>();
-            Close(() =>
-            {
-                tcs.SetResult(0);
-            });
+            Close(() => tcs.SetResult(0));
             return tcs.Task;
         }
+

     }
 }


David/Nick/Mohammed #1195 - Removing swagger code from authentication middleware

--- src/StockportContentApi/Middleware/AuthenticationMiddleware.cs
+++ src/StockportContentApi/Middleware/AuthenticationMiddleware.cs
@@ -52,12 +52,6 @@
             var versionText = routeValues.Length > 2 ? routeValues[2] : string.Empty;
             var businessId = routeValues.Length > 3 ? routeValues[3] : string.Empty;
             var endpoint = routeValues.Length > 4 ? routeValues[4] : string.Empty;
-
-            if (routeValues[1].ToLower() == "swagger")
-            {
-                await _next.Invoke(context);
-                return;
-            }

             if (string.IsNullOrEmpty(authenticationKey))
             {


Make Queue.Enumerator.Current inlineable by the JIT

--- src/System.Collections/src/System/Collections/Generic/Queue.cs
+++ src/System.Collections/src/System/Collections/Generic/Queue.cs
@@ -62,7 +62,7 @@
                 throw new ArgumentNullException(nameof(collection));

             _array = EnumerableHelpers.ToArray(collection, out _size);
-            _tail = (_size == _array.Length) ? 0 : _size;
+            if (_size != _array.Length) _tail = _size;
         }

@@ -137,7 +137,7 @@
             int numToCopy = _size;
             if (numToCopy == 0) return;

-            int firstPart = (_array.Length - _head < numToCopy) ? _array.Length - _head : numToCopy;
+            int firstPart = Math.Min(_array.Length - _head, numToCopy);
             Array.Copy(_array, _head, array, arrayIndex, firstPart);
             numToCopy -= firstPart;
             if (numToCopy > 0)
@@ -368,15 +368,15 @@
         public struct Enumerator : IEnumerator<T>,
             System.Collections.IEnumerator
         {
-            private Queue<T> _q;
+            private readonly Queue<T> _q;
+            private readonly int _version;
             private int _index;   // -1 = not started, -2 = ended/disposed
-            private int _version;
             private T _currentElement;

             internal Enumerator(Queue<T> q)
             {
                 _q = q;
-                _version = _q._version;
+                _version = q._version;
                 _index = -1;
                 _currentElement = default(T);
             }
@@ -415,14 +415,15 @@
                 get
                 {
                     if (_index < 0)
-                    {
-                        if (_index == -1)
-                            throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
-                        else
-                            throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
-                    }
+                        ThrowEnumerationNotStartedOrEnded();
                     return _currentElement;
                 }
+            }
+
+            private void ThrowEnumerationNotStartedOrEnded()
+            {
+                Debug.Assert(_index == -1 || _index == -2);
+                throw new InvalidOperationException(_index == -1 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded);
             }

             Object System.Collections.IEnumerator.Current


Fix darkmode colors on scaleline

Fix darkmode colors on scaleline

--- src/Toolkit/Toolkit.iOS/UI/Controls/ScaleLine/ScaleLine.iOS.cs
+++ src/Toolkit/Toolkit.iOS/UI/Controls/ScaleLine/ScaleLine.iOS.cs
@@ -81,11 +81,11 @@
             var font = UIFont.SystemFontOfSize(11);
             _combinedScaleLine = new RectangleView(200, 2) { BackgroundColor = ForegroundColor };
             _metricScaleLine = new RectangleView(200, 2);
-            _metricValue = new UILabel() { Text = "100", Font = font };
-            _metricUnit = new UILabel() { Text = "m", Font = font };
+            _metricValue = new UILabel() { Text = "100", Font = font, TextColor = ForegroundColor };
+            _metricUnit = new UILabel() { Text = "m", Font = font, TextColor = ForegroundColor };
             _usScaleLine = new RectangleView(_metricScaleLine.Width * .9144, 2);
-            _usValue = new UILabel() { Text = "300", Font = font };
-            _usUnit = new UILabel() { Text = "ft", Font = font };
+            _usValue = new UILabel() { Text = "300", Font = font, TextColor = ForegroundColor };
+            _usUnit = new UILabel() { Text = "ft", Font = font, TextColor = ForegroundColor };

             // Listen for width updates on metric and imperial scale lines to update the combined scale line
             _metricScaleLine.PropertyChanged += ScaleLine_PropertyChanged;
@@ -223,7 +223,7 @@
             base.InvalidateIntrinsicContentSize();
         }

-        private UIColor _foregroundColor = UIColor.Black;
+        private UIColor _foregroundColor = UIColor.LabelColor;

         /// <summary>
         /// Gets or sets the color of the foreground elements of the <see cref="ScaleLine"/>


Indentation.

Indentation.

--- src/Workspaces/Core/Portable/PatternMatching/PatternMatcher.cs
+++ src/Workspaces/Core/Portable/PatternMatching/PatternMatcher.cs
@@ -455,11 +455,11 @@
         }

         private PatternMatchKind? TryUpperCaseCamelCaseMatch(
-                  string candidate,
-                  ArrayBuilder<TextSpan> candidateHumps,
-                  TextChunk patternChunk,
-                  CompareOptions compareOption,
-                  out ImmutableArray<TextSpan> matchedSpans)
+            string candidate,
+            ArrayBuilder<TextSpan> candidateHumps,
+            TextChunk patternChunk,
+            CompareOptions compareOption,
+            out ImmutableArray<TextSpan> matchedSpans)
         {
             var patternHumps = patternChunk.PatternHumps;


Simplify code.

Simplify code.

--- src/Workspaces/Core/Portable/RegularExpressions/RegexParser.cs
+++ src/Workspaces/Core/Portable/RegularExpressions/RegexParser.cs
@@ -33,19 +33,13 @@
             _captureNamesToSpan = captureNamesToSpan;
             _captureNumbersToSpan = captureNumbersToSpan;

-            ScanNextToken(allowTrivia: true);
-        }
-
-        private RegexToken ScanNextToken(bool allowTrivia)
-        {
+            ConsumeCurrentToken(allowTrivia: true);
+        }
+
+        private RegexToken ConsumeCurrentToken(bool allowTrivia)
+        {
+            var previous = _currentToken;
             _currentToken = _lexer.ScanNextToken(allowTrivia, _options);
-            return _currentToken;
-        }
-
-        private RegexToken ScanNextTokenAndReturnPreviousToken(bool allowTrivia)
-        {
-            var previous = _currentToken;
-            ScanNextToken(allowTrivia);
             return previous;
         }

@@ -155,7 +149,7 @@
             while (_currentToken.Kind == RegexKind.BarToken)
             {
                 current = new RegexAlternationNode(
-                    current, ScanNextTokenAndReturnPreviousToken(allowTrivia: true), ParseSequence(consumeCloseParen));
+                    current, ConsumeCurrentToken(allowTrivia: true), ParseSequence(consumeCloseParen));
             }

             return current;
@@ -227,28 +221,28 @@

             // Whitespace allowed after the question and the next sequence element.
             return new RegexLazyQuantifierNode(quantifier,
-                ScanNextTokenAndReturnPreviousToken(allowTrivia: true));
+                ConsumeCurrentToken(allowTrivia: true));
         }

         private RegexExpressionNode ParseZeroOrMoreQuantifier(RegexPrimaryExpressionNode current)
         {
             // Whitespace allowed between the quantifier and the possible following ?.
             return TryParseLazyQuantifier(new RegexZeroOrMoreQuantifierNode(current,
-                ScanNextTokenAndReturnPreviousToken(allowTrivia: true)));
+                ConsumeCurrentToken(allowTrivia: true)));
         }

         private RegexExpressionNode ParseOneOrMoreQuantifier(RegexPrimaryExpressionNode current)
         {
             // Whitespace allowed between the quantifier and the possible following ?.
             return TryParseLazyQuantifier(new RegexOneOrMoreQuantifierNode(current,
-                ScanNextTokenAndReturnPreviousToken(allowTrivia: true)));
+                ConsumeCurrentToken(allowTrivia: true)));
         }

         private RegexExpressionNode ParseZeroOrOneQuantifier(RegexPrimaryExpressionNode current)
         {
             // Whitespace allowed between the quantifier and the possible following ?.
             return TryParseLazyQuantifier(new RegexZeroOrOneQuantifierNode(current,
-                ScanNextTokenAndReturnPreviousToken(allowTrivia: true)));
+                ConsumeCurrentToken(allowTrivia: true)));
         }

         private RegexExpressionNode TryParseNumericQuantifier(
@@ -307,7 +301,7 @@
             firstNumberToken = firstNumber.Value;

             // Nothing allowed between {x,n}
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind == RegexKind.CommaToken)
             {
@@ -319,14 +313,14 @@
                 if (secondNumberToken == null)
                 {
                     // Nothing allowed between {x,n}
-                    ResetToPositionAndScanNextToken(start, allowTrivia: false);
+                    ResetToPositionAndConsumeCurrentToken(start, allowTrivia: false);
                 }
                 else
                 {
                     var secondNumberTokenLocal = secondNumberToken.Value;

                     // Nothing allowed between {x,n}
-                    ScanNextToken(allowTrivia: false);
+                    ConsumeCurrentToken(allowTrivia: false);

                     var val1 = (int)firstNumberToken.Value;
                     var val2 = (int)secondNumberTokenLocal.Value;
@@ -346,14 +340,14 @@
                 return false;
             }

-            closeBraceToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: true);
+            closeBraceToken = ConsumeCurrentToken(allowTrivia: true);
             return true;
         }

-        private void ResetToPositionAndScanNextToken(int position, bool allowTrivia)
+        private void ResetToPositionAndConsumeCurrentToken(int position, bool allowTrivia)
         {
             _lexer.Position = position;
-            ScanNextToken(allowTrivia);
+            ConsumeCurrentToken(allowTrivia);
         }

         private RegexPrimaryExpressionNode ParsePrimaryExpression(RegexExpressionNode lastExpression)
@@ -397,7 +391,7 @@
                 CheckQuantifierExpression(lastExpression, ref openBraceToken);
             }

-            ResetToPositionAndScanNextToken(start, allowTrivia: true);
+            ResetToPositionAndConsumeCurrentToken(start, allowTrivia: true);
             return new RegexTextNode(openBraceToken);
         }

@@ -405,26 +399,26 @@
         {
             var token = _currentToken.With(kind: RegexKind.TextToken).AddDiagnosticIfNone(
                 new RegexDiagnostic(WorkspacesResources.Too_many_close_parens, GetSpan(_currentToken)));
-            ScanNextToken(allowTrivia: true);
+            ConsumeCurrentToken(allowTrivia: true);
             return new RegexTextNode(token);
         }

         private RegexPrimaryExpressionNode ParseText()
-            => new RegexTextNode(ScanNextTokenAndReturnPreviousToken(allowTrivia: true).With(kind: RegexKind.TextToken));
+            => new RegexTextNode(ConsumeCurrentToken(allowTrivia: true).With(kind: RegexKind.TextToken));

         private RegexPrimaryExpressionNode ParseEndAnchor()
-            => new RegexAnchorNode(RegexKind.EndAnchor, ScanNextTokenAndReturnPreviousToken(allowTrivia: true));
+            => new RegexAnchorNode(RegexKind.EndAnchor, ConsumeCurrentToken(allowTrivia: true));

         private RegexPrimaryExpressionNode ParseStartAnchor()
-            => new RegexAnchorNode(RegexKind.StartAnchor, ScanNextTokenAndReturnPreviousToken(allowTrivia: true));
+            => new RegexAnchorNode(RegexKind.StartAnchor, ConsumeCurrentToken(allowTrivia: true));

         private RegexPrimaryExpressionNode ParseWildcard()
-            => new RegexWildcardNode(ScanNextTokenAndReturnPreviousToken(allowTrivia: true));
+            => new RegexWildcardNode(ConsumeCurrentToken(allowTrivia: true));

         private RegexGroupingNode ParseGrouping()
         {
             var start = _lexer.Position;
-            var openParenToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: false);
+            var openParenToken = ConsumeCurrentToken(allowTrivia: false);

             switch (_currentToken.Kind)
             {
@@ -442,7 +436,7 @@
             switch (_currentToken.Kind)
             {
                 case RegexKind.CloseParenToken:
-                    return ScanNextTokenAndReturnPreviousToken(allowTrivia: true);
+                    return ConsumeCurrentToken(allowTrivia: true);

                 default:
                     return RegexToken.CreateMissing(RegexKind.CloseParenToken).AddDiagnosticIfNone(
@@ -460,7 +454,7 @@
             var currentOptions = _options;
             _options = embeddedOptions;

-            ScanNextToken(allowTrivia: true);
+            ConsumeCurrentToken(allowTrivia: true);
             var expression = this.ParseAlternatingSequences(consumeCloseParen: false);
             _options = currentOptions;
             return expression;
@@ -487,7 +481,7 @@
             }

             var afterQuestionPos = _lexer.Position;
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             switch (_currentToken.Kind)
             {
                 case RegexKind.LessThanToken:
@@ -553,7 +547,7 @@
                 {
                     // If it's a numeric group, it always has to be a real reference.

-                    ScanNextToken(allowTrivia: false);
+                    ConsumeCurrentToken(allowTrivia: false);
                     if (_currentToken.Kind == RegexKind.CloseParenToken)
                     {
                         innerCloseParenToken = _currentToken;
@@ -582,7 +576,7 @@
                         return ParseConditionalExpressionGrouping(openParenToken, questionToken, innerOpenParenToken);
                     }

-                    ScanNextToken(allowTrivia: false);
+                    ConsumeCurrentToken(allowTrivia: false);
                     if (_currentToken.Kind != RegexKind.CloseParenToken)
                     {
                         _lexer.Position = afterInnerOpenParen;
@@ -593,7 +587,7 @@
                 }

-                ScanNextToken(allowTrivia: true);
+                ConsumeCurrentToken(allowTrivia: true);
                 var result = ParseConditionalGroupingResult();

                 return new RegexConditionalCaptureGroupingNode(
@@ -657,7 +651,7 @@
                 }
             }

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             Debug.Assert(_currentToken.Kind == RegexKind.OpenParenToken);
             var grouping = ParseGrouping();

@@ -698,7 +692,7 @@
             RegexToken openParenToken, RegexToken questionToken)
         {
             var start = _lexer.Position;
-            var lessThanToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: false);
+            var lessThanToken = ConsumeCurrentToken(allowTrivia: false);

             switch (_currentToken.Kind)
             {
@@ -733,7 +727,7 @@
             var captureToken = _lexer.TryScanNumberOrCaptureName();
             if (captureToken == null)
             {
-                ScanNextToken(allowTrivia: false);
+                ConsumeCurrentToken(allowTrivia: false);
                 captureToken = RegexToken.CreateMissing(RegexKind.CaptureNameToken);

                 if (_currentToken.Kind == RegexKind.MinusToken)
@@ -761,7 +755,7 @@
                     GetSpan(capture)));
             }

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind == RegexKind.MinusToken)
             {
@@ -816,7 +810,7 @@
             if (secondCapture == null)
             {
                 // Invalid group name: Group names must begin with a word character
-                ScanNextToken(allowTrivia: false);
+                ConsumeCurrentToken(allowTrivia: false);

                 openParenToken = openParenToken.AddDiagnosticIfNone(new RegexDiagnostic(
                     WorkspacesResources.Invalid_group_name_Group_names_must_begin_with_a_word_character,
@@ -831,7 +825,7 @@
             var second = secondCapture.Value;
             CheckCapture(ref second);

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             var closeToken = ParseCaptureGroupingCloseToken(ref openParenToken, openToken);

             return new RegexBalancingGroupingNode(
@@ -899,14 +893,14 @@
         private RegexGroupingNode ParseOptionsGroupingNode(
             RegexToken openParenToken, RegexToken questionToken, RegexToken optionsToken)
         {
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             switch (_currentToken.Kind)
             {
                 case RegexKind.CloseParenToken:
                     _options = GetNewOptionsFromToken(_options, optionsToken);
                     return new RegexSimpleOptionsGroupingNode(
                         openParenToken, questionToken, optionsToken,
-                        ScanNextTokenAndReturnPreviousToken(allowTrivia: true));
+                        ConsumeCurrentToken(allowTrivia: true));

                 case RegexKind.ColonToken:
                     return ParseNestedOptionsGroupingNode(openParenToken, questionToken, optionsToken);
@@ -981,7 +975,7 @@
             var caretToken = RegexToken.CreateMissing(RegexKind.CaretToken);
             var closeBracketToken = RegexToken.CreateMissing(RegexKind.CloseBracketToken);

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             if (_currentToken.Kind == RegexKind.CaretToken)
             {
                 caretToken = _currentToken;
@@ -991,7 +985,7 @@
                 MoveBackBeforePreviousScan();
             }

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             var contents = ArrayBuilder<RegexExpressionNode>.GetInstance();
             while (_currentToken.Kind != RegexKind.EndOfFile)
@@ -1000,7 +994,7 @@

                 if (_currentToken.Kind == RegexKind.CloseBracketToken && contents.Count > 0)
                 {
-                    closeBracketToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: true);
+                    closeBracketToken = ConsumeCurrentToken(allowTrivia: true);
                     break;
                 }

@@ -1034,7 +1028,7 @@

             if (_currentToken.Kind == RegexKind.MinusToken && !_lexer.IsAt("]"))
             {
-                var minusToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: false);
+                var minusToken = ConsumeCurrentToken(allowTrivia: false);

                 if (_currentToken.Kind == RegexKind.OpenBracketToken)
                 {
@@ -1246,7 +1240,7 @@
             {
                 var backslashToken = _currentToken;
                 var afterSlash = _lexer.Position;
-                ScanNextToken(allowTrivia: false);
+                ConsumeCurrentToken(allowTrivia: false);
                 Debug.Assert(_currentToken.VirtualChars.Length == 1);

                 var nextChar = _currentToken.VirtualChars[0].Char;
@@ -1273,7 +1267,7 @@

                     case '-':
                         return new RegexSimpleEscapeNode(
-                            backslashToken, ScanNextTokenAndReturnPreviousToken(allowTrivia: false).With(kind: RegexKind.TextToken));
+                            backslashToken, ConsumeCurrentToken(allowTrivia: false).With(kind: RegexKind.TextToken));

                     default:
                         _lexer.Position--;
@@ -1288,7 +1282,7 @@
             {
                 // have a trailing subtraction.
                 return ParseCharacterClassSubtractionNode(
-                    ScanNextTokenAndReturnPreviousToken(allowTrivia: false));
+                    ConsumeCurrentToken(allowTrivia: false));
             }

             // From the .net regex code:
@@ -1297,7 +1291,7 @@
             if (!afterRangeMinus && _currentToken.Kind == RegexKind.OpenBracketToken && _lexer.IsAt(":"))
             {
                 var beforeBracketPos = _lexer.Position - 1;
-                ScanNextToken(allowTrivia: false);
+                ConsumeCurrentToken(allowTrivia: false);
                 var captureName = _lexer.TryScanCaptureName();
                 if (captureName.HasValue && _lexer.IsAt(":]"))
                 {
@@ -1305,20 +1299,20 @@
                     var textChars = _lexer.GetSubPattern(beforeBracketPos, _lexer.Position);
                     var token = new RegexToken(ImmutableArray<RegexTrivia>.Empty, RegexKind.TextToken, textChars);

-                    ScanNextToken(allowTrivia: false);
+                    ConsumeCurrentToken(allowTrivia: false);
                     return new RegexPosixPropertyNode(token);
                 }
                 else
                 {
                     // Reset to back where we were.
                     _lexer.Position = beforeBracketPos;
-                    ScanNextToken(allowTrivia: false);
+                    ConsumeCurrentToken(allowTrivia: false);
                     Debug.Assert(_currentToken.Kind == RegexKind.OpenBracketToken);
                 }
             }

             return new RegexTextNode(
-                ScanNextTokenAndReturnPreviousToken(allowTrivia: false).With(kind: RegexKind.TextToken));
+                ConsumeCurrentToken(allowTrivia: false).With(kind: RegexKind.TextToken));
         }

         private RegexPrimaryExpressionNode ParseCharacterClassSubtractionNode(RegexToken minusToken)
@@ -1345,7 +1339,7 @@
             Debug.Assert(_lexer.Text[_lexer.Position - 1].Char == '\\');

             // No spaces between \ and next char.
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind == RegexKind.EndOfFile)
             {
@@ -1367,7 +1361,7 @@
                 case 'z':
                 {
                     return new RegexAnchorEscapeNode(
-                        backslashToken, ScanNextTokenAndReturnPreviousToken(allowTrivia: allowTriviaAfterEnd));
+                        backslashToken, ConsumeCurrentToken(allowTrivia: allowTriviaAfterEnd));
                 }

                 case 'w':
@@ -1378,7 +1372,7 @@
                 case 'D':
                 {
                     return new RegexCharacterClassEscapeNode(
-                        backslashToken, ScanNextTokenAndReturnPreviousToken(allowTrivia: allowTriviaAfterEnd));
+                        backslashToken, ConsumeCurrentToken(allowTrivia: allowTriviaAfterEnd));
                 }

                 case 'p':
@@ -1396,7 +1390,7 @@
             Debug.Assert(_lexer.Text[_lexer.Position - 1].Char == '\\');

             // No spaces between \ and next char.
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind == RegexKind.EndOfFile)
             {
@@ -1470,7 +1464,7 @@
                 var numberToken = new RegexToken(
                     ImmutableArray<RegexTrivia>.Empty, RegexKind.NumberToken,
                     _lexer.GetSubPattern(start, bestPosition)).With(value: capVal);
-                ResetToPositionAndScanNextToken(bestPosition, allowTrivia: true);
+                ResetToPositionAndConsumeCurrentToken(bestPosition, allowTrivia: true);
                 return new RegexBackreferenceEscapeNode(backslashToken, numberToken);
             }

@@ -1490,7 +1484,7 @@
             {
                 CheckCapture(ref numberToken);

-                ScanNextToken(allowTrivia: true);
+                ConsumeCurrentToken(allowTrivia: true);
                 return new RegexBackreferenceEscapeNode(backslashToken, numberToken);
             }

@@ -1552,7 +1546,7 @@
             capture = RegexToken.CreateMissing(RegexKind.CaptureNameToken);
             closeToken = RegexToken.CreateMissing(RegexKind.GreaterThanToken);

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_lexer.Position < _lexer.Text.Length &&
                 (_currentToken.Kind == RegexKind.LessThanToken || _currentToken.Kind == RegexKind.SingleQuoteToken))
@@ -1569,7 +1563,7 @@
                 ? RegexToken.CreateMissing(RegexKind.CaptureNameToken)
                 : captureToken.Value;

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             closeToken = RegexToken.CreateMissing(RegexKind.GreaterThanToken);

             if (!capture.IsMissing &&
@@ -1577,7 +1571,7 @@
                  (openToken.Kind == RegexKind.SingleQuoteToken && _currentToken.Kind == RegexKind.SingleQuoteToken)))
             {
                 CheckCapture(ref capture);
-                closeToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: true);
+                closeToken = ConsumeCurrentToken(allowTrivia: true);
             }
         }

@@ -1585,7 +1579,7 @@
         {
             Debug.Assert(_lexer.Text[_lexer.Position - 1].Char == '\\');

-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             Debug.Assert(_currentToken.VirtualChars.Length == 1);

             var ch = _currentToken.VirtualChars[0];
@@ -1595,7 +1589,7 @@
                 var octalDigits = _lexer.ScanOctalCharacters(_options);
                 Debug.Assert(octalDigits.VirtualChars.Length > 0);

-                ScanNextToken(allowTrivia: true);
+                ConsumeCurrentToken(allowTrivia: true);
                 return new RegexOctalEscapeNode(backslashToken, octalDigits);
             }

@@ -1611,7 +1605,7 @@
                 case 'v':
                 {
                     return new RegexSimpleEscapeNode(
-                        backslashToken, ScanNextTokenAndReturnPreviousToken(allowTrivia: true).With(kind: RegexKind.TextToken));
+                        backslashToken, ConsumeCurrentToken(allowTrivia: true).With(kind: RegexKind.TextToken));
                 }
                 case 'x':
                     return ScanHexEscape(backslashToken);
@@ -1620,7 +1614,7 @@
                 case 'c':
                     return ScanControlEscape(backslashToken);
                 default:
-                    var typeToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: true).With(kind: RegexKind.TextToken);
+                    var typeToken = ConsumeCurrentToken(allowTrivia: true).With(kind: RegexKind.TextToken);

                     if (!HasOption(_options, RegexOptions.ECMAScript) && RegexCharClass.IsWordChar(ch))
                     {
@@ -1637,7 +1631,7 @@
         {
             var typeToken = _currentToken;
             var hexChars = _lexer.ScanHexCharacters(4);
-            ScanNextToken(allowTrivia: true);
+            ConsumeCurrentToken(allowTrivia: true);
             return new RegexUnicodeEscapeNode(backslashToken, typeToken, hexChars);
         }

@@ -1645,13 +1639,13 @@
         {
             var typeToken = _currentToken;
             var hexChars = _lexer.ScanHexCharacters(2);
-            ScanNextToken(allowTrivia: true);
+            ConsumeCurrentToken(allowTrivia: true);
             return new RegexHexEscapeNode(backslashToken, typeToken, hexChars);
         }

         private RegexControlEscapeNode ScanControlEscape(RegexToken backslashToken)
         {
-            var typeToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: false);
+            var typeToken = ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind == RegexKind.EndOfFile)
             {
@@ -1677,7 +1671,7 @@

                 if (ch < ' ')
                 {
-                    var controlToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: true).With(kind: RegexKind.TextToken);
+                    var controlToken = ConsumeCurrentToken(allowTrivia: true).With(kind: RegexKind.TextToken);
                     return new RegexControlEscapeNode(backslashToken, typeToken, controlToken);
                 }
                 else
@@ -1706,7 +1700,7 @@
                     out var closeBraceToken,
                     out var message))
             {
-                ResetToPositionAndScanNextToken(start, allowTrivia: allowTriviaAfterEnd);
+                ResetToPositionAndConsumeCurrentToken(start, allowTrivia: allowTriviaAfterEnd);
                 typeToken = typeToken.With(kind: RegexKind.TextToken).AddDiagnosticIfNone(new RegexDiagnostic(
                     message, GetSpan(backslash, typeToken)));
                 return new RegexSimpleEscapeNode(backslash, typeToken);
@@ -1734,7 +1728,7 @@
             }

             // no whitespace in \p{x}
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);

             if (_currentToken.Kind != RegexKind.OpenBraceToken)
             {
@@ -1746,7 +1740,7 @@
             var category = _lexer.TryScanEscapeCategory();

             // no whitespace in \p{x}
-            ScanNextToken(allowTrivia: false);
+            ConsumeCurrentToken(allowTrivia: false);
             if (_currentToken.Kind != RegexKind.CloseBraceToken)
             {
                 message = WorkspacesResources.Incomplete_character_escape;
@@ -1760,13 +1754,13 @@
             }

             categoryToken = category.Value;
-            closeBraceToken = ScanNextTokenAndReturnPreviousToken(allowTrivia: allowTriviaAfterEnd);
+            closeBraceToken = ConsumeCurrentToken(allowTrivia: allowTriviaAfterEnd);
             return true;
         }

         private RegexTextNode ParseUnexpectedQuantifier(RegexExpressionNode lastExpression)
         {
-            var token = ScanNextTokenAndReturnPreviousToken(allowTrivia: true);
+            var token = ConsumeCurrentToken(allowTrivia: true);
             CheckQuantifierExpression(lastExpression, ref token);
             return new RegexTextNode(token.With(kind: RegexKind.TextToken));
         }


Updated version number to 0.0.24 for release.

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -13,6 +13,6 @@
 // An odd patch number is a development version, an even patch number is
 // a relased version.

-[assembly: AssemblyVersion("0.0.23")]
-[assembly: AssemblyFileVersion("0.0.23")]
-[assembly: AssemblyInformationalVersion("0.0.23")]
+[assembly: AssemblyVersion("0.0.24")]
+[assembly: AssemblyFileVersion("0.0.24")]
+[assembly: AssemblyInformationalVersion("0.0.24")]


Changed version number to v0.2.0

Changed version number to v0.2.0

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -3,5 +3,5 @@
 // NOTE: This file is used to automatically set the version number
 // NOTE: of all projects in the solution.  If you change the version number
 // NOTE: here, it will be reflected in all assemblies when you build the solution
-[assembly: AssemblyVersion("0.1.0.*")]
-//[assembly: AssemblyFileVersion("0.1.*")]
+[assembly: AssemblyVersion("0.2.0.*")]
+//[assembly: AssemblyFileVersion("0.2.*")]


update the version

update the version

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -26,5 +26,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("5.0.3.0")]
-[assembly: AssemblyFileVersion("5.0.3.0")]
+[assembly: AssemblyVersion("5.0.4.0")]
+[assembly: AssemblyFileVersion("5.0.4.0")]


update the version

update the version

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -18,13 +18,13 @@
 // Version information for an assembly consists of the following four values:
 //
 //      Major Version
-//      Minor Version
+//      Minor Version
 //      Build Number
 //      Revision
 //
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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("4.0.2.0")]
-[assembly: AssemblyFileVersion("4.0.2.0")]
+[assembly: AssemblyVersion("5.0.0.0")]
+[assembly: AssemblyFileVersion("5.0.0.0")]


add validate message in Member Login view

--- vivianClothing/vivianClothing/Views/Member/Login.cshtml
+++ vivianClothing/vivianClothing/Views/Member/Login.cshtml
@@ -43,11 +43,26 @@
 @section Scripts {
     @Scripts.Render("~/bundles/jqueryval")
     <script>
-        $(function () {
-            //book page 390 modify validate message
-            $("#@Html.IdFor(model => model.email)")
-                .rules("add", { message: { email: "請輸入Email 地址" } });
-        })

-    </script>
-}
+        //book page 390 modify validate message
+        $.validator.messages = {
+            required: "this field ",
+            remote: "please fix this field",
+            email: "請輸入Email地址",
+            url: "Please enter a valid URL",
+            date: "please enter a valid date",
+            dateISO: "please enter a valid dateISO",
+            number: "please enter a valid number",
+            digits: "please enter only only digits",
+            creditcard: "please enter a valid credit card number",
+            equalTO: "please enter a same value again",
+            accept: "please enter a value with a valid extension",
+            maxlength: $.validator.format("please enter no more than {0} characters."),
+            minlength: $.validator.format("please enter atlease than {0} characters."),
+            rangelength: $.validator.format("please enter a value between {0} and {1} characters long."),
+            range: $.validator.format("please enter a value between {0} and {1}  ."),
+            max: $.validator.format("please enter a value less than or eualto {0} long."),
+            min: $.validator.format("please enter a value greater than or eualto {0} long.")
+        };
+      </script>
+ }


Fix hitobjects not properly expiring if scrolling in the editor

--- osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
+++ osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
@@ -1,11 +1,13 @@
 // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
 // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

+using System;
 using System.ComponentModel;
 using osu.Game.Rulesets.Objects.Drawables;
 using osu.Framework.Graphics;
 using System.Linq;
 using osu.Game.Rulesets.Objects.Types;
+using osu.Game.Rulesets.Scoring;
 using osu.Game.Skinning;
 using OpenTK.Graphics;

@@ -32,7 +34,9 @@
             {
                 UpdatePreemptState();

-                using (BeginDelayedSequence(HitObject.TimePreempt + (Judgements.FirstOrDefault()?.TimeOffset ?? 0), true))
+                var judgementOffset = Math.Min(HitObject.HitWindows.HalfWindowFor(HitResult.Miss), Judgements.FirstOrDefault()?.TimeOffset ?? 0);
+
+                using (BeginDelayedSequence(HitObject.TimePreempt + judgementOffset, true))
                     UpdateCurrentState(state);
             }
         }


Add references to web source in recent activity icon

--- osu.Game/Overlays/Profile/Sections/Recent/RecentActivityIcon.cs
+++ osu.Game/Overlays/Profile/Sections/Recent/RecentActivityIcon.cs
@@ -30,6 +30,9 @@
         [BackgroundDependencyLoader]
         private void load(OsuColour colours)
         {
+            // references:
+            // https://github.com/ppy/osu-web/blob/659b371dcadf25b4f601a4c9895a813078301084/resources/assets/lib/profile-page/parse-event.tsx
+            // https://github.com/ppy/osu-web/blob/master/resources/assets/less/bem/profile-extra-entries.less#L98-L128
             switch (type)
             {
                 case RecentActivityType.BeatmapPlaycount:


fixes #246

fixes #246

--- samples/Myra.Samples.AllWidgets/AllWidgetsGame.cs
+++ samples/Myra.Samples.AllWidgets/AllWidgetsGame.cs
@@ -112,7 +112,7 @@
 #endif

 #if ANDROID
-			Desktop.WidgetGotKeyboardFocus += (s, a) =>
+			_desktop.WidgetGotKeyboardFocus += (s, a) =>
 			{
 				var asTextBox = a.Data as TextBox;
 				if (asTextBox == null)


- new game player count fix

- new game player count fix

--- ParticleStormControl/ParticleStormControl/Menu/NewGame.cs
+++ ParticleStormControl/ParticleStormControl/Menu/NewGame.cs
@@ -126,14 +126,17 @@
                 if (!found)
                 {
                     int index = getFreePlayerIndex();
-                    int colorIndex = getNextFreeColorIndex(0);
-                    playerConnected[index] = true;
-                    Settings.Instance.PlayerControls[index] = type;
-                    Settings.Instance.PlayerColorIndices[index] = colorIndex;
-                    Settings.Instance.PlayerVirusIndices[index] = Random.Next(4);
-                    Settings.Instance.NumPlayers++;
-                    Settings.Instance.PlayerConnected[index] = true;
-                    countdown = TimeSpan.FromSeconds(-1);
+                    if (index != -1)
+                    {
+                        int colorIndex = getNextFreeColorIndex(0);
+                        playerConnected[index] = true;
+                        Settings.Instance.PlayerControls[index] = type;
+                        Settings.Instance.PlayerColorIndices[index] = colorIndex;
+                        Settings.Instance.PlayerVirusIndices[index] = Random.Next(4);
+                        Settings.Instance.NumPlayers++;
+                        Settings.Instance.PlayerConnected[index] = true;
+                        countdown = TimeSpan.FromSeconds(-1);
+                    }
                 }
             }

@@ -376,12 +379,13 @@
             return start;
         }

+        // if all slots are full -1 is returned
         private int getFreePlayerIndex()
         {
             int i = 0;
-            while (playerConnected[i] && i < 3)
+            while (playerConnected[i] && i < 4)
                 i++;
-            return i;
+            return i == 4 ? -1 : i;
         }

         private bool isActive(InputManager.ControlActions action, int index)


Extracted network printing check into function

 - check network printing is enable during serial port availability checking
 - check nwp is enabled before Attempt to Connect

--- PrinterCommunication/PrinterConnectionAndCommunication.cs
+++ PrinterCommunication/PrinterConnectionAndCommunication.cs
@@ -2019,7 +2019,7 @@
 		public bool SerialPortIsAvailable(string portName)
 		//Check is serial port is in the list of available serial ports
 		{
-			if(ActiveSliceSettings.Instance.GetValue("enable_network_printing") == "1")
+			if(IsNetworkPrinting())
 			{
 				return true;
 			}
@@ -2301,7 +2301,7 @@
 			// Allow the user to set the appropriate properties.
 			var portNames = FrostedSerialPort.GetPortNames();
 			//Debug.WriteLine("Open ports: {0}".FormatWith(portNames.Length));
-			if (portNames.Length > 0)
+			if (portNames.Length > 0 || IsNetworkPrinting())
 			{
 				AttemptToConnect(this.ComPort, this.BaudRate);
 				if (CommunicationState == CommunicationStates.FailedToConnect)
@@ -2602,6 +2602,11 @@
 			{
 				QueueData.Instance.RemoveAt(QueueData.Instance.SelectedIndex);
 			}
+		}
+
+		private bool IsNetworkPrinting()
+		{
+			return ActiveSliceSettings.Instance.GetValue("enable_network_printing") == "1";
 		}

 		private void OnAtxPowerStateChanged(bool enableAtxPower)


More careful about checking for null serial port

--- PrinterCommunication/PrinterConnectionAndCommunication.cs
+++ PrinterCommunication/PrinterConnectionAndCommunication.cs
@@ -2117,8 +2117,11 @@

                 CommunicationState = CommunicationStates.Disconnecting;
 				ReadThreadHolder.Join();
-				serialPort.Close();
-                serialPort.Dispose();
+				if (serialPort != null)
+				{
+					serialPort.Close();
+					serialPort.Dispose();
+				}
                 serialPort = null;
                 CommunicationState = CommunicationStates.Disconnected;
                 LinesToWriteQueue.Clear();


1863 Add Reference to .pyd does not work Changes the database directory for project references.

--- Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs
+++ Python/Product/Analysis/Interpreter/PythonTypeDatabase.cs
@@ -37,6 +37,7 @@
         public static readonly int CurrentVersion = 24;

         private static string _completionDatabasePath;
+        private static string _referencesDatabasePath;
         private static string _baselineDatabasePath;

         public PythonTypeDatabase(
@@ -199,9 +200,11 @@
             }

             private FileStream OpenProjectExtensionList() {
+                Directory.CreateDirectory(ReferencesDatabasePath);
+
                 for (int i = 0; i < 50 && !_cancel.IsCancellationRequested; i++) {
                     try {
-                        return new FileStream(Path.Combine(_typeDb.DatabaseDirectory, _extensionModuleInfoFile), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
+                        return new FileStream(Path.Combine(ReferencesDatabasePath, _extensionModuleInfoFile), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
                     } catch (IOException) {
                         if (_cancel.CanBeCanceled) {
                             _cancel.WaitHandle.WaitOne(100);
@@ -216,10 +219,10 @@

             private string GenerateDbFile(IPythonInterpreterFactory interpreter, string moduleName, string extensionModuleFilename, List<string> existingModules, string dbFile, FileStream fs) {
                 // we need to generate the DB file
-                dbFile = Path.Combine(_typeDb._sharedState.DatabaseDirectory, moduleName + ".$project.idb");
+                dbFile = Path.Combine(ReferencesDatabasePath, moduleName + ".$project.idb");
                 int retryCount = 0;
                 while (File.Exists(dbFile)) {
-                    dbFile = Path.Combine(_typeDb._sharedState.DatabaseDirectory, moduleName + "." + ++retryCount + ".$project.idb");
+                    dbFile = Path.Combine(ReferencesDatabasePath, moduleName + "." + ++retryCount + ".$project.idb");
                 }

                 using (var output = interpreter.Run(
@@ -478,6 +481,23 @@
                     );
                 }
                 return _completionDatabasePath;
+            }
+        }
+
+        private static string ReferencesDatabasePath {
+            get {
+                if (_referencesDatabasePath == null) {
+                    _referencesDatabasePath = Path.Combine(
+                        Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
+                        "Python Tools",
+                        "ReferencesDB",
+#if DEBUG
+                        "Debug",
+#endif
+                        AssemblyVersionInfo.VSVersion
+                    );
+                }
+                return _referencesDatabasePath;
             }
         }


removed bug @ApplyWall

removed bug @ApplyWall

--- QuoridorContestFramework/QCF.GameEngine/Analysis/Graph.cs
+++ QuoridorContestFramework/QCF.GameEngine/Analysis/Graph.cs
@@ -70,8 +70,8 @@
 			else
 			{
 				nodes[topleft    ].RemoveEdge(nodes[topleft    ].Right);
-				nodes[bottomLeft ].RemoveEdge(nodes[bottomLeft ].Left);
-				nodes[topRight   ].RemoveEdge(nodes[topRight   ].Right);
+				nodes[bottomLeft ].RemoveEdge(nodes[bottomLeft ].Right);
+				nodes[topRight   ].RemoveEdge(nodes[topRight   ].Left);
 				nodes[bottomRight].RemoveEdge(nodes[bottomRight].Left);
 			}
 		}
@@ -177,7 +177,7 @@

 		private bool IsMoveable (Node sourceNode, Node targetNode)
 		{
-			if (!nodes.ContainsKey(targetNode.Coord))
+			if (targetNode == null || !nodes.ContainsKey(targetNode.Coord))
 				return false;

 			return sourceNode.Neighbours.Contains(targetNode);


Adding a check for the SvgPath

Adding a check for the SvgPath

--- SVG/SVG/SVG.Forms.Plugin.WindowsPhone/SvgImageRenderer.cs
+++ SVG/SVG/SVG.Forms.Plugin.WindowsPhone/SvgImageRenderer.cs
@@ -34,7 +34,7 @@
         {
             base.OnElementChanged(e);

-          if (_formsControl != null)
+            if (_formsControl != null && !string.IsNullOrWhiteSpace(_formsControl.SvgPath))
           {
             var xamlFilePath = _formsControl.SvgPath.Replace(".svg", ".xaml");
             var xamlStream = _formsControl.SvgAssembly.GetManifestResourceStream(xamlFilePath);


event stream does nothing when zero events are pushed

--- SampleProject/Source/Sample.Wires/TapeStreamEventStore.cs
+++ SampleProject/Source/Sample.Wires/TapeStreamEventStore.cs
@@ -44,6 +44,9 @@
         public void AppendToStream(IIdentity id, long originalVersion, ICollection<IEvent<IIdentity>> events,
             string explanation)
         {
+
+            if (events.Count == 0)
+                return;
             var stream = _factory.GetOrCreateStream(IdentityConvert.ToStream(id));
             var b = new EnvelopeBuilder("unknown");


Fix comment

Fix comment

--- Server/System/Scenario/ScenarioPartPurchaseDataUpdater.cs
+++ Server/System/Scenario/ScenarioPartPurchaseDataUpdater.cs
@@ -26,7 +26,7 @@
         }

         /// <summary>
-        /// Patches the scenario file with reputation data
+        /// Patches the scenario file with part purchase data
         /// </summary>
         private static string UpdateScenarioWithPartPurchaseData(string scenarioData, string techId, string partName)
         {


Fixed error saving attachments for a new rental request

--- Server/src/HetsApi/Controllers/RentalRequestController.cs
+++ Server/src/HetsApi/Controllers/RentalRequestController.cs
@@ -235,6 +235,17 @@

             rentalRequest.RentalRequestStatusTypeId = (int)statusId;

+            if (item.HetRentalRequestAttachment != null &&
+                item.HetRentalRequestAttachment.Count > 0)
+            {
+                HetRentalRequestAttachment attachment = new HetRentalRequestAttachment
+                {
+                    Attachment = item.HetRentalRequestAttachment.ElementAt(0).Attachment
+                };
+
+                rentalRequest.HetRentalRequestAttachment.Add(attachment);
+            }
+
             // save the changes
             _context.HetRentalRequest.Add(rentalRequest);
             _context.SaveChanges();


Allow arch to be included in monitor tag test data. (#3183)

(cherry picked from commit 7eb9b01e3ae00027f0c79118320a10e155c1c8a8)

--- tests/Microsoft.DotNet.Docker.Tests/MonitorImageData.cs
+++ tests/Microsoft.DotNet.Docker.Tests/MonitorImageData.cs
@@ -24,7 +24,5 @@

             return imageName;
         }
-
-        protected override string GetArchTagSuffix() => string.Empty;
     }
 }


SB-301 fix typo

SB-301 fix typo

--- Server/src/SchoolBusAPI/Services.Impl/SchoolBusService.cs
+++ Server/src/SchoolBusAPI/Services.Impl/SchoolBusService.cs
@@ -77,7 +77,7 @@
                 if (item.District != null)
                 {
                     int district_id = item.District.Id;
-                    var district_exists = _context.ServiceAreas.Any(a => a.Id == district_id);
+                    var district_exists = _context.Districts.Any(a => a.Id == district_id);
                     if (district_exists)
                     {
                         District district = _context.Districts.First(a => a.Id == district_id);


Fix IRC hack

Fix IRC hack

--- tests/Tgstation.Server.Tests/Instance/FunctionalTest.cs
+++ tests/Tgstation.Server.Tests/Instance/FunctionalTest.cs
@@ -110,7 +110,7 @@
 				Mock.Of<ILogger<IrcProvider>>(),
 				builder.Address,
 				builder.Port.Value,
-				builder.Nickname + "_hack_other",
+				builder.Nickname + "_other",
 				null,
 				null,
 				10,
@@ -133,6 +133,10 @@
 				cancellationToken);

 			await provider.SendMessage(channels.First().RealId, $"!{(useTgsGlobal ? "tgs" : builder.Nickname)} {message}", cancellationToken);
+
+			// irc provider is weird
+
+			await Task.Delay(5000);
 		}

 		async Task<DreamDaemon> DeployTestDme(string dmeName, DreamDaemonSecurity deploymentSecurity, CancellationToken cancellationToken)


Added join command

Added join command

--- DiscordSharp_Starter/DiscordSharp_Starter/Program.cs
+++ DiscordSharp_Starter/DiscordSharp_Starter/Program.cs
@@ -35,6 +35,13 @@
                     // Because this is a private message, the bot should send a private message back
                     // A private message does NOT have a channel
                 }
+                if (e.message.StartsWith("join "))
+                {
+                    string joinID = e.message.Substring(24, 16);
+                    client.AcceptInvite(joinID);
+                    e.author.SendMessage("Joined your discord server!");
+                    Console.WriteLine("Got join request from " + joinID);
+                }
             };


Refactored SocialSecurityFilterTests to use the abstract FilterTestsBase class.

--- SharpRaven.UnitTests/Logging/SocialSecurityFilterTests.cs
+++ SharpRaven.UnitTests/Logging/SocialSecurityFilterTests.cs
@@ -1,6 +1,4 @@
-using System;
-
-using NUnit.Framework;
+using NUnit.Framework;

 using SharpRaven.Logging.Filters;

@@ -8,35 +6,19 @@
 {
     [TestFixture]
     [Ignore("Not implemented yet")]
-    public class SocialSecurityFilterTests
+    public class SocialSecurityFilterTests : FilterTestsBase<SocialSecurityFilter>
     {
         [Test]
         public void InvalidSocialSecurityNumber_IsNotScrubbed()
         {
-            const string socialSecurityNumber = "1531";
-            var input = String.Format(
-                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. {0} Praesent est dui, ornare eget condimentum a, tincidunt sit amet lectus. Nulla pellentesque, tortor eget tempus malesuada.",
-                socialSecurityNumber);
-
-            SocialSecurityFilter filter = new SocialSecurityFilter();
-            var output = filter.Filter(input);
-
-            Assert.That(output, Is.StringContaining(socialSecurityNumber));
+            InvalidValueIsNotScrubbed("1531");
         }

         [Test]
         public void ValidSocialSecurityNumber_IsScrubbed()
         {
-            const string socialSecurityNumber = "55518231234";
-            var input = String.Format(
-                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. {0} Praesent est dui, ornare eget condimentum a, tincidunt sit amet lectus. Nulla pellentesque, tortor eget tempus malesuada.",
-                socialSecurityNumber);
-
-            SocialSecurityFilter filter = new SocialSecurityFilter();
-            var output = filter.Filter(input);
-
-            Assert.That(output, Is.Not.StringContaining(socialSecurityNumber));
+            ValidValueIsScrubbed("55518231234");
         }
     }
 }


Marked private fields of InstanceInitializationData with DebuggerBrowsable attribute.

--- SimpleInjector.NET/Advanced/InstanceInitializationData.cs
+++ SimpleInjector.NET/Advanced/InstanceInitializationData.cs
@@ -35,7 +35,10 @@
         // NOTE: Because of performance considerations, this type has been made a struct. This prevents Simple
         // Injector from creating an extra reference type every time an instance is created. This would cause
         // extra pressure on the GC.
+        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
         private readonly InitializationContext context;
+
+        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
         private readonly object instance;

         internal InstanceInitializationData(InitializationContext context, object instance)


now contains link for "Any resource" to the FHIR resourcelist

--- Fhir.Publication/Profile/ProfileKnowledgeProvider.cs
+++ Fhir.Publication/Profile/ProfileKnowledgeProvider.cs
@@ -45,6 +45,8 @@
                 return SpecUrl() + "datatypes.html#open";
             else if (isDataType(typename) || isPrimitive(typename))
                 return SpecUrl() + "datatypes.html#" + typename.ToLower();
+            else if (typename == "Any")
+                return SpecUrl() + "resourcelist.html";
             else if (ModelInfo.IsKnownResource(typename))
                 return SpecUrl() + typename.ToLower() + ".html";
             else if (typename == "Extension")


removed diagnostic code I had put into workspace to figure out MEF issues. it is no longer needed. no fix yet though. (changeset 1347829)

--- Src/Workspaces/Core/Workspace/Host/Mef/MefHostServices.cs
+++ Src/Workspaces/Core/Workspace/Host/Mef/MefHostServices.cs
@@ -344,93 +344,13 @@
             var key = new ExportKey(typeof(TExtension).AssemblyQualifiedName, typeof(TMetadata).AssemblyQualifiedName);
             if (!this.exportsMap.TryGetValue(key, out exports))
             {
-                var count = 0;
-
                 exports = ImmutableInterlocked.GetOrAdd(ref this.exportsMap, key, _ =>
                 {
-                    var result = this.exportProvider.GetExports<TExtension, TMetadata>().ToImmutableArray();
-
-                    count++;
-                    CrashIfSyntaxTreeFactoryServiceDoesntExistForCSharpOrVB(result);
-
-                    return result;
+                    return this.exportProvider.GetExports<TExtension, TMetadata>().ToImmutableArray();
                 });
             }

-            var final = (IEnumerable<Lazy<TExtension, TMetadata>>)exports;
-            CrashIfSyntaxTreeFactoryServiceDoesntExistForCSharpOrVB(final);
-
-            return final;
-        }
-
-        /// <summary>
-        /// diagnostic instrument to find out race in MeftHostService
-        /// </summary>
-        private void CrashIfSyntaxTreeFactoryServiceDoesntExistForCSharpOrVB<TExtension, TMetadata>(IEnumerable<Lazy<TExtension, TMetadata>> services)
-        {
-            if (typeof(TExtension) != typeof(ILanguageServiceFactory))
-            {
-                return;
-            }
-
-            var hasLanguageService = false;
-            var hasCSharpService = false;
-            var hasVBService = false;
-
-            foreach (var lazy in services)
-            {
-                var metadata = lazy.Metadata as LanguageServiceMetadata;
-                if (metadata == null)
-                {
-                    continue;
-                }
-
-                if (metadata.Language != LanguageNames.CSharp && metadata.Language != LanguageNames.VisualBasic)
-                {
-                    continue;
-                }
-
-                hasLanguageService = true;
-
-                if (metadata.ServiceType != typeof(ISyntaxTreeFactoryService).AssemblyQualifiedName)
-                {
-                    continue;
-                }
-
-                if (metadata.Language == LanguageNames.CSharp)
-                {
-                    hasCSharpService = true;
-                }
-
-                if (metadata.Language == LanguageNames.VisualBasic)
-                {
-                    hasVBService = true;
-                }
-
-                if (hasCSharpService && hasVBService)
-                {
-                    break;
-                }
-            }
-
-            if (!hasLanguageService || (hasVBService && hasCSharpService))
-            {
-                return;
-            }
-
-            var tempLanguages = this.languages == null ? null : this.languages.ToArray();
-            var tempServices = services.Select(lz => ValueTuple.Create(lz.Value, lz.Metadata)).ToArray();
-            var tempExportMap = this.exportsMap.Select(kv => ValueTuple.Create(kv.Key, kv.Value == null ? null : kv.Value as IEnumerable<object>))
-                                               .Select(t => ValueTuple.Create(t.Item1, t.Item2 == null ? null : t.Item2.ToArray())).ToArray();
-
-            var tempServices2 = services;
-
-            ExceptionHelpers.Crash(new Exception("Crash"));
-
-            GC.KeepAlive(tempLanguages);
-            GC.KeepAlive(tempServices);
-            GC.KeepAlive(tempServices2);
-            GC.KeepAlive(tempExportMap);
+            return (IEnumerable<Lazy<TExtension, TMetadata>>)exports;
         }

         /// <summary>


more logs

more logs

--- Terradue.Tep/Terradue/Tep/Controller/Community/UserTep.cs
+++ Terradue.Tep/Terradue/Tep/Controller/Community/UserTep.cs
@@ -204,6 +204,7 @@
             using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) {
                 this.TerradueCloudUsername = streamReader.ReadToEnd();
                 this.StoreCloudUsername(context.GetConfigIntegerValue("One-default-provider"));
+                context.LogDebug("Found Terradue Cloud Username : " + this.TerradueCloudUsername);
             }
         }

@@ -220,6 +221,8 @@

             var validatedUserName = this.Username.Replace(" ", "");

+            context.LogDebug("Creating Terradue Cloud Account : " + validatedUserName);
+
             string json = "{" +
                 "\"token\":\"" + context.GetConfigValue("t2portal-sso-token") + "\"," +
                 "\"username\":\"" + validatedUserName + "\"," +
@@ -238,6 +241,7 @@
                     var result = streamReader.ReadToEnd();
                     User resUser = ServiceStack.Text.JsonSerializer.DeserializeFromString<User>(result);
                     this.TerradueCloudUsername = resUser.Username;
+                    context.LogDebug("Terradue Cloud Account created : " + this.TerradueCloudUsername);
                     this.StoreCloudUsername();
                 }
             }
@@ -264,6 +268,7 @@
             using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) {
                 this.SshPubKey = streamReader.ReadToEnd();
                 this.SshPubKey = this.SshPubKey.Replace("\"", "");
+                context.LogDebug("Terradue Cloud SSH pubkey found : " + this.SshPubKey);
             }
         }


Fixed unobtrusive validation in Dynamic Data admin section

--- Website/Areas/Admin/DynamicData/DynamicDataManager.cs
+++ Website/Areas/Admin/DynamicData/DynamicDataManager.cs
@@ -5,6 +5,7 @@
 using System.Threading;
 using System.Web.DynamicData;
 using System.Web.Routing;
+using System.Web.UI;
 using DynamicData.EFCodeFirstProvider;

 namespace NuGetGallery.Areas.Admin.DynamicData
@@ -17,6 +18,24 @@
         private static DynamicDataRoute _route;

         public static void Register(RouteCollection routes, string root, IConfiguration configuration)
+        {
+            // Set up unobtrusive validation
+            InitializeValidation();
+
+            // Set up dynamic data
+            InitializeDynamicData(routes, root, configuration);
+        }
+
+        private static void InitializeValidation()
+        {
+            ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new ScriptResourceDefinition()
+            {
+                Path = "~/Scripts/jquery-1.6.2.min.js",
+                DebugPath = "~/Scripts/jquery-1.6.2.js"
+            });
+        }
+
+        private static void InitializeDynamicData(RouteCollection routes, string root, IConfiguration configuration)
         {
             try
             {


fixes #5828

fixes #5828

--- UnityProject/Assets/Scripts/Systems/Chemistry/Reaction.cs
+++ UnityProject/Assets/Scripts/Systems/Chemistry/Reaction.cs
@@ -48,7 +48,7 @@
 			}

 			if (!catalysts.All(catalyst =>
-				reagentMix[catalyst.Key] > catalyst.Value * reactionAmount))
+				reagentMix[catalyst.Key] >= catalyst.Value * reactionAmount))
 			{
 				return false;
 			}


fixed a wrong SO unit test output. Some vars were renamed (#7184)


removed test var

removed test var

--- WindowsSolution/WindowsPhone/UnityProject/App.xaml.cs
+++ WindowsSolution/WindowsPhone/UnityProject/App.xaml.cs
@@ -206,7 +206,6 @@
             if (e.Uri.ToString().StartsWith(fbProtocolMatch))
             {
                 e.Cancel = true;
-                var test = MarkerMetro.Unity.WinIntegration.Facebook.FBNative.IsLoggedIn;
             }
         }


Improve layout

Improve layout

--- WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
+++ WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -132,7 +132,8 @@
 				shell.Select(coinInfo);
 			});

-			ToggleDetails.ThrownExceptions
+			ToggleDetails
+				.ThrownExceptions
 				.ObserveOn(RxApp.TaskpoolScheduler)
 				.Subscribe(ex =>
 				{
@@ -140,10 +141,11 @@
 					NotificationHelpers.Error(ex.ToUserFriendlyString());
 				});

-			Observable.Merge(DequeueCoin.ThrownExceptions) // Don't notify about it. Dequeue failure (and success) is notified by other mechanism.
-					  .Merge(OpenCoinInfo.ThrownExceptions)
-					  .ObserveOn(RxApp.TaskpoolScheduler)
-					  .Subscribe(ex => Logger.LogError(ex));
+			Observable
+				.Merge(DequeueCoin.ThrownExceptions) // Don't notify about it. Dequeue failure (and success) is notified by other mechanism.
+				.Merge(OpenCoinInfo.ThrownExceptions)
+				.ObserveOn(RxApp.TaskpoolScheduler)
+				.Subscribe(ex => Logger.LogError(ex));
 		}

 		public SmartCoin Model { get; }


Add missing test for reduce onions behavior.

--- WalletWasabi.Tests/UnitTests/Packager/BitnodesApiTests.cs
+++ WalletWasabi.Tests/UnitTests/Packager/BitnodesApiTests.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using System.IO;
 using WalletWasabi.Packager;
 using Xunit;
@@ -10,13 +11,7 @@
 	/// </summary>
 	public class BitnodesApiTests
 	{
-		[Fact]
-		public void ProcessResponseTest()
-		{
-			var stringWriter = new StringWriter();
-			var api = new BitnodesApi(stringWriter);
-
-			string response = @"
+		private const string ApiResponse = @"
 			{
 			  ""timestamp"": 1597669414,
 			  ""total_nodes"": 10407,
@@ -29,10 +24,40 @@
 			  }
 			}";

-			api.ProcessResponse(response, null);
+		/// <summary>
+		/// Tests that we process response from Bitnodes API correctly.
+		/// </summary>
+		[Fact]
+		public void ProcessResponseTest()
+		{
+			var stringWriter = new StringWriter();
+			var api = new BitnodesApi(stringWriter);
+			api.ProcessResponse(ApiResponse, currentOnions: null);

 			// tep3ddikbopezl4v.onion is skipped because it is not a full node.
 			Assert.Equal($"nesxfmano25clfvn.onion:8333{Environment.NewLine}tg4uwrjmtr2jlbjy.onion:8333{Environment.NewLine}", stringWriter.ToString());
 		}
+
+		/// <summary>
+		/// Tests reduce onions behavior where we set <c>currentOnions</c> and addresses that do not fulfill
+		/// parameters (<see cref="PrintOnionsAsync(HashSet<string>? currentOnions)"/>) are filtered out.
+		/// </summary>
+		[Fact]
+		public void ProcessResponseWithCurrentOnionsTest()
+		{
+			var currentOnions = new HashSet<string>()
+			{
+				"tg4uwrjmtr2jlbjy.onion:8333", // Fulfills all criteria.
+				"tep3ddikbopezl4v.onion:8333", // This one is not a full node, so it should not be in the result.
+				"185.25.48.184:8333", // Not an onion address.
+			};
+
+			var stringWriter = new StringWriter();
+			var api = new BitnodesApi(stringWriter);
+			api.ProcessResponse(ApiResponse, currentOnions);
+
+			// tep3ddikbopezl4v.onion is skipped because it is not a full node.
+			Assert.Equal($"tg4uwrjmtr2jlbjy.onion:8333{Environment.NewLine}", stringWriter.ToString());
+		}
 	}
 }


Updated Login

Updated Login

--- WebApplication/Frontend/layouts/page-layouts/login.cshtml
+++ WebApplication/Frontend/layouts/page-layouts/login.cshtml
@@ -1,5 +1,5 @@

-
Healthy Workplaces. Healthy Employees. Together.

+
Login

Sign In

     Don't have an account yet? Sign up from here
     <form runat="server">


CP-17099: Remove unused function

CP-17099: Remove unused function

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdmin/Wizards/NewSRWizard_Pages/SrWizardHelpers.cs
+++ XenAdmin/Wizards/NewSRWizard_Pages/SrWizardHelpers.cs
@@ -107,13 +107,5 @@
         {
             return DefaultSRName(potentialName, connection.Cache.SRs.Select(sr => sr.Name()));
         }
-
-        public static String GetEntry(Dictionary<String, String> dconf, String Key, String Default)
-        {
-            if (dconf.ContainsKey(Key))
-                return dconf[Key];
-
-            return Default;
-        }
     }
 }


Updating type resolver to apply the array fix to dictionary types as well

--- ZScript/CodeGeneration/Analysis/ExpressionTypeResolver.cs
+++ ZScript/CodeGeneration/Analysis/ExpressionTypeResolver.cs
@@ -172,7 +172,7 @@
             if (context.dictionaryLiteral() != null)
             {
                 var expectedAsList = context.ExpectedType as DictionaryTypeDef;
-                if (expectedAsList != null)
+                if (expectedAsList != null && (context.valueAccess() == null || context.valueAccess().arrayAccess() == null))
                 {
                     context.dictionaryLiteral().ExpectedType = expectedAsList;
                 }