Nullability constraints.

Nullability constraints.

--- src/Kephas.Core/Services/ServiceHelper.cs
+++ src/Kephas.Core/Services/ServiceHelper.cs
@@ -35,7 +35,7 @@
         /// <returns>
         /// An asynchronous result.
         /// </returns>
-        public static Task InitializeAsync(object service, IContext context = null, CancellationToken cancellationToken = default)
+        public static Task InitializeAsync(object service, IContext? context = null, CancellationToken cancellationToken = default)
         {
             if (service is IAsyncInitializable asyncService)
             {
@@ -61,7 +61,7 @@
         /// </remarks>
         /// <param name="service">The service.</param>
         /// <param name="context">Optional. The context.</param>
-        public static void Initialize(object service, IContext context = null)
+        public static void Initialize(object service, IContext? context = null)
         {
             if (service is IAsyncInitializable asyncService)
             {
@@ -88,7 +88,7 @@
         /// <returns>
         /// An asynchronous result.
         /// </returns>
-        public static async Task FinalizeAsync(object service, IContext context = null, CancellationToken cancellationToken = default)
+        public static async Task FinalizeAsync(object service, IContext? context = null, CancellationToken cancellationToken = default)
         {
             if (service is IAsyncFinalizable asyncService)
             {
@@ -128,7 +128,7 @@
         /// </remarks>
         /// <param name="service">The service.</param>
         /// <param name="context">Optional. The context.</param>
-        public static void Finalize(object service, IContext context = null)
+        public static void Finalize(object service, IContext? context = null)
         {
             if (service is IAsyncFinalizable asyncService)
             {


Fix AuthenticationService summary (#10969)

Fix AuthenticationService summary

--- src/Http/Authentication.Core/src/AuthenticationService.cs
+++ src/Http/Authentication.Core/src/AuthenticationService.cs
@@ -19,7 +19,7 @@
         /// Constructor.
         /// </summary>
         /// <param name="schemes">The <see cref="IAuthenticationSchemeProvider"/>.</param>
-        /// <param name="handlers">The <see cref="IAuthenticationRequestHandler"/>.</param>
+        /// <param name="handlers">The <see cref="IAuthenticationHandlerProvider"/>.</param>
         /// <param name="transform">The <see cref="IClaimsTransformation"/>.</param>
         /// <param name="options">The <see cref="AuthenticationOptions"/>.</param>
         public AuthenticationService(IAuthenticationSchemeProvider schemes, IAuthenticationHandlerProvider handlers, IClaimsTransformation transform, IOptions<AuthenticationOptions> options)


NH-1530 - Register column type XML for Oracle9i dialect

--- src/NHibernate/Dialect/Oracle9iDialect.cs
+++ src/NHibernate/Dialect/Oracle9iDialect.cs
@@ -25,6 +25,7 @@
 			RegisterColumnType(DbType.Date, "DATE");
 			RegisterColumnType(DbType.DateTime, "TIMESTAMP(4)");
 			RegisterColumnType(DbType.Time, "TIMESTAMP(4)");
+			RegisterColumnType(DbType.Xml, "XMLTYPE");
 		}

 		public override long TimestampResolutionInTicks


JsonConverter - Do not include static properties by default

--- src/NLog/Targets/DefaultJsonSerializer.cs
+++ src/NLog/Targets/DefaultJsonSerializer.cs
@@ -740,6 +740,6 @@
             return props;
         }

-        private const BindingFlags PublicProperties = BindingFlags.Instance | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy;
+        private const BindingFlags PublicProperties = BindingFlags.Instance | BindingFlags.Public;
     }
 }


Added some comments

Added some comments

--- src/Noobot.Domain/Slack/SlackConnector.cs
+++ src/Noobot.Domain/Slack/SlackConnector.cs
@@ -40,6 +40,7 @@

                 _client.OnMessageReceived += ClientOnOnMessageReceived;

+                //TODO: Populate with useful information and display/log it somewhere
                 var connectionStatus = new InitialConnectionStatus();
                 tcs.SetResult(connectionStatus);
             });
@@ -63,6 +64,7 @@
             Task<Response> messageTask = pipeline.Invoke(incomingMessage);
             messageTask.ContinueWith(task =>
             {
+                //TODO: Send messages and stuff from here
                 // message completed. Send messages etc here
                 Console.WriteLine("[[[Message ended]]]");
             });


implementing initialize page

implementing initialize page

--- src/Obsidian/Views/Home/Initialize.cshtml
+++ src/Obsidian/Views/Home/Initialize.cshtml
@@ -2,19 +2,44 @@
     For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
 *@
 @{
-    ViewBag.Title = "First Run";
+    ViewBag.Title = "Welcome!";
 }
 @model Obsidian.Models.InitializationInfo

-
First Run

-<form asp-controller="Home" asp-action="Initialize" method="post">
-
-    <input asp-for="UserName" type="text"/>
-
-    <input asp-for="Password" type="password" />
-
-    <input asp-for="ConfirmPassword" type="password" />
-
-    <input asp-for="HostUrl" type="url" />
-    <button type="submit">OK</button>
-</form>+
+

+
+

+        @*Left Section*@
+
Welcome!

+
You are just one step away from your own OAuth server!

+

+    @*Right Section*@
+

+
+        <form role="form" class="text-padding" asp-action="Authorize" asp-controller="OAuth20">
+

+
+                <input asp-for="UserName" class="form-control" type="text" placeholder="Enter your username" required />
+

+

+
+                <input class="form-control" asp-for="Password" type="password" placeholder="Enter your password" required />
+

+

+
+                <input class="form-control" asp-for="ConfirmPassword" type="password" placeholder="Enter your password again" required />
+

+

+
+                <input asp-for="HostUrl" class="form-control" type="url" placeholder="Enter your website link" required />
+

+            <button class="btn btn-lg btn-primary btn-block btn-raised" type="submit">Finish</button>
+        </form>
+
+

+
+

+
+
+<link href="~/css/SignIn.css" rel="stylesheet" />


Send events for test messages during test discovery

--- src/OmniSharp.DotNetTest/VSTestManager.cs
+++ src/OmniSharp.DotNetTest/VSTestManager.cs
@@ -132,13 +132,7 @@
                 {
                     case MessageType.TestMessage:
                         var testMessage = message.DeserializePayload<TestMessagePayload>();
-                        EventEmitter.Emit(TestMessageEvent.Id,
-                            new TestMessageEvent
-                            {
-                                MessageLevel = testMessage.MessageLevel.ToString().ToLowerInvariant(),
-                                Message = testMessage.Message
-                            });
-
+                        EmitTestMessage(testMessage);
                         break;

                     case MessageType.ExecutionComplete:
@@ -175,13 +169,7 @@
                     {
                         case MessageType.TestMessage:
                             var testMessage = message.DeserializePayload<TestMessagePayload>();
-                            EventEmitter.Emit(TestMessageEvent.Id,
-                                new TestMessageEvent
-                                {
-                                    MessageLevel = testMessage.MessageLevel.ToString().ToLowerInvariant(),
-                                    Message = testMessage.Message
-                                });
-
+                            EmitTestMessage(testMessage);
                             break;

                         case MessageType.TestRunStatsChange:
@@ -240,6 +228,8 @@
                 switch (message.MessageType)
                 {
                     case MessageType.TestMessage:
+                        var testMessage = message.DeserializePayload<TestMessagePayload>();
+                        EmitTestMessage(testMessage);
                         break;

                     case MessageType.TestCasesFound:
@@ -276,5 +266,15 @@
         {
             return DiscoverTestsAsync(methodName, CancellationToken.None).Result;
         }
+
+        private void EmitTestMessage(TestMessagePayload testMessage)
+        {
+            EventEmitter.Emit(TestMessageEvent.Id,
+                new TestMessageEvent
+                {
+                    MessageLevel = testMessage.MessageLevel.ToString().ToLowerInvariant(),
+                    Message = testMessage.Message
+                });
+        }
     }
 }


Bump minor version number

Bump minor version number

--- src/Medidata.ZipkinTracer.Core/Properties/AssemblyInfo.cs
+++ src/Medidata.ZipkinTracer.Core/Properties/AssemblyInfo.cs
@@ -7,12 +7,17 @@
 // associated with an assembly.
 [assembly: AssemblyTitle("Medidata.ZipkinTracer.Core")]
 [assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Medidata Solutions Inc")]
+[assembly: AssemblyCompany("Medidata Solutions, Inc.")]
 [assembly: AssemblyProduct("Medidata.ZipkinTracer.Core")]
-[assembly: AssemblyCopyright("Copyright © Medidata Solutions Inc 2015")]
+[assembly: AssemblyCopyright("Copyright © Medidata Solutions, Inc. 2016")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
+
+#if DEBUG
+[assembly: AssemblyConfiguration("Debug")]
+#else
+[assembly: AssemblyConfiguration("Release")]
+#endif

 // Setting ComVisible to false makes the types in this assembly not visible
 // to COM components.  If you need to access a type in this assembly from
@@ -32,7 +37,7 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.5")]
-[assembly: AssemblyFileVersion("1.0.5")]
-[assembly: AssemblyInformationalVersion("1.0.5")]
+[assembly: AssemblyVersion("1.1.0")]
+[assembly: AssemblyFileVersion("1.1.0")]
+[assembly: AssemblyInformationalVersion("1.1.0")]
 [assembly: InternalsVisibleTo("Medidata.ZipkinTracer.Core.Test")]


More RecordException tests

More RecordException tests

--- src/NUnitFramework/tests/Internal/ExceptionHelperTests.cs
+++ src/NUnitFramework/tests/Internal/ExceptionHelperTests.cs
@@ -24,6 +24,9 @@
 using System;
 using System.Reflection;
 using NUnit.Compatibility;
+#if TASK_PARALLEL_LIBRARY_API
+using System.Threading.Tasks;
+#endif

 namespace NUnit.Framework.Internal
 {
@@ -33,6 +36,14 @@
         public static void BuildMessageThrowsForNullException()
         {
             Assert.That(() => ExceptionHelper.BuildMessage(null), Throws.ArgumentNullException.With.Property("ParamName").EqualTo("exception"));
+        }
+
+        [Test]
+        public static void RecordExceptionThrowsForNullDelegate()
+        {
+            Assert.That(
+                () => ExceptionHelper.RecordException(null, "someParamName"),
+                Throws.ArgumentNullException.With.Property("ParamName").EqualTo("someParamName"));
         }

         [Test]
@@ -87,5 +98,35 @@
             if (foo.ExceptionToThrow != null)
                 throw foo.ExceptionToThrow;
         }
+
+#if TASK_PARALLEL_LIBRARY_API
+        [Test]
+        public static void RecordExceptionReturnsExceptionThrownBeforeReturningAwaitableObject()
+        {
+            var exceptionToThrow = new Exception();
+
+            Assert.That(
+                ExceptionHelper.RecordException(new Func<Task>(() => throw exceptionToThrow), "someParamName"),
+                Is.SameAs(exceptionToThrow));
+        }
+
+        [Test]
+        public static void RecordExceptionReturnsExceptionFromAwaitableObjectResult()
+        {
+            var exceptionToThrow = new Exception();
+
+            Assert.That(
+                ExceptionHelper.RecordException(new Func<Task>(() => TaskFromException(exceptionToThrow)), "someParamName"),
+                Is.SameAs(exceptionToThrow));
+        }
+
+        // Task.FromException was added in .NET Framework 4.6
+        private static Task TaskFromException(Exception exception)
+        {
+            var source = new TaskCompletionSource<object>();
+            source.SetException(exception);
+            return source.Task;
+        }
+#endif
     }
 }


Fixes #462 - with original line endings this time

--- src/Proto.Remote/EndpointWriterMailbox.cs
+++ src/Proto.Remote/EndpointWriterMailbox.cs
@@ -9,6 +9,7 @@
 using System.Collections.Generic;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;

 namespace Proto.Remote
 {
@@ -20,6 +21,7 @@

     public class EndpointWriterMailbox : IMailbox
     {
+        private static readonly ILogger Logger = Log.CreateLogger<EndpointWriterMailbox>();
         private readonly int _batchSize;
         private readonly IMailboxQueue _systemMessages = new UnboundedMailboxQueue();
         private readonly IMailboxQueue _userMessages = new UnboundedMailboxQueue();
@@ -83,6 +85,12 @@
                     object msg;
                     while ((msg = _userMessages.Pop()) != null)
                     {
+                        if (msg is EndpointTerminatedEvent) //The mailbox was crashing when it received this particular message
+                        {
+                            await _invoker.InvokeUserMessageAsync(msg);
+                            continue;
+                        }
+
                         batch.Add((RemoteDeliver) msg);
                         if (batch.Count >= _batchSize)
                         {
@@ -100,13 +108,15 @@
             }
             catch (Exception x)
             {
+                Logger.LogWarning("Exception in RunAsync", x);
                 _invoker.EscalateFailure(x,m);
+                return; //Without this, messages are delivered while failure is being escalated
             }

             Interlocked.Exchange(ref _status, MailboxStatus.Idle);

-            if (_userMessages.HasMessages || _systemMessages.HasMessages)
+            if (_userMessages.HasMessages || _systemMessages.HasMessages &! _suspended )
             {
                 Schedule();
             }
@@ -114,7 +124,8 @@

         protected void Schedule()
         {
-            if (Interlocked.Exchange(ref _status, MailboxStatus.Busy) == MailboxStatus.Idle)
+
+            if (Interlocked.CompareExchange(ref _status, MailboxStatus.Busy, MailboxStatus.Idle) == MailboxStatus.Idle)
             {
                 _dispatcher.Schedule(RunAsync);
             }


refactoring

refactoring

--- src/QuickBooksAccess/QuickBooksService.cs
+++ src/QuickBooksAccess/QuickBooksService.cs
@@ -49,7 +49,7 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
@@ -64,7 +64,7 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
@@ -79,7 +79,7 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
@@ -94,7 +94,7 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
@@ -109,7 +109,7 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
@@ -124,13 +124,13 @@
 			}
 			catch( Exception exception )
 			{
-				var quickBooksException = new QuickBooksException( this.CreateExceptionMessage(), exception );
+				var quickBooksException = new QuickBooksException( this.CreateMethodCallInfo(), exception );
 				QuickBooksLogger.LogTraceException( quickBooksException );
 				throw quickBooksException;
 			}
 		}

-		private string CreateExceptionMessage( string additionalInfo = "", [ CallerMemberName ] string memberName = "" )
+		private string CreateMethodCallInfo( string additionalInfo = "", [ CallerMemberName ] string memberName = "" )
 		{
 			var str = string.Format(
 				"MethodName:{0}, ConsumerProfile:{1}, RestProfile:{2}, AdditionalInfo:{3}",


Update DbEntityPersister.cs

Update DbEntityPersister.cs

--- src/RabbitDB/Storage/DbEntityPersister.cs
+++ src/RabbitDB/Storage/DbEntityPersister.cs
@@ -96,8 +96,8 @@
             string insertStatement = tableInfo.CreateInsertStatement(_dbProvider);
             QueryParameterCollection arguments = QueryParameterCollection.Create<TEntity>(Utils.Utils.GetEntityArguments(entity, tableInfo));

-            LastInsertId insertId = new LastInsertId(_dbProvider.ExecuteScalar<object>(new SqlQuery(insertStatement, arguments)));
+            object insertId = _dbProvider.ExecuteScalar<object>(new SqlQuery(insertStatement, arguments)));
             tableInfo.SetAutoNumber<TEntity>(entity, insertId);
         }
     }
-}+}


#129 Rock.Make() tests pass

#129 Rock.Make() tests pass

--- src/Rocks.Tests/RockMakeGeneratorTests.cs
+++ src/Rocks.Tests/RockMakeGeneratorTests.cs
@@ -11,22 +11,24 @@
 	public static async Task GenerateWhenInvocationIsNotRockMakeAsync()
 	{
 		var code =
-@"using Rocks;
-
-public interface ITest { }
-
-public static class Rocker
-{
-	public static void Make<T>() { }
-}
-
-public static class Invoker
-{
-	public static void Invoke()
-	{
-		Rocker.Make<ITest>();
-	}
-}";
+			"""
+			using Rocks;
+
+			public interface ITest { }
+
+			public static class Rocker
+			{
+				public static void Make<T>() { }
+			}
+
+			public static class Invoker
+			{
+				public static void Invoke()
+				{
+					Rocker.Make<ITest>();
+				}
+			}
+			""";

 		await TestAssistants.RunAsync<RockMakeGenerator>(code,
 			Enumerable.Empty<(Type, string, string)>(),
@@ -37,56 +39,53 @@
 	public static async Task GenerateWhenValueTaskOfTIsReturnedAsync()
 	{
 		var code =
-@"using Rocks;
-using System;
-using System.Threading.Tasks;
-
-namespace MockTests
-{
-	public static class Test
-	{
-		public static void Generate()
-		{
-			var rock = Rock.Make<ITest>();
-		}
-	}
-
-	public interface ITest
-	{
-		ValueTask<T> Foo<T>();
-	}
-}";
+			"""
+			using Rocks;
+			using System;
+			using System.Threading.Tasks;
+
+			namespace MockTests
+			{
+				public static class Test
+				{
+					public static void Generate()
+					{
+						var rock = Rock.Make<ITest>();
+					}
+				}
+
+				public interface ITest
+				{
+					ValueTask<T> Foo<T>();
+				}
+			}
+			""";

 		var generatedCode =
-@"using MockTests;
-using Rocks;
-using Rocks.Exceptions;
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-using System.Threading.Tasks;
-
-#nullable enable
-namespace MockTests
-{
-	internal static class MakeExpectationsOfITestExtensions
-	{
-		internal static ITest Instance(this MakeGeneration<ITest> self) =>
-			new RockITest();
-
-		private sealed class RockITest
-			: ITest
-		{
-			public RockITest() { }
-
-			public ValueTask<T> Foo<T>()
-			{
-				return new ValueTask<T>(default(T)!);
-			}
-		}
-	}
-}
-";
+			"""
+			#nullable enable
+
+			namespace MockTests
+			{
+				internal static class MakeExpectationsOfITestExtensions
+				{
+					internal static global::MockTests.ITest Instance(this global::Rocks.MakeGeneration<global::MockTests.ITest> self) =>
+						new RockITest();
+
+					private sealed class RockITest
+						: global::MockTests.ITest
+					{
+						public RockITest() { }
+
+						public global::System.Threading.Tasks.ValueTask<T> Foo<T>()
+						{
+							return new global::System.Threading.Tasks.ValueTask<T>(default(T)!);
+						}
+					}
+				}
+			}
+
+			""";

 		await TestAssistants.RunAsync<RockMakeGenerator>(code,
 			new[] { (typeof(RockMakeGenerator), "ITest_Rock_Make.g.cs", generatedCode) },
@@ -97,83 +96,82 @@
 	public static async Task GenerateWhenTargetTypeIsValidAsync()
 	{
 		var code =
-@"using Rocks;
-using System;
-using System.Threading.Tasks;
-
-namespace MockTests
-{
-	public interface ITest
-	{
-		unsafe int* Foo(int* value);
-		unsafe delegate*<int, void> FooMethod(delegate*<int, void> value);
-		unsafe int* Data { get; set; }
-		unsafe delegate*<int, void> DataMethod { get; set; }
-		unsafe int* this[int* a] { get; set; }
-		unsafe delegate*<int, void> this[delegate*<int, void> a] { get; set; }
-	}
-
-	public static class Test
-	{
-		public static void Generate()
-		{
-			var rock = Rock.Make<ITest>();
-		}
-	}
-}";
+			"""
+			using Rocks;
+			using System;
+			using System.Threading.Tasks;
+
+			namespace MockTests
+			{
+				public interface ITest
+				{
+					unsafe int* Foo(int* value);
+					unsafe delegate*<int, void> FooMethod(delegate*<int, void> value);
+					unsafe int* Data { get; set; }
+					unsafe delegate*<int, void> DataMethod { get; set; }
+					unsafe int* this[int* a] { get; set; }
+					unsafe delegate*<int, void> this[delegate*<int, void> a] { get; set; }
+				}
+
+				public static class Test
+				{
+					public static void Generate()
+					{
+						var rock = Rock.Make<ITest>();
+					}
+				}
+			}
+			""";

 		var generatedCode =
-@"using Rocks;
-using Rocks.Exceptions;
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-
-#nullable enable
-namespace MockTests
-{
-	internal static class MakeExpectationsOfITestExtensions
-	{
-		internal static ITest Instance(this MakeGeneration<ITest> self) =>
-			new RockITest();
-
-		private sealed class RockITest
-			: ITest
-		{
-			public RockITest() { }
-
-			public unsafe int* Foo(int* value)
-			{
-				return default!;
-			}
-			public unsafe delegate*<int, void> FooMethod(delegate*<int, void> value)
-			{
-				return default!;
-			}
-			public unsafe int* Data
-			{
-				get => default!;
-				set { }
-			}
-			public unsafe delegate*<int, void> DataMethod
-			{
-				get => default!;
-				set { }
-			}
-			public unsafe int* this[int* a]
-			{
-				get => default!;
-				set { }
-			}
-			public unsafe delegate*<int, void> this[delegate*<int, void> a]
-			{
-				get => default!;
-				set { }
-			}
-		}
-	}
-}
-";
+			"""
+			#nullable enable
+
+			namespace MockTests
+			{
+				internal static class MakeExpectationsOfITestExtensions
+				{
+					internal static global::MockTests.ITest Instance(this global::Rocks.MakeGeneration<global::MockTests.ITest> self) =>
+						new RockITest();
+
+					private sealed class RockITest
+						: global::MockTests.ITest
+					{
+						public RockITest() { }
+
+						public unsafe int* Foo(int* value)
+						{
+							return default!;
+						}
+						public unsafe delegate*<int, void> FooMethod(delegate*<int, void> value)
+						{
+							return default!;
+						}
+						public unsafe int* Data
+						{
+							get => default!;
+							set { }
+						}
+						public unsafe delegate*<int, void> DataMethod
+						{
+							get => default!;
+							set { }
+						}
+						public unsafe int* this[int* a]
+						{
+							get => default!;
+							set { }
+						}
+						public unsafe delegate*<int, void> this[delegate*<int, void> a]
+						{
+							get => default!;
+							set { }
+						}
+					}
+				}
+			}
+
+			""";

 		await TestAssistants.RunAsync<RockMakeGenerator>(code,
 			new[] { (typeof(RockMakeGenerator), "ITest_Rock_Make.g.cs", generatedCode) },
@@ -184,47 +182,46 @@
 	public static async Task GenerateWhenInvocationExistsInTopLevelStatementsAsync()
 	{
 		var code =
-@"using MockTests;
-using Rocks;
-using System;
-
-var rock = Rock.Make<ITest>();
-
-namespace MockTests
-{
-	public interface ITest
-	{
-		void Foo();
-	}
-}";
+			"""
+			using MockTests;
+			using Rocks;
+			using System;
+
+			var rock = Rock.Make<ITest>();
+
+			namespace MockTests
+			{
+				public interface ITest
+				{
+					void Foo();
+				}
+			}
+			""";

 		var generatedCode =
-@"using Rocks;
-using Rocks.Exceptions;
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-
-#nullable enable
-namespace MockTests
-{
-	internal static class MakeExpectationsOfITestExtensions
-	{
-		internal static ITest Instance(this MakeGeneration<ITest> self) =>
-			new RockITest();
-
-		private sealed class RockITest
-			: ITest
-		{
-			public RockITest() { }
-
-			public void Foo()
-			{
-			}
-		}
-	}
-}
-";
+			"""
+			#nullable enable
+
+			namespace MockTests
+			{
+				internal static class MakeExpectationsOfITestExtensions
+				{
+					internal static global::MockTests.ITest Instance(this global::Rocks.MakeGeneration<global::MockTests.ITest> self) =>
+						new RockITest();
+
+					private sealed class RockITest
+						: global::MockTests.ITest
+					{
+						public RockITest() { }
+
+						public void Foo()
+						{
+						}
+					}
+				}
+			}
+
+			""";

 		await TestAssistants.RunAsync<RockMakeGenerator>(code,
 			new[] { (typeof(RockMakeGenerator), "ITest_Rock_Make.g.cs", generatedCode) },
@@ -235,20 +232,22 @@
 	public static async Task GenerateWhenTargetTypeIsInvalidAsync()
 	{
 		var code =
-@"using Rocks;
-
-namespace MockTests
-{
-	public sealed class InvalidTarget { }
-
-	public static class Test
-	{
-		public static void Generate()
-		{
-			var rock = Rock.Make<InvalidTarget>();
-		}
-	}
-}";
+			"""
+			using Rocks;
+
+			namespace MockTests
+			{
+				public sealed class InvalidTarget { }
+
+				public static class Test
+				{
+					public static void Generate()
+					{
+						var rock = Rock.Make<InvalidTarget>();
+					}
+				}
+			}
+			""";

 		var diagnostic = new DiagnosticResult(CannotMockSealedTypeDiagnostic.Id, DiagnosticSeverity.Error)
 			.WithSpan(5, 22, 5, 35);
@@ -261,24 +260,26 @@
 	public static async Task GenerateWhenTargetTypeHasDiagnosticsAsync()
 	{
 		var code =
-@"using Rocks;
-
-namespace MockTests
-{
-	public interface ITest
-	{
-		// Note the missing semicolon
-		void Foo()
-	}
-
-	public static class Test
-	{
-		public static void Generate()
-		{
-			var rock = Rock.Make<ITest>();
-		}
-	}
-}";
+			"""
+			using Rocks;
+
+			namespace MockTests
+			{
+				public interface ITest
+				{
+					// Note the missing semicolon
+					void Foo()
+				}
+
+				public static class Test
+				{
+					public static void Generate()
+					{
+						var rock = Rock.Make<ITest>();
+					}
+				}
+			}
+			""";

 		var diagnostic = new DiagnosticResult("CS1002", DiagnosticSeverity.Error)
 			.WithSpan(8, 13, 8, 13);
@@ -291,51 +292,50 @@
 	public static async Task GenerateWhenTargetTypeIsValidButOtherCodeHasDiagnosticsAsync()
 	{
 		var code =
-@"using Rocks;
-
-namespace MockTests
-{
-	public interface ITest
-	{
-		void Foo();
-	}
-
-	public static class Test
-	{
-		public static void Generate()
-		{
-			var rock = Rock.Make<ITest>();
-		}
-// Note the missing closing brace
-	}";
+			"""
+			using Rocks;
+
+			namespace MockTests
+			{
+				public interface ITest
+				{
+					void Foo();
+				}
+
+				public static class Test
+				{
+					public static void Generate()
+					{
+						var rock = Rock.Make<ITest>();
+					}
+			// Note the missing closing brace
+				}
+			""";

 		var generatedCode =
-@"using Rocks;
-using Rocks.Exceptions;
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-
-#nullable enable
-namespace MockTests
-{
-	internal static class MakeExpectationsOfITestExtensions
-	{
-		internal static ITest Instance(this MakeGeneration<ITest> self) =>
-			new RockITest();
-
-		private sealed class RockITest
-			: ITest
-		{
-			public RockITest() { }
-
-			public void Foo()
-			{
-			}
-		}
-	}
-}
-";
+			"""
+			#nullable enable
+
+			namespace MockTests
+			{
+				internal static class MakeExpectationsOfITestExtensions
+				{
+					internal static global::MockTests.ITest Instance(this global::Rocks.MakeGeneration<global::MockTests.ITest> self) =>
+						new RockITest();
+
+					private sealed class RockITest
+						: global::MockTests.ITest
+					{
+						public RockITest() { }
+
+						public void Foo()
+						{
+						}
+					}
+				}
+			}
+
+			""";

 		var diagnostic = new DiagnosticResult("CS1513", DiagnosticSeverity.Error)
 			.WithSpan(17, 3, 17, 3);


Extend the LLC and Clang checking to find Ninja MSVC builds.

--- src/SharpLang.Compiler.Tests/TestFiles.cs
+++ src/SharpLang.Compiler.Tests/TestFiles.cs
@@ -58,7 +58,16 @@
             if (File.Exists(clangLocal) || File.Exists(clangLocal + ".exe"))
                 Driver.Clang = clangLocal;

-            Driver.CompileAssembly(compilerParameters.OutputAssembly, bitcodeFile);
+            // Probe again for local Ninja builds
+            llcLocal = @"../../../../deps/llvm/build/bin/llc".Replace('/', Path.DirectorySeparatorChar);
+            if (File.Exists(llcLocal) || File.Exists(llcLocal + ".exe"))
+                Driver.LLC = llcLocal;
+
+            clangLocal = @"../../../../deps/llvm/build/bin/clang".Replace('/', Path.DirectorySeparatorChar);
+            if (File.Exists(clangLocal) || File.Exists(clangLocal + ".exe"))
+                Driver.Clang = clangLocal;
+
+            Driver.CompileAssembly(compilerParameters.OutputAssembly, bitcodeFile, true);

             var outputFile = Path.Combine(Path.GetDirectoryName(outputAssembly),
                 Path.GetFileNameWithoutExtension(outputAssembly) + "-llvm.exe");


Allow keyfile to be any type of file.  This *should* fix an issue if the fileset contains only multiple assemblies and the keyfile is an assembly.

--- src/Tasks/Msi/InstallerCreationCommand.cs
+++ src/Tasks/Msi/InstallerCreationCommand.cs
@@ -2118,6 +2118,7 @@
                 // fileattr assigned to the component.
                 int fileAttr = ((fileOverride == null) || (fileOverride.attr == 0)) ? Component.fileattr : fileOverride.attr;

+                // Used to determine the keyfile
                 files.Add(Component.directory + "|" + fileName, fileId);

                 string fileSize;
@@ -2149,7 +2150,16 @@
                     isAssembly = true;
                 } catch {}

-                string componentFieldValue = null;
+                // Set the file version equal to the override value, if present
+                if ((fileOverride != null) && (fileOverride.version != null) && (fileOverride.version != "")) {
+                    fileVersion = fileOverride.version;
+                }
+
+                if (!IsVersion(ref fileVersion)) {
+                    fileVersion = null;
+                }
+
+                string componentFieldValue = Component.name;

                 if (isAssembly || filePath.EndsWith(".tlb")) {
                     // The null GUID is authored into any field of a msm database that references a feature.  It gets replaced
@@ -2160,7 +2170,7 @@

                     string asmCompName = ComponentName;

-                    if (componentFiles.FileNames.Count > 1) {
+                    if ((componentFiles.FileNames.Count > 1) && !fileName.ToLower().Equals(Component.key.file.ToLower())) {
                         asmCompName = "C_" + fileId;
                         componentFieldValue = asmCompName;
                         string newCompId = CreateRegistryGuid();
@@ -2175,7 +2185,6 @@
                             // Map the new Component to the existing one's Feature (FeatureComponents is only used in MSI databases)
                             featureComponentTable.InsertRecord(feature, asmCompName);
                         }
-
                     }

                     if (isAssembly) {
@@ -2203,10 +2212,10 @@
                         }

                         // File can't be a member of both components
-                        if (componentFiles.FileNames.Count > 1) {
-                            files.Remove(ComponentDirectory + "|" + fileName);
-                            files.Add(ComponentDirectory + "|" + fileName, "KeyIsDotNetAssembly");
-                        }
+//                        if (componentFiles.FileNames.Count > 1) {
+//                            files.Remove(ComponentDirectory + "|" + fileName);
+//                            files.Add(ComponentDirectory + "|" + fileName, "KeyIsDotNetAssembly");
+//                        }
                     }
                     else if (filePath.EndsWith(".tlb")) {
                         typeLibComponents.Add(
@@ -2237,19 +2246,10 @@

                 CopyToTempFolder(filePath, fileId);

-                if (!isAssembly && !filePath.EndsWith(".tlb")
-                    || componentFiles.FileNames.Count == 1) {
-                    componentFieldValue = Component.name;
-                }
-
-                // Set the file version equal to the override value, if present
-                if ((fileOverride != null) && (fileOverride.version != null) && (fileOverride.version != "")) {
-                    fileVersion = fileOverride.version;
-                }
-
-                if (!IsVersion(ref fileVersion)) {
-                    fileVersion = null;
-                }
+//                if (!isAssembly && !filePath.EndsWith(".tlb")
+//                    || componentFiles.FileNames.Count == 1) {
+//                    componentFieldValue = Component.name;
+//                }

                 // propagate language (if available) to File table to avoid
                 // ICE60 verification warnings


Typo.

Typo.

--- src/Whodunit.app/Events/ContentLogging.cs
+++ src/Whodunit.app/Events/ContentLogging.cs
@@ -55,7 +55,7 @@

         private void MediaService_EmptiedRecycleBin(IMediaService sender, Umbraco.Core.Events.RecycleBinEventArgs e)
         {
-            HistoryHelper.AddHistoryItem(GetUserSignature(CurrentUser) + " emptied the recycle bin, permanently deleting media item with the following ids: " + e.Ids.Select(i => i.ToString()).Aggregate((curr, next) => curr + ListSeparator + next));
+            HistoryHelper.AddHistoryItem(GetUserSignature(CurrentUser) + " emptied the recycle bin, permanently deleting media items with the following ids: " + e.Ids.Select(i => i.ToString()).Aggregate((curr, next) => curr + ListSeparator + next));
         }

         private void MediaService_Deleted(IMediaService sender, Umbraco.Core.Events.DeleteEventArgs<IMedia> e)


Define new tests

Define new tests

--- src/Yarhl.UnitTests/IO/DataWriterTests.cs
+++ src/Yarhl.UnitTests/IO/DataWriterTests.cs
@@ -569,6 +569,10 @@
             Assert.Throws<ArgumentNullException>(() => writer.Write(text));
             Assert.Throws<ArgumentOutOfRangeException>(
                 () => writer.Write(string.Empty, maxSize: -2));
+
+            Assert.Throws<ArgumentNullException>(() => writer.Write(text, "."));
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => writer.Write(string.Empty, ".", maxSize: -2));
         }

         [Test]
@@ -647,6 +651,7 @@

             string text = null;
             Assert.Throws<ArgumentNullException>(() => writer.Write(text, 5));
+            Assert.Throws<ArgumentNullException>(() => writer.Write(text, 5, "."));
         }

         [Test]
@@ -731,6 +736,200 @@
                 () => writer.Write(string.Empty, nullType));
             Assert.Throws<ArgumentOutOfRangeException>(
                 () => writer.Write(string.Empty, typeof(short), maxSize: -2));
+
+            Assert.Throws<ArgumentNullException>(
+                () => writer.Write(nullText, typeof(short), null));
+            Assert.Throws<ArgumentNullException>(
+                () => writer.Write(string.Empty, nullType, null));
+            Assert.Throws<ArgumentOutOfRangeException>(
+                () => writer.Write(string.Empty, typeof(short), null, maxSize: -2));
+        }
+
+        [Test]
+        public void WriteTextAndNoTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, null, null, -1);
+
+            Assert.AreEqual(6, stream.Length);
+            byte[] expected = { 0xE3, 0x81, 0x82, 0xE3, 0x82, 0xA2 };
+            byte[] actual = new byte[6];
+            stream.Position = 0;
+            stream.Read(actual, 0, 6);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextWithEncodingAndCustomTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, "・", Encoding.GetEncoding("utf-16"));
+
+            byte[] expected = { 0x42, 0x30, 0xA2, 0x30, 0xFB, 0x30 };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextWithMaxSizeAndCustomTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, ".", maxSize: 4);
+
+            byte[] expected = { 0xE3, 0x81, 0x82, 0x2E };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextFixedSizeAltVersion()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, 10, null);
+
+            byte[] expected = { 0xE3, 0x81, 0x82, 0xE3, 0x82, 0xA2, 0x00, 0x00, 0x00, 0x00 };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextAvoidDuplicateCustomTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア.";
+            writer.Write(text, ".");
+
+            byte[] expected = { 0xE3, 0x81, 0x82, 0xE3, 0x82, 0xA2, 0x2E };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextFixedSizeCustomTerminatorTruncating()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, 4, "・", Encoding.GetEncoding("utf-16"));
+
+            byte[] expected = { 0x42, 0x30, 0xFB, 0x30 };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextFixedSizeWithEncodingAndNoNullTerminatorAltVersion()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, 4, null, Encoding.GetEncoding("utf-16"));
+
+            byte[] expected = { 0x42, 0x30, 0xA2, 0x30 };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextAndSizeAltVersion()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, typeof(ushort), null);
+
+            Assert.AreEqual(8, stream.Length);
+            byte[] expected = { 0x06, 0x00, 0xE3, 0x81, 0x82, 0xE3, 0x82, 0xA2 };
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextAndSizeWithEncodingAndCustomTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, typeof(byte), "・", Encoding.GetEncoding("utf-16"));
+
+            byte[] expected = { 0x06, 0x42, 0x30, 0xA2, 0x30, 0xFB, 0x30 };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextAndSizeWithAvoidDuplicateCustomTerminators()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア.";
+            writer.Write(text, typeof(byte), ".");
+
+            byte[] expected = { 0x07, 0xE3, 0x81, 0x82, 0xE3, 0x82, 0xA2, 0x2E };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
+        }
+
+        [Test]
+        public void WriteTextAndSizeWithMaxSizeAndCustomTerminator()
+        {
+            using DataStream stream = new DataStream();
+            DataWriter writer = new DataWriter(stream);
+
+            string text = "あア";
+            writer.Write(text, typeof(int), ".", maxSize: 3);
+
+            byte[] expected = { 0x03, 0x00, 0x00, 0x00, 0xE3, 0x81, 0x2E };
+            Assert.AreEqual(expected.Length, stream.Length);
+            byte[] actual = new byte[expected.Length];
+            stream.Position = 0;
+            stream.Read(actual, 0, expected.Length);
+            Assert.IsTrue(expected.SequenceEqual(actual));
         }

         [Test]


Reinstate src zip files - bad edit

Reinstate src zip files - bad edit

--- src/NodaTime.Web/Models/GoogleStorageReleaseRepository.cs
+++ src/NodaTime.Web/Models/GoogleStorageReleaseRepository.cs
@@ -64,7 +64,7 @@
             nextCacheRefresh = Clock.GetCurrentInstant() + CacheRefreshTime;
             releases = client
                 .ListObjects(Bucket, ObjectPrefix)
-                .Where(obj => !obj.Name.EndsWith("/") && !obj.Name.EndsWith("-src.zip"))
+                .Where(obj => !obj.Name.EndsWith("/"))
                 .Select(ConvertObject)
                 .OrderByDescending(r => r.Release)
                 .ToList();


Fixing creation date when container is set as home page

--- src/Orchard.Web/Core/Routable/Services/RoutableService.cs
+++ src/Orchard.Web/Core/Routable/Services/RoutableService.cs
@@ -14,10 +14,12 @@
     public class RoutableService : IRoutableService {
         private readonly IContentManager _contentManager;
         private readonly IEnumerable<ISlugEventHandler> _slugEventHandlers;
+        private readonly IRoutablePathConstraint _routablePathConstraint;

-        public RoutableService(IContentManager contentManager, IEnumerable<ISlugEventHandler> slugEventHandlers) {
+        public RoutableService(IContentManager contentManager, IEnumerable<ISlugEventHandler> slugEventHandlers, IRoutablePathConstraint routablePathConstraint) {
             _contentManager = contentManager;
             _slugEventHandlers = slugEventHandlers;
+            _routablePathConstraint = routablePathConstraint;
         }

         public void FixContainedPaths(IRoutableAspect part) {
@@ -27,8 +29,25 @@
                 .Select(item => item.As<IRoutableAspect>()).Where(item => item != null);

             foreach (var itemRoute in items) {
-                itemRoute.ContentItem.VersionRecord.Published = false; // <- to force a republish
-                _contentManager.Publish(itemRoute.ContentItem);
+                var route = itemRoute.As<IRoutableAspect>();
+
+                if(route == null) {
+                    continue;
+                }
+
+                var path = route.Path;
+                route.Path = route.GetPathWithSlug(route.Slug);
+
+                // if the path has changed by having the slug changed on the way in (e.g. user input) or to avoid conflict
+                // then update and publish all contained items
+                if (path != route.Path) {
+                    _routablePathConstraint.RemovePath(path);
+                    FixContainedPaths(route);
+                }
+
+                if (!string.IsNullOrWhiteSpace(route.Path))
+                    _routablePathConstraint.AddPath(route.Path);
+
             }
         }


Make function icon

Make function icon

--- src/Package/Impl/DataInspect/WorkspaceVariableProvider.cs
+++ src/Package/Impl/DataInspect/WorkspaceVariableProvider.cs
@@ -136,7 +136,7 @@
             public VariableInfo(REvaluation e)
             {
                 this.Name = e.Name;
-                if (e.TypeName == "function")
+                if (e.TypeName == "closure")
                 {
                     ItemType = NamedItemType.Function;
                 }


2209: temp fix

2209: temp fix

--- src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs
+++ src/PixelFarm/PaintLab.RenderTree/1_Root/1_RootGraphic.cs
@@ -18,6 +18,7 @@

     public static class GlobalRootGraphic
     {
+        //TODO: merge this to RootGraphics?

         static int _suspendCount;
         internal static bool SuspendGraphicsUpdate;
@@ -25,7 +26,6 @@
         public static RootGraphic CurrentRootGfx;
         public static RenderElement CurrentRenderElement;

-
         public static RenderElement StartWithRenderElement; //temp fix
         public static bool WaitForFirstRenderElement;

@@ -165,52 +165,124 @@

             FlushPlanClearBG = true;
-
-            if (_accumInvalidateQueue != null)
-            {
-                //create accumulative plan
-                //merge consecutive
-
-                int j = _accumInvalidateQueue.Count;
-
-                if (j == 1)
-                {
-                    //1 render elem
+            SingleRenderE = null;
+
+            //create accumulative plan
+            //merge consecutive
+            int j = _accumInvalidateQueue.Count;
+            //for (int i = 0; i < j; ++i)
+            //{
+            //    InvalidateGraphicsArgs a = _accumInvalidateQueue.Dequeue();
+            //    //_tmpInvalidatePlans.Add(a);
+            //    //if (a.SrcRenderElement.BgIsNotOpaque)
+            //    //{
+
+            //    //}
+            //    //else
+            //    //{
+
+            //    //}
+            //    ReleaseInvalidateGfxArgs(a);
+            //}
+            //_tmpInvalidatePlans.Clear();
+
+            if (j == 0)
+            {
+
+            }
+            //else if (j == 1)
+            //{
+            //    //1 render elem
+            //    InvalidateGraphicsArgs a = _accumInvalidateQueue.Dequeue();
+            //    if (a.SrcRenderElement.BgIsNotOpaque)
+            //    {
+
+            //    }
+            //    else
+            //    {
+            //        switch (a.Reason)
+            //        {
+            //            case InvalidateReason.ViewportChanged:
+            //                {
+            //                    FlushPlanClearBG = false;
+            //                    SingleRenderE = a.SrcRenderElement;
+            //                }
+            //                break;
+            //            case InvalidateReason.UpdateLocalArea:
+            //                {
+            //                    //Do bubble tracking up
+
+
+            //                    FlushPlanClearBG = false;
+            //                    SingleRenderE = a.SrcRenderElement;
+            //                }
+            //                break;
+            //        }
+
+            //        //is bg is opqaue
+
+            //    }
+            //    ReleaseInvalidateGfxArgs(a);
+            //}
+            //else if (j < 3)
+            //{
+            //    for (int i = 0; i < j; ++i)
+            //    {
+            //        InvalidateGraphicsArgs a = _accumInvalidateQueue.Dequeue();
+            //        if (a.SrcRenderElement.BgIsNotOpaque)
+            //        {
+
+            //        }
+            //        else
+            //        {
+            //            switch (a.Reason)
+            //            {
+            //                case InvalidateReason.ViewportChanged:
+            //                    FlushPlanClearBG = false;
+            //                    SingleRenderE = a.SrcRenderElement;
+            //                    break;
+            //                case InvalidateReason.UpdateLocalArea:
+            //                    FlushPlanClearBG = false;
+            //                    SingleRenderE = a.SrcRenderElement;
+            //                    break;
+            //            }
+            //        }
+            //        ReleaseInvalidateGfxArgs(a);
+            //    }
+
+            //    _tmpInvalidatePlans.Clear();
+            //}
+            else
+            {
+                for (int i = 0; i < j; ++i)
+                {
                     InvalidateGraphicsArgs a = _accumInvalidateQueue.Dequeue();
-                    if (a.SrcRenderElement.BgIsNotOpaque)
-                    {
-
-                    }
-                    else
-                    {
-                        //is bg is opqaue
-                        FlushPlanClearBG = false;
-                        SingleRenderE = a.SrcRenderElement;
-                    }
+                    //if (a.SrcRenderElement.BgIsNotOpaque)
+                    //{
+
+                    //}
+                    //else
+                    //{
+                    //    switch (a.Reason)
+                    //    {
+                    //        case InvalidateReason.ViewportChanged:
+                    //            FlushPlanClearBG = false;
+                    //            SingleRenderE = a.SrcRenderElement;
+                    //            break;
+                    //        case InvalidateReason.UpdateLocalArea:
+                    //            FlushPlanClearBG = false;
+                    //            SingleRenderE = a.SrcRenderElement;
+                    //            break;
+                    //    }
+                    //}
                     ReleaseInvalidateGfxArgs(a);
-
-                }
-                else
-                {
-                    for (int i = 0; i < j; ++i)
-                    {
-                        InvalidateGraphicsArgs a = _accumInvalidateQueue.Dequeue();
-                        //_tmpInvalidatePlans.Add(a);
-                        //if (a.SrcRenderElement.BgIsNotOpaque)
-                        //{
-
-                        //}
-                        //else
-                        //{
-
-                        //}
-                        ReleaseInvalidateGfxArgs(a);
-                    }
-                    _tmpInvalidatePlans.Clear();
-                }
-            }
-
-            _canvasInvalidateDelegate(_accumulateInvalidRect);
+                }
+
+                _tmpInvalidatePlans.Clear();
+            }
+
+            _canvasInvalidateDelegate?.Invoke(_accumulateInvalidRect);
+
             _paintToOutputWindowHandler();
             _hasAccumRect = false;
             _hasRenderTreeInvalidateAccumRect = false;
@@ -268,8 +340,8 @@
         public bool HasViewportOffset { get; private set; }

-        Queue<InvalidateGraphicsArgs> _reusableInvalidateGfxs = new Queue<InvalidateGraphicsArgs>();
-        Queue<InvalidateGraphicsArgs> _accumInvalidateQueue = new Queue<InvalidateGraphicsArgs>();
+        readonly Queue<InvalidateGraphicsArgs> _reusableInvalidateGfxs = new Queue<InvalidateGraphicsArgs>();
+        readonly Queue<InvalidateGraphicsArgs> _accumInvalidateQueue = new Queue<InvalidateGraphicsArgs>();

         public InvalidateGraphicsArgs GetInvalidateGfxArgs()
         {


make sure a user does not see an error if they were properly authenticated by an external provider

--- src/auth/Controllers/AccountController.cs
+++ src/auth/Controllers/AccountController.cs
@@ -164,6 +164,12 @@
 					{
 						return Redirect(returnUrl);
 					}
+                    else
+                    {
+                        // we should have a valid redirect url, but if they login and we don't,
+                        // let them review there profile...
+                        return RedirectToAction(nameof(EditProfile));
+                    }
 				}
 				else
 				{


Allow all characters for password fields

Added the allow html attributes to allow all characters to be used
within the password field

--- src/SFA.DAS.EmployerUsers.Web/Models/RegisterViewModel.cs
+++ src/SFA.DAS.EmployerUsers.Web/Models/RegisterViewModel.cs
@@ -1,11 +1,16 @@
-namespace SFA.DAS.EmployerUsers.Web.Models
+using System.Web.Mvc;
+
+namespace SFA.DAS.EmployerUsers.Web.Models
 {
     public class RegisterViewModel :ViewModelBase
     {
         public string FirstName { get; set; }
         public string LastName { get; set; }
-        public string Email { get; set; }
-        public string Password { get; set; }
+
+        public string Email { get; set; }
+        [AllowHtml]
+        public string Password { get; set; }
+        [AllowHtml]
         public string ConfirmPassword { get; set; }
         public bool HasAcceptedTermsAndConditions { get; set; }


use in-memory store as default for sample.

--- src/Samples/QuickStart/QuickStart.BrokerServer/Program.cs
+++ src/Samples/QuickStart/QuickStart.BrokerServer/Program.cs
@@ -26,32 +26,13 @@

         static void InitializeEQueue()
         {
-            var connectionString = @"Data Source=(localdb)\Projects;Integrated Security=true;Initial Catalog=EQueue;Connect Timeout=30;Min Pool Size=10;Max Pool Size=100";
-            var queueStoreSetting = new SqlServerQueueStoreSetting
-            {
-                ConnectionString = connectionString
-            };
-            var messageStoreSetting = new SqlServerMessageStoreSetting
-            {
-                ConnectionString = connectionString,
-                DeleteMessageHourOfDay = -1,
-                DeleteMessageInterval = 1000 * 30
-            };
-            var offsetManagerSetting = new SqlServerOffsetManagerSetting
-            {
-                ConnectionString = connectionString
-            };
-
             Configuration
                 .Create()
                 .UseAutofac()
                 .RegisterCommonComponents()
                 .UseLog4Net()
                 .UseJsonNet()
-                .RegisterEQueueComponents()
-                .UseSqlServerQueueStore(queueStoreSetting)
-                .UseSqlServerMessageStore(messageStoreSetting)
-                .UseSqlServerOffsetManager(offsetManagerSetting);
+                .RegisterEQueueComponents();
         }
     }
 }


删除Senparc.Weixin.MP.AppStore.WeixinSex枚举，合并到Senparc.Weixin.Enums.WeixinSex

--- src/Senparc.Weixin.MP/Senparc.Weixin.MP/AppStore/Enums.cs
+++ src/Senparc.Weixin.MP/Senparc.Weixin.MP/AppStore/Enums.cs
@@ -53,13 +53,13 @@
         操作用户信息失败_用户不存在 = -5001,
     }

-    /// <summary>
-    /// 性别
-    /// </summary>
-    public enum WeixinSex
-    {
-        未设置 = 0,
-        男 = 1,
-        女 = 2,
-    }
+    ///// <summary>
+    ///// 性别
+    ///// </summary>
+    //public enum WeixinSex
+    //{
+    //    未设置 = 0,
+    //    男 = 1,
+    //    女 = 2,
+    //}
 }


fix(CommsHomepage): background color

fix(CommsHomepage): background color

--- src/StockportWebapp/Views/stockportgov/Comms/Index.cshtml
+++ src/StockportWebapp/Views/stockportgov/Comms/Index.cshtml
@@ -12,15 +12,16 @@
     <partial name="SemanticBreadcrumb" model='@crumbsList' />
 }

-

-
@Model.Title

-
@Model.LatestNewsHeader

-
@Model.TwitterFeedHeader

-
@Model.InstagramFeedTitle

-
@Model.FacebookFeedTitle

-

-

-
-
Useful links

-
What's on in Stockport

-
+

+

+
@Model.Title

+
@Model.LatestNewsHeader

+
@Model.TwitterFeedHeader

+
@Model.InstagramFeedTitle

+
@Model.FacebookFeedTitle

+

+

+
Useful links

+
What's on in Stockport

+

+


AppBar should only handle HardwareButtonBack if the AppBar  was open

--- AppBar/CustomAppBar/AppBar.cs
+++ AppBar/CustomAppBar/AppBar.cs
@@ -229,8 +229,11 @@
             _tapGrid.Tapped += ToggleAppBarButtonOnTap;
             HardwareButtons.BackPressed += (sender, args) =>
             {
-                args.Handled = true;
-                if (_isOpen) Hide();
+                if (_isOpen)
+                {
+                    args.Handled = true;
+                    Hide();
+                }
             };

             _homeAppBarButton.Loaded += (sender, args) =>


(XP3): fixed encrypted files packing.

(XP3): fixed encrypted files packing.

--- ArcFormats/KiriKiri/ArcXP3.cs
+++ ArcFormats/KiriKiri/ArcXP3.cs
@@ -533,7 +533,7 @@
                         Name            = name,
                         Cipher          = scheme,
                         IsEncrypted     = use_encryption
-                                       && !(scheme.StartupTjsNotEncrypted && name.EndsWith ("startup.tjs"))
+                                       && !(scheme.StartupTjsNotEncrypted && VFS.IsPathEqualsToFileName (name, "startup.tjs"))
                     };
                     bool compress = compress_contents && ShouldCompressFile (entry);
                     using (var file = File.Open (name, FileMode.Open, FileAccess.Read))
@@ -674,7 +674,6 @@
                         Size         = unpacked_size,
                         PackedSize   = unpacked_size,
                     };
-                    xp3entry.Segments.Add (segment);
                     if (compress)
                     {
                         output = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true);
@@ -715,6 +714,7 @@
                                 segment.PackedSize = (uint)(dest.Position - segment.Offset);
                                 xp3entry.Size = segment.PackedSize;
                             }
+                            xp3entry.Segments.Add (segment);
                         }
                     }
                 }


adb使用UTF8编码，从adb获取结果之后会讲GKB转码为utf8

adb使用UTF8编码，从adb获取结果之后会讲GKB转码为utf8

--- ArkController/Data/Command.cs
+++ ArkController/Data/Command.cs
@@ -29,6 +29,8 @@
             updateProcessInfo(cmd);
             p.Start();
             string outStr = p.StandardOutput.ReadToEnd();
+            Encoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(outStr));
+            outStr = Encoding.UTF8.GetString(Encoding.Default.GetBytes(outStr));
             p.Close();
             return outStr;
         }


Fixed Endian

Fixed Endian

Fixed endian problem with bits and added opcode parse.

--- Assets/DisassemblerControl.cs
+++ Assets/DisassemblerControl.cs
@@ -6,7 +6,6 @@
     using UnityEngine;
     using System.IO;
     using System;
-    using System.Text;

     public class DisassemblerControl : MonoBehaviour
     {
@@ -38,12 +37,23 @@
             Stream ms = new MemoryStream(binaryFile);
             using (BinaryReader br = new BinaryReader(ms))
             {
-                while (br.BaseStream.Position != br.BaseStream.Length)
+                bool readError = false;
+                while (br.BaseStream.Position != br.BaseStream.Length &&
+                    !readError)
                 {
                     // Read the source file into a byte array,
                     // 32 bits at a time (4 bytes = 1 word)
                     byte[] word = br.ReadBytes(4);
-                    disassemble(word);
+
+                    if (word.Length < 4)
+                    {
+                        Debug.Log("Error: byte[].length < 32 bits");
+                        readError = true;
+                    }
+                    else
+                    {
+                        disassemble(word);
+                    }
                 }
                 br.Close();
             }
@@ -55,59 +65,75 @@
         /// <param name="word"></param>
         private static void disassemble(byte[] word)
         {
-            if (word.Length < 4)
+            BitArray _word = createBitArr(word);
+            _binary.Add(toString(_word));
+            parse(_word);
+        }
+
+
+
+        private static void parse(BitArray word)
+        {
+            BitArray opcodeMask = new BitArray(6, true);
+            BitArray opcode = new BitArray(6);
+            for (int idx = 0; idx <= 5; idx++)
             {
-                Debug.Log("Error: byte[].length < 32 bits");
-                return;
+                opcode[5 - idx] = word[idx];
             }
-            _binary.Add(wordToStr(word));
-            parse(word);
+            Debug.Log(getIntFromBitArray(opcode.And(opcodeMask)));
         }

         /// <summary>
-        /// The word2Str method converts a byte array to its string representation.
+        /// Creates and returns a BitArray with the correct Endianess
         /// </summary>
-        /// <param name="word">A byte[] of lenth 4 (4 bytes = word)</param>
-        /// <returns>Returns a string representing the binary of the 32 bit word.</returns>
-        private static string wordToStr(byte[] word)
+        /// <param name="word">The byte array to be made into a BitArray</param>
+        /// <returns>A bit array with proper endianess</returns>
+        /// <remarks>This is a file specific call.</remarks>
+        private static BitArray createBitArr(byte[] word)
         {
-            if (word.Length < 4)
+            BitArray _tempBitArr = new BitArray(word);
+            bool[] _tempBool = new bool[_tempBitArr.Count];
+
+            for (int byteNum = 1; byteNum <= word.Length * 8; byteNum += 8)
+                for (int idx = 0; idx <= 7; idx++)
+                    _tempBool[idx + byteNum - 1] = _tempBitArr[(7 - idx) + byteNum - 1];
+
+            return new BitArray(_tempBool);
+        }
+
+
+        /// <summary>
+        /// Converts a BitArray to its bit string representation.
+        /// </summary>
+        /// <param name="bitArr">The BitArray to be converted</param>
+        /// <returns>Returns a string representing the BitArray.</returns>
+        private static string toString(BitArray bitArr)
+        {
+            string bitString = "";
+            foreach (bool bit in bitArr)
             {
-                Debug.Log("Error: byte[].length < 32 bits");
-                return "";
+                bitString += (bit) ? "1" : "0";
             }
-            string bitString = Convert.ToString(word[0], 2).PadLeft(8, '0') +
-                Convert.ToString(word[1], 2).PadLeft(8, '0') +
-                Convert.ToString(word[2], 2).PadLeft(8, '0') +
-                Convert.ToString(word[3], 2).PadLeft(8, '0') ;
             return bitString;
         }
-
-        private static void parse(byte[] word)
+
+        /// <summary>
+        /// Converts a byte array to its bit string representation.
+        /// </summary>
+        /// <param name="byteArr">The byte array to be converted</param>
+        /// <returns>Returns a string representing the byte array.</returns>
+        private static string toString(byte[] byteArr)
         {
-            BitArray bitArrWord = new BitArray(word);
-            BitArray opcodeMask = new BitArray(32);
-            for (int bit = 0; bit < 6; bit++)
+            string bitString = "";
+            for (int idx = 0; idx < byteArr.Length; idx++)
             {
-                opcodeMask[bit] = true;
+                bitString += Convert.ToString(byteArr[idx], 2).PadLeft(8, '0');
             }
-
-            Debug.Log(toString(opcodeMask));
-        }
-
-        public static string toString(BitArray bitArray)
-        {
-            string values = "";
-            foreach (bool bit in bitArray)
-            {
-                values += (bit == true) ? "1" : "0";
-            }
-            return values;
+            return bitString;
         }

         private static int getIntFromBitArray(BitArray bitArray)
         {
-
             if (bitArray.Length > 32)
                 throw new ArgumentException("Argument length shall be at most 32 bits.");


fixed respawn orientation

fixed respawn orientation

--- Assets/Scripts/Charac/Hero.cs
+++ Assets/Scripts/Charac/Hero.cs
@@ -257,6 +257,7 @@
          SavedCell savedCell = (SavedCell)_lastNewCell.GetComponent<SavedCell>();
          savedCell.resetCollisionState();
          gameObject.transform.position = _lastNewCell.transform.position;
+         gameObject.transform.rotation = _lastNewCell.transform.rotation;
       }

       _isAlive = true;


implemented draw screen

implemented draw screen

--- Assets/Scripts/GameManager.cs
+++ Assets/Scripts/GameManager.cs
@@ -69,10 +69,24 @@
     // Update is called once per frame
     void Update() {
         ToggleDeleteCardFieldVisibility();
+        if(players[0].Deck.Count == 0
+            && GameObject.Find("HandCard1blue").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard2blue").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard3blue").GetComponent<Handcards>().cardid == CardID.none) {
+
+        }
         if (animationDone == true) {
             RemovePlacedCardFromHand();
             animationDone = false;
             cardlocked = false;
+            if (lastSetCard == CardID.Deletecard
+            || lastSetCard == CardID.Burncard
+            || lastSetCard == CardID.Cancercard
+            || lastSetCard == CardID.Infernocard
+            || lastSetCard == CardID.Nukecard) {
+                RemoveUnconnectedCards();
+            }
+            RemoveCards();
             TogglePlayerScreen();
         }
     }
@@ -508,6 +522,19 @@

         //TODO Change Handcards
         //TODO Fade in Black Scene
+        if (players[0].Deck.Count == 0
+            && GameObject.Find("HandCard1blue").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard2blue").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard3blue").GetComponent<Handcards>().cardid == CardID.none) {
+            DrawScreen.enabled = true;
+            print("DRAW!");
+        }else if (players[1].Deck.Count == 0
+            && GameObject.Find("HandCard1red").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard2red").GetComponent<Handcards>().cardid == CardID.none
+            && GameObject.Find("HandCard3red").GetComponent<Handcards>().cardid == CardID.none) {
+            DrawScreen.enabled = true;
+            print("DRAW!");
+        }
         if (currentPlayer == Team.blue) {
             SideBarBlue.enabled = true;
             SideBarRed.enabled = false;
@@ -635,6 +662,9 @@
                 }
             }
         }
+        GameObject Startindicator = GameObject.Find(Slave.GetCardName(CardID.FieldIndicator, 0, 0));
+        Startindicator.GetComponent<Indicator>().indicatorState = IndicatorState.unreachable;
+
     }

     void ToggleDeleteCardFieldVisibility() {
@@ -741,7 +771,7 @@
                 GameObject Card = GameObject.Find(Slave.GetCardName(CardID.Card, x, y));
                 if (Card != null
                     && Card.GetComponent<Card>().visited == false) {
-                    RemoveCard(Card);
+                    CollectRemoveCard(Card);
                     DestroyImmediate(Card);
                 } else if (Card != null
                      && Card.GetComponent<Card>().visited == true) {
@@ -820,7 +850,7 @@
             return PointCardCounterBlue % 15;
         }
     }
-    public void RemoveCard(GameObject DeletedCard) {
+    public void CollectRemoveCard(GameObject DeletedCard) {
         if (DeletedCard == null || DeletedCard.GetComponent<Card>().cardid == CardID.Startpoint) return;
         for (int i = 0; i < Field.GetComponent<Field>().cardsOnField.Count; i++) {
             if (Field.GetComponent<Field>().cardsOnField[i].GetComponent<Card>().cardid == DeletedCard.GetComponent<Card>().cardid
@@ -861,6 +891,15 @@
         MyCard.y = DeletedCard.GetComponent<Card>().y;
         MyCard.lastevent = LastEvent.destroyed;
         CardsAffectedLastRound.Add(MyCard);
-        DestroyImmediate(DeletedCard);
+
+        CardsToDelete.Add(DeletedCard);
+    }
+
+    void RemoveCards() {
+        for(int i = 0; CardsToDelete.Count <i; i++) {
+            GameObject Card = CardsToDelete[0];
+            CardsToDelete.RemoveAt(0);
+            DestroyImmediate(Card);
+        }
     }
 }


Delete GameManager.cs

Delete GameManager.cs

--- Assets/Scripts/GameManager.cs
+++ Assets/Scripts/GameManager.cs
@@ -1,388 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-public class GameManager : MonoBehaviour {
-
-    public GameObject spaceshipPrefab;
-    public GameObject startingRockPrefab;
-    public GameObject saucerPrefab;
-    public GameObject shieldPowerupPrefab;
-    public GameObject bulletPowerupPrefab;
-    public GameObject shipControlPowerupPrefab;
-    public GameObject doubleShotPowerupPrefab;
-	public GameObject addLifePowerupPrefab;
-    public GameObject gameUI;
-    public GameObject mainUI;
-    public GameObject pauseMenuUI;
-    public GameObject gameOverUI;
-    public GameObject finalScoreText;
-    public GameObject scoreText;
-    public GameObject livesText;
-
-    public enum gameState { main, gamePaused, game, gameOver };
-    public gameState state;
-
-    public int playerLives = 3;
-    public int score = 0;
-    public int numStartingRocks = 2;
-
-    public float saucerSpawnRate = 5f;
-    public float powerupSpawnRate = 18f;
-
-    private GameObject player;
-    private GameObject powerupPrefab;
-
-    private Vector3 screenSW;
-    private Vector3 screenNE;
-    private Vector3 screenSE;
-    private Vector3 screenNW;
-
-    private Spaceship spaceship;
-
-    private int rockSpawnRadius = 4;
-    private int startingScore;
-    private int startingLives;
-
-    private bool isPaused;
-
-    // Use a script object for easier calling?
-
-	// Use this for initialization
-	void Start () {
-
-        mainUI.SetActive(false);
-        gameUI.SetActive(false);
-        gameOverUI.SetActive(false);
-
-        switch(state)
-        {
-            case gameState.main:
-                mainUI.SetActive(true);
-                break;
-
-            case gameState.game:
-                gameUI.SetActive(true);
-                break;
-
-            case gameState.gameOver:
-                gameOverUI.SetActive(true);
-                break;
-
-            case gameState.gamePaused:
-                pauseMenuUI.SetActive(true);
-                break;
-        }
-
-        startingScore = score;
-        startingLives = playerLives;
-        UpdateScore(0);
-        UpdateLives(0);
-	}
-
-	// Update is called once per frame
-	void Update () {
-
-        switch(state)
-        {
-            case gameState.main:
-
-                if(Input.GetKeyDown(KeyCode.Return))
-                {
-                    StartCoroutine(GameStart());
-                }
-
-                break;
-
-            case gameState.gamePaused:
-
-                GamePaused();
-
-                if(Input.GetKeyDown(KeyCode.Escape))
-                {
-                    state = gameState.game;
-                }
-                else if(Input.GetKeyDown(KeyCode.Q))
-                {
-                    Application.Quit();
-                }
-
-                break;
-
-            case gameState.gameOver:
-
-                if (Input.GetKeyDown(KeyCode.Return))
-                {
-                    GameObject[] rocksToDestroy = GameObject.FindGameObjectsWithTag("Rock");
-                    for(int i = 0; i < rocksToDestroy.Length; i++)
-                    {
-                        Destroy(rocksToDestroy[i]);
-                    }
-
-                    StartCoroutine(GameStart());
-                }
-                else if (Input.GetKeyDown(KeyCode.Escape))
-                {
-                    Application.Quit();
-                }
-
-                break;
-
-            case gameState.game:
-                {
-                    GameUnpaused();
-
-                    // Checking for player input on both axes. Value of 1 or -1 for each.
-                    float translation = Input.GetAxis("Vertical");
-                    float rotation = Input.GetAxis("Horizontal");
-
-                    // Switch to 0.1?
-                    if (rotation > 0.1) // When pushing the right arrow.
-                    {
-                        spaceship.TurnRight(rotation);
-                    }
-
-                    if (rotation < 0.1) // When pushing the left arrow.
-                    {
-                        spaceship.TurnLeft(rotation);
-                    }
-
-                    if (translation >= 0.5f) // When up arrow is pushed.
-                    {
-                        // This will actually just set the acceleration rate based on the input (1 or 0). Also sets the State in Mechanim.
-                        spaceship.Move(translation);
-                    }
-                    else if ((translation <= -0.5f) && spaceship.isShipControlActive)
-                    {
-                        spaceship.Move(translation);
-                    }
-                    else
-                    {
-                        // No movement keys being pressed calls the Idle() function.
-                        spaceship.Idle();
-                    }
-
-                    // If the player hits the spacebar shoot some lasers.
-                    if (Input.GetButton("Jump"))
-                        spaceship.ShootBullet();
-
-                    if (Input.GetKeyDown(KeyCode.LeftControl) || Input.GetKeyDown(KeyCode.RightControl))
-                    {
-                        spaceship.Warp();
-                    }
-
-                    if(Input.GetKeyDown(KeyCode.Escape))
-                    {
-                            state = gameState.gamePaused;
-                    }
-
-                    GameObject[] rocks = GameObject.FindGameObjectsWithTag("Rock");
-                    if (rocks.Length <= 0)
-                    {
-                        for (int i = 0; i < numStartingRocks; i++)
-                        {
-                            float rockPosX = rockSpawnRadius * Mathf.Cos(Random.Range(0, 360));
-                            float rockPosy = rockSpawnRadius * Mathf.Sin(Random.Range(0, 360));
-
-                            GameObject rockClone = Instantiate(startingRockPrefab, new Vector3(rockPosX, rockPosy, 0), Quaternion.identity) as GameObject;
-
-                            rockClone.GetComponent<Rock>().SetGameManager(this.gameObject);
-                        }
-                    }
-
-                    break;
-                }
-        }
-	}
-
-    public void ResetShip()
-    {
-        player.transform.localPosition = new Vector3(0, 0, 0);
-    }
-
-    public void UpdateScore(int scoreToAdd)
-    {
-        score += scoreToAdd;
-        scoreText.GetComponent<GUIText>().text = "Score: " + score;
-    }
-
-    public void UpdateLives(int livesLost)
-    {
-        playerLives -= livesLost;
-        livesText.GetComponent<GUIText>().text = "Lives: " + playerLives;
-
-        if(playerLives < 1)
-        {
-            StartCoroutine(GameEnd());
-
-        }
-    }
-
-    IEnumerator SaucerSpawn()
-    {
-        for(float timer = saucerSpawnRate; timer >= 0; timer -= Time.deltaTime)
-        {
-            yield return null;
-        }
-
-        int cornerSelection = Random.Range(0, 4);
-
-        Vector3 saucerSpawnPos = new Vector3(0,0,0);
-
-        if(cornerSelection == 0)
-        {
-            saucerSpawnPos = new Vector3(screenSW.x, screenSW.y, 0);
-        }
-        else if(cornerSelection == 1)
-        {
-            saucerSpawnPos = new Vector3(screenSE.x, screenSE.y, 0);
-        }
-        else if(cornerSelection == 2)
-        {
-            saucerSpawnPos = new Vector3(screenNE.x, screenNE.y, 0);
-        }
-        else if(cornerSelection == 3)
-        {
-            saucerSpawnPos = new Vector3(screenNW.x, screenNW.y, 0);
-        }
-
-        GameObject saucerClone = Instantiate(saucerPrefab, saucerSpawnPos, Quaternion.identity) as GameObject;
-        saucerClone.GetComponent<Saucer>().SetGameManager(this.gameObject);
-
-        if (cornerSelection == 0)
-        {
-            saucerClone.transform.Rotate(Vector3.back * Random.Range(0, 90));
-        }
-        else if (cornerSelection == 1)
-        {
-            saucerClone.transform.Rotate(Vector3.back * Random.Range(90, 180));
-        }
-        else if (cornerSelection == 2)
-        {
-            saucerClone.transform.Rotate(Vector3.back * Random.Range(180, 270));
-        }
-        else if (cornerSelection == 3)
-        {
-            saucerClone.transform.Rotate(Vector3.back * Random.Range(270, 360));
-        }
-
-        StartCoroutine(SaucerSpawn());
-    }
-
-    IEnumerator GameStart()
-    {
-        mainUI.SetActive(false);
-        gameUI.SetActive(true);
-        gameOverUI.SetActive(false);
-        pauseMenuUI.SetActive(false);
-        state = gameState.game;
-        UpdateLives (0);
-        player = Instantiate(spaceshipPrefab, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;
-        spaceship = player.GetComponent<Spaceship>();
-        spaceship.SetGameManager(this.gameObject);
-        for (int i = 0; i < numStartingRocks; i++)
-        {
-            float rockPosX = rockSpawnRadius * Mathf.Cos(Random.Range(0, 360));
-            float rockPosy = rockSpawnRadius * Mathf.Sin(Random.Range(0, 360));
-
-            GameObject rockClone = Instantiate(startingRockPrefab, new Vector3(rockPosX, rockPosy, 0), Quaternion.identity) as GameObject;
-
-            rockClone.GetComponent<Rock>().SetGameManager(this.gameObject);
-        }
-
-        // ScreenSE and ScreenNW are incorrectly named. Change in the future.
-        screenSW = Camera.main.ScreenToWorldPoint(new Vector3(0, 0, Camera.main.transform.localPosition.z));
-        screenNE = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, Camera.main.transform.localPosition.z));
-        screenSE = new Vector3(screenSW.x, screenNE.y, 0);
-        screenNW = new Vector3(screenNE.x, screenSW.y, 0);
-
-        StartCoroutine(SaucerSpawn());
-        StartCoroutine(PowerupSpawn());
-
-        yield return null;
-    }
-
-    IEnumerator GameEnd()
-    {
-        mainUI.SetActive(false);
-        gameUI.SetActive(false);
-        gameOverUI.SetActive(true);
-        pauseMenuUI.SetActive(false);
-        state = gameState.gameOver;
-
-        finalScoreText.GetComponent<GUIText>().text = "Final Score: " + score;
-
-        Destroy(player);
-        StopAllCoroutines();
-
-        score = startingScore;
-        playerLives = startingLives;
-
-        yield return null;
-    }
-
-    IEnumerator PowerupSpawn()
-    {
-        for (float timer = powerupSpawnRate; timer >= 0; timer -= Time.deltaTime)
-        {
-            yield return null;
-        }
-
-        float powerupPosX = Random.Range((screenSW.x + 2), (screenNE.x - 2));
-        float powerupPosY = Random.Range((screenSW.y + 2), (screenNE.y - 2));
-
-        int randomPowerUp = Random.Range(0, 5);
-
-        if(randomPowerUp == 0)
-        {
-            GameObject shieldPowerupClone = Instantiate(shieldPowerupPrefab, new Vector3(powerupPosX, powerupPosY, 0), Quaternion.identity) as GameObject;
-            shieldPowerupClone.GetComponent<Powerup>().SetGameManager(this.gameObject);
-        }
-
-        if (randomPowerUp == 1)
-        {
-            GameObject bulletPowerupClone = Instantiate(bulletPowerupPrefab, new Vector3(powerupPosX, powerupPosY, 0), Quaternion.identity) as GameObject;
-            bulletPowerupClone.GetComponent<Powerup>().SetGameManager(this.gameObject);
-        }
-
-        if (randomPowerUp == 2)
-        {
-            GameObject shipControlPowerupClone = Instantiate(shipControlPowerupPrefab, new Vector3(powerupPosX, powerupPosY, 0), Quaternion.identity) as GameObject;
-            shipControlPowerupClone.GetComponent<Powerup>().SetGameManager(this.gameObject);
-        }
-
-        if (randomPowerUp == 3)
-        {
-            GameObject doubleShotPowerupClone = Instantiate(doubleShotPowerupPrefab, new Vector3(powerupPosX, powerupPosY, 0), Quaternion.identity) as GameObject;
-            doubleShotPowerupClone.GetComponent<Powerup>().SetGameManager(this.gameObject);
-        }
-		if (randomPowerUp == 4)
-		{
-			GameObject addLifePowerupClone = Instantiate(addLifePowerupPrefab, new Vector3(powerupPosX, powerupPosY, 0), Quaternion.identity) as GameObject;
-			addLifePowerupClone.GetComponent<Powerup>().SetGameManager(this.gameObject);
-		}
-
-        StartCoroutine(PowerupSpawn());
-    }
-
-    void GamePaused()
-    {
-        mainUI.SetActive(false);
-        gameUI.SetActive(false);
-        gameOverUI.SetActive(false);
-        pauseMenuUI.SetActive(true);
-
-        Time.timeScale = 0;
-        Cursor.visible = true;
-    }
-
-    void GameUnpaused()
-    {
-        mainUI.SetActive(false);
-        gameUI.SetActive(true);
-        gameOverUI.SetActive(false);
-        pauseMenuUI.SetActive(false);
-
-        Time.timeScale = 1;
-        Cursor.visible = false;
-    }
-}


Fixed issue where the character lists weren't populating properly. The previous indexing method didn't work because the character arrays are pre-populated to a specified size and so the previous indexing method would just replace the last element in the arrays over and over again.

--- Assets/Scripts/GameManager.cs
+++ Assets/Scripts/GameManager.cs
@@ -167,7 +167,7 @@
 				GameObject character = (GameObject)GameObject.Instantiate(prefab);
 				GameObject spawn = City.GetRandom (City.houses);
 				character.transform.position = spawn.transform.position;
-				list[list.Length - 1] = character;
+				list[list.Length - count] = character;

 				count--;
 			}


Load levels with SceneManager instead of Application for Unity 5.3+

--- Assets/Tests/Load/LoadTest.cs
+++ Assets/Tests/Load/LoadTest.cs
@@ -30,6 +30,10 @@

 	public void LoadSceneButtonClicked(string sceneName) {
 		Debug.Log("Loading Scene " + sceneName);
+#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2
 		Application.LoadLevel(sceneName);
+#else
+		UnityEngine.SceneManagement.SceneManager.LoadScene(sceneName);
+#endif
 	}
 }


Make actions compatible with copy&pasting the keymapper settings

--- Automatron/AutomatronBlock.cs
+++ Automatron/AutomatronBlock.cs
@@ -263,7 +263,14 @@
     {
       LoadMapperValues(stream);

-      if (stream.HasKey("automatron-actions"))
+      // "bmt-" prefix is necessary to enable copying&pasting of actions, keys that don't have it are deleted upon copying
+      if (stream.HasKey("bmt-automatron-actions"))
+      {
+        DeserializeActions(stream.ReadString("bmt-automatron-actions"));
+      }
+      // Since earlier versions of the Automatron didn't use the prefix, also check for the presence of the key without
+      // in order to preserve backwards-compatibility
+      else if (stream.HasKey("automatron-actions"))
       {
         DeserializeActions(stream.ReadString("automatron-actions"));
       }
@@ -273,7 +280,7 @@
     {
       SaveMapperValues(stream);

-      stream.Write("automatron-actions", SerializeActions());
+      stream.Write("bmt-automatron-actions", SerializeActions());
     }

     protected virtual string SerializeActions()


added version binding in the about window.

--- AzureSearchTool/About.xaml.cs
+++ AzureSearchTool/About.xaml.cs
@@ -23,6 +23,7 @@
         public About()
         {
             InitializeComponent();
+            this.DataContext = this;
         }

         public string Version


Rename variables + pulling magical numbers into constants

--- BattleField/BaseGameEngine.cs
+++ BattleField/BaseGameEngine.cs
@@ -4,12 +4,15 @@
 {
     public class BaseGameEngine : IEngine
     {
+        private const int MinFieldSize = 1;
+        private const int MaxFieldSize = 10;
+
         private IGameField gameField;

         private IRenderer renderer;

         //to remove
-        private int n;
+        private int fieldSize;

         public BaseGameEngine(IRenderer renderer)
         {
@@ -19,14 +22,14 @@
         public void StartNewGame()
         {
             Console.Write("Welcome to \"Battle Field game.\" Enter battle field size: n = ");
-            n = Convert.ToInt32(Console.ReadLine());
-            while (n < 1 || n > 10)
+            fieldSize = Convert.ToInt32(Console.ReadLine());
+            while (fieldSize < MinFieldSize || fieldSize > MaxFieldSize)
             {
                 Console.WriteLine("Enter a number between 1 and 10!");
-                n = Convert.ToInt32(Console.ReadLine());
-            }
-
-            gameField = new BaseGameField(n, n + 2, (n * 2) + 2);
+                fieldSize = Convert.ToInt32(Console.ReadLine());
+            }
+
+            gameField = new BaseGameField(fieldSize, fieldSize + 2, (fieldSize * 2) + 2);

@@ -37,7 +40,7 @@
         {
             renderer.DrawGameField(gameField.Field, gameField.Rows, gameField.Cols);
             int countPlayed = 0;
-            VremeEIgrachaDaDeistva(n, gameField.Rows, gameField.Cols, gameField.Field, countPlayed);
+            VremeEIgrachaDaDeistva(fieldSize, gameField.Rows, gameField.Cols, gameField.Field, countPlayed);
         }


applied code settings

applied code settings

--- code/SimpleDemo/Simple/Simple.Infrastructure.Consumers/EventStoreHandlers/CreateCustomerConsumer.cs
+++ code/SimpleDemo/Simple/Simple.Infrastructure.Consumers/EventStoreHandlers/CreateCustomerConsumer.cs
@@ -20,7 +20,8 @@

         public async Task Consume(ConsumeContext<ICreateCustomerRequest> context)
         {
-            try {
+            try
+            {
                 var customer = Convert(context.Message);
                 _repository.Add(customer);

@@ -38,7 +39,8 @@
                     Message = "OK"
                 });
             }
-            catch (Exception exc) {
+            catch (Exception exc)
+            {
                 await context.RespondAsync(new CreateCustomerResponse
                 {
                     ResponseId = context.Message.Id,