Made some idiomaticacy changes to `NumberByteArrayExtensions`.

--- Evbpc.Framework/Utilities/Extensions/NumberByteArrayExtensions.cs
+++ Evbpc.Framework/Utilities/Extensions/NumberByteArrayExtensions.cs
@@ -17,7 +17,7 @@
         /// <returns>A byte[] representing the uint value.</returns>
         public static byte[] ToByteArray(this uint value)
         {
-            var size = 4;
+            const int size = sizeof(uint);

             var result = new byte[size];

@@ -37,7 +37,7 @@
         /// <returns>A uint that represents the converted byte[].</returns>
         public static uint ToUInt32(this byte[] data)
         {
-            var requiredSize = 4;
+            const int requiredSize = sizeof(uint);

             if (data.Length != requiredSize)
             {
@@ -48,7 +48,7 @@

             for (var i = 0; i < requiredSize; i++)
             {
-                result |= ((uint)data[i] << ((requiredSize - (i + 1)) * 8));
+                result |= (uint)data[i] << ((requiredSize - (i + 1)) * 8);
             }

             return result;
@@ -61,9 +61,9 @@
         /// <returns>A byte[] representing the int value.</returns>
         public static byte[] ToByteArray(this int value)
         {
-            var t = (uint)value;
+            var asUInt = (uint)value;

-            return t.ToByteArray();
+            return asUInt.ToByteArray();
         }

         ///
@@ -73,7 +73,7 @@
         /// <returns>An int value representing the byte[].</returns>
         public static int ToInt32(this byte[] data)
         {
-            var requiredSize = 4;
+            const int requiredSize = sizeof(int);

             if (data.Length != requiredSize)
             {
@@ -90,7 +90,7 @@
         /// <returns>A byte[] representing the ulong.</returns>
         public static byte[] ToByteArray(this ulong value)
         {
-            var size = 8;
+            const int size = sizeof(ulong);

             var result = new byte[size];

@@ -110,7 +110,7 @@
         /// <returns>A ulong reprented by the byte[].</returns>
         public static ulong ToUInt64(this byte[] data)
         {
-            var requiredSize = 8;
+            const int requiredSize = sizeof(ulong);

             if (data.Length != requiredSize)
             {
@@ -121,7 +121,7 @@

             for (var i = 0; i < requiredSize; i++)
             {
-                result |= ((ulong)data[i] << ((requiredSize - (i + 1)) * 8));
+                result |= (ulong)data[i] << ((requiredSize - (i + 1)) * 8);
             }

             return result;
@@ -134,9 +134,9 @@
         /// <returns>A byte[] representing the long value.</returns>
         public static byte[] ToByteArray(this long value)
         {
-            var t = (ulong)value;
+            var asULong = (ulong)value;

-            return t.ToByteArray();
+            return asULong.ToByteArray();
         }

         ///
@@ -146,7 +146,7 @@
         /// <returns>A long value represented by the byte[].</returns>
         public static long ToInt64(this byte[] data)
         {
-            var requiredSize = 8;
+            const int requiredSize = sizeof(long);

             if (data.Length != requiredSize)
             {


Update Client.cs

Update Client.cs

Added hexists, zincr, zexists, zrange, zrrange commands

--- api/dotnet/Client.cs
+++ api/dotnet/Client.cs
@@ -192,7 +192,28 @@
 			this.hdel(_bytes(name), _bytes(key));
 		}

-		public Int64 hsize(byte[] name) {
+		public bool hexists(byte[] name, byte[] key)
+                {
+                        List<byte[]> resp = request("hexists", name, key);
+                        resp_code = _string(resp[0]);
+                        if (resp_code == "not_found")
+                        {
+                            return false;
+                        }
+                        this.assert_ok();
+                        if (resp.Count != 2)
+                        {
+                              throw new Exception("Bad response!");
+                        }
+                        return (_string(resp[1]) == "1" ? true : false);
+
+                }
+                public bool hexists(string name, string key)
+                {
+                        return this.hexists(_bytes(name), _bytes(key));
+                }
+
+                public Int64 hsize(byte[] name) {
 			List<byte[]> resp = request("hsize", name);
 			resp_code = _string(resp[0]);
 			this.assert_ok();
@@ -215,7 +236,8 @@
 			List<byte[]> resp = request("hrscan", name, key_start, key_end, limit.ToString());
 			return parse_scan_resp(resp);
 		}
-
+
+
 		/***** zset *****/

 		public void zset(byte[] name, byte[] key, Int64 score) {
@@ -278,7 +300,61 @@
 			return this.zsize(_bytes(name));
 		}

-		public KeyValuePair<string, Int64>[] zscan(string name, string key_start, Int64 score_start, Int64 score_end, Int64 limit) {
+		public bool zexists(byte[] name, byte[] key )
+        {
+
+            List<byte[]> resp = request("zexists", name, key);
+            resp_code = _string(resp[0]);
+            if (resp_code == "not_found")
+            {
+                return false;
+            }
+            this.assert_ok();
+            if (resp.Count != 2)
+            {
+                throw new Exception("Bad response!");
+            }
+            return (_string(resp[1]) == "1" ? true : false);
+
+        }
+
+        public bool zexists(string name, string key )
+        {
+            return this.zexists(_bytes(name), _bytes(key));
+        }
+
+        public KeyValuePair<string, Int64>[] zrange(string name, Int32 offset, Int32 limit)
+        {
+
+            List<byte[]> resp = request("zrange", name, offset.ToString(), limit.ToString());
+            KeyValuePair<string, byte[]>[] kvs = parse_scan_resp(resp);
+            KeyValuePair<string, Int64>[] ret = new KeyValuePair<string, Int64>[kvs.Length];
+            for (int i = 0; i < kvs.Length; i++)
+            {
+                string key = kvs[i].Key;
+                Int64 score = Int64.Parse(_string(kvs[i].Value));
+                ret[i] = new KeyValuePair<string, Int64>(key, score);
+            }
+            return ret;
+        }
+
+        public KeyValuePair<string, Int64>[] zrrange(string name, Int32 offset, Int32 limit)
+        {
+
+
+            List<byte[]> resp = request("zrrange", name, offset.ToString(), limit.ToString());
+            KeyValuePair<string, byte[]>[] kvs = parse_scan_resp(resp);
+            KeyValuePair<string, Int64>[] ret = new KeyValuePair<string, Int64>[kvs.Length];
+            for (int i = 0; i < kvs.Length; i++)
+            {
+                string key = kvs[i].Key;
+                Int64 score = Int64.Parse(_string(kvs[i].Value));
+                ret[i] = new KeyValuePair<string, Int64>(key, score);
+            }
+            return ret;
+        }
+
+        public KeyValuePair<string, Int64>[] zscan(string name, string key_start, Int64 score_start, Int64 score_end, Int64 limit) {
 			string score_s = "";
 			string score_e = "";
 			if(score_start != Int64.MinValue) {


Cleaned up help text. Fixes #4653.

Cleaned up help text. Fixes #4653.

--- src/dotnet/commands/dotnet-migrate/Program.cs
+++ src/dotnet/commands/dotnet-migrate/Program.cs
@@ -36,14 +36,14 @@
                 " - a directory to migrate, it will recursively search for project.json files to migrate.",
                 "Defaults to current directory if nothing is specified."));

-            CommandOption template = app.Option("-t|--template-file", "Base MSBuild template to use for migrated app. The default is the project included in dotnet new", CommandOptionType.SingleValue);
-            CommandOption sdkVersion = app.Option("-v|--sdk-package-version", "The version of the sdk package that will be referenced in the migrated app. The default is the version of the sdk in dotnet new", CommandOptionType.SingleValue);
+            CommandOption template = app.Option("-t|--template-file", "Base MSBuild template to use for migrated app. The default is the project included in dotnet new.", CommandOptionType.SingleValue);
+            CommandOption sdkVersion = app.Option("-v|--sdk-package-version", "The version of the sdk package that will be referenced in the migrated app. The default is the version of the sdk in dotnet new.", CommandOptionType.SingleValue);
             CommandOption xprojFile = app.Option("-x|--xproj-file", "The path to the xproj file to use. Required when there is more than one xproj in a project directory.", CommandOptionType.SingleValue);
-            CommandOption skipProjectReferences = app.Option("-s|--skip-project-references", "Skip migrating project references. By default project references are migrated recursively", CommandOptionType.BoolValue);
-
-            CommandOption reportFile = app.Option("-r|--report-file", "Output migration report to a file in addition to the console.", CommandOptionType.SingleValue);
-            CommandOption structuredReportOutput = app.Option("--format-report-file-json", "Output migration report file as json rather than user messages", CommandOptionType.BoolValue);
-            CommandOption skipBackup = app.Option("--skip-backup", "Skip moving project.json, global.json, and *.xproj to a `backup` directory after successful migration.", CommandOptionType.BoolValue);
+            CommandOption skipProjectReferences = app.Option("-s|--skip-project-references", "Skip migrating project references. By default project references are migrated recursively.", CommandOptionType.BoolValue);
+
+            CommandOption reportFile = app.Option("-r|--report-file", "Output migration report to the given file in addition to the console.", CommandOptionType.SingleValue);
+            CommandOption structuredReportOutput = app.Option("--format-report-file-json", "Output migration report file as json rather than user messages.", CommandOptionType.BoolValue);
+            CommandOption skipBackup = app.Option("--skip-backup", "Skip moving project.json, global.json, and *.xproj to a `backup` directory after successful migration.", CommandOptionType.BoolValue);

             app.OnExecute(() =>
             {


remove unnecessary usings

remove unnecessary usings

--- src/ResourceManager/Profile/Commands.Profile.Test/ResourceGroupCompleterUnitTests.cs
+++ src/ResourceManager/Profile/Commands.Profile.Test/ResourceGroupCompleterUnitTests.cs
@@ -13,14 +13,9 @@
 // ----------------------------------------------------------------------------------

 using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
-using Microsoft.Azure.Management.Internal.Resources;
-using Microsoft.Azure.Management.Internal.Resources.Models;
-using Microsoft.Rest.Azure.OData;
 using Microsoft.WindowsAzure.Commands.ScenarioTest;
-using Moq;
 using System;
 using System.Collections.Generic;
-using System.Threading;
 using Xunit;

 namespace Microsoft.Azure.Commands.Profile.Test


Adjust error message

Adjust error message

--- GitMind/RepositoryViews/Open/OpenRepoService.cs
+++ GitMind/RepositoryViews/Open/OpenRepoService.cs
@@ -131,7 +131,7 @@
 			}
 			catch (Exception e)
 			{
-				message.ShowError($"Failed to clone{uri} into\n{folder}\n\nError: {e.Message}");
+				message.ShowError($"Failed to clone {uri}\ninto:{folder}\n\nError: {e.Message}");
 			}
 		}


Slower drag speed.

Slower drag speed.

--- Gu.Wpf.UiAutomation/AutomationElements/Thumb.cs
+++ Gu.Wpf.UiAutomation/AutomationElements/Thumb.cs
@@ -5,7 +5,7 @@

     public class Thumb : UiElement
     {
-        private const int DragSpeed = 500;
+        private const int DragSpeed = 200;

         public Thumb(AutomationElement automationElement)
             : base(automationElement)


Travis tests.

Travis tests.

--- src/FunctionalTests/MongoDB/MongoDBRepositoryBaseTest.cs
+++ src/FunctionalTests/MongoDB/MongoDBRepositoryBaseTest.cs
@@ -18,10 +18,7 @@
 		private UserMongoDBRepository m_target;
 		private IUnitOfWork m_unitOfWork;
 		private string[] m_mongodPaths = new string[] {
-			"/Applications/mongodb/bin/mongod",
-			"/etc/rc.d/init.d/mongod",
-			"/etc/init.d/mongodb",
-			"mongod"
+			"/Applications/mongodb/bin/mongod"
 		};
 		#endregion

@@ -47,7 +44,8 @@
 			}

 			if (String.IsNullOrEmpty (mongodPath)) {
-				throw new InvalidOperationException ("There is no mongod in the following paths: {0}. Please, check if MongoDB is installed.".With (String.Join (", ", m_mongodPaths)));
+				mongodPath = "service mongodb";
+				//throw new InvalidOperationException ("There is no mongod in the following paths: {0}. Please, check if MongoDB is installed.".With (String.Join (", ", m_mongodPaths)));
 			}

 			ProcessHelper.Run (mongodPath, "--dbpath {0} --logpath {1}".With (dbPath, logPath), false);


Fix tests.

Fix tests.

--- Gu.Analyzers.Test/GU0031DisposeMemberTests/HappyPath.Recursion.cs
+++ Gu.Analyzers.Test/GU0031DisposeMemberTests/HappyPath.Recursion.cs
@@ -129,7 +129,7 @@

     public void Dispose()
     {
-        this.RecursiveMethod().Dispose();
+        this.Recursive1().Dispose();
     }
 }";
                 await this.VerifyHappyPathAsync(testCode)
@@ -140,23 +140,27 @@
             public async Task IgnoresRecursiveOutParameter()
             {
                 var testCode = @"
-using System;
-using System.IO;
-
-public sealed class Foo : IDisposable
-{
-    private readonly Stream stream;
-
-    public Foo()
-    {
-        if(TryGetStream(out this.stream))
-        {
-        }
-    }
-
-    public bool TryGetStream(out Stream outValue)
-    {
-        return TryGetStream(out Stream outValue);
+namespace RoslynSandbox
+{
+    using System;
+    using System.IO;
+
+    public sealed class Foo
+    {
+        private readonly Stream stream;
+
+        public Foo()
+        {
+            if (this.TryGetStream(out this.stream))
+            {
+            }
+        }
+
+        public bool TryGetStream(out Stream outValue)
+        {
+            outValue = null;
+            return this.TryGetStream(out outValue);
+        }
     }
 }";
                 await this.VerifyHappyPathAsync(testCode)
@@ -167,28 +171,30 @@
             public async Task IgnoresRecursiveOutParameterChain()
             {
                 var testCode = @"
-using System;
-using System.IO;
-
-public sealed class Foo : IDisposable
-{
-    private readonly Stream stream;
-
-    public Foo()
-    {
-        if(TryGetStream(out this.stream))
-        {
-        }
-    }
-
-    public bool TryGetStream1(out Stream outValue)
-    {
-        return TryGetStream2(out Stream outValue);
-    }
-
-    public bool TryGetStream2(out Stream outValue)
-    {
-        return TryGetStream1(out Stream outValue);
+namespace RoslynSandbox
+{
+    using System.IO;
+
+    public sealed class Foo
+    {
+        private readonly Stream stream;
+
+        public Foo()
+        {
+            if (this.TryGetStream1(out this.stream))
+            {
+            }
+        }
+
+        public bool TryGetStream1(out Stream outValue1)
+        {
+            return this.TryGetStream2(out outValue1);
+        }
+
+        public bool TryGetStream2(out Stream outValue2)
+        {
+            return this.TryGetStream1(out outValue2);
+        }
     }
 }";
                 await this.VerifyHappyPathAsync(testCode)


Merging changes from AB_dreeve/efreversepoco

--- Scratch/Program.cs
+++ Scratch/Program.cs
@@ -87,7 +87,7 @@

         // Settings
         string ConnectionStringName = "MyDbContext";   // Uses last connection string in config if not specified
-        string ConnectionString = "Data Source=(local);Initial Catalog=fred;Integrated Security=True;Application Name=EntityFramework Reverse POCO Generator";   // Uses last connection string in config if not specified
+        string ConnectionString = "Data Source=(local);Initial Catalog=FredManyToMany;Integrated Security=True;Application Name=EntityFramework Reverse POCO Generator";   // Uses last connection string in config if not specified
         bool IncludeViews = true;
         string DbContextName = "MyDbContext";
         bool MakeClassesPartial = true;


Cosmetic changes

Cosmetic changes

--- src/Kephas.Core/Composition/Lite/Internal/ServiceInfo.cs
+++ src/Kephas.Core/Composition/Lite/Internal/ServiceInfo.cs
@@ -84,7 +84,7 @@

         bool IAppServiceInfo.AsOpenGeneric => this.ContractType.IsGenericType && this.ContractType.IsGenericTypeDefinition;

-        Type[] IAppServiceInfo.MetadataAttributes { get; }
+        Type[] IAppServiceInfo.MetadataAttributes { get; } = Array.Empty<Type>();

         public Type ContractType { get; }


Removed commented out code and renamed classes to be more descriptive.

--- src/Marten.Testing/Schema/UniqueIndexMultiTenantTests.cs
+++ src/Marten.Testing/Schema/UniqueIndexMultiTenantTests.cs
@@ -25,39 +25,22 @@
             public string Name { get; set; }
         }

-        private class Project2 : Project { } //used for duplicatedfield index tests
+        private class ProjectUsingDuplicateField : Project { } //used for duplicatedfield index tests

         //used for attributes index tests
-        private class Project3 : Project
+        private class ProjectWithUniqueCodePerTenant : Project
         {
             [UniqueIndex(IsScopedPerTenant = true, IndexType = UniqueIndexType.Computed)]
             public string Code { get; set; }
-        }
-
-        //private class BadProject : Project { } //used for bad index tests
-
-        //[Fact]
-        //public void given_document_is_not_tenanted_do_not_allow_tenanted_indexes()
-        //{
-        //    var e = Assert.Throws<InvalidOperationException>(() =>
-        //    {
-        //        DocumentStore.For(_ =>
-        //            {
-        //                //note that BadProject is not configured for multi-tenancy
-        //                _.Schema.For<BadProject>().UniqueIndex(UniqueIndexType.Computed, "bad_index_name", true, x => x.Name);
-        //            });
-        //    });
-
-        //    e.Message.ShouldContain("BadProject is not configured for Conjoined Tenancy");
-        //}
+        }

         [Fact]
         public void given_two_documents_for_different_tenants_succeeds_using_attribute()
         {
             var store = DocumentStore.For(_ =>
             {
-                //index definition set on attribute of Project3
-                _.Schema.For<Project3>().MultiTenanted();
+                //index definition set on attribute of ProjectWithUniqueCodePerTenant
+                _.Schema.For<ProjectWithUniqueCodePerTenant>().MultiTenanted();

                 _.Connection(ConnectionSource.ConnectionString);

@@ -65,10 +48,10 @@

             using (var session = store.OpenSession())
             {
-                session.Store(new Project3 { Code = "ABC" });
+                session.Store(new ProjectWithUniqueCodePerTenant { Code = "ABC" });
                 session.SaveChanges();

-                session.Store(new Project3 { Code = "ABC" });
+                session.Store(new ProjectWithUniqueCodePerTenant { Code = "ABC" });

                 try
                 {
@@ -141,8 +124,8 @@
         {
             var store = DocumentStore.For(_ =>
             {
-                _.Schema.For<Project2>().MultiTenanted();
-                _.Schema.For<Project2>().UniqueIndex(UniqueIndexType.DuplicatedField, "ix_duplicated_field_name", true, x => x.Name); //have to pass in index name
+                _.Schema.For<ProjectUsingDuplicateField>().MultiTenanted();
+                _.Schema.For<ProjectUsingDuplicateField>().UniqueIndex(UniqueIndexType.DuplicatedField, "ix_duplicated_field_name", true, x => x.Name); //have to pass in index name
                 _.Connection(ConnectionSource.ConnectionString);

             });
@@ -150,10 +133,10 @@
             //default tenant unique constraints still work
             using (var session = store.OpenSession())
             {
-                session.Store(new Project2 { Name = "Project A" });
+                session.Store(new ProjectUsingDuplicateField { Name = "Project A" });
                 session.SaveChanges();

-                session.Store(new Project2 { Name = "Project A" });
+                session.Store(new ProjectUsingDuplicateField { Name = "Project A" });

                 try
                 {
@@ -168,16 +151,16 @@
             //but tenant abc can add a project with the same name
             using (var session = store.OpenSession("abc"))
             {
-                session.Store(new Project2 { Name = "Project A" });
+                session.Store(new ProjectUsingDuplicateField { Name = "Project A" });
                 session.SaveChanges();
             }

             //as can tenant def, but only once within the tenant
             using (var session = store.OpenSession("def"))
             {
-                session.Store(new Project2 { Name = "Project A" });
+                session.Store(new ProjectUsingDuplicateField { Name = "Project A" });
                 session.SaveChanges();
-                session.Store(new Project2 { Name = "Project A" });
+                session.Store(new ProjectUsingDuplicateField { Name = "Project A" });

                 try
                 {


Minor change in MvcBuilderExtensions.

Minor change in MvcBuilderExtensions.

--- src/MicroNetCore.Rest/Extensions/MvcBuilderExtensions.cs
+++ src/MicroNetCore.Rest/Extensions/MvcBuilderExtensions.cs
@@ -10,13 +10,11 @@
         public static IMvcBuilder AddRestControllers(this IMvcBuilder builder, IEnumerable<Type> types)
         {
             var controllerTypes = types.Select(t => typeof(RestController<>).MakeGenericType(t));
-            return builder.AddApplicationPart(controllerTypes);
-        }
+            var applicationPart = new RestApplicationPart(controllerTypes);

-        private static IMvcBuilder AddApplicationPart(this IMvcBuilder builder, IEnumerable<Type> controllerTypes)
-        {
-            return builder.ConfigureApplicationPartManager(
-                apm => apm.ApplicationParts.Add(new RestApplicationPart(controllerTypes)));
+            builder.ConfigureApplicationPartManager(apm => apm.ApplicationParts.Add(applicationPart));
+
+            return builder;
         }
     }
 }


Fix issue with CollectibleTypeTest (#328)

CollectibleTypeTest will non-determinstically fail.  This is because the test would attach to its own process.  Moving this to CreateSnapshotAndAttach makes the test pass all the time.

--- src/Microsoft.Diagnostics.Runtime.Tests/src/TypeTests.cs
+++ src/Microsoft.Diagnostics.Runtime.Tests/src/TypeTests.cs
@@ -348,7 +348,7 @@
             RuntimeHelpers.RunClassConstructor(Assembly.GetExecutingAssembly()
                 .GetType(typeof(UncollectibleUnmanagedStruct).FullName).TypeHandle);

-            using DataTarget dataTarget = DataTarget.AttachToProcess(Process.GetCurrentProcess().Id, uint.MaxValue, AttachFlag.Passive);
+            using DataTarget dataTarget = DataTarget.CreateSnapshotAndAttach(Process.GetCurrentProcess().Id);

             ClrHeap heap = dataTarget.ClrVersions.Single().CreateRuntime().Heap;


Shield - better exception safety.

Shield - better exception safety.

--- Shielded/Shield.cs
+++ Shielded/Shield.cs
@@ -320,20 +320,17 @@
                         {
                             _currentTransactionStartStamp = Interlocked.Read(ref _lastStamp);
                             commutedItems = TransItems.BagOrNew();
-                            _localItems = commutedItems;
-                            _blockCommute = true;
                             try
                             {
+                                _localItems = commutedItems;
+                                _blockCommute = true;
                                 foreach (var comm in items.Commutes)
                                     comm.Perform();
                             }
                             catch (TransException ex)
                             {
                                 if (ex is NoRepeatTransException)
-                                {
-                                    _localItems = items;
                                     throw;
-                                }
                                 foreach (var item in commutedItems.Enlisted)
                                     item.Rollback();
                                 TransItems.Bag(commutedItems);
@@ -342,9 +339,9 @@
                             }
                             finally
                             {
+                                _localItems = items;
                                 _blockCommute = false;
                             }
-                            _localItems = items;
                             break;
                         }
                         if (commutedItems.Enlisted.Overlaps(enlisted))


Make exception message more helpful. Fixes #206

--- src/MySqlConnector/MySqlClient/MySqlStatementPreparer.cs
+++ src/MySqlConnector/MySqlClient/MySqlStatementPreparer.cs
@@ -55,7 +55,7 @@
 				if (parameterIndex != -1)
 					DoAppendParameter(parameterIndex, index, length);
 				else if ((m_preparer.m_options & StatementPreparerOptions.AllowUserVariables) == 0)
-					throw new MySqlException("Parameter '{0}' must be defined.".FormatInvariant(parameterName));
+					throw new MySqlException("Parameter '{0}' must be defined. To use this as a variable, set 'Allow User Variables=true' in the connection string.".FormatInvariant(parameterName));
 			}

 			protected override void OnPositionalParameter(int index)


Changed LoadConfigurationFromAppSettings to prioritize current directory (#885)

--- src/NLog.Web.AspNetCore/Config/SetupBuilderExtensions.cs
+++ src/NLog.Web.AspNetCore/Config/SetupBuilderExtensions.cs
@@ -21,14 +21,18 @@
         public static ISetupBuilder LoadConfigurationFromAppSettings(this ISetupBuilder setupBuilder, string basePath = null, string environment = null, string nlogConfigSection = "NLog", bool optional = true, bool reloadOnChange = false)
         {
             environment = environment ?? GetAspNetCoreEnvironment("ASPNETCORE_ENVIRONMENT") ?? GetAspNetCoreEnvironment("DOTNET_ENVIRONMENT") ?? "Production";
+            basePath = basePath ?? GetAspNetCoreEnvironment("ASPNETCORE_CONTENTROOT") ?? GetAspNetCoreEnvironment("DOTNET_CONTENTROOT");

             var currentBasePath = basePath;
             if (currentBasePath is null)
             {
-                currentBasePath = AppContext.BaseDirectory;
-                if (string.IsNullOrEmpty(currentBasePath))
+                currentBasePath = Environment.CurrentDirectory;
+
+                var normalizeCurDir = Path.GetFullPath(currentBasePath).TrimEnd(Path.DirectorySeparatorChar).TrimEnd(Path.AltDirectorySeparatorChar).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+                var normalizeAppDir = Path.GetFullPath(AppContext.BaseDirectory).TrimEnd(Path.DirectorySeparatorChar).TrimEnd(Path.AltDirectorySeparatorChar).Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+                if (normalizeAppDir.IndexOf(normalizeCurDir, StringComparison.OrdinalIgnoreCase) != 0)
                 {
-                    currentBasePath = Directory.GetCurrentDirectory();
+                    currentBasePath = AppContext.BaseDirectory; // Avoid using Windows-System32 as current directory
                 }
             }


Fixed crash

Fixed crash

--- src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs
+++ src/NadekoBot/Modules/Utility/Commands/UnitConversion.cs
@@ -66,35 +66,40 @@
             }

             public async Task UpdateCurrency()
-            {
-                var currencyRates = await UpdateCurrencyRates();
-                var unitTypeString = "currency";
-                var range = currencyRates.ConversionRates.Select(u => new ConvertUnit()
+            {try
                 {
-                    InternalTrigger = u.Key,
-                    Modifier = u.Value,
-                    UnitType = unitTypeString
-                }).ToArray();
-                var baseType = new ConvertUnit()
-                {
-                    Triggers = new[] { currencyRates.Base },
-                    Modifier = decimal.One,
-                    UnitType = unitTypeString
-                };
-                var toRemove = Units.Where(u => u.UnitType == unitTypeString);
+                    var currencyRates = await UpdateCurrencyRates();
+                    var unitTypeString = "currency";
+                    var range = currencyRates.ConversionRates.Select(u => new ConvertUnit()
+                    {
+                        InternalTrigger = u.Key,
+                        Modifier = u.Value,
+                        UnitType = unitTypeString
+                    }).ToArray();
+                    var baseType = new ConvertUnit()
+                    {
+                        Triggers = new[] { currencyRates.Base },
+                        Modifier = decimal.One,
+                        UnitType = unitTypeString
+                    };
+                    var toRemove = Units.Where(u => u.UnitType == unitTypeString);

-                using (var uow = DbHandler.UnitOfWork())
-                {
-                    uow.ConverterUnits.RemoveRange(toRemove.ToArray());
-                    uow.ConverterUnits.Add(baseType);
-                    uow.ConverterUnits.AddRange(range);
+                    using (var uow = DbHandler.UnitOfWork())
+                    {
+                        uow.ConverterUnits.RemoveRange(toRemove.ToArray());
+                        uow.ConverterUnits.Add(baseType);
+                        uow.ConverterUnits.AddRange(range);

-                    await uow.CompleteAsync().ConfigureAwait(false);
+                        await uow.CompleteAsync().ConfigureAwait(false);
+                    }
+                    Units.RemoveAll(u => u.UnitType == unitTypeString);
+                    Units.Add(baseType);
+                    Units.AddRange(range);
+                    _log.Info("Updated Currency");
                 }
-                Units.RemoveAll(u => u.UnitType == unitTypeString);
-                Units.Add(baseType);
-                Units.AddRange(range);
-                _log.Info("Updated Currency");
+                catch {
+                    _log.Warn("Failed updating currency.");
+                }
             }
             [NadekoCommand, Usage, Description, Aliases]
             [RequireContext(ContextType.Guild)]


add Compare to the ILdapConnection interface

--- src/Novell.Directory.Ldap.NETStandard/ILdapConnection.cs
+++ src/Novell.Directory.Ldap.NETStandard/ILdapConnection.cs
@@ -755,5 +755,58 @@
         /// </exception>
         ILdapSearchResults Search(string @base, int scope, string filter, string[] attrs, bool typesOnly,
             LdapSearchConstraints cons);
+
+        /// <summary>
+        ///     Synchronously checks to see if an entry contains an attribute
+        ///     with a specified value.
+        /// </summary>
+        /// <param name="dn">
+        ///     The distinguished name of the entry to use in the
+        ///     comparison.
+        /// </param>
+        /// <param name="attr">
+        ///     The attribute to compare against the entry. The
+        ///     method checks to see if the entry has an
+        ///     attribute with the same name and value as this
+        ///     attribute.
+        /// </param>
+        /// <returns>
+        ///     True if the entry has the value,
+        ///     and false if the entry does not
+        ///     have the value or the attribute.
+        /// </returns>
+        /// <exception>
+        ///     LdapException A general exception which includes an error
+        ///     message and an Ldap error code.
+        /// </exception>
+        bool Compare(string dn, LdapAttribute attr);
+
+        /// <summary>
+        ///     Synchronously checks to see if an entry contains an attribute with a
+        ///     specified value, using the specified constraints.
+        /// </summary>
+        /// <param name="dn">
+        ///     The distinguished name of the entry to use in the
+        ///     comparison.
+        /// </param>
+        /// <param name="attr">
+        ///     The attribute to compare against the entry. The
+        ///     method checks to see if the entry has an
+        ///     attribute with the same name and value as this
+        ///     attribute.
+        /// </param>
+        /// <param name="cons">
+        ///     Constraints specific to the operation.
+        /// </param>
+        /// <returns>
+        ///     True if the entry has the value,
+        ///     and false if the entry does not
+        ///     have the value or the attribute.
+        /// </returns>
+        /// <exception>
+        ///     LdapException A general exception which includes an error
+        ///     message and an Ldap error code.
+        /// </exception>
+        bool Compare(string dn, LdapAttribute attr, LdapConstraints cons);
     }
 }


Updating tests

Updating tests

--- src/Pickles/Pickles.Test/WhenWorkingWithHtmlResources.cs
+++ src/Pickles/Pickles.Test/WhenWorkingWithHtmlResources.cs
@@ -33,14 +33,16 @@
             var htmlResources = Container.Resolve<HtmlResourceSet>();
             HtmlResource[] resources = htmlResources.All.ToArray();

-            resources.Length.ShouldEqual(7);
+            resources.Length.ShouldEqual(9);
             resources.Any(resource => resource.File == "success.png").ShouldBeTrue();
             resources.Any(resource => resource.File == "failure.png").ShouldBeTrue();
+            resources.Any(resource => resource.File == "inconclusive.png").ShouldBeTrue();
             resources.Any(resource => resource.File == "global.css").ShouldBeTrue();
             resources.Any(resource => resource.File == "master.css").ShouldBeTrue();
             resources.Any(resource => resource.File == "reset.css").ShouldBeTrue();
             resources.Any(resource => resource.File == "structure.css").ShouldBeTrue();
             resources.Any(resource => resource.File == "print.css").ShouldBeTrue();
+            resources.Any(resource => resource.File == "font-awesome.css").ShouldBeTrue();
         }

         [Test]
@@ -66,12 +68,13 @@
             var htmlResources = Container.Resolve<HtmlResourceSet>();
             HtmlResource[] stylesheets = htmlResources.Stylesheets.ToArray();

-            stylesheets.Length.ShouldEqual(5);
+            stylesheets.Length.ShouldEqual(6);
             stylesheets.Any(stylesheet => stylesheet.File == "global.css").ShouldBeTrue();
             stylesheets.Any(stylesheet => stylesheet.File == "master.css").ShouldBeTrue();
             stylesheets.Any(stylesheet => stylesheet.File == "reset.css").ShouldBeTrue();
             stylesheets.Any(stylesheet => stylesheet.File == "structure.css").ShouldBeTrue();
             stylesheets.Any(stylesheet => stylesheet.File == "print.css").ShouldBeTrue();
+            stylesheets.Any(resource => resource.File == "font-awesome.css").ShouldBeTrue();
         }
     }
 }


646: fix IGlyphPositions.GetGlyph()

646: fix IGlyphPositions.GetGlyph()

--- src/PixelFarm/Typography/Typography.OpenFont/Typeface.cs
+++ src/PixelFarm/Typography/Typography.OpenFont/Typeface.cs
@@ -380,10 +380,11 @@
         void AppendGlyphAdvance(int index, short appendAdvX, short appendAdvY);

         ushort GetGlyph(int index, out ushort advW);
-        ushort GetGlyph(int index, out short offsetX, out short offsetY, out short advW);
+        ushort GetGlyph(int index, out short inputOffset, out short offsetX, out short offsetY, out short advW);
         //
         void GetOffset(int index, out short offsetX, out short offsetY);
     }
+

     public static class StringUtils


TryAddSingleton for overrides

TryAddSingleton for overrides

--- src/RazorLight/Extensions/ServiceCollectionExtensions.cs
+++ src/RazorLight/Extensions/ServiceCollectionExtensions.cs
@@ -1,5 +1,6 @@
 using System;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
 using RazorLight.DependencyInjection;

 namespace RazorLight.Extensions
@@ -19,8 +20,8 @@
 			}

 			services.AddSingleton<PropertyInjector>();
-			services.AddSingleton<IEngineHandler, EngineHandler>();
-			services.AddSingleton<IRazorLightEngine>(p =>
+			services.TryAddSingleton<IEngineHandler, EngineHandler>();
+			services.TryAddSingleton<IRazorLightEngine>(p =>
 			{
 				var engine = engineFactoryProvider();
 				AddEngineRenderCallbacks(engine, p);


global constant ( defautl user avatar url) added

--- HallOfFame/HallOfFame.Common/GlobalConstants.cs
+++ HallOfFame/HallOfFame.Common/GlobalConstants.cs
@@ -5,5 +5,8 @@
         public const string AdministratorRoleName = "Administrator";

         public const string ModeratorRoleName = "Moderator";
+
+        public const string DefaultAvatarUrl =
+            "http://bs1.cdn.telerik.com/v1/7syJVKUQCuKgrzVP/066b5760-63a1-11e4-8638-39d391c80554";
     }
 }


remote unused variable

remote unused variable

--- JeffFerguson.Gepsio.Test/XbrlConformanceTest.cs
+++ JeffFerguson.Gepsio.Test/XbrlConformanceTest.cs
@@ -23,8 +23,6 @@
     [TestClass]
     public class XbrlConformanceTest
     {
-        private int thisTestsPassed;
-
         public XbrlConformanceTest()
         {
         }
@@ -33,7 +31,6 @@
         [Description("XBRL-CONF-2014-12-10")]
         public void ExecuteXBRLCONF20141210Testcases()
         {
-            thisTestsPassed = 0;
             var conformanceXmlSource = @"..\..\..\XBRL-CONF-2014-12-10\xbrl.xml";
             var conformanceXmlSourcePath = Path.GetDirectoryName(conformanceXmlSource);
             var conformanceXmlDocument = new XmlDocument();
@@ -104,7 +101,6 @@
                 if (currentVariation.ValidityExpected)
                     AnnounceTestFailure(currentVariation, newXbrlDocument);
             }
-            thisTestsPassed++;
         }

         //-------------------------------------------------------------------------------


reverting pubsub changes.. just no point

--- src/mindtouch.dream/dream/services/PubSub/PersistentPubSubDispatchQueueRepository.cs
+++ src/mindtouch.dream/dream/services/PubSub/PersistentPubSubDispatchQueueRepository.cs
@@ -120,10 +120,8 @@

         public IPubSubDispatchQueue this[PubSubSubscriptionSet set] {
             get {
-                lock(_repository) {
                     PersistentPubSubDispatchQueue queue;
                     return _repository.TryGetValue(set.Location, out queue) ? queue : null;
-                }
             }
         }


AvoidConcatenatingCharsRule

AvoidConcatenatingCharsRule

--- bsasharp/Extensions/BinaryExtensions.cs
+++ bsasharp/Extensions/BinaryExtensions.cs
@@ -32,7 +32,7 @@

         public static void WriteBZString(this BinaryWriter writer, string toWrite)
         {
-            WriteBString(writer, toWrite.Last() == '\0' ? toWrite : toWrite + '\0');
+            WriteBString(writer, toWrite.Last() == '\0' ? toWrite : toWrite + "\0");
         }

         public static string ReadCString(this BinaryReader reader)
@@ -47,7 +47,7 @@

         public static void WriteCString(this BinaryWriter writer, string toWrite)
         {
-            var bytes = Windows1252.GetBytes(toWrite + '\0');
+            var bytes = Windows1252.GetBytes(toWrite + "\0");
             writer.Write(bytes);
         }


Move TryCheckNeturalResourcesLanguageAttribute to compilation start


Updated to load module

Updated to load module

Updated to load module


#755 Jonch/Gary tidy up tests

#755 Jonch/Gary tidy up tests

--- test/StockportContentApiTests/Unit/ContentfulFactories/GroupContentfulFactoryTest.cs
+++ test/StockportContentApiTests/Unit/ContentfulFactories/GroupContentfulFactoryTest.cs
@@ -1,10 +1,6 @@
-using System.Linq;
-using Contentful.Core.Models;
-using FluentAssertions;
-using Moq;
+using FluentAssertions;
 using StockportContentApi.ContentfulFactories;
 using StockportContentApi.ContentfulModels;
-using StockportContentApi.Model;
 using StockportContentApiTests.Unit.Builders;
 using Xunit;

@@ -13,7 +9,6 @@
     public class GroupContentfulFactoryTest
     {
         private readonly ContentfulGroup _contentfulGroup;
-        private readonly Mock<IContentfulFactory<Entry<ContentfulCrumb>, Crumb>> _crumbFactory;
         private readonly GroupContentfulFactory _groupContentfulFactory;

         public GroupContentfulFactoryTest()


Signed-off-by: S <selvan.s@capgemini.com>

--- Cik.MagazineWeb.WebApp/Controllers/AccountController.cs
+++ Cik.MagazineWeb.WebApp/Controllers/AccountController.cs
@@ -12,7 +12,7 @@
     using Microsoft.VisualStudio.TestTools.UnitTesting;

     [Authorize]
-    public class AccountController : Controller
+    public class AccountController : Controller
     {

         public AccountController()


Restringida la seleccion de imagen a jpg/png AltaProducto

--- LimpiezasPalmeralForms/Producto/AltaProducto.cs
+++ LimpiezasPalmeralForms/Producto/AltaProducto.cs
@@ -52,7 +52,7 @@
             OpenFileDialog openFileDialog1 = new OpenFileDialog();

             openFileDialog1.InitialDirectory = "c:\\";
-            openFileDialog1.Filter = "Image files (*.jpg)|*.jpg|All files (*.*)|*.*";
+            openFileDialog1.Filter = "Image files (*.jpg)|*.jpg|Image files (*.png)|*.png";
             openFileDialog1.FilterIndex = 2;
             openFileDialog1.RestoreDirectory = true;


set individual destination or source multiplicity

--- MagicdrawMigrator/Correctors/FixAssociations.cs
+++ MagicdrawMigrator/Correctors/FixAssociations.cs
@@ -10,8 +10,7 @@
 namespace MagicdrawMigrator
 {
 	/// <summary>
-	/// Check if association between actor and use case are correctly displayed and if the stereotype
-	/// 'participates' is correctly applied onto the association
+	/// Fix the (Unspecified)..(Unspecified) multiplicities on associations by setting the cardinality field to NULL in the database.
 	/// </summary>
 	public class FixAssociations:MagicDrawCorrector
 	{
@@ -22,7 +21,7 @@
 		public override void correct()
 		{
 			EAOutputLogger.log(this.model,this.outputName
-	                   ,string.Format("{0} Starting fix associations'"
+	                   ,string.Format("{0} Starting fix associations"
 	                                  ,DateTime.Now.ToLongTimeString())
 	                   ,0
 	                   ,LogTypeEnum.log);
@@ -30,12 +29,11 @@

 			this.model.executeSQL(@"update t_connector
-											set [SourceCard] = NULL,
-											[DestCard] = NULL
-											where [SourceCard] = '(Unspecified)..(Unspecified)'
-											or [DestCard] = '(Unspecified)..(Unspecified)'");
-
-
+											set [DestCard] = NULL
+											where [DestCard] = '(Unspecified)..(Unspecified)'");
+			this.model.executeSQL(@"update t_connector
+											set [SourceCard] = NULL
+											where [SourceCard] = '(Unspecified)..(Unspecified)'");

 			//Log finished


Remove the favicon and test_server.py script from JavaScript projects when embedding into Android WebView projects.

--- Compiler/Platforms/JavaScriptAppAndroid/PlatformImpl.cs
+++ Compiler/Platforms/JavaScriptAppAndroid/PlatformImpl.cs
@@ -64,6 +64,15 @@
                     file.TextContent = file.TextContent.Replace(
                         "<script type=\"text/javascript\" src=\"",
                         "<script type=\"text/javascript\" src=\"file:///android_asset/");
+
+                    file.TextContent = file.TextContent.Replace(
+                        "<link rel=\"shortcut icon\" href=\"favicon.ico\">",
+                        "");
+                }
+                else if (filePath == "test_server.py")
+                {
+                    // TODO: add an option called INCLUDE_TEST_SERVER for the parent platform so that this doesn't appear in the first place.
+                    continue;
                 }
                 files["app/src/main/assets/" + filePath] = file;
             }


Closes UI when the panel closes (#2242)

Closes UI when the panel closes (#2242)

--- Content.Server/GameObjects/Components/WiresComponent.cs
+++ Content.Server/GameObjects/Components/WiresComponent.cs
@@ -56,6 +56,9 @@
                 }

                 _isPanelOpen = value;
+
+                if (!_isPanelOpen)
+                    UserInterface?.CloseAll();
                 UpdateAppearance();
             }
         }


minor change

minor change

--- Core/OfficeDevPnP.Core/Extensions/SecurityExtensions.cs
+++ Core/OfficeDevPnP.Core/Extensions/SecurityExtensions.cs
@@ -1312,7 +1312,7 @@
             else if (obj is ListItem)
             {
                 var item = obj as ListItem;
-                context.Load(obj, i => i.HasUniqueRoleAssignments);
+                context.Load(item, i => i.HasUniqueRoleAssignments);
                 context.Load(item.RoleAssignments);
                 context.Load(item.RoleAssignments.Groups);
                 context.ExecuteQueryRetry();


var name camelcase, using statements up top

--- DirigoEdge/Areas/Admin/Views/Pages/ManageContent.cshtml
+++ DirigoEdge/Areas/Admin/Views/Pages/ManageContent.cshtml
@@ -1,14 +1,15 @@
-@{
+@using DirigoEdgeCore.Utils
+@model DirigoEdge.Areas.Admin.Models.ViewModels.ManageContentViewModel
+
+@{
     ViewBag.Title = Model.Heading;
     Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
     bool hasSchema = Model.SchemaId >= 0;

     // using this to access GetGeneratedUrl(ContentPage) for preview button
-    var NavigationUtility = new NavigationUtils();
+    var navigationUtility = new NavigationUtils();
 }

-@using DirigoEdgeCore.Utils
-@model DirigoEdge.Areas.Admin.Models.ViewModels.ManageContentViewModel

@@ -80,7 +81,7 @@
                                     {
                                         WYSIWYG Edit
                                     }
-                                    Preview
+                                    Preview
                                     Delete


Ajustes na criação e edição de Planos de Comissões e Hierarquias

--- Dufry.Comissoes/Controllers/PlanoCategoriaController.cs
+++ Dufry.Comissoes/Controllers/PlanoCategoriaController.cs
@@ -130,16 +130,6 @@
             return pc;
         }

-        private static IEnumerable<Plano> ObtemPlanosDisponiveis(IEnumerable<Plano> planos, IEnumerable<PlanoCategoria> planocategorias)
-        {
-            var planosdisponiveis = from p in planos
-                                    where !
-                                    (from pc in planocategorias
-                                     select pc.ID_PLANO).Contains(p.ID_PLANO)
-                                    select p;
-            return planosdisponiveis;
-        }
-
         private static List<Categoria> ListaCategoriasDisponiveis(IEnumerable<PlanoCategoria> planocategorias, IEnumerable<Categoria> categorias)
         {
             List<Categoria> categoriasDisponiveisList = (from c in categorias.ToList()


Improve Open and Close to take into account the current state of the connection.

--- Easy.Storage.SQLite/Connections/SqliteConnectionBase.cs
+++ Easy.Storage.SQLite/Connections/SqliteConnectionBase.cs
@@ -88,7 +88,15 @@
         /// <summary>
         /// When the database connection is closed, all commands linked to this connection are automatically reset.
         /// </summary>
-        public override void Close() => Connection.Close();
+        public override void Close()
+        {
+            if (Connection.State == ConnectionState.Closed)
+            {
+                return;
+            }
+
+            Connection.Close();
+        }

         /// <summary>
         /// This method is not implemented; however, the <c>Changed</c> event will still be raised.
@@ -103,7 +111,12 @@
         /// <summary>
         /// Opens the connection using the parameters found in the <see cref="ConnectionString"/>.
         /// </summary>
-        public override void Open() => Connection.Open();
+        public override void Open()
+        {
+            if (Connection.State == ConnectionState.Open) { return; }
+
+            Connection.Open();
+        }

         /// <summary>
         /// Opens and returns the connection using the parameters found in the <see cref="ConnectionString"/>.


fix for all symbol

fix for all symbol

--- Famoser.FexCompiler/Services/Latex/GenerationService.cs
+++ Famoser.FexCompiler/Services/Latex/GenerationService.cs
@@ -289,7 +289,7 @@
                 {"not_element_of", "$\\notin$"},
                 {"element_of", "$\\in$"},
                 {"there_is", "$\\exists$"},
-                {"for_all", "$\\in$"},
+                {"for_all", "$\\forall$"},
                 {"sum_of", "$\\sum$"},
                 {"mul_of", "$\\prod$"},
                 {"_", "\\_"},


Update PlatformerPlayer.cs

Update PlatformerPlayer.cs

--- ch06/Assets/Scripts/PlatformerPlayer.cs
+++ ch06/Assets/Scripts/PlatformerPlayer.cs
@@ -2,7 +2,7 @@
 using System.Collections;

 public class PlatformerPlayer : MonoBehaviour {
-	public float speed = 250.0f;
+	public float speed = 4.5f;
 	public float jumpForce = 12.0f;

 	private BoxCollider2D _box;
@@ -18,7 +18,7 @@

 	// Update is called once per frame
 	void Update() {
-		float deltaX = Input.GetAxis("Horizontal") * speed * Time.deltaTime;
+		float deltaX = Input.GetAxis("Horizontal") * speed;
 		Vector2 movement = new Vector2(deltaX, _body.velocity.y);
 		_body.velocity = movement;

@@ -33,7 +33,7 @@
 			grounded = true;
 		}

-		_body.gravityScale = grounded && deltaX == 0 ? 0 : 1;
+		_body.gravityScale = (grounded && Mathf.Approximately(deltaX, 0)) ? 0 : 1;
 		if (grounded && Input.GetKeyDown(KeyCode.Space)) {
 			_body.AddForce(Vector2.up * jumpForce, ForceMode2D.Impulse);
 		}


empty cache button is also implemented [ci ckip]

--- source/FloydPink.Flickr.Downloadr.UI/PreferencesWindow.cs
+++ source/FloydPink.Flickr.Downloadr.UI/PreferencesWindow.cs
@@ -27,7 +27,7 @@

 			_presenter = Bootstrapper.GetPresenter<IPreferencesView, IPreferencesPresenter> (this);

-			SetCacheSize();
+			SetCacheSize ();
 		}

 		protected void OnDeleteEvent (object sender, DeleteEventArgs args)
@@ -185,13 +185,12 @@

 		protected void buttonEmptyCacheClick (object sender, EventArgs e)
 		{
-			//			ResponseType result = MessageBox.Show(this, "Are you sure you want to empty the cache folder?",
-			//				ButtonsType.YesNo, MessageType.Question);
-			//			if (result == ResponseType.Yes)
-			//			{
-			//				_presenter.EmptyCacheDirectory(Preferences.CacheLocation);
-			//				SetCacheSize();
-			//			}
+			ResponseType result = MessageBox.Show (this, "Are you sure you want to empty the cache folder?",
+				                         ButtonsType.YesNo, MessageType.Question);
+			if (result == ResponseType.Yes) {
+				_presenter.EmptyCacheDirectory (Preferences.CacheLocation);
+				SetCacheSize ();
+			}
 		}
 	}
 }


Removed dead methods and code

Removed dead methods and code

--- Skylight/Player.cs
+++ Skylight/Player.cs
@@ -1676,121 +1676,7 @@
             }
         }

-/*
-        private void update()
-        {
-        }
-*/
-
-/*
-        private void showBadge(bool param1)
-        {
-        }
-*/
-
-/*
-        private void drawBadge(Bitmap param1, double param2, double param3, bool param4)
-        {
-        }
-*/
-
-/*
-        private void flauntLevelBadge(bool param1)
-        {
-        }
-*/
-
-/*
-        private void drawChat(Bitmap param1, double param2, double param3, bool param4)
-        {
-        }
-*/
-
-/*
-        private void enterChat()
-        {
-        }
-*/
-
-/*
-        private void say(string param1)
-        {
-        }
-*/
-
-        /// <summary>
-        /// Kills the player.
-        /// </summary>
-        private void KillPlayer()
-        {
-            _isDead = true;
-        }
-
-/*
-        private void respawn()
-        {
-            ModifierX = 0;
-            ModifierY = 0;
-            modifierX = 0;
-            modifierY = 0;
-            SpeedX = 0;
-            SpeedY = 0;
-            speedX = 0;
-            speedY = 0;
-            _isDead = false;
-
-            _lastRespawn = DateTime.Now.Millisecond;
-        }
-*/
-
-/*
-        private void resetCoins()
-        {
-            _coins = 0;
-        }
-*/
-
-/*
-        private void resetCheckpoint()
-        {
-            checkpoint_x = -1;
-            checkpoint_y = -1;
-        }
-*/
-
-/*
-        private void nameColor(int param1)
-        {
-        }
-*/
-
-/*
-        private uint minimapColor()
-        {
-            return 0;
-        }
-*/
-
-/*
-        private void cursed(bool param1)
-        {
-            _isCursed = param1;
-        }
-*/
-
-/*
-        private bool cursed()
-        {
-            return _isCursed;
-        }
-*/
-
-/*
-        private void zombie(bool param1)
-        {
-            _isZombie = param1;
-        }
-*/
+

         /// <summary>
         /// Zombies this instance.
@@ -1849,56 +1735,6 @@
             return _touchpotions.Keys.Where(HasActivePotion).ToList();
         }

-/*
-        private bool getCanTag()
-        {
-            if (IsGod || IsMod || _isDead)
-            {
-                return false;
-            }
-            return GetActivePotions().Count > 0;
-        }
-*/
-
-/*
-        private bool getCanBeTagged()
-        {
-            if (IsGod || IsMod || _isDead)
-            {
-                return false;
-            }
-            return (DateTime.Now.Millisecond - _lastRespawn) > 1000;
-        }
-*/
-
-/*
-        private void setPosition(double param1, double param2)
-        {
-            X = param1;
-            Y = param2;
-        }
-*/
-
-/*
-        private void isInvulnerable(bool param1)
-        {
-            _isInvulnerable = param1;
-        }
-*/
-
-/*
-        private bool isInvulnerable()
-        {
-            return _isInvulnerable;
-        }
-*/
-
-/*
-        private void hasLevitation(bool param1)
-        {
-            _hasLevitation = param1;
-        }
-*/

         /// <summary>
         /// Updates the thrust.
@@ -1926,46 +1762,6 @@
             }
         }

-/*
-        private bool isThrusting()
-        {
-            return _isThrusting;
-        }
-*/
-
-/*
-        private void isThrusting(bool param1)
-        {
-            _isThrusting = param1;
-        }
-*/
-
-/*
-        private void applyThrust()
-        {
-            _currentThrust = MaxThrust;
-        }
-*/
-
-/*
-        private bool isFlaunting()
-        {
-            return _isFlaunting;
-        }
-*/
-
-/*
-        private void isFlaunting(bool param1)
-        {
-            _isFlaunting = param1;
-        }
-*/
-
-/*
-        private static bool isAdmin(string param1)
-        {
-            return Admins.Contains(param1);
-        }
-*/
+
     }
 }


change version

change version

--- SolutionVersion.cs
+++ SolutionVersion.cs
@@ -8,6 +8,6 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.0.1.0")]
-[assembly: AssemblyFileVersion("1.0.1.0")]
+[assembly: AssemblyVersion("1.0.3.0")]
+[assembly: AssemblyFileVersion("1.0.3.0")]
 [assembly: ComVisible(false)]


Use strongly typed resource access

Use strongly typed resource access

I forgot about this. Consider changing names to match coding style?

--- Sounds/MainForm.cs
+++ Sounds/MainForm.cs
@@ -7,7 +7,6 @@
 using System.Globalization;
 using System.IO;
 using System.Linq;
-using System.Resources;
 using System.Reflection;
 using System.Text;
 using System.Text.RegularExpressions;
@@ -19,8 +18,6 @@
 {
     public partial class MainForm : Form
     {
-        ResourceManager miscLocale = new ResourceManager("Sounds.MiscStrings", typeof(MainForm).Assembly);
-
         TabbedThumbnail preview;
         ThumbnailToolBarButton playPauseTaskbarButton;
         ThumbnailToolBarButton prevTaskbarButton;
@@ -616,7 +613,7 @@
                 positionLabel.Image = Properties.Resources.Stop;
                 if (TaskbarManager.IsPlatformSupported)
                 {
-                    TaskbarManager.Instance.SetOverlayIcon(stopIcon, miscLocale.GetString("stopped"));
+                    TaskbarManager.Instance.SetOverlayIcon(stopIcon, MiscStrings.stopped);
                 }
             }
             else if (playing && Paused)
@@ -624,7 +621,7 @@
                 positionLabel.Image = Properties.Resources.Pause;
                 if (TaskbarManager.IsPlatformSupported)
                 {
-                    TaskbarManager.Instance.SetOverlayIcon(pauseIcon, miscLocale.GetString("paused"));
+                    TaskbarManager.Instance.SetOverlayIcon(pauseIcon, MiscStrings.paused);
                 }
             }
             else if (playing && !Paused)
@@ -632,7 +629,7 @@
                 positionLabel.Image = Properties.Resources.Play;
                 if (TaskbarManager.IsPlatformSupported)
                 {
-                    TaskbarManager.Instance.SetOverlayIcon(playIcon, miscLocale.GetString("playing"));
+                    TaskbarManager.Instance.SetOverlayIcon(playIcon, MiscStrings.playing);
                 }
             }
         }
@@ -867,8 +864,8 @@

         public bool ChangePlaylistAskStop(bool newFile)
         {
-            var msg = miscLocale.GetString(newFile ?
-                "newFileWhilePlaying" : "changeFileWhilePlaying");
+            var msg = newFile ? MiscStrings.newFileWhilePlaying :
+                MiscStrings.changeFileWhilePlaying;
             // should count even when paused?
             if (playing)
                 return MessageBox.Show(this,
@@ -882,7 +879,7 @@
         // also, must be done beforehand and inline, as logic is more complex
         public DialogResult ChangePlaylistAskDirty()
         {
-            var msg = miscLocale.GetString("changeFileWhileDirty");
+            var msg = MiscStrings.changeFileWhileDirty;
             // should count even when paused?
             if (dirty)
                 return MessageBox.Show(this,


If we timeout putting a message on the bus, throw an error.

--- src/ProjectExtensions.Azure.ServiceBus/AzureBusSender.cs
+++ src/ProjectExtensions.Azure.ServiceBus/AzureBusSender.cs
@@ -70,7 +70,7 @@
                 if (failureException != null) {
                     throw failureException;
                 }
-                throw new Exception("Failed to Send Message for Unknown Reason.");
+                throw new Exception("Failed to Send Message. Reason was timeout.");
             }
         }


Pass simulation frame rate to neural net controller.

--- src/SharpNeatDomainsExtra/WalkerBox2d/WalkerBox2dView.cs
+++ src/SharpNeatDomainsExtra/WalkerBox2d/WalkerBox2dView.cs
@@ -1,7 +1,7 @@
 /* ***************************************************************************
  * This file is part of SharpNEAT - Evolution of Neural Networks.
  *
- * Copyright 2004-2006, 2009-2012 Colin Green (sharpneat@gmail.com)
+ * Copyright 2004-2016 Colin Green (sharpneat@gmail.com)
  *
  * SharpNEAT is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@
             WalkerInterface walkerIface = world.CreateWalkerInterface();

             // Create a neural net controller for the walker.
-            _walkerController = new NeuralNetController(walkerIface, _box);
+            _walkerController = new NeuralNetController(walkerIface, _box, world.SimulationParameters._frameRate);
             return world;
         }


Add message when finished getting dependencies

--- src/TeamCityConsole/Commands/ResolveDependencyCommand.cs
+++ src/TeamCityConsole/Commands/ResolveDependencyCommand.cs
@@ -59,6 +59,8 @@

                 _fileSystem.WriteAllTextToFile(_configFullPath, json);
             }
+
+            Log.Info("================ Get Dependencies: done ================");
         }

         public async Task<DependencyConfig> ResolveDependencies(string id, string tag)


Converted RevTagParseTest.cs line endings to CRLF.

--- GitSharp.Tests/GitSharp.Core/RevWalk/RevTagParseTest.cs
+++ GitSharp.Tests/GitSharp.Core/RevWalk/RevTagParseTest.cs
@@ -1,389 +1,389 @@
-/*
- * Copyright (C) 2008, Google Inc.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+/*
+ * Copyright (C) 2008, Google Inc.
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 using System;
-using System.IO;
-using System.Text;
-using GitSharp.Core;
-using GitSharp.Core.RevWalk;
-using GitSharp.Core.Util;
-using GitSharp.Core.Tests.Util;
+using System.IO;
+using System.Text;
+using GitSharp.Core;
+using GitSharp.Core.RevWalk;
+using GitSharp.Core.Util;
+using GitSharp.Core.Tests.Util;
 using GitSharp.Tests.GitSharp.Core.Util;
-using NUnit.Framework;
-
-namespace GitSharp.Core.Tests.RevWalk
-{
-    [TestFixture]
-    public class RevTagParseTest : RepositoryTestCase
-    {
-        [Test]
-        public void testTagBlob()
-        {
-            testOneType(Constants.OBJ_BLOB);
-        }
-
-        [Test]
-        public void testTagTree()
-        {
-            testOneType(Constants.OBJ_TREE);
-        }
-
-        [Test]
-        public void testTagCommit()
-        {
-            testOneType(Constants.OBJ_COMMIT);
-        }
-
-        [Test]
-        public void testTagTag()
-        {
-            testOneType(Constants.OBJ_TAG);
-        }
-
-        private void testOneType(int typeCode)
-        {
-            ObjectId locId = Id("9788669ad918b6fcce64af8882fc9a81cb6aba67");
-            var b = new StringBuilder();
-            b.Append("object " + locId.Name + "\n");
-            b.Append("type " + Constants.typeString(typeCode) + "\n");
-            b.Append("tag v1.2.3.4.5\n");
-            b.Append("tagger A U. Thor <a_u_thor@example.com> 1218123387 +0700\n");
-            b.Append("\n");
-
-            var rw = new Core.RevWalk.RevWalk(db);
-
-        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-            Assert.IsNull(c.getObject());
-            Assert.IsNull(c.getTagName());
-
-            c.parseCanonical(rw, b.ToString().getBytes("UTF-8"));
-            Assert.IsNotNull(c.getObject());
-            Assert.AreEqual(locId, c.getObject().getId());
-            Assert.AreSame(rw.lookupAny(locId, typeCode), c.getObject());
-        }
-
-        [Test]
-        public void testParseAllFields()
-        {
-            ObjectId treeId = Id("9788669ad918b6fcce64af8882fc9a81cb6aba67");
-            const string name = "v1.2.3.4.5";
-            const string taggerName = "A U. Thor";
-            const string taggerEmail = "a_u_thor@example.com";
-            const int taggerTime = 1218123387;
-
-            var body = new StringBuilder();
-
-            body.Append("object ");
-            body.Append(treeId.Name);
-            body.Append("\n");
-
-            body.Append("type tree\n");
-
-            body.Append("tag ");
-            body.Append(name);
-            body.Append("\n");
-
-            body.Append("tagger ");
-            body.Append(taggerName);
-            body.Append(" <");
-            body.Append(taggerEmail);
-            body.Append("> ");
-            body.Append(taggerTime);
-            body.Append(" +0700\n");
-
-            body.Append("\n");
-
-            var rw = new Core.RevWalk.RevWalk(db);
-
-        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-            Assert.IsNull(c.getObject());
-            Assert.IsNull(c.getTagName());
-
-            c.parseCanonical(rw, body.ToString().getBytes("UTF-8"));
-            Assert.IsNotNull(c.getObject());
-            Assert.AreEqual(treeId, c.getObject().getId());
-            Assert.AreSame(rw.lookupTree(treeId), c.getObject());
-
-            Assert.IsNotNull(c.getTagName());
-            Assert.AreEqual(name, c.getTagName());
-            Assert.AreEqual(string.Empty, c.getFullMessage());
-
-            PersonIdent cTagger = c.getTaggerIdent();
-            Assert.IsNotNull(cTagger);
-            Assert.AreEqual(taggerName, cTagger.Name);
-            Assert.AreEqual(taggerEmail, cTagger.EmailAddress);
-        }
-
-        private RevTag create(string msg)
-        {
-            var b = new StringBuilder();
-            b.Append("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n");
-            b.Append("type tree\n");
-            b.Append("tag v1.2.3.4.5\n");
-            b.Append("tagger A U. Thor <a_u_thor@example.com> 1218123387 +0700\n");
-            b.Append("\n");
-            b.Append(msg);
-
-        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-
-            c.parseCanonical(new Core.RevWalk.RevWalk(db), b.ToString().getBytes("UTF-8"));
-            return c;
-        }
-
-        [Test]
-        public void testParse_implicit_UTF8_encoded()
-        {
-            RevTag c;
-            using (var b = new BinaryWriter(new MemoryStream()))
-            {
-                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
-                b.Write("type tree\n".getBytes("UTF-8"));
-                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
-                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("Sm\u00f6rg\u00e5sbord\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
-
-                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
-            }
-            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
-            Assert.AreEqual("Sm\u00f6rg\u00e5sbord", c.getShortMessage());
-            Assert.AreEqual("Sm\u00f6rg\u00e5sbord\n\n\u304d\u308c\u3044\n", c.getFullMessage());
-        }
-
-        [Test]
-        public void testParse_implicit_mixed_encoded()
-        {
-            RevTag c;
-            using (var b = new BinaryWriter(new MemoryStream()))
-            {
-                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
-                b.Write("type tree\n".getBytes("UTF-8"));
-                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
-                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("ISO-8859-1"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("Sm\u00f6rg\u00e5sbord\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
-
-                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
-            }
-            AssertHelper.IgnoreOn(AssertedPlatform.Mono, () => Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name), "Will fail in mono due to https://bugzilla.novell.com/show_bug.cgi?id=549914");
-            Assert.AreEqual("Sm\u00f6rg\u00e5sbord", c.getShortMessage());
-            Assert.AreEqual("Sm\u00f6rg\u00e5sbord\n\n\u304d\u308c\u3044\n", c.getFullMessage());
-        }
-
-        /**
-         * Test parsing of a commit whose encoding is given and works.
-         *
-         * @throws Exception
-         */
-
-        [Test]
-        public void testParse_explicit_encoded()
-        {
-            Assert.Ignore("We are going to deal with encoding problems later. For now, they are only disturbing the build.");
-            RevTag c;
-            using (var b = new BinaryWriter(new MemoryStream()))
-            {
-                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("EUC-JP"));
-                b.Write("type tree\n".getBytes("EUC-JP"));
-                b.Write("tag v1.2.3.4.5\n".getBytes("EUC-JP"));
-                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("EUC-JP"));
-                b.Write("encoding euc_JP\n".getBytes("EUC-JP"));
-                b.Write("\n".getBytes("EUC-JP"));
-                b.Write("\u304d\u308c\u3044\n".getBytes("EUC-JP"));
-                b.Write("\n".getBytes("EUC-JP"));
-                b.Write("Hi\n".getBytes("EUC-JP"));
-
-                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
-            }
-            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
-            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
-            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
-        }
-
-	    /**
-	     * This is a twisted case, but show what we expect here. We can revise the
-	     * expectations provided this case is updated.
-	     *
-	     * What happens here is that an encoding us given, but data is not encoded
-	     * that way (and we can detect it), so we try other encodings.
-	     *
-	     * @throws Exception
-	     */
-
-        [Test]
-        public void testParse_explicit_bad_encoded()
-        {
-            RevTag c;
-            using (var b = new BinaryWriter(new MemoryStream()))
-            {
-                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
-                b.Write("type tree\n".getBytes("UTF-8"));
-                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
-                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("ISO-8859-1"));
-                b.Write("encoding EUC-JP\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("Hi\n".getBytes("UTF-8"));
-
-                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
-            }
-
-            AssertHelper.IgnoreOn(AssertedPlatform.Mono, () => Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name), "Will fail in mono due to https://bugzilla.novell.com/show_bug.cgi?id=547902");
-
-            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
-            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
-        }
-
-	    /**
-	     * This is a twisted case too, but show what we expect here. We can revise
-	     * the expectations provided this case is updated.
-	     *
-	     * What happens here is that an encoding us given, but data is not encoded
-	     * that way (and we can detect it), so we try other encodings. Here data
-	     * could actually be decoded in the stated encoding, but we override using
-	     * UTF-8.
-	     *
-	     * @throws Exception
-	     */
-
-        [Test]
-        public void testParse_explicit_bad_encoded2()
-        {
-            RevTag c;
-            using (var b = new BinaryWriter(new MemoryStream()))
-            {
-                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
-                b.Write("type tree\n".getBytes("UTF-8"));
-                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
-                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("UTF-8"));
-                b.Write("encoding ISO-8859-1\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
-                b.Write("\n".getBytes("UTF-8"));
-                b.Write("Hi\n".getBytes("UTF-8"));
-
-                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
-                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
-            }
-            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
-            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
-            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
-        }
-
-        [Test]
-        public void testParse_NoMessage()
-        {
-            const string msg = "";
-            RevTag c = create(msg);
-            Assert.AreEqual(msg, c.getFullMessage());
-            Assert.AreEqual(msg, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_OnlyLFMessage()
-        {
-            RevTag c = create("\n");
-            Assert.AreEqual("\n", c.getFullMessage());
-            Assert.AreEqual(string.Empty, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_ShortLineOnlyNoLF()
-        {
-            const string shortMsg = "This is a short message.";
-            RevTag c = create(shortMsg);
-            Assert.AreEqual(shortMsg, c.getFullMessage());
-            Assert.AreEqual(shortMsg, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_ShortLineOnlyEndLF()
-        {
-            const string shortMsg = "This is a short message.";
-            const string fullMsg = shortMsg + "\n";
-            RevTag c = create(fullMsg);
-            Assert.AreEqual(fullMsg, c.getFullMessage());
-            Assert.AreEqual(shortMsg, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_ShortLineOnlyEmbeddedLF()
-        {
-            const string fullMsg = "This is a\nshort message.";
-            string shortMsg = fullMsg.Replace('\n', ' ');
-            RevTag c = create(fullMsg);
-            Assert.AreEqual(fullMsg, c.getFullMessage());
-            Assert.AreEqual(shortMsg, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_ShortLineOnlyEmbeddedAndEndingLF()
-        {
-            const string fullMsg = "This is a\nshort message.\n";
-            const string shortMsg = "This is a short message.";
-            RevTag c = create(fullMsg);
-            Assert.AreEqual(fullMsg, c.getFullMessage());
-            Assert.AreEqual(shortMsg, c.getShortMessage());
-        }
-
-        [Test]
-        public void testParse_GitStyleMessage()
-        {
-            const string shortMsg = "This fixes a bug.";
-            const string body = "We do it with magic and pixie dust and stuff.\n"
-                                + "\n" + "Signed-off-by: A U. Thor <author@example.com>\n";
-            const string fullMsg = shortMsg + "\n" + "\n" + body;
-            RevTag c = create(fullMsg);
-            Assert.AreEqual(fullMsg, c.getFullMessage());
-            Assert.AreEqual(shortMsg, c.getShortMessage());
-        }
-
-        private static ObjectId Id(string str)
-        {
-            return ObjectId.FromString(str);
-        }
-    }
-}
+using NUnit.Framework;
+
+namespace GitSharp.Core.Tests.RevWalk
+{
+    [TestFixture]
+    public class RevTagParseTest : RepositoryTestCase
+    {
+        [Test]
+        public void testTagBlob()
+        {
+            testOneType(Constants.OBJ_BLOB);
+        }
+
+        [Test]
+        public void testTagTree()
+        {
+            testOneType(Constants.OBJ_TREE);
+        }
+
+        [Test]
+        public void testTagCommit()
+        {
+            testOneType(Constants.OBJ_COMMIT);
+        }
+
+        [Test]
+        public void testTagTag()
+        {
+            testOneType(Constants.OBJ_TAG);
+        }
+
+        private void testOneType(int typeCode)
+        {
+            ObjectId locId = Id("9788669ad918b6fcce64af8882fc9a81cb6aba67");
+            var b = new StringBuilder();
+            b.Append("object " + locId.Name + "\n");
+            b.Append("type " + Constants.typeString(typeCode) + "\n");
+            b.Append("tag v1.2.3.4.5\n");
+            b.Append("tagger A U. Thor <a_u_thor@example.com> 1218123387 +0700\n");
+            b.Append("\n");
+
+            var rw = new Core.RevWalk.RevWalk(db);
+
+        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+            Assert.IsNull(c.getObject());
+            Assert.IsNull(c.getTagName());
+
+            c.parseCanonical(rw, b.ToString().getBytes("UTF-8"));
+            Assert.IsNotNull(c.getObject());
+            Assert.AreEqual(locId, c.getObject().getId());
+            Assert.AreSame(rw.lookupAny(locId, typeCode), c.getObject());
+        }
+
+        [Test]
+        public void testParseAllFields()
+        {
+            ObjectId treeId = Id("9788669ad918b6fcce64af8882fc9a81cb6aba67");
+            const string name = "v1.2.3.4.5";
+            const string taggerName = "A U. Thor";
+            const string taggerEmail = "a_u_thor@example.com";
+            const int taggerTime = 1218123387;
+
+            var body = new StringBuilder();
+
+            body.Append("object ");
+            body.Append(treeId.Name);
+            body.Append("\n");
+
+            body.Append("type tree\n");
+
+            body.Append("tag ");
+            body.Append(name);
+            body.Append("\n");
+
+            body.Append("tagger ");
+            body.Append(taggerName);
+            body.Append(" <");
+            body.Append(taggerEmail);
+            body.Append("> ");
+            body.Append(taggerTime);
+            body.Append(" +0700\n");
+
+            body.Append("\n");
+
+            var rw = new Core.RevWalk.RevWalk(db);
+
+        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+            Assert.IsNull(c.getObject());
+            Assert.IsNull(c.getTagName());
+
+            c.parseCanonical(rw, body.ToString().getBytes("UTF-8"));
+            Assert.IsNotNull(c.getObject());
+            Assert.AreEqual(treeId, c.getObject().getId());
+            Assert.AreSame(rw.lookupTree(treeId), c.getObject());
+
+            Assert.IsNotNull(c.getTagName());
+            Assert.AreEqual(name, c.getTagName());
+            Assert.AreEqual(string.Empty, c.getFullMessage());
+
+            PersonIdent cTagger = c.getTaggerIdent();
+            Assert.IsNotNull(cTagger);
+            Assert.AreEqual(taggerName, cTagger.Name);
+            Assert.AreEqual(taggerEmail, cTagger.EmailAddress);
+        }
+
+        private RevTag create(string msg)
+        {
+            var b = new StringBuilder();
+            b.Append("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n");
+            b.Append("type tree\n");
+            b.Append("tag v1.2.3.4.5\n");
+            b.Append("tagger A U. Thor <a_u_thor@example.com> 1218123387 +0700\n");
+            b.Append("\n");
+            b.Append(msg);
+
+        	var c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+
+            c.parseCanonical(new Core.RevWalk.RevWalk(db), b.ToString().getBytes("UTF-8"));
+            return c;
+        }
+
+        [Test]
+        public void testParse_implicit_UTF8_encoded()
+        {
+            RevTag c;
+            using (var b = new BinaryWriter(new MemoryStream()))
+            {
+                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
+                b.Write("type tree\n".getBytes("UTF-8"));
+                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
+                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("Sm\u00f6rg\u00e5sbord\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
+
+                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
+            }
+            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
+            Assert.AreEqual("Sm\u00f6rg\u00e5sbord", c.getShortMessage());
+            Assert.AreEqual("Sm\u00f6rg\u00e5sbord\n\n\u304d\u308c\u3044\n", c.getFullMessage());
+        }
+
+        [Test]
+        public void testParse_implicit_mixed_encoded()
+        {
+            RevTag c;
+            using (var b = new BinaryWriter(new MemoryStream()))
+            {
+                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
+                b.Write("type tree\n".getBytes("UTF-8"));
+                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
+                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("ISO-8859-1"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("Sm\u00f6rg\u00e5sbord\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
+
+                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
+            }
+            AssertHelper.IgnoreOn(AssertedPlatform.Mono, () => Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name), "Will fail in mono due to https://bugzilla.novell.com/show_bug.cgi?id=549914");
+            Assert.AreEqual("Sm\u00f6rg\u00e5sbord", c.getShortMessage());
+            Assert.AreEqual("Sm\u00f6rg\u00e5sbord\n\n\u304d\u308c\u3044\n", c.getFullMessage());
+        }
+
+        /**
+         * Test parsing of a commit whose encoding is given and works.
+         *
+         * @throws Exception
+         */
+
+        [Test]
+        public void testParse_explicit_encoded()
+        {
+            Assert.Ignore("We are going to deal with encoding problems later. For now, they are only disturbing the build.");
+            RevTag c;
+            using (var b = new BinaryWriter(new MemoryStream()))
+            {
+                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("EUC-JP"));
+                b.Write("type tree\n".getBytes("EUC-JP"));
+                b.Write("tag v1.2.3.4.5\n".getBytes("EUC-JP"));
+                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("EUC-JP"));
+                b.Write("encoding euc_JP\n".getBytes("EUC-JP"));
+                b.Write("\n".getBytes("EUC-JP"));
+                b.Write("\u304d\u308c\u3044\n".getBytes("EUC-JP"));
+                b.Write("\n".getBytes("EUC-JP"));
+                b.Write("Hi\n".getBytes("EUC-JP"));
+
+                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
+            }
+            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
+            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
+            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
+        }
+
+	    /**
+	     * This is a twisted case, but show what we expect here. We can revise the
+	     * expectations provided this case is updated.
+	     *
+	     * What happens here is that an encoding us given, but data is not encoded
+	     * that way (and we can detect it), so we try other encodings.
+	     *
+	     * @throws Exception
+	     */
+
+        [Test]
+        public void testParse_explicit_bad_encoded()
+        {
+            RevTag c;
+            using (var b = new BinaryWriter(new MemoryStream()))
+            {
+                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
+                b.Write("type tree\n".getBytes("UTF-8"));
+                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
+                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("ISO-8859-1"));
+                b.Write("encoding EUC-JP\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("Hi\n".getBytes("UTF-8"));
+
+                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
+            }
+
+            AssertHelper.IgnoreOn(AssertedPlatform.Mono, () => Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name), "Will fail in mono due to https://bugzilla.novell.com/show_bug.cgi?id=547902");
+
+            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
+            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
+        }
+
+	    /**
+	     * This is a twisted case too, but show what we expect here. We can revise
+	     * the expectations provided this case is updated.
+	     *
+	     * What happens here is that an encoding us given, but data is not encoded
+	     * that way (and we can detect it), so we try other encodings. Here data
+	     * could actually be decoded in the stated encoding, but we override using
+	     * UTF-8.
+	     *
+	     * @throws Exception
+	     */
+
+        [Test]
+        public void testParse_explicit_bad_encoded2()
+        {
+            RevTag c;
+            using (var b = new BinaryWriter(new MemoryStream()))
+            {
+                b.Write("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n".getBytes("UTF-8"));
+                b.Write("type tree\n".getBytes("UTF-8"));
+                b.Write("tag v1.2.3.4.5\n".getBytes("UTF-8"));
+                b.Write("tagger F\u00f6r fattare <a_u_thor@example.com> 1218123387 +0700\n".getBytes("UTF-8"));
+                b.Write("encoding ISO-8859-1\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("\u304d\u308c\u3044\n".getBytes("UTF-8"));
+                b.Write("\n".getBytes("UTF-8"));
+                b.Write("Hi\n".getBytes("UTF-8"));
+
+                c = new RevTag(Id("9473095c4cb2f12aefe1db8a355fe3fafba42f67"));
+                c.parseCanonical(new Core.RevWalk.RevWalk(db), ((MemoryStream) b.BaseStream).ToArray());
+            }
+            Assert.AreEqual("F\u00f6r fattare", c.getTaggerIdent().Name);
+            Assert.AreEqual("\u304d\u308c\u3044", c.getShortMessage());
+            Assert.AreEqual("\u304d\u308c\u3044\n\nHi\n", c.getFullMessage());
+        }
+
+        [Test]
+        public void testParse_NoMessage()
+        {
+            const string msg = "";
+            RevTag c = create(msg);
+            Assert.AreEqual(msg, c.getFullMessage());
+            Assert.AreEqual(msg, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_OnlyLFMessage()
+        {
+            RevTag c = create("\n");
+            Assert.AreEqual("\n", c.getFullMessage());
+            Assert.AreEqual(string.Empty, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_ShortLineOnlyNoLF()
+        {
+            const string shortMsg = "This is a short message.";
+            RevTag c = create(shortMsg);
+            Assert.AreEqual(shortMsg, c.getFullMessage());
+            Assert.AreEqual(shortMsg, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_ShortLineOnlyEndLF()
+        {
+            const string shortMsg = "This is a short message.";
+            const string fullMsg = shortMsg + "\n";
+            RevTag c = create(fullMsg);
+            Assert.AreEqual(fullMsg, c.getFullMessage());
+            Assert.AreEqual(shortMsg, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_ShortLineOnlyEmbeddedLF()
+        {
+            const string fullMsg = "This is a\nshort message.";
+            string shortMsg = fullMsg.Replace('\n', ' ');
+            RevTag c = create(fullMsg);
+            Assert.AreEqual(fullMsg, c.getFullMessage());
+            Assert.AreEqual(shortMsg, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_ShortLineOnlyEmbeddedAndEndingLF()
+        {
+            const string fullMsg = "This is a\nshort message.\n";
+            const string shortMsg = "This is a short message.";
+            RevTag c = create(fullMsg);
+            Assert.AreEqual(fullMsg, c.getFullMessage());
+            Assert.AreEqual(shortMsg, c.getShortMessage());
+        }
+
+        [Test]
+        public void testParse_GitStyleMessage()
+        {
+            const string shortMsg = "This fixes a bug.";
+            const string body = "We do it with magic and pixie dust and stuff.\n"
+                                + "\n" + "Signed-off-by: A U. Thor <author@example.com>\n";
+            const string fullMsg = shortMsg + "\n" + "\n" + body;
+            RevTag c = create(fullMsg);
+            Assert.AreEqual(fullMsg, c.getFullMessage());
+            Assert.AreEqual(shortMsg, c.getShortMessage());
+        }
+
+        private static ObjectId Id(string str)
+        {
+            return ObjectId.FromString(str);
+        }
+    }
+}


Fixed typo in comment.

Fixed typo in comment.

--- src/Assets/Adic/Examples/05_Commander/Scripts/GameRoot.cs
+++ src/Assets/Adic/Examples/05_Commander/Scripts/GameRoot.cs
@@ -18,7 +18,7 @@
 			container.RegisterExtension<EventCallerContainerExtension>();
 			container.RegisterExtension<UnityBindingContainerExtension>();

-			//Bind the "Rectangle" prefab.
+			//Bind the "Prism" prefab.
 			container.Bind<Transform>().ToPrefab("Prism");

 			//Register all commands under the namespace "Adic.Examples.Commander.Commands".


Replaced usage of Type[0] with Type.EmptyTypes.

--- src/Autofac.Extras.DynamicProxy/RegistrationExtensions.cs
+++ src/Autofac.Extras.DynamicProxy/RegistrationExtensions.cs
@@ -136,7 +136,7 @@
             registration.ActivatorData.ImplementationType =
                 ProxyGenerator.ProxyBuilder.CreateClassProxyType(
                     registration.ActivatorData.ImplementationType,
-                    additionalInterfaces ?? new Type[0],
+                    additionalInterfaces ?? Type.EmptyTypes,
                     options);

             var interceptorServices = GetInterceptorServicesFromAttributes(registration.ActivatorData.ImplementationType);


Preserve selection when source changes.

Preserve selection when source changes.

Fixes #4048.

--- src/Avalonia.Controls/Selection/InternalSelectionModel.cs
+++ src/Avalonia.Controls/Selection/InternalSelectionModel.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Collections.Specialized;
 using System.Diagnostics.CodeAnalysis;
 using System.Linq;
@@ -60,6 +61,14 @@

         private protected override void SetSource(IEnumerable? value)
         {
+            object?[]? oldSelection = null;
+
+            if (Source is object && value is object)
+            {
+                oldSelection = new object?[SelectedItems.Count];
+                SelectedItems.CopyTo(oldSelection, 0);
+            }
+
             try
             {
                 _ignoreSelectedItemsChanges = true;
@@ -70,7 +79,18 @@
                 _ignoreSelectedItemsChanges = false;
             }

-            SyncToSelectedItems();
+            if (oldSelection is null)
+            {
+                SyncToSelectedItems();
+            }
+            else
+            {
+                foreach (var i in oldSelection)
+                {
+                    var index = ItemsView!.IndexOf(i);
+                    Select(index);
+                }
+            }
         }

         private void SyncToSelectedItems()


Change ModelBuilder to use old EntityFrameworkCore RC1 naming conventions

--- src/Dangl.WebDocumentation/Models/ApplicationDbContext.cs
+++ src/Dangl.WebDocumentation/Models/ApplicationDbContext.cs
@@ -1,6 +1,7 @@
 using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;

 namespace Dangl.WebDocumentation.Models
 {
@@ -14,6 +15,11 @@

         protected override void OnModelCreating(ModelBuilder builder)
         {
+            foreach (var entity in builder.Model.GetEntityTypes())
+            {
+                entity.Relational().TableName = entity.DisplayName();
+            }
+
             base.OnModelCreating(builder);

             // Make the Name unique so it can be used as a single identifier for a project ( -> Urls may contain the project name instead of the Guid)


Fixed couple non-default arguments in REST messages

--- src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs
+++ src/Discord.Net.Rest/Entities/Messages/RestUserMessage.cs
@@ -128,7 +128,7 @@
             }
         }

-        public async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options)
+        public async Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null)
         {
             var model = await MessageHelper.ModifyAsync(this, Discord, func, options).ConfigureAwait(false);
             Update(model);
@@ -151,9 +151,9 @@
             => MessageHelper.GetReactionUsersAsync(this, emoji, x => { x.Limit = limit; x.AfterUserId = afterUserId.HasValue ? afterUserId.Value : Optional.Create<ulong>(); }, Discord, options);

-        public Task PinAsync(RequestOptions options)
+        public Task PinAsync(RequestOptions options = null)
             => MessageHelper.PinAsync(this, Discord, options);
-        public Task UnpinAsync(RequestOptions options)
+        public Task UnpinAsync(RequestOptions options = null)
             => MessageHelper.UnpinAsync(this, Discord, options);

         public string Resolve(int startIndex, TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name,


TODO.

TODO.

--- src/ExRam.Gremlinq.Core/Extensions/TraversalExtensions.cs
+++ src/ExRam.Gremlinq.Core/Extensions/TraversalExtensions.cs
@@ -43,6 +43,7 @@
                 : SideEffectSemanticsChange.None;
         }

+        //TODO: Use in ContinuationBuilder
         public static Traversal RewriteForWhereContext(this Traversal traversal)
         {
             if (traversal.Count >= 2)


Handle null values

Handle null values

--- src/FluentMigrator.Runner.Db2/Generators/Db2/Db2Quoter.cs
+++ src/FluentMigrator.Runner.Db2/Generators/Db2/Db2Quoter.cs
@@ -31,6 +31,8 @@

         protected override bool ShouldQuote(string name)
         {
+            if (string.IsNullOrEmpty(name))
+                return false;
             // Quotes are only included if the name contains a special character, in order to preserve case insensitivity where possible.
             return name.IndexOfAny(SpecialChars) != -1;
         }


AddRange extension enhancement (#771)

AddRange extension enhancement (#771)

--- src/KubernetesClient/Util/Common/CollectionsExtensions.cs
+++ src/KubernetesClient/Util/Common/CollectionsExtensions.cs
@@ -4,14 +4,14 @@
     {
         public static void AddRange<T>(this HashSet<T> hashSet, ICollection<T> items)
         {
-            if (items == null)
+            if (items == null || hashSet == null)
             {
                 return;
             }

             foreach (var item in items)
             {
-                hashSet?.Add(item);
+                hashSet.Add(item);
             }
         }


Fixed possible issues with parsing notes from strings.

--- src/Midichlorian/Midichlorian.VSPackage/PitchConverter.cs
+++ src/Midichlorian/Midichlorian.VSPackage/PitchConverter.cs
@@ -1,4 +1,5 @@
-using Midi;
+using System;
+using Midi;

 namespace YuriyGuts.Midichlorian.VSPackage
 {
@@ -17,6 +18,20 @@
             var parsePos = 0;
             var note = Note.ParseNote(pitchString, ref parsePos);
             var octave = int.Parse(pitchString.Substring(parsePos));
+
+            // Support B#.
+            if (note.Letter == 'B' && note.Accidental == 1)
+            {
+                note = new Note('C');
+                octave++;
+            }
+
+            // Do not allow flats and double accidentals (YAGNI).
+            if (note.Accidental < 0 || note.Accidental > 1)
+            {
+                throw new ArgumentException("Flats and double accidentals are note supported.");
+            }
+
             return note.PitchInOctave(octave);
         }
     }