Allow tags to initialize before NextInlineComment

Workaround for race where NextInlineComment command was being executed
before it was available (regression).

--- src/GitHub.App/Services/PullRequestEditorService.cs
+++ src/GitHub.App/Services/PullRequestEditorService.cs
@@ -237,13 +237,28 @@
                 FromLine = thread.LineNumber - 1,
             };

-            VisualStudio.Services.Dte.Commands.Raise(
-                Guids.CommandSetString,
-                PkgCmdIDList.NextInlineCommentId,
-                ref param,
-                null);
+            await RaiseWhenAvailable(Guids.CommandSetString, PkgCmdIDList.NextInlineCommentId, param, 1000);

             return diffViewer;
+        }
+
+        static async Task<bool> RaiseWhenAvailable(string guid, int id, object param, int millisecondsDelay)
+        {
+            var commands = VisualStudio.Services.Dte.Commands;
+            var command = commands.Item(guid, id);
+
+            if (!command.IsAvailable)
+            {
+                await Task.Delay(millisecondsDelay);
+            }
+
+            if (!command.IsAvailable)
+            {
+                return false;
+            }
+
+            commands.Raise(command.Guid, command.ID, ref param, null);
+            return true;
         }

         public void NavigateToEquivalentPosition(IVsTextView sourceView, IVsTextView targetView)


Fix emission of unconstructed types declarations in CppCodegen (#3135)

If a type is not constructed, we still want the member methods to be
part of the class declaration.

--- src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs
+++ src/ILCompiler.Compiler/src/CppCodeGen/CppWriter.cs
@@ -1105,24 +1105,24 @@
                     typeDefinitions.AppendLine();
                     typeDefinitions.Append(GetCodeForDelegate(nodeType));
                 }
-
-
-                if (nodeType.HasStaticConstructor)
-                {
-                    _statics.AppendLine();
-                    _statics.Append("bool __cctor_" + GetCppTypeName(nodeType).Replace("::", "__") + ";");
-                }
-
-                List<MethodDesc> methodList;
-                if (_methodLists.TryGetValue(nodeType, out methodList))
-                {
-                    foreach (var m in methodList)
-                    {
-                        typeDefinitions.AppendLine();
-                        AppendCppMethodDeclaration(typeDefinitions, m, false);
-                    }
-                }
-            }
+            }
+
+            if (nodeType.HasStaticConstructor)
+            {
+                _statics.AppendLine();
+                _statics.Append("bool __cctor_" + GetCppTypeName(nodeType).Replace("::", "__") + ";");
+            }
+
+            List<MethodDesc> methodList;
+            if (_methodLists.TryGetValue(nodeType, out methodList))
+            {
+                foreach (var m in methodList)
+                {
+                    typeDefinitions.AppendLine();
+                    AppendCppMethodDeclaration(typeDefinitions, m, false);
+                }
+            }
+
             typeDefinitions.AppendEmptyLine();
             typeDefinitions.Append("};");
             typeDefinitions.AppendEmptyLine();


Change HttpListener port range to 64120-64130 (end-inclusive) (#1879)

--- src/IssueViz.Security/OpenInIDE/OpenInIDEPackage.cs
+++ src/IssueViz.Security/OpenInIDE/OpenInIDEPackage.cs
@@ -40,7 +40,7 @@
         // Note: the range of ports used is common across SonarLint implementations in all IDEs and
         // must match those checked by SonarQube/SonarCloud.
         private const int StartPort = 64120;
-        private const int EndPort = 64123;
+        private const int EndPort = 64130;

         private IDisposable listener;


Added [Serializable] to Option<T> and NoneOption structs

See: https://github.com/ar3cka/Journalist/issues/14

--- src/Journalist.LanguageExtensions/Options/Option.cs
+++ src/Journalist.LanguageExtensions/Options/Option.cs
@@ -3,6 +3,7 @@

 namespace Journalist.Options
 {
+    [Serializable]
     public struct Option<T> : IEquatable<Option<T>>, IEquatable<Option.NoneOption>
     {
         private static readonly Option<T> None = new Option<T>();
@@ -101,6 +102,7 @@

     public static class Option
     {
+        [Serializable]
         public struct NoneOption
         {
             public override bool Equals(object obj)


Changing ClassEnvRule to non-static

Changing ClassEnvRule to non-static

--- src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -364,8 +364,6 @@

         static LuceneTestCase()
         {
-            ClassEnvRule = new TestRuleSetupAndRestoreClassEnv();
-
             bool defaultValue = false;
             foreach (string property in Arrays.AsList("tests.leaveTemporary", "tests.leavetemporary", "tests.leavetmpdir", "solr.test.leavetmpdir")) // Solr's legacy -  default -  lowercase -  ANT tasks's (junit4) flag.
             {
@@ -437,7 +435,7 @@
         /// <summary>
         /// Class environment setup rule.
         /// </summary>
-        private static TestRuleSetupAndRestoreClassEnv ClassEnvRule;
+        internal TestRuleSetupAndRestoreClassEnv ClassEnvRule { get; private set; }

         // LUCENENET TODO
         /// <summary>


Switched order of null check to be before Equals because Mono does
not like have a null object passed into Equals.

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@949

--- src/NHibernate/Persister/AbstractEntityPersister.cs
+++ src/NHibernate/Persister/AbstractEntityPersister.cs
@@ -654,7 +654,8 @@
 			pis.Add(typeof(HibernateProxy));
 			//pis.Add( typeof(INHibernateProxy) );
 			// != null because we use arraylist instead of hashset
-			if (!mappedClass.Equals(pi) && pi!=null )
+			// mono does not like a null value passed into Equals()
+			if ( pi!=null && !mappedClass.Equals(pi) )
 			{
 				pis.Add(pi);
 			}


Update AssemblyDomain.cs

Update AssemblyDomain.cs

--- src/Natasha/Engine/AssemblyModule/AssemblyDomain.cs
+++ src/Natasha/Engine/AssemblyModule/AssemblyDomain.cs
@@ -20,11 +20,6 @@
         public readonly string LibPath;

-#if NETCOREAPP3_0
-        private readonly AssemblyDependencyResolver _resolver;
-#endif
-
-

         public AssemblyDomain(string key)
@@ -43,10 +38,6 @@
             }
             Directory.CreateDirectory(LibPath);

-
-#if NETCOREAPP3_0
-            _resolver = new AssemblyDependencyResolver(LibPath);
-#endif

             ClassMapping = new ConcurrentDictionary<string, Assembly>();
             DynamicDlls = new ConcurrentDictionary<string, Assembly>();
@@ -88,16 +79,6 @@
         protected override Assembly Load(AssemblyName assemblyName)
         {

-#if NETCOREAPP3_0
-            string assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName);
-
-            if (assemblyPath != null)
-            {
-
-                return LoadFromAssemblyPath(assemblyPath);
-
-            }
-#endif
             return null;

         }
@@ -108,14 +89,6 @@

         protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
         {
-
-#if NETCOREAPP3_0
-            string libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
-            if (libraryPath != null)
-            {
-                return LoadUnmanagedDllFromPath(libraryPath);
-            }
-#endif

             return IntPtr.Zero;


Always dispose _sock and _socket if and only if they have been set (#109)

--- src/Novell.Directory.Ldap.NETStandard/Connection.cs
+++ src/Novell.Directory.Ldap.NETStandard/Connection.cs
@@ -868,14 +868,8 @@
                     {
                         _inStream?.Dispose();
                         _outStream?.Dispose();
-                        if (Ssl)
-                        {
-                            _sock.Dispose();
-                        }
-                        else
-                        {
-                            _socket.Dispose();
-                        }
+                        _sock?.Dispose();
+                        _socket?.Dispose();
                     }
                     catch (IOException)
                     {


Update Students Index View to only show Fines if they are greater than 0.

--- src/Open-School-Library/Views/Students/Index.cshtml
+++ src/Open-School-Library/Views/Students/Index.cshtml
@@ -60,9 +60,18 @@

                 @Html.DisplayFor(modelItem => item.Grade)

-
-                @Html.DisplayFor(modelItem => item.Fines)
-
+
+            @if ((double)item.Fines < 00.01)
+            {
+
+            }
+            else
+            {
+
+                    @Html.DisplayFor(modelItem => item.Fines)
+
+            }
+

                 @Html.DisplayFor(modelItem => item.IssuedID)


Debuggger attached exceptions

Debuggger attached exceptions

--- TourOfCSharp6/Program.cs
+++ TourOfCSharp6/Program.cs
@@ -26,7 +26,8 @@
                         Console.WriteLine(item);
                 }
                 catch (Exception e) if (logException(e)) { }
-                catch (TimeoutException e) if (failures++ < 10)
+                catch (TimeoutException e) if ((failures++ < 10) &&
+                (!System.Diagnostics.Debugger.IsAttached))
                 {
                     WriteLine("Timeout error: trying again");
                 }


Truncate settings files to prevent corrupt files.

--- VRGIN/Core/VRSettings.cs
+++ VRGIN/Core/VRSettings.cs
@@ -104,6 +104,7 @@
                 var serializer = new XmlSerializer(GetType());
                 using (var stream = File.OpenWrite(path))
                 {
+                    stream.SetLength(0);
                     serializer.Serialize(stream, this);
                 }
             }


1303: add UserData

1303: add UserData

--- src/PixelFarm/PaintLab.Svg/SvgRenderVxDocBuilder.cs
+++ src/PixelFarm/PaintLab.Svg/SvgRenderVxDocBuilder.cs
@@ -1349,6 +1349,7 @@
         public float X { get; set; }
         public float Y { get; set; }

+        public object UserData { get; set; } //optional
         public SvgDocument OwnerDocument { get; set; } //optional
     }


Removed check test.

Removed check test.

--- VkNet.Tests/VkApiTest.cs
+++ VkNet.Tests/VkApiTest.cs
@@ -203,17 +203,5 @@

             json.ShouldEqual(resultJson);
         }
-
-        [Test] // TODO remove it later
-        public void TwoStepAuthorization_normal_case()
-        {
-            Func<string> code = () => File.ReadAllText("code.txt");
-
-            var api = new VkApi();
-            api.TwoStepAuthorize(506131, "email", "password", code, Settings.All);
-
-            var list = api.Audio.Get(api.UserId.Value);
-            Assert.That(list.Count, Is.EqualTo(1));
-        }
     }
 }


881: expose VisualSpec

881: expose VisualSpec

--- src/PixelFarm/PaintLab.Svg/SvgRenderVxDocBuilder.cs
+++ src/PixelFarm/PaintLab.Svg/SvgRenderVxDocBuilder.cs
@@ -346,8 +346,6 @@
         object _controller;
         internal SvgVisualSpec _visualSpec;
         internal SvgPathRenderMarkers _pathMarkers;
-
-
         LayoutFarm.ImageBinder _imgBinder;
         SvgRenderRootElement _renderRoot;
         public SvgRenderElement(WellknownSvgElementName wellknownName,
@@ -672,6 +670,10 @@
             //***SKIP CLIPPING***
         }

+        public SvgVisualSpec VisualSpec
+        {
+            get { return _visualSpec; }
+        }

         //---------------------------
         //TODO: review here again


Fix test baseline due to change in the error message

--- src/R/Core/Test/Parser/ParseExpressionErrorsTest.cs
+++ src/R/Core/Test/Parser/ParseExpressionErrorsTest.cs
@@ -36,7 +36,7 @@
 @"GlobalScope  [Global]

 CloseBraceExpected AfterToken [0...1)
-OperandExpected AfterToken [0...1)
+UnexpectedEndOfFile AfterToken [0...1)
 ";
             ParserTest.VerifyParse(expected, "(");
         }


Fixed XML docs

Fixed XML docs

--- src/Scrutor/ServiceCollectionExtensions.Scanning.cs
+++ src/Scrutor/ServiceCollectionExtensions.Scanning.cs
@@ -12,7 +12,7 @@
         /// </summary>
         /// <param name="services">The services to add to.</param>
         /// <param name="action">The configuration action.</param>
-        /// <exception cref="System.ArgumentNullException">If either the <paramref name="services"/>
+        /// <exception cref="ArgumentNullException">If either the <paramref name="services"/>
         /// or <paramref name="action"/> arguments are <c>null</c>.</exception>
         public static IServiceCollection Scan(this IServiceCollection services, Action<IAssemblySelector> action)
         {
@@ -33,6 +33,14 @@
             return services.Populate(selector, RegistrationStrategy.Append);
         }

+        /// <summary>
+        /// Adds registrations to the <paramref name="services"/> collection using
+        /// conventions specified using the <paramref name="action"/>.
+        /// </summary>
+        /// <param name="services">The services to add to.</param>
+        /// <param name="action">The configuration action.</param>
+        /// <exception cref="ArgumentNullException">If either the <paramref name="services"/>
+        /// or <paramref name="action"/> arguments are <c>null</c>.</exception>
         public static IServiceCollection Scan(this IServiceCollection services, Action<ITypeSelector> action)
         {
             if (services == null)


Fix bug with ignoring minimum log level in Sharpbrake.Extension.Logging

--- src/Sharpbrake.Extensions.Logging/AirbrakeLogger.cs
+++ src/Sharpbrake.Extensions.Logging/AirbrakeLogger.cs
@@ -32,6 +32,9 @@
         /// </summary>
         public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
         {
+            if (!IsEnabled(logLevel))
+                return;
+
             notifier.ForContext(GetHttpContext()).NotifyAsync(GetErrorSeverity(logLevel), exception);
         }


Fixed duplicate key insert

Fixed duplicate key insert

--- src/SnakeBattleNet.Web/Core/Auth/CustomUserStore.cs
+++ src/SnakeBattleNet.Web/Core/Auth/CustomUserStore.cs
@@ -19,7 +19,7 @@

         public Task CreateAsync(TUser user)
         {
-            return Task.Run(() => _usersCollection.Insert(user));
+            return Task.Run(() => _usersCollection.Save(user));
         }

         public Task UpdateAsync(TUser user)


Add ActiveIssue attribute to GetResponseAsync_ResourceNotFound_ThrowsWebException.

This test has been failing on CentOS and RedHat for some time now.

--- src/System.Net.Requests/tests/HttpWebRequestTest.cs
+++ src/System.Net.Requests/tests/HttpWebRequestTest.cs
@@ -380,6 +380,7 @@
             new object[] { System.Net.Test.Common.Configuration.Http.StatusCodeUri(true, 404) },
         };

+        [ActiveIssue(12236, TestPlatforms.Linux)]
         [Theory, MemberData(nameof(StatusCodeServers))]
         public async Task GetResponseAsync_ResourceNotFound_ThrowsWebException(Uri remoteServer)
         {


Fix Microsoft.IO.Redist compilation string.Create compilation failure

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/System.Private.CoreLib/shared/System/IO/Path.cs
+++ src/System.Private.CoreLib/shared/System/IO/Path.cs
@@ -234,8 +234,14 @@
         {
             byte* pKey = stackalloc byte[KeyLength];
             Interop.GetRandomBytes(pKey, KeyLength);
-            return string.Create(12, (IntPtr)pKey, (span, key) => // 12 == 8 + 1 (for period) + 3
-                Populate83FileNameFromRandomBytes((byte*)key, KeyLength, span));
+
+#if MS_IO_REDIST
+                return StringExtensions.Create(
+#else
+                return string.Create(
+#endif
+                    12, (IntPtr)pKey, (span, key) => // 12 == 8 + 1 (for period) + 3
+                         Populate83FileNameFromRandomBytes((byte*)key, KeyLength, span));
         }

         /// <summary>


Refactored GetOverallState.

Refactored GetOverallState.

--- src/TestFx.Core/Evaluation/Results/ResultFactory.cs
+++ src/TestFx.Core/Evaluation/Results/ResultFactory.cs
@@ -18,6 +18,7 @@
 using TestFx.Evaluation.Intents;
 using TestFx.Evaluation.Utilities;
 using TestFx.Extensibility.Providers;
+using TestFx.Utilities;

 namespace TestFx.Evaluation.Results
 {
@@ -158,18 +159,7 @@

     private State GetOverallState (IEnumerable<IResult> results)
     {
-      var state = State.Passed;
-
-      foreach (var s in results.Select(x => x.State))
-      {
-        if (s == State.Inconclusive)
-          state = State.Inconclusive;
-
-        if (s == State.Failed)
-          return State.Failed;
-      }
-
-      return state;
+      return results.FirstOrDefault(x => x.State != State.Passed).GetValueOrDefault(x => x.State, () => State.Passed);
     }
   }
 }


remove lock

remove lock

--- src/Tools/IdeCoreBenchmarks/NavigateToBenchmarks.cs
+++ src/Tools/IdeCoreBenchmarks/NavigateToBenchmarks.cs
@@ -197,15 +197,14 @@
             Console.WriteLine("Time to search: " + (DateTime.Now - start));
         }

-        private async Task<int> SearchAsync(Project project, ImmutableArray<Document> priorityDocuments)
+        private static async Task<int> SearchAsync(Project project, ImmutableArray<Document> priorityDocuments)
         {
             var service = project.Services.GetService<INavigateToSearchService>();
             var results = new List<INavigateToSearchResult>();
             await foreach (var item in service.SearchProjectAsync(
                 project, priorityDocuments, "Syntax", service.KindsProvided, activeDocument: null, CancellationToken.None))
             {
-                lock (results)
-                    results.Add(item);
+                results.Add(item);
             }

             return results.Count;


OAuthEntryEndpoint: Fix handling of HttpMessageHandler

--- src/TypedRest.OAuth/Endpoints/OAuthEntryEndpoint.cs
+++ src/TypedRest.OAuth/Endpoints/OAuthEntryEndpoint.cs
@@ -25,7 +25,9 @@
         public OAuthEntryEndpoint(Uri uri, OAuthOptions? oAuthOptions = null, HttpMessageHandler? httpMessageHandler = null, MediaTypeFormatter? serializer = null, IErrorHandler? errorHandler = null, ILinkHandler? linkHandler = null)
             : base(
                 uri,
-                new HttpClient(oAuthOptions == null ? httpMessageHandler : new OAuthHandler(oAuthOptions, httpMessageHandler)),
+                new HttpClient(oAuthOptions == null
+                    ? httpMessageHandler ?? new HttpClientHandler()
+                    : new OAuthHandler(oAuthOptions, httpMessageHandler ?? new HttpClientHandler())),
                 serializer,
                 errorHandler,
                 linkHandler)


Use unique path under temp directory for test

--- src/Utilities.UnitTests/ToolLocationHelper_Tests.cs
+++ src/Utilities.UnitTests/ToolLocationHelper_Tests.cs
@@ -454,7 +454,7 @@
         [Fact]
         public void VerifyinternalGetPathToDotNetFrameworkSdkFile40()
         {
-            string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSFN40");
+            string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSF40");
             string temp35Directory = Path.Combine(tempDirectory, "bin");
             string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
             string toolPath = Path.Combine(temp35Directory, "MyTool.exe");


fix for wrong ImpBonus in NamingPattern.

--- ARKBreedingStats/Form1.cs
+++ ARKBreedingStats/Form1.cs
@@ -2832,7 +2832,7 @@
             if (sender == creatureInfoInputExtractor)
             {
                 cr.levelsWild = statIOs.Select(s => s.LevelWild).ToArray();
-                cr.imprintingBonus = extractor.imprintingBonus / 100;
+                cr.imprintingBonus = extractor.imprintingBonus;
                 cr.tamingEff = extractor.uniqueTE();
                 cr.isBred = rbBredExtractor.Checked;
             }


Fixed an issue with characteristics determination for aggregate operator invocation.

git-svn-id: 13a63bc6c3b3d33a7398a64e566310409a95f548@1219 c93b7781-d36b-0e4d-be4f-9d94f2a838be

--- Dataphor/DAE/Runtime.Instructions/AggregateNodes.cs
+++ Dataphor/DAE/Runtime.Instructions/AggregateNodes.cs
@@ -82,14 +82,13 @@
 				_isNilable = Operator.IsNilable;
 			}

-			for (int index = 0; index < Operator.Operands.Count; index++)
-			{
-				_isLiteral = _isLiteral && Nodes[index].IsLiteral;
-				_isFunctional = _isFunctional && Nodes[index].IsFunctional;
-				_isDeterministic = _isDeterministic && Nodes[index].IsDeterministic;
-				_isRepeatable = _isRepeatable && Nodes[index].IsRepeatable;
-				_isNilable = _isNilable || Nodes[index].IsNilable;
-			}
+			// Characteristics of an aggregate operator, unless overridden, are always based on the source node, rather than the
+			// actual operands to the operator.
+			_isLiteral = _isLiteral && Nodes[0].IsLiteral;
+			_isFunctional = _isFunctional && Nodes[0].IsFunctional;
+			_isDeterministic = _isDeterministic && Nodes[0].IsDeterministic;
+			_isRepeatable = _isRepeatable && Nodes[0].IsRepeatable;
+			_isNilable = _isNilable || Nodes[0].IsNilable;
 		}

 		public override void InternalDetermineBinding(Plan plan)


Fix for HTML/plain text emails.

Fix for HTML/plain text emails.

--- src/formulate.app/Forms/Handlers/Email/EmailHandler.cs
+++ src/formulate.app/Forms/Handlers/Email/EmailHandler.cs
@@ -239,12 +239,11 @@
             var extraSubject = AttemptGetValue(extraContext, ExtraSubjectKey) as string ?? string.Empty;
             var extraMessage = AttemptGetValue(extraContext, ExtraMessageKey) as string ?? string.Empty;
             var baseMessage = config.Message + extraMessage;
+            var plainTextBody = default(string);
+            var htmlBody = default(string);

             // Create message.
-            var message = new MailMessage()
-            {
-                IsBodyHtml = true
-            };
+            var message = new MailMessage();
             message.From = new MailAddress(config.SenderEmail);
             message.Subject = config.Subject + extraSubject;

@@ -324,13 +323,12 @@

             // Append fields?
-            var plainTextBody = default(string);
             if (config.AppendFields)
             {
                 var chosenPayload = config.AppendPayload
                     ? payload
                     : payload.Take(0);
-                message.Body = ConstructMessage(form, dataForMessage, filesForMessage,
+                htmlBody = ConstructMessage(form, dataForMessage, filesForMessage,
                     chosenPayload, baseMessage, config.IncludeHiddenFields, config.ExcludeFieldLabels, true);
                 plainTextBody = ConstructMessage(form, dataForMessage, filesForMessage,
                     chosenPayload, baseMessage, config.IncludeHiddenFields, config.ExcludeFieldLabels, false);
@@ -342,15 +340,21 @@
             }
             else
             {
-                message.Body = WebUtility.HtmlEncode(baseMessage);
+                htmlBody = WebUtility.HtmlEncode(baseMessage);
                 plainTextBody = baseMessage;
             }

             // Add plain text alternate view.
             var mimeType = new ContentType(MediaTypeNames.Text.Plain);
-            var textView = AlternateView.CreateAlternateViewFromString(plainTextBody, mimeType);
-            message.AlternateViews.Add(textView);
+            var emailView = AlternateView.CreateAlternateViewFromString(plainTextBody, mimeType);
+            message.AlternateViews.Add(emailView);
+
+
+            // Add HTML alternate view.
+            mimeType = new ContentType(MediaTypeNames.Text.Html);
+            emailView = AlternateView.CreateAlternateViewFromString(htmlBody, mimeType);
+            message.AlternateViews.Add(emailView);

             // Send email.


Resharper inspired cleanup - remove redundant using

--- CefSharp.OffScreen/ChromiumWebBrowser.cs
+++ CefSharp.OffScreen/ChromiumWebBrowser.cs
@@ -4,7 +4,6 @@

 using System;
 using System.Drawing;
-using System.Drawing.Imaging;
 using System.Text;
 using System.Threading.Tasks;
 using CefSharp.Internals;
@@ -36,7 +35,7 @@
         /// This must be set to something other than 0x0 otherwise Chromium will not render,
         /// and the ScreenshotAsync task will deadlock.
         /// </summary>
-        private System.Drawing.Size size = new System.Drawing.Size(1366, 768);
+        private Size size = new Size(1366, 768);

         /// <summary>
         /// Create a new OffScreen Chromium Browser
@@ -80,7 +79,7 @@
         ///
         /// This also changes the size of the next screenshot.
         /// </summary>
-        public System.Drawing.Size Size
+        public Size Size
         {
             get { return size; }
             set


format fix

format fix

--- Client/Core/Recovery/Browsers/Firefox.cs
+++ Client/Core/Recovery/Browsers/Firefox.cs
@@ -26,7 +26,6 @@

         static Firefox()
         {
-
             try
             {
                 firefoxPath = GetFirefoxInstallPath();
@@ -83,7 +82,6 @@
             }
             catch (Exception)
             {
-
             }
             return firefoxPasswords;
         }
@@ -180,7 +178,6 @@

             // return first profile, fuck it.
             return profiles[0];
-
         }
         private static FileInfo GetFile(DirectoryInfo profilePath, string searchTerm)
         {


Ops with BulkConfig as Action signature

Ops with BulkConfig as Action signature

--- EFCore.BulkExtensions/DbContextBulkExtensions.cs
+++ EFCore.BulkExtensions/DbContextBulkExtensions.cs
@@ -87,11 +87,11 @@
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Insert, bulkConfig, progress);
         }

-        public static void BulkInsertAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        public static Task BulkInsertAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.Insert, bulkConfig, progress);
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Insert, bulkConfig, progress);
         }

         public static Task BulkInsertOrUpdateAsync<T>(this DbContext context, IList<T> entities, BulkConfig bulkConfig = null, Action<decimal> progress = null) where T : class
@@ -99,23 +99,23 @@
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.InsertOrUpdate, bulkConfig, progress);
         }

-        public static void BulkInsertOrUpdateAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        /*public static Task BulkInsertOrUpdateAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.InsertOrUpdate, bulkConfig, progress);
-        }
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.InsertOrUpdate, bulkConfig, progress);
+        }*/

         public static Task BulkInsertOrUpdateOrDeleteAsync<T>(this DbContext context, IList<T> entities, BulkConfig bulkConfig = null, Action<decimal> progress = null) where T : class
         {
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.InsertOrUpdateDelete, bulkConfig, progress);
         }

-        public static void BulkInsertOrUpdateOrDeleteAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        public static Task BulkInsertOrUpdateOrDeleteAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.InsertOrUpdateDelete, bulkConfig, progress);
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.InsertOrUpdateDelete, bulkConfig, progress);
         }

         public static Task BulkUpdateAsync<T>(this DbContext context, IList<T> entities, BulkConfig bulkConfig = null, Action<decimal> progress = null) where T : class
@@ -123,11 +123,11 @@
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Update, bulkConfig, progress);
         }

-        public static void BulkUpdateAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        public static Task BulkUpdateAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.Update, bulkConfig, progress);
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Update, bulkConfig, progress);
         }

         public static Task BulkDeleteAsync<T>(this DbContext context, IList<T> entities, BulkConfig bulkConfig = null, Action<decimal> progress = null) where T : class
@@ -135,11 +135,11 @@
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Delete, bulkConfig, progress);
         }

-        public static void BulkDeleteAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        public static Task BulkDeleteAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.Delete, bulkConfig, progress);
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Delete, bulkConfig, progress);
         }

         public static Task BulkReadAsync<T>(this DbContext context, IList<T> entities, BulkConfig bulkConfig = null, Action<decimal> progress = null) where T : class
@@ -147,11 +147,11 @@
             return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Read, bulkConfig, progress);
         }

-        public static void BulkReadAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
+        public static Task BulkReadAsync<T>(this DbContext context, IList<T> entities, Action<BulkConfig> bulkAction, Action<decimal> progress = null) where T : class
         {
             BulkConfig bulkConfig = new BulkConfig();
             bulkAction?.Invoke(bulkConfig);
-            DbContextBulkTransaction.Execute(context, entities, OperationType.Read, bulkConfig, progress);
+            return DbContextBulkTransaction.ExecuteAsync(context, entities, OperationType.Read, bulkConfig, progress);
         }
     }
 }


[Engine] Removed si.CursorSelectable, slowly getting rid of the si reference in the Cursor class.


sabre position correction

sabre position correction

--- Kinect.Demo/Kinect9.LightSaber/MainWindow.LightSaber.cs
+++ Kinect.Demo/Kinect9.LightSaber/MainWindow.LightSaber.cs
@@ -18,8 +18,8 @@
 				return;
 			_kinectSensor.AllFramesReady += KinectSensorAllFramesReady;
 			_kinectSensor.ColorStream.Enable();
-			_kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters()
-			{
+			_kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
+				                                    {
 				Correction = 0.5f,
 				JitterRadius = 0.05f,
 				MaxDeviationRadius = 0.05f,
@@ -88,46 +88,53 @@

 			var mapper = new CoordinateMapper(_kinectSensor);

-			RightWrist = mapper.MapSkeletonPointToColorPoint(jointWrist.Position, ColorImageFormat.RgbResolution640x480Fps30); ;
-			RightElbow = mapper.MapSkeletonPointToColorPoint(jointElbow.Position, ColorImageFormat.RgbResolution640x480Fps30); ;
-			RightHand = mapper.MapSkeletonPointToColorPoint(jointHand.Position, ColorImageFormat.RgbResolution640x480Fps30); ;
+			RightWrist = mapper.MapSkeletonPointToColorPoint(jointWrist.Position, ColorImageFormat.RgbResolution640x480Fps30);
+			RightElbow = mapper.MapSkeletonPointToColorPoint(jointElbow.Position, ColorImageFormat.RgbResolution640x480Fps30);
+			RightHand = mapper.MapSkeletonPointToColorPoint(jointHand.Position, ColorImageFormat.RgbResolution640x480Fps30);

-			if (RightElbow.Y == RightWrist.Y)
-				return;
-			var handAngleInRadian = Math.Atan((RightWrist.X - RightElbow.X) / (RightWrist.Y - RightElbow.Y));
-			var handAngleInDegrees = handAngleInRadian * 180 / Math.PI;
-			Message = handAngleInDegrees.ToString();
-			if (handAngleInDegrees > 0)
-				handAngleInDegrees = handAngleInDegrees * -1;
+			double handAngleInDegrees;
+			if (RightElbow.X == RightWrist.X)
+				handAngleInDegrees = 0;
+			else
+			{
+				var handAngleInRadian = Math.Atan((double)(RightElbow.Y - RightWrist.Y)/(RightWrist.X - RightElbow.X));
+				handAngleInDegrees = handAngleInRadian*180/Math.PI;
+			}

-			const int magicFudgeNumber = -135;
-			var rotationAngleOffsetInDegrees = handAngleInDegrees + magicFudgeNumber;
+			//Message = string.Format("{0}, {1}, {2}",RightElbow.Y, RightWrist.Y, handAngleInDegrees.ToString());
+
+			const int magicFudgeNumber = 90;
+			var rotationAngleOffsetInDegrees = handAngleInDegrees - magicFudgeNumber;
 			var rotationAngleOffsetInRadians = rotationAngleOffsetInDegrees * Math.PI / 180;
-			Sabre.X1 = (RightWrist.X + RightHand.X) / 2;
-			Sabre.Y1 = (RightWrist.Y + RightHand.Y) / 2;
+			Sabre.X1 = ((double)RightWrist.X + RightHand.X) / 2;
+			Sabre.Y1 = ((double)RightWrist.Y + RightHand.Y) / 2;

 			const int sabreLength = 250;
-			Sabre.X2 = Sabre.X1 + sabreLength * Math.Sin(rotationAngleOffsetInRadians);
-			Sabre.Y2 = Sabre.Y1 + sabreLength * Math.Cos(rotationAngleOffsetInRadians);
-
-			if(_previousSabrePositionX.Count>=SabrePositionCount)
+			Sabre.X2 = Sabre.X1 - sabreLength * Math.Cos(rotationAngleOffsetInRadians);
+			Sabre.Y2 = Sabre.Y1 + sabreLength * Math.Sin(rotationAngleOffsetInRadians);
+
+			if (_previousSabrePositionX.Count >= SabrePositionCount)
 				_previousSabrePositionX.RemoveAt(0);

-			if(_previousSabrePositionX.Any())
+			PlaySabreSoundOnWave();
+			_previousSabrePositionX.Add(Sabre.X2);
+		}
+
+		private void PlaySabreSoundOnWave()
+		{
+			if (!_previousSabrePositionX.Any()) return;
+
+			const int minimumDistanceForSoundEffect = 100;
+			if (Sabre.X2 < _previousSabrePositionX.Last())
 			{
-				const int minimumDistanceForSoundEffect = 100;
-				if(Sabre.X2<_previousSabrePositionX.Last())
-				{
-					if (Sabre.X2 < _previousSabrePositionX.Min() - minimumDistanceForSoundEffect)
-						PlaySabreSound();
-				}
-				else
-				{
-					if (Sabre.X2 > _previousSabrePositionX.Max() + minimumDistanceForSoundEffect)
-						PlaySabreSound();
-				}
+				if (Sabre.X2 < _previousSabrePositionX.Min() - minimumDistanceForSoundEffect)
+					PlaySabreSound();
 			}
-			_previousSabrePositionX.Add(Sabre.X2);
+			else
+			{
+				if (Sabre.X2 > _previousSabrePositionX.Max() + minimumDistanceForSoundEffect)
+					PlaySabreSound();
+			}
 		}

 		private void PlaySabreSound()


test case

test case

--- King.Data.Sql.Reflection.Unit.Test/SchemaReaderTests.cs
+++ King.Data.Sql.Reflection.Unit.Test/SchemaReaderTests.cs
@@ -16,6 +16,12 @@
         public void Constructor()
         {
             new SchemaReader(Guid.NewGuid().ToString());
+        }
+
+        [Test]
+        public void IsISchemaReader()
+        {
+            Assert.IsNotNull(new SchemaReader(Guid.NewGuid().ToString()) as ISchemaReader);
         }

         [Test]


Improved warning message when weaver cannot be loaded

--- FodyIsolated/DelegateBuilders/DelegateBuilder.cs
+++ FodyIsolated/DelegateBuilders/DelegateBuilder.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Reflection;
 using System.Xml.Linq;
 using Mono.Cecil;
 using Mono.Cecil.Cil;
@@ -19,39 +20,68 @@

     static Dictionary<RuntimeTypeHandle, WeaverDelegate> weaverDelegates = new Dictionary<RuntimeTypeHandle, WeaverDelegate>();

-    public static WeaverDelegate BuildDelegateHolder(this  Type weaverType)
+    public static WeaverDelegate BuildDelegateHolder(this Type weaverType)
     {
-        Action<object, ModuleDefinition> moduleDefinitionDelegate;
+        Action<object, ModuleDefinition> moduleDefinitionDelegate;
         if (!weaverType.TryBuildPropertySetDelegate("ModuleDefinition", out moduleDefinitionDelegate))
         {
-            var message = string.Format("{0} must contain a public instance settable property named 'ModuleDefinition' of type 'Mono.Cecil.ModuleDefinition'.", weaverType.FullName);
+            var message = string.Format("Cannot load/use weaver {0}. Note that the weaver must contain a public instance settable property named 'ModuleDefinition' of type 'Mono.Cecil.ModuleDefinition'. If it does, make sure that it's referencing the right version of Mono.Cecil, which is '{1}'.", weaverType.FullName, GetAssemblyVersion(typeof(ModuleDefinition).Assembly));
             throw new WeavingException(message);
         }

         return new WeaverDelegate
+        {
+            Execute = weaverType.BuildExecuteDelegate(),
+            Cancel = weaverType.BuildCancelDelegate(),
+            AfterWeavingExecute = weaverType.BuildAfterWeavingDelegate(),
+            SetModuleDefinition = moduleDefinitionDelegate,
+            SetConfig = weaverType.BuildPropertySetDelegate<XElement>("Config"),
+            SetAddinDirectoryPath = weaverType.BuildPropertySetDelegate<string>("AddinDirectoryPath"),
+            SetAssemblyFilePath = weaverType.BuildPropertySetDelegate<string>("AssemblyFilePath"),
+            SetAssemblyResolver = weaverType.BuildPropertySetDelegate<IAssemblyResolver>("AssemblyResolver"),
+            SetLogError = weaverType.BuildPropertySetDelegate<Action<string>>("LogError"),
+            SetLogErrorPoint = weaverType.BuildPropertySetDelegate<Action<string, SequencePoint>>("LogErrorPoint"),
+            SetLogDebug = weaverType.BuildPropertySetDelegate<Action<string>>("LogDebug"),
+            SetLogInfo = weaverType.BuildPropertySetDelegate<Action<string>>("LogInfo"),
+            SetLogMessage = weaverType.BuildPropertySetDelegate<Action<string, MessageImportance>>("LogMessage"),
+            SetLogWarning = weaverType.BuildPropertySetDelegate<Action<string>>("LogWarning"),
+            SetLogWarningPoint = weaverType.BuildPropertySetDelegate<Action<string, SequencePoint>>("LogWarningPoint"),
+            SetReferences = weaverType.BuildPropertySetDelegate<string>("References"),
+            SetReferenceCopyLocalPaths = weaverType.BuildPropertySetDelegate<List<string>>("ReferenceCopyLocalPaths"),
+            SetSolutionDirectoryPath = weaverType.BuildPropertySetDelegate<string>("SolutionDirectoryPath"),
+            SetProjectDirectoryPath = weaverType.BuildPropertySetDelegate<string>("ProjectDirectoryPath"),
+            SetDefineConstants = weaverType.BuildPropertySetDelegate<List<string>>("DefineConstants"),
+            ConstructInstance = weaverType.BuildConstructorDelegate()
+        };
+    }
+
+    private static string GetAssemblyVersion(Assembly assembly, int separatorCount = 3)
+    {
+        separatorCount++;
+
+        // Get full name, which is in [name], Version=[version], Culture=[culture], PublicKeyToken=[publickeytoken] format
+        string assemblyFullName = assembly.FullName;
+
+        string[] splittedAssemblyFullName = assemblyFullName.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+        if (splittedAssemblyFullName.Length < 2)
+        {
+            return "unknown";
+        }
+
+        string version = splittedAssemblyFullName[1].Replace("Version=", string.Empty).Trim();
+        string[] versionSplit = version.Split('.');
+        version = versionSplit[0];
+        for (int i = 1; i < separatorCount; i++)
+        {
+            if (i >= versionSplit.Length)
             {
-                Execute = weaverType.BuildExecuteDelegate(),
-                Cancel = weaverType.BuildCancelDelegate(),
-                AfterWeavingExecute = weaverType.BuildAfterWeavingDelegate(),
-                SetModuleDefinition = moduleDefinitionDelegate,
-                SetConfig = weaverType.BuildPropertySetDelegate<XElement>("Config"),
-                SetAddinDirectoryPath = weaverType.BuildPropertySetDelegate<string>("AddinDirectoryPath"),
-                SetAssemblyFilePath = weaverType.BuildPropertySetDelegate<string>("AssemblyFilePath"),
-                SetAssemblyResolver = weaverType.BuildPropertySetDelegate<IAssemblyResolver>("AssemblyResolver"),
-                SetLogError = weaverType.BuildPropertySetDelegate<Action<string>>("LogError"),
-                SetLogErrorPoint = weaverType.BuildPropertySetDelegate<Action<string, SequencePoint>>("LogErrorPoint"),
-                SetLogDebug = weaverType.BuildPropertySetDelegate<Action<string>>("LogDebug"),
-                SetLogInfo = weaverType.BuildPropertySetDelegate<Action<string>>("LogInfo"),
-                SetLogMessage = weaverType.BuildPropertySetDelegate<Action<string, MessageImportance>>("LogMessage"),
-                SetLogWarning = weaverType.BuildPropertySetDelegate<Action<string>>("LogWarning"),
-                SetLogWarningPoint = weaverType.BuildPropertySetDelegate<Action<string, SequencePoint>>("LogWarningPoint"),
-                SetReferences = weaverType.BuildPropertySetDelegate<string>("References"),
-                SetReferenceCopyLocalPaths = weaverType.BuildPropertySetDelegate<List<string>>("ReferenceCopyLocalPaths"),
-                SetSolutionDirectoryPath = weaverType.BuildPropertySetDelegate<string>("SolutionDirectoryPath"),
-                SetProjectDirectoryPath = weaverType.BuildPropertySetDelegate<string>("ProjectDirectoryPath"),
-                SetDefineConstants = weaverType.BuildPropertySetDelegate<List<string>>("DefineConstants"),
-                ConstructInstance = weaverType.BuildConstructorDelegate()
-            };
+                break;
+            }
+
+            version += string.Format(".{0}", versionSplit[i]);
+        }
+
+        return version;
     }

 }


* Save connections when changed instead of just on exit

--- GCWZeroManager/GCWZeroManager/MainWindow.xaml.cs
+++ GCWZeroManager/GCWZeroManager/MainWindow.xaml.cs
@@ -48,6 +48,7 @@
                 comboBoxConnections.Items.Refresh();
                 comboBoxConnections.SelectedItem = null;
                 comboBoxConnections.SelectedItem = activeCn;
+                ConfigurationManager.Instance.SaveConnections();
             }
         }

@@ -62,6 +63,7 @@
                 ConnectionManager.Instance.AddConnection(cn);
                 comboBoxConnections.Items.Refresh();
                 comboBoxConnections.SelectedItem = cn;
+                ConfigurationManager.Instance.SaveConnections();
             }
         }

@@ -77,6 +79,7 @@
                 ConnectionManager.Instance.Connections.DeleteActiveConnection();
                 comboBoxConnections.Items.Refresh();
                 comboBoxConnections.SelectedItem = ConnectionManager.Instance.Connections.GetActiveConnection();
+                ConfigurationManager.Instance.SaveConnections();
             }
         }

@@ -95,6 +98,7 @@
         private void comboBoxConnections_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             ConnectionManager.Instance.Connections.SetActiveConnection((ConnectionNode)comboBoxConnections.SelectedItem);
+            ConfigurationManager.Instance.SaveConnections();
         }
     }
 }


improvement on paging LINQ

improvement on paging LINQ

--- Hangfire.AzureDocumentDB/DocumentDbConnection.cs
+++ Hangfire.AzureDocumentDB/DocumentDbConnection.cs
@@ -215,15 +215,15 @@
             if (key == null) throw new ArgumentNullException(nameof(key));

             FeedOptions feedOptions = new FeedOptions { MaxItemCount = endingAt + 1 };
+            endingAt += 1 - startingFrom;

             return Storage.Client.CreateDocumentQuery<Set>(Storage.CollectionUri, feedOptions)
                 .Where(s => s.DocumentType == DocumentTypes.Set && s.Key == key)
-                .OrderBy(s => s.Score)
-                .ToQueryResult()
                 .OrderBy(s => s.CreatedOn)
-                .Select((s, i) => new { s.Value, Index = i })
-                .Where(s => s.Index >= startingFrom && s.Index <= endingAt)
                 .Select(s => s.Value)
+                .ToQueryResult()
+                .Skip(startingFrom)
+                .Take(endingAt)
                 .ToList();
         }

@@ -487,15 +487,15 @@
             if (key == null) throw new ArgumentNullException(nameof(key));

             FeedOptions feedOptions = new FeedOptions { MaxItemCount = endingAt + 1 };
+            endingAt += 1 - startingFrom;

             return Storage.Client.CreateDocumentQuery<List>(Storage.CollectionUri, feedOptions)
                 .Where(l => l.DocumentType == DocumentTypes.List && l.Key == key)
                 .OrderByDescending(l => l.CreatedOn)
                 .Select(l => l.Value)
                 .ToQueryResult()
-                .Select((l, i) => new { Value = l, Index = i })
-                .Where(l => l.Index >= startingFrom && l.Index <= endingAt)
-                .Select(l => l.Value)
+                .Skip(startingFrom)
+                .Take(endingAt)
                 .ToList();
         }


All entities are added to the world now

All entities are added to the world now

--- AlgoritmeProjekt/Game1.cs
+++ AlgoritmeProjekt/Game1.cs
@@ -30,15 +30,33 @@
         {
             // TODO: Add your initialization logic here
             world = new World(Content, 10, 10);
-            world.AddEntity(new Wall() { Position = GridPos(0, 0) });
-            world.AddEntity(new Wall() { Position = GridPos(1, 0) });
-            world.AddEntity(new Wall() { Position = GridPos(2, 0) });

-            for (int i = 0; i < 5; i++)
+            world.AddEntity(new Portal() { Position = GridPos(0, 8) });
+            world.AddEntity(new Wizard() { Position = GridPos(1, 8) });
+
+            world.AddEntity(new Tower(TowerType.StormTower) { Position = GridPos(2, 4) });
+            world.AddEntity(new Tower(TowerType.IceTower) { Position = GridPos(8, 7) });
+
+            world.AddEntity(new Key() { Position = GridPos(0, 0) });
+            world.AddEntity(new Key() { Position = GridPos(9, 9) });
+
+            for (int y = 1; y <= 6; y++)
             {
-                world.AddEntity(new Tree() { Position = GridPos(2 + i, 7) });
-                world.AddEntity(new Tree() { Position = GridPos(2 + i, 9) });
+                for (int x = 4; x <= 6; x++)
+                {
+                    world.AddEntity(new Wall() { Position = GridPos(x, y) });
+                }
             }
+
+            for (int x = 2; x < 7; x++)
+            {
+                world.AddEntity(new Tree() { Position = GridPos(x, 7) });
+                world.AddEntity(new Tree() { Position = GridPos(x, 9) });
+            }
+
+            world.AddEntity(new Monster() { Position = GridPos(5, 8) });
+            world.AddEntity(new Monster() { Position = GridPos(6, 8) });
+            world.AddEntity(new Monster() { Position = GridPos(7, 8) });

             IsMouseVisible = true;
             this.graphics.PreferredBackBufferWidth = 480;


Updated for Sonya/Medivh patch

Updated for Sonya/Medivh patch

--- Heroes.ReplayParser/MPQFiles/ReplayGameEvents.cs
+++ Heroes.ReplayParser/MPQFiles/ReplayGameEvents.cs
@@ -137,7 +137,7 @@
                                 gameEvent.data.array[0] = new TrackerEventStructure { array = new TrackerEventStructure[26] };
                             else if(replayVersionMajor < 2)
 								gameEvent.data.array[0] = new TrackerEventStructure { array = new TrackerEventStructure[25] };
-							else if (replayBuild < 59837 || replayBuild == 59988)
+							else if (replayBuild < 59837 || replayBuild == 59988 || replayBuild > 62424)
 								gameEvent.data.array[0] = new TrackerEventStructure { array = new TrackerEventStructure[26] };
 							else
 								gameEvent.data.array[0] = new TrackerEventStructure { array = new TrackerEventStructure[27] };


Modified Form2: Don't need open and close connection on my fix

--- InventoryManagement/InventoryManagement/Form2.cs
+++ InventoryManagement/InventoryManagement/Form2.cs
@@ -103,7 +103,6 @@
             //Insert or update record and check for empty field
             String connStr = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database1.mdf;Integrated Security=True;User Instance=True";
             SqlConnection conn = new SqlConnection(connStr);
-            conn.Open();
             String sql = "SELECT * FROM [inventory]";
             SqlDataAdapter dAdapter = new SqlDataAdapter(sql, conn);
             DataTable dt = new DataTable();
@@ -152,7 +151,6 @@
                 needsUpdate = true;
                 Dispose();
             }
-            conn.Close();
         }

         new public bool ShowDialog()


Check also for Write privilege when detecting calendar access rights

--- CalDavSynchronizer/DataAccess/WebDavDataAccess.cs
+++ CalDavSynchronizer/DataAccess/WebDavDataAccess.cs
@@ -88,8 +88,9 @@
       XmlNode privilegeWriteContent = properties.XmlDocument.SelectSingleNode ("/D:multistatus/D:response/D:propstat/D:prop/D:current-user-privilege-set/D:privilege/D:write-content", properties.XmlNamespaceManager);
       XmlNode privilegeBind = properties.XmlDocument.SelectSingleNode ("/D:multistatus/D:response/D:propstat/D:prop/D:current-user-privilege-set/D:privilege/D:bind", properties.XmlNamespaceManager);
       XmlNode privilegeUnbind = properties.XmlDocument.SelectSingleNode ("/D:multistatus/D:response/D:propstat/D:prop/D:current-user-privilege-set/D:privilege/D:unbind", properties.XmlNamespaceManager);
-
-      return ((privilegeWriteContent != null) && (privilegeBind != null) && (privilegeUnbind != null));
+      XmlNode privilegeWrite = properties.XmlDocument.SelectSingleNode ("/D:multistatus/D:response/D:propstat/D:prop/D:current-user-privilege-set/D:privilege/D:write", properties.XmlNamespaceManager);
+
+      return ((privilegeWrite != null) || ((privilegeWriteContent != null) && (privilegeBind != null) && (privilegeUnbind != null)));
     }

     private async Task<string> GetEtag (Uri absoluteEntityUrl)


Another update to the query status messages!

--- LINQToTTree/LINQToTTreeLib/TTreeQueryExecutor.cs
+++ LINQToTTree/LINQToTTreeLib/TTreeQueryExecutor.cs
@@ -802,7 +802,7 @@
                         m.Append(", ");
                     m.Append($"{f.OriginalString}");
                 }
-                TraceHelpers.TraceInfo(30, $"LINQToTTree Executor: starting query on {m.ToString()}", TraceEventType.Start);
+                TraceHelpers.TraceInfo(30, $"LINQToTTree Executor: running {_queuedQueries.Count} queries on {m.ToString()}", TraceEventType.Start);
             }
         }


fix typo

fix typo

--- LanguageExt.Core/DataTypes/Arr/Arr.Extensions.cs
+++ LanguageExt.Core/DataTypes/Arr/Arr.Extensions.cs
@@ -1149,7 +1149,7 @@
                 mb.Add(a);
             }
         }
-        return new Arr<A>(ma);
+        return new Arr<A>(mb);
     }

     [Pure]


Fix pasting with skipped splits

Fix pasting with skipped splits

Resolves #867

--- LiveSplit/LiveSplit.View/View/RunEditorDialog.cs
+++ LiveSplit/LiveSplit.View/View/RunEditorDialog.cs
@@ -861,7 +861,7 @@

             if (e.Control && e.KeyCode == Keys.V)
             {
-                char[] rowSplitter = { '\r', '\n' };
+                char[] rowSplitter = { '\n' };
                 char[] columnSplitter = { '\t' };

                 IDataObject dataInClipboard = Clipboard.GetDataObject();
@@ -869,7 +869,7 @@

                 if (stringInClipboard != null && runGrid.SelectedCells.Count > 0)
                 {
-                    string[] rowsInClipboard = stringInClipboard.Split(rowSplitter, StringSplitOptions.RemoveEmptyEntries);
+                    string[] rowsInClipboard = stringInClipboard.Replace("\r\n", "\n").Split(rowSplitter);

                     int r = runGrid.SelectedCells[0].RowIndex;
                     int c = runGrid.SelectedCells[0].ColumnIndex;


git-svn-id: 21cdf44b51306c1f0753fc51e774ecf5fc1851ba@486 a61f9e97-bd4c-0410-8c65-85b29eaa70ff

--- Dorian/Libraries/Gorgon.HID/GorgonPointingDevice.cs
+++ Dorian/Libraries/Gorgon.HID/GorgonPointingDevice.cs
@@ -187,7 +187,7 @@
 		}

 		/// <summary>
-		/// Property to return the relative horizontal amount moved.
+		/// Property to return the relative amount moved.
 		/// </summary>
 		public PointF RelativePosition
 		{


make Bitcoin encoding safe again

make Bitcoin encoding safe again

--- src/Base58.cs
+++ src/Base58.cs
@@ -18,6 +18,7 @@
 public sealed class Base58 : IBaseCoder, INonAllocatingBaseCoder
 {
     private const int reductionFactor = 733; // https://github.com/bitcoin/bitcoin/blob/master/src/base58.cpp#L48
+    private const int divisor = 58;
     private static readonly Lazy<Base58> bitcoin = new(() => new Base58(Base58Alphabet.Bitcoin));
     private static readonly Lazy<Base58> ripple = new(() => new Base58(Base58Alphabet.Ripple));
     private static readonly Lazy<Base58> flickr = new(() => new Base58(Base58Alphabet.Flickr));
@@ -81,7 +82,7 @@
     public int GetSafeCharCountForEncoding(ReadOnlySpan<byte> bytes)
     {
         int bytesLen = bytes.Length;
-        int numZeroes = getZeroCount(bytes, bytesLen);
+        int numZeroes = getZeroCount(bytes);

         return getSafeCharCountForEncoding(bytesLen, numZeroes);
     }
@@ -93,29 +94,18 @@
     /// <returns>Encoded string.</returns>
     public unsafe string Encode(ReadOnlySpan<byte> bytes)
     {
-        int bytesLen = bytes.Length;
-        if (bytesLen == 0)
+        if (bytes.Length == 0)
         {
             return string.Empty;
         }

-        int numZeroes = getZeroCount(bytes, bytesLen);
-        int outputLen = getSafeCharCountForEncoding(bytesLen, numZeroes);
-        string output = new('\0', outputLen);
-
-        // 29.70µs (64.9x slower)   | 31.63µs (40.8x slower)
-        // 30.93µs (first tryencode impl)
-        // 29.36µs (single pass translation/copy + shift over multiply)
-        // 31.04µs (70x slower)     | 24.71µs (34.3x slower)
-        fixed (byte* inputPtr = bytes)
-        {
-            fixed (char* outputPtr = output)
-        {
-            return internalEncode(inputPtr, bytesLen, outputPtr, outputLen, numZeroes, out int length)
-                ? output[..length]
-                : throw new InvalidOperationException("Output buffer with insufficient size generated");
-        }
-        }
+        int numZeroes = getZeroCount(bytes);
+        int outputLen = getSafeCharCountForEncoding(bytes.Length, numZeroes);
+        Span<char> output = new char[outputLen];
+
+        return internalEncode(bytes, output, numZeroes, out int numCharsWritten)
+            ? new string(output[..numCharsWritten])
+            : throw new InvalidOperationException("Output buffer with insufficient size generated");
     }

     /// <summary>
@@ -138,37 +128,30 @@
         fixed (char* inputPtr = text)
         {
             fixed (byte* outputPtr = output)
-        {
+            {
 #pragma warning disable IDE0046 // Convert to conditional expression - prefer clarity
-            if (!internalDecode(
-                inputPtr,
-                textLen,
-                outputPtr,
-                outputLen,
-                numZeroes,
-                out int numBytesWritten))
-            {
-                throw new InvalidOperationException("Output buffer was too small while decoding Base58");
-            }
-
-            return output[..numBytesWritten];
+                if (!internalDecode(
+                    inputPtr,
+                    textLen,
+                    outputPtr,
+                    outputLen,
+                    numZeroes,
+                    out int numBytesWritten))
+                {
+                    throw new InvalidOperationException("Output buffer was too small while decoding Base58");
+                }
+
+                return output[..numBytesWritten];
 #pragma warning restore IDE0046 // Convert to conditional expression
-        }
+            }
         }
     }

     /// <inheritdoc/>
-    public unsafe bool TryEncode(ReadOnlySpan<byte> input, Span<char> output, out int numCharsWritten)
-    {
-        fixed (byte* inputPtr = input)
-        {
-            fixed (char* outputPtr = output)
-        {
-            int inputLen = input.Length;
-            int numZeroes = getZeroCount(input, inputLen);
-            return internalEncode(inputPtr, inputLen, outputPtr, output.Length, numZeroes, out numCharsWritten);
-        }
-        }
+    public bool TryEncode(ReadOnlySpan<byte> input, Span<char> output, out int numCharsWritten)
+    {
+        int numZeroes = getZeroCount(input);
+        return internalEncode(input, output, numZeroes, out numCharsWritten);
     }

     /// <inheritdoc/>
@@ -185,15 +168,15 @@
         fixed (char* inputPtr = input)
         {
             fixed (byte* outputPtr = output)
-        {
-            return internalDecode(
-                inputPtr,
-                input.Length,
-                outputPtr,
-                output.Length,
-                zeroCount,
-                out numBytesWritten);
-        }
+            {
+                return internalDecode(
+                    inputPtr,
+                    input.Length,
+                    outputPtr,
+                    output.Length,
+                    zeroCount,
+                    out numBytesWritten);
+            }
         }
     }

@@ -258,107 +241,109 @@
         return true;
     }

-    private unsafe bool internalEncode(
-        byte* inputPtr,
-        int inputLen,
-        char* outputPtr,
-        int outputLen,
+    private bool internalEncode(
+        ReadOnlySpan<byte> input,
+        Span<char> output,
         int numZeroes,
         out int numCharsWritten)
     {
-        if (inputLen == 0)
+        if (input.Length == 0)
         {
             numCharsWritten = 0;
             return true;
         }

-        fixed (char* alphabetPtr = Alphabet.Value)
-        {
-            byte* pInput = inputPtr + numZeroes;
-            byte* pInputEnd = inputPtr + inputLen;
-            char zeroChar = alphabetPtr[0];
-
-            // optimized path for an all zero buffer
-            if (pInput == pInputEnd)
-            {
-                if (outputLen < numZeroes)
-                {
-                    numCharsWritten = 0;
-                    return false;
-                }
-
-                for (int i = 0; i < numZeroes; i++)
-                {
-                    *outputPtr++ = zeroChar;
-                }
-
-                numCharsWritten = numZeroes;
-                return true;
-            }
-
-            int length = 0;
-            char* pOutput = outputPtr;
-            char* pLastChar = pOutput + outputLen - 1;
-            while (pInput != pInputEnd)
-            {
-                int carry = *pInput;
-                int i = 0;
-                for (char* pDigit = pLastChar; (carry != 0 || i < length)
-                    && pDigit >= outputPtr; pDigit--, i++)
-                {
-                    carry += *pDigit << 8;
-                    carry = Math.DivRem(carry, 58, out int remainder);
-                    *pDigit = (char)remainder;
-                }
-
-                length = i;
-                pInput++;
-            }
-
-            var pOutputEnd = pOutput + outputLen;
-
-            // copy the characters to the beginning of the buffer
-            // and translate them at the same time. if no copying
-            // is needed, this only acts as the translation phase.
-            for (char* a = outputPtr + numZeroes, b = pOutputEnd - length;
-                b != pOutputEnd;
-                a++, b++)
-            {
-                *a = alphabetPtr[*b];
-            }
-
-            // translate the zeroes at the start
-            while (pOutput != pOutputEnd)
-            {
-                char c = *pOutput;
-                if (c != '\0')
-                {
-                    break;
-                }
-
-                *pOutput = alphabetPtr[c];
-                pOutput++;
-            }
-
-            int actualLen = numZeroes + length;
-
-            numCharsWritten = actualLen;
-            return true;
-        }
-    }
-
-    private static unsafe int getZeroCount(ReadOnlySpan<byte> bytes, int bytesLen)
-    {
-        if (bytesLen == 0)
+        ReadOnlySpan<char> alphabet = Alphabet.Value;
+        if (numZeroes == input.Length)
+        {
+            return encodeAllZeroes(output, numZeroes, out numCharsWritten, alphabet[0]);
+        }
+
+        int numDigits = 0;
+        int index = numZeroes;
+        while (index < input.Length)
+        {
+            int carry = input[index++];
+            int i = 0;
+            for (int j = output.Length - 1; (carry != 0 || i < numDigits)
+                && j >= 0; j--, i++)
+            {
+                carry += output[j] << 8;
+                carry = Math.DivRem(carry, divisor, out int remainder);
+                output[j] = (char)remainder;
+            }
+
+            numDigits = i;
+        }
+
+        translatedCopy(output[^numDigits..], output[numZeroes..], alphabet);
+        if (numZeroes > 0)
+        {
+            output[..numZeroes].Fill(alphabet[0]);
+        }
+
+        numCharsWritten = numZeroes + numDigits;
+        return true;
+    }
+
+    private static void translatedCopy(
+        ReadOnlySpan<char> source,
+        Span<char> destination,
+        ReadOnlySpan<char> alphabet)
+    {
+        Debug.Assert(source.Length <= destination.Length, "source is too big");
+        for (int n = 0; n < source.Length; n++)
+        {
+            destination[n] = alphabet[source[n]];
+        }
+    }
+
+    private static bool encodeAllZeroes(
+        Span<char> output,
+        int numZeroes,
+        out int numCharsWritten,
+        char zeroChar)
+    {
+        if (output.Length < numZeroes)
+        {
+            // insufficient output buffer length
+            numCharsWritten = 0;
+            return false;
+        }
+
+        output[..numZeroes].Fill(zeroChar);
+        numCharsWritten = numZeroes;
+        return true;
+    }
+
+    private static int getZeroCount(ReadOnlySpan<byte> bytes)
+    {
+        int numZeroes = 0;
+        for (int i = 0; i < bytes.Length; i++)
+        {
+            if (bytes[i] != 0)
+            {
+                break;
+            }
+
+            numZeroes += 1;
+        }
+
+        return numZeroes;
+    }
+
+    private static unsafe int getPrefixCount(ReadOnlySpan<char> input, int length, char value)
+    {
+        if (length == 0)
         {
             return 0;
         }

         int numZeroes = 0;
-        fixed (byte* inputPtr = bytes)
+        fixed (char* inputPtr = input)
         {
             var pInput = inputPtr;
-            while (*pInput == 0 && numZeroes < bytesLen)
+            while (*pInput == value && numZeroes < length)
             {
                 numZeroes++;
                 pInput++;
@@ -368,27 +353,6 @@
         return numZeroes;
     }

-    private static unsafe int getPrefixCount(ReadOnlySpan<char> input, int length, char value)
-    {
-        if (length == 0)
-        {
-            return 0;
-        }
-
-        int numZeroes = 0;
-        fixed (char* inputPtr = input)
-        {
-            var pInput = inputPtr;
-            while (*pInput == value && numZeroes < length)
-            {
-                numZeroes++;
-                pInput++;
-            }
-        }
-
-        return numZeroes;
-    }
-
     private static int getSafeCharCountForEncoding(int bytesLen, int numZeroes)
     {
         const int growthPercentage = 138;


add IncreaseLevel function to GameObject.cs

--- ClickerGameEngine/ClickerGameEngine/GameObject.cs
+++ ClickerGameEngine/ClickerGameEngine/GameObject.cs
@@ -59,5 +59,20 @@
         {
             return _bitmap;
         }
+
+        //Increasing level, price and production. Each next object should be more expensive and provide better production
+        public void IncreaseLevel()
+        {
+            _level++;
+            _price = _price + ((_price * _level) / 10);
+            if (_level < 5)
+            {
+                _production = _production + ((_production * _level) / 8);
+            }
+            else
+            {
+                _production = _production + ((_production * _level) / 12);
+            }
+        }
     }
 }


Fix exception when dealing with deleted project.

from nathanpjones commit cbc642347087213b16f85e3e79cd661f972f1ee7

--- Vss2Git/VssPathMapper.cs
+++ Vss2Git/VssPathMapper.cs
@@ -597,7 +597,7 @@
                     {
                         ++rootLength;
                     }
-                    var subpath = projectSpec.Substring(rootLength);
+                    var subpath = projectSpec.Substring(Math.Min(rootLength, projectSpec.Length));
                     var subprojectNames = subpath.Split('/');
                     var projectInfo = rootInfo;
                     foreach (var subprojectName in subprojectNames)


Misc optimization

Misc optimization

--- ArchiSteamFarm/Trading.cs
+++ ArchiSteamFarm/Trading.cs
@@ -83,6 +83,13 @@
 				return;
 			}

+			tradeOffers.RemoveWhere(tradeoffer => tradeoffer.State != Steam.TradeOffer.ETradeOfferState.Active);
+			if (tradeOffers.Count == 0) {
+				return;
+			}
+
+			tradeOffers.TrimExcess();
+
 			await tradeOffers.ForEachAsync(ParseTrade).ConfigureAwait(false);
 			await Bot.AcceptConfirmations(true, Confirmation.ConfirmationType.Trade).ConfigureAwait(false);
 		}


TODO task

TODO task

--- PART/Source/CprBroker/CPRDirect/XML/EgenskabInterval.cs
+++ PART/Source/CprBroker/CPRDirect/XML/EgenskabInterval.cs
@@ -94,7 +94,7 @@

         public string ToFoedestedNavn()
         {
-            // TODO: birthname could be incorrect if historical data is not available (historical data is 5 years max anyway)
+            // TODO: Change this to birthplace
             var oldestName = HistoricalNameType.GetOldestName(this.HistoricalNames.AsEnumerable()) as INameSource;
             if (oldestName == null)
             {


Add test coverage for dragging readonly textboxes

--- osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs
+++ osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs
@@ -456,6 +456,59 @@
             AddAssert("text replaced", () => textBox.FlowingText == "another" && textBox.FlowingText == textBox.Text);
         }

+        [Test]
+        public void TestReadOnly()
+        {
+            BasicTextBox readOnlyTextBox = null;
+            BasicTextBox nonReadOnlyTextBox = null;
+
+            AddStep("add textboxes", () => textBoxes.AddRange(new[]
+            {
+                readOnlyTextBox = new BasicTextBox
+                {
+                    Text = "Readonly textbox",
+                    Size = new Vector2(500, 30),
+                    ReadOnly = true,
+                    TabbableContentContainer = textBoxes
+                },
+                nonReadOnlyTextBox = new BasicTextBox
+                {
+                    Text = "Standard textbox",
+                    Size = new Vector2(500, 30),
+                    TabbableContentContainer = textBoxes
+                }
+            }));
+
+            AddStep("click readonly textbox", () =>
+            {
+                InputManager.MoveMouseTo(readOnlyTextBox);
+                InputManager.Click(MouseButton.Left);
+            });
+            AddAssert("readonly textbox has no focus", () => !readOnlyTextBox.HasFocus);
+
+            AddStep("click non-readonly textbox", () =>
+            {
+                InputManager.MoveMouseTo(nonReadOnlyTextBox);
+                InputManager.Click(MouseButton.Left);
+            });
+            AddStep("try to tab backwards", () =>
+            {
+                InputManager.PressKey(Key.ShiftLeft);
+                InputManager.Key(Key.Tab);
+                InputManager.ReleaseKey(Key.ShiftLeft);
+            });
+            AddAssert("readonly textbox has no focus", () => !readOnlyTextBox.HasFocus);
+
+            AddStep("drag on readonly textbox", () =>
+            {
+                InputManager.MoveMouseTo(readOnlyTextBox.ScreenSpaceDrawQuad.Centre);
+                InputManager.PressButton(MouseButton.Left);
+                InputManager.MoveMouseTo(readOnlyTextBox.ScreenSpaceDrawQuad.TopLeft);
+                InputManager.ReleaseButton(MouseButton.Left);
+            });
+            AddAssert("readonly textbox has no focus", () => !readOnlyTextBox.HasFocus);
+        }
+
         public class InsertableTextBox : BasicTextBox
         {
             /// <summary>


Add more NonNull check

Add more NonNull check

--- Wox.Infrastructure/Wox.cs
+++ Wox.Infrastructure/Wox.cs
@@ -11,14 +11,14 @@
         public const string Plugins = "Plugins";

         private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
-        public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location).ToString();
+        public static readonly string ProgramDirectory = Directory.GetParent(Assembly.Location.NonNull()).ToString();
         public static readonly string ExecutablePath = Path.Combine(ProgramDirectory, Wox + ".exe");
         public static readonly string DataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Wox);
         public static readonly string PluginsDirectory = Path.Combine(DataDirectory, Plugins);
         public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
         public const string Repository = "https://github.com/Wox-launcher/Wox";
         public const string Issue = "https://github.com/Wox-launcher/Wox/issues/new";
-        public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location).ProductVersion;
+        public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;

         public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.png");
         public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.png");


.NET 4.6 seems consistent to fail here via dotnet test -f net46; it's worth to investigate

--- tests/CircuitBreaker.Net.Tests/CircuitBreakerTests.cs
+++ tests/CircuitBreaker.Net.Tests/CircuitBreakerTests.cs
@@ -63,7 +63,7 @@
                 Assert.ThrowsAny<Exception>(() => _sut.Execute(_throwAction));

                 Thread.Sleep(ResetTimeout);
-                Thread.Sleep(10);
+                Thread.Sleep(100);

                 _sut.Execute(_anyAction);
             }
@@ -157,7 +157,7 @@
                 await Assert.ThrowsAnyAsync<Exception>(() => _sut.ExecuteAsync(_throwAction));

                 Thread.Sleep(ResetTimeout);
-                Thread.Sleep(10);
+                Thread.Sleep(100);

                 await _sut.ExecuteAsync(_anyAction);
             }


#1036 reapply WAVE fixes

#1036 reapply WAVE fixes

--- MVC/NakedObjects.Mvc.App/Views/Home/Index.cshtml
+++ MVC/NakedObjects.Mvc.App/Views/Home/Index.cshtml
@@ -7,7 +7,10 @@

-
@(Html.SystemMessages())

+        @{ MvcHtmlString messages = Html.SystemMessages(); }
+        @if (!string.IsNullOrWhiteSpace(messages.ToString())) {
+
@(messages)

+        }
         @Html.UserMessages()


add overall parentheses after seeing "GA"

--- ArchivePDF/GaugeSetter.cs
+++ ArchivePDF/GaugeSetter.cs
@@ -76,7 +76,7 @@
               if (!Double.TryParse(swDim.GetSystemValue2("").ToString(), out og)) {
                 throw new GaugeSetterException("Couldn't parse dimension value.");
               }
-
+              swDispDim.ShowParenthesis = true;
               ourGauge = og / 0.0254;

               for (int i = 0; i < Gauges.Gauge.Length; i++) {
@@ -93,7 +93,6 @@

                     if (swDispDim.GetText((Int32)swDimensionTextParts_e.swDimensionTextCalloutBelow).Contains("(")) {
                       gaugeString = String.Format("{0} GA", Gauges.Gauge[i].GaugeNumber);
-                      swDispDim.ShowParenthesis = true;
                     } else {
                       gaugeString = String.Format("{0} GA", Gauges.Gauge[i].GaugeNumber);
                     }


use python 3.6.0 on windows if not already installed

--- WakaTime/Dependencies.cs
+++ WakaTime/Dependencies.cs
@@ -10,7 +10,7 @@
 {
     public class Dependencies
     {
-        private const string CurrentPythonVersion = "3.5.1";
+        private const string CurrentPythonVersion = "3.6.0";
         private static string PythonBinaryLocation { get; set; }
         private static string PythonDownloadUrl
         {


Add fill to default skin slider ball when tracking

--- osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs
+++ osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SliderBall.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Linq;
 using osu.Framework.Allocation;
+using osu.Framework.Bindables;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Shapes;
@@ -214,9 +215,13 @@

         public class DefaultSliderBall : CompositeDrawable
         {
+            private Box box;
+
             [BackgroundDependencyLoader]
             private void load(DrawableHitObject drawableObject, ISkinSource skin)
             {
+                var slider = (DrawableSlider)drawableObject;
+
                 RelativeSizeAxes = Axes.Both;

                 float radius = skin.GetConfig<OsuSkinConfiguration, float>(OsuSkinConfiguration.SliderPathRadius)?.Value ?? OsuHitObject.OBJECT_RADIUS;
@@ -231,14 +236,21 @@
                     BorderThickness = 10,
                     BorderColour = Color4.White,
                     Alpha = 1,
-                    Child = new Box
+                    Child = box = new Box
                     {
+                        Blending = BlendingParameters.Additive,
                         RelativeSizeAxes = Axes.Both,
                         Colour = Color4.White,
-                        Alpha = 0.4f,
+                        AlwaysPresent = true,
+                        Alpha = 0
                     }
                 };
-            }
+
+                slider.Tracking.BindValueChanged(trackingChanged, true);
+            }
+
+            private void trackingChanged(ValueChangedEvent<bool> tracking) =>
+                box.FadeTo(tracking.NewValue ? 0.6f : 0.05f, 200, Easing.OutQuint);
         }
     }
 }


Fix #608

Fix #608

--- Wox/SettingWindow.xaml.cs
+++ Wox/SettingWindow.xaml.cs
@@ -120,7 +120,6 @@
             cbIgnoreHotkeysOnFullscreen.IsChecked = _settings.IgnoreHotkeysOnFullscreen;
             AutoUpdatesCheckBox.IsChecked = _settings.AutoUpdates;

-            LoadLanguages();
             comboMaxResultsToShow.ItemsSource = Enumerable.Range(2, 16);
             var maxResults = _settings.MaxResultsToShow;
             comboMaxResultsToShow.SelectedItem = maxResults == 0 ? 6 : maxResults;
@@ -151,6 +150,7 @@

             #endregion

+            LoadLanguages();
             settingsLoaded = true;
         }


Feature Added

Feature Added

Filteration is now fully working.

--- Warframe_Alerts/Form1.cs
+++ Warframe_Alerts/Form1.cs
@@ -126,28 +126,32 @@
                 string Faction = Alerts[i].Faction;
                 string A_ID = Alerts[i].ID;

-                TimeSpan A_Span = E_Time.Subtract(DateTime.Now);
-                string A_Left = "";
+                if (Filter_Alerts(Title))
+                {
+                    TimeSpan A_Span = E_Time.Subtract(DateTime.Now);
+                    string A_Left = "";
+
+                    if (A_Span.Days != 0)
+                    {
+                        A_Left = A_Left + A_Span.Days.ToString() + " Days ";
+                    }
+
+                    if (A_Span.Hours != 0)
+                    {
+                        A_Left = A_Left + A_Span.Hours.ToString() + " Hours ";
+                    }
+
+                    if (A_Span.Minutes != 0)
+                    {
+                        A_Left = A_Left + A_Span.Minutes.ToString() + " Minutes ";
+                    }
+
+                    A_Left = A_Left + A_Span.Seconds.ToString() + " Seconds Left";
+
+                    ID_List.Add(A_ID);
+                    AlertData.Rows.Add(Description, Title, Faction, A_Left);
+                }

-                if (A_Span.Days != 0)
-                {
-                    A_Left = A_Left + A_Span.Days.ToString() + " Days ";
-                }
-
-                if (A_Span.Hours != 0)
-                {
-                    A_Left = A_Left + A_Span.Hours.ToString() + " Hours ";
-                }
-
-                if (A_Span.Minutes != 0)
-                {
-                    A_Left = A_Left + A_Span.Minutes.ToString() + " Minutes ";
-                }
-
-                A_Left = A_Left + A_Span.Seconds.ToString() + " Seconds Left";
-
-                ID_List.Add(A_ID);
-                AlertData.Rows.Add(Description, Title, Faction, A_Left);
                 //AlertData.Rows.Add(Description, Title, Faction, Time_Left + " min left");
             }

@@ -322,6 +326,60 @@
             }
         }

+        private bool Filter_Alerts(string Title)
+        {
+            bool Flag = true;
+
+            if (!F_Blueprints)
+            {
+                if (Title.IndexOf("(Blueprint)") != -1)
+                {
+                    Flag = false;
+                }
+            }
+
+            if (!F_Credits)
+            {
+                int DashCount = 0;
+
+                for (int i = 0; i < Title.Length; i++)
+                {
+                    if (Title[i] == '-')
+                    {
+                        DashCount++;
+                    }
+                }
+
+                if (DashCount == 2)
+                {
+                    string[] Arr = Title.Split('-');
+
+                    if (Arr[0].IndexOf("cr") != -1)
+                    {
+                        Flag = false;
+                    }
+                }
+            }
+
+            if (!F_Mods)
+            {
+                if (Title.IndexOf("(Mod)") != -1)
+                {
+                    Flag = false;
+                }
+            }
+
+            if (!F_Resources)
+            {
+                if (Title.IndexOf("Resource") != -1 || Title.IndexOf("ENDO") != -1)
+                {
+                    Flag = false;
+                }
+            }
+
+            return Flag;
+        }
+
         public int Update_Interval
         {
             get


Migrate beatmap carousel test to AddUntilStep

Due to non-deterministic test failures in TestSceneBeatmapCarousel,
migrate the checkSelected helper step from AddAssert to AddUntilStep.
This adds more leniency for performance-related issues while still
checking the desired behaviour.

--- osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs
+++ osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapCarousel.cs
@@ -83,7 +83,7 @@
             AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);

         private void checkSelected(int set, int? diff = null) =>
-            AddAssert($"selected is set{set}{(diff.HasValue ? $" diff{diff.Value}" : "")}", () =>
+            AddUntilStep($"selected is set{set}{(diff.HasValue ? $" diff{diff.Value}" : "")}", () =>
             {
                 if (diff != null)
                     return carousel.SelectedBeatmap == carousel.BeatmapSets.Skip(set - 1).First().Beatmaps.Skip(diff.Value - 1).First();


Renamed MakeDelegateType to MakeDelegateTypeInternal

--- Framework.Core/Theraot/Reflection/DelegateHelper.cs
+++ Framework.Core/Theraot/Reflection/DelegateHelper.cs
@@ -28,7 +28,7 @@

         private static readonly Type[] _delegateCtorSignature = { typeof(object), typeof(IntPtr) };

-        internal static Type MakeDelegateType(params Type[] types)
+        internal static Type MakeDelegateTypeInternal(params Type[] types)
         {
             lock (_delegateCache)
             {


Perform deletion directly via EditorBeatmap

--- osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
+++ osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
@@ -38,7 +38,7 @@
         private Drawable outline;

         [Resolved(CanBeNull = true)]
-        private IPlacementHandler placementHandler { get; set; }
+        private EditorBeatmap editorBeatmap { get; set; }

         public SelectionHandler()
         {
@@ -146,7 +146,7 @@
         private void deleteSelected()
         {
             foreach (var h in selectedBlueprints.ToList())
-                placementHandler.Delete(h.HitObject);
+                editorBeatmap.Remove(h.HitObject);
         }

         #endregion


Update DbConnectionFactory.cs

Update DbConnectionFactory.cs

--- Main/Source/Effort.Shared/DbConnectionFactory.cs
+++ Main/Source/Effort.Shared/DbConnectionFactory.cs
@@ -46,10 +46,12 @@
             EffortProviderConfiguration.RegisterProvider();
         }

-        public static void SetLargeDataRowAttribute(int value)
+        public static int LargeDataRowAttribute
         {
-            LargeDataRowAttribute.LargePropertyCount = value;
+            get { return LargeDataRowAttribute.LargePropertyCount; }
+            set { LargeDataRowAttribute.LargePropertyCount = value; }
         }
+
         #region Persistent

         /// <summary>


Rewrite selection box computation logic with `RectangleF`'s helper methods

--- osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
+++ osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
@@ -328,21 +328,15 @@
                 return;

             // Move the rectangle to cover the items
-            var topLeft = new Vector2(float.MaxValue, float.MaxValue);
-            var bottomRight = new Vector2(float.MinValue, float.MinValue);
-
-            foreach (var blueprint in selectedBlueprints)
-            {
-                var blueprintRect = blueprint.SelectionQuad.AABBFloat;
-                topLeft = Vector2.ComponentMin(topLeft, ToLocalSpace(blueprintRect.TopLeft));
-                bottomRight = Vector2.ComponentMax(bottomRight, ToLocalSpace(blueprintRect.BottomRight));
-            }
-
-            topLeft -= new Vector2(5);
-            bottomRight += new Vector2(5);
-
-            content.Size = bottomRight - topLeft;
-            content.Position = topLeft;
+            RectangleF selectionRect = ToLocalSpace(selectedBlueprints.First().SelectionQuad).AABBFloat;
+
+            foreach (var blueprint in selectedBlueprints.Skip(1))
+                selectionRect = RectangleF.Union(selectionRect, ToLocalSpace(blueprint.SelectionQuad).AABBFloat);
+
+            selectionRect = selectionRect.Inflate(5f);
+
+            content.Position = selectionRect.Location;
+            content.Size = selectionRect.Size;
         }

         #endregion


tidy up code

tidy up code

--- MaterialDesignThemes.Wpf/SnackbarMessageQueue.cs
+++ MaterialDesignThemes.Wpf/SnackbarMessageQueue.cs
@@ -6,6 +6,7 @@
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Input;
+using System.Windows.Threading;

 namespace MaterialDesignThemes.Wpf
 {
@@ -272,15 +273,7 @@
                 }

                 //find a target
-                var snackbar = await exemplar.Dispatcher.InvokeAsync(() =>
-                {
-                    return _pairedSnackbars.FirstOrDefault(sb =>
-                    {
-                        if (!sb.IsLoaded || sb.Visibility != Visibility.Visible) return false;
-                        var window = Window.GetWindow(sb);
-                        return window != null && window.WindowState != WindowState.Minimized;
-                    });
-                });
+                var snackbar = await FindSnackbar(exemplar.Dispatcher);

                 //show message
                 if (snackbar != null)
@@ -308,6 +301,19 @@
                 else
                     _messageWaitingEvent.Reset();
             }
+        }
+
+        private DispatcherOperation<Snackbar> FindSnackbar(Dispatcher dispatcher)
+        {
+            return dispatcher.InvokeAsync(() =>
+            {
+                return _pairedSnackbars.FirstOrDefault(sb =>
+                {
+                    if (!sb.IsLoaded || sb.Visibility != Visibility.Visible) return false;
+                    var window = Window.GetWindow(sb);
+                    return window != null && window.WindowState != WindowState.Minimized;
+                });
+            });
         }

         private async Task ShowAsync(Snackbar snackbar, SnackbarMessageQueueItem messageQueueItem)


fixed bug with passing mod options from PluginMastersViewModel to AnalysisViewModel

--- ModAnalyzer/ViewModels/PluginMastersViewModel.cs
+++ ModAnalyzer/ViewModels/PluginMastersViewModel.cs
@@ -23,7 +23,7 @@
                 LogService.GroupMessage("analysis", "Missing master: " + item.FileName);
                 this.MissingMasters.Add(item);
             }
-            ModOptions = this.ModOptions;
+            this.ModOptions = ModOptions;
         }

         private void Continue() {


FSS-76 #time 15m Updated the Settings persistence class.

--- ModernApp4Me.WP8/Cache/M4MSettingsPersistence.cs
+++ ModernApp4Me.WP8/Cache/M4MSettingsPersistence.cs
@@ -43,11 +43,21 @@
             }
         }

-        public bool AddSetting(string key, object value)
+        /// <summary>
+        /// Adds the business object corresponding to the provided parameter into the Settings by specifying the key.
+        /// </summary>
+        /// <param name="key">the key corresponding to the business object</param>
+        /// <param name="value">the business object</param>
+        /// <returns>true in case of success, false otherwise</returns>
+        public bool Add(string key, object value)
         {
             lock (InstanceLock)
             {
-                M4MModernLogger.Instance.Debug("Adding the value : '" + value.ToString() + "'");
+                if (M4MModernLogger.Instance.IsDebugEnabled() == true)
+                {
+                    M4MModernLogger.Instance.Debug("Adding an object with the key '" + key + "' into the Settings");
+                }
+
                 var isAdded = true;

                 try
@@ -56,79 +66,124 @@
                     settings.Add(key, value);
                     settings.Save();
                 }
-                catch (Exception)
+                catch (Exception exception)
                 {
+                    if (M4MModernLogger.Instance.IsErrorEnabled() == true)
+                    {
+                        M4MModernLogger.Instance.Error("An error occurs while adding an object with the key : '" + key + "' into the Settings", exception);
+                    }
+
                     isAdded = false;
                 }

                 return isAdded;
-            }
+            }
         }

-        public bool UpdateSetting(string key, object value)
+        /// <summary>
+        /// Retrieves the business object stores into the Settings and corresponding to the specifying key.
+        /// </summary>
+        /// <param name="key">the key corresponding to the business object</param>
+        /// <returns>an <see cref="object"/> which can be null</returns>
+        public object Get(string key)
         {
-            var isUpdated = true;
+            lock (Instance)
+            {
+                if (M4MModernLogger.Instance.IsDebugEnabled() == true)
+                {
+                    M4MModernLogger.Instance.Debug("Getting the object with the key '" + key + "' from the Settings");
+                }

-            try
-            {
-                mutex.WaitOne();
+                object returnValue = null;

-                var settings = IsolatedStorageSettings.ApplicationSettings;
-                settings[key] = value;
-                settings.Save();
+                try
+                {
+                    returnValue = IsolatedStorageSettings.ApplicationSettings[key];
+                }
+                catch (Exception exception)
+                {
+                    if (M4MModernLogger.Instance.IsErrorEnabled() == true)
+                    {
+                        M4MModernLogger.Instance.Error("An error occurs while reading the object with the key : '" + key + "' from the Settings", exception);
+                    }
+
+                    returnValue = null;
+                }
+
+                return returnValue;
             }
-            catch (Exception)
-            {
-                isUpdated = false;
-            }
-            finally
-            {
-                mutex.ReleaseMutex();
-            }
-
-            return isUpdated;
         }

-        public object GetSetting(string key)
+        /// <summary>
+        /// Deletes the business object stores into the Settings and corresponding to the specifying key.
+        /// </summary>
+        /// <param name="key">the key corresponding to the business object</param>
+        /// <returns>true in case of success, false otherwise</returns>
+        public bool Remove(string key)
         {
-            object value = null;
+            lock (Instance)
+            {
+                if (M4MModernLogger.Instance.IsDebugEnabled() == true)
+                {
+                    M4MModernLogger.Instance.Debug("Removing the object with the key '" + key + "' from the Settings");
+                }

-            try
-            {
-                mutex.WaitOne();
-                value = IsolatedStorageSettings.ApplicationSettings[key];
+                var isRemoved = true;
+
+                try
+                {
+                    IsolatedStorageSettings.ApplicationSettings.Remove(key);
+                }
+                catch (Exception exception)
+                {
+                    if (M4MModernLogger.Instance.IsErrorEnabled() == true)
+                    {
+                        M4MModernLogger.Instance.Error("An error occurs while removing the object with the key : '" + key + "' from the Settings", exception);
+                    }
+
+                    isRemoved = false;
+                }
+
+                return isRemoved;
             }
-            catch (Exception)
-            {
-            }
-            finally
-            {
-                mutex.ReleaseMutex();
-            }
-
-            return value;
         }

-        public bool RemoveSetting(string key)
+        /// <summary>
+        /// Updates the business object stores into the Settings and corresponding to the specifying key.
+        /// </summary>
+        /// <param name="key">the key corresponding to the business object</param>
+        /// <param name="value">the business object</param>
+        /// <returns>true in case of success, false otherwise</returns>
+        public bool Update(string key, object value)
         {
-            var isRemoved = true;
+            lock (Instance)
+            {
+                if (M4MModernLogger.Instance.IsDebugEnabled() == true)
+                {
+                    M4MModernLogger.Instance.Debug("Updating the object with the key '" + key + "' into the Settings");
+                }

-            try
-            {
-                mutex.WaitOne();
+                var isUpdated = true;

-                IsolatedStorageSettings.ApplicationSettings.Remove(key);
+                try
+                {
+                    var settings = IsolatedStorageSettings.ApplicationSettings;
+                    settings[key] = value;
+                    settings.Save();
+                }
+                catch (Exception exception)
+                {
+                    if (M4MModernLogger.Instance.IsErrorEnabled() == true)
+                    {
+                        M4MModernLogger.Instance.Error("An error occurs while updating the object with the key : '" + key + "' intro the Settings", exception);
+                    }
+
+                    isUpdated = false;
+                }
+
+                return isUpdated;
             }
-            catch (Exception)
-            {
-                isRemoved = false;
-            }
-            finally
-            {
-                mutex.ReleaseMutex();
-            }
-
-            return isRemoved;
         }
+
     }
 }


- Experimental Branch Merge #335

- Experimental Branch Merge #335

git-svn-id: 61c3ae23f3a6520e9bc357b51591209af2ede9d8@1237 45b04e34-05f1-4d87-a130-40a8491d5c8b

--- Mosa/Platforms/x86/AddressModeConversionStage.cs
+++ Mosa/Platforms/x86/AddressModeConversionStage.cs
@@ -77,7 +77,7 @@
 		/// <param name="ctx">The conversion context.</param>
 		private static void ThreeTwoAddressConversion(Context ctx)
 		{
-			Operand opRes = ctx.Result;
+			Operand result = ctx.Result;
 			Operand op1 = ctx.Operand1;
 			Operand op2 = ctx.Operand2;

@@ -99,9 +99,9 @@
 			//    }
 			//    // In any other case just load it
 			//    else
-			ctx.InsertBefore().SetInstruction(CPUx86.Instruction.MovInstruction, eax, ctx.Operand1);
+			ctx.InsertBefore().SetInstruction(CPUx86.Instruction.MovInstruction, eax, op1);

-			ctx.InsertInstructionAfter(CPUx86.Instruction.MovInstruction, opRes, eax);
+			ctx.InsertInstructionAfter(CPUx86.Instruction.MovInstruction, result, eax);
 		}

 	}


Refactor - use constant for limiting each log entry grid

--- MultiMiner.UX/ViewModels/ApplicationViewModel.cs
+++ MultiMiner.UX/ViewModels/ApplicationViewModel.cs
@@ -2861,7 +2861,7 @@
                 {
                     //code to update UI
                     ApiLogEntries.Add(logEntry);
-                    while (ApiLogEntries.Count > 1000)
+                    while (ApiLogEntries.Count > MaxLogEntriesOnScreen)
                         ApiLogEntries.RemoveAt(0);
                 }), null);
             }
@@ -5192,7 +5192,7 @@
                     });

                     //only load MaxHistoryOnScreen
-                    previousHistory.RemoveRange(0, Math.Max(0, previousHistory.Count - MaxHistoryOnScreen));
+                    previousHistory.RemoveRange(0, Math.Max(0, previousHistory.Count - MaxLogEntriesOnScreen));

                     foreach (LogProcessCloseArgs logProcessCloseArgs in previousHistory)
                         LogCloseEntries.Add(logProcessCloseArgs);
@@ -5261,7 +5261,7 @@
         {
             LogLaunchEntries.Add(ea);

-            while (LogLaunchEntries.Count > 1000)
+            while (LogLaunchEntries.Count > MaxLogEntriesOnScreen)
                 LogLaunchEntries.RemoveAt(0);

             LogProcessLaunchToFile(ea);
@@ -5273,12 +5273,12 @@
             LogObjectToFile(ea, logFileName);
         }

-        private const int MaxHistoryOnScreen = 1000;
+        private const int MaxLogEntriesOnScreen = 1000;
         private void LogProcessClose(object sender, LogProcessCloseArgs ea)
         {
             LogCloseEntries.Add(ea);

-            while (LogCloseEntries.Count > MaxHistoryOnScreen)
+            while (LogCloseEntries.Count > MaxLogEntriesOnScreen)
                 LogCloseEntries.RemoveAt(0);

             LogProcessCloseToFile(ea);


added CN option to plugin Manual

added CN option to plugin Manual

--- letsencrypt-win-simple/Plugins/TargetPlugins/Manual.cs
+++ letsencrypt-win-simple/Plugins/TargetPlugins/Manual.cs
@@ -3,6 +3,7 @@
 using PKISharp.WACS.Services;
 using System.Collections.Generic;
 using System.Linq;
+using PKISharp.WACS.Extensions;

 namespace PKISharp.WACS.Plugins.TargetPlugins
 {
@@ -23,13 +24,18 @@
         Target ITargetPlugin.Default(IOptionsService optionsService)
         {
             var input = optionsService.TryGetRequiredOption(nameof(optionsService.Options.ManualHost), optionsService.Options.ManualHost);
-            return Create(input);
+            var target = Create(input);
+            target.CommonName = optionsService.Options.CommonName;
+            if (!target.IsCommonNameValid(_log)) return null;
+            return target;
         }

         Target ITargetPlugin.Aquire(IOptionsService optionsService, IInputService inputService, RunLevel runLevel)
         {
-           var input = inputService.RequestString("Enter comma-separated list of host names, starting with the primary one");
-           return Create(input);
+            var input = inputService.RequestString("Enter comma-separated list of host names, starting with the primary one");
+            var target = Create(input);
+            if (runLevel >= RunLevel.Advanced) target.AskForCommonNameChoice(inputService);
+            return target;
         }

         Target Create(string input)


tests

tests

--- tests/UnitTests/Inspectors/Types/MemberEventsFacts.cs
+++ tests/UnitTests/Inspectors/Types/MemberEventsFacts.cs
@@ -44,7 +44,7 @@
 				.InspectedBy(new EventsAdded())
 				.Build();

-			Assert.Equal(0, delta.Changes.Count);
+			Assert.Empty(delta.Changes);
 		}

 		[Fact]
@@ -64,7 +64,7 @@
 				.InspectedBy(new EventsAdded())
 				.Build();

-			Assert.Equal(0, delta.Changes.Count);
+			Assert.Empty(delta.Changes);
 		}

 		[Fact]
@@ -85,7 +85,7 @@
 				.InspectedBy(new EventsAdded())
 				.Build();

-			Assert.Equal(0, delta.Changes.Count);
+			Assert.Empty(delta.Changes);
 		}

 		[Fact]
@@ -105,7 +105,7 @@
 				.InspectedBy(new EventsObsolete())
 				.Build();

-			Assert.Equal(1, delta.Changes.Count);
+			Assert.Single(delta.Changes);
 		}

 		[Fact]
@@ -125,7 +125,7 @@
 				.InspectedBy(new EventsObsolete())
 				.Build();

-			Assert.Equal(1, delta.Changes.Count);
+			Assert.Single(delta.Changes);
 		}

 		[Fact]