Improve error message on EmptyConstraint

--- src/NUnitFramework/framework/Constraints/EmptyConstraint.cs
+++ src/NUnitFramework/framework/Constraints/EmptyConstraint.cs
@@ -53,7 +53,7 @@
             // NOTE: actual is string will fail for a null typed as string
             Type actualType = typeof(TActual);

-            if (typeof(TActual) == typeof(string))
+            if (actualType == typeof(string))
                 realConstraint = new EmptyStringConstraint();
             else if (actual == null)
                 throw new System.ArgumentException($"The actual value of type - {actualType} must be a string or a non-null IEnumerable or DirectoryInfo", nameof(actual));


tests

tests

--- src/OpenInApp.Common.Tests/Helpers/OpenInAppHelperTests.cs
+++ src/OpenInApp.Common.Tests/Helpers/OpenInAppHelperTests.cs
@@ -11,6 +11,8 @@
     [TestFixture()]
     public class OpenInAppHelperTests
     {
+        //Open in intellij
+        //open in rider
         //Open in “My Exe”
         //Open in IE 11 – check at spur
         //open in sublime text vs2012/vs2013?


Fix NRE when initially populating the benchmark repository

--- src/NodaTime.Web/Models/GoogleStorageBenchmarkRepository.cs
+++ src/NodaTime.Web/Models/GoogleStorageBenchmarkRepository.cs
@@ -28,7 +28,7 @@
             GoogleCredential credential)
         {
             StorageClient client = StorageClient.Create(credential);
-            cache = new TimerCache<CacheValue>(lifetime, CacheRefreshTime, () => CacheValue.Refresh(cache.Value, client), loggerFactory,
+            cache = new TimerCache<CacheValue>(lifetime, CacheRefreshTime, () => CacheValue.Refresh(cache?.Value ?? CacheValue.Empty, client), loggerFactory,
                 CacheValue.Empty);
         }


Only validate list of Roslyn code fixes and refactorings once

--- src/OmniSharp.Roslyn.CSharp/CodeActions/CodeActionHelper.cs
+++ src/OmniSharp.Roslyn.CSharp/CodeActions/CodeActionHelper.cs
@@ -176,9 +176,15 @@
             "ICSharpCode.NRefactory6.CSharp.Refactoring.ConditionIsAlwaysTrueOrFalseFixProvider"
         };

-        [ImportingConstructor]
-        public CodeActionHelper(IAssemblyLoader loader)
-        {
+        private static bool s_validated;
+
+        private static void ValidateRoslynList(IAssemblyLoader loader)
+        {
+            if (s_validated)
+            {
+                return;
+            }
+
             // Check to see if the Roslyn code fix and refactoring provider type names can be found.
             // If this fails, OmniSharp has updated to a new version of Roslyn and one of the type names changed.
             var csharpFeatureAssembly = loader.Load(Configuration.RoslynCSharpFeatures);
@@ -194,6 +200,14 @@
                     throw new InvalidOperationException($"Could not find '{typeName}'. Has this type name changed?");
                 }
             }
+
+            s_validated = true;
+        }
+
+        [ImportingConstructor]
+        public CodeActionHelper(IAssemblyLoader loader)
+        {
+            ValidateRoslynList(loader);
         }

         public bool IsDisallowed(string typeName)


#20539: Using reliable transactions when on SQL Azure

Work Item: 20539

--- src/Orchard/Data/Providers/SqlServerDataServicesProvider.cs
+++ src/Orchard/Data/Providers/SqlServerDataServicesProvider.cs
@@ -27,7 +27,7 @@
             persistence = persistence.ConnectionString(_connectionString);

             // when using Sql Server Azure, use a specific driver, c.f. https://orchard.codeplex.com/workitem/19315
-            if (_connectionString.ToLowerInvariant().Contains("database.windows.net")) {
+            if (IsAzureSql()) {
                 persistence = persistence.Driver<SqlAzureClientDriver>();
             }

@@ -36,6 +36,14 @@

         protected override void AlterConfiguration(Configuration config) {
             config.SetProperty(NHibernate.Cfg.Environment.PrepareSql, Boolean.TrueString);
+
+            if (IsAzureSql()) {
+                config.SetProperty(NHibernate.Cfg.Environment.TransactionStrategy, typeof(ReliableAdoNetWithDistributedTransactionFactory).AssemblyQualifiedName);
+            }
+        }
+
+        private bool IsAzureSql() {
+            return _connectionString.ToLowerInvariant().Contains("database.windows.net");
         }
     }
 }


UserEditorViewModel 클래스의 불필요한 스케줄링을 제거합니다.

--- src/ReactiveMvvm/Samples/UserManager/UserEditorViewModel.cs
+++ src/ReactiveMvvm/Samples/UserManager/UserEditorViewModel.cs
@@ -41,7 +41,7 @@
             this.Observe(c => c.EditEmail, p => p != Model.Email), Or);

         public IReactiveCommand RestoreCommand => ReactiveCommand.Create(
-            HasChanges.ObserveOnDispatcher(), _ => ProjectModel());
+            HasChanges, _ => ProjectModel());

         private bool HasValue(string s) => !string.IsNullOrWhiteSpace(s);


less .nop ops in debug

less .nop ops in debug

--- src/Peachpie.CodeAnalysis/CodeGen/Graph/BoundExpression.cs
+++ src/Peachpie.CodeAnalysis/CodeGen/Graph/BoundExpression.cs
@@ -3026,12 +3026,6 @@
                 //
                 cg.Builder.EmitOpCode(ILOpCode.Dup);        // <Blob>
                 cg.Emit_PhpStringBlob_Append(expr);// .Append( ... )
-
-                //
-                if (cg.IsDebug)
-                {
-                    cg.Builder.EmitOpCode(ILOpCode.Nop);
-                }
             }

             // new PhpString( <Blob> )


Avoid parallel operations on sqlite queries.

Should pass build now. Seems to be multi-threading issues with sqlite.

--- src/SJP.Schematic.Tests.Utilities/Integration/SakilaTest.cs
+++ src/SJP.Schematic.Tests.Utilities/Integration/SakilaTest.cs
@@ -22,7 +22,15 @@
             }
         }

-        public static ISchematicConnection SchematicConnection { get; } = new SchematicConnection(Connection, new SqliteDialect());
+        public static ISchematicConnection SchematicConnection
+        {
+            get
+            {
+                var connection = new SchematicConnection(Connection, new SqliteDialect());
+                connection.SetMaxConcurrentQueries(1);
+                return connection;
+            }
+        }

         private static string ConnectionString => "Data Source=" + SakilaDbPath;

@@ -51,10 +59,10 @@

         protected IDbConnection DbConnection => Connection.DbConnection;

-        protected IIdentifierDefaults IdentifierDefaults { get; } = Config.SchematicConnection.Dialect.GetIdentifierDefaultsAsync(Config.SchematicConnection).GetAwaiter().GetResult();
+        protected IIdentifierDefaults IdentifierDefaults => Connection.Dialect.GetIdentifierDefaultsAsync(Config.SchematicConnection).GetAwaiter().GetResult();

-        protected ISqliteConnectionPragma Pragma { get; } = new ConnectionPragma(Config.SchematicConnection);
+        protected ISqliteConnectionPragma Pragma => new ConnectionPragma(Connection);

-        protected ISqliteDatabase GetDatabase() => new SqliteRelationalDatabase(Config.SchematicConnection, IdentifierDefaults, Pragma);
+        protected ISqliteDatabase GetDatabase() => new SqliteRelationalDatabase(Connection, IdentifierDefaults, Pragma);
     }
 }


Disable test that doesn't work with xunit2

--- src/Scripting/CSharpTest.Desktop/InteractiveSessionTests.cs
+++ src/Scripting/CSharpTest.Desktop/InteractiveSessionTests.cs
@@ -159,7 +159,7 @@
             AssertEx.Equal(new[] { 2, 3, 4 }, state.ReturnValue);
         }

-        [Fact]
+        [Fact(Skip = "xunit2")]
         public async Task References1()
         {
             var options0 = ScriptOptions.Default.AddReferences(


Init controls for renderer. #94

Init controls for renderer. #94

--- src/SadConsole.Shared/Renderers/ControlsConsoleRenderer.cs
+++ src/SadConsole.Shared/Renderers/ControlsConsoleRenderer.cs
@@ -16,7 +16,7 @@
         /// <summary>
         /// Controls to render.
         /// </summary>
-        public List<Controls.ControlBase> Controls { get; set; }
+        public List<Controls.ControlBase> Controls { get; set; } = new List<SadConsole.Controls.ControlBase>();

         /// <summary>
         /// Renders a surface to the screen.


Fixed an issue where the auth service would add redirect query param values containing reverse proxy port numbers.

--- src/ServiceStack.ServiceInterface/AuthenticateAttribute.cs
+++ src/ServiceStack.ServiceInterface/AuthenticateAttribute.cs
@@ -91,7 +91,11 @@
                 var url = req.ResolveAbsoluteUrl(htmlRedirect);
                 if (includeRedirectParam)
                 {
-                    url = url.AddQueryParam("redirect", req.AbsoluteUri);
+                    // Adding req.AbsoluteUri directly ignores EndpointHostConfig.WebHostUrl settings, causing
+                    // problems when the current request comes from a reverse proxy.
+                    var appRelativeRequestPath = req.PathInfo.Insert(0, "~");
+                    var absoluteRequestPath = req.ResolveAbsoluteUrl(appRelativeRequestPath);
+                    url = url.AddQueryParam("redirect", absoluteRequestPath);
                 }

                 res.RedirectToUrl(url);


Track timer count and add Timer.ActiveCount (#25061)

* Track timer count and add Timer.Count

Part of https://github.com/dotnet/corefx/issues/38422

* Use lock to prevent tearing

* Add assert

* Rename Count to ActiveCount

* Fix build

--- src/System.Private.CoreLib/shared/System/Threading/Timer.cs
+++ src/System.Private.CoreLib/shared/System/Threading/Timer.cs
@@ -290,6 +290,8 @@

         #region Queue implementation

+        public long ActiveCount { get; private set; }
+
         public bool UpdateTimer(TimerQueueTimer timer, uint dueTime, uint period)
         {
             int nowTicks = TickCount;
@@ -304,6 +306,7 @@
                 // If the timer wasn't previously scheduled, now add it to the right list.
                 timer._short = shouldBeShort;
                 LinkTimer(timer);
+                ++ActiveCount;
             }
             else if (timer._short != shouldBeShort)
             {
@@ -379,6 +382,8 @@
         {
             if (timer._dueTime != Timeout.UnsignedInfinite)
             {
+                --ActiveCount;
+                Debug.Assert(ActiveCount >= 0);
                 UnlinkTimer(timer);
                 timer._prev = null;
                 timer._next = null;
@@ -826,6 +831,26 @@
             return _timer._timer.Change((uint)dueTime, (uint)period);
         }

+        /// <summary>
+        /// Gets the number of timers that are currently active. An active timer is registered to tick at some point in the
+        /// future, and has not yet been canceled.
+        /// </summary>
+        public static long ActiveCount
+        {
+            get
+            {
+                long count = 0;
+                foreach (TimerQueue queue in TimerQueue.Instances)
+                {
+                    lock (queue)
+                    {
+                        count += queue.ActiveCount;
+                    }
+                }
+                return count;
+            }
+        }
+
         public bool Dispose(WaitHandle notifyObject)
         {
             if (notifyObject == null)


format

format

--- src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
+++ src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
@@ -287,7 +287,7 @@
             CancellationToken cancellationToken)
         {
             // deny connection to proxy end points to avoid infinite connection loop.
-            if (Server.ProxyEndPoints.Any(x => x.Port == remotePort)
+            if (Server.ProxyEndPoints.Any(x => x.Port == remotePort)
                 && NetworkHelper.IsLocalIpAddress(remoteHostName))
             {
                 throw new Exception($"A client is making HTTP request to one of the listening ports of this proxy {remoteHostName}:{remotePort}");
@@ -334,7 +334,7 @@
             bool retry = true;
             var enabledSslProtocols = sslProtocol;

-            retry:
+retry:
             try
             {
                 bool socks = externalProxy != null && externalProxy.ProxyType != ExternalProxyType.Http;
@@ -807,8 +807,7 @@
                 return ((ProxySocket.ProxySocket)state).BeginConnect(address, port, requestCallback, state);
             }

-            static IAsyncResult beginConnect(string hostName, int port, AsyncCallback requestCallback,
-                object state)
+            static IAsyncResult beginConnect(string hostName, int port, AsyncCallback requestCallback, object state)
             {
                 return ((ProxySocket.ProxySocket)state).BeginConnect(hostName, port, requestCallback, state);
             }


Fix race in TaskCancelWaitTestCases.TaskCancelWait1() (#30615)

When `CancelChildren` is enabled (currently only in the `TaskCancelWait1` test)
we're hitting a race in `TaskCancelWaitTest.CreateTask()`:

1. Let's assume Task A is processing `node`
2. Task A spawns a new Task B for processing `node_1`
3. Task B starts and signals the `_countdownEvent`
4. `RealRun()` on the main thread exits the wait on `_countdownEvent`
5. `RealRun()` calls `Verify()` which loops through all the nodes and calls `VerifyCancel()`
6. We get an assertion because `CancellationToken.IsCancellationRequested` is false
7. Task A continues and sets the CancellationToken, but it is already too late by this point

To fix this race we wait on the task in `RealRun()` before proceeding to
the verification step.

This uncovered another issue:
Since `_countdownEvent` is accessed by multiple threads we have another
race between checking `_countdownEvent.IsSet` and `_countdownEvent.Signal()`.
This caused a `System.InvalidOperationException: Invalid attempt made to decrement the event's count below zero.`
Fixed it by locking access to the `_countdownEvent`.

Fixes https://github.com/dotnet/corefx/issues/20457
Fixes https://github.com/mono/mono/issues/6920

--- src/System.Threading.Tasks/tests/Task/TaskCancelWaitTest.cs
+++ src/System.Threading.Tasks/tests/Task/TaskCancelWaitTest.cs
@@ -70,6 +70,7 @@
                 {
                     case API.Cancel:
                         _taskTree.CancellationTokenSource.Cancel();
+                        _taskTree.Task.Wait();
                         break;

                     case API.Wait:
@@ -131,8 +132,11 @@

                     if (current.IsLeaf)
                     {
-                        if (!_countdownEvent.IsSet)
-                            _countdownEvent.Signal();
+                        lock (_countdownEvent)
+                        {
+                            if (!_countdownEvent.IsSet)
+                                _countdownEvent.Signal();
+                        }
                     }
                     else
                     {
@@ -162,10 +166,13 @@
                         }
                         finally
                         {
-                            // stop the tree creation and let the main thread proceed
-                            if (!_countdownEvent.IsSet)
+                            lock (_countdownEvent)
                             {
-                                _countdownEvent.Signal(_countdownEvent.CurrentCount);
+                                // stop the tree creation and let the main thread proceed
+                                if (!_countdownEvent.IsSet)
+                                {
+                                    _countdownEvent.Signal(_countdownEvent.CurrentCount);
+                                }
                             }
                         }
                     }
@@ -208,6 +215,7 @@
                         VerifyCancel(current);
                         VerifyResult(current);
                     });
+                    Assert.Null(_caughtException);
                     break;

                 //root task was calling wait


Add missing compile job metadata from reattach info query

--- src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs
+++ src/Tgstation.Server.Host/Components/ReattachInfoHandler.cs
@@ -98,8 +98,8 @@
 			await databaseContextFactory.UseContext(async (db) =>
 			{
 				var instance = await db.Instances.Where(x => x.Id == metadata.Id)
-					.Include(x => x.WatchdogReattachInformation).ThenInclude(x => x.Alpha)
-					.Include(x => x.WatchdogReattachInformation).ThenInclude(x => x.Bravo)
+					.Include(x => x.WatchdogReattachInformation).ThenInclude(x => x.Alpha).ThenInclude(x => x.CompileJob)
+					.Include(x => x.WatchdogReattachInformation).ThenInclude(x => x.Bravo).ThenInclude(x => x.CompileJob)
 					.FirstOrDefaultAsync(cancellationToken).ConfigureAwait(false);
 				result = instance.WatchdogReattachInformation;
 				if (result == default)


Update SolidColorBrushImpl.cs

Update SolidColorBrushImpl.cs

--- src/Windows/Perspex.Direct2D1/Media/SolidColorBrushImpl.cs
+++ src/Windows/Perspex.Direct2D1/Media/SolidColorBrushImpl.cs
@@ -10,7 +10,16 @@
     {
         public SolidColorBrushImpl(Perspex.Media.SolidColorBrush brush, SharpDX.Direct2D1.RenderTarget target)
         {
-            this.PlatformBrush = new SharpDX.Direct2D1.SolidColorBrush(target, brush?.Color.ToDirect2D() ?? new SharpDX.Color4(), new SharpDX.Direct2D1.BrushProperties { Opacity = brush != null ? (float)brush.Opacity : 1.0f, Transform = target.Transform });
+            this.PlatformBrush = new SharpDX.Direct2D1.SolidColorBrush(
+                target,
+                brush?.Color.ToDirect2D() ?? new SharpDX.Color4(),
+                new SharpDX.Direct2D1.BrushProperties
+                {
+                    Opacity = brush != null ? (float)brush.Opacity : 1.0f,
+                    Transform = target.Transform
+
+                }
+            );
         }
     }
 }


access AzureMonitorDiagnosticLogsEventSource in placeholder mode

--- src/WebJobs.Script.WebHost/Diagnostics/EtwEventGenerator.cs
+++ src/WebJobs.Script.WebHost/Diagnostics/EtwEventGenerator.cs
@@ -9,6 +9,13 @@
     internal class EtwEventGenerator : IEventGenerator
     {
         private const string EventTimestamp = "MM/dd/yyyy hh:mm:ss.fff tt";
+        private readonly AzureMonitorDiagnosticLogsEventSource _azureMonitorEventSource;
+
+        public EtwEventGenerator()
+        {
+            // Make sure this instance is accessed, even in placeholder mode (where no logs may use it).
+            _azureMonitorEventSource = AzureMonitorDiagnosticLogsEventSource.Instance;
+        }

         public void LogFunctionTraceEvent(LogLevel level, string subscriptionId, string appName, string functionName, string eventName, string source, string details, string summary, string exceptionType, string exceptionMessage, string functionInvocationId, string hostInstanceId, string activityId)
         {
@@ -62,14 +69,14 @@
                 case LogLevel.Trace:
                 case LogLevel.Debug:
                 case LogLevel.Information:
-                    AzureMonitorDiagnosticLogsEventSource.Instance.RaiseFunctionsDiagnosticEventInformational(resourceId, operationName, category, regionName, "Informational", properties);
+                    _azureMonitorEventSource.RaiseFunctionsDiagnosticEventInformational(resourceId, operationName, category, regionName, "Informational", properties);
                     break;
                 case LogLevel.Warning:
-                    AzureMonitorDiagnosticLogsEventSource.Instance.RaiseFunctionsDiagnosticEventWarning(resourceId, operationName, category, regionName, "Warning", properties);
+                    _azureMonitorEventSource.RaiseFunctionsDiagnosticEventWarning(resourceId, operationName, category, regionName, "Warning", properties);
                     break;
                 case LogLevel.Error:
                 case LogLevel.Critical:
-                    AzureMonitorDiagnosticLogsEventSource.Instance.RaiseFunctionsDiagnosticEventError(resourceId, operationName, category, regionName, "Error", properties);
+                    _azureMonitorEventSource.RaiseFunctionsDiagnosticEventError(resourceId, operationName, category, regionName, "Error", properties);
                     break;
             }
         }


Install allow nuspec/nupkg to be specified as install

Install will reset name and source to the location specified based on the
nupkg/nuspec. Further, if it is a nuspec, it will pack the nuspec first.

--- src/chocolatey/infrastructure.app/services/NugetService.cs
+++ src/chocolatey/infrastructure.app/services/NugetService.cs
@@ -185,6 +185,28 @@
             //todo: handle all

             SemanticVersion version = config.Version != null ? new SemanticVersion(config.Version) : null;
+
+            IList<string> packageNames = config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).or_empty_list_if_null().ToList();
+            if (packageNames.Count == 1)
+            {
+                var packageName = packageNames.FirstOrDefault();
+                if (packageName.EndsWith(Constants.PackageExtension) || packageName.EndsWith(Constants.ManifestExtension))
+                {
+                    this.Log().Debug("Updating source and package name to handle *.nupkg or *.nuspec file.");
+                    packageNames.Clear();
+                    packageNames.Add(_fileSystem.get_file_name_without_extension(packageName));
+                    config.Source = _fileSystem.get_directory_name(_fileSystem.get_full_path(packageName));
+
+                    if (packageName.EndsWith(Constants.ManifestExtension))
+                    {
+                        this.Log().Debug("Building nuspec file prior to install.");
+                        config.Input = packageName;
+                        // build package
+                        pack_run(config);
+                    }
+                }
+            }
+
             var packageManager = NugetCommon.GetPackageManager(config, _nugetLogger,
                                                                 installSuccessAction: (e) =>
                                                                     {
@@ -196,7 +218,7 @@
                                                                     },
                                                                 uninstallSuccessAction: null);

-            foreach (string packageName in config.PackageNames.Split(new[] { ApplicationParameters.PackageNamesSeparator }, StringSplitOptions.RemoveEmptyEntries).or_empty_list_if_null())
+            foreach (string packageName in packageNames.or_empty_list_if_null())
             {
                 if (packageName.to_lower().EndsWith(".config"))
                 {


Rename locals in tests.

Rename locals in tests.

--- Gu.Roslyn.Asserts.Tests/RoslynAssertTests.NoRefactoring.cs
+++ Gu.Roslyn.Asserts.Tests/RoslynAssertTests.NoRefactoring.cs
@@ -11,58 +11,58 @@
             [Test]
             public static void WhenNoActionWithPositionIndicated()
             {
-                var testCode = @"
+                var code = @"
 class ↓FOO
 {
 }";

                 var refactoring = new ClassNameToUpperCaseRefactoringProvider();
-                RoslynAssert.NoRefactoring(refactoring, testCode);
-                RoslynAssert.NoRefactoring(refactoring, testCode, title: "To uppercase");
+                RoslynAssert.NoRefactoring(refactoring, code);
+                RoslynAssert.NoRefactoring(refactoring, code, title: "To uppercase");
             }

             [Test]
             public static void WhenNoActionWithSPan()
             {
-                var testCode = @"
+                var code = @"
 class FOO
 {
 }";

                 var refactoring = new ClassNameToUpperCaseRefactoringProvider();
-                RoslynAssert.NoRefactoring(refactoring, testCode, new TextSpan(8, 3));
-                RoslynAssert.NoRefactoring(refactoring, testCode, new TextSpan(8, 3), title: "To uppercase");
+                RoslynAssert.NoRefactoring(refactoring, code, new TextSpan(8, 3));
+                RoslynAssert.NoRefactoring(refactoring, code, new TextSpan(8, 3), title: "To uppercase");
             }

             [Test]
             public static void WhenActionIsRegistered()
             {
-                var testCode = @"
+                var code = @"
 class ↓Foo
 {
 }";

                 var refactoring = new ClassNameToUpperCaseRefactoringProvider();
                 var expected = "Expected the refactoring to not register any code actions.";
-                var exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, testCode));
+                var exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, code));
                 Assert.AreEqual(expected, exception.Message);
-                exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, testCode, title: "To uppercase"));
+                exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, code, title: "To uppercase"));
                 Assert.AreEqual(expected, exception.Message);
             }

             [Test]
             public static void WhenActionIsRegisteredWithSpan()
             {
-                var testCode = @"
+                var code = @"
 class Foo
 {
 }";

                 var refactoring = new ClassNameToUpperCaseRefactoringProvider();
                 var expected = "Expected the refactoring to not register any code actions.";
-                var exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, testCode, new TextSpan(8, 3)));
+                var exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, code, new TextSpan(8, 3)));
                 Assert.AreEqual(expected, exception.Message);
-                exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, testCode, new TextSpan(8, 3), title: "To uppercase"));
+                exception = Assert.Throws<AssertException>(() => RoslynAssert.NoRefactoring(refactoring, code, new TextSpan(8, 3), title: "To uppercase"));
                 Assert.AreEqual(expected, exception.Message);
             }
         }


Added hello and built project

Added hello and built project

--- ConsoleApplication1/ConsoleApplication1/Program.cs
+++ ConsoleApplication1/ConsoleApplication1/Program.cs
@@ -10,6 +10,7 @@
     {
         static void Main(string[] args)
         {
+            Console.WriteLine("Hello");
         }
     }
 }


comic fix

comic fix

--- Coremero/Coremero.Plugin.Classic/ComicGenerator.cs
+++ Coremero/Coremero.Plugin.Classic/ComicGenerator.cs
@@ -9,6 +9,7 @@
 using Coremero.Messages;
 using Coremero.Utilities;
 using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;

 namespace Coremero.Plugin.Classic
 {
@@ -25,19 +26,31 @@
         public List<ComicMessage> Messages { get; set; } = new List<ComicMessage>();
     }

+    internal class LowercaseContractResolver : DefaultContractResolver
+    {
+        protected override string ResolvePropertyName(string propertyName)
+        {
+            return propertyName.ToLower();
+        }
+    }
+
     public class ComicGenerator : IPlugin
     {
         [Command("comic", Arguments = "Title", Help = "Creates a comic using the last random lines of chat.")]
         public async Task<IMessage> GenerateComic(IInvocationContext context, string title)
         {
+            if (string.IsNullOrEmpty(title))
+            {
+                title = "i forgot to add a title and im really dumb";
+            }
             if (context.Channel is IBufferedChannel)
             {
                 IBufferedChannel bufferedChannel = context.Channel as IBufferedChannel;
                 List<IBufferedMessage> messages = await bufferedChannel.GetLatestMessagesAsync(30);
-                messages = messages.Where(x => !x.Text.IsCommand()).ToList();
+                messages = messages.Where(x => !x.Text.IsCommand() && !string.IsNullOrEmpty(x.Text)).ToList();

                 Random rnd = new Random();
-                int panels = rnd.Next(4, 8);
+                int panels = rnd.Next(3, 6);

                 ComicPayload payload = new ComicPayload() { Title = title };

@@ -60,6 +73,7 @@
                 {
                     var content = new StringContent(JsonConvert.SerializeObject(payload), Encoding.UTF8, "application/json");
                     var result = await client.PostAsync($"http://localhost:5000/create", content);
+                    var content = new StringContent(JsonConvert.SerializeObject(payload, new JsonSerializerSettings() { ContractResolver = new LowercaseContractResolver()}), Encoding.UTF8, "application/json");
                     MemoryStream ms = new MemoryStream();
                     Stream s = await result.Content.ReadAsStreamAsync();
                     await s.CopyToAsync(ms);


[UDP] Don't re-split partial messages

[UDP] Don't re-split partial messages

--- Desktop/Tempest/Providers/Network/UdpConnection.cs
+++ Desktop/Tempest/Providers/Network/UdpConnection.cs
@@ -248,7 +248,7 @@
 			int length;
 			byte[] buffer = mserialzier.GetBytes (message, out length, new byte[2048]);

-			if (length > 497)
+			if (!(message is PartialMessage) && length > 497)
 			{
 				byte count = (byte)Math.Ceiling ((length / 497f));


copy properties used by database columns

--- EAAddinFramework/SchemaBuilder/EASchemaProperty.cs
+++ EAAddinFramework/SchemaBuilder/EASchemaProperty.cs
@@ -119,6 +119,12 @@
                 this.subSetProperty.isDerived = this.sourceProperty.isDerived;
                 this.subSetProperty.isUnique = this.sourceProperty.isUnique;
                 this.subSetProperty.isStatic = this.sourceProperty.isStatic;
+                //properties used by database columns in EA
+                ((UTF_EA.Attribute)this.subSetProperty).allowDuplicates = ((UTF_EA.Attribute)this.sourceProperty).allowDuplicates;
+                ((UTF_EA.Attribute)this.subSetProperty).isOrdered = ((UTF_EA.Attribute)this.sourceProperty).isOrdered;
+                ((UTF_EA.Attribute)this.subSetProperty).length = ((UTF_EA.Attribute)this.sourceProperty).length;
+                ((UTF_EA.Attribute)this.subSetProperty).precision = ((UTF_EA.Attribute)this.sourceProperty).precision;
+                ((UTF_EA.Attribute)this.subSetProperty).scale = ((UTF_EA.Attribute)this.sourceProperty).scale;
                 //Set position
                 if (this.settings.keepOriginalAttributeOrder)
                 {


Fix problem with attribute ordering for new attributes in the subset

--- EAAddinFramework/SchemaBuilder/EASchemaProperty.cs
+++ EAAddinFramework/SchemaBuilder/EASchemaProperty.cs
@@ -116,8 +116,8 @@
                 this.subSetProperty.multiplicity = this.multiplicity;
                 this.subSetProperty.isID = this.sourceProperty.isID;
                 this.subSetProperty.visibility = this.sourceProperty.visibility;
-                //Set position for new items
-                if (this.isNew && !this.settings.setAttributeOrderZero)
+                //Set position
+                if (this.settings.keepOriginalAttributeOrder)
                 {
                     this.subSetProperty.position = this.sourceProperty.position;
                 }


Reworked stones.

Reworked stones.

--- EarthMagicItems/Ammo/Stones/GenericStoneStorage.cs
+++ EarthMagicItems/Ammo/Stones/GenericStoneStorage.cs
@@ -12,19 +12,51 @@
     {
         #region NormalStones

-        private GenericAmmo _1Stone = new GenericAmmo(new Die(2, 4, 0), "+1 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 1)), );
-        private GenericAmmo _2Stone = new GenericAmmo(new Die(3, 5, 0), "+2 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 2)), );
-        private GenericAmmo _3Stone = new GenericAmmo(new Die(4, 6, 0), "+3 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 3)), );
-        private GenericAmmo _4Stone = new GenericAmmo(new Die(5, 7, 0), "+4 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 4)), );
-        private GenericAmmo _5Stone = new GenericAmmo(new Die(6, 7, 0), "+5 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 5)), );
-        private GenericAmmo Stone = new GenericAmmo(new Die(1, 2, 0), "Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 0)), );
+        private GenericAmmo _1Stone = new GenericAmmo(new Die(2, 4, 0), "+1 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 1)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.+1Stone.md", .1);
+
+        private GenericAmmo _2Stone = new GenericAmmo(new Die(3, 5, 0), "+2 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 2)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.+2Stone.md", .1);
+
+        private GenericAmmo _3Stone = new GenericAmmo(new Die(4, 6, 0), "+3 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 3)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.+3Stone.md", .1);
+
+        private GenericAmmo _4Stone = new GenericAmmo(new Die(5, 7, 0), "+4 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 4)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.+4Stone.md", .1);
+
+        private GenericAmmo _5Stone = new GenericAmmo(new Die(6, 7, 0), "+5 Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 5)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.+5Stone.md", .1);
+
+        private GenericAmmo Stone = new GenericAmmo(new Die(1, 2, 0), "Stone", GenericStoneStorage.StandardStone(new Die(1, 4, 0)),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.Stone.md", .15);

         #endregion NormalStones

-        private GenericAmmo AcidStone = new GenericAmmo(new Die(1, 3, 0), false, 3, "Acid Stone", 17, new Damage(new Die(1, 8, 0), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()), new List<string> { }, new List<string> { });
-        private GenericAmmo FireStone = new GenericAmmo(new Die(1, 3, 0), false, 3, "Fire Stone", 17, new Damage(Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 8, 0), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()), new List<string> { }, new List<string> { });
-        private GenericAmmo FrostStone = new GenericAmmo(new Die(1, 3, 0), false, 3, "Frost Stone", 17, new Damage(Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 8, 0), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()), new List<string> { }, new List<string> { });
-        private GenericAmmo PoisonStone = new GenericAmmo(new Die(1, 3, 0), false, 3, "Poison Stone", 17, new Damage(Die.Zero(), new Die(1, 8, 0), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()), new List<string> { }, new List<string> { });
+        private GenericAmmo AcidStone = new GenericAmmo(new Die(1, 3, 0), "Acid Stone",
+            new Damage(new Die(1, 8, 0), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.AcidStone.md", .13);
+
+        private GenericAmmo FireStone = new GenericAmmo(new Die(1, 3, 0), "Fire Stone",
+            new Damage(Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 8, 0), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.FireStone.md", .2);
+
+        private GenericAmmo FrostStone = new GenericAmmo(new Die(1, 3, 0), "Frost Stone",
+            new Damage(Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 8, 0), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.FrostStone.md", .14);
+
+        private GenericAmmo PoisonStone = new GenericAmmo(new Die(1, 3, 0), "Poison Stone",
+            new Damage(Die.Zero(), new Die(1, 8, 0), Die.Zero(), Die.Zero(), Die.Zero(), Die.Zero(), new Die(1, 4, 0), Die.Zero(), Die.Zero()),
+            "EarthMagicDocumentation.ASCII_Art.Items.Ammo.Stone.txt",
+            "EarthMagicDocumentation.Items.Ammo.Stones.PoisonStone.md", .11);

         /// <summary>
         /// Creates a damage object for a arrow that only does normal piercing damage.


Make ReleaseType drawer collapsible.

Make ReleaseType drawer collapsible.

--- Editor/Build/Settings/UI/BuildReleaseTypeDrawer.cs
+++ Editor/Build/Settings/UI/BuildReleaseTypeDrawer.cs
@@ -7,8 +7,6 @@
 [CustomPropertyDrawer(typeof(BuildReleaseType))]
 public class BuildReleaseTypeDrawer : PropertyDrawer
 {
-    private bool show = true;
-
     public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
     {
         EditorGUI.BeginProperty(position, label, property);
@@ -19,7 +17,9 @@
             Event.current.character = '\0';
         }

-        UnityBuildGUIUtility.DropdownHeader(property.FindPropertyRelative("typeName").stringValue, ref show, GUILayout.ExpandWidth(true));
+        bool show = property.isExpanded;
+        UnityBuildGUIUtility.DropdownHeader(property.FindPropertyRelative("typeName").stringValue, ref show);
+        property.isExpanded = show;

         if (show)
         {


Fix crash when subscriber has not yet been set

--- EndlessClient/ControlSets/LoginPromptControlSet.cs
+++ EndlessClient/ControlSets/LoginPromptControlSet.cs
@@ -64,7 +64,8 @@
 			_clickHandler = new TextBoxClickEventHandler(_dispatcher, _allComponents.OfType<XNATextBox>().ToArray());
 			_tabHandler = new TextBoxTabEventHandler(_dispatcher, _allComponents.OfType<XNATextBox>().ToArray());

-			_dispatcher.Subscriber.Selected = false;
+			if (_dispatcher.Subscriber != null)
+				_dispatcher.Subscriber.Selected = false;
 			_dispatcher.Subscriber = _tbLogin;
 			_dispatcher.Subscriber.Selected = true;
 		}


Whyyyy

Whyyyy

--- Espera/Espera.View/ViewModels/SettingsViewModel.cs
+++ Espera/Espera.View/ViewModels/SettingsViewModel.cs
@@ -435,6 +435,7 @@
             {
                 this.ShowLogin = true;
             }
+
             else
             {
                 this.ShowSettings = true;


Update FDK version

Update FDK version

--- FDK/SoftFX.Extended.Net/Properties/AssemblyInfo.cs
+++ FDK/SoftFX.Extended.Net/Properties/AssemblyInfo.cs
@@ -39,5 +39,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.18.32.0")]
-[assembly: AssemblyFileVersion("1.18.32.0")]
+[assembly: AssemblyVersion("1.18.33.0")]
+[assembly: AssemblyFileVersion("1.18.33.0")]


Update FileService.cs (#97)

Update FileService.cs (#97)

--- Flashback.Uwp/Services/FileServices/FileService.cs
+++ Flashback.Uwp/Services/FileServices/FileService.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
@@ -26,9 +26,7 @@
                 newForumlist.Id, newForumlist
             }};

-            var exists = await FileHelper.FileExistsAsync(CACHEFILE);
-
-            if(!exists)
+            if(!await FileHelper.FileExistsAsync(CACHEFILE))
             {
                 fbCache = new FlashbackCacheList<Dictionary<string, ForumList>>();
             }
@@ -49,9 +47,7 @@

         public async Task<ForumList> TryGetFromCache(string key)
         {
-            var cacheExists = await FileHelper.FileExistsAsync(CACHEFILE);
-
-            if (!cacheExists)
+            if (!await FileHelper.FileExistsAsync(CACHEFILE))
             {
                 return null;
             }
@@ -85,9 +81,7 @@

         public async Task<List<FbItem>> GetExtraForums()
         {
-            var fileExists = await FileHelper.FileExistsAsync(EXTRAFORUMSFILE);
-
-            if (!fileExists)
+            if (!await FileHelper.FileExistsAsync(EXTRAFORUMSFILE))
             {
                 return new List<FbItem>();
             }
@@ -124,9 +118,7 @@

         public async Task<int?> GetLastVisitedPageForThread(string threadId)
         {
-            var fileExists = await FileHelper.FileExistsAsync(SMARTNAVIGATIONFILE);
-
-            if (!fileExists)
+            if (!await FileHelper.FileExistsAsync(SMARTNAVIGATIONFILE))
             {
                 return null;
             }
@@ -140,6 +132,5 @@
             }
         }

-
     }
 }


refactor(notifications): remove CanNotify method

--- Gitter/Gitter.Tasks/NotificationsBackgroundTask.cs
+++ Gitter/Gitter.Tasks/NotificationsBackgroundTask.cs
@@ -80,7 +80,18 @@
         private void CreateUnreadItemsNotification(Room room)
         {
             string id = room.Name;
-            if (CanNotify(id, room.UnreadItems))
+
+            // Detect if there is no new notification to launch (no unread messages)
+            if (_applicationStorageService.Exists(id))
+            {
+                // Reset notification id for the future
+                if (room.UnreadItems == 0)
+                    _applicationStorageService.Remove(id);
+
+                return;
+            }
+
+            if (room.UnreadItems > 0)
             {
                 // Show notifications (toast notifications)
                 string notificationContent = $"You have {room.UnreadItems} unread messages";
@@ -111,21 +122,6 @@
             }
         }

-        private bool CanNotify(string id, int itemCount)
-        {
-            // Detect if there is no new notification to launch (no unread messages)
-            if (_applicationStorageService.Exists(id))
-            {
-                // Reset notification id for the future
-                if (itemCount == 0)
-                    _applicationStorageService.Remove(id);
-
-                return false;
-            }
-
-            return itemCount > 0;
-        }
-
         #endregion
     }
 }


Small enhancement

Small enhancement

--- ITCC.HTTP.Server/Files/Requests/BaseFileRequest.cs
+++ ITCC.HTTP.Server/Files/Requests/BaseFileRequest.cs
@@ -28,10 +28,8 @@
         public abstract RequestRange Range { get; protected set; }
         public abstract bool BuildRequest(string fileName, HttpListenerRequest request);

-        public virtual async Task BuildResponse(HttpListenerContext context)
-        {
-            await BuildRangeResponse(context, FileName);
-        }
+        public virtual Task BuildResponse(HttpListenerContext context)
+            => BuildRangeResponse(context, FileName);

         #endregion


EZMBoneState

EZMBoneState

--- Infrastructure/CSharpGL.Models/EZM/EZMBoneState.cs
+++ Infrastructure/CSharpGL.Models/EZM/EZMBoneState.cs
@@ -10,31 +10,24 @@
         public EZMBoneState(vec3 position, Quaternion orientation, vec3 scale)
             : this()
         {
-            this.Position = position;
-            this.Orientation = orientation;
-            this.Scale = scale;
+            this.position = position;
+            this.orientation = orientation;
+            this.scale = scale;

-            mat4 S = glm.scale(mat4.identity(), this.Scale);
-            mat4 R = this.Orientation.ToMat4();
-            mat4 T = glm.translate(mat4.identity(), this.Position);
+            mat4 S = glm.scale(mat4.identity(), this.scale);
+            mat4 R = this.orientation.ToMat4();
+            mat4 T = glm.translate(mat4.identity(), this.position);
             this.matrix = T * R * S;
-            this.inverseMatrix = glm.inverse(this.matrix);
         }

-        public vec3 Position { get; private set; }
-
-        public Quaternion Orientation { get; private set; }
-
-        public vec3 Scale { get; private set; }
+        public readonly vec3 position;
+        public readonly Quaternion orientation;
+        public readonly vec3 scale;

         /// <summary>
         /// cache matrix from Position, Orientation and Scale.
         /// </summary>
-        public mat4 matrix;
-        /// <summary>
-        /// cache inversed matrix.
-        /// </summary>
-        public mat4 inverseMatrix;
+        public readonly mat4 matrix;

         //public void UpdateCache()
         //{
@@ -58,7 +51,7 @@

         public override string ToString()
         {
-            return string.Format("Orientation:{0} Pos:{1} Scale:{2}.", this.Orientation, this.Position, this.Scale);
+            return string.Format("Orientation:{0} Pos:{1} Scale:{2}.", this.orientation, this.position, this.scale);
         }

     }


Add additional xml doc and untabify

Add additional xml doc and untabify

--- CefSharp/ILifeSpanHandler.cs
+++ CefSharp/ILifeSpanHandler.cs
@@ -6,34 +6,35 @@
 {
     public interface ILifeSpanHandler
     {
-	    /// <summary>
-	    /// Called before a popup window is created.
-	    /// </summary>
-	    /// <param name="browser">The IWebBrowser control this request is for.</param>
-	    /// <param name="frame">The HTML frame that launched this popup.</param>
-	    /// <param name="targetUrl">The URL of the popup content. (This may be empty/null)</param>
-	    /// <param name="x"></param>
-	    /// <param name="y"></param>
-	    /// <param name="width"></param>
-	    /// <param name="height"></param>
-	    /// <param name="noJavascriptAccess"></param>
-	    /// <returns></returns>
-	    /// <remarks>
-	    /// CEF documentation:
-	    ///
-	    /// Called on the IO thread before a new popup window is created. The |browser|
-	    /// and |frame| parameters represent the source of the popup request. The
-	    /// |target_url| and |target_frame_name| values may be empty if none were
-	    /// specified with the request. The |popupFeatures| structure contains
-	    /// information about the requested popup window. To allow creation of the
-	    /// popup window optionally modify |windowInfo|, |client|, |settings| and
-	    /// |no_javascript_access| and return false. To cancel creation of the popup
-	    /// window return true. The |client| and |settings| values will default to the
-	    /// source browser's values. The |no_javascript_access| value indicates whether
-	    /// the new browser window should be scriptable and in the same process as the
-	    /// source browser.
-	    /// </remarks>
-	    bool OnBeforePopup(IWebBrowser browser, IFrame frame, string targetUrl, ref int x, ref int y, ref int width, ref int height, ref bool noJavascriptAccess);
+        /// <summary>
+        /// Called before a popup window is created.
+        /// </summary>
+        /// <param name="browser">The IWebBrowser control this request is for.</param>
+        /// <param name="frame">The HTML frame that launched this popup.</param>
+        /// <param name="targetUrl">The URL of the popup content. (This may be empty/null)</param>
+        /// <param name="x">x coord</param>
+        /// <param name="y">y coord</param>
+        /// <param name="width">width</param>
+        /// <param name="height">height</param>
+        /// <param name="noJavascriptAccess">value indicates whether the new browser window should be scriptable
+        /// and in the same process as the source browser.</param>
+        /// <returns>To cancel creation of the popup window return true otherwise return false.</returns>
+        /// <remarks>
+        /// CEF documentation:
+        ///
+        /// Called on the IO thread before a new popup window is created. The |browser|
+        /// and |frame| parameters represent the source of the popup request. The
+        /// |target_url| and |target_frame_name| values may be empty if none were
+        /// specified with the request. The |popupFeatures| structure contains
+        /// information about the requested popup window. To allow creation of the
+        /// popup window optionally modify |windowInfo|, |client|, |settings| and
+        /// |no_javascript_access| and return false. To cancel creation of the popup
+        /// window return true. The |client| and |settings| values will default to the
+        /// source browser's values. The |no_javascript_access| value indicates whether
+        /// the new browser window should be scriptable and in the same process as the
+        /// source browser.
+        /// </remarks>
+        bool OnBeforePopup(IWebBrowser browser, IFrame frame, string targetUrl, ref int x, ref int y, ref int width, ref int height, ref bool noJavascriptAccess);

         /// <summary>
         /// Called before a CefBrowser window (either the main browser for IWebBrowser,


Final playback fix

Final playback fix

--- MediaBrowser.Plugins.Revision3/Revision3Channel.cs
+++ MediaBrowser.Plugins.Revision3/Revision3Channel.cs
@@ -39,7 +39,7 @@
             get
             {
                 // Increment as needed to invalidate all caches
-                return "10";
+                return "11";
             }
         }

@@ -159,12 +159,16 @@

                     //var idNode = Regex.Match(html, "videoId=(?<id>.*)&e", RegexOptions.IgnoreCase);

-                    using (var video = await
-                        _httpClient.Get(
-                            "http://revision3.com/api/flash?video_id=" + id,
-                            cancellationToken)
-                            .ConfigureAwait(false))
-                    {
+                    var httpoptions = new HttpRequestOptions
+            {
+                Url = "http://revision3.com/api/flash?video_id=" + id,
+                CancellationToken = cancellationToken,
+                // Seeing errors about block length with this enabled
+                EnableHttpCompression = false
+            };
+
+                using (var video = await _httpClient.Get(httpoptions).ConfigureAwait(false))
+                {
                         HtmlNode.ElementsFlags.Remove("link");
                         page.Load(video);


Remote command ToggleContextMenu - map toggleContextMenu to ToggleContextPanel for playing media

--- MediaBrowser.UI/EntryPoints/WebSocketEntryPoint.cs
+++ MediaBrowser.UI/EntryPoints/WebSocketEntryPoint.cs
@@ -373,6 +373,8 @@
             }
         }

+
+
         void socket_GeneralCommand(object sender, GeneralCommandEventArgs e)
         {
             _logger.Debug("socket_GeneralCommand {0} {1}", e.KnownCommandType, e.Command.Arguments);
@@ -414,7 +416,7 @@
                         break;

                     case GeneralCommandType.ToggleContextMenu:
-                        _commandManager.ExecuteCommand(Command.Null, null);        // todo
+                        _commandManager.ExecuteCommand(Command.ToggleInfoPanel, null);        // todo generalise - make work not just for meida playing
                         break;

                     case GeneralCommandType.Select:


[Breakpoint] Add 'ignore' property.

[Breakpoint] Add 'ignore' property.

--- Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
+++ Mono.Debugging/Mono.Debugging.Client/Breakpoint.cs
@@ -39,6 +39,7 @@
 		string fileName;
 		int column;
 		int line;
+		bool ignore = false;

 		public Breakpoint (string fileName, int line, int column)
 		{
@@ -86,6 +87,9 @@
 			elem.SetAttribute ("line", line.ToString ());
 			elem.SetAttribute ("column", column.ToString ());

+			if (ignore)
+				elem.SetAttribute ("ignore", ignore.ToString ());
+
 			return elem;
 		}

@@ -110,6 +114,11 @@
 		public int Line {
 			get { return adjustedLine == -1 ? line : adjustedLine; }
 			protected set { line = value; }
+		}
+
+		public bool Ignore {
+			get => ignore;
+			protected set => ignore = value;
 		}

 		public void SetColumn (int newColumn)


Disable part of NativeDetourTest on macOS due to perms

--- MonoMod.UnitTest/RuntimeDetour/NativeDetourTest.cs
+++ MonoMod.UnitTest/RuntimeDetour/NativeDetourTest.cs
@@ -10,6 +10,7 @@
 using System.Reflection.Emit;
 using System.Text;
 using System.Runtime.InteropServices;
+using System.ComponentModel;

 namespace MonoMod.UnitTest {
     [Collection("RuntimeDetour")]
@@ -120,20 +121,36 @@
                 !DynDll.TryOpenLibrary($"libc.{PlatformHelper.LibrarySuffix}", out libc))
                 return;

+            bool manualApply = PlatformHelper.Is(Platform.MacOS);
+
             NativeDetour d = new NativeDetour(
                 libc.GetFunction("rand"),
-                ptr_not_rand
+                ptr_not_rand,
+                new NativeDetourConfig() {
+                    ManualApply = manualApply
+                }
             );

-            DidNothing = true;
-            Assert.Equal(-1, libc_rand());
-            Assert.False(DidNothing);
+            if (manualApply) {
+                try {
+                    d.Apply();
+                } catch (Win32Exception) {
+                    // Modern macOS doesn't give us permission to mess with this anymore.
+                    d.Dispose();
+                }
+            }

-            d.Dispose();
+            if (d.IsValid) {
+                DidNothing = true;
+                Assert.Equal(-1, libc_rand());
+                Assert.False(DidNothing);

-            DidNothing = true;
-            libc_rand();
-            Assert.True(DidNothing);
+                d.Dispose();
+
+                DidNothing = true;
+                libc_rand();
+                Assert.True(DidNothing);
+            }
         }

         [DllImport("msvcrt", EntryPoint = "rand", CallingConvention = CallingConvention.Cdecl)]


Appended comment.

Appended comment.

--- MyWpfGraphLibrary/MyMiscHelpers/MyBindingHelper.cs
+++ MyWpfGraphLibrary/MyMiscHelpers/MyBindingHelper.cs
@@ -88,7 +88,7 @@
 	// System.Windows.Input.ICommand は WPF だけでなく、WinRT や Silverlight でも使える模様。
 	// https://msdn.microsoft.com/ja-jp/library/hh563947(v=vs.110).aspx

-	public class DelegateCommand : System.Windows.Input.ICommand
+	public class MyDelegateCommand : System.Windows.Input.ICommand
 	{
 		public event Action<object> ExecuteHandler;
 		public event Func<object, bool> CanExecuteHandler;
@@ -101,7 +101,7 @@
 		/// <param name="parameter"></param>
 		public void Execute(object parameter)
 		{
-			var handler = ExecuteHandler;
+			var handler = this.ExecuteHandler;
 			if (handler != null)
 			{
 				handler(parameter);
@@ -115,13 +115,14 @@
 		/// <returns></returns>
 		public bool CanExecute(object parameter)
 		{
-			var handler = CanExecuteHandler;
+			var handler = this.CanExecuteHandler;
 			if (handler != null)
 			{
 				return handler(parameter);
 			}
 			else
 			{
+				// デリゲートがひとつも割り当てられていない場合は、既定で有効とする。
 				return true;
 			}
 		}
@@ -131,7 +132,7 @@
 		/// </summary>
 		public void RaiseCanExecuteChanged()
 		{
-			CanExecuteChanged(this, null);
+			this.CanExecuteChanged(this, null);
 		}
 	}


#96 fixed fusedav directory listing

#96 fixed fusedav directory listing

--- NWebDav/NWebDav.Server/Handlers/PropFindHandler.cs
+++ NWebDav/NWebDav.Server/Handlers/PropFindHandler.cs
@@ -120,9 +120,16 @@
             // Add all the properties
             foreach (var entry in entries)
             {
+                // fusedav 0.2 differs files from folders using ending '/'
+                bool isCollection = entry.Entry is IStoreCollection;
+                string href = entry.Uri.LocalPath;
+                href = isCollection
+                    ? href.EndsWith("/") ? href : href + "/"
+                    : entry.Uri.LocalPath.TrimEnd('/');
+
                 // Create the property
                 var xResponse = new XElement(WebDavNamespaces.DavNs + "response",
-                    new XElement(WebDavNamespaces.DavNs + "href", entry.Uri.LocalPath));
+                    new XElement(WebDavNamespaces.DavNs + "href", href));

                 // Create tags for property values
                 var xPropStatValues = new XElement(WebDavNamespaces.DavNs + "propstat");


File wants to be committed

File wants to be committed

--- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3313,7 +3313,7 @@
                 texcolor.B = Util.Clip((float)color.Z, 0.0f, 1.0f);
                 tex.FaceTextures[face].RGBA = texcolor;
                 UpdateTexture(tex);
-                TriggerScriptChangedEvent(Changed.COLOR);
+                TriggerScriptChangedEvent(Changed.COLOR);
                 return;
             }
             else if (face == ALL_SIDES)
@@ -3335,7 +3335,7 @@
                     tex.DefaultTexture.RGBA = texcolor;
                 }
                 UpdateTexture(tex);
-                TriggerScriptChangedEvent(Changed.COLOR);
+                TriggerScriptChangedEvent(Changed.COLOR);
                 return;
             }
         }


Fixing tests

Fixing tests

--- src/tests/UnitTests/IO/GitLogEntryListTests.cs
+++ src/tests/UnitTests/IO/GitLogEntryListTests.cs
@@ -85,11 +85,10 @@
                     "Summary",
                     "Description",
                     commitTime, commitTime,
-                    new List<GitStatusEntry>(new[]
-                    {
-                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added,
-                            "SomeOriginalPath"),
-                    }),
+                    new List<GitStatusEntry>
+                    {
+                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added, "SomeOriginalPath"),
+                    },
                     "MergeA", "MergeB")
             };

@@ -125,11 +124,10 @@
                     "AuthorName", "AuthorEmail",
                     "Summary", "Description",
                     commitTime, commitTime,
-                    new List<GitStatusEntry>(new[]
-                    {
-                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added,
-                            "SomeOriginalPath"),
-                    }),
+                    new List<GitStatusEntry>
+                    {
+                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added, "SomeOriginalPath"),
+                    },
                     "MergeA", "MergeB"),
                 new GitLogEntry("`CommitID",
                     "`AuthorName", "`AuthorEmail",
@@ -143,27 +141,26 @@

             var otherEntries = new[]
             {
+                new GitLogEntry("CommitID",
+                    "AuthorName", "AuthorEmail",
+                    "AuthorName", "AuthorEmail",
+                    "Summary",
+                    "Description",
+                    commitTime, commitTime,
+                    new List<GitStatusEntry> {
+                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added, "SomeOriginalPath")
+                    },
+                    "MergeA", "MergeB"),
                 new GitLogEntry("`CommitID",
                     "`AuthorName", "`AuthorEmail",
                     "`AuthorName", "`AuthorEmail",
                     "`Summary",
                     "`Description",
                     commitTime, commitTime,
-                    new List<GitStatusEntry>(new[]
-                    {
-                        new GitStatusEntry("SomePath", "SomeFullPath", "SomeProjectPath", GitFileStatus.Added,
-                            "SomeOriginalPath"),
-                    }),
-                    "`MergeA", "`MergeB"),
-                new GitLogEntry("CommitID",
-                    "AuthorName", "AuthorEmail",
-                    "AuthorName", "AuthorEmail",
-                    "Summary",
-                    "Description",
-                    commitTime, commitTime,
-                    new List<GitStatusEntry>(),
-                    "MergeA", "MergeB")
-            };
+                    new List<GitStatusEntry>(),
+                    "`MergeA", "`MergeB")
+            };
+

             entries.AssertEqual(otherEntries);
         }


Adding tests

Adding tests

--- PokemonGoRaidBot.Tests/Tests/MessageParserTests.cs
+++ PokemonGoRaidBot.Tests/Tests/MessageParserTests.cs
@@ -29,6 +29,10 @@

         private List<string> GoodStringsDutch = new List<string>(new string[]
         {
+            "Ttar in Jlianapark nog 56 minuten",
+            "Snorlax naast Centraal Station 20 min resterend",
+            "Lapras bij Longboat nog 76 mins",
+            "Magikarp bij de Dom 2 en een half uur resterend",
             "Tyranitar in Julianapark 1 uur en 20 minuten resterend",
             "Tyranitar at Centraal Station nog 30 minuten",
         });


Initialize orders dictionary on start

Initialize orders dictionary on start

--- stateful-queues/Back_Stateful/Back_Stateful.cs
+++ stateful-queues/Back_Stateful/Back_Stateful.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Fabric;
 using System.IO;
 using System.Threading;
@@ -6,6 +7,7 @@
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.ServiceFabric.Data;
+using Microsoft.ServiceFabric.Data.Collections;
 using Microsoft.ServiceFabric.Services.Communication.AspNetCore;
 using Microsoft.ServiceFabric.Services.Communication.Runtime;
 using Microsoft.ServiceFabric.Services.Runtime;
@@ -46,9 +48,12 @@
             };
         }

-        protected override Task RunAsync(CancellationToken cancellationToken)
+        protected override async Task RunAsync(CancellationToken cancellationToken)
         {
-            return listener.Run();
+            await StateManager.GetOrAddAsync<IReliableDictionary<int, Order>>("orders")
+                    .ConfigureAwait(false);
+
+            await listener.Run();
         }
     }
 }


Fix per key device loading

Fix per key device loading

--- RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs
+++ RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs
@@ -114,7 +114,7 @@

                 try
                 {
-                    if (DeviceChecker.IsPerDeviceDeviceConnected)
+                    if (DeviceChecker.IsPerKeyDeviceConnected)
                     {
                         (string model, RGBDeviceType deviceType, int _, int _, string imageLayout, string layoutPath) = DeviceChecker.PerKeyDeviceData;
                         if (loadFilter.HasFlag(deviceType)) //TODO DarthAffe 07.12.2017: Check if it's worth to try another device if the one returned doesn't match the filter


Add diagonal movement to the pathfinder.

--- Roguelike/Roguelike/PathFinding/AStarPathFinder.cs
+++ Roguelike/Roguelike/PathFinding/AStarPathFinder.cs
@@ -38,12 +38,12 @@
                         continue;
                     }

-                    float cost = costSoFar[current] + 1f;
+                    float cost = costSoFar[current] + Distance(current, neighbour);

                     if (!costSoFar.ContainsKey(neighbour) || cost < costSoFar[neighbour])
                     {
                         costSoFar[neighbour] = cost;
-                        openSet.Enqueue(neighbour, cost + Distance(current.X, current.X, neighbour.X, neighbour.Y));
+                        openSet.Enqueue(neighbour, cost);
                         cameFrom[neighbour] = current;
                     }
                 }
@@ -52,9 +52,12 @@
             return null;
         }

-        private static float Distance(int x1, int y1, int x2, int y2)
+        private static float Distance(Point a, Point b)
         {
-            return Math.Abs(x1 - x2) + Math.Abs(y1 - y2);
+            var dx = Math.Abs(a.X - b.X);
+            var dy = Math.Abs(a.Y - b.Y);
+
+            return (float)Math.Sqrt(dx * dx + dy * dy);
         }

         private static IEnumerable<Point> GetNeighbours(Point current)
@@ -78,6 +81,26 @@
             {
                 yield return new Point(current.X, current.Y + 1);
             }
+
+            if (current.X > 0 && current.Y > 0 && Program.Game.Map.IsWalkable(current.X - 1, current.Y - 1))
+            {
+                yield return new Point(current.X - 1, current.Y - 1);
+            }
+
+            if (current.X < Program.Game.Map.Width - 1 && current.Y > 0 && Program.Game.Map.IsWalkable(current.X + 1, current.Y - 1))
+            {
+                yield return new Point(current.X + 1, current.Y - 1);
+            }
+
+            if (current.X > 0 && current.Y < Program.Game.Map.Height - 1 && Program.Game.Map.IsWalkable(current.X - 1, current.Y + 1))
+            {
+                yield return new Point(current.X - 1, current.Y + 1);
+            }
+
+            if (current.X < Program.Game.Map.Width - 1 && current.Y < Program.Game.Map.Height - 1 && Program.Game.Map.IsWalkable(current.X + 1, current.Y + 1))
+            {
+                yield return new Point(current.X + 1, current.Y + 1);
+            }
         }

         private static Queue<Point> ConstructPath(Dictionary<Point, Point> cameFrom, Point current)


Caliburn will set navigation params when view actived, walk around that by checking is the same fid

--- S1Nyan.ViewModel/ViewModels/ThreadListViewModel.cs
+++ S1Nyan.ViewModel/ViewModels/ThreadListViewModel.cs
@@ -84,23 +84,13 @@
         }

         private string _fid = null;
-        public void OnChangeFID(string fid, string title)
-        {
-            Title = title;
-            if (fid != null)
-            {
-                _fid = fid;
-                TotalPage = 0;
-                CurrentPage = 1;
-            }
-        }

         public string Fid
         {
             get { return _fid; }
             set
             {
-                if (value == null) return;
+                if (value == null || value == _fid) return;
                 _fid = value;
                 TotalPage = 0;
                 CurrentPage = 1;


Fixed Problem with String Formatter in CreateWordReport.CanExecute

--- Signum.Engine.Extensions/Word/WordTemplateLogic.cs
+++ Signum.Engine.Extensions/Word/WordTemplateLogic.cs
@@ -97,7 +97,7 @@
                     CanExecute = et =>
                     {
                         if (et.SystemWordTemplate != null && SystemWordTemplateLogic.RequiresExtraParameters(et.SystemWordTemplate))
-                            return "SystemWordTemplate ({1}) requires extra parameters".FormatWith(et.SystemWordTemplate);
+                            return "SystemWordTemplate ({0}) requires extra parameters".FormatWith(et.SystemWordTemplate);

                         return null;
                     },


Added null checks in ServiceHost for NodeHost and WebHost.

--- Source/Applications/openXDA/openXDA/ServiceHost.cs
+++ Source/Applications/openXDA/openXDA/ServiceHost.cs
@@ -408,14 +408,14 @@
         {
             ConfigurationFile.Reload();
             DatabaseConnectionFactory.ReloadConfiguration();
-            NodeHost.Reconfigure();
+            NodeHost?.Reconfigure();
             SendResponse(requestInfo, true);
         }

         // Reloads web host from configuration in the config file.
         private void ReloadWebHostHandler(ClientRequestInfo requestInfo)
         {
-            WebHost.Dispose();
+            WebHost?.Dispose();
             ConfigurationFile.Reload();
             DatabaseConnectionFactory.ReloadConfiguration();
             WebHost = new XDAWebHost(ConfigurationFile, NodeHost);
@@ -565,6 +565,9 @@

         private async Task<string> QueryFileNodeStatusAsync(AdoDataConnection connection)
         {
+            if (NodeHost is null)
+                return string.Empty;
+
             const string QueryFormat =
                 "SELECT " +
                 "    ActiveHost.URL HostURL, " +
@@ -641,6 +644,9 @@

         private string QueryAnalysisStatus(AdoDataConnection connection)
         {
+            if (NodeHost is null)
+                return string.Empty;
+
             const string Query =
                 "SELECT " +
                 "    FileGroup.ProcessingStartTime, " +


2 more tests

2 more tests

--- Source/BalloonsPop.Tests/GameLogicProviderTests.cs
+++ Source/BalloonsPop.Tests/GameLogicProviderTests.cs
@@ -1,8 +1,8 @@
 namespace BalloonsPop.Tests
 {
     using Models;
-    using LogicProviders;
     using Microsoft.VisualStudio.TestTools.UnitTesting;
+    using System;

     [TestClass]
     public class GameLogicProviderTests
@@ -184,5 +184,37 @@

             Assert.IsTrue(EqualCharArrays(manualFieldAfter, gameFieldAfterShoot));
         }
+
+        [ExpectedException(typeof(ArgumentException))]
+        [TestMethod]
+        public void ShootBalloonAtPosition_ShouldThrowOnPopedPlace()
+        {
+            GameField gameField = new GameField(3, 3);
+            var fieldAsCharArr = gameField.GetField();
+
+            var manualFieldBefor = new char[,] {
+                { '1','.','1' },
+                { '2','.','2' },
+                { '1','2','2' }
+            };
+
+            var gameFieldAfterShoot = ShootAt1x1(manualFieldBefor);
+        }
+
+        [ExpectedException(typeof(ArgumentException))]
+        [TestMethod]
+        public void ShootBalloonAtPosition_ShouldThrowOnInvalidBalloonCoordinats()
+        {
+            GameField gameField = new GameField(3, 3);
+            var fieldAsCharArr = gameField.GetField();
+
+            var manualFieldBefor = new char[,] {
+                { '1','.','1' },
+                { '2','e','2' },
+                { '1','2','2' }
+            };
+
+            var gameFieldAfterShoot = ShootAt1x1(manualFieldBefor);
+        }
     }
 }