#33 wired up stack ops

#33 wired up stack ops

--- src/illNES.CPU/Mos6502.InstructionSet.cs
+++ src/illNES.CPU/Mos6502.InstructionSet.cs
@@ -19,8 +19,14 @@
                 [0x58] = new Operation(Instructions.CLI, AddressModes.Implied, 1, 2, Cli),
                 [0xB8] = new Operation(Instructions.CLV, AddressModes.Implied, 1, 2, Clv),

+                //Stack ops
+                [0x48] = new Operation(Instructions.PHA, AddressModes.Implied, 1, 3, Pha),
+		        [0x08] = new Operation(Instructions.PHP, AddressModes.Implied, 1, 3, Php),
+		        [0x68] = new Operation(Instructions.PLA, AddressModes.Implied, 1, 4, Pla),
+		        [0x28] = new Operation(Instructions.PLP, AddressModes.Implied, 1, 4, Plp),
+
                 //SET flags
-                [0x38] = new Operation(Instructions.SEC, AddressModes.Implied, 1, 2, Sec),
+        [0x38] = new Operation(Instructions.SEC, AddressModes.Implied, 1, 2, Sec),
                 [0xF8] = new Operation(Instructions.SED, AddressModes.Implied, 1, 2, Sed),
                 [0x78] = new Operation(Instructions.SEI, AddressModes.Implied, 1, 2, Sei),


Ready handler now parses private_channels field again

They reverted this change in the API temporarily until they can find a better way of changing it.

--- src/Discore/WebSocket/Net/Gateway.Dispatch.cs
+++ src/Discore/WebSocket/Net/Gateway.Dispatch.cs
@@ -120,6 +120,13 @@
                 cache.Guilds.Set(guildCache);
             }

+            // Get DM channels
+            foreach (DiscordApiData dmChannelData in data.GetArray("private_channels"))
+            {
+                DiscordDMChannel dm = new DiscordDMChannel(cache, app, dmChannelData);
+                cache.SetDMChannel(dm);
+            }
+
             LogServerTrace("Ready", data);
         }


Fixed a bug with doctrine image url validation preventing them from being optional.

--- DoctrineShips.Validation/Checks/ShipFitCheck.cs
+++ DoctrineShips.Validation/Checks/ShipFitCheck.cs
@@ -105,9 +105,12 @@
             }

             // Is this a https url?
-            if (doctrine.ImageUrl.Substring(0, 5) != "https")
+            if (doctrine.ImageUrl != string.Empty && doctrine.ImageUrl.Length >= 5)
             {
-                validationResult.AddError("ImageUrl.Https", "ImageUrl must start with https. Please use an image hosting service such as imgur that supports https.");
+                if (doctrine.ImageUrl.Substring(0, 5) != "https")
+                {
+                    validationResult.AddError("ImageUrl.Https", "ImageUrl must start with https. Please use an image hosting service such as imgur that supports https.");
+                }
             }

             return validationResult;


DNN-8931: add serializable attribute.

DNN-8931: add serializable attribute.

--- src/Dnn.EditBar.Library/Items/BaseMenuItem.cs
+++ src/Dnn.EditBar.Library/Items/BaseMenuItem.cs
@@ -7,6 +7,7 @@

 namespace Dnn.EditBar.Library.Items
 {
+    [Serializable]
     [DataContract]
     public abstract class BaseMenuItem
     {


fix auth test

fix auth test

--- src/DotVVM.Samples.Tests/Complex/AuthTests.cs
+++ src/DotVVM.Samples.Tests/Complex/AuthTests.cs
@@ -36,10 +36,10 @@
                 browser.SendKeys("input[type=text]", "message");
                 browser.First("input[type=button]").Click().Wait(500);

-                browser.ElementAt("span", 0)
+                browser.ElementAt("h1", 1)
                     .CheckIfInnerText(
                         s =>
-                            s.Contains("server: Hello!"),
+                            s.Contains("DotVVM Debugger: Error 403: Forbidden"),
                             "User is not in admin role"
                         );


added static compare method tests

added static compare method tests

--- src/FarsiToolboxTests/PersianDateTimeTests.cs
+++ src/FarsiToolboxTests/PersianDateTimeTests.cs
@@ -424,5 +424,12 @@
         {
             Assert.Equal(expected, pdt1.CompareTo(pdt2));
         }
+
+        [Theory]
+        [PropertyData("PersianDateTimeAndPersianDateTimeCompareToTest")]
+        public void PersianDateTimeComopare(PersianDateTime pdt1, PersianDateTime pdt2, int expected)
+        {
+            Assert.Equal(expected, PersianDateTime.Compare(pdt1, pdt2));
+        }
     }
 }


Fixes RunProgramTask when ProudtRootDir is not set

--- src/FlubuCore/Tasks/Process/RunProgramTask.cs
+++ src/FlubuCore/Tasks/Process/RunProgramTask.cs
@@ -204,7 +204,7 @@
             if (_commandFactory == null)
                 _commandFactory = new CommandFactory();

-            string rootDir = context.Properties.Get<string>(PredefinedBuildProperties.ProductRootDir);
+            string rootDir = context.Properties.TryGet<string>(BuildProps.ProductRootDir, defaultValue: ".");

             FileInfo info = new FileInfo(_programToExecute);


Add new C# 9 nullable attributes

Add new C# 9 nullable attributes

--- src/Framework/Framework/NullableAttributes.cs
+++ src/Framework/Framework/NullableAttributes.cs
@@ -1,6 +1,6 @@
-#if CSharp8Polyfill
 namespace System.Diagnostics.CodeAnalysis
 {
+#if CSharp8Polyfill
     /// Specifies that null is allowed as an input even if the corresponding type disallows it.
     [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property, Inherited = false)]
 #if INTERNAL_NULLABLE_ATTRIBUTES
@@ -122,5 +122,63 @@
         /// Gets the condition parameter value.
         public bool ParameterValue { get; }
     }
+
+        /// Specifies that the method or property will ensure that the listed field and property members have not-null values.
+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
+    internal sealed class MemberNotNullAttribute : Attribute
+    {
+        /// Initializes the attribute with a field or property member.
+        /// <param name="member">
+        /// The field or property member that is promised to be not-null.
+        /// </param>
+        public MemberNotNullAttribute(string member) => Members = new[] { member };
+
+        /// Initializes the attribute with the list of field and property members.
+        /// <param name="members">
+        /// The list of field and property members that are promised to be not-null.
+        /// </param>
+        public MemberNotNullAttribute(params string[] members) => Members = members;
+
+        /// Gets field or property member names.
+        public string[] Members { get; }
+    }
+
+#endif
+
+    /// Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+    [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
+    internal sealed class MemberNotNullWhenAttribute : Attribute
+    {
+        /// Initializes the attribute with the specified return value condition and a field or property member.
+        /// <param name="returnValue">
+        /// The return value condition. If the method returns this value, the associated parameter will not be null.
+        /// </param>
+        /// <param name="member">
+        /// The field or property member that is promised to be not-null.
+        /// </param>
+        public MemberNotNullWhenAttribute(bool returnValue, string member)
+        {
+            ReturnValue = returnValue;
+            Members = new[] { member };
+        }
+
+        /// Initializes the attribute with the specified return value condition and list of field and property members.
+        /// <param name="returnValue">
+        /// The return value condition. If the method returns this value, the associated parameter will not be null.
+        /// </param>
+        /// <param name="members">
+        /// The list of field and property members that are promised to be not-null.
+        /// </param>
+        public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
+        {
+            ReturnValue = returnValue;
+            Members = members;
+        }
+
+        /// Gets the return value condition.
+        public bool ReturnValue { get; }
+
+        /// Gets field or property member names.
+        public string[] Members { get; }
+    }
 }
-#endif


Add an option to enable handling of help on empty invocations

--- src/Konsola/Parser/ContextOptionsAttribute.cs
+++ src/Konsola/Parser/ContextOptionsAttribute.cs
@@ -14,6 +14,11 @@
 		public string Description { get; set; }

 		/// <summary>
+		/// Gets or sets a value indicating whether to handle empty program invocations as help.
+		/// </summary>
+		public bool HandleEmptyInvocationAsHelp { get; set; }
+
+		/// <summary>
 		/// Gets or sets a value indicating whether to invoke the special methods after parsing.
 		/// </summary>
 		public bool InvokeMethods { get; set; }


Fix default implementation of TransformToExternalPath (#2296)

* Ensure only a single slash as separator in default implementation of TransformToExternalPath.

* Handle null strings.

* Ensure transformed path always starts with a '/'

--- src/NSwag.AspNetCore/SwaggerUiSettingsBase.cs
+++ src/NSwag.AspNetCore/SwaggerUiSettingsBase.cs
@@ -35,9 +35,7 @@
         public SwaggerUiSettingsBase()
         {
             TransformToExternalPath = (internalUiRoute, request) =>
-            {
-                return request.GetBasePath() + internalUiRoute;
-            };
+                '/' + (request.GetBasePath()?.TrimEnd('/') + '/' + internalUiRoute?.TrimStart('/')).Trim('/');
         }

         /// <summary>Gets or sets the internal swagger UI route (must start with '/').</summary>


Format file.

Format file.

--- src/NadekoBot/Services/Database/UnitOfWork.cs
+++ src/NadekoBot/Services/Database/UnitOfWork.cs
@@ -3,118 +3,87 @@
 using Mitternacht.Services.Database.Repositories;
 using Mitternacht.Services.Database.Repositories.Impl;

-namespace Mitternacht.Services.Database
-{
-    public class UnitOfWork : IUnitOfWork
-    {
-        public NadekoContext Context { get; }
+namespace Mitternacht.Services.Database {
+	public class UnitOfWork : IUnitOfWork {
+		public NadekoContext Context { get; }

-        private IQuoteRepository _quotes;
-        public IQuoteRepository Quotes => _quotes ??= new QuoteRepository(Context);
+		private IQuoteRepository                _quotes;
+		public  IQuoteRepository                Quotes => _quotes ??= new QuoteRepository(Context);
+		private IGuildConfigRepository          _guildConfigs;
+		public  IGuildConfigRepository          GuildConfigs => _guildConfigs ??= new GuildConfigRepository(Context);
+		private IDonatorsRepository             _donators;
+		public  IDonatorsRepository             Donators => _donators ??= new DonatorsRepository(Context);
+		private IClashOfClansRepository         _clashOfClans;
+		public  IClashOfClansRepository         ClashOfClans => _clashOfClans ??= new ClashOfClansRepository(Context);
+		private IReminderRepository             _reminders;
+		public  IReminderRepository             Reminders => _reminders ??= new ReminderRepository(Context);
+		private ISelfAssignedRolesRepository    _selfAssignedRoles;
+		public  ISelfAssignedRolesRepository    SelfAssignedRoles => _selfAssignedRoles ??= new SelfAssignedRolesRepository(Context);
+		private IBotConfigRepository            _botConfig;
+		public  IBotConfigRepository            BotConfig => _botConfig ??= new BotConfigRepository(Context);
+		private ICurrencyRepository             _currency;
+		public  ICurrencyRepository             Currency => _currency ??= new CurrencyRepository(Context);
+		private ICurrencyTransactionsRepository _currencyTransactions;
+		public  ICurrencyTransactionsRepository CurrencyTransactions => _currencyTransactions ??= new CurrencyTransactionsRepository(Context);
+		private IUnitConverterRepository        _conUnits;
+		public  IUnitConverterRepository        ConverterUnits => _conUnits ??= new UnitConverterRepository(Context);
+		private IMusicPlaylistRepository        _musicPlaylists;
+		public  IMusicPlaylistRepository        MusicPlaylists => _musicPlaylists ??= new MusicPlaylistRepository(Context);
+		private ICustomReactionRepository       _customReactions;
+		public  ICustomReactionRepository       CustomReactions => _customReactions ??= new CustomReactionsRepository(Context);
+		private IPokeGameRepository             _pokegame;
+		public  IPokeGameRepository             PokeGame => _pokegame ??= new PokeGameRepository(Context);
+		private IWaifuRepository                _waifus;
+		public  IWaifuRepository                Waifus => _waifus ??= new WaifuRepository(Context);
+		private IDiscordUserRepository          _discordUsers;
+		public  IDiscordUserRepository          DiscordUsers => _discordUsers ??= new DiscordUserRepository(Context);
+		private IWarningsRepository             _warnings;
+		public  IWarningsRepository             Warnings => _warnings ??= new WarningsRepository(Context);
+		private ILevelModelRepository           _levelmodel;
+		public  ILevelModelRepository           LevelModel => _levelmodel ??= new LevelModelRepository(Context, this);
+		private IDailyMoneyRepository           _dailymoney;
+		public  IDailyMoneyRepository           DailyMoney => _dailymoney ??= new DailyMoneyRepository(Context);
+		private IRoleMoneyRepository            _rolemoney;
+		public  IRoleMoneyRepository            RoleMoney => _rolemoney ??= new RoleMoneyRepository(Context);
+		private IRoleLevelBindingRepository     _rolelevelbinding;
+		public  IRoleLevelBindingRepository     RoleLevelBinding => _rolelevelbinding ??= new RoleLevelBindingRepository(Context);
+		private IMessageXpBlacklist             _messagexpblacklist;
+		public  IMessageXpBlacklist             MessageXpBlacklist => _messagexpblacklist ??= new MessageXpBlacklist(Context);
+		private IVerifiedUserRepository         _verifiedusers;
+		public  IVerifiedUserRepository         VerifiedUsers => _verifiedusers ??= new VerifiedUserRepository(Context);
+		private IUsernameHistoryRepository      _usernamehistory;
+		public  IUsernameHistoryRepository      UsernameHistory => _usernamehistory ??= new UsernameHistoryRepository(Context);
+		private INicknameHistoryRepository      _nicknamehistory;
+		public  INicknameHistoryRepository      NicknameHistory => _nicknamehistory ??= new NicknameHistoryRepository(Context);
+		private IBirthDateRepository            _birthdates;
+		public  IBirthDateRepository            BirthDates => _birthdates ??= new BirthDateRepository(Context);
+		private IDailyMoneyStatsRepository      _dailyMoneyStats;
+		public  IDailyMoneyStatsRepository      DailyMoneyStats => _dailyMoneyStats ??= new DailyMoneyStatsRepository(Context);
+		private IVoiceChannelStatsRepository    _voiceChannelStats;
+		public  IVoiceChannelStatsRepository    VoiceChannelStats => _voiceChannelStats ??= new VoiceChannelStatsRepository(Context);
+		private ITeamUpdateRankRepository       _teamUpdateRank;
+		public  ITeamUpdateRankRepository       TeamUpdateRank => _teamUpdateRank ??= new TeamUpdateRankRepository(Context);

-        private IGuildConfigRepository _guildConfigs;
-        public IGuildConfigRepository GuildConfigs => _guildConfigs ??= new GuildConfigRepository(Context);
+		public UnitOfWork(NadekoContext context) {
+			Context = context;
+		}

-        private IDonatorsRepository _donators;
-        public IDonatorsRepository Donators => _donators ??= new DonatorsRepository(Context);
+		public int Complete()
+			=> Context.SaveChanges();

-        private IClashOfClansRepository _clashOfClans;
-        public IClashOfClansRepository ClashOfClans => _clashOfClans ??= new ClashOfClansRepository(Context);
+		public Task<int> CompleteAsync()
+			=> Context.SaveChangesAsync();

-        private IReminderRepository _reminders;
-        public IReminderRepository Reminders => _reminders ??= new ReminderRepository(Context);
+		private bool _disposed;

-        private ISelfAssignedRolesRepository _selfAssignedRoles;
-        public ISelfAssignedRolesRepository SelfAssignedRoles => _selfAssignedRoles ??= new SelfAssignedRolesRepository(Context);
+		protected void Dispose(bool disposing) {
+			if(!_disposed && disposing) Context.Dispose();
+			_disposed = true;
+		}

-        private IBotConfigRepository _botConfig;
-        public IBotConfigRepository BotConfig => _botConfig ??= new BotConfigRepository(Context);
-
-        private ICurrencyRepository _currency;
-        public ICurrencyRepository Currency => _currency ??= new CurrencyRepository(Context);
-
-        private ICurrencyTransactionsRepository _currencyTransactions;
-        public ICurrencyTransactionsRepository CurrencyTransactions => _currencyTransactions ??= new CurrencyTransactionsRepository(Context);
-
-        private IUnitConverterRepository _conUnits;
-        public IUnitConverterRepository ConverterUnits => _conUnits ??= new UnitConverterRepository(Context);
-
-        private IMusicPlaylistRepository _musicPlaylists;
-        public IMusicPlaylistRepository MusicPlaylists => _musicPlaylists ??= new MusicPlaylistRepository(Context);
-
-        private ICustomReactionRepository _customReactions;
-        public ICustomReactionRepository CustomReactions => _customReactions ??= new CustomReactionsRepository(Context);
-
-        private IPokeGameRepository _pokegame;
-        public IPokeGameRepository PokeGame => _pokegame ??= new PokeGameRepository(Context);
-
-        private IWaifuRepository _waifus;
-        public IWaifuRepository Waifus => _waifus ??= new WaifuRepository(Context);
-
-        private IDiscordUserRepository _discordUsers;
-        public IDiscordUserRepository DiscordUsers => _discordUsers ??= new DiscordUserRepository(Context);
-
-        private IWarningsRepository _warnings;
-        public IWarningsRepository Warnings => _warnings ??= new WarningsRepository(Context);
-
-        private ILevelModelRepository _levelmodel;
-        public ILevelModelRepository LevelModel => _levelmodel ??= new LevelModelRepository(Context, this);
-
-        private IDailyMoneyRepository _dailymoney;
-        public IDailyMoneyRepository DailyMoney => _dailymoney ??= new DailyMoneyRepository(Context);
-
-        private IRoleMoneyRepository _rolemoney;
-        public IRoleMoneyRepository RoleMoney => _rolemoney ??= new RoleMoneyRepository(Context);
-
-        private IRoleLevelBindingRepository _rolelevelbinding;
-        public IRoleLevelBindingRepository RoleLevelBinding => _rolelevelbinding ??= new RoleLevelBindingRepository(Context);
-
-        private IMessageXpBlacklist _messagexpblacklist;
-        public IMessageXpBlacklist MessageXpBlacklist => _messagexpblacklist ??= new MessageXpBlacklist(Context);
-
-        private IVerifiedUserRepository _verifiedusers;
-        public IVerifiedUserRepository VerifiedUsers => _verifiedusers ??= new VerifiedUserRepository(Context);
-
-        private IUsernameHistoryRepository _usernamehistory;
-        public IUsernameHistoryRepository UsernameHistory => _usernamehistory ??= new UsernameHistoryRepository(Context);
-
-        private INicknameHistoryRepository _nicknamehistory;
-        public INicknameHistoryRepository NicknameHistory => _nicknamehistory ??= new NicknameHistoryRepository(Context);
-
-        private IBirthDateRepository _birthdates;
-        public IBirthDateRepository BirthDates => _birthdates ??= new BirthDateRepository(Context);
-
-        private IDailyMoneyStatsRepository _dailyMoneyStats;
-        public IDailyMoneyStatsRepository DailyMoneyStats => _dailyMoneyStats ??= new DailyMoneyStatsRepository(Context);
-
-        private IVoiceChannelStatsRepository _voiceChannelStats;
-        public IVoiceChannelStatsRepository VoiceChannelStats => _voiceChannelStats ??= new VoiceChannelStatsRepository(Context);
-
-        private ITeamUpdateRankRepository _teamUpdateRank;
-        public ITeamUpdateRankRepository TeamUpdateRank => _teamUpdateRank ??= new TeamUpdateRankRepository(Context);
-
-        public UnitOfWork(NadekoContext context)
-        {
-            Context = context;
-        }
-
-        public int Complete() =>
-            Context.SaveChanges();
-
-        public Task<int> CompleteAsync() =>
-            Context.SaveChangesAsync();
-
-        private bool _disposed;
-
-        protected void Dispose(bool disposing) {
-            if (!_disposed && disposing) Context.Dispose();
-            _disposed = true;
-        }
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-    }
+		public void Dispose() {
+			Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+	}
 }


Fix the build

Fix the build

--- src/OmniSharp/AspNet5/AspNet5ProjectSystem.cs
+++ src/OmniSharp/AspNet5/AspNet5ProjectSystem.cs
@@ -13,7 +13,9 @@
 using Microsoft.Framework.DesignTimeHost.Models;
 using Microsoft.Framework.DesignTimeHost.Models.IncomingMessages;
 using Microsoft.Framework.DesignTimeHost.Models.OutgoingMessages;
+#if ASPNET50
 using Microsoft.Framework.FileSystemGlobbing;
+#endif
 using Microsoft.Framework.Logging;
 using Microsoft.Framework.OptionsModel;
 using Newtonsoft.Json.Linq;
@@ -528,10 +530,16 @@
             }
             else
             {
+#if ASPNET50
                 var matcher = new Matcher();
                 matcher.AddIncludePatterns(_options.AspNet5.Projects.Split(';'));
-
+
                 foreach (var path in matcher.GetResultsInFullPath(_env.Path))
+#else
+                // The matcher works on CoreCLR but Omnisharp still targets aspnetcore50 instead of
+                // dnxcore50
+                foreach (var path in Directory.EnumerateFiles(_env.Path, "project.json", SearchOption.AllDirectories))
+#endif
                 {
                     string projectFile = null;


BUG: Date conversion exceptions

BUG: Date conversion exceptions

changed to tryparse

--- src/OpenProtocolInterpreter/MIDs/DataField.cs
+++ src/OpenProtocolInterpreter/MIDs/DataField.cs
@@ -89,11 +89,11 @@

         public System.DateTime ToDateTime()
         {
-            System.DateTime convertedValue = System.DateTime.MinValue;
-            if (this.Value != null)
+            System.DateTime convertedValue = System.DateTime.Now;
+            if (!string.IsNullOrWhiteSpace(this.Value.ToString()))
             {
                 var date = this.Value.ToString();
-                convertedValue = System.Convert.ToDateTime(date.Substring(0, 10) + " " + date.Substring(11, 8));
+                System.DateTime.TryParse(date.Substring(0, 10) + " " + date.Substring(11, 8), out convertedValue);
             }
             return convertedValue;
         }


bug fix

bug fix

--HG--
branch : dev

--- src/Orchard/Commands/DefaultCommandManager.cs
+++ src/Orchard/Commands/DefaultCommandManager.cs
@@ -18,7 +18,7 @@
             // Workaround autofac integration: module registration is currently run twice...
             //if (matches.Count() == 1) {
             //  var match = matches.Single();
-            if (matches.Count() == 2) {
+            if (matches.Count() == 1 || matches.Count() == 2) {
                 var match = matches.First();
                 match.CommandHandlerFactory().Execute(match.Context);
             }


Fixed reference to jquery.signalR.js script in QuickSearch.cshtml.

--- src/PQDashboard/Views/Main/QuickSearch.cshtml
+++ src/PQDashboard/Views/Main/QuickSearch.cshtml
@@ -87,7 +87,7 @@

     <script type="text/javascript" src="~/Scripts/jquery-3.3.1.js"></script>
     <script type="text/javascript" src="~/Scripts/jquery-ui.js"></script>
-    <script src="~/Scripts/jquery.signalR-2.2.0.js"></script>
+    <script src="~/Scripts/jquery.signalR.js"></script>
     <script type="text/javascript" src="~/Scripts/jquery.blockUI.js"></script>
     <script type="text/javascript" src="~/Scripts/bootstrap-3.3.2.min.js"></script>
     <script type="text/javascript" src="~/Scripts/PrimeUI/primeui.js"></script>


code cleanup

code cleanup

--- src/Peachpie.Runtime/Context.Configuration.cs
+++ src/Peachpie.Runtime/Context.Configuration.cs
@@ -180,7 +180,7 @@

     partial class Context
     {
-        #region StaticPhpConfigurationService, PhpConfigurationService
+        #region DefaultPhpConfigurationService, PhpConfigurationService

         class DefaultPhpConfigurationService : IPhpConfigurationService
         {
@@ -238,7 +238,7 @@
         /// Gets a service providing access to current runtime configuration.
         /// </summary>
         public virtual IPhpConfigurationService Configuration => _configuration;
-        readonly PhpConfigurationService _configuration = new PhpConfigurationService();
+        readonly IPhpConfigurationService _configuration = new PhpConfigurationService();

         /// <summary>
         /// Registers a configuration to be accessed through <see cref="IPhpConfigurationService.Get{TOptions}"/> with default values.


Added missing db boolean conversion

Added missing db boolean conversion

--- src/Quartz/Impl/AdoJobStore/StdAdoDelegate.cs
+++ src/Quartz/Impl/AdoJobStore/StdAdoDelegate.cs
@@ -522,7 +522,7 @@
                 AddCommandParameter(cmd, 3, "jobDurable", GetDbBooleanValue(job.Durable));
                 AddCommandParameter(cmd, 4, "jobVolatile", GetDbBooleanValue(job.Volatile));
                 AddCommandParameter(cmd, 5, "jobStateful", GetDbBooleanValue(job.Stateful));
-                AddCommandParameter(cmd, 6, "jobRequestsRecovery", job.RequestsRecovery);
+                AddCommandParameter(cmd, 6, "jobRequestsRecovery", GetDbBooleanValue(job.RequestsRecovery));
                 AddCommandParameter(cmd, 7, "jobDataMap", baos, dbProvider.Metadata.DbBinaryType);
                 AddCommandParameter(cmd, 8, "jobName", job.Name);
                 AddCommandParameter(cmd, 9, "jobGroup", job.Group);


Migrate threads to tasks

Migrate threads to tasks

--- src/ResXManager.Model/CodeReferenceTracker.cs
+++ src/ResXManager.Model/CodeReferenceTracker.cs
@@ -4,17 +4,15 @@
     using System.Collections.Generic;
     using System.Composition;
     using System.Diagnostics;
-    using System.Globalization;
     using System.IO;
     using System.Linq;
     using System.Text.RegularExpressions;
     using System.Threading;
+    using System.Threading.Tasks;

     using ResXManager.Infrastructure;

     using TomsToolbox.Essentials;
-
-    using ThreadState = System.Threading.ThreadState;

     [Export, Shared]
     public class CodeReferenceTracker
@@ -48,7 +46,9 @@

         private sealed class Engine : IDisposable
         {
-            private readonly Thread _backgroundThread;
+            private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
+            private readonly CancellationToken _cancellationToken;
+
             private long _total;
             private long _visited;

@@ -56,16 +56,12 @@

             public Engine(CodeReferenceConfiguration configuration, ICollection<ProjectFile> sourceFiles, ICollection<ResourceTableEntry> resourceTableEntries, ITracer tracer)
             {
-                _backgroundThread = new Thread(() => FindCodeReferences(configuration, sourceFiles, resourceTableEntries, tracer))
-                {
-                    IsBackground = true,
-                    Priority = ThreadPriority.Lowest
-                };
-
-                _backgroundThread.Start();
-            }
-
-            private void FindCodeReferences(CodeReferenceConfiguration configuration, ICollection<ProjectFile> projectFiles, ICollection<ResourceTableEntry> resourceTableEntries, ITracer tracer)
+                _cancellationToken = _cancellationTokenSource.Token;
+
+                Task.Run(async () => await FindCodeReferences(configuration, sourceFiles, resourceTableEntries, tracer).ConfigureAwait(false), _cancellationToken);
+            }
+
+            private async Task FindCodeReferences(CodeReferenceConfiguration configuration, ICollection<ProjectFile> projectFiles, ICollection<ResourceTableEntry> resourceTableEntries, ITracer tracer)
             {
                 var stopwatch = Stopwatch.StartNew();

@@ -77,25 +73,22 @@

                     var keys = new HashSet<string>(resourceTableEntries.Select(entry => entry.Key));

-                    var sourceFiles = projectFiles.AsParallel()
-                        .Select(file => new FileInfo(file, configuration.Items, keys, ref _visited))
+                    var sourceFileTasks = projectFiles
+                        .Select(file => Task.Run(() => new FileInfo(file, configuration.Items, keys, ref _visited), _cancellationToken));
+
+                    var sourceFiles = (await Task.WhenAll(sourceFileTasks).ConfigureAwait(false))
                         .Where(file => file.HasConfigurations)
-                        .ToArray();
-
-                    var keyFilesLookup = sourceFiles.Aggregate(new Dictionary<string, HashSet<FileInfo>>(),
-                        (accumulator, file) =>
-                        {
-                            // ReSharper disable PossibleNullReferenceException
-                            file.Keys.ForEach(key => accumulator.ForceValue(key, _ => new HashSet<FileInfo>()).Add(file));
-                            // ReSharper restore PossibleNullReferenceException
-                            return accumulator;
-                        });
-
-                    resourceTableEntries.AsParallel().ForAll(entry =>
+                        .ToList();
+
+                    var keyFilesLookup = new Dictionary<string, HashSet<FileInfo>>();
+
+                    sourceFiles.ForEach(file => file.Keys.ForEach(key => keyFilesLookup.ForceValue(key, _ => new HashSet<FileInfo>()).Add(file)));
+
+                    void FindReferences(ResourceTableEntry entry,  IDictionary<string, HashSet<FileInfo>> keyFiles)
                     {
                         var key = entry.Key;

-                        var files = keyFilesLookup.GetValueOrDefault(key);
+                        var files = keyFiles.GetValueOrDefault(key);

                         var references = new List<CodeReference>();

@@ -104,11 +97,15 @@
                         entry.CodeReferences = references.AsReadOnly();

                         Interlocked.Increment(ref _visited);
-                    });
+                    }
+
+                    var lookupTasks = resourceTableEntries.Select(entry => Task.Run(() => FindReferences(entry, keyFilesLookup), _cancellationToken));
+
+                    await Task.WhenAll(lookupTasks).ConfigureAwait(false);

                     Debug.WriteLine(stopwatch.Elapsed);
                 }
-                catch (ThreadAbortException)
+                catch (OperationCanceledException)
                 {
                 }
                 finally
@@ -119,10 +116,8 @@

             public void Dispose()
             {
-                if (_backgroundThread.ThreadState == ThreadState.Background)
-                {
-                    _backgroundThread.Abort();
-                }
+                _cancellationTokenSource.Cancel(true);
+                _cancellationTokenSource.Dispose();
             }
         }

@@ -216,7 +211,6 @@
                     _lines.ForEach((line, index) =>
                         _regex.Split(line)
                             .Where(keys.Contains)
-                            // ReSharper disable once PossibleNullReferenceException
                             .ForEach(key => _keyLinesLookup.ForceValue(key, _ => new HashSet<int>()).Add(index)));
                 }


18: GetAttrValueOrDefault()

18: GetAttrValueOrDefault()

--- src/SharpConnect.Data/TreeModel/EsDataImpl.cs
+++ src/SharpConnect.Data/TreeModel/EsDataImpl.cs
@@ -180,6 +180,30 @@

     public static class EsElemExtensionMethods
     {
+        public static string GetAttrValueOrDefaultAsString(this EsElem esElem, string attrName)
+        {
+
+            return esElem.GetAttributeValue(attrName) as string;
+        }
+        public static int GetAttrValueOrDefaultAsInt32(this EsElem esElem, string attrName)
+        {
+            object value = esElem.GetAttributeValue(attrName);
+            if (value == null)
+            {
+                return 0;
+            }
+            return (int)value;
+        }
+        public static bool GetAttrValueOrDefaultAsBool(this EsElem esElem, string attrName)
+        {
+            object value = esElem.GetAttributeValue(attrName);
+            if (value == null)
+            {
+                return false;
+            }
+            return (bool)value;
+        }
+        //-----------------------------------------------------------------------
         public static string GetAttributeValueAsString(this EsElem esElem, string attrName)
         {
             return esElem.GetAttributeValue(attrName) as string;


formatting

formatting

--- src/Site/ViewModels/Releases/ShowViewModel.cs
+++ src/Site/ViewModels/Releases/ShowViewModel.cs
@@ -4,19 +4,19 @@
 namespace RimDev.Releases.ViewModels.Releases
 {
     public class ShowViewModel
-	{
-		public ShowViewModel(GitHubRepository currentRepository)
-		{
+    {
+        public ShowViewModel(GitHubRepository currentRepository)
+        {
             Releases = new List<ReleaseViewModel>();

             CurrentRepository = currentRepository;
         }
-
-		public GitHubRepository CurrentRepository { get;set; }
-		public AppSettings AppSettings {get;set;}
-		public IList<ReleaseViewModel> Releases {get;set;}
-
-		public int Page { get; set; }
+
+        public GitHubRepository CurrentRepository { get; set; }
+        public AppSettings AppSettings { get; set; }
+        public IList<ReleaseViewModel> Releases { get; set; }
+
+        public int Page { get; set; }
         public int PageSize { get; set; }

         public int? NextPage { get; set; }
@@ -24,7 +24,7 @@
         public int LastPage { get; set; }

         public int FirstPage { get; set; }
-	}
+    }

-
+
 }


Format date on ContentSchedule so it works across server date-time settings.

--- uSync8.ContentEdition/Serializers/ContentSerializer.cs
+++ uSync8.ContentEdition/Serializers/ContentSerializer.cs
@@ -120,10 +120,10 @@
                 foreach (var schedule in schedules.OrderBy(x => x.Id))
                 {
                     node.Add(new XElement("ContentSchedule",
-                        new XAttribute("Key", schedule.Id),
+                        // new XAttribute("Key", schedule.Id),
                         new XElement("Culture", schedule.Culture),
                         new XElement("Action", schedule.Action),
-                        new XElement("Date", schedule.Date)));
+                        new XElement("Date", schedule.Date.ToString("s"))));
                 }
             }


Revert the change to DesignerAttributeIncrementalAnalyzer to bail out for active file analysis scope.

--- src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs
+++ src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs
@@ -11,7 +11,6 @@
 using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
 using Microsoft.CodeAnalysis.Options;
 using Microsoft.CodeAnalysis.Shared.Extensions;
-using Microsoft.CodeAnalysis.Shared.Options;
 using Microsoft.CodeAnalysis.Shared.TestHooks;
 using Microsoft.CodeAnalysis.SolutionCrawler;
 using Microsoft.CodeAnalysis.Versions;
@@ -76,9 +75,7 @@

             cancellationToken.ThrowIfCancellationRequested();

-            // TODO: Update the logic for this analyzer to work at file level instead of project level.
-            if (!document.Project.Solution.Workspace.Options.GetOption(InternalFeatureOnOffOptions.DesignerAttributes) ||
-                SolutionCrawlerOptions.GetBackgroundAnalysisScope(document.Project) == BackgroundAnalysisScope.ActiveFile)
+            if (!document.Project.Solution.Workspace.Options.GetOption(InternalFeatureOnOffOptions.DesignerAttributes))
             {
                 return;
             }


Use attributes consistently in tests

Use attributes consistently in tests

--- src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs
+++ src/Analyzers/CSharp/Tests/UseCollectionInitializer/UseCollectionInitializerTests.cs
@@ -17,6 +17,7 @@
         CSharpUseCollectionInitializerDiagnosticAnalyzer,
         CSharpUseCollectionInitializerCodeFixProvider>;

+    [Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
     public partial class UseCollectionInitializerTests
     {
         private static async Task TestInRegularAndScriptAsync(string testCode, string fixedCode, OutputKind outputKind = OutputKind.DynamicallyLinkedLibrary)
@@ -45,7 +46,7 @@
             await test.RunAsync();
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestOnVariableDeclarator()
         {
             await TestInRegularAndScriptAsync(
@@ -73,7 +74,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestIndexAccess1()
         {
             await TestInRegularAndScriptAsync(
@@ -101,7 +102,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestIndexAccess1_NotInCSharp5()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -117,7 +118,7 @@
 }", LanguageVersion.CSharp5);
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestComplexIndexAccess1()
         {
             await TestInRegularAndScriptAsync(
@@ -167,7 +168,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestIndexAccess2()
         {
             await TestInRegularAndScriptAsync(
@@ -197,7 +198,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestIndexAccess3()
         {
             await TestInRegularAndScriptAsync(
@@ -251,7 +252,7 @@
 ");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestIndexFollowedByInvocation()
         {
             await TestInRegularAndScriptAsync(
@@ -281,7 +282,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestInvocationFollowedByIndex()
         {
             await TestInRegularAndScriptAsync(
@@ -311,7 +312,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestWithInterimStatement()
         {
             await TestInRegularAndScriptAsync(
@@ -347,7 +348,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestMissingBeforeCSharp3()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -363,7 +364,7 @@
 }", LanguageVersion.CSharp2);
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestMissingOnNonIEnumerable()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -381,7 +382,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestMissingOnNonIEnumerableEvenWithAdd()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -401,7 +402,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestWithCreationArguments()
         {
             await TestInRegularAndScriptAsync(
@@ -429,7 +430,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestOnAssignmentExpression()
         {
             await TestInRegularAndScriptAsync(
@@ -459,7 +460,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestMissingOnRefAdd()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -484,7 +485,7 @@
 ");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestComplexInitializer()
         {
             await TestInRegularAndScriptAsync(
@@ -514,7 +515,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestNotOnNamedArg()
         {
             await TestMissingInRegularAndScriptAsync(
@@ -530,7 +531,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(39146, "https://github.com/dotnet/roslyn/issues/39146")]
         public async Task TestWithExistingInitializer()
         {
@@ -563,7 +564,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(39146, "https://github.com/dotnet/roslyn/issues/39146")]
         public async Task TestWithExistingInitializerWithComma()
         {
@@ -596,7 +597,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestFixAllInDocument1()
         {
             await TestInRegularAndScriptAsync(
@@ -634,7 +635,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestFixAllInDocument2()
         {
             await TestInRegularAndScriptAsync(
@@ -695,7 +696,7 @@
 ");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestFixAllInDocument3()
         {
             await new VerifyCS.Test
@@ -758,7 +759,7 @@
             }.RunAsync();
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestTrivia1()
         {
             await TestInRegularAndScriptAsync(
@@ -826,7 +827,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         public async Task TestComplexInitializer2()
         {
             await TestInRegularAndScriptAsync(
@@ -856,7 +857,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(16158, "https://github.com/dotnet/roslyn/issues/16158")]
         public async Task TestIncorrectAddName()
         {
@@ -893,7 +894,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(16241, "https://github.com/dotnet/roslyn/issues/16241")]
         public async Task TestNestedCollectionInitializer()
         {
@@ -913,7 +914,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17823, "https://github.com/dotnet/roslyn/issues/17823")]
         public async Task TestMissingWhenReferencedInInitializer()
         {
@@ -931,7 +932,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17823, "https://github.com/dotnet/roslyn/issues/17823")]
         public async Task TestWhenReferencedInInitializer_LocalVar()
         {
@@ -964,7 +965,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17823, "https://github.com/dotnet/roslyn/issues/17823")]
         public async Task TestWhenReferencedInInitializer_LocalVar2()
         {
@@ -983,7 +984,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(18260, "https://github.com/dotnet/roslyn/issues/18260")]
         public async Task TestWhenReferencedInInitializer_Assignment()
         {
@@ -1018,7 +1019,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(18260, "https://github.com/dotnet/roslyn/issues/18260")]
         public async Task TestWhenReferencedInInitializer_Assignment2()
         {
@@ -1037,7 +1038,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(18260, "https://github.com/dotnet/roslyn/issues/18260")]
         public async Task TestFieldReference()
         {
@@ -1055,7 +1056,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17853, "https://github.com/dotnet/roslyn/issues/17853")]
         public async Task TestMissingForDynamic()
         {
@@ -1072,7 +1073,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17953, "https://github.com/dotnet/roslyn/issues/17953")]
         public async Task TestMissingAcrossPreprocessorDirective()
         {
@@ -1092,7 +1093,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(17953, "https://github.com/dotnet/roslyn/issues/17953")]
         public async Task TestAvailableInsidePreprocessorDirective()
         {
@@ -1127,7 +1128,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(18242, "https://github.com/dotnet/roslyn/issues/18242")]
         public async Task TestObjectInitializerAssignmentAmbiguity()
         {
@@ -1160,7 +1161,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(18242, "https://github.com/dotnet/roslyn/issues/18242")]
         public async Task TestObjectInitializerCompoundAssignment()
         {
@@ -1193,7 +1194,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(19253, "https://github.com/dotnet/roslyn/issues/19253")]
         public async Task TestKeepBlankLinesAfter()
         {
@@ -1228,7 +1229,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(23672, "https://github.com/dotnet/roslyn/issues/23672")]
         public async Task TestMissingWithExplicitImplementedAddMethod()
         {
@@ -1249,7 +1250,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(47632, "https://github.com/dotnet/roslyn/issues/47632")]
         public async Task TestWhenReferencedInInitializerLeft()
         {
@@ -1282,7 +1283,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(47632, "https://github.com/dotnet/roslyn/issues/47632")]
         public async Task TestWithIndexerInInitializerLeft()
         {
@@ -1315,7 +1316,7 @@
 }");
         }

-        [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsUseCollectionInitializer)]
+        [Fact]
         [WorkItem(47632, "https://github.com/dotnet/roslyn/issues/47632")]
         public async Task TestWithImplicitObjectCreation()
         {


Filter out list views from the property type list

--- src/Umbraco.Web/Editors/DataTypeController.cs
+++ src/Umbraco.Web/Editors/DataTypeController.cs
@@ -287,14 +287,19 @@
             var datatypes = new List<DataTypeBasic>();

             //this is a very specific map - if a property editor does not have prevalue - and there is a datatype already using this type, return that.
+            //also, we exclude all the system listviews from the list
             var propertyEditors = PropertyEditorResolver.Current.PropertyEditors;
             foreach (var propertyEditor in propertyEditors)
             {
                 var hasPrevalues = propertyEditor.PreValueEditor.Fields.Any();
+
                 //if no prevalues and a datatype available
-                if(hasPrevalues == false && datadefs.Any(x => x.PropertyEditorAlias == propertyEditor.Alias))
+                var dataDef = datadefs.FirstOrDefault(x => x.PropertyEditorAlias == propertyEditor.Alias);
+                if(hasPrevalues == false && dataDef != null)
                 {
-                    datatypes.Add( Mapper.Map<DataTypeBasic>( datadefs.First(x => x.PropertyEditorAlias == propertyEditor.Alias) ));
+                    if (propertyEditor.Alias != Constants.PropertyEditors.ListViewAlias)
+                        datatypes.Add( Mapper.Map<DataTypeBasic>( dataDef ));
+
                 }else{

                     //else, just add a clean property editor


Register missing interface

Register missing interface

--- src/Umbraco.Web/Runtime/WebInitialComposer.cs
+++ src/Umbraco.Web/Runtime/WebInitialComposer.cs
@@ -291,6 +291,9 @@

             // Config manipulator
             composition.RegisterUnique<IConfigManipulator, XmlConfigManipulator>();
+
+            //ApplicationShutdownRegistry
+            composition.RegisterUnique<IApplicationShutdownRegistry, AspNetApplicationShutdownRegistry>();
         }
     }
 }


Put PDFReader inside try-catch block.

Put PDFReader inside try-catch block.

--- PDFDump/Program.cs
+++ PDFDump/Program.cs
@@ -51,12 +51,12 @@
         }

         public static string GetTextFromAllPages(String pdfPath)
-        {
-            PdfReader reader = new PdfReader(pdfPath);
+        {
             StringWriter output = new StringWriter();

             try
             {
+                PdfReader reader = new PdfReader(pdfPath);
                 for (int i = 1; i <= reader.NumberOfPages; i++)
                     output.WriteLine(PdfTextExtractor.GetTextFromPage(reader, i, new SimpleTextExtractionStrategy()));
                 return output.ToString();
@@ -64,7 +64,7 @@

             catch (Exception e)
             {
-                output.Write($"{pdfPath} was not able to be processed. Here is the error {e.Message}");
+                output.Write($"{pdfPath} was not able to be processed. The following exception was thrown: <{e.Message}>");
                 return output.ToString();
             }


Passed right parameters to setter.

Passed right parameters to setter.

--- src/WorkflowCore/Services/WorkflowExecutor.cs
+++ src/WorkflowCore/Services/WorkflowExecutor.cs
@@ -111,7 +111,7 @@

                         if (result.Proceed)
                         {
-                            ProcessOutputs(workflow, step, body);
+                            ProcessOutputs(workflow, step, body, context);
                         }

                         _executionResultProcessor.ProcessExecutionResult(workflow, def, pointer, step, result, wfResult);
@@ -176,15 +176,23 @@
             }
         }

-        private void ProcessOutputs(WorkflowInstance workflow, WorkflowStep step, IStepBody body)
+        private void ProcessOutputs(WorkflowInstance workflow, WorkflowStep step, IStepBody body, IStepExecutionContext context)
         {
             foreach (var output in step.Outputs)
             {
                 var resolvedValue = output.Source.Compile().DynamicInvoke(body);
                 var data = workflow.Data;
                 var setter = ExpressionHelpers.CreateSetter(output.Target);
-                var convertedValue = Convert.ChangeType(resolvedValue, setter.Parameters[1].Type);
-                setter.Compile().DynamicInvoke(data, convertedValue);
+                var convertedValue = Convert.ChangeType(resolvedValue, setter.Parameters.Last().Type);
+
+                if (setter.Parameters.Count == 2)
+                {
+                    setter.Compile().DynamicInvoke(data, convertedValue);
+                }
+                else
+                {
+                    setter.Compile().DynamicInvoke(data, context, convertedValue);
+                }
             }
         }


Remove Lazy

Remove Lazy

This was detritus left from an earlier refactoring: there used to
be a second constructor that set the underlying Lazy to something more
interesting, but now it's not needed anymore.

--- src/Workspaces/Core/Portable/Log/EtwLogger.cs
+++ src/Workspaces/Core/Portable/Log/EtwLogger.cs
@@ -16,17 +16,17 @@
     /// </summary>
     internal sealed class EtwLogger : ILogger
     {
-        private readonly Lazy<Func<FunctionId, bool>> _isEnabledPredicate;
+        private readonly Func<FunctionId, bool> _isEnabledPredicate;

         // Due to ETW specifics, RoslynEventSource.Instance needs to be initialized during EtwLogger construction
         // so that we can enable the listeners synchronously before any events are logged.
         private readonly RoslynEventSource _source = RoslynEventSource.Instance;

         public EtwLogger(Func<FunctionId, bool> isEnabledPredicate)
-            => _isEnabledPredicate = new Lazy<Func<FunctionId, bool>>(() => isEnabledPredicate);
+            => _isEnabledPredicate = isEnabledPredicate;

         public bool IsEnabled(FunctionId functionId)
-            => _source.IsEnabled() && _isEnabledPredicate.Value(functionId);
+            => _source.IsEnabled() && _isEnabledPredicate(functionId);

         public void Log(FunctionId functionId, LogMessage logMessage)
             => _source.Log(GetMessage(logMessage), functionId);


[tests] Fix XMake_Tests.ConfigurationInvalid for mono/osx

Use RunnerUtilities.PathToCurrentlyRunningMsBuildExe to get the actual
executable filename, instead of hardcoding `msbuild.exe`.

--- src/XMakeCommandLine/UnitTests/XMake_Tests.cs
+++ src/XMakeCommandLine/UnitTests/XMake_Tests.cs
@@ -592,8 +592,9 @@
                 Environment.SetEnvironmentVariable("MSBuildOldOM", "");

                 startDirectory = CopyMSBuild();
-                var newPathToMSBuildExe = Path.Combine(startDirectory, "msbuild.exe");
-                var pathToConfigFile = Path.Combine(startDirectory, "msbuild.exe.config");
+                var msbuildExeName = Path.GetFileName(RunnerUtilities.PathToCurrentlyRunningMsBuildExe);
+                var newPathToMSBuildExe = Path.Combine(startDirectory, msbuildExeName);
+                var pathToConfigFile = Path.Combine(startDirectory, msbuildExeName + ".config");

                 string configContent = @"<?xml version =""1.0""?>
                                             <configuration>


Changed default compression method

Changed default compression method

--- PPeXUI/formMain.cs
+++ PPeXUI/formMain.cs
@@ -40,7 +40,7 @@

         private void formMain_Load(object sender, EventArgs e)
         {
-            cmbCompression.SelectedIndex = 1;
+            cmbCompression.SelectedIndex = 2;
             cmbArchiveType.SelectedIndex = 0;
         }


Highlight default execution plan

Highlight default execution plan

--- source/Nuke.Common/Execution/ExecutionPlanHtmlService.cs
+++ source/Nuke.Common/Execution/ExecutionPlanHtmlService.cs
@@ -23,7 +23,7 @@
             var resourceText = ResourceUtility.GetResourceText<ExecutionPlanHtmlService>(c_htmlFileName);
             var contents = resourceText
                 .Replace("__GRAPH__", GetGraphDefinition(executableTargets))
-                .Replace("__EVENTS__", GetEventsDefinition(executableTargets));
+                .Replace("__EVENTS__", GetEvents(executableTargets));

             var path = Path.Combine(NukeBuild.TemporaryDirectory, c_htmlFileName);
             File.WriteAllText(path, contents);
@@ -61,22 +61,26 @@
             return builder.ToString();
         }

-        private static string GetEventsDefinition(IReadOnlyCollection<ExecutableTarget> executableTargets)
+        private static string GetEvents(IReadOnlyCollection<ExecutableTarget> executableTargets)
         {
             var builder = new StringBuilder();
-            builder.AppendLine($@"  $(""#{executableTargets.Single(x => x.IsDefault).Name}"").find('rect').addClass('defaultTarget');");
-
+
+            var defaultPlan = ExecutionPlanner.GetExecutionPlan(executableTargets, new[] { executableTargets.Single(x => x.IsDefault).Name });
+            defaultPlan.ForEach(x => builder.AppendLine($@"  $(""#{x.Name}"").addClass('highlight');"));
+
             foreach (var executableTarget in executableTargets)
             {
                 var executionPlan = ExecutionPlanner.GetExecutionPlan(executableTargets, new[] { executableTarget.Name });
                 builder
                     .AppendLine($@"  $(""#{executableTarget.Name}"").hover(")
                     .AppendLine("    function() {");
+                executableTargets.ForEach(x => builder.AppendLine($@"        $(""#{x.Name}"").removeClass('highlight');"));
                 executionPlan.ForEach(x => builder.AppendLine($@"        $(""#{x.Name}"").addClass('highlight');"));
                 builder
                     .AppendLine("    },")
                     .AppendLine("    function() {");
                 executionPlan.ForEach(x => builder.AppendLine($@"        $(""#{x.Name}"").removeClass('highlight');"));
+                defaultPlan.ForEach(x => builder.AppendLine($@"        $(""#{x.Name}"").addClass('highlight');"));
                 builder
                     .AppendLine("    });");
             }


Fix for alpha 4

Fix for alpha 4

--- PeepCam/PeepCam.cs
+++ PeepCam/PeepCam.cs
@@ -30,18 +30,10 @@
         {
             if (Input.GetKeyUp(KeyCode.Tab) && !_isWalking)
             {
-                GameController.Instance.enableVisibleMouseColliders();
-
-                Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
-
-                RaycastHit hit;
-
-                if (Physics.Raycast(ray, out hit, Mathf.Infinity))
+                if (Utility.getObjectBelowMouse().hitSomething)
                 {
-                    EnterHeadCam(hit.point + Vector3.up);
+                    EnterHeadCam(Utility.getObjectBelowMouse().hitPosition + Vector3.up);
                 }
-
-                GameController.Instance.disableMouseColliders();
             }
             else if (Input.GetKeyUp(KeyCode.Tab))
             {
@@ -82,8 +74,8 @@
             CharacterController cc = _headCam.AddComponent<CharacterController>();

             cc.radius = 0.1f;
-            cc.height = 0.5f;
-            cc.center = new Vector3(0, -0.5f, 0);
+            cc.height = 0.3f;
+            cc.center = new Vector3(0, -0.3f, 0);

             _headCam.transform.position = position;


Small fix for formatting in ConvertDoLoopWhileToDoWhileLoopCodeRefactoring.

--- RefactoringEssentials/VB/CodeRefactorings/ConvertDoLoopWhileToDoWhileLoopCodeRefactoringProvider.cs
+++ RefactoringEssentials/VB/CodeRefactorings/ConvertDoLoopWhileToDoWhileLoopCodeRefactoringProvider.cs
@@ -74,7 +74,7 @@
                             (SyntaxNode)parentBlockNode,
                             SyntaxFactory.DoLoopBlock(blockKindAfterConversion,
                                 SyntaxFactory.DoStatement(doKindAfterConversion, parentBlockNode.LoopStatement.WhileOrUntilClause),
-                                parentBlockNode.Statements, SyntaxFactory.SimpleLoopStatement())
+                                parentBlockNode.Statements, SyntaxFactory.SimpleLoopStatement().WithTrailingTrivia(parentBlockNode.LoopStatement.GetTrailingTrivia()))
                             .WithLeadingTrivia(parentBlockNode.GetLeadingTrivia())
                             .WithAdditionalAnnotations(Formatter.Annotation));
                         return Task.FromResult(document.WithSyntaxRoot(newRoot));


filesystem handler updated to new interface. Not completed

--- azurecopy/Handlers/FileSystemHandler.cs
+++ azurecopy/Handlers/FileSystemHandler.cs
@@ -27,22 +27,30 @@
     public class FileSystemHandler : IBlobHandler
     {
         private string baseUrl = null;
-        public FileSystemHandler(string url = null)
+        public FileSystemHandler(string url)
         {
             baseUrl = url;
         }

-        public void MoveBlob(string startUrl, string finishUrl)
+        /// <summary>
+        /// Move blob
+        /// </summary>
+        /// <param name="originContainer"></param>
+        /// <param name="destinationContainer"></param>
+        /// <param name="startBlobname"></param>
+        public void MoveBlob(string originContainer, string destinationContainer, string startBlobname)
         {
-
-
+            throw new NotImplementedException();
         }

-        // make container
-        // assumption being last part of url is the new container.
-        public void MakeContainer(string localFilePath)
+        /// <summary>
+        /// Make container/directory (depending on platform).
+        /// For local filesystem the containername is really a full path.
+        /// </summary>
+        /// <param name="container"></param>
+        public void MakeContainer(string containerName)
         {
-            Directory.CreateDirectory(localFilePath);
+            Directory.CreateDirectory( containerName);

         }

@@ -57,40 +65,53 @@
             throw new NotImplementedException("OverrideConfiguration not implemented yet");
         }

-        // we will NOT be using the cachedFilePath (since we're just reading the file from the local
-        // filesystem anyway).
-        // We will reference the file in the blob, but will make sure that the blob url type is set to local
-        // this will mean that any future cleaning of the cache will NOT try and erase the original file.
-        public Blob ReadBlob(string localFilePath, string cachedFilePath = "")
+        /// <summary>
+        /// Read blob.
+        /// For filesystem the containerName is really just the full path directory.
+        /// The blobName is the filename.
+        /// </summary>
+        /// <param name="containerName"></param>
+        /// <param name="blobName"></param>
+        /// <param name="cacheFilePath"></param>
+        /// <returns></returns>
+        public Blob ReadBlob(string containerName, string blobName, string cacheFilePath = "")
         {
-
             var blob = new Blob();
-            blob.BlobSavedToFile = false;
+            blob.BlobSavedToFile = false;   // false since we're not caching it elsewhere... but have it REALLY on FS.
             blob.BlobType = DestinationBlobType.Unknown;
-            blob.FilePath = localFilePath;
+            blob.FilePath = Path.Combine( string[]( containerName, blobName));
             blob.BlobOriginType = UrlType.Local;
             blob.BlobSavedToFile = true;
-
-            var uri = new Uri(localFilePath);
-
-            blob.Name = uri.Segments[uri.Segments.Length - 1];
+            blob.Name = blobName;
             return blob;
         }

-        public List<BasicBlobContainer> ListContainers(string baseUrl)
+        /// <summary>
+        /// List containers/directories off the root. For storage schemes that allow real directories maybe
+        /// the root will be
+        /// </summary>
+        /// <returns></returns>
+        public List<BasicBlobContainer> ListContainers(string root)
         {
             throw new NotImplementedException("Filesystem list containers not implemented");
         }

-        public void WriteBlob(string localFilePath, Blob blob,   int parallelUploadFactor=1, int chunkSizeInMB=4)
+        /// <summary>
+        /// Write blob
+        /// For FS the containerName is just the full path (excluding filename).
+        /// </summary>
+        /// <param name="container"></param>
+        /// <param name="blobName"></param>
+        /// <param name="blob"></param>
+        /// <param name="parallelUploadFactor"></param>
+        /// <param name="chunkSizeInMB"></param>
+        public void WriteBlob(string containerName, string blobName, Blob blob, int parallelUploadFactor = 1, int chunkSizeInMB = 4)
         {
             Stream stream = null;
-
             try
             {
-
-                var outFile = Path.Combine(localFilePath, blob.Name);
+                var outFile = Path.Combine(containerName, blob.Name);

                 // get stream to data.
                 if (blob.BlobSavedToFile)
@@ -106,7 +127,6 @@
                 {
                     stream.CopyTo(writeStream);
                 }
-
             }
             catch (ArgumentException ex)
             {
@@ -122,8 +142,24 @@
             }
         }

-        public List<BasicBlobContainer> ListBlobsInContainer(string baseUrl)
+        /// <summary>
+        /// Lists all blobs in a container.
+        /// Can be supplied a blobPrefix which basically acts as virtual directory options.
+        /// eg, if we have blobs called: "virt1/virt2/myblob"    and
+        ///                              "virt1/virt2/myblob2"
+        /// Although the blob names are the complete strings mentioned above, we might like to think that the blobs
+        /// are just called myblob and myblob2. We can supply a blobPrefix of "virt1/virt2/" which we can *think* of
+        /// as a directory, but again, its just really a prefix behind the scenes.
+        ///
+        /// For other sytems (not Azure) the blobPrefix might be real directories....  will need to investigate
+        /// </summary>
+        /// <param name="containerName"></param>
+        /// <param name="blobPrefix"></param>
+        /// <returns></returns>
+        public List<BasicBlobContainer> ListBlobsInContainer(string containerName = null, string blobPrefix = null)
         {
+
+            throw new NotImplementedException("Have implementation but is not valid anymore.");
             var fileList = new List<BasicBlobContainer>();

             var files = Directory.EnumerateFiles(baseUrl);
@@ -141,57 +177,7 @@

                 fileList.Add(f);
             }
-
             return fileList;
-
         }
-
-        public bool MatchHandler(string url)
-        {
-            return false;
-        }
-
-        // not passing url. Url will be generated behind the scenes.
-        public Blob ReadBlobSimple(string container, string blobName, string filePath = "")
-        {
-            if (baseUrl == null)
-            {
-                throw new ArgumentNullException("Constructor needs base url passed");
-            }
-
-            var url = baseUrl + "/" + container + "/" + blobName;
-            return ReadBlob(url, filePath);
-        }
-
-        // not passing url.
-        public void WriteBlobSimple(string container, Blob blob, int parallelUploadFactor = 1, int chunkSizeInMB = 4)
-        {
-            if (baseUrl == null)
-            {
-                throw new ArgumentNullException("Constructor needs base url passed");
-            }
-
-            var url = baseUrl + "/" + container + "/";
-            WriteBlob(url, blob, parallelUploadFactor, chunkSizeInMB);
-        }
-
-        // not required to pass full url.
-        public List<BasicBlobContainer> ListBlobsInContainerSimple(string container)
-        {
-            if (baseUrl == null)
-            {
-                throw new ArgumentNullException("Constructor needs base url passed");
-            }
-
-            var url = baseUrl + "/" + container + "/";
-            return ListBlobsInContainer(url);
-        }
-
-        public void MakeContainerSimple(string container)
-        {
-            throw new NotImplementedException("MakeContainerSimple not implemented");
-        }
-
-
     }
 }


ignore some model service tests

ignore some model service tests

--- test/GitHub.App.UnitTests/Models/ModelServiceTests.cs
+++ test/GitHub.App.UnitTests/Models/ModelServiceTests.cs
@@ -143,6 +143,7 @@
     public class TheGetAccountsMethod : TestBaseClass
     {
         [Test]
+        [Ignore("Skip this test as it will no longer be relevant with the GraphQL migration")]
         public async Task CanRetrieveAndCacheUserAndAccounts()
         {
             var orgs = new[]
@@ -172,6 +173,7 @@
         }

         [Test]
+        [Ignore("Skip this test as it will no longer be relevant with the GraphQL migration")]
         public async Task CanRetrieveUserFromCacheAndAccountsFromApi()
         {
             var orgs = new[]
@@ -223,6 +225,7 @@
     public class TheGetRepositoriesMethod : TestBaseClass
     {
         [Test]
+        [Ignore("Skip this test as it will no longer be relevant with the GraphQL migration")]
         public async Task CanRetrieveAndCacheRepositoriesForUserAndOrganizations()
         {
             var orgs = new[]


Add missing test

Add missing test

--- test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs
+++ test/Microsoft.Blazor.E2ETest/Tests/MonoSanityTest.cs
@@ -45,6 +45,17 @@
             Assert.Equal("TestTestTestTestTest", GetValue(Browser, "repeatStringResult"));
         }

+        [Fact]
+        public void CanTriggerException()
+        {
+            Navigate("/", noReload: true);
+
+            SetValue(Browser, "triggerExceptionMessage", "Hello from test");
+            Browser.FindElement(By.CssSelector("#triggerException button")).Click();
+
+            Assert.Contains("Hello from test", GetValue(Browser, "triggerExceptionMessageStackTrace"));
+        }
+
         private static string GetValue(IWebDriver webDriver, string elementId)
         {
             var element = webDriver.FindElement(By.Id(elementId));


Change in TestInsertRangeData

Change in TestInsertRangeData

--- test/Unosquare.Labs.LiteLib.Tests/DbContextFixture.cs
+++ test/Unosquare.Labs.LiteLib.Tests/DbContextFixture.cs
@@ -275,8 +275,8 @@
             using (var context = new TestDbContext(nameof(TestInsertRangeData)))
             {
                 context.Orders.InsertRange(TestHelper.DataSource);
-                var list = context.Orders.SelectAll();
-                Assert.AreEqual(TestHelper.DataSource.Length, list.Count());
+                var list = context.Orders.Count();
+                Assert.AreEqual(TestHelper.DataSource.Length, list);
             }
         }


#90 Handle StaleElementReferenceException in WaitForElementAttribute

--- src/Atata/Attributes/Triggers/WaitForElementAttribute.cs
+++ src/Atata/Attributes/Triggers/WaitForElementAttribute.cs
@@ -1,5 +1,5 @@
 using OpenQA.Selenium;
-
+
 namespace Atata
 {
     /// <summary>
@@ -45,25 +45,30 @@

         protected internal override void Execute<TOwner>(TriggerContext<TOwner> context)
         {
-            ScopeSource actualScopeSource = scopeSource ?? context.Component.ScopeSource;
-            IWebElement scopeElement = actualScopeSource.GetScopeElement(context.Component);
-
-            WaitUnit[] waitUnits = GetWaitUnits(Until);
-
-            Wait(scopeElement, waitUnits);
+            WaitUnit[] waitUnits = GetWaitUnits(Until);
+
+            foreach (WaitUnit unit in waitUnits)
+                Wait(context.Component, unit);
         }

-        protected virtual void Wait(IWebElement scopeElement, WaitUnit[] waitUnits)
-        {
-            foreach (WaitUnit unit in waitUnits)
-            {
-                By by = WaitBy.GetBy(Selector).With(unit.Options);
+        protected virtual void Wait<TOwner>(IUIComponent<TOwner> scopeComponent, WaitUnit waitUnit)
+            where TOwner : PageObject<TOwner>
+        {
+            ScopeSource actualScopeSource = scopeSource ?? scopeComponent.ScopeSource;
+
+            StaleSafely.Execute(
+                options =>
+                {
+                    IWebElement scopeElement = actualScopeSource.GetScopeElement(scopeComponent, SearchOptions.Within(options.Timeout));

-                if (unit.Method == WaitMethod.Presence)
-                    scopeElement.Exists(by);
-                else
-                    scopeElement.Missing(by);
-            }
+                    By by = WaitBy.GetBy(Selector).With(options);
+
+                    if (waitUnit.Method == WaitMethod.Presence)
+                        scopeElement.Exists(by);
+                    else
+                        scopeElement.Missing(by);
+                },
+                waitUnit.Options);
         }
     }
 }


fix merge conflict

fix merge conflict

--- src/wp/Accelerometer.cs
+++ src/wp/Accelerometer.cs
@@ -93,7 +93,12 @@
             {
                 this.SetStatus(ErrorFailedToStart);
                 DispatchCommandResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, ErrorFailedToStart), watchCallbackId);
+                return;
             }
+            PluginResult result = new PluginResult(PluginResult.Status.OK);
+            result.KeepCallback = true;
+            DispatchCommandResult(result,watchCallbackId);
+
         }

         public void stop(string options)


updates parse interface to start at position 0

--- libraries/Pliant/ParseInterface.cs
+++ libraries/Pliant/ParseInterface.cs
@@ -35,7 +35,7 @@
             _lexemeFactoryRegistry.Register(new StringLiteralLexemeFactory());
             _lexemeFactoryRegistry.Register(new DfaLexemeFactory());

-            Position = -1;
+            Position = 0;
             ParseEngine = parseEngine;
         }

@@ -221,7 +221,7 @@
         {
             return new Token(
                 lexeme.Capture,
-                Position - lexeme.Capture.Length,
+                Position - lexeme.Capture.Length - 1,
                 lexeme.TokenType);
         }
     }


fix references

fix references

--- src/BuildIt.Config/BuildIt.Config.Core.Api/Controllers/AppConfigurationController.cs
+++ src/BuildIt.Config/BuildIt.Config.Core.Api/Controllers/AppConfigurationController.cs
@@ -1,12 +1,15 @@
 using System;
 using System.Linq;
 using System.Collections.Generic;
-using System.Web.UI;
+
+
 using BuildIt.Config.Core;
 using BuildIt.Config.Core.Models;
 #if NETStandard16
+
 using Microsoft.AspNetCore.Mvc;
 #elif NET452
+using System.Web.UI;
 using System.Web;
 using System.Web.Mvc;
 using System.Web.Http;


Tiny refactoring: use the local variable we've already got

--- Drums/VDrumExplorer.Console/ImportKitCommand.cs
+++ Drums/VDrumExplorer.Console/ImportKitCommand.cs
@@ -37,7 +37,7 @@
             var console = context.Console.Out;
             var kit = context.ParseResult.ValueForOption<int>("kit");
             var file = context.ParseResult.ValueForOption<string>("file");
-            var (client, schema) = await DeviceDetection.DetectDeviceAsync(context.Console.Out);
+            var (client, schema) = await DeviceDetection.DetectDeviceAsync(console);

             if (client == null)
             {


Undoing changes for tests

Undoing changes for tests

--- DashServer/Handlers/RequestAuthorization.cs
+++ DashServer/Handlers/RequestAuthorization.cs
@@ -20,7 +20,6 @@

         public static bool IsRequestAuthorized(HttpRequest request)
         {
-            return true;
             var headers = request.Headers.Keys
                 .Cast<string>()
                 .SelectMany(headerName =>


fix: Command line options

fix: Command line options

--- Duplicati/Library/Backend/Storj/StorjBackend.cs
+++ Duplicati/Library/Backend/Storj/StorjBackend.cs
@@ -172,13 +172,13 @@
                     new CommandLineArgument(TARDIGRADE_FOLDER, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjFolderDescriptionShort, Strings.Storj.StorjFolderDescriptionLong, null, null, null, "This is deprecated, use storj-folder instead"),

                     //Current ones
-                    new CommandLineArgument(TARDIGRADE_AUTH_METHOD, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjAuthMethodDescriptionShort, Strings.Storj.StorjAuthMethodDescriptionLong, "API key"),
-                    new CommandLineArgument(TARDIGRADE_SATELLITE, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjSatelliteDescriptionShort, Strings.Storj.StorjSatelliteDescriptionLong, "us1.storj.io:7777"),
-                    new CommandLineArgument(TARDIGRADE_API_KEY, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjAPIKeyDescriptionShort, Strings.Storj.StorjAPIKeyDescriptionLong),
-                    new CommandLineArgument(TARDIGRADE_SECRET, CommandLineArgument.ArgumentType.Password, Strings.Storj.StorjSecretDescriptionShort, Strings.Storj.StorjSecretDescriptionLong),
-                    new CommandLineArgument(TARDIGRADE_SHARED_ACCESS, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjSharedAccessDescriptionShort, Strings.Storj.StorjSharedAccessDescriptionLong),
-                    new CommandLineArgument(TARDIGRADE_BUCKET, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjBucketDescriptionShort, Strings.Storj.StorjBucketDescriptionLong),
-                    new CommandLineArgument(TARDIGRADE_FOLDER, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjFolderDescriptionShort, Strings.Storj.StorjFolderDescriptionLong),
+                    new CommandLineArgument(STORJ_AUTH_METHOD, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjAuthMethodDescriptionShort, Strings.Storj.StorjAuthMethodDescriptionLong, "API key"),
+                    new CommandLineArgument(STORJ_SATELLITE, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjSatelliteDescriptionShort, Strings.Storj.StorjSatelliteDescriptionLong, "us1.storj.io:7777"),
+                    new CommandLineArgument(STORJ_API_KEY, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjAPIKeyDescriptionShort, Strings.Storj.StorjAPIKeyDescriptionLong),
+                    new CommandLineArgument(STORJ_SECRET, CommandLineArgument.ArgumentType.Password, Strings.Storj.StorjSecretDescriptionShort, Strings.Storj.StorjSecretDescriptionLong),
+                    new CommandLineArgument(STORJ_SHARED_ACCESS, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjSharedAccessDescriptionShort, Strings.Storj.StorjSharedAccessDescriptionLong),
+                    new CommandLineArgument(STORJ_BUCKET, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjBucketDescriptionShort, Strings.Storj.StorjBucketDescriptionLong),
+                    new CommandLineArgument(STORJ_FOLDER, CommandLineArgument.ArgumentType.String, Strings.Storj.StorjFolderDescriptionShort, Strings.Storj.StorjFolderDescriptionLong),
                 });
             }
         }


Move magic numbers for network timeouts out of code into some constants.

git-svn-id: baf6e02d125cf6f9bfcfe153b2eb83d6e1f5ace6@663 52acb1d6-8a22-11de-b505-999d5b087335

--- libsecondlife-cs/NetworkManager.cs
+++ libsecondlife-cs/NetworkManager.cs
@@ -114,6 +114,8 @@
         // Number of milliseconds before a packet is assumed lost and resent
         private int ResendTimeout = 4000;

+        private const int SimConnectTimeout = 15000;
+
         /// <summary>
         ///
         /// </summary>
@@ -166,7 +168,7 @@

                 while (true)
                 {
-                    if (connected || Environment.TickCount - start > 15000)
+                    if (connected || Environment.TickCount - start > SimConnectTimeout)
                     {
                         return;
                     }
@@ -655,6 +657,8 @@
         private System.Timers.Timer DisconnectTimer;
         private bool connected;

+        private const int NetworkTrafficTimeout = 15000;
+
         /// <summary>
         ///
         /// </summary>
@@ -675,7 +679,7 @@
             RegisterCallback(PacketType.KickUser, new PacketCallback(KickUserHandler));

             // Disconnect a sim if no network traffic has been received for 15 seconds
-            DisconnectTimer = new System.Timers.Timer(15000);
+            DisconnectTimer = new System.Timers.Timer(NetworkTrafficTimeout);
             DisconnectTimer.Elapsed += new ElapsedEventHandler(DisconnectTimer_Elapsed);
         }


Fix classic hotkeys toggling filtered mods

--- osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
+++ osu.Game/Overlays/Mods/Input/ClassicModHotkeyHandler.cs
@@ -42,7 +42,7 @@
             if (!mod_type_lookup.TryGetValue(e.Key, out var typesToMatch))
                 return false;

-            var matchingMods = availableMods.Where(modState => matches(modState, typesToMatch)).ToArray();
+            var matchingMods = availableMods.Where(modState => matches(modState, typesToMatch) && !modState.Filtered.Value).ToArray();

             if (matchingMods.Length == 0)
                 return false;


Fix credential list binding

Fix credential list binding

--- src/Certify.UI/ViewModel/ChallengeConfigItemViewModel.cs
+++ src/Certify.UI/ViewModel/ChallengeConfigItemViewModel.cs
@@ -128,6 +128,8 @@
                 }
             }

+            storedCredentialsList.SelectedValue = SelectedItem.ChallengeCredentialKey;
+
             ResumeChangeEvents();
             SelectedItem.ResumeChangeEvents();


Bug 17 Display error message above EmploymentDate

--- src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Cohort.cs
+++ src/CommitmentsV2/SFA.DAS.CommitmentsV2/Models/Cohort.cs
@@ -730,12 +730,12 @@

             if (draftApprenticeshipDetails.EmploymentEndDate.Value < draftApprenticeshipDetails.StartDate?.AddMonths(3))
             {
-                yield return new DomainError(nameof(draftApprenticeshipDetails.EmploymentPrice), "This date must be at least 3 months later than the planned apprenticeship training start date");
+                yield return new DomainError(nameof(draftApprenticeshipDetails.EmploymentEndDate), "This date must be at least 3 months later than the planned apprenticeship training start date");
             }

             if (draftApprenticeshipDetails.EmploymentEndDate.Value > draftApprenticeshipDetails.EndDate)
             {
-                yield return new DomainError(nameof(draftApprenticeshipDetails.EmploymentPrice), "This date must not be later than the projected apprenticeship training end date");
+                yield return new DomainError(nameof(draftApprenticeshipDetails.EmploymentEndDate), "This date must not be later than the projected apprenticeship training end date");
             }
         }


Make ShadowCopyAnalyzerAssemblyLoader threadsafe

Multiple callers on multiple threads risked potentially overwriting the
same files or having a mismatched Mutex which could have resulted
in things being deleted underneath us. This is now properly safe.

There are two consumers of this type today: Visual Studio, which was
currently calling this on the same thread the whole time (but that's
changing) and VBCSCompiler, where it's a singleton and thus this might
have been broken all along.

--- src/Compilers/Shared/ShadowCopyAnalyzerAssemblyLoader.cs
+++ src/Compilers/Shared/ShadowCopyAnalyzerAssemblyLoader.cs
@@ -28,13 +28,12 @@

         /// <summary>
         /// The directory where this instance of <see cref="ShadowCopyAnalyzerAssemblyLoader"/>
-        /// will shadow-copy assemblies.
+        /// will shadow-copy assemblies, and the mutex created to mark that the owner of it is still active.
         /// </summary>
-        private string _shadowCopyDirectory;
-        private Mutex _shadowCopyDirectoryMutex;
+        private readonly Lazy<(string directory, Mutex)> _shadowCopyDirectoryAndMutex;

         /// <summary>
-        /// Used to generate unique names for per-assembly directories.
+        /// Used to generate unique names for per-assembly directories. Should be updated with <see cref="Interlocked.Increment(ref int)"/>.
         /// </summary>
         private int _assemblyDirectoryId;

@@ -48,6 +47,9 @@
             {
                 _baseDirectory = Path.Combine(Path.GetTempPath(), "CodeAnalysis", "AnalyzerShadowCopies");
             }
+
+            _shadowCopyDirectoryAndMutex = new Lazy<(string directory, Mutex)>(
+                () => CreateUniqueDirectoryForProcess(), LazyThreadSafetyMode.ExecutionAndPublication);

             DeleteLeftoverDirectoriesTask = Task.Run((Action)DeleteLeftoverDirectories);
         }
@@ -95,11 +97,6 @@

         protected override Assembly LoadImpl(string fullPath)
         {
-            if (_shadowCopyDirectory == null)
-            {
-                _shadowCopyDirectory = CreateUniqueDirectoryForProcess();
-            }
-
             string assemblyDirectory = CreateUniqueDirectoryForAssembly();
             string shadowCopyPath = CopyFileAndResources(fullPath, assemblyDirectory);

@@ -177,24 +174,24 @@

         private string CreateUniqueDirectoryForAssembly()
         {
-            int directoryId = _assemblyDirectoryId++;
+            int directoryId = Interlocked.Increment(ref _assemblyDirectoryId);

-            string directory = Path.Combine(_shadowCopyDirectory, directoryId.ToString());
+            string directory = Path.Combine(_shadowCopyDirectoryAndMutex.Value.directory, directoryId.ToString());

             Directory.CreateDirectory(directory);
             return directory;
         }

-        private string CreateUniqueDirectoryForProcess()
+        private (string directory, Mutex mutex) CreateUniqueDirectoryForProcess()
         {
             string guid = Guid.NewGuid().ToString("N").ToLowerInvariant();
             string directory = Path.Combine(_baseDirectory, guid);

-            _shadowCopyDirectoryMutex = new Mutex(initiallyOwned: false, name: guid);
+            var mutex = new Mutex(initiallyOwned: false, name: guid);

             Directory.CreateDirectory(directory);

-            return directory;
+            return (directory, mutex);
         }
     }
 }


Override ToString method in ReplicatedDocument class. This will help QA to print out the debug info easily.

--- src/Couchbase.Lite.Shared/API/Sync/ReplicatorProgress.cs
+++ src/Couchbase.Lite.Shared/API/Sync/ReplicatorProgress.cs
@@ -106,5 +106,15 @@
         {
             return new ReplicatedDocument(Id, IsAccessRemoved, IsDeleted, new C4Error(), IsTransient);
         }
+
+        public override string ToString()
+        {
+            return $"ReplicatedDocument[ Doc ID: {Id}; " +
+                   $"IsDeleted: { IsDeleted }; " +
+                   $"IsAccessRemoved: { IsAccessRemoved }; " +
+                   $"Error domain: { Error.Domain }; " +
+                   $"Error code: { Error.Error }; " +
+                   $"IsTransient: { IsTransient } ]";
+        }
     }
 }


remove reference to `IResolver`

remove reference to `IResolver`

--- src/Detection.Device/src/Abstractions/IDeviceResolver.cs
+++ src/Detection.Device/src/Abstractions/IDeviceResolver.cs
@@ -6,8 +6,9 @@
     /// <summary>
     /// Get device resolver to generate the device result
     /// </summary>
-    public interface IDeviceResolver : IResolver
+    public interface IDeviceResolver// : IResolver
     {
         IDeviceFactory Device { get; }
+        UserAgent UserAgent { get; }
     }
 }


Leave voice channel on audioclient disconnect

--- src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
+++ src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
@@ -547,6 +547,7 @@
             _audioConnectPromise = null;
             if (_audioClient != null)
                 await _audioClient.StopAsync().ConfigureAwait(false);
+            await Discord.ApiClient.SendVoiceStateUpdateAsync(Id, null, false, false).ConfigureAwait(false);
             _audioClient = null;
         }
         internal async Task FinishConnectAudio(string url, string token)


Then substring tests.

Then substring tests.

--- src/EditorFeatures/Test/Utilities/PatternMatcherTests.cs
+++ src/EditorFeatures/Test/Utilities/PatternMatcherTests.cs
@@ -183,12 +183,22 @@
         [InlineData("[|Fo|]o", "Fo", PatternMatchKind.Prefix, CaseSensitive)]
         [InlineData("[|Fog|]Bar", "Fog", PatternMatchKind.Prefix, CaseSensitive)]

+        [InlineData("_[|my|]Button", "my", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("Fog[|B|]ar", "b", PatternMatchKind.Substring, CaseInsensitive)]
+        [InlineData("_my[|_b|]utton", "_b", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("my[|_B|]utton", "_b", PatternMatchKind.Substring, CaseInsensitive)]
+        [InlineData("my[|_b|]utton", "_b", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("A[|BCD|]EFGH", "bcd", PatternMatchKind.Substring, CaseInsensitive)]
+        [InlineData("_[|myb|]utton", "myb", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("_my[|_B|]utton", "_b", PatternMatchKind.Substring, CaseInsensitive)]
+        [InlineData("_[|myB|]utton", "myB", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("_[|my|]button", "my", PatternMatchKind.Substring, CaseSensitive)]
+        [InlineData("_[|myB|]utton", "myb", PatternMatchKind.Substring, CaseInsensitive)]
+
         [InlineData("BazBar[|F|]oo[|F|]oo[|F|]oo", "FFF", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseContiguousBonus)]
         [InlineData("Baz[|F|]ogBar[|F|]oo[|F|]oo", "FFF", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.NoBonus)]
         [InlineData("[|CO|]DE_FIX_[|PRO|]VIDER", "copro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
-        [InlineData("_[|my|]Button", "my", PatternMatchKind.Substring, CaseSensitive)]
         [InlineData("[|F|]og[|B|]ar", "fB", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
-        [InlineData("Fog[|B|]ar", "b", PatternMatchKind.Substring, CaseInsensitive)]
         [InlineData("Abcdefghij[|EfgHij|]", "efghij", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseContiguousBonus)]
         [InlineData("[|F|]og[|_B|]ar", "F_b", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("_[|co|]deFix[|Pro|]vider", "copro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.NoBonus)]
@@ -196,30 +206,21 @@
         [InlineData("[|F|]ogBar[|F|]oo[|F|]oo", "FFF", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
         [InlineData("Bar[|F|]oo[|F|]oo[|F|]oo", "FFF", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseContiguousBonus)]
         [InlineData("[|AbCd|]xxx[|Ef|]Cd[|Gh|]", "AbCdEfGh", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
-        [InlineData("_my[|_b|]utton", "_b", PatternMatchKind.Substring, CaseSensitive)]
         [InlineData("[|_f|]og[|B|]ar", "_fB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|Co|]deFix[|Pro|]vider", "copro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
-        [InlineData("my[|_B|]utton", "_b", PatternMatchKind.Substring, CaseInsensitive)]
         [InlineData("[|F|]og_[|B|]ar", "FB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
         [InlineData("FogBar[|ChangedEventArgs|]", "changedeventargs", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseContiguousBonus)]
-        [InlineData("my[|_b|]utton", "_b", PatternMatchKind.Substring, CaseSensitive)]
         [InlineData("[|C|]lear[|Ofi|]lac[|Pro|]fessional", "cofipro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|C|]ore[|Ofi|]lac[|Pro|]fessional", "cofipro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|_F|]og[|B|]ar", "_fB", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|F|]og[|_B|]ar", "f_B", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|Si|]mple[|UI|]Element", "SiUI", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]
-        [InlineData("A[|BCD|]EFGH", "bcd", PatternMatchKind.Substring, CaseInsensitive)]
         [InlineData("[|_|]my_[|b|]utton", "_B", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
         [InlineData("[|Fo|]g[|B|]ar", "FoB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]
-        [InlineData("_[|myb|]utton", "myb", PatternMatchKind.Substring, CaseSensitive)]
-        [InlineData("_my[|_B|]utton", "_b", PatternMatchKind.Substring, CaseInsensitive)]
         [InlineData("[|Co|]de[|Fi|]x[|Pro|]vider", "cofipro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("Code[|Fi|]xObject[|Pro|]vider", "fipro", PatternMatchKind.CamelCase, CaseInsensitive, PatternMatcher.NoBonus)]
-        [InlineData("_[|myB|]utton", "myB", PatternMatchKind.Substring, CaseSensitive)]
-        [InlineData("_[|my|]button", "my", PatternMatchKind.Substring, CaseSensitive)]
         [InlineData("[|F|]og[|B|]ar", "FB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|Fo|]oBarry[|Bas|]il", "FoBas", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
-        [InlineData("_[|myB|]utton", "myb", PatternMatchKind.Substring, CaseInsensitive)]
         [InlineData("[|F|]og[|B|]arBaz", "FB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]
         [InlineData("[|F|]ooFlob[|B|]az", "FB", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMatchesFromStartBonus)]
         [InlineData("[|F|]og[|_B|]ar", "F_B", PatternMatchKind.CamelCase, CaseSensitive, PatternMatcher.CamelCaseMaxWeight)]


Added TryGetNextBar() method to TimeSeries.

--- QDMS/TimeSeries.cs
+++ QDMS/TimeSeries.cs
@@ -85,6 +85,15 @@
         }

         /// <summary>
+        /// Returns the bar following the "current" one. CAREFUL WITH SNOOPING!
+        /// </summary>
+        public OHLCBar TryGetNextBar()
+        {
+            if (CurrentBar == Series.Count - 1) return null;
+            return Series[CurrentBar + 1];
+        }
+
+        /// <summary>
         /// Progress the "current" time of the VariableSeries to the specified date and time.
         /// </summary>
         /// <returns>True if the CurrentBar was changed</returns>


refactor GetRoles

refactor GetRoles

--- src/ElCamino.AspNetCore.Identity.AzureTable/UserStore.cs
+++ src/ElCamino.AspNetCore.Identity.AzureTable/UserStore.cs
@@ -103,6 +103,7 @@
         public virtual async Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default)
         {
             cancellationToken.ThrowIfCancellationRequested();
+            ConcurrentBag<string> bag = new ConcurrentBag<string>();
             ThrowIfDisposed();
             if (user == null) throw new ArgumentNullException(nameof(user));
             if (EqualityComparer<TKey>.Default.Equals(user.Id, default))
@@ -131,7 +132,7 @@
                 const double pageSize = 10d;
                 double maxPages = Math.Ceiling((double)userRoleTotalCount / pageSize);

-                List<Task<List<string>>> tasks = new List<Task<List<string>>>((int)maxPages);
+                List<Task> tasks = new List<Task>((int)maxPages);

                 for (int iPageIndex = 0; iPageIndex < maxPages; iPageIndex++)
                 {
@@ -154,22 +155,22 @@
                         iRoleCounter++;
                     }
                     tasks.Add(
-                        _roleTable.QueryAsync<Model.IdentityRole>(filter: queryTemp, select: new List<string>() { nameof(Model.IdentityRole.Name) }, cancellationToken: cancellationToken).ToListAsync(cancellationToken)
-                        .ContinueWith((t) =>
+                        _roleTable.QueryAsync<Model.IdentityRole>(filter: queryTemp, select: new List<string>() { nameof(Model.IdentityRole.Name) }, cancellationToken: cancellationToken)
+                        .ForEachAsync((t) =>
                         {
-                            return t.Result.Where(w => w.Name != null)
-                            .Select(d => d.Name)
-                            .Where(di => !string.IsNullOrWhiteSpace(di))
-                            .ToList();
-                        })
+                            if (!string.IsNullOrWhiteSpace(t?.Name))
+                            {
+                                bag.Add(t.Name);
+                            }
+                        }, cancellationToken)
                     );
                 }
                 await Task.WhenAll(tasks).ConfigureAwait(false);
-                return tasks.Select(s => s.Result).SelectMany(m => m).ToList() as IList<string>;
-            }
-
-            return new List<string>() as IList<string>;
-        }
+            }
+
+            return bag.ToList();
+        }
+
         public string BuildRoleQuery(string normalizedRoleName)
         {
             string rowFilter =