Added tests for SftpDownloadAsyncResult.

--- src/Renci.SshNet.Tests/Classes/Sftp/SftpDownloadAsyncResultTest.cs
+++ src/Renci.SshNet.Tests/Classes/Sftp/SftpDownloadAsyncResultTest.cs
@@ -1,4 +1,6 @@
 using System;
+using System.IO;
+using System.Threading;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using Renci.SshNet.Sftp;
 using Renci.SshNet.Tests.Common;
@@ -12,17 +14,71 @@
     [TestClass]
     public class SftpDownloadAsyncResultTest : TestBase
     {
-        /// <summary>
-        ///A test for SftpDownloadAsyncResult Constructor
-        ///</summary>
         [TestMethod]
-        [Ignore] // placeholder
         public void SftpDownloadAsyncResultConstructorTest()
         {
-            AsyncCallback asyncCallback = null; // TODO: Initialize to an appropriate value
-            object state = null; // TODO: Initialize to an appropriate value
-            SftpDownloadAsyncResult target = new SftpDownloadAsyncResult(asyncCallback, state);
-            Assert.Inconclusive("TODO: Implement code to verify target");
+            const AsyncCallback asyncCallback = null;
+            var state = new object();
+            var target = new SftpDownloadAsyncResult(asyncCallback, state);
+
+            Assert.IsFalse(target.CompletedSynchronously);
+            Assert.IsFalse(target.EndInvokeCalled);
+            Assert.IsFalse(target.IsCompleted);
+            Assert.IsFalse(target.IsDownloadCanceled);
+            Assert.AreEqual(0UL, target.DownloadedBytes);
+            Assert.AreSame(state, target.AsyncState);
+        }
+
+        [TestMethod]
+        public void SetAsCompleted_Exception_CompletedSynchronously()
+        {
+            var downloadCompleted = new ManualResetEvent(false);
+            object state = "STATE";
+            Exception exception = new IOException();
+            IAsyncResult callbackResult = null;
+            var target = new SftpDownloadAsyncResult(asyncResult =>
+                {
+                    downloadCompleted.Set();
+                    callbackResult = asyncResult;
+                }, state);
+
+            target.SetAsCompleted(exception, true);
+
+            Assert.AreSame(target, callbackResult);
+            Assert.IsFalse(target.IsDownloadCanceled);
+            Assert.IsTrue(target.IsCompleted);
+            Assert.IsTrue(target.CompletedSynchronously);
+            Assert.IsTrue(downloadCompleted.WaitOne(TimeSpan.Zero));
+        }
+
+        [TestMethod]
+        public void EndInvoke_CompletedWithException()
+        {
+            object state = "STATE";
+            Exception exception = new IOException();
+            var target = new SftpDownloadAsyncResult(null, state);
+            target.SetAsCompleted(exception, true);
+
+            try
+            {
+                target.EndInvoke();
+                Assert.Fail();
+            }
+            catch (IOException ex)
+            {
+                Assert.AreSame(exception, ex);
+            }
+        }
+
+        [TestMethod]
+        public void Update()
+        {
+            var target = new SftpDownloadAsyncResult(null, null);
+
+            target.Update(123);
+            target.Update(431);
+
+            Assert.AreEqual(431UL, target.DownloadedBytes);
         }
     }
 }


Enable disable audio tests

Enable disable audio tests

--- osu.Framework.Tests/Visual/Audio/TestSceneLoopingSample.cs
+++ osu.Framework.Tests/Visual/Audio/TestSceneLoopingSample.cs
@@ -19,7 +19,7 @@
             this.samples = samples;
         }

-        [Test, Ignore("Needs no audio device support")]
+        [Test]
         public void TestLoopingToggle()
         {
             AddStep("create sample", createSample);
@@ -36,7 +36,7 @@
             AddUntilStep("ensure stops", () => !sampleChannel.Playing);
         }

-        [Test, Ignore("Needs no audio device support")]
+        [Test]
         public void TestStopWhileLooping()
         {
             AddStep("create sample", createSample);


Add setting for absolute input mapping

Add setting for absolute input mapping

--- osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs
+++ osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs
@@ -32,6 +32,11 @@
                 {
                     LabelText = "Cursor Sensitivity",
                     Bindable = config.GetBindable<double>(FrameworkSetting.CursorSensitivity)
+                },
+                new SettingsCheckbox
+                {
+                    LabelText = "Map absolute input to window",
+                    Bindable = config.GetBindable<bool>(FrameworkSetting.MapAbsoluteInputToWindow)
                 },
                 new SettingsEnumDropdown<ConfineMouseMode>
                 {


Switched to 4-space tabs like the rest of the project.

--- aaLogReader.Tests/aaLgxReaderTests/aaLgxReaderTests.cs
+++ aaLogReader.Tests/aaLgxReaderTests/aaLgxReaderTests.cs
@@ -3,98 +3,101 @@

 namespace aaLogReader.Tests.aaLgxReaderTests
 {
-  [TestFixture]
-  public class aaLgxReaderTests
-  {
-    private const string LOG_FILE_PATH = @"aaLgxReaderTests\logFiles\test.aaLGX";
+    [TestFixture]
+    public class aaLgxReaderTests
+    {
+        private const string LOG_FILE_PATH = @"aaLgxReaderTests\logFiles\test.aaLGX";

-    [Test]
-    public void CanReadHeader()
-    {
-      var header = aaLgxReader.ReadLogHeader(LOG_FILE_PATH);
-      Assert.That(header.LogFilePath, Is.EqualTo(LOG_FILE_PATH));
-      Assert.That(header.StartMsgNumber, Is.EqualTo(0));
-      Assert.That(header.MsgCount, Is.EqualTo(683));
-      Assert.That(header.EndMsgNumber, Is.EqualTo(682));
-      Assert.That(header.StartFileTime, Is.EqualTo(130783241810947628));
-      Assert.That(header.EndFileTime, Is.EqualTo(130783316984931276));
-      Assert.That(header.OffsetFirstRecord, Is.EqualTo(68));
-      Assert.That(header.OffsetLastRecord, Is.EqualTo(191760));
-      Assert.That(header.ComputerName, Is.EqualTo("DSA2014R2"));
-      Assert.That(header.Session, Is.Null);
-      Assert.That(header.PrevFileName, Is.Null);
-      Assert.That(header.HostFQDN, Is.Null);
+        [Test]
+        public void CanReadHeader()
+        {
+            var header = aaLgxReader.ReadLogHeader(LOG_FILE_PATH);
+            Assert.That(header.LogFilePath, Is.EqualTo(LOG_FILE_PATH));
+            Assert.That(header.StartMsgNumber, Is.EqualTo(0));
+            Assert.That(header.MsgCount, Is.EqualTo(683));
+            Assert.That(header.EndMsgNumber, Is.EqualTo(682));
+            Assert.That(header.StartFileTime, Is.EqualTo(130783241810947628));
+            Assert.That(header.EndFileTime, Is.EqualTo(130783316984931276));
+            Assert.That(header.OffsetFirstRecord, Is.EqualTo(68));
+            Assert.That(header.OffsetLastRecord, Is.EqualTo(191760));
+            Assert.That(header.ComputerName, Is.EqualTo("DSA2014R2"));
+            Assert.That(header.Session, Is.Null);
+            Assert.That(header.PrevFileName, Is.Null);
+            Assert.That(header.HostFQDN, Is.Null);
+        }
+
+        [Test]
+        public void ReadsCorrectNumberOfRecords()
+        {
+            var header = aaLgxReader.ReadLogHeader(LOG_FILE_PATH);
+            var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
+            Assert.That(header.MsgCount, Is.GreaterThan(0));
+            Assert.That(header.MsgCount, Is.EqualTo(records.Count()));
+        }
+
+        [Test]
+        public void CanReadFirstRecord()
+        {
+            var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
+            var record = records.First();
+            Assert.That(record.RecordLength, Is.EqualTo(106));
+            Assert.That(record.OffsetToPrevRecord, Is.EqualTo(0));
+            Assert.That(record.OffsetToNextRecord, Is.EqualTo(174));
+            Assert.That(record.MessageNumber, Is.EqualTo(360097));
+            Assert.That(record.SessionID, Is.EqualTo("0.0.0.0"));
+            Assert.That(record.ProcessID, Is.EqualTo(1076));
+            Assert.That(record.ThreadID, Is.EqualTo(1096));
+            Assert.That(record.EventFileTime, Is.EqualTo(130783241810947628));
+            Assert.That(record.LogFlag, Is.EqualTo("Info"));
+            Assert.That(record.Component, Is.EqualTo("aaLogger"));
+            Assert.That(record.Message, Is.EqualTo("Logger Started."));
+            Assert.That(record.ProcessName, Is.EqualTo(""));
+            Assert.That(record.HostFQDN, Is.Null);
+        }
+
+        [Test]
+        public void CanReadEighteenthRecord()
+        {
+            // Picked this one because it has a long-ish message and a warning flag.
+            var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
+            var record = records.Skip(17).Take(1).First();
+            Assert.That(record.RecordLength, Is.EqualTo(1076));
+            Assert.That(record.OffsetToPrevRecord, Is.EqualTo(6076));
+            Assert.That(record.OffsetToNextRecord, Is.EqualTo(7492));
+            Assert.That(record.MessageNumber, Is.EqualTo(360114));
+            Assert.That(record.SessionID, Is.EqualTo("25.46.254.255"));
+            Assert.That(record.ProcessID, Is.EqualTo(1164));
+            Assert.That(record.ThreadID, Is.EqualTo(1196));
+            Assert.That(record.EventFileTime, Is.EqualTo(130783242256451623));
+            Assert.That(record.LogFlag, Is.EqualTo("Warning"));
+            Assert.That(record.Component, Is.EqualTo("IMS.Server.Runtime"));
+            Assert.That(record.Message,
+                Is.EqualTo(
+                    @"A connection attempt to the database server on machine DSA2014R2 failed (attempt 1 of 10). Will try again in 30 seconds.
+A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"));
+            Assert.That(record.ProcessName, Is.EqualTo("aaInformationModelService"));
+            Assert.That(record.HostFQDN, Is.Null);
+        }
+
+        [Test]
+        public void CanReadLastRecord()
+        {
+            var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
+            var record = records.Last();
+            Assert.That(record.RecordLength, Is.EqualTo(254));
+            Assert.That(record.OffsetToPrevRecord, Is.EqualTo(191470));
+            Assert.That(record.OffsetToNextRecord, Is.EqualTo(192014));
+            Assert.That(record.MessageNumber, Is.EqualTo(360779));
+            Assert.That(record.SessionID, Is.EqualTo("74.119.223.42"));
+            Assert.That(record.ProcessID, Is.EqualTo(7912));
+            Assert.That(record.ThreadID, Is.EqualTo(6712));
+            Assert.That(record.EventFileTime, Is.EqualTo(130783316984931276));
+            Assert.That(record.LogFlag, Is.EqualTo("Info"));
+            Assert.That(record.Component, Is.EqualTo("aahIDASSvc (local)"));
+            Assert.That(record.Message,
+                Is.EqualTo("DSA2014R2_2: Sending SuiteLink time synchronization message DSA2014R2"));
+            Assert.That(record.ProcessName, Is.EqualTo("aahIDASSvc"));
+            Assert.That(record.HostFQDN, Is.Null);
+        }
     }
-
-    [Test]
-    public void ReadsCorrectNumberOfRecords()
-    {
-      var header = aaLgxReader.ReadLogHeader(LOG_FILE_PATH);
-      var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
-      Assert.That(header.MsgCount, Is.GreaterThan(0));
-      Assert.That(header.MsgCount, Is.EqualTo(records.Count()));
-    }
-
-    [Test]
-    public void CanReadFirstRecord()
-    {
-      var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
-      var record = records.First();
-      Assert.That(record.RecordLength, Is.EqualTo(106));
-      Assert.That(record.OffsetToPrevRecord, Is.EqualTo(0));
-      Assert.That(record.OffsetToNextRecord, Is.EqualTo(174));
-      Assert.That(record.MessageNumber, Is.EqualTo(360097));
-      Assert.That(record.SessionID, Is.EqualTo("0.0.0.0"));
-      Assert.That(record.ProcessID, Is.EqualTo(1076));
-      Assert.That(record.ThreadID, Is.EqualTo(1096));
-      Assert.That(record.EventFileTime, Is.EqualTo(130783241810947628));
-      Assert.That(record.LogFlag, Is.EqualTo("Info"));
-      Assert.That(record.Component, Is.EqualTo("aaLogger"));
-      Assert.That(record.Message, Is.EqualTo("Logger Started."));
-      Assert.That(record.ProcessName, Is.EqualTo(""));
-      Assert.That(record.HostFQDN, Is.Null);
-    }
-
-    [Test]
-    public void CanReadEighteenthRecord()
-    {
-      // Picked this one because it has a long-ish message and a warning flag.
-      var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
-      var record = records.Skip(17).Take(1).First();
-      Assert.That(record.RecordLength, Is.EqualTo(1076));
-      Assert.That(record.OffsetToPrevRecord, Is.EqualTo(6076));
-      Assert.That(record.OffsetToNextRecord, Is.EqualTo(7492));
-      Assert.That(record.MessageNumber, Is.EqualTo(360114));
-      Assert.That(record.SessionID, Is.EqualTo("25.46.254.255"));
-      Assert.That(record.ProcessID, Is.EqualTo(1164));
-      Assert.That(record.ThreadID, Is.EqualTo(1196));
-      Assert.That(record.EventFileTime, Is.EqualTo(130783242256451623));
-      Assert.That(record.LogFlag, Is.EqualTo("Warning"));
-      Assert.That(record.Component, Is.EqualTo("IMS.Server.Runtime"));
-      Assert.That(record.Message, Is.EqualTo(@"A connection attempt to the database server on machine DSA2014R2 failed (attempt 1 of 10). Will try again in 30 seconds.
-A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"));
-      Assert.That(record.ProcessName, Is.EqualTo("aaInformationModelService"));
-      Assert.That(record.HostFQDN, Is.Null);
-    }
-
-    [Test]
-    public void CanReadLastRecord()
-    {
-      var records = aaLgxReader.ReadLogRecords(LOG_FILE_PATH);
-      var record = records.Last();
-      Assert.That(record.RecordLength, Is.EqualTo(254));
-      Assert.That(record.OffsetToPrevRecord, Is.EqualTo(191470));
-      Assert.That(record.OffsetToNextRecord, Is.EqualTo(192014));
-      Assert.That(record.MessageNumber, Is.EqualTo(360779));
-      Assert.That(record.SessionID, Is.EqualTo("74.119.223.42"));
-      Assert.That(record.ProcessID, Is.EqualTo(7912));
-      Assert.That(record.ThreadID, Is.EqualTo(6712));
-      Assert.That(record.EventFileTime, Is.EqualTo(130783316984931276));
-      Assert.That(record.LogFlag, Is.EqualTo("Info"));
-      Assert.That(record.Component, Is.EqualTo("aahIDASSvc (local)"));
-      Assert.That(record.Message, Is.EqualTo("DSA2014R2_2: Sending SuiteLink time synchronization message DSA2014R2"));
-      Assert.That(record.ProcessName, Is.EqualTo("aahIDASSvc"));
-      Assert.That(record.HostFQDN, Is.Null);
-    }
-  }
 }


Fixed old nointeractive parameter.

Fixed old nointeractive parameter.

--- CodeCakeBuilder/Program.cs
+++ CodeCakeBuilder/Program.cs
@@ -19,15 +19,16 @@
         static int Main( string[] args )
         {
             var app = new CodeCakeApplication();
-            bool interactive = !args.Contains( "-nointeractive", StringComparer.OrdinalIgnoreCase );
+            bool interactive = !args.Contains( '-' + InteractiveAliases.NoInteractionArgument, StringComparer.OrdinalIgnoreCase );
             int result = app.Run( args );
             Console.WriteLine();
             if( interactive )
             {
-                Console.WriteLine( "Hit any key to exit. (Use -nointeractive parameter to exit immediately)" );
+                Console.WriteLine( "Hit any key to exit. (Use -{0} parameter to exit immediately)", InteractiveAliases.NoInteractionArgument );
                 Console.ReadKey();
             }
             return result;
+
         }
     }
 }


The AT environment is a type of Test environment

--- src/SFA.DAS.Commitments.Application/Services/HostingEnvironment.cs
+++ src/SFA.DAS.Commitments.Application/Services/HostingEnvironment.cs
@@ -40,9 +40,9 @@
         {
             switch (environment)
             {
-                case Environment.Local:
-                case Environment.AT: return EnvironmentType.Development;
+                case Environment.Local: return EnvironmentType.Development;

+                case Environment.AT:
                 case Environment.Test:
                 case Environment.Test2: return EnvironmentType.Test;


fix #1123: исправлено имя метода

fix #1123: исправлено имя метода

--- src/ScriptEngine.HostedScript/Library/Http/InternetProxyContext.cs
+++ src/ScriptEngine.HostedScript/Library/Http/InternetProxyContext.cs
@@ -116,7 +116,7 @@
             return proxy?.Address.GetComponents(serverComponents, UriFormat.UriEscaped) ?? string.Empty;
         }

-        [ContextMethod("Порт", "Password")]
+        [ContextMethod("Порт", "Port")]
         public int Port(string protocol)
         {
             var proxy = GetProxy(protocol) as WebProxy;


Removed events from integration test

Removed events from integration test

--- src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs
+++ src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs
@@ -5,7 +5,6 @@
 using Umbraco.Cms.Core.Cache;
 using Umbraco.Cms.Core.Events;
 using Umbraco.Cms.Core.Models;
-using Umbraco.Cms.Core.Models.Membership;
 using Umbraco.Cms.Core.Routing;
 using Umbraco.Cms.Core.Services;
 using Umbraco.Cms.Core.Web;
@@ -18,7 +17,6 @@
     [UmbracoTest(Boot = true)]
     public class DistributedCacheBinderTests : UmbracoIntegrationTest
     {
-        private IUserService UserService => GetRequiredService<IUserService>();
         private ILocalizationService LocalizationService => GetRequiredService<ILocalizationService>();
         private IDataTypeService DataTypeService => GetRequiredService<IDataTypeService>();
         private IFileService FileService => GetRequiredService<IFileService>();
@@ -27,11 +25,7 @@
         private IDomainService DomainService => GetRequiredService<IDomainService>();
         private IMemberTypeService MemberTypeService => GetRequiredService<IMemberTypeService>();
         private IMacroService MacroService => GetRequiredService<IMacroService>();
-        private IMemberService MemberService => GetRequiredService<IMemberService>();
         private IMemberGroupService MemberGroupService => GetRequiredService<IMemberGroupService>();
-        private IMediaService MediaService => GetRequiredService<IMediaService>();
-        private IContentService ContentService => GetRequiredService<IContentService>();
-        private IPublicAccessService PublicAccessService => GetRequiredService<IPublicAccessService>();
         private IRelationService RelationService => GetRequiredService<IRelationService>();
         private UriUtility UriUtility => GetRequiredService<UriUtility>();
         private IUmbracoContextFactory UmbracoContextFactory => GetRequiredService<IUmbracoContextFactory>();
@@ -42,11 +36,6 @@

             var definitions = new IEventDefinition[]
             {
-                new EventDefinition<IUserService, SaveEventArgs<IUser>>(null, UserService, new SaveEventArgs<IUser>(Enumerable.Empty<IUser>())),
-                new EventDefinition<IUserService, DeleteEventArgs<IUser>>(null, UserService, new DeleteEventArgs<IUser>(Enumerable.Empty<IUser>())),
-                new EventDefinition<IUserService, SaveEventArgs<UserGroupWithUsers>>(null, UserService, new SaveEventArgs<UserGroupWithUsers>(Enumerable.Empty<UserGroupWithUsers>())),
-                new EventDefinition<IUserService, DeleteEventArgs<IUserGroup>>(null, UserService, new DeleteEventArgs<IUserGroup>(Enumerable.Empty<IUserGroup>())),
-
                 new EventDefinition<ILocalizationService, SaveEventArgs<IDictionaryItem>>(null, LocalizationService, new SaveEventArgs<IDictionaryItem>(Enumerable.Empty<IDictionaryItem>())),
                 new EventDefinition<ILocalizationService, DeleteEventArgs<IDictionaryItem>>(null, LocalizationService, new DeleteEventArgs<IDictionaryItem>(Enumerable.Empty<IDictionaryItem>())),

@@ -76,18 +65,12 @@
                 new EventDefinition<IMacroService, SaveEventArgs<IMacro>>(null, MacroService, new SaveEventArgs<IMacro>(Enumerable.Empty<IMacro>())),
                 new EventDefinition<IMacroService, DeleteEventArgs<IMacro>>(null, MacroService, new DeleteEventArgs<IMacro>(Enumerable.Empty<IMacro>())),

-                new EventDefinition<IMemberService, SaveEventArgs<IMember>>(null, MemberService, new SaveEventArgs<IMember>(Enumerable.Empty<IMember>())),
-                new EventDefinition<IMemberService, DeleteEventArgs<IMember>>(null, MemberService, new DeleteEventArgs<IMember>(Enumerable.Empty<IMember>())),
-
                 new EventDefinition<IMemberGroupService, SaveEventArgs<IMemberGroup>>(null, MemberGroupService, new SaveEventArgs<IMemberGroup>(Enumerable.Empty<IMemberGroup>())),
                 new EventDefinition<IMemberGroupService, DeleteEventArgs<IMemberGroup>>(null, MemberGroupService, new DeleteEventArgs<IMemberGroup>(Enumerable.Empty<IMemberGroup>())),

                 // not managed
                 //new EventDefinition<IContentService, SaveEventArgs<IContent>>(null, ContentService, new SaveEventArgs<IContent>(Enumerable.Empty<IContent>()), "SavedBlueprint"),
                 //new EventDefinition<IContentService, DeleteEventArgs<IContent>>(null, ContentService, new DeleteEventArgs<IContent>(Enumerable.Empty<IContent>()), "DeletedBlueprint"),
-
-                new EventDefinition<IPublicAccessService, SaveEventArgs<PublicAccessEntry>>(null, PublicAccessService, new SaveEventArgs<PublicAccessEntry>(Enumerable.Empty<PublicAccessEntry>())),
-                new EventDefinition<IPublicAccessService, DeleteEventArgs<PublicAccessEntry>>(null, PublicAccessService, new DeleteEventArgs<PublicAccessEntry>(Enumerable.Empty<PublicAccessEntry>())),

                 new EventDefinition<IRelationService, SaveEventArgs<IRelationType>>(null, RelationService, new SaveEventArgs<IRelationType>(Enumerable.Empty<IRelationType>())),
                 new EventDefinition<IRelationService, DeleteEventArgs<IRelationType>>(null, RelationService, new DeleteEventArgs<IRelationType>(Enumerable.Empty<IRelationType>())),


Fix string interpolation for health check messages

--- src/Umbraco.Web/HealthCheck/Checks/Security/BaseHttpHeaderCheck.cs
+++ src/Umbraco.Web/HealthCheck/Checks/Security/BaseHttpHeaderCheck.cs
@@ -87,8 +87,8 @@
                 }

                 message = success
-                    ? TextService.Localize($"healthcheck", "{_localizedTextPrefix}CheckHeaderFound")
-                    : TextService.Localize($"healthcheck", "{_localizedTextPrefix}CheckHeaderNotFound");
+                    ? TextService.Localize($"healthcheck", $"{_localizedTextPrefix}CheckHeaderFound")
+                    : TextService.Localize($"healthcheck", $"{_localizedTextPrefix}CheckHeaderNotFound");
             }
             catch (Exception ex)
             {
@@ -101,7 +101,7 @@
                 actions.Add(new HealthCheckAction(SetHeaderInConfigAction, Id)
                 {
                     Name = TextService.Localize("healthcheck", "setHeaderInConfig"),
-                    Description = TextService.Localize($"healthcheck", "{_localizedTextPrefix}SetHeaderInConfigDescription")
+                    Description = TextService.Localize($"healthcheck", $"{_localizedTextPrefix}SetHeaderInConfigDescription")
                 });
             }


:ok_hand: :ok_hand:

:ok_hand: :ok_hand:

--- 0xDD/HexView.cs
+++ 0xDD/HexView.cs
@@ -209,7 +209,6 @@
                 // Info
                 case ConsoleKey.I:
                     if (cki.Modifiers == ConsoleModifiers.Control)
-                        //TODO: Better Info function
                         Message($"Size: {CurrentFile.Length} | Postion: {Math.Round(((decimal)CurrentFilePosition / CurrentFile.Length) * 100)}%");
                     break;


add how to exchange.redis api example

add how to exchange.redis api example


fix error when setting file is corrupted.

--- Core/Utility/XmlUtility.cs
+++ Core/Utility/XmlUtility.cs
@@ -1,3 +1,4 @@
+using System;
 using System.IO;
 using System.Xml.Linq;

@@ -16,7 +17,7 @@
                         return XDocument.Load(configSream);
                     }
                 }
-                catch (FileNotFoundException)
+                catch (Exception)
                 {
                     return CreateDocument(rootName, fileSystem, path);
                 }


can restart video correctly, audio goes too fast

--- CorePlugin/OgvComponent.cs
+++ CorePlugin/OgvComponent.cs
@@ -39,7 +39,7 @@

 		[NonSerialized]
 		private bool _videoDisposed;
-
+		[NonSerialized]
 		private CancellationTokenSource _cancellationTokenSource;

 		public int Width { get; private set; }
@@ -95,27 +95,6 @@
 			Terminate();
 			IsDisposed = true;
 			_cancellationTokenSource = null;
-		}
-
-		private void Terminate()
-		{
-			// Stop and unassign the decoder.
-			if (_theoraDecoder != IntPtr.Zero)
-			{
-				TheoraPlay.THEORAPLAY_stopDecode(_theoraDecoder);
-				_theoraDecoder = IntPtr.Zero;
-			}
-
-			// Free and unassign the video stream.
-			if (_videoStream != IntPtr.Zero)
-			{
-				TheoraPlay.THEORAPLAY_freeVideo(_videoStream);
-				_videoStream = IntPtr.Zero;
-			}
-			_currentVideo = new TheoraPlay.THEORAPLAY_VideoFrame();
-			_nextVideo = new TheoraPlay.THEORAPLAY_VideoFrame();
-			_videoDisposed = true;
-			_startTime = (float)Time.GameTimer.TotalMilliseconds;
 		}

 		internal void Initialize()
@@ -134,7 +113,7 @@
 				//#else
 				TheoraPlay.THEORAPLAY_VideoFormat.THEORAPLAY_VIDFMT_IYUV
 				//#endif
-			);
+				);

 			// Wait until the decoder is ready.
 			while (TheoraPlay.THEORAPLAY_isInitialized(_theoraDecoder) == 0)
@@ -145,6 +124,30 @@
 			InitializeVideo();
 			_videoDisposed = false;
 			IsDisposed = false;
+		}
+
+		private void Terminate()
+		{
+			// Stop and unassign the decoder.
+			if (_theoraDecoder != IntPtr.Zero)
+			{
+				TheoraPlay.THEORAPLAY_stopDecode(_theoraDecoder);
+				_theoraDecoder = IntPtr.Zero;
+			}
+
+			// Free and unassign the video stream.
+			if (_videoStream != IntPtr.Zero)
+			{
+				TheoraPlay.THEORAPLAY_freeVideo(_videoStream);
+				_videoStream = IntPtr.Zero;
+			}
+			_currentVideo = new TheoraPlay.THEORAPLAY_VideoFrame();
+			_nextVideo = new TheoraPlay.THEORAPLAY_VideoFrame();
+			TheoraPlay.THEORAPLAY_freeVideo(_previousFrame);
+			_previousFrame = IntPtr.Zero;
+			_videoStream = IntPtr.Zero;
+			_videoDisposed = true;
+			_startTime = (float)Time.GameTimer.TotalMilliseconds;
 		}

 		private void InitializeVideo()
@@ -239,7 +242,7 @@
 			State = MediaState.Stopped;

 			IsDisposed = false;
-
+
 			Log.Editor.Write("Theora player stopped!");
 		}


Implement UseFullGlyphHeight

Implement UseFullGlyphHeight

--- osu.Framework.Tests/Visual/TestCaseNewSpriteText.cs
+++ osu.Framework.Tests/Visual/TestCaseNewSpriteText.cs
@@ -70,6 +70,25 @@
                         AutoSizeAxes = Axes.Y,
                         Child = new TestNewSpriteText { Text = "Relative size", RelativeSizeAxes = Axes.X }
                     },
+                },
+                new Drawable[]
+                {
+                    new Container
+                    {
+                        Anchor = Anchor.Centre,
+                        Origin = Anchor.Centre,
+                        Width = 50,
+                        AutoSizeAxes = Axes.Y,
+                        Child = new TestOldSpriteText { Text = "GlyphHeight = false", AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, UseFullGlyphHeight = false }
+                    },
+                    new Container
+                    {
+                        Anchor = Anchor.Centre,
+                        Origin = Anchor.Centre,
+                        Width = 50,
+                        AutoSizeAxes = Axes.Y,
+                        Child = new TestNewSpriteText { Text = "GlyphHeight = false", RelativeSizeAxes = Axes.X, UseFullGlyphHeight = false }
+                    },
                 }
             };

@@ -127,6 +146,12 @@

             public string Font;

+            /// <summary>
+            /// Whether to make the <see cref="NewSpriteText"/>'s vertical size equal to <see cref="TextSize"/> (the full height) or precisely the size of used characters.
+            /// Set to false to allow better centering of individual characters/numerals/etc.
+            /// </summary>
+            public bool UseFullGlyphHeight = true;
+
             [Resolved]
             private FontStore store { get; set; }

@@ -236,52 +261,66 @@
                     maxWidth = DrawWidth;

                 Vector2 currentPos = Vector2.Zero;
+                float currentRowHeight = 0;

                 foreach (var character in Text)
                 {
+                    // Unscaled size (i.e. not multiplied by TextSize)
+                    Vector2 charSize;
+                    Texture charTexture = null;
+
+                    // Retrieve the texture + size
                     if (char.IsWhiteSpace(character))
                     {
-                        float width = spaceWidth * TextSize;
+                        float size = spaceWidth;

                         if (character == 0x3000)
                         {
                             // Double-width space
-                            width *= 2;
+                            size *= 2;
                         }

-                        if (currentPos.X + width >= maxWidth)
+                        charSize = new Vector2(size);
+                    }
+                    else
+                    {
+                        charTexture = GetTextureForCharacter(character);
+                        charSize = new Vector2(charTexture.DisplayWidth, charTexture.DisplayHeight);
+                    }
+
+                    // Size scaled by TextSize
+                    Vector2 scaledSize = charSize * TextSize;
+
+                    // Check if we need to go onto the next line
+                    if (currentPos.X + scaledSize.X >= maxWidth)
+                    {
+                        currentPos.X = 0;
+                        currentPos.Y += currentRowHeight;
+                        currentRowHeight = 0;
+                    }
+
+                    // The height of the row depends on whether we want to use the full glyph height or not
+                    float glyphHeight = UseFullGlyphHeight ? 1 : charSize.Y;
+                    currentRowHeight = Math.Max(currentRowHeight, glyphHeight * TextSize);
+
+                    if (char.IsWhiteSpace(character))
+                        currentPos.X += scaledSize.X;
+                    else
+                    {
+                        var drawQuad = ToScreenSpace(new RectangleF(currentPos, scaledSize));
+
+                        charactersBacking.Add(new CharacterPart
                         {
-                            currentPos.X = 0;
-                            currentPos.Y += TextSize;
-                        }
-
-                        currentPos.X += width;
-
-                        continue;
+                            Texture = charTexture,
+                            DrawQuad = drawQuad
+                        });
+
+                        currentPos.X += scaledSize.X;
                     }
-
-                    var tex = GetTextureForCharacter(character);
-
-                    var textureSize = new Vector2(tex.DisplayWidth, tex.DisplayHeight) * TextSize;
-
-                    if (currentPos.X + textureSize.X >= maxWidth)
-                    {
-                        currentPos.X = 0;
-                        currentPos.Y += TextSize;
-                    }
-
-                    var drawQuad = ToScreenSpace(new RectangleF(currentPos, textureSize));
-
-                    charactersBacking.Add(new CharacterPart
-                    {
-                        Texture = tex,
-                        DrawQuad = drawQuad
-                    });
-
-                    currentPos.X += textureSize.X;
-                }
-
-                currentPos.Y += TextSize;
+                }
+
+                // The last row needs to be included in the height
+                currentPos.Y += currentRowHeight;

                 if (explicitWidth == null && (RelativeSizeAxes & Axes.X) == 0)
                     base.Width = currentPos.X;


Fix single identifier name invocation

Fix single identifier name invocation

--- osu.Framework/Testing/RoslynTypeReferenceBuilder.cs
+++ osu.Framework/Testing/RoslynTypeReferenceBuilder.cs
@@ -258,7 +258,7 @@
                 // - The single IdentifierName child of an argument syntax (variable name), below.
                 // - The name of namespace declarations.
                 // - Name-colon syntaxes.
-                // - The expression of invocations. Static classes are explicitly disallowed so the target type of an invocation must be available elsewhere in the syntax tree.
+                // - The expression of invocation expressions. Static classes are explicitly disallowed so the target type of an invocation must be available elsewhere in the syntax tree.

                 return kind != SyntaxKind.UsingDirective
                        && kind != SyntaxKind.NamespaceKeyword
@@ -266,7 +266,7 @@
                        && kind != SyntaxKind.VariableDeclarator
                        && (kind != SyntaxKind.QualifiedName || !(n.Parent is NamespaceDeclarationSyntax))
                        && kind != SyntaxKind.NameColon
-                       && (!(n.Parent is InvocationExpressionSyntax invocation) || n != invocation.Expression);
+                       && (n.Parent?.Kind() != SyntaxKind.InvocationExpression || n != ((InvocationExpressionSyntax)n.Parent).Expression);
             });

             // This hashset is used to prevent re-exploring syntaxes with the same name.
@@ -284,6 +284,10 @@

                     // Ignore the variable name of arguments.
                     if (node.Parent is ArgumentSyntax)
+                        continue;
+
+                    // Ignore a single identifier name expression of an invocation expression (e.g. IdentifierName()).
+                    if (node.Parent.Kind() == SyntaxKind.InvocationExpression)
                         continue;
                 }


Use Math.Clamp

Use Math.Clamp

--- osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs
+++ osu.Game.Rulesets.Taiko/Difficulty/Skills/Rhythm.cs
@@ -64,7 +64,7 @@
         private double patternLengthPenalty(int patternLength)
         {
             double shortPatternPenalty = Math.Min(0.15 * patternLength, 1.0);
-            double longPatternPenalty = Math.Max(Math.Min(2.5 - 0.15 * patternLength, 1.0), 0.0);
+            double longPatternPenalty = Math.Clamp(2.5 - 0.15 * patternLength, 0.0, 1.0);
             return Math.Min(shortPatternPenalty, longPatternPenalty);
         }


Disallow inserting a group if one already exists with the current time value

--- osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs
+++ osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs
@@ -301,9 +301,11 @@
             var newGroup = new ControlPointGroup(time);

             int i = groups.BinarySearch(newGroup);
-            if (i < 0) i = ~i;
-
-            groups.Insert(i, newGroup);
+
+            if (i > 0)
+                return groups[i];
+
+            groups.Insert(~i, newGroup);

             return newGroup;
         }


Recolour "slim dropdown" in online lounge screens

--- osu.Game/Graphics/UserInterface/SlimEnumDropdown.cs
+++ osu.Game/Graphics/UserInterface/SlimEnumDropdown.cs
@@ -2,11 +2,8 @@
 // See the LICENCE file in the repository root for full licence text.

 using System;
-using osu.Framework.Extensions.Color4Extensions;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.UserInterface;
-using osuTK;
-using osuTK.Graphics;

 namespace osu.Game.Graphics.UserInterface
 {
@@ -15,29 +12,12 @@
     {
         protected override DropdownHeader CreateHeader() => new SlimDropdownHeader();

-        protected override DropdownMenu CreateMenu() => new SlimMenu();
-
         private class SlimDropdownHeader : OsuDropdownHeader
         {
             public SlimDropdownHeader()
             {
                 Height = 25;
-                Icon.Size = new Vector2(16);
                 Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 8, Right = 4 };
-            }
-
-            protected override void LoadComplete()
-            {
-                base.LoadComplete();
-                BackgroundColour = Color4.Black.Opacity(0.25f);
-            }
-        }
-
-        private class SlimMenu : OsuDropdownMenu
-        {
-            public SlimMenu()
-            {
-                BackgroundColour = Color4.Black.Opacity(0.7f);
             }
         }
     }


Apply suggested changes

Apply suggested changes

--- osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs
+++ osu.Game/Screens/Play/BreaksOverlay/BreakOverlay.cs
@@ -114,20 +114,20 @@

         public void InitializeBreaks()
         {
-            if (Breaks != null)
+            if (Breaks == null)
+                return;
+
+            foreach (var b in Breaks)
             {
-                foreach (var b in Breaks)
+                if (!b.HasEffect)
+                    continue;
+
+                using (BeginAbsoluteSequence(b.StartTime, true))
                 {
-                    if (b.HasEffect)
-                    {
-                        using (BeginAbsoluteSequence(b.StartTime, true))
-                        {
-                            onBreakIn(b);
+                    onBreakIn(b);

-                            using (BeginDelayedSequence(b.Duration, true))
-                                onBreakOut();
-                        }
-                    }
+                    using (BeginDelayedSequence(b.Duration, true))
+                        onBreakOut();
                 }
             }
         }


Add fatal exception level to Log interface.

--- AgateLib/Log.cs
+++ AgateLib/Log.cs
@@ -118,6 +118,17 @@
             WriteLine(LogLevel.Error, text);
             WriteLine(LogLevel.Error, e.ToString());
         }
+
+        public static void Fatal(string text)
+        {
+            WriteLine(LogLevel.Fatal, text);
+        }
+
+        public static void Fatal(Exception e, string text)
+        {
+            WriteLine(LogLevel.Fatal, text);
+            WriteLine(LogLevel.Fatal, e.ToString());
+        }
     }

     public enum LogLevel


Create placeholder classes instead of changing Children.

- Add MessagePlaceholder
- Use MessagePlacholder for when API is offline/user isn't a supporter
- Remove unnecessary placeholderFlow field
- Hook into API state changes

--- osu.Game/Screens/Select/Leaderboards/Leaderboard.cs
+++ osu.Game/Screens/Select/Leaderboards/Leaderboard.cs
@@ -34,7 +34,6 @@

         private readonly ScrollContainer scrollContainer;
         private readonly Container placeholderContainer;
-        private readonly FillFlowContainer placeholderFlow;

         private FillFlowContainer<LeaderboardScore> scrollFlow;

@@ -63,22 +62,7 @@

                 if (!scores.Any())
                 {
-                    placeholderFlow.Children = new Drawable[]
-                    {
-                        new SpriteIcon
-                        {
-                            Icon = FontAwesome.fa_exclamation_circle,
-                            Size = new Vector2(26),
-                            Margin = new MarginPadding { Right = 10 },
-                        },
-                        new OsuSpriteText
-                        {
-                            Text = @"No records yet!",
-                            TextSize = 22,
-                        },
-                    };
-
-                    placeholderContainer.FadeIn(fade_duration);
+                    replacePlaceholder(new MessagePlaceholder(@"No records yet!"));
                     return;
                 }

@@ -135,17 +119,9 @@
                 placeholderContainer = new Container
                 {
                     Alpha = 0,
-                    RelativeSizeAxes = Axes.Both,
-                    Children = new Drawable[]
-                    {
-                        placeholderFlow = new FillFlowContainer
-                        {
-                            Direction = FillDirection.Horizontal,
-                            Anchor = Anchor.Centre,
-                            Origin = Anchor.Centre,
-                            AutoSizeAxes = Axes.Both,
-                        },
-                    },
+                    AutoSizeAxes = Axes.Both,
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.Centre,
                 },
             };
         }
@@ -181,6 +157,9 @@

             if (osuGame != null)
                 osuGame.Ruleset.ValueChanged += handleRulesetChange;
+
+            if (api != null)
+                api.OnStateChange += handleApiStateChange;
         }

         protected override void Dispose(bool isDisposing)
@@ -194,6 +173,23 @@
         private GetScoresRequest getScoresRequest;

         private void handleRulesetChange(RulesetInfo ruleset) => UpdateScores();
+
+        private void handleApiStateChange(APIState oldState, APIState newState)
+        {
+            if (Scope == LeaderboardScope.Local)
+                // No need to respond to API state change while current scope is local
+                return;
+
+            if (newState == APIState.Offline)
+            {
+                Scores = null;
+                replacePlaceholder(new MessagePlaceholder(@"Please login to view online leaderboards!"));
+                return;
+            }
+
+            if (newState == APIState.Online)
+                UpdateScores();
+        }

         protected virtual void UpdateScores()
         {
@@ -215,6 +211,20 @@
                 return;
             }

+            if (!api.IsLoggedIn)
+            {
+                loading.Hide();
+                replacePlaceholder(new MessagePlaceholder(@"Please login to view online leaderboards!"));
+                return;
+            }
+
+            if (Scope != LeaderboardScope.Global && !api.LocalUser.Value.IsSupporter)
+            {
+                loading.Hide();
+                replacePlaceholder(new MessagePlaceholder(@"Please invest in a supporter tag to view this leaderboard!"));
+                return;
+            }
+
             getScoresRequest = new GetScoresRequest(Beatmap, osuGame?.Ruleset.Value ?? Beatmap.Ruleset, Scope);
             getScoresRequest.Success += r =>
             {
@@ -230,22 +240,19 @@
             if (e is OperationCanceledException) return;

             Scores = null;
-            placeholderFlow.Children = new Drawable[]
-            {
-                new RetryButton
-                {
-                    Action = UpdateScores,
-                    Margin = new MarginPadding { Right = 10 },
-                },
-                new OsuSpriteText
-                {
-                    Anchor = Anchor.TopLeft,
-                    Text = @"Couldn't retrieve scores!",
-                    TextSize = 22,
-                },
-            };
-            placeholderContainer.FadeIn(fade_duration);
+            replacePlaceholder(new RetrievalFailurePlaceholder
+            {
+                OnRetry = UpdateScores,
+            });
             Logger.Error(e, @"Couldn't fetch beatmap scores!");
+        }
+
+        private void replacePlaceholder(Drawable placeholder)
+        {
+            placeholderContainer.FadeOutFromOne(fade_duration, Easing.OutQuint);
+            placeholderContainer.Clear(true);
+            placeholderContainer.Child = placeholder;
+            placeholderContainer.FadeInFromZero(fade_duration, Easing.OutQuint);
         }

         protected override void Update()
@@ -274,6 +281,54 @@
                         Color4.White.Opacity(Math.Min(1 - (topY - fadeStart) / LeaderboardScore.HEIGHT, 1)),
                         Color4.White.Opacity(Math.Min(1 - (bottomY - fadeStart) / LeaderboardScore.HEIGHT, 1)));
                 }
+            }
+        }
+
+        private class MessagePlaceholder : FillFlowContainer
+        {
+            public MessagePlaceholder(string message)
+            {
+                Direction = FillDirection.Horizontal;
+                AutoSizeAxes = Axes.Both;
+                Children = new Drawable[]
+                {
+                    new SpriteIcon
+                    {
+                        Icon = FontAwesome.fa_exclamation_circle,
+                        Size = new Vector2(26),
+                        Margin = new MarginPadding { Right = 10 },
+                    },
+                    new OsuSpriteText
+                    {
+                        Text = message,
+                        TextSize = 22,
+                    },
+                };
+            }
+        }
+
+        private class RetrievalFailurePlaceholder : FillFlowContainer
+        {
+            public Action OnRetry;
+
+            public RetrievalFailurePlaceholder()
+            {
+                Direction = FillDirection.Horizontal;
+                AutoSizeAxes = Axes.Both;
+                Children = new Drawable[]
+                {
+                    new RetryButton
+                    {
+                        Action = () => OnRetry?.Invoke(),
+                        Margin = new MarginPadding { Right = 10 },
+                    },
+                    new OsuSpriteText
+                    {
+                        Anchor = Anchor.TopLeft,
+                        Text = @"Couldn't retrieve scores!",
+                        TextSize = 22,
+                    },
+                };
             }
         }


Remove unused usings.

Remove unused usings.

--- osu.Game/Screens/Select/Leaderboards/Leaderboard.cs
+++ osu.Game/Screens/Select/Leaderboards/Leaderboard.cs
@@ -23,8 +23,6 @@
 using osu.Framework.Logging;
 using osu.Game.Rulesets;
 using osu.Framework.Input;
-using osu.Game.Beatmaps.ControlPoints;
-using osu.Framework.Audio.Track;

 namespace osu.Game.Screens.Select.Leaderboards
 {


Fixed a bug where homeaddress could be added multiple times when a person is initially imported if they have multiple employments.

--- DBUpdater/UpdateService.cs
+++ DBUpdater/UpdateService.cs
@@ -160,11 +160,35 @@
                 personToInsert.FullName = personToInsert.FirstName + " " + personToInsert.LastName + " [" + personToInsert.Initials + "]";
                 personToInsert.Mail = employee.Email ?? "";
                 personToInsert.IsActive = true;
-
-
             }
             _personRepo.Save();

+            /**
+             * We need the person id before we can attach personal addresses
+             * so we loop through the distinct employees once again and
+             * look up the created persons
+             */
+            i = 0;
+            foreach (var employee in distinctEmpls)
+            {
+                if (i%50 == 0)
+                {
+                    Console.WriteLine("Adding home address to person " + i + " out of " + distinctEmpls.Count());
+                }
+                i++;
+                var personToInsert = _personRepo.AsQueryable().First(x => x.CprNumber == employee.CPR);
+                UpdateHomeAddress(employee, personToInsert.Id);
+                if (i % 500 == 0)
+                {
+                    _personalAddressRepo.Save();
+                }
+            }
+            _personalAddressRepo.Save();
+
+            //Sets all employments to end now in the case there was
+            //one day where the updater did not run and the employee
+            //has been removed from the latest MDM view we are working on
+            //The end date will be adjusted in the next loop
             foreach (var employment in _emplRepo.AsQueryable())
             {
                 employment.EndDateTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
@@ -177,12 +201,15 @@
                 i++;
                 if (i % 10 == 0)
                 {
-                    Console.WriteLine("Adding employment and address to person " + i + " of " + empls.Count());
+                    Console.WriteLine("Adding employment to person " + i + " of " + empls.Count());
                 }
                 var personToInsert = _personRepo.AsQueryable().First(x => x.CprNumber == employee.CPR);

                 CreateEmployment(employee, personToInsert.Id);
-                UpdateHomeAddress(employee, personToInsert.Id);
+                if (i%500 == 0)
+                {
+                    _emplRepo.Save();
+                }
             }
             _personalAddressRepo.Save();
             _emplRepo.Save();
@@ -310,6 +337,8 @@
                 homeAddr.StreetNumber = launderedAddress.StreetNumber;
                 homeAddr.ZipCode = launderedAddress.ZipCode;
                 homeAddr.Town = addressToLaunder.Town;
+                homeAddr.Latitude = addressToLaunder.Latitude ?? "";
+                homeAddr.Longitude = addressToLaunder.Longitude ?? "";
             }
         }


Updated Grid Cell to display Item keyed_name

--- Aras.ViewModel/Cell.cs
+++ Aras.ViewModel/Cell.cs
@@ -55,9 +55,48 @@

                     if (this.Binding != null)
                     {
-                        this.Binding.ValueString = value;
+                        if (!(this.Binding is Model.Properties.Item))
+                        {
+                            this.Binding.ValueString = value;
+                        }
                     }
                 }
+            }
+        }
+
+        private void setValue(Model.Property Property)
+        {
+            if (Property != null)
+            {
+                if (Property is Model.Properties.Item)
+                {
+                    Model.Item propitem = ((Model.Properties.Item)Property).Value;
+
+                    if (propitem != null)
+                    {
+                        if (!propitem.HasProperty("keyed_name"))
+                        {
+                            Model.Requests.Item itemrequest = this.Session.Model.Request(propitem.ItemType.Action("get"));
+                            itemrequest.AddSelection("keyed_name");
+                            itemrequest.ID = propitem.ID;
+                            Model.Response itemresponse = itemrequest.Execute();
+                        }
+
+                        this.Value = propitem.KeyedName;
+                    }
+                    else
+                    {
+                        this.Value = null;
+                    }
+                }
+                else
+                {
+                    this.Value = Property.ValueString;
+                }
+            }
+            else
+            {
+                this.Value = null;
             }
         }

@@ -76,7 +115,7 @@
                     {
                         this._binding.PropertyChanged -= Binding_PropertyChanged;
                         this._binding = null;
-                        this.Value = null;
+                        this.setValue(null);
                     }
                 }
                 else
@@ -96,7 +135,7 @@
                         }
                     }

-                    this.Value = this._binding.ValueString;
+                    this.setValue(this._binding);
                 }
             }
         }


Version bump to 3.2.1.4 [TGSDeploy]

Version bump to 3.2.1.4 [TGSDeploy]

--- AssemblyInfo.global.cs
+++ AssemblyInfo.global.cs
@@ -3,8 +3,8 @@

 //You cannot one definition the version number
 //Believe me, I've tried, the compiler hates it so much
-[assembly: AssemblyVersion("3.2.1.3")]
-[assembly: AssemblyFileVersion("3.2.1.3")]
-[assembly: AssemblyInformationalVersion("3.2.1.3")]
+[assembly: AssemblyVersion("3.2.1.4")]
+[assembly: AssemblyFileVersion("3.2.1.4")]
+[assembly: AssemblyInformationalVersion("3.2.1.4")]

 [assembly: InternalsVisibleTo("TGS.Tests")]


Update version to 0.11.19-beta

Update version to 0.11.19-beta

--- AssemblyInfoVersion.cs
+++ AssemblyInfoVersion.cs
@@ -7,5 +7,5 @@
 [assembly: AssemblyVersion("0.11.5.0")]

 // Edit these for each release + update dependencies in .nuspec files
-[assembly: AssemblyFileVersion("0.11.18-beta")]
-[assembly: AssemblyInformationalVersion("0.11.18-beta")]
+[assembly: AssemblyFileVersion("0.11.19-beta")]
+[assembly: AssemblyInformationalVersion("0.11.19-beta")]


fix laser implementation breaking loading games

--- Assets/Scripts/Unit.cs
+++ Assets/Scripts/Unit.cs
@@ -24,9 +24,11 @@
 	[ProtoMember(7)] public List<Attack> attacks;

 	/// <summary>
-	/// empty constructor for protobuf-net use only
+	/// parameterless constructor for protobuf-net use only
 	/// </summary>
-	private Unit() { }
+	private Unit() {
+		attacks = new List<Attack>();
+	}

 	public Unit(Sim simVal, int idVal, UnitType typeVal, Player playerVal) {
 		g = simVal;


Remove unused member variable.

Remove unused member variable.

--- Database/ChangeDatabase.cs
+++ Database/ChangeDatabase.cs
@@ -956,7 +956,6 @@
 		/// </summary>
 		private const uint GroundPlaneMeshInstanceId = 1;

-		private bool _gp_meshed = false;
 		private readonly float gp_side_extension = 1.0E+10f;
 		private void InitialiseGroundPlane(CqGroundPlane gp)
 		{


fix: compilation errors on windows

fix: compilation errors on windows

removed additional Plus characters.

--- windows/ReactNativeDocumentPicker/RCTDocumentPickerModule.cs
+++ windows/ReactNativeDocumentPicker/RCTDocumentPickerModule.cs
@@ -211,9 +211,9 @@
           tcs.SetResult(jarrayObj);
         }
         else
-+        {
-+              tcs.SetResult(new List<JSValueObject>());
-+        }
+        {
+           tcs.SetResult(new List<JSValueObject>());
+        }
       });

       var result = await tcs.Task;
@@ -233,9 +233,9 @@
           tcs.SetResult(processedFile);
         }
         else
-+        {
-+            tcs.SetResult(new JSValueObject());
-+        }
+        {
+          tcs.SetResult(new JSValueObject());
+        }
       });

       var result = await tcs.Task;


format

format

--- xamarin/FHXamarinAndroidSDK/Services/Device/DeviceService.cs
+++ xamarin/FHXamarinAndroidSDK/Services/Device/DeviceService.cs
@@ -1,153 +1,132 @@
 using System;
-using System.Threading.Tasks;
+using System.IO;
+using AeroGear.Push;
 using Android.App;
-using Java.IO;
-using Java.Util;
-using System.IO;
+using Android.Provider;
 using FHSDK.Services.Device;
 using FHSDK.Services.Log;
-using System.Collections.Generic;
-using AeroGear.Push;
+using Java.Util;

 namespace FHSDK.Services
 {
     /// <summary>
-    /// Device info service provider for Android
+    ///     Device info service provider for Android
     /// </summary>
-	public class DeviceService : IDeviceService
-	{
-		private const string TAG = "FHSDK:DeviceService";
-		private const string APP_PROP_FILE = "fhconfig.properties";
-        private const string LOCAL_DEV_APP_PROP_FILE = "fhconfig.local.properties";
-		private const string PROJECT_ID_PROP = "projectid";
-		private const string APP_ID_PROP = "appid";
-		private const string APP_KEY_PROP = "appkey";
-		private const string HOST_PROP = "host";
-		private const string CONNECTION_TAG_PROP = "connectiontag";
-		private const string MODE_PROP = "mode";
-		private AppProps appPropsObj = null;
+    public class DeviceService : IDeviceService
+    {
+        private const string Tag = "FHSDK:DeviceService";
+        private const string AppPropFile = "fhconfig.properties";
+        private const string LocalDevAppPropFile = "fhconfig.local.properties";
+        private const string ProjectIdProp = "projectid";
+        private const string AppIdProp = "appid";
+        private const string AppKeyProp = "appkey";
+        private const string HostProp = "host";
+        private const string ConnectionTagProp = "connectiontag";
+        private const string ModeProp = "mode";
+        private AppProps _appPropsObj;

-		public DeviceService  ()
-		{
-		}
+        public string GetDeviceId()
+        {
+            return Settings.System.GetString(Application.Context.ContentResolver, Settings.Secure.AndroidId);
+        }

-		public String GetDeviceId()
-		{
-			return Android.Provider.Settings.System.GetString(Application.Context.ContentResolver, Android.Provider.Settings.Secure.AndroidId);
-		}
-
-		public AppProps ReadAppProps()
-		{
-			if (null == appPropsObj) {
-				Properties appProps = new Properties();
-				Stream input = null;
-				ILogService logger = ServiceFinder.Resolve<ILogService>();
-                bool foundLocalDevProps = false;
-				try {
-                    try
+        public AppProps ReadAppProps()
+        {
+            if (null != _appPropsObj) return _appPropsObj;
+            var appProps = new Properties();
+            Stream input = null;
+            var logger = ServiceFinder.Resolve<ILogService>();
+            try
+            {
+                bool foundLocalDevProps;
+                try
+                {
+                    input = Application.Context.Assets.Open(LocalDevAppPropFile);
+                    foundLocalDevProps = true;
+                }
+                catch (Exception)
+                {
+                    input = null;
+                    foundLocalDevProps = false;
+                    input = Application.Context.Assets.Open(AppPropFile);
+                }
+                appProps.Load(input);
+                _appPropsObj = new AppProps
+                {
+                    projectid = appProps.GetProperty(ProjectIdProp),
+                    appid = appProps.GetProperty(AppIdProp),
+                    appkey = appProps.GetProperty(AppKeyProp),
+                    host = appProps.GetProperty(HostProp),
+                    connectiontag = appProps.GetProperty(ConnectionTagProp),
+                    mode = appProps.GetProperty(ModeProp)
+                };
+                if (foundLocalDevProps)
+                {
+                    _appPropsObj.IsLocalDevelopment = true;
+                }
+                return _appPropsObj;
+            }
+            catch (Exception ex)
+            {
+                logger?.e(Tag, "Failed to load " + AppPropFile, ex);
+                return null;
+            }
+            finally
+            {
+                input?.Dispose();
+            }
+        }
+
+        public string GetDeviceDestination()
+        {
+            return "android";
+        }
+
+        public string GetPackageDir()
+        {
+            return "./";
+        }
+
+        public PushConfig ReadPushConfig()
+        {
+            var appProps = new Properties();
+            Stream input = null;
+            var logger = ServiceFinder.Resolve<ILogService>();
+            try
+            {
+                input = Application.Context.Assets.Open(AppPropFile);
+                appProps.Load(input);
+
+                var pushServerUrl = appProps.GetProperty(HostProp) + "api/v2/ag-push/";
+                var pushSenderId = appProps.GetProperty("PUSH_SENDER_ID");
+                var pushVariant = appProps.GetProperty("PUSH_VARIANT");
+                var pushSecret = appProps.GetProperty("PUSH_SECRET");
+
+                if (appProps.GetProperty(HostProp) != null && pushSenderId != null && pushVariant != null && pushSecret != null)
+                    return new AndroidPushConfig
                     {
-                        input = Application.Context.Assets.Open(LOCAL_DEV_APP_PROP_FILE);
-                        foundLocalDevProps = true;
-                    }
-                    catch (Exception ex)
-                    {
-                        input = null;
-                        foundLocalDevProps = false;
-                        input = Application.Context.Assets.Open(APP_PROP_FILE);
-                    }
-					appProps.Load(input);
-					appPropsObj = new AppProps();
-					appPropsObj.projectid = appProps.GetProperty(PROJECT_ID_PROP);
-					appPropsObj.appid = appProps.GetProperty(APP_ID_PROP);
-					appPropsObj.appkey = appProps.GetProperty(APP_KEY_PROP);
-					appPropsObj.host = appProps.GetProperty(HOST_PROP);
-					appPropsObj.connectiontag = appProps.GetProperty(CONNECTION_TAG_PROP);
-					appPropsObj.mode = appProps.GetProperty(MODE_PROP);
-                    if(foundLocalDevProps){
-                        appPropsObj.IsLocalDevelopment = true;
-                    }
-					return appPropsObj;
-				} catch (Exception ex) {
-					if(null != logger) {
-						logger.e(TAG, "Failed to load " + APP_PROP_FILE, ex);
-					}
-					return null;
-
-				} finally {
-					if(null != input){
-						try {
-							input.Close();
-						} catch (Exception exc) {
-							if(null != logger){
-								logger.w(TAG, "Failed to close stream", exc);
-							}
-						}
-					}
-				}
-			}
-			return appPropsObj;
-		}
-
-		public string GetDeviceDestination()
-		{
-			return "android";
-
-		}
-
-		public string GetPackageDir()
-		{
-			return "./";
-		}
-
-		public PushConfig ReadPushConfig ()
-		{
-			Properties appProps = new Properties();
-			Stream input = null;
-			ILogService logger = ServiceFinder.Resolve<ILogService>();
-			try {
-				input = Application.Context.Assets.Open(APP_PROP_FILE);
-				appProps.Load(input);
-
-				string pushServerUrl = appProps.GetProperty("PUSH_SERVER_URL");
-				string pushSenderId = appProps.GetProperty("PUSH_SENDER_ID");
-				string pushVariant = appProps.GetProperty("PUSH_VARIANT");
-				string pushSecret = appProps.GetProperty("PUSH_SECRET");
-
-				if (pushServerUrl == null || pushSenderId == null || pushVariant == null || pushSecret == null) {
-					var ex = new System.InvalidOperationException ("fhconfig.properties must define PUSH_SERVER_URL, PUSH_SENDER_ID, PUSH_VARIANT, and PUSH_SECRET.  One or more were not defined.");
-					logger.e(TAG, "fhconfig.properties must define PUSH_SERVER_URL, PUSH_SENDER_ID, PUSH_VARIANT, and PUSH_SECRET.  One or more were not defined.", ex);
-					throw ex;
-				}
-
-
-				var config = new AndroidPushConfig();
-
-				config.UnifiedPushUri  = new Uri( pushServerUrl ) ;
-				config.SenderId = pushSenderId;
-				config.VariantId = pushVariant;
-				config.VariantSecret = pushSecret;
-
-				return config;
-
-			} catch (Exception ex) {
-				if(null != logger) {
-					logger.e(TAG, "Failed to load " + APP_PROP_FILE, ex);
-				}
-				return null;
-
-			} finally {
-				if(null != input){
-					try {
-						input.Close();
-					} catch (Exception exc) {
-						if(null != logger){
-							logger.w(TAG, "Failed to close stream", exc);
-						}
-					}
-				}
-			}
-		}
-
-	}
-}
-
+                        UnifiedPushUri = new Uri(pushServerUrl),
+                        SenderId = pushSenderId,
+                        VariantId = pushVariant,
+                        VariantSecret = pushSecret
+                    };
+                var ex =
+                    new InvalidOperationException(
+                        "fhconfig.properties must define PUSH_SERVER_URL, PUSH_SENDER_ID, PUSH_VARIANT, and PUSH_SECRET.  One or more were not defined.");
+                logger.e(Tag,
+                    "fhconfig.properties must define PUSH_SERVER_URL, PUSH_SENDER_ID, PUSH_VARIANT, and PUSH_SECRET.  One or more were not defined.",
+                    ex);
+                throw ex;
+            }
+            catch (Exception ex)
+            {
+                logger?.e(Tag, "Failed to load " + AppPropFile, ex);
+                return null;
+            }
+            finally
+            {
+                input?.Dispose();
+            }
+        }
+    }
+}


serialize expected value cannot simplyfied with deployment machine

--- AdemCatamak.Utilities.UnitTest/ExtensionTest/SerializeTest.cs
+++ AdemCatamak.Utilities.UnitTest/ExtensionTest/SerializeTest.cs
@@ -22,8 +22,7 @@
         [TestMethod]
         public void AdemCatamak_Utilities_UnitTest_ExtensionsTest__Serialize()
         {
-            string expected = @"
-{""Phone"":null,""Email"":""ademcatamak@gmail.com"",""Username"":""ademcatamak"",""RequiredPhone"":null,""Id"":3,""ExtraData"":null}"
+            string expected = @"{""Phone"":null,""Email"":""ademcatamak@gmail.com"",""Username"":""ademcatamak"",""RequiredPhone"":null,""Id"":3,""ExtraData"":null}"
                 .Replace(" ", string.Empty)
                 .Replace(Environment.NewLine, string.Empty);


Killed some unused methods in QueryController

--- App/StackExchange.DataExplorer/Controllers/QueryController.cs
+++ App/StackExchange.DataExplorer/Controllers/QueryController.cs
@@ -481,16 +481,6 @@
             SetHeaderInfo(null);
         }

-        private Query FindQuery(int id)
-        {
-            return Current.DB.Queries.FirstOrDefault(q => q.Id == id);
-        }
-
-        private SavedQuery FindSavedQuery(int id)
-        {
-            return Current.DB.SavedQueries.FirstOrDefault(s => s.Id == id);
-        }
-
         private void SetHeaderInfo(int? edit)
         {
             if (edit != null)


Fix bug

Fix bug

--- CalDavSynchronizer/Implementation/Events/EventEntityMapper.cs
+++ CalDavSynchronizer/Implementation/Events/EventEntityMapper.cs
@@ -1525,7 +1525,7 @@
       masterEvent.Summary = firstException.Summary;
       masterEvent.Location = firstException.Location;
       masterEvent.Class = firstException.Class;
-      masterEvent.Categories = firstException.Categories;
+      masterEvent.Categories.AddRange(firstException.Categories.ToArray());
       masterEvent.Organizer = firstException.Organizer;
       masterEvent.Attendees = firstException.Attendees;
       masterEvent.UID = firstException.UID;


New method name

New method name

--- Ecos.DBInit.Test/SpecificScriptHelpers/MySqSchemalInfoTest.cs
+++ Ecos.DBInit.Test/SpecificScriptHelpers/MySqSchemalInfoTest.cs
@@ -59,7 +59,7 @@
         }

         [Test]
-        public void OnlyTheFirstGetTablesInvokationItWillTryToGetTheDataFromTheDatabase()
+        public void GetTablesAccessToDatabaseOnlyOnce()
         {
             //Arrange

@@ -105,7 +105,7 @@
         }

         [Test]
-        public void OnlyTheFirstGetViewsInvokationItWillTryToGetTheDataFromTheDatabase()
+        public void GetViewsAccessToDatabaseOnlyOnce()
         {
             //Arrange


Added try-catch around consolidator updating to pass error back to IDE

--- Engine/AlgorithmManager.cs
+++ Engine/AlgorithmManager.cs
@@ -261,9 +261,19 @@
                             algorithm.Securities.Update(time, dataPoint);

                             //Update registered consolidators for this symbol index
-                            for (var j = 0; j < config.Consolidators.Count; j++)
+                            try
                             {
-                                config.Consolidators[j].Update(dataPoint);
+                                for (var j = 0; j < config.Consolidators.Count; j++)
+                                {
+                                    config.Consolidators[j].Update(dataPoint);
+                                }
+                            }
+                            catch (Exception err)
+                            {
+                                _runtimeError = err;
+                                _algorithmState = AlgorithmStatus.RuntimeError;
+                                Log.Error("AlgorithmManager.Run(): RuntimeError: Consolidators update: " + err.Message);
+                                return;
                             }

                             switch (config.Type.Name)


Fix rounding

Fix rounding

--- csharp/HOLMS.Platform/HOLMS.Platform/Support/Currency/DollarCents.cs
+++ csharp/HOLMS.Platform/HOLMS.Platform/Support/Currency/DollarCents.cs
@@ -1,5 +1,6 @@
 using System;
 using HOLMS.Types.Primitive;
+using Moq.Language;

 namespace HOLMS.Platform.Support.Currency {
     public struct DollarCents : IComparable<DollarCents>, IEquatable<DollarCents> {
@@ -11,22 +12,24 @@

         public DollarCents(bool isNegative, uint dollars, uint cents) {
             IsNegative = isNegative;
-            Dollars = dollars;
-            Cents = cents;
+
+            if (cents > 100) {
+                throw new ArgumentException("Cents must be between 0 and 100, inclusive");
+            } else if (cents == 100) {
+                Dollars = dollars + 1;
+                Cents = 0;
+            } else {
+                Dollars = dollars;
+                Cents = cents;
+            }
         }

         public DollarCents(MonetaryAmount amt) {
             var dc = FromCents((int) Math.Round(amt.Microdollars / (decimal)MicrodollarsPerCent, MidpointRounding.ToEven));
-
+
             IsNegative = dc.IsNegative;
-
-            if (dc.Cents == 100) {
-                Dollars = dc.Dollars + 1;
-                Cents = 0;
-            } else {
-                Dollars = dc.Dollars;
-                Cents = dc.Cents;
-            }
+            Dollars = dc.Dollars;
+            Cents = dc.Cents;
         }

         public static DollarCents FromCents(int cents) {


删除无用文件

删除无用文件

--- csharp_component/common/compress_and_encrypt/compress_and_encrypt.cs
+++ csharp_component/common/compress_and_encrypt/compress_and_encrypt.cs
@@ -1,43 +0,0 @@
-using System;
-using System.IO;
-using System.Collections;
-
-namespace common
-{
-    public class compress_and_encrypt
-    {
-        static public byte[] CompressAndEncrypt(byte[] input, byte XORKey)
-        {
-            MemoryStream input_stream = new MemoryStream();
-
-            var output_stream = new ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream(input_stream);
-            output_stream.Write(input, 0, input.Length);
-            output_stream.Close();
-
-            byte[] output = input_stream.ToArray();
-
-            for(int i = 0; i < output.Length; i++)
-            {
-                output[i] ^= XORKey;
-            }
-
-            return output;
-        }
-
-        static public byte[] UnEncryptAndUnCompress(byte[] input, byte XORKey)
-        {
-            for (int i = 0; i < input.Length; i++)
-            {
-                input[i] ^= XORKey;
-            }
-
-            MemoryStream input_stream = new MemoryStream(input);
-            var output_stream = new ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream(input_stream);
-            StreamReader rader = new StreamReader(output_stream, System.Text.Encoding.UTF8);
-            var tmp = rader.ReadToEnd();
-            byte[] output = System.Text.Encoding.UTF8.GetBytes(tmp);
-
-            return output;
-        }
-    }
-}


Use correct variable

Use correct variable

--- FalloutLauncher/Program.cs
+++ FalloutLauncher/Program.cs
@@ -36,7 +36,7 @@
                 goto exit;

             _log.WriteLine();
-            _log.WriteLine("FOSE path: \"{0}\"", FLAG_FOSE);
+            _log.WriteLine("FOSE path: \"{0}\"", FOSE_PATH);
             _log.WriteLine("Fallout 3 Launcher path: \"{0}\"", LAUNCHER_PATH);
             _log.WriteLine("Mod Organizer path: \"{0}\"", MOD_ORGANIZER_PATH);
             _log.WriteLine();
@@ -60,7 +60,7 @@
                     Start("Fallout 3 Launcher", LAUNCHER_PATH);
                     break;
                 case ConsoleKey.D2:
-                    Start("FOSE", FLAG_FOSE);
+                    Start("FOSE", FOSE_PATH);
                     break;
                 case ConsoleKey.D3:
                     Start("Mod Organizer", MOD_ORGANIZER_PATH);


Bug#10: Unable to configure TCPSink through App/web.config in case of using IP address

--- Serilog.Sinks.Network/NetworkLoggerConfigurationExtensions.cs
+++ Serilog.Sinks.Network/NetworkLoggerConfigurationExtensions.cs
@@ -2,6 +2,7 @@
 using System.Linq;
 using System.Net;
 using Serilog.Configuration;
+using Serilog.Debugging;
 using Serilog.Events;
 using Serilog.Sinks.Network.Sinks.TCP;
 using Serilog.Sinks.Network.Sinks.UDP;
@@ -9,27 +10,17 @@
 namespace Serilog.Sinks.Network
 {
     /// <summary>
-    /// Extends Serilog configuration to write events to the network.
+    ///     Extends Serilog configuration to write events to the network.
     /// </summary>
     public static class NetworkLoggerConfigurationExtensions
     {
-        private static IPAddress ToIP(string uri)
-        {
-            var ipHostEntry = Dns.GetHostEntry(uri);
-            if (!ipHostEntry.AddressList.Any())
-            {
-                throw new ArgumentException("Could not resolve " + uri);
-            }
-            return ipHostEntry.AddressList.First();
-        }
-
         public static LoggerConfiguration UDPSink(
             this LoggerSinkConfiguration loggerConfiguration,
-            string uri,
+            string uri,
             int port,
             LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum)
         {
-            var sink = new UDPSink(ToIP(uri), port);
+            var sink = new UDPSink(ResolveAddress(uri), port);
             return loggerConfiguration.Sink(sink, restrictedToMinimumLevel);
         }

@@ -57,12 +48,44 @@

         public static LoggerConfiguration TCPSink(
             this LoggerSinkConfiguration loggerConfiguration,
-            string uri,
+            string uri,
             int port,
             LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum)
         {
-            var sink = new TCPSink(ToIP(uri), port);
+            var sink = new TCPSink(ResolveAddress(uri), port);
             return loggerConfiguration.Sink(sink, restrictedToMinimumLevel);
         }
+
+        private static IPAddress ResolveAddress(string uri)
+        {
+            // Check if it is IP address
+            IPAddress address;
+
+            if (IPAddress.TryParse(uri, out address))
+                return address;
+
+            address = ResolveIP(uri);
+            if (address != null)
+                return address;
+
+            SelfLog.WriteLine("Unable to determine the destination IP-Address");
+            return IPAddress.Loopback;
+        }
+
+        private static IPAddress ResolveIP(string uri)
+        {
+            try
+            {
+                var ipHostEntry = Dns.GetHostEntry(uri);
+                if (!ipHostEntry.AddressList.Any())
+                    return null;
+                return ipHostEntry.AddressList.First();
+            }
+            catch (Exception)
+            {
+                SelfLog.WriteLine("Could not resolve " + uri);
+                return null;
+            }
+        }
     }
-}
+}


Add exception handling - missed from merge.

--- clients/csharp/src/Kafka/Kafka.Client/Producers/Producer.cs
+++ clients/csharp/src/Kafka/Kafka.Client/Producers/Producer.cs
@@ -90,11 +90,19 @@

             if (this.populateProducerPool)
             {
-                IDictionary<int, Broker> allBrokers = this.brokerPartitionInfo.GetAllBrokerInfo();
-                foreach (var broker in allBrokers)
-                {
-                    this.producerPool.AddProducer(
-                        new Broker(broker.Key, broker.Value.Host, broker.Value.Host, broker.Value.Port));
+                try
+                {
+                    IDictionary<int, Broker> allBrokers = this.brokerPartitionInfo.GetAllBrokerInfo();
+                    foreach (var broker in allBrokers)
+                    {
+                        this.producerPool.AddProducer(
+                            new Broker(broker.Key, broker.Value.Host, broker.Value.Host, broker.Value.Port));
+                    }
+                }
+                catch
+                {
+                    this.brokerPartitionInfo.Dispose();
+                    throw;
                 }
             }
         }


Use HttpClientFactory to create HttpClient in ResumableUpload

This allows the inner HttpClientHandler to have auto-redirect
disabled, which makes a difference on at least some imlpementations
of .NET Core.

--- Src/Support/GoogleApis/Apis/[Media]/Upload/ResumableUpload.cs
+++ Src/Support/GoogleApis/Apis/[Media]/Upload/ResumableUpload.cs
@@ -86,7 +86,7 @@
             ContentStream = contentStream;
             // Check if the stream length is known.
             StreamLength = ContentStream.CanSeek ? ContentStream.Length : UnknownSize;
-            HttpClient = options?.ConfigurableHttpClient ?? new ConfigurableHttpClient(new ConfigurableMessageHandler(new HttpClientHandler()));
+            HttpClient = options?.ConfigurableHttpClient ?? new HttpClientFactory().CreateHttpClient(new CreateHttpClientArgs { ApplicationName = "ResumableUpload", GZipEnabled = true });
             Options = options;
         }


[Issue #33] Including a namespace change in Command

--- StrangeIoC/scripts/strange/extensions/command/impl/Command.cs
+++ StrangeIoC/scripts/strange/extensions/command/impl/Command.cs
@@ -37,6 +37,7 @@
 using strange.extensions.command.api;
 using strange.extensions.injector.api;
 using strange.framework.api;
+using strange.extensions.pool.api;

 namespace strange.extensions.command.impl
 {


refactor code

refactor code

--- compiler/src/Brickred.Exchange.Compiler/CppCodeGenerator.cs
+++ compiler/src/Brickred.Exchange.Compiler/CppCodeGenerator.cs
@@ -905,12 +905,12 @@
                     protoDef.Name, this.newLineStr);
                 if (systemHeaderDecl != "") {
                     sb.Append(this.newLineStr);
-                }
-                sb.Append(systemHeaderDecl);
+                    sb.Append(systemHeaderDecl);
+                }
                 if (customHeaderDecl != "") {
                     sb.Append(this.newLineStr);
-                }
-                sb.Append(customHeaderDecl);
+                    sb.Append(customHeaderDecl);
+                }

                 output = sb.ToString();
             }


Operators for Timestamped<T>

Operators for Timestamped<T>

--- Illias/Time/Timestamped.cs
+++ Illias/Time/Timestamped.cs
@@ -97,7 +97,7 @@
         public Timestamped(DateTime Timestamp, T Value)
         {
             _Value      = Value;
-            _Timestamp  = Timestamp.ToUniversalTime();
+            _Timestamp  = Timestamp;
         }

         #endregion
@@ -115,6 +115,239 @@
         public static implicit operator Timestamped<T>(T Value)
         {
             return new Timestamped<T>(Value);
+        }
+
+        #endregion
+
+
+        #region Operator overloading
+
+        #region Operator == (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator == (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+
+            // If both are null, or both are same instance, return true.
+            if (Object.ReferenceEquals(Timestamped1, Timestamped2))
+                return true;
+
+            // If one is null, but not both, return false.
+            if (((Object) Timestamped1 == null) || ((Object) Timestamped2 == null))
+                return false;
+
+            return Timestamped1.Equals(Timestamped2);
+
+        }
+
+        #endregion
+
+        #region Operator != (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator != (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+            return !(Timestamped1 == Timestamped2);
+        }
+
+        #endregion
+
+        #region Operator <  (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator < (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+
+            if ((Object) Timestamped1 == null)
+                throw new ArgumentNullException("The given Timestamped1 must not be null!");
+
+            return Timestamped1.CompareTo(Timestamped2) < 0;
+
+        }
+
+        #endregion
+
+        #region Operator <= (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator <= (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+            return !(Timestamped1 > Timestamped2);
+        }
+
+        #endregion
+
+        #region Operator >  (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator > (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+
+            if ((Object) Timestamped1 == null)
+                throw new ArgumentNullException("The given Timestamped1 must not be null!");
+
+            return Timestamped1.CompareTo(Timestamped2) > 0;
+
+        }
+
+        #endregion
+
+        #region Operator >= (Timestamped1, Timestamped2)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped1">A timestamped.</param>
+        /// <param name="Timestamped2">Another timestamped.</param>
+        /// <returns>true|false</returns>
+        public static Boolean operator >= (Timestamped<T> Timestamped1, Timestamped<T> Timestamped2)
+        {
+            return !(Timestamped1 < Timestamped2);
+        }
+
+        #endregion
+
+        #endregion
+
+        #region IComparable<Timestamped<T>> Members
+
+        #region CompareTo(Object)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Object">An object to compare with.</param>
+        public Int32 CompareTo(Object Object)
+        {
+
+            if (Object == null)
+                throw new ArgumentNullException("The given object must not be null!");
+
+            return CompareTo((Timestamped<T>) Object);
+
+        }
+
+        #endregion
+
+        #region CompareTo(Timestamped)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Timestamped">An object to compare with.</param>
+        public Int32 CompareTo(Timestamped<T> Timestamped)
+        {
+
+            if ((Object) Timestamped == null)
+                throw new ArgumentNullException("The given Timestamped must not be null!");
+
+            // Compare the timestamps
+            var _Result = _Timestamp.CompareTo(Timestamped._Timestamp);
+
+            // If equal: Compare the values
+            if (_Result == 0)
+                _Result = _Value.ToString().CompareTo(Timestamped._Value.ToString());
+
+            return _Result;
+
+        }
+
+        #endregion
+
+        #endregion
+
+        #region IEquatable<Timestamped<T>> Members
+
+        #region Equals(Object)
+
+        /// <summary>
+        /// Compares two instances of this object.
+        /// </summary>
+        /// <param name="Object">An object to compare with.</param>
+        /// <returns>true|false</returns>
+        public override Boolean Equals(Object Object)
+        {
+
+            if (Object == null)
+                return false;
+
+            return this.Equals((Timestamped<T>) Object);
+
+        }
+
+        #endregion
+
+        #region Equals(Timestamped)
+
+        /// <summary>
+        /// Compares two charging station identifications for equality.
+        /// </summary>
+        /// <param name="Timestamped">A charging station identification to compare with.</param>
+        /// <returns>True if both match; False otherwise.</returns>
+        public Boolean Equals(Timestamped<T> Timestamped)
+        {
+
+            if ((Object) Timestamped == null)
+                return false;
+
+            return _Timestamp.       Equals(Timestamped._Timestamp) &&
+                   _Value.ToString().Equals(Timestamped._Value.ToString());
+
+        }
+
+        #endregion
+
+        #endregion
+
+        #region (override) GetHashCode()
+
+        /// <summary>
+        /// Return the HashCode of this object.
+        /// </summary>
+        /// <returns>The HashCode of this object.</returns>
+        public override Int32 GetHashCode()
+        {
+            unchecked
+            {
+                return _Timestamp.GetHashCode() * 17 ^ _Value.GetHashCode();
+            }
+        }
+
+        #endregion
+
+        #region (override) ToString()
+
+        /// <summary>
+        /// Return a string representation of this object.
+        /// </summary>
+        public override String ToString()
+        {
+            return String.Concat(_Timestamp.ToIso8601(), " -> ", _Value.ToString());
         }

         #endregion


Clean up and add xml comments in Utils

Clean up and add xml comments in Utils

--- Client/Utils.cs
+++ Client/Utils.cs
@@ -130,20 +130,26 @@
             spriteBatch.DrawString(Assets.fontDefault, versionstr, new Vector2(SDGame.Inst.GameWidth - Assets.fontDefault.MeasureString(versionstr).X - 16, SDGame.Inst.GameHeight - 28), Color.Gray);
         }

+        /// <summary>
+        /// Updates the position of the game title, making a smooth animation.
+        /// </summary>
+        /// <param name="deltaTime">The delta-time to interpolate with.</param>
+        /// <param name="target">The target height in pixels.</param>
         public static void UpdateTitle(float deltaTime, float target) {
             logoY += (target - logoY) * 4f * deltaTime;
         }

+        /// <summary>
+        /// Returns a string identifying the game version.
+        /// </summary>
         public static string GetVersionString() {
             Version v = Assembly.GetExecutingAssembly().GetName().Version;
             return $"v{v.Major}.{v.Minor}.{v.Revision}";
         }
-
-        public static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end) {
-            // TODO
-            throw new NotImplementedException();
-        }

+        /// <summary>
+        /// Returns the cross product of two 2D vectors, treating them as 3D vectors where the Z axis is zero for both vectors.
+        /// </summary>
         public static float Cross(this Vector2 a, Vector2 b) {
             return a.X * b.Y - a.Y * b.X;
         }


Add more semantic names.

Add more semantic names.

--- LightDx/InputAttributes.cs
+++ LightDx/InputAttributes.cs
@@ -16,6 +16,8 @@
         internal static readonly IntPtr COLOR = Marshal.StringToHGlobalAnsi("COLOR");
         internal static readonly IntPtr TEXCOORD = Marshal.StringToHGlobalAnsi("TEXCOORD");
         internal static readonly IntPtr NORMAL = Marshal.StringToHGlobalAnsi("NORMAL");
+        internal static readonly IntPtr TANGENT = Marshal.StringToHGlobalAnsi("TANGENT");
+        internal static readonly IntPtr BINORMAL = Marshal.StringToHGlobalAnsi("BINORMAL");
     }

     public sealed class PositionAttribute : InputAttribute
@@ -69,4 +71,30 @@
             get { return NORMAL; }
         }
     }
+
+    public sealed class TangentAttribute : InputAttribute
+    {
+        public TangentAttribute(int id = 0)
+        {
+            SemanticIndex = id;
+        }
+
+        internal override IntPtr SemanticName
+        {
+            get { return TANGENT; }
+        }
+    }
+
+    public sealed class BinormalAttribute : InputAttribute
+    {
+        public BinormalAttribute(int id = 0)
+        {
+            SemanticIndex = id;
+        }
+
+        internal override IntPtr SemanticName
+        {
+            get { return BINORMAL; }
+        }
+    }
 }


Improve error message of unsupported tar file type.

--- LxRunOffline/FileSystem.cs
+++ LxRunOffline/FileSystem.cs
@@ -160,7 +160,7 @@
 								eaData.Mode |= 0x8000;
 								break;
 							default:
-								Utils.Warning($"Ignoring unsupported file type {(char)type}.");
+								Utils.Warning($"Ignoring the file \"{entry.Name}\" of unsupported file type '{(char)type}'.");
 								continue;
 							}


Drastically simplify ConnectAsync logic thanks to a suggestion by @SirRufo

--- MailKit/Net/SocketUtils.cs
+++ MailKit/Net/SocketUtils.cs
@@ -36,91 +36,6 @@
 	static class SocketUtils
 	{
 #if NETSTANDARD_2_0 || NET_4_5 || __MOBILE__
-		class AsyncConnectState
-		{
-			public readonly CancellationToken CancellationToken;
-			public readonly Socket Socket;
-			public readonly string Host;
-			public readonly int Port;
-			public bool IsConnected;
-			Exception ex;
-
-			public AsyncConnectState (Socket socket, string host, int port, CancellationToken cancellationToken)
-			{
-				CancellationToken = cancellationToken;
-				Socket = socket;
-				Host = host;
-				Port = port;
-			}
-
-			public void SetCanceled ()
-			{
-				ex = ex ?? new OperationCanceledException ();
-			}
-
-			public void SetException (Exception ex)
-			{
-				this.ex = this.ex ?? ex;
-			}
-
-			public void Throw ()
-			{
-				if (ex != null)
-					throw ex;
-			}
-		}
-
-		// Note: EndConnect needs to catch all exceptions
-		static void EndConnect (IAsyncResult ar)
-		{
-			var connection = (AsyncConnectState) ar.AsyncState;
-
-			if (connection.CancellationToken.IsCancellationRequested) {
-				try {
-					connection.Socket.Close ();
-				} catch (SocketException) {
-				}
-				connection.SetCanceled ();
-				return;
-			}
-
-			try {
-				connection.Socket.EndConnect (ar);
-				connection.IsConnected = true;
-			} catch (Exception ex) {
-				connection.SetException (ex);
-			}
-		}
-
-		static void Connect (Socket socket, string host, int port, AsyncConnectState connection, CancellationToken cancellationToken)
-		{
-			var ar = socket.BeginConnect (host, port, EndConnect, connection);
-			var waitHandles = new WaitHandle[] { ar.AsyncWaitHandle, cancellationToken.WaitHandle };
-
-			WaitHandle.WaitAny (waitHandles);
-
-			try {
-				cancellationToken.ThrowIfCancellationRequested ();
-			} catch (OperationCanceledException) {
-				socket.Close ();
-				throw;
-			}
-
-			connection.Throw ();
-
-			if (!socket.Connected) {
-				// MONO BUG: If the AddressFamily is not supported (e.g. IPv6), then we could get into this situation...
-				throw new SocketException ((int) SocketError.AddressFamilyNotSupported);
-			}
-		}
-
-		static void ConnectAsync (object state)
-		{
-			var connection = (AsyncConnectState) state;
-
-			Connect (connection.Socket, connection.Host, connection.Port, connection, connection.CancellationToken);
-		}
-
 		public static async Task<Socket> ConnectAsync (string host, int port, IPEndPoint localEndPoint, bool doAsync, CancellationToken cancellationToken)
 		{
 			cancellationToken.ThrowIfCancellationRequested ();
@@ -132,12 +47,22 @@
 					socket.Bind (localEndPoint);

 				if (doAsync || cancellationToken.CanBeCanceled) {
-					var connection = new AsyncConnectState (socket, host, port, cancellationToken);
+					var tcs = new TaskCompletionSource<bool> ();

-					if (doAsync) {
-						await Task.Factory.StartNew (ConnectAsync, connection, cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Default).ConfigureAwait (false);
-					} else {
-						Connect (socket, host, port, connection, cancellationToken);
+					using (var registration = cancellationToken.Register (() => tcs.SetCanceled (), false)) {
+						var ar = socket.BeginConnect (host, port, e => tcs.SetResult (true), null);
+
+						try {
+							if (doAsync)
+								await tcs.Task.ConfigureAwait (false);
+							else
+								tcs.Task.Wait ();
+
+							socket.EndConnect (ar);
+						} catch (Exception) {
+							socket.Close ();
+							throw;
+						}
 					}
 				} else {
 					socket.Connect (host, port);


fix double enumeration in PermissionOverwrites

--- ModCore/Commands/Config.cs
+++ ModCore/Commands/Config.cs
@@ -621,7 +621,7 @@
                         ibx.Remove(chn.Id);
                     await ctx.SetGuildSettingsAsync(cfg);

-                    var os = chn.PermissionOverwrites.Where(xo => xo.Type.ToString().ToLower() == "member");
+                    var os = chn.PermissionOverwrites.Where(xo => xo.Type.ToString().ToLower() == "member").ToArray();
                     using (var db = this.Database.CreateContext())
                     {
                         if (os.Any())


Update QoSManager.cs

Update QoSManager.cs

--- MqttLib/Core/QoSManager.cs
+++ MqttLib/Core/QoSManager.cs
@@ -227,7 +227,7 @@

                     foreach(ulong mid in removeMessageIds)
                     {
-                        removeMessage(mid);
+                        _messages.Remove(mid);
                     }
                 }
                 Thread.Sleep(2000);


Fixup

Fixup


2015 07 C# Parse input in solution methods

As the wires are mutated for performance reasons.

--- 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Core/Day07.cs
+++ 2015/cs/AdventOfCode2015_CSharp/AdventOfCode2015.Core/Day07.cs
@@ -11,19 +11,19 @@
         public override string Title => "Some Assembly Required";
         public override string Run(string input)
         {
+            return FormatReport(
+                SolvePartOne(input)
+            );
+        }
+
+        public static List<Wire> ParseInput(string input)
+        {
+            return input.Trim().Split('\n').Select(Wire.FromString).ToList();
+        }
+
+        public static ushort SolvePartOne(string input)
+        {
             List<Wire> wires = ParseInput(input);
-            return FormatReport(
-                SolvePartOne(wires)
-            );
-        }
-
-        public static List<Wire> ParseInput(string input)
-        {
-            return input.Trim().Split('\n').Select(Wire.FromString).ToList();
-        }
-
-        public static ushort SolvePartOne(List<Wire> wires)
-        {
             return Circuit.FromInstructions(wires)["a"];
         }


Set Primal TraversalPower to 100.

Set Primal TraversalPower to 100.