Updated Impersonating property.

Updated Impersonating property.

--- NtApiDotNet/NtThread.cs
+++ NtApiDotNet/NtThread.cs
@@ -168,7 +168,7 @@
             long maximum_stack_size,
             IEnumerable<ProcessAttribute> attribute_list)
         {
-            return Create(object_attributes, desired_acccess, process, start_routine, argument, create_flags,
+            return Create(object_attributes, desired_acccess, process, start_routine, argument, create_flags,
                 zero_bits, stack_size, maximum_stack_size, attribute_list, true).Result;
         }

@@ -402,7 +402,7 @@
         /// <returns>The status code from the set.</returns>
         public static NtStatus SetWorkOnBehalfThread(WorkOnBehalfTicket ticket, bool throw_on_error)
         {
-            return Current.Set(ThreadInformationClass.ThreadWorkOnBehalfTicket, new RtlWorkOnBehalfTicket() { WorkOnBehalfTicket  = ticket.Ticket }, throw_on_error);
+            return Current.Set(ThreadInformationClass.ThreadWorkOnBehalfTicket, new RtlWorkOnBehalfTicket() { WorkOnBehalfTicket = ticket.Ticket }, throw_on_error);
         }

         /// <summary>
@@ -672,7 +672,7 @@
         /// <param name="security_quality_of_service">The impersonation security quality of service.</param>
         /// <param name="throw_on_error">True to throw on error.</param>
         /// <returns>The imperonsation context. Dispose to revert to self.</returns>
-        public NtResult<ThreadImpersonationContext> ImpersonateThread(NtThread thread,
+        public NtResult<ThreadImpersonationContext> ImpersonateThread(NtThread thread,
             SecurityQualityOfService security_quality_of_service, bool throw_on_error)
         {
             return NtSystemCalls.NtImpersonateThread(Handle, thread.Handle, security_quality_of_service)
@@ -689,7 +689,7 @@
         public NtResult<ThreadImpersonationContext> ImpersonateThread(NtThread thread,
             SecurityImpersonationLevel impersonation_level, bool throw_on_error)
         {
-            return ImpersonateThread(thread, new SecurityQualityOfService(impersonation_level,
+            return ImpersonateThread(thread, new SecurityQualityOfService(impersonation_level,
                 SecurityContextTrackingMode.Static, false), throw_on_error);
         }

@@ -772,7 +772,7 @@
         /// <remarks>This is only for APCs in the current process. You also must ensure the delegate is
         /// valid at all times as this method doesn't take a reference to the delegate to prevent it being
         /// garbage collected.</remarks>
-        public NtStatus QueueUserApc(ApcCallback apc_routine, IntPtr normal_context,
+        public NtStatus QueueUserApc(ApcCallback apc_routine, IntPtr normal_context,
             IntPtr system_argument1, IntPtr system_argument2, bool throw_on_error)
         {
             return QueueUserApc(Marshal.GetFunctionPointerForDelegate(apc_routine),
@@ -1152,6 +1152,27 @@
         /// </summary>
         public NtStatus ExitNtStatus => QueryBasicInformation().ExitStatus;

+        /// <summary>
+        /// Returns true if impersonating.
+        /// </summary>
+        public bool IsImpersonating
+        {
+            get
+            {
+                if (!GrantedAccess.HasFlagSet(ThreadAccessRights.QueryLimitedInformation))
+                {
+                    return false;
+                }
+
+                // This might be possible to read from the TEB IsImpersonating flag but not clear if it's
+                // ever officially documented.
+                using (var token = NtToken.OpenThreadToken(this, true, TokenAccessRights.Query, false))
+                {
+                    return token.Status != NtStatus.STATUS_NO_TOKEN;
+                }
+            }
+        }
+
         #endregion
     }
 }


Improved Tests

Improved Tests

Improved to fix tests failing occasionally due to error thrown when
cleaning up after end-to-end tests.

--- Easy.Logger.Tests.Unit/CreatingNewLog4NetServiceTests.cs
+++ Easy.Logger.Tests.Unit/CreatingNewLog4NetServiceTests.cs
@@ -26,7 +26,7 @@
             var outputMessages = new List<string>();
             using (var process = ProcessHelper.GetProcess(pathToSampleApp, outputMessages))
             {
-                process.WaitForExit(500);
+                process.WaitForExit(1000);

                 outputMessages.ShouldNotBeEmpty();
                 outputMessages.ShouldContain(s => s == "[Process Error] - Unhandled Exception: System.IO.FileNotFoundException: Could not find a valid log4net configuration file");


Fixed deployment delete action

Fixed deployment delete action

--- src/Galaxy/WebEnd/Views/Deployment/List.cshtml
+++ src/Galaxy/WebEnd/Views/Deployment/List.cshtml
@@ -1,4 +1,5 @@
-@using Codestellation.Galaxy.WebEnd
+@using Codestellation.Galaxy.ServiceManager
+@using Codestellation.Galaxy.WebEnd
 @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Codestellation.Galaxy.WebEnd.Models.DeploymentManangement.DeploymentListModel>
 @{ Layout = "Master";}

@@ -80,7 +81,7 @@
             $(this).bind('click', function () {
                 var button = $(this);
                 $.ajax({
-                    url: "/@DeploymentModule.Path/delete/" + button.val(),
+                    url: "/@DeploymentModule.Path/@DeploymentModule.TaskPath?task=@Templates.Delete&id=" + button.val(),
                     type: 'POST',
                 });
             });


refactored by SaveConfigKeyToFile

refactored by SaveConfigKeyToFile

--- wix/MinionConfigurationExtension/MinionConfiguration.cs
+++ wix/MinionConfigurationExtension/MinionConfiguration.cs
@@ -87,124 +87,57 @@
             //  Console.WriteLine(process.StandardOutput.ReadToEnd());
         }

+        [CustomAction]
+        public static ActionResult SetRootDir(Session session) {
+            return SaveConfigKeyToFile("MinionRoot", "root_dir", session);
+        }
+
+        [CustomAction]
+        public static ActionResult SetMaster(Session session) {
+            return SaveConfigKeyToFile("MasterHostname", "master", session);
+        }
+
+        [CustomAction]
+        public static ActionResult SetMinionId(Session session) {
+            return SaveConfigKeyToFile("MinionHostname", "id", session);
+        }
+
+        [CustomAction]
+        private static ActionResult SaveConfigKeyToFile(string CustomActionDataKey, string SaltKey, Session session) {
+            session.Message(InstallMessage.ActionStart, new Record("SetConfigKeyValue1 " + SaltKey, "SetConfigKeyValue2 " + SaltKey, "[1]"));
+            session.Message(InstallMessage.Progress, new Record(0, 5, 0, 0));
+            session.Log("Begin SaveConfigKeyToFile " + SaltKey);
+            string value22;
+            try {
+                value22 = session.CustomActionData[CustomActionDataKey];
+            } catch (Exception ex) { return False_after_ExceptionLog("Getting CustomActionData " + CustomActionDataKey, session, ex); }
+            session.Message(InstallMessage.Progress, new Record(2, 1));
+            ActionResult result = processConfigChange(session, "^" + SaltKey + ":", String.Format(SaltKey + ": {0}\n", value22));
+            session.Message(InstallMessage.Progress, new Record(2, 1));
+            session.Log("End SaveConfigKeyToFile " + SaltKey);
+            return result;
+        }

-        [CustomAction]
-        public static ActionResult SetRootDir(Session session)
-        {
-            session.Message(InstallMessage.ActionStart, new Record("SetRootDir", "Configuring minion root_dir setting", "[1]"));
-            session.Message(InstallMessage.Progress, new Record(0, 5, 0, 0));
-
-            session.Log("Begin SetRootDir");
-            string rootDir;
-
-            try
-            {
-                rootDir = session.CustomActionData["MinionRoot"];
-            }
-            catch (Exception ex)
-            {
-                // missing MINION_ROOT
-                session.Log("Exception: {0}", ex.Message.ToString());
-                session.Log(ex.StackTrace.ToString());
-                return ActionResult.Failure;
-            }
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            bool result = processConfigChange(session,rootDir,"^root_dir:",String.Format("root_dir: {0}\n",rootDir));
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            session.Log("End SetRootDir");
-            return result ? ActionResult.Success : ActionResult.Failure;
-        }
-
-        [CustomAction]
-        public static ActionResult SetMaster(Session session)
-        {
-            session.Message(InstallMessage.ActionStart, new Record("SetMaster", "Configuring minion master setting", "[1]"));
-            session.Message(InstallMessage.Progress, new Record(0, 5, 0, 0));
-
-            session.Log("Begin SetMaster");
-
-            string hostname;
-
-            try
-            {
-                hostname = session.CustomActionData["MasterHostname"];
-            }
-            catch (Exception ex)
-            {
-                // missing MASTER_HOSTNAME
-                session.Log("Exception: {0}", ex.Message.ToString());
-                session.Log(ex.StackTrace.ToString());
-                return ActionResult.Failure;
-            }
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            bool result = processConfigChange(session,session.CustomActionData["MinionRoot"],"^#*master:",String.Format("master: {0}\n",hostname));
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            session.Log("End SetMaster");
-            return result ? ActionResult.Success : ActionResult.Failure;
-        }
-
-        [CustomAction]
-        public static ActionResult SetMinionId(Session session)
-        {
-            session.Message(InstallMessage.ActionStart, new Record("SetMinionId", "Configuring minion id setting", "[1]"));
-            session.Message(InstallMessage.Progress, new Record(0, 5, 0, 0));
-
-            session.Log("Begin SetMinionId");
-
-            string hostname;
-
-            try
-            {
-                hostname = session.CustomActionData["MinionHostname"];
-            }
-            catch (Exception ex)
-            {
-                // missing MINION_HOSTNAME
-                session.Log("Exception: {0}", ex.Message.ToString());
-                session.Log(ex.StackTrace.ToString());
-                return ActionResult.Failure;
-            }
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            bool result = processConfigChange(session, session.CustomActionData["MinionRoot"], "^#*id:", String.Format("id: {0}\n", hostname));
-
-            session.Message(InstallMessage.Progress, new Record(2, 1));
-
-            session.Log("End SetMinionId");
-            return result ? ActionResult.Success : ActionResult.Failure;
-        }
-
-		private static bool False_after_ExceptionLog(Session session, Exception ex) {
-            session.Log("Exception: {0}", ex.Message.ToString());
-            session.Log(ex.StackTrace.ToString());
-            return false;
-        }
-
-        private static bool processConfigChange(Session session, string root, string pattern, string replacement) {
+        private static ActionResult processConfigChange(Session session, string pattern, string replacement) {
             string config;
             string[] configText;
+            string rootDir;
+            try {
+                rootDir = session.CustomActionData["MinionRoot"];
+            } catch (Exception ex) { return False_after_ExceptionLog("Getting CustomActionData MinionRoot", session, ex); }

             try {
-                config = root + "conf\\minion";
-            } catch (Exception ex) { return False_after_ExceptionLog(session, ex); }
+                config = rootDir + "conf\\minion";
+            } catch (Exception ex) { return False_after_ExceptionLog("Concatening config file name", session, ex); }

             session.Message(InstallMessage.Progress, new Record(2, 1));
             session.Log("Config file: {0}", config);

             try {
                 configText = File.ReadAllLines(config);
-            } catch (Exception ex) { return False_after_ExceptionLog(session, ex); }
+            } catch (Exception ex) { return False_after_ExceptionLog("Reading from file", session, ex); }

             session.Message(InstallMessage.Progress, new Record(2, 1));

@@ -215,15 +148,23 @@
                         session.Log("Set line: {0}", configText[i]);
                     }
                 }
-            } catch (Exception ex) { return False_after_ExceptionLog(session, ex); }
+            } catch (Exception ex) { return False_after_ExceptionLog("Looping Regexp", session, ex); }

             session.Message(InstallMessage.Progress, new Record(2, 1));

             try {
                 File.WriteAllLines(config, configText);
-            } catch (Exception ex) { return False_after_ExceptionLog(session, ex); }
+            } catch (Exception ex) { return False_after_ExceptionLog("Writing to file", session, ex); }

-            return true;
-        }
-    }
+            return ActionResult.Success;
+        }
+
+        private static ActionResult False_after_ExceptionLog(string description, Session session, Exception ex) {
+            session.Log(description);
+            session.Log("Exception: {0}", ex.Message.ToString());
+            session.Log(ex.StackTrace.ToString());
+            return ActionResult.Failure;
+        }
 }
+
+}


all tests done

all tests done

--- src/HelloEventStore.Domain/Aggregates/Order.cs
+++ src/HelloEventStore.Domain/Aggregates/Order.cs
@@ -1,5 +1,6 @@
 using System;
 using HelloEventStore.Domain.Events;
+using HelloEventStore.Domain.Exceptions;
 using HelloEventStore.Domain.Services;
 using HelloEventStore.Infrastructure;

@@ -9,13 +10,16 @@
     {
         private int _quantity;
         private Guid _productId;
+        private bool _delivered;

         public Order()
         {
             RegisterTransition<OrderCreated>(Apply);
+            RegisterTransition<OrderDelivered>(Apply);
         }

-        private Order(Guid id, Guid userId, Guid productId, int quantity) : this()
+        private Order(Guid id, Guid userId, Guid productId, int quantity)
+            : this()
         {
             RaiseEvent(new OrderCreated(id, userId, productId, quantity));
         }
@@ -25,6 +29,12 @@
             Id = @event.Id;
             _productId = @event.ProductId;
             _quantity = @event.Quantity;
+            _delivered = false;
+        }
+
+        private void Apply(OrderDelivered obj)
+        {
+            _delivered = true;
         }

         public static Order Create(Guid userId, Guid productId, int quantity)
@@ -39,6 +49,10 @@

         public void Cancel()
         {
+            if (_delivered)
+            {
+                throw new OrderStateException("Order " + Id + " is already delivered and can't be cancelled");
+            }
             RaiseEvent(new OrderCancelled(Id, _productId, _quantity));
         }
     }


#1607 Fixed problem with missed "Add value" button on scheduler time slot field type. (#1608)

Markup related to multiple values processing is added only when mass values are available for the field.

--- src/JoinRpg.Portal/Views/GameField/Edit.cshtml
+++ src/JoinRpg.Portal/Views/GameField/Edit.cshtml
@@ -168,79 +168,83 @@
     ;

-    @if (Model.SupportsMassAdding)
-    {
-

-          Добавить значение
-          <button class="btn btn-default" data-toggle="modal" data-target="#massAddValueModal">Добавить несколько значений</button>
+

+        Добавить значение
+        @if (Model.SupportsMassAdding)
+        {
+            <button class="btn btn-default" data-toggle="modal" data-target="#massAddValueModal">Добавить несколько значений</button>
+        }
+

+  <partial name="ValuesList" for="@Model.DropdownValues" />
+
+
+

+

+

+

+                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
+
Удалить значение?

+

+
+

+

+
+
Удалить значение «»?

+

+
Если значение использовалось хотя бы один раз, его можно будет восстановить

+

+
+

+                  <button id="bnStartDelete" type="button" class="btn btn-danger">Удалить</button>
+                  <button id="bnCancelDelete" type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
+

+

-    }
-    <partial name="ValuesList" for="@Model.DropdownValues" />
-}
-
-
-

-

-

-

-                <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
-
Удалить значение?

-

-
-

-

-
-
Удалить значение «»?

-

-
Если значение использовалось хотя бы один раз, его можно будет восстановить

-

-
-

-                <button id="bnStartDelete" type="button" class="btn btn-danger">Удалить</button>
-                <button id="bnCancelDelete" type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
-

-

-

-

-
-
-

-

-

-
Удаляем...

-

-

-

-
-
-

-

+

+
+
+

+

+

+
Удаляем...

+

+

+

+
+
+  @if (Model.SupportsMassAdding)
+  {
+

+

           <form asp-controller="GameField" asp-action="MassCreateValueVariants" asp-route-projectId="@Model.ProjectId" method="post">
-              @Html.HiddenFor(model => model.ProjectFieldId)
-

-                <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
-
Добавить значения

-

-
-

-

-

-

-                      <textarea type="text" required id="valuesToAdd" name="valuesToAdd" rows="4" class="form-control"></textarea>
-
Введите сюда значения, которые хотите добавить этому полю.
 Одна строчка — одно значение

-

+            @Html.HiddenFor(model => model.ProjectFieldId)
+

+              <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
+
Добавить значения

+

+
+

+

+

+

+                    <textarea type="text" required id="valuesToAdd" name="valuesToAdd" rows="4" class="form-control"></textarea>
+
Введите сюда значения, которые хотите добавить этому полю.
 Одна строчка — одно значение

-
-

-                <button type="submit" class="btn btn-success">Добавить</button>
-                <button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
-
-

-            </form>
+

+
+

+              <button type="submit" class="btn btn-success">Добавить</button>
+              <button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
+
+

+          </form>

-

-

+

+

+  }
+}
+


Case block added for the missing HTTP client error status codes in ClientError.Throw()

--- src/Juhta.Net.WebApi.Exceptions/ClientError.cs
+++ src/Juhta.Net.WebApi.Exceptions/ClientError.cs
@@ -29,6 +29,60 @@
                 case (int)HttpStatusCode.BadRequest:
                     throw new BadRequestException(this);

+                case (int)HttpStatusCode.Conflict:
+                    throw new ConflictException(this);
+
+                case (int)HttpStatusCode.ExpectationFailed:
+                    throw new ExpectationFailedException(this);
+
+                case (int)HttpStatusCode.Forbidden:
+                    throw new ForbiddenException(this);
+
+                case (int)HttpStatusCode.Gone:
+                    throw new GoneException(this);
+
+                case (int)HttpStatusCode.LengthRequired:
+                    throw new LengthRequiredException(this);
+
+                case (int)HttpStatusCode.MethodNotAllowed:
+                    throw new MethodNotAllowedException(this);
+
+                case (int)HttpStatusCode.NotAcceptable:
+                    throw new NotAcceptableException(this);
+
+                case (int)HttpStatusCode.NotFound:
+                    throw new NotFoundException(this);
+
+                case (int)HttpStatusCode.PaymentRequired:
+                    throw new PaymentRequiredException(this);
+
+                case (int)HttpStatusCode.PreconditionFailed:
+                    throw new PreconditionFailedException(this);
+
+                case (int)HttpStatusCode.ProxyAuthenticationRequired:
+                    throw new ProxyAuthenticationRequiredException(this);
+
+                case (int)HttpStatusCode.RequestedRangeNotSatisfiable:
+                    throw new RequestedRangeNotSatisfiableException(this);
+
+                case (int)HttpStatusCode.RequestEntityTooLarge:
+                    throw new RequestEntityTooLargeException(this);
+
+                case (int)HttpStatusCode.RequestTimeout:
+                    throw new RequestTimeoutException(this);
+
+                case (int)HttpStatusCode.RequestUriTooLong:
+                    throw new RequestUriTooLongException(this);
+
+                case (int)HttpStatusCode.Unauthorized:
+                    throw new UnauthorizedException(this);
+
+                case (int)HttpStatusCode.UnsupportedMediaType:
+                    throw new UnsupportedMediaTypeException(this);
+
+                case (int)HttpStatusCode.UpgradeRequired:
+                    throw new UpgradeRequiredException(this);
+
                 default:
                     throw new BlockNotImplementedException(this.StatusCode);
             }


AsyncLock tweaks

AsyncLock tweaks

--- src/Kirkin.Experimental/Threading/AsyncLock.cs
+++ src/Kirkin.Experimental/Threading/AsyncLock.cs
@@ -4,18 +4,23 @@

 namespace Kirkin.Threading
 {
+    /// <summary>
+    /// Fast non-cancelable async lock.
+    /// </summary>
     public sealed class AsyncLock
     {
         private TaskCompletionSource<bool> _tcs;

+        /// <summary>
+        /// Enters the lock asynchronously and returns an <see cref="IDisposable"/>
+        /// object which releases the lock when disposed.
+        /// </summary>
         public async Task<AsyncLockReleaser> EnterAsync()
         {
             TaskCompletionSource<bool> newTcs = new TaskCompletionSource<bool>();
             TaskCompletionSource<bool> oldTcs = Interlocked.Exchange(ref _tcs, newTcs);

-            if (oldTcs != null)
-            {
-                // TODO: async completion?
+            if (oldTcs != null) {
                 await oldTcs.Task.ConfigureAwait(false);
             }

@@ -23,7 +28,10 @@
         }
     }

-    public struct AsyncLockReleaser : IDisposable
+    /// <summary>
+    /// <see cref="AsyncLock"/> releaser structure.
+    /// </summary>
+    public sealed class AsyncLockReleaser : IDisposable
     {
         private readonly TaskCompletionSource<bool> _tcs;

@@ -32,6 +40,9 @@
             _tcs = tcs;
         }

+        /// <summary>
+        /// Releases the <see cref="AsyncLock"/>.
+        /// </summary>
         public void Dispose()
         {
             _tcs.TrySetResult(true);


Fixed reason code duplication for authorizations

--- src/Lime.Protocol/Lime.Protocol/ReasonCodes.cs
+++ src/Lime.Protocol/Lime.Protocol/ReasonCodes.cs
@@ -82,7 +82,7 @@
         /// The destination doesn't have an active
         /// account
         /// </summary>
-        public const int AUTHORIZATION_DESTINATION_ACCOUNT_NOT_FOUND = 32;
+        public const int AUTHORIZATION_DESTINATION_ACCOUNT_NOT_FOUND = 33;
         /// <summary>
         /// General routing error
         /// </summary>


BoblinWorld.cs constructor

BoblinWorld.cs constructor

--- GlobalGameJam/GlobalGameJam/GlobalGameJam/BoblinWorld.cs
+++ GlobalGameJam/GlobalGameJam/GlobalGameJam/BoblinWorld.cs
@@ -1,4 +1,5 @@
 using GameLibrary;
+using Microsoft.Xna.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -9,7 +10,11 @@
     class BoblinWorld : World
     {
         #region Constructors
+        public BoblinWorld(Game game)
+            : base(game, Vector2.Zero)
+        {

+        }
         #endregion

         #region Initialization


Fixing broken Model.

Fixing broken Model.

--- GoogleCloudExtension/GoogleCloudExtension.Utils/Model.cs
+++ GoogleCloudExtension/GoogleCloudExtension.Utils/Model.cs
@@ -35,7 +35,7 @@
         /// that all properties in the object changed.</param>
         protected void RaisePropertyChanged(string propertyName)
         {
-            PropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
     }
 }


Added null test for File STream.

Added null test for File STream.

--- Naos.Database.Protocol.FileSystem.Test/FileStreamTest.cs
+++ Naos.Database.Protocol.FileSystem.Test/FileStreamTest.cs
@@ -433,9 +433,9 @@
         }

         [Fact]
-        public static void GetAllRecordsAndMetadataByIdTest()
-        {
-            var streamName = "FS_GetAllRecordsAndMetadataByIdTest";
+        public static void NullIdentifierAndValueTest()
+        {
+            var streamName = "FS_NullIdentifierAndValueTest";

             var testingFilePath = Path.Combine(Path.GetTempPath(), "Naos");
             var fileSystemLocator = new FileSystemDatabaseLocator(testingFilePath);
@@ -460,6 +460,51 @@

             stream.Execute(new CreateStreamOp(stream.StreamRepresentation, ExistingStreamEncounteredStrategy.Throw));

+            stream.PutWithId((string)null, (MyObject)null);
+            var result = stream.GetLatestObjectById<string, MyObject>(null);
+            result.MustForTest().BeNull();
+
+            var concern = "NullTesting";
+            var record = stream.Execute(new TryHandleRecordOp(concern));
+            record.MustForTest().NotBeNull();
+            record.Payload.SerializedPayload.MustForTest().BeEqualTo("null");
+
+            stream.Execute(new CompleteRunningHandleRecordExecutionOp(record.InternalRecordId, concern));
+
+            var recordAgain = stream.Execute(new TryHandleRecordOp(concern));
+            recordAgain.MustForTest().BeNull();
+
+            stream.Execute(new DeleteStreamOp(stream.StreamRepresentation, ExistingStreamNotEncounteredStrategy.Throw));
+        }
+
+        [Fact]
+        public static void GetAllRecordsAndMetadataByIdTest()
+        {
+            var streamName = "FS_GetAllRecordsAndMetadataByIdTest";
+
+            var testingFilePath = Path.Combine(Path.GetTempPath(), "Naos");
+            var fileSystemLocator = new FileSystemDatabaseLocator(testingFilePath);
+            var resourceLocatorProtocol = new SingleResourceLocatorProtocol(fileSystemLocator);
+
+            var configurationTypeRepresentation =
+                typeof(DependencyOnlyJsonSerializationConfiguration<
+                    TypesToRegisterJsonSerializationConfiguration<MyObject>,
+                    DatabaseJsonSerializationConfiguration>).ToRepresentation();
+
+            SerializerRepresentation defaultSerializerRepresentation = new SerializerRepresentation(
+                SerializationKind.Json,
+                configurationTypeRepresentation);
+
+            var defaultSerializationFormat = SerializationFormat.String;
+            var stream = new FileReadWriteStream(
+                streamName,
+                defaultSerializerRepresentation,
+                defaultSerializationFormat,
+                new JsonSerializerFactory(),
+                resourceLocatorProtocol);
+
+            stream.Execute(new CreateStreamOp(stream.StreamRepresentation, ExistingStreamEncounteredStrategy.Throw));
+
             var count = 5;

             var allRecordsFirst = stream.GetAllRecordsById(1L);


NG-30 Stash List

NG-30 Stash List

--- NppKate/Modules/TortoiseGitFeatures/TortoiseGitHelper.cs
+++ NppKate/Modules/TortoiseGitFeatures/TortoiseGitHelper.cs
@@ -569,6 +569,15 @@
             }
         }

+        private static void TGitStashList()
+        {
+            if (CheckRepoAndShowError())
+            {
+                string path = GitCore.GitCore.Instance.ActiveRepository.Path;
+                StartCommand(CreateCommand(TortoiseGitCommand.RefLog, path, additionalParam: @"/ref:refs/stash"));
+            }
+        }
+
         private static void ReadmeFunc()
         {
             const string text = "Не установлен TortoiseGit или не найдена папка с установленной программой!";
@@ -628,7 +637,7 @@
                     _icons.Add(cmdId, Properties.Resources.pull);

                 /**********************************************************************************/
-                _manager.RegisteCommandItem(new CommandItem { Name = "-", Hint = "-", Action = null });
+            _manager.RegisteCommandItem(new CommandItem { Name = "-", Hint = "-", Action = null });

                 _manager.RegisteCommandItem(new CommandItem
                 {
@@ -779,6 +788,14 @@
                     Action = TGitStashApply
                 });

+                _manager.RegisteCommandItem(new CommandItem
+                {
+                    Name = "TGit Stash list",
+                    Hint = "Stash list",
+                    ShortcutKey = null,
+                    Action = TGitStashList
+                });
+
                 /**********************************************************************************/
                 _manager.RegisteCommandItem(new CommandItem { Name = "-", Hint = "-", Action = null });


Enabled shape view for AdvancedDemo5 (breakable bodies) - Temp hack


Rethrow exceptions in exporter tests

Rethrow exceptions in exporter tests

--- Source/HelixToolkit.Wpf.Tests/Exporters/ExporterTests.cs
+++ Source/HelixToolkit.Wpf.Tests/Exporters/ExporterTests.cs
@@ -30,6 +30,7 @@
         /// <param name="stream">The stream.</param>
         protected void ExportSimpleModel(IExporter e, Stream stream)
         {
+            Exception exception = null;
             CrossThreadTestRunner.RunInSTA(
                 () =>
                 {
@@ -38,9 +39,20 @@
                     var box = new BoxVisual3D();
                     box.UpdateModel();
                     vp.Children.Add(box);
+                    try
+                    {
+                        e.Export(vp, stream);
+                    }
+                    catch (Exception ex)
+                    {
+                        exception = ex;
+                    }
+                });

-                    e.Export(vp, stream);
-                });
+            if (exception != null)
+            {
+                throw exception;
+            }
         }

         /// <summary>
@@ -51,14 +63,27 @@
         /// <param name="visual">The visual to export.</param>
         protected void ExportModel(IExporter e, Stream stream, Func<Visual3D> visual)
         {
+            Exception exception = null;
             CrossThreadTestRunner.RunInSTA(
                 () =>
                 {
                     var vp = new Viewport3D { Camera = CameraHelper.CreateDefaultCamera(), Width = 1280, Height = 720 };
                     vp.Children.Add(new DefaultLights());
                     vp.Children.Add(visual());
-                    e.Export(vp, stream);
+                    try
+                    {
+                        e.Export(vp, stream);
+                    }
+                    catch (Exception ex)
+                    {
+                        exception = ex;
+                    }
                 });
+
+            if (exception != null)
+            {
+                throw exception;
+            }
         }

         /// <summary>


Provide generic helpers for the querySelector methods

--- AngleSharp/ApiExtensions.cs
+++ AngleSharp/ApiExtensions.cs
@@ -91,6 +91,34 @@
         }

         /// <summary>
+        /// Returns the first element matching the selectors with the provided
+        /// type, or null.
+        /// </summary>
+        /// <typeparam name="TElement"></typeparam>
+        /// <param name="parent">The parent of the nodes to gather.</param>
+        /// <param name="selectors">The group of selectors to use.</param>
+        /// <returns>The element, if there is any.</returns>
+        public static TElement QuerySelector<TElement>(this IParentNode parent, String selectors)
+            where TElement : class, IElement
+        {
+            return parent.QuerySelector(selectors) as TElement;
+        }
+
+        /// <summary>
+        /// Returns a list of elements matching the selectors with the
+        /// provided type.
+        /// </summary>
+        /// <typeparam name="TElement"></typeparam>
+        /// <param name="parent">The parent of the nodes to gather.</param>
+        /// <param name="selectors">The group of selectors to use.</param>
+        /// <returns>An enumeration with the elements.</returns>
+        public static IEnumerable<TElement> QuerySelectorAll<TElement>(this IParentNode parent, String selectors)
+            where TElement : IElement
+        {
+            return parent.QuerySelectorAll(selectors).OfType<TElement>();
+        }
+
+        /// <summary>
         /// Gets the descendent nodes of the given parent.
         /// </summary>
         /// <typeparam name="TNode">The type of nodes to obtain.</typeparam>


Update FullNameCreator so we can opt out on printing assembly name

--- src/DotNet/FullNameCreator.cs
+++ src/DotNet/FullNameCreator.cs
@@ -3,13 +3,72 @@
 using dot10.DotNet.MD;

 namespace dot10.DotNet {
-	struct FullNameCreator {
+	/// <summary>
+	/// Helps <see cref="FullNameCreator"/> create a name
+	/// </summary>
+	public interface IFullNameCreatorHelper {
+		/// <summary>
+		/// Checks whether the assembly name should be included when printing
+		/// the full type name. The assembly name isn't required in custom attributes
+		/// when the type already exists in the same module as the CA, or if the type
+		/// exists in mscorlib.
+		/// </summary>
+		/// <param name="type">The type (<c>TypeDef</c>, <c>TypeRef</c> or <c>ExportedType</c>)
+		/// or <c>null</c></param>
+		/// <returns><c>true</c> if the assembly name must be included, <c>false</c> otherwise</returns>
+		bool NeedAssemblyName(IType type);
+	}
+
+	/// <summary>
+	/// Creates type names, method names, etc.
+	/// </summary>
+	public struct FullNameCreator {
 		const string RECURSION_ERROR_RESULT_STRING = "<<<INFRECURSION>>>";
 		const string NULLVALUE = "<<<NULL>>>";
 		StringBuilder sb;
 		bool isReflection;
+		IFullNameCreatorHelper helper;
 		GenericArguments genericArguments;
 		RecursionCounter recursionCounter;
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="IType"/>
+		/// </summary>
+		/// <param name="type">The <c>IType</c></param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(IType type) {
+			return AssemblyQualifiedName(type, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="IType"/>
+		/// </summary>
+		/// <param name="type">The <c>IType</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(IType type, IFullNameCreatorHelper helper) {
+			var td = type as TypeDef;
+			if (td != null)
+				return AssemblyQualifiedName(td, helper);
+
+			var tr = type as TypeRef;
+			if (tr != null)
+				return AssemblyQualifiedName(tr, helper);
+
+			var ts = type as TypeSpec;
+			if (ts != null)
+				return AssemblyQualifiedName(ts, helper);
+
+			var sig = type as TypeSig;
+			if (sig != null)
+				return AssemblyQualifiedName(sig, helper);
+
+			var et = type as ExportedType;
+			if (et != null)
+				return AssemblyQualifiedName(et, helper);
+
+			return string.Empty;
+		}

 		/// <summary>
 		/// Returns the full name of a property
@@ -31,7 +90,7 @@
 		/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
 		/// <returns>Property full name</returns>
 		public static string PropertyFullName(string declaringType, UTF8String name, CallingConventionSig propertySig, IList<TypeSig> typeGenArgs) {
-			var fnc = new FullNameCreator(false);
+			var fnc = new FullNameCreator(false, null);
 			if (typeGenArgs != null) {
 				if (fnc.genericArguments == null)
 					fnc.genericArguments = new GenericArguments();
@@ -62,7 +121,7 @@
 		/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
 		/// <returns>Property full name</returns>
 		public static string EventFullName(string declaringType, UTF8String name, ITypeDefOrRef typeDefOrRef, IList<TypeSig> typeGenArgs) {
-			var fnc = new FullNameCreator(false);
+			var fnc = new FullNameCreator(false, null);
 			if (typeGenArgs != null) {
 				if (fnc.genericArguments == null)
 					fnc.genericArguments = new GenericArguments();
@@ -116,7 +175,7 @@
 		/// <param name="typeGenArgs">Type generic arguments or <c>null</c> if none</param>
 		/// <returns>Field full name</returns>
 		public static string FieldFullName(string declaringType, string name, FieldSig fieldSig, IList<TypeSig> typeGenArgs) {
-			var fnc = new FullNameCreator(false);
+			var fnc = new FullNameCreator(false, null);
 			if (typeGenArgs != null) {
 				if (fnc.genericArguments == null)
 					fnc.genericArguments = new GenericArguments();
@@ -196,7 +255,7 @@
 		/// <param name="methodGenArgs">Method generic arguments or <c>null</c> if none</param>
 		/// <returns>Method full name</returns>
 		public static string MethodFullName(string declaringType, string name, MethodSig methodSig, IList<TypeSig> typeGenArgs, IList<TypeSig> methodGenArgs) {
-			var fnc = new FullNameCreator(false);
+			var fnc = new FullNameCreator(false, null);
 			if ((typeGenArgs != null || methodGenArgs != null) && fnc.genericArguments == null)
 				fnc.genericArguments = new GenericArguments();
 			if (typeGenArgs != null)
@@ -214,7 +273,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The namespace</returns>
 		public static string Namespace(TypeRef typeRef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateNamespace(typeRef);
 			return fnc.Result;
 		}
@@ -226,7 +285,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The name</returns>
 		public static string Name(TypeRef typeRef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateName(typeRef);
 			return fnc.Result;
 		}
@@ -238,7 +297,18 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The full name</returns>
 		public static string FullName(TypeRef typeRef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			return FullName(typeRef, isReflection, null);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="TypeRef"/>
+		/// </summary>
+		/// <param name="typeRef">The <c>TypeRef</c></param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The full name</returns>
+		public static string FullName(TypeRef typeRef, bool isReflection, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(isReflection, helper);
 			fnc.CreateFullName(typeRef);
 			return fnc.Result;
 		}
@@ -249,7 +319,17 @@
 		/// <param name="typeRef">The <c>TypeRef</c></param>
 		/// <returns>The assembly qualified full name</returns>
 		public static string AssemblyQualifiedName(TypeRef typeRef) {
-			var fnc = new FullNameCreator(true);
+			return AssemblyQualifiedName(typeRef, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="TypeRef"/>
+		/// </summary>
+		/// <param name="typeRef">The <c>TypeRef</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(TypeRef typeRef, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(true, helper);
 			fnc.CreateAssemblyQualifiedName(typeRef);
 			return fnc.Result;
 		}
@@ -279,7 +359,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The namespace</returns>
 		public static string Namespace(TypeDef typeDef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateNamespace(typeDef);
 			return fnc.Result;
 		}
@@ -291,7 +371,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The name</returns>
 		public static string Name(TypeDef typeDef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateName(typeDef);
 			return fnc.Result;
 		}
@@ -303,7 +383,18 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The full name</returns>
 		public static string FullName(TypeDef typeDef, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			return FullName(typeDef, isReflection, null);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="TypeDef"/>
+		/// </summary>
+		/// <param name="typeDef">The <c>TypeDef</c></param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The full name</returns>
+		public static string FullName(TypeDef typeDef, bool isReflection, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(isReflection, helper);
 			fnc.CreateFullName(typeDef);
 			return fnc.Result;
 		}
@@ -314,7 +405,17 @@
 		/// <param name="typeDef">The <c>TypeDef</c></param>
 		/// <returns>The assembly qualified full name</returns>
 		public static string AssemblyQualifiedName(TypeDef typeDef) {
-			var fnc = new FullNameCreator(true);
+			return AssemblyQualifiedName(typeDef, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="TypeDef"/>
+		/// </summary>
+		/// <param name="typeDef">The <c>TypeDef</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(TypeDef typeDef, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(true, helper);
 			fnc.CreateAssemblyQualifiedName(typeDef);
 			return fnc.Result;
 		}
@@ -344,7 +445,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The namespace</returns>
 		public static string Namespace(TypeSpec typeSpec, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateNamespace(typeSpec);
 			return fnc.Result;
 		}
@@ -356,7 +457,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The name</returns>
 		public static string Name(TypeSpec typeSpec, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateName(typeSpec);
 			return fnc.Result;
 		}
@@ -368,7 +469,18 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The full name</returns>
 		public static string FullName(TypeSpec typeSpec, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			return FullName(typeSpec, isReflection, null);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="TypeSpec"/>
+		/// </summary>
+		/// <param name="typeSpec">The <c>TypeSpec</c></param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The full name</returns>
+		public static string FullName(TypeSpec typeSpec, bool isReflection, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(isReflection, helper);
 			fnc.CreateFullName(typeSpec);
 			return fnc.Result;
 		}
@@ -379,7 +491,17 @@
 		/// <param name="typeSpec">The <c>TypeSpec</c></param>
 		/// <returns>The assembly qualified full name</returns>
 		public static string AssemblyQualifiedName(TypeSpec typeSpec) {
-			var fnc = new FullNameCreator(true);
+			return AssemblyQualifiedName(typeSpec, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="TypeSpec"/>
+		/// </summary>
+		/// <param name="typeSpec">The <c>TypeSpec</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(TypeSpec typeSpec, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(true, helper);
 			fnc.CreateAssemblyQualifiedName(typeSpec);
 			return fnc.Result;
 		}
@@ -409,7 +531,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The namespace</returns>
 		public static string Namespace(TypeSig typeSig, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateNamespace(typeSig);
 			return fnc.Result;
 		}
@@ -421,7 +543,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The name</returns>
 		public static string Name(TypeSig typeSig, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateName(typeSig);
 			return fnc.Result;
 		}
@@ -433,7 +555,18 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The full name</returns>
 		public static string FullName(TypeSig typeSig, bool isReflection) {
-			return FullName(typeSig, isReflection, null, null);
+			return FullName(typeSig, isReflection, null, null, null);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="TypeSig"/>
+		/// </summary>
+		/// <param name="typeSig">The type sig</param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The full name</returns>
+		public static string FullName(TypeSig typeSig, bool isReflection, IFullNameCreatorHelper helper) {
+			return FullName(typeSig, isReflection, helper, null, null);
 		}

 		/// <summary>
@@ -445,7 +578,20 @@
 		/// <param name="methodGenArgs">Method generic args or <c>null</c> if none</param>
 		/// <returns>The full name</returns>
 		public static string FullName(TypeSig typeSig, bool isReflection, IList<TypeSig> typeGenArgs, IList<TypeSig> methodGenArgs) {
-			var fnc = new FullNameCreator(isReflection);
+			return FullName(typeSig, isReflection, null, typeGenArgs, methodGenArgs);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="TypeSig"/>
+		/// </summary>
+		/// <param name="typeSig">The type sig</param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <param name="typeGenArgs">Type generic args or <c>null</c> if none</param>
+		/// <param name="methodGenArgs">Method generic args or <c>null</c> if none</param>
+		/// <returns>The full name</returns>
+		public static string FullName(TypeSig typeSig, bool isReflection, IFullNameCreatorHelper helper, IList<TypeSig> typeGenArgs, IList<TypeSig> methodGenArgs) {
+			var fnc = new FullNameCreator(isReflection, helper);
 			if (fnc.genericArguments == null && (typeGenArgs != null || methodGenArgs != null))
 				fnc.genericArguments = new GenericArguments();
 			if (typeGenArgs != null)
@@ -462,7 +608,17 @@
 		/// <param name="typeSig">The <c>TypeSig</c></param>
 		/// <returns>The assembly qualified full name</returns>
 		public static string AssemblyQualifiedName(TypeSig typeSig) {
-			var fnc = new FullNameCreator(true);
+			return AssemblyQualifiedName(typeSig, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="TypeSig"/>
+		/// </summary>
+		/// <param name="typeSig">The <c>TypeSig</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(TypeSig typeSig, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(true, helper);
 			fnc.CreateAssemblyQualifiedName(typeSig);
 			return fnc.Result;
 		}
@@ -492,7 +648,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The namespace</returns>
 		public static string Namespace(ExportedType exportedType, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateNamespace(exportedType);
 			return fnc.Result;
 		}
@@ -504,7 +660,7 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The name</returns>
 		public static string Name(ExportedType exportedType, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			var fnc = new FullNameCreator(isReflection, null);
 			fnc.CreateName(exportedType);
 			return fnc.Result;
 		}
@@ -516,7 +672,18 @@
 		/// <param name="isReflection">Set if output should be compatible with reflection</param>
 		/// <returns>The full name</returns>
 		public static string FullName(ExportedType exportedType, bool isReflection) {
-			var fnc = new FullNameCreator(isReflection);
+			return FullName(exportedType, isReflection, null);
+		}
+
+		/// <summary>
+		/// Returns the full name of a <see cref="ExportedType"/>
+		/// </summary>
+		/// <param name="exportedType">The <c>ExportedType</c></param>
+		/// <param name="isReflection">Set if output should be compatible with reflection</param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The full name</returns>
+		public static string FullName(ExportedType exportedType, bool isReflection, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(isReflection, helper);
 			fnc.CreateFullName(exportedType);
 			return fnc.Result;
 		}
@@ -527,7 +694,17 @@
 		/// <param name="exportedType">The <c>ExportedType</c></param>
 		/// <returns>The assembly qualified full name</returns>
 		public static string AssemblyQualifiedName(ExportedType exportedType) {
-			var fnc = new FullNameCreator(true);
+			return AssemblyQualifiedName(exportedType, null);
+		}
+
+		/// <summary>
+		/// Returns the assembly qualified full name of a <see cref="ExportedType"/>
+		/// </summary>
+		/// <param name="exportedType">The <c>ExportedType</c></param>
+		/// <param name="helper">Helps print the name</param>
+		/// <returns>The assembly qualified full name</returns>
+		public static string AssemblyQualifiedName(ExportedType exportedType, IFullNameCreatorHelper helper) {
+			var fnc = new FullNameCreator(true, helper);
 			fnc.CreateAssemblyQualifiedName(exportedType);
 			return fnc.Result;
 		}
@@ -554,11 +731,42 @@
 			get { return sb == null ? null : sb.ToString(); }
 		}

-		FullNameCreator(bool isReflection) {
+		FullNameCreator(bool isReflection, IFullNameCreatorHelper helper) {
 			this.sb = new StringBuilder();
 			this.isReflection = isReflection;
+			this.helper = helper;
 			this.genericArguments = null;
 			this.recursionCounter = new RecursionCounter();
+		}
+
+		bool NeedAssemblyName(IType type) {
+			if (helper == null)
+				return true;
+			return helper.NeedAssemblyName(GetDefinitionType(type));
+		}
+
+		IType GetDefinitionType(IType type) {
+			if (!recursionCounter.Increment())
+				return type;
+
+			TypeSpec ts = type as TypeSpec;
+			if (ts != null)
+				type = ts.TypeSig;
+
+			TypeSig sig = type as TypeSig;
+			if (sig != null) {
+				TypeDefOrRefSig tdr;
+				GenericInstSig gis;
+				if ((tdr = sig as TypeDefOrRefSig) != null)
+					type = GetDefinitionType(tdr.TypeDefOrRef);
+				else if ((gis = sig as GenericInstSig) != null)
+					type = GetDefinitionType(gis.GenericType);
+				else
+					type = GetDefinitionType(sig.Next);
+			}
+
+			recursionCounter.Decrement();
+			return type;
 		}

 		void CreateFullName(ITypeDefOrRef typeDefOrRef) {
@@ -616,7 +824,8 @@
 			}

 			CreateFullName(typeRef);
-			AddAssemblyName(GetDefinitionAssembly(typeRef));
+			if (NeedAssemblyName(typeRef))
+				AddAssemblyName(GetDefinitionAssembly(typeRef));

 			recursionCounter.Decrement();
 		}
@@ -671,7 +880,8 @@
 			}

 			CreateFullName(typeDef);
-			AddAssemblyName(GetDefinitionAssembly(typeDef));
+			if (NeedAssemblyName(typeDef))
+				AddAssemblyName(GetDefinitionAssembly(typeDef));

 			recursionCounter.Decrement();
 		}
@@ -759,7 +969,8 @@
 			}

 			CreateFullName(typeSig);
-			AddAssemblyName(GetDefinitionAssembly(typeSig));
+			if (NeedAssemblyName(typeSig))
+				AddAssemblyName(GetDefinitionAssembly(typeSig));

 			recursionCounter.Decrement();
 		}
@@ -934,15 +1145,22 @@
 							if (i != 0)
 								sb.Append(',');
 							var genArg = typeGenArgs[i];
-							sb.Append('[');
+
+							bool mustWriteAssembly = NeedAssemblyName(genArg);
+							if (mustWriteAssembly)
+								sb.Append('[');
+
 							CreateFullName(genArg);
-							sb.Append(", ");
-							var asm = GetDefinitionAssembly(genArg);
-							if (asm == null)
-								sb.Append(NULLVALUE);
-							else
-								sb.Append(EscapeAssemblyName(GetAssemblyName(asm)));
-							sb.Append(']');
+
+							if (mustWriteAssembly) {
+								sb.Append(", ");
+								var asm = GetDefinitionAssembly(genArg);
+								if (asm == null)
+									sb.Append(NULLVALUE);
+								else
+									sb.Append(EscapeAssemblyName(GetAssemblyName(asm)));
+								sb.Append(']');
+							}
 						}
 						sb.Append(']');
 					}
@@ -1005,7 +1223,8 @@
 			}

 			CreateFullName(exportedType);
-			AddAssemblyName(GetDefinitionAssembly(exportedType));
+			if (NeedAssemblyName(exportedType))
+				AddAssemblyName(GetDefinitionAssembly(exportedType));

 			recursionCounter.Decrement();
 		}


make sure correct input url used

make sure correct input url used

--- azurecopy/Program.cs
+++ azurecopy/Program.cs
@@ -231,7 +231,7 @@
                     // read blob
                     var blob = inputHandler.ReadBlob(url, fileName);

-                    var outputUrl = GenerateOutputUrl(_outputUrl, _inputUrl);
+                    var outputUrl = GenerateOutputUrl(_outputUrl, url);

                     // write blob
                     outputHandler.WriteBlob(outputUrl, blob);


improve logging responsiveness

improve logging responsiveness

--- AppMetrics/LogEvent.ashx.cs
+++ AppMetrics/LogEvent.ashx.cs
@@ -247,7 +247,7 @@
 		{
 			get
 			{
-				return true;
+				return false;
 			}
 		}
 	}


mainline: fixed a bug in UDP test case

mainline: fixed a bug in UDP test case

git-svn-id: 6d1cac2d86fac78d43d5e0dd3566a1010e844f91@71409 81fbe566-5dc4-48c1-bdea-7421811ca204

--- mainline/Test/TestSession.cs
+++ mainline/Test/TestSession.cs
@@ -14,7 +14,8 @@

         public override void StartSession()
         {
- 	         SendResponse(string.Format(WelcomeMessageFormat, AppServer.Name));
+            if(AppServer.Config.Mode != SocketMode.Udp)
+ 	            SendResponse(string.Format(WelcomeMessageFormat, AppServer.Name));
         }

         public override void HandleExceptionalError(Exception e)


#217 Samples - NorthwindLite - Test

#217 Samples - NorthwindLite - Test

--- samples/NorthwindLite/test/Optivem.NorthwindLite.Web.Test/CustomersControllerTest.cs
+++ samples/NorthwindLite/test/Optivem.NorthwindLite.Web.Test/CustomersControllerTest.cs
@@ -27,7 +27,7 @@
                 new Customer
                 {
                     FirstName = "Mary",
-                    LastName = "Smith",
+                    LastName = "Smith",
                 },

                 new Customer
@@ -96,6 +96,8 @@
         [Fact]
         public async Task TestCreateCustomer_RequestInvalid_ResponseUnprocessableEntity()
         {
+            // TODO: Request invlaid - null, exceeded length, special characters, words, date (date in the past), negative integers for quantities
+
             var createRequest = new CreateCustomerRequest
             {
                 FirstName = null,


Added Helpers.VecMag(LLVector3 vector) and VecNorm(LLVector3 vector)

git-svn-id: c32cf1ecefca26b8770d7b0740bc0c5c174087e4@605 c754d5e9-d413-0410-bcdf-9574c9dba6b7

--- libsecondlife-cs/Helpers.cs
+++ libsecondlife-cs/Helpers.cs
@@ -207,6 +207,23 @@
     }

     /// <summary>
+    /// Calculates the magnitutde of the supplied vector
+    /// </summary>
+    public static float VecMag(LLVector3 vector)
+    {
+        return (float)Math.Sqrt(vector.X * vector.X + vector.Y * vector.Y + vector.Z * vector.Z);
+    }
+
+    /// <summary>
+    /// Returns the supplied vector in normalized form
+    /// </summary>
+    public static LLVector3 VecDist(LLVector3 vector)
+    {
+        float mag = VecMag(vector);
+        return new LLVector3(vector.X/mag,vector.Y/mag,vector.Z/mag);
+    }
+
+    /// <summary>
     /// Decode a zerocoded byte array, used to decompress packets marked
     /// with the zerocoded flag
     /// </summary>


Read config env

Read config env

--- read-config.cshtml
+++ read-config.cshtml
@@ -5,7 +5,7 @@

-
Salutation: @Environment.GetEnvironmentVariable("APPSETTINGS_Salutation")

+
Salutation: @Environment.GetEnvironmentVariable("APPSETTING_Salutation")

Salutation:


Update myFirstXNAGame.cs

Update myFirstXNAGame.cs

--- myFirstXNAGame/myFirstXNAGame/myFirstXNAGame.cs
+++ myFirstXNAGame/myFirstXNAGame/myFirstXNAGame.cs
@@ -23,7 +23,7 @@
         //Sprite paddleLeft;
         //Sprite paddleRight;
         //Sprite pong;
-        TwoAnimation player;
+        Player player;

         Texture2D texturePlayer;
         //Texture2D texturePaddle;
@@ -83,7 +83,7 @@
             calcEnd3 = (screenHeight * 2) + 40;
             calcEnd4 = (screenHeight + 100) / 2;

-            player = new TwoAnimation(new Vector2(100, 100));
+            player = new Player(new Vector2(100, 100), 2, Keys.W, Keys.S, Keys.A, Keys.D, Keys.Q, Keys.E);

             player.AddAnimations(texturePlayer);


Removing whitespaces

Removing whitespaces

--- src/MahApps.Metro/ThemeManager/ThemeManager.cs
+++ src/MahApps.Metro/ThemeManager/ThemeManager.cs
@@ -91,9 +91,9 @@
         {
             get
             {
-                EnsureThemes();
-
-                return baseColors;
+                EnsureThemes();
+
+                return baseColors;
             }
         }

@@ -102,11 +102,11 @@
         /// </summary>
         public static ReadOnlyObservableCollection<ColorScheme> ColorSchemes
         {
-            get
-            {
-                EnsureThemes();
-
-                return colorSchemes;
+            get
+            {
+                EnsureThemes();
+
+                return colorSchemes;
             }
         }


- ui fix

- ui fix

--- Alchemy4Tridion.Plugins.DeletePlus/Helpers/MainHelper.cs
+++ Alchemy4Tridion.Plugins.DeletePlus/Helpers/MainHelper.cs
@@ -1620,7 +1620,7 @@

                     results.Add(new ResultInfo
                     {
-                        Status = Status.Info,
+                        Status = Status.Success,
                         Item = innerSchemaData.ToItem(),
                         Message = string.Format("Make non-mandatory field \"{0}\" in \"{1}\".", field.Name, innerSchemaData.GetWebDav())
                     });


update

update

--- Patches/PatchUpdater.cs
+++ Patches/PatchUpdater.cs
@@ -43,90 +43,78 @@
 			return null;
 		}

-		public void PatchScrolls() {
+		public void PatchScrollsWindows() {
+            String URL;
+            if (Platform.getOS() == Platform.OS.Win)
+            {
+                URL = "http://download.scrolls.com/client/windows.zip";
+            }
+            else
+            {
+                URL = "http://download.scrolls.com/client/mac.zip";
+            }

-			String URL;
-			if (Platform.getOS () == Platform.OS.Win) {
-				URL = "http://download.scrolls.com/client/windows.zip";
-			} else {
-				URL = "http://download.scrolls.com/client/mac.zip";
-			}
+            String gameFolder = Path.GetFullPath(Directory.GetParent(Platform.getGlobalScrollsInstallPath()).Parent.Parent.Parent.FullName) + Path.DirectorySeparatorChar;

-			String gameFolder = Path.GetFullPath(Directory.GetParent(Platform.getGlobalScrollsInstallPath()).Parent.Parent.Parent.FullName)+ Path.DirectorySeparatorChar;
-
-			//wait
-			WebClientTimeOut webClient = new WebClientTimeOut();
-			if (File.Exists (gameFolder + "game.zip"))
+            //wait
+            WebClientTimeOut webClient = new WebClientTimeOut();
+            if (File.Exists(gameFolder + "game.zip"))
+                File.Delete(gameFolder + "game.zip");
+            try
+            {
+                webClient.DownloadFile(URL, gameFolder + "game.zip");
+            }
+            catch (WebException)
 			{
-				File.Delete (gameFolder + "game.zip");
-			}
-			try {
-				webClient.DownloadFile(URL, gameFolder + "game.zip");
-			} catch (WebException) {
 				App.Popups.KillCurrentPopup();
 				App.Popups.ShowOk (null, "info", "Error", "And error occured while downloading the update.", "OK");
-				return;
-			}
+                return;
+            }

-			//backup assembly
-			String backupPath = gameFolder + "ScrollsModLoader.dll";
-			if (File.Exists(backupPath)){
-				File.Delete (backupPath);
-			}
-			File.Copy (Platform.getGlobalScrollsInstallPath() + "ScrollsModLoader.dll", backupPath);
-			Console.WriteLine("Copied ScrollsModLoader.dll to " + backupPath);
+            //backup assembly
+            String backupPath = gameFolder + "ScrollsModLoader.dll";
+            if (File.Exists(backupPath))
+            {
+                File.Delete(backupPath);
+            }
+            File.Copy(Platform.getGlobalScrollsInstallPath() + "ScrollsModLoader.dll", backupPath);

-			//backup modloader folder
-			String modBackupPath = gameFolder + "ModLoader" + Path.DirectorySeparatorChar;
-			if (Directory.Exists (modBackupPath)){
-				Extensions.DeleteDirectory (modBackupPath);
-			}
-			Directory.Move (Platform.getGlobalScrollsInstallPath() + "ModLoader", modBackupPath);
-			File.Delete (modBackupPath + "mods.ini");
-			File.Delete (modBackupPath + "Assembly-CSharp.dll");
-
-			Console.WriteLine("Deleted mods.ini and Assembly-CSharp.dll");
+            //backup modloader folder
+            String modBackupPath = gameFolder + "ModLoader" + Path.DirectorySeparatorChar;
+            if (Directory.Exists(modBackupPath))
+            {
+                Extensions.DeleteDirectory(modBackupPath);
+            }
+            Directory.Move(Platform.getGlobalScrollsInstallPath() + "ModLoader", modBackupPath);
+            File.Delete(modBackupPath + "mods.ini");
+            File.Delete(modBackupPath + "Assembly-CSharp.dll");

-			if (Platform.getOS () == Platform.OS.Win) {
-				Extensions.DeleteDirectory (gameFolder + "game" + Path.DirectorySeparatorChar + "Scrolls_Data");
-				File.Delete (gameFolder + "game" + Path.DirectorySeparatorChar + "Scrolls.exe");
-
-				Console.WriteLine("Deleted Scrolls_Data and Scrolls.exe");
-			} else {
-				Extensions.DeleteDirectory (gameFolder + "MacScrolls.app");
-			}
+            if (Platform.getOS() == Platform.OS.Win)
+            {
+                Extensions.DeleteDirectory(gameFolder + "game");
+            }
+            else
+            {
+                Extensions.DeleteDirectory(gameFolder + "MacScrolls.app");
+            }

-			//extract
-			String zipLocation = gameFolder + "game.zip";
-			/*
-			if (Platform.getOS() == Platform.OS.Win){
-				String newZipLocation = gameFolder + "game" + Path.DirectorySeparatorChar + "game.zip";
-				File.Move(zipLocation, newZipLocation);
-				zipLocation = newZipLocation;
-			}
-			*/
-			Console.WriteLine("Now extracting from " + zipLocation);
-
-			ZipFile zip = ZipFile.Read(zipLocation);
-			foreach (ZipEntry e in zip)
-			{
-				e.Extract();
-			}
-			Console.WriteLine("Extracted zip")
+            //extract
+            ZipFile zip = ZipFile.Read(gameFolder + "game.zip");
+            foreach (ZipEntry e in zip)
+            {
+                e.Extract(gameFolder + "game");
+            }

-			//move assembly
-			File.Copy (backupPath, Platform.getGlobalScrollsInstallPath () + "ScrollsModLoader.dll");
-			File.Delete (backupPath);
-
-			Console.WriteLine("Deleted " + backupPath);
+            //move assembly
+            File.Copy(backupPath, Platform.getGlobalScrollsInstallPath() + "ScrollsModLoader.dll");
+            // File.Delete(backupPath);

-			//move modloader folder back
-			Directory.Move (modBackupPath, Platform.getGlobalScrollsInstallPath () + "ModLoader");
+            //move modloader folder back
+            Directory.Move(modBackupPath, Platform.getGlobalScrollsInstallPath() + "ModLoader");

-			//make new repatch backup
-			File.Copy (Platform.getGlobalScrollsInstallPath () + "Assembly-CSharp.dll", Platform.getGlobalScrollsInstallPath () + "ModLoader" + Path.DirectorySeparatorChar + "Assembly-CSharp.dll");
-			Console.WriteLine("Copied Assembly-CSharp.dll");
-
+            //make new repatch backup
+            File.Copy(Platform.getGlobalScrollsInstallPath() + "Assembly-CSharp.dll", Platform.getGlobalScrollsInstallPath() + "ModLoader" + Path.DirectorySeparatorChar + "Assembly-CSharp.dll");
+
 			//make sure mods get hooks set with new version
 			File.Delete (Platform.getGlobalScrollsInstallPath () + "ModLoader" + Path.DirectorySeparatorChar + "mods.ini");
 			ScrollsFilter.clearHooks ();
@@ -146,7 +134,6 @@

 			//restart the game
 			Platform.RestartGame ();
-
 		}
 	}
 }


a bit of logic to add text in the view if you're switching to a main or meta site or nothing if there is no main/meta

--- App/StackExchange.DataExplorer/Views/Shared/Query.cshtml
+++ App/StackExchange.DataExplorer/Views/Shared/Query.cshtml
@@ -71,22 +71,22 @@

     </form>

-        Switch sites:
-

-        @if (site.RelatedSite != null)
-        {
-

-
-
-
-

-        }
-

-                <input id="switch-sites" type="text" size="24" placeholder="search by name or url" />
-

-

-

-

+        Switch @(site.RelatedSite == null ? "sites" : (site.ParentId == null) ? "to meta site" : "to main site"  )
+

+                @if (site.RelatedSite != null)
+                {
+

+
+
+
+

+                }
+

+                    <input id="switch-sites" type="text" size="24" placeholder="search by name or url" />
+

+

+

+

          Hold tight while we fetch your results


(PkOpener): unpack/decrypt scripts.

(PkOpener): unpack/decrypt scripts.

--- ArcFormats/UMeSoft/ArcPK.cs
+++ ArcFormats/UMeSoft/ArcPK.cs
@@ -78,5 +78,59 @@
                 return null;
             return new ArcFile (file, this, dir);
         }
+
+        public override Stream OpenEntry (ArcFile arc, Entry entry)
+        {
+            if (!entry.Name.EndsWith (".scr", StringComparison.InvariantCultureIgnoreCase) &&
+                !entry.Name.EndsWith (".tbl", StringComparison.InvariantCultureIgnoreCase))
+                return base.OpenEntry (arc, entry);
+            int output_size = arc.File.View.ReadInt32 (entry.Offset);
+            if (output_size <= 0)
+                return base.OpenEntry (arc, entry);
+            using (var input = arc.File.CreateStream (entry.Offset+4, entry.Size-4))
+            {
+                var data = LzUnpack (input, output_size);
+                for (int i = 0; i < data.Length; ++i)
+                    data[i] ^= 0x42;
+                return new MemoryStream (data);
+            }
+        }
+
+        byte[] LzUnpack (Stream input, int output_size)
+        {
+            var output = new byte[output_size];
+            int ctl = 0;
+            int mask = 0;
+            int dst = 0;
+            while (dst < output_size)
+            {
+                mask >>= 1;
+                if (0 == mask)
+                {
+                    ctl = input.ReadByte();
+                    if (-1 == ctl)
+                        break;
+                    mask = 0x80;
+                }
+                if (0 == (ctl & mask))
+                {
+                    output[dst++] = (byte)input.ReadByte();
+                }
+                else
+                {
+                    int lo = input.ReadByte();
+                    int hi = input.ReadByte();
+                    if (-1 == lo || -1 == hi)
+                        break;
+                    int offset = hi << 4 | lo >> 4;
+                    if (0 == offset)
+                        break;
+                    int count  = (lo & 0xF) + 3;
+                    Binary.CopyOverlapped (output, dst - offset, dst, count);
+                    dst += count;
+                }
+            }
+            return output;
+        }
     }
 }


fix crash, same as #26.

fix crash, same as #26.

--- Assets/Slua/Script/Timer.cs
+++ Assets/Slua/Script/Timer.cs
@@ -261,12 +261,13 @@
 					ua = (Action<int>)ld.d;
 				else
 				{
+					IntPtr ml = LuaState.get(l).L;
 					ua = (int id) =>
 					{
-						int error = pushTry(l);
-						pushValue(l, id);
+						int error = pushTry(ml);
+						pushValue(ml, id);
 						ld.call(1, error);
-						LuaDLL.lua_settop(l, error - 1);
+						LuaDLL.lua_settop(ml, error - 1);
 					};
 				}
 				ld.d = ua;
@@ -286,13 +287,14 @@
 					ua = (Func<int, bool>)ld.d;
 				else
 				{
+					IntPtr ml = LuaState.get(l).L;
 					ua = (int id) =>
 					{
-						int error = pushTry(l);
-						pushValue(l, id);
+						int error = pushTry(ml);
+						pushValue(ml, id);
 						ld.call(1, error);
-						bool ret = LuaDLL.lua_toboolean(l, -1);
-						LuaDLL.lua_settop(l, error - 1);
+						bool ret = LuaDLL.lua_toboolean(ml, -1);
+						LuaDLL.lua_settop(ml, error - 1);
 						return ret;
 					};
 				}
@@ -315,4 +317,4 @@
 		}
 	}

-}+}


Rename everything related to the logs or plots to show that it is the species count log or plot in preparation for adding other types of log data and plots.

--- Assets/TreePlanterScript.cs
+++ Assets/TreePlanterScript.cs
@@ -121,9 +121,9 @@
     int m_displayedGeneration = 0; //Which generation number is currently visualized
     string m_chosenGeneration = "0"; //The generation number the user selects from the GUI
     string m_chosenSimulationId = "";
-    string m_logString = "";
-    bool m_showLogWindow = false; //Whether to display the window with log data
-    Rect m_logWindow = new Rect(200, 5, 400, 400);
+    string m_countLogString = "";
+    bool m_showCountLogWindow = false; //Whether to display the window with species count log data
+    Rect m_countLogWindow = new Rect(200, 5, 400, 400);
     string m_parameterPath = "http://vpcsim.appspot.com"; //Base URL of parameter webapp
     string m_debugString = ""; //Debug errors to display on the HUD
     WWW m_www; //Stores xml data downloaded from the web
@@ -207,12 +207,12 @@
                                    "View the selected time step"));
         GUI.Label(new Rect(10, 145, 135, 100), m_currentDataString);
         //Buttons to display log data or plots
-        bool logButton = GUI.Button(new Rect(10, 250, 40, 20),
-                                    new GUIContent("Log",
-                                    "Show log data"));
-        bool plotButton = GUI.Button(new Rect(55, 250, 45, 20),
-                                     new GUIContent("Plots",
-                                     "Show data plots"));
+        bool countLogButton = GUI.Button(new Rect(10, 250, 40, 20),
+                                    new GUIContent("Counts",
+                                    "Show species count log data"));
+        bool countPlotButton = GUI.Button(new Rect(55, 250, 45, 20),
+                                     new GUIContent("Count",
+                                     "Show species count plots"));
         //Button to display debug messages - TODO: Remove?  This is not for students.
         bool debugButton = GUI.Button(new Rect(10, 275, 60, 20),
                                       new GUIContent("Debug",
@@ -222,15 +222,15 @@
             GUI.Box(new Rect(165 , 35, 220, 20),"");
         }
         GUI.Label(new Rect(170, 35, 210, 20), GUI.tooltip);
-        if (m_showLogWindow)
-        {
-            //Setup log data window
-            m_logWindow = GUI.Window(0, m_logWindow, DisplayLogWindow, "Log data");
-        }
-        if (logButton)
+        if (m_showCountLogWindow)
+        {
+            //Setup species count log data window
+            m_countLogWindow = GUI.Window(0, m_countLogWindow, DisplayCountLogWindow, "Species Count Log data");
+        }
+        if (countLogButton)
         {
             //Show or hide the log data window
-            m_showLogWindow = !m_showLogWindow;
+            m_showCountLogWindow = !m_showCountLogWindow;
             m_chosenGeneration = m_displayedGeneration.ToString();
             GUI.FocusControl("focusBuster");
         }
@@ -251,7 +251,7 @@
             DeleteAllTrees();
             GenerateRandomCommunity();
             RunSimulation();
-            m_logString = GetLogData(false);
+            m_countLogString = GetCountLogData(false);
             VisualizeGeneration(0);
             m_chosenGeneration = m_displayedGeneration.ToString();
             m_chosenSimulationId = m_simulationId;
@@ -389,39 +389,39 @@
             m_chosenGeneration = m_displayedGeneration.ToString();
             GUI.FocusControl("focusBuster");
         }
-        if (plotButton)
+        if (countPlotButton)
         {
             //Display plots of the simulation data
             if (m_simulationId != "none")
             {
-                DisplayPlots();
+                DisplayCountPlot();
             }
             GUI.FocusControl("focusBuster");
         }
     }

-    void DisplayPlots()
-    {
-        //Send logdata to the surrounding web page where it will be redirected to the webapp
+    void DisplayCountPlot()
+    {
+        //Send species count logdata to the surrounding web page where it will be redirected to the webapp
         //which will generate plots in a new browser window or tab.
         //TODO - generate plots of other data types (age, biomass, etc)
-        string logData = GetLogData(true);
+        string logData = GetCountLogData(true);
         Application.ExternalCall("OpenCountsPlotPage", logData);
     }

-    void DisplayLogWindow(int windowID)
+    void DisplayCountLogWindow(int windowID)
     {
         if (GUI.Button(new Rect(330,370,50,20), "Close"))
         {
-            m_showLogWindow = !m_showLogWindow;
+            m_showCountLogWindow = !m_showCountLogWindow;
         }
         if (m_simulationId != "none")
         {
-            GUI.TextArea(new Rect(5, 20, 390, 350), m_logString);
+            GUI.TextArea(new Rect(5, 20, 390, 350), m_countLogString);
         }
         else
         {
-            GUI.TextArea(new Rect(5, 20, 390, 350), "You haven't logged any data yet");
+            GUI.TextArea(new Rect(5, 20, 390, 350), "No simulation loaded");
         }
         GUI.DragWindow();
     }
@@ -448,7 +448,7 @@
         return currentData;
     }

-    string GetLogData(bool isForPlotting)
+    string GetCountLogData(bool isForPlotting)
     {
         //Generates a string of log data suitable for either displaying to humans or
         //for sending out for plotting
@@ -587,8 +587,7 @@
                 DeleteAllTrees();
                 RunSimulation();
                 m_debugString += "RunSimulation success\n";
-                m_logString = GetLogData(false);
-                m_debugString += "GetLogData success\n";
+                m_countLogString = GetCountLogData(false);
                 VisualizeGeneration(0);
                 m_debugString += "VisualizeGeneration success\n";
                 m_chosenGeneration = m_displayedGeneration.ToString();


Type correction in face -> in fact

Type correction
in face -> in fact

--- dotnet/PopcornStandard/Implementation/Expander+Expand.cs
+++ dotnet/PopcornStandard/Implementation/Expander+Expand.cs
@@ -114,7 +114,7 @@
                 var valueToAssign = GetSourceValue(source, context, propertyReference.PropertyName, Mappings[sourceType].Translators);

-                /// If authorization indicates this should not in face be authorized, skip it
+                /// If authorization indicates this should not in fact be authorized, skip it
                 if(!AuthorizeValue(source, context, valueToAssign))
                 {
                     continue;
@@ -212,7 +212,7 @@
                 // Transform the input value as needed
                 object valueToAssign = GetSourceValue(source, context, propertyName, mappingDefinition?.Translators);

-                /// If authorization indicates this should not in face be authorized, skip it
+                /// If authorization indicates this should not in fact be authorized, skip it
                 if (!AuthorizeValue(source, context, valueToAssign))
                 {
                     continue;
@@ -358,7 +358,7 @@
             foreach (var item in (IEnumerable)originalValue)
             {

-                /// If authorization indicates this should not in face be authorized, skip it
+                /// If authorization indicates this should not in fact be authorized, skip it
                 if (!AuthorizeValue(originalValue, context,  item))
                 {
                     continue;


On linux TcpListener does not terminate listener.AcceptSocket use async version of method

--- BTDB/Service/TcpipServer.cs
+++ BTDB/Service/TcpipServer.cs
@@ -41,14 +41,14 @@
                 _acceptClientsTask.Wait();
         }

-        void AcceptNewClients()
+        async void AcceptNewClients()
         {
             while (_listening)
             {
                 Socket socket;
                 try
                 {
-                    socket = _listener.AcceptSocket();
+                    socket = await _listener.AcceptSocketAsync();
                 }
                 catch (SocketException)
                 {


Explicitly call out that the Instant constructor uses a different origin to
BCL, and explain how you would convert from a BCL number-of-ticks if needed.

Also, be more explicit about when FromDateTimeUtc() throws ArgumentException.

--- src/NodaTime/Instant.cs
+++ src/NodaTime/Instant.cs
@@ -77,6 +77,13 @@
         /// <summary>
         /// Initializes a new instance of the <see cref="Instant" /> struct.
         /// </summary>
+        /// <remarks>
+        /// Note that while the Noda Time <see cref="Instant"/> type and BCL <see cref="DateTime"/> and
+        /// <see cref="DateTimeOffset"/> types are all defined in terms of a number of ticks, they use different
+        /// origins: the Noda Time types count ticks from the Unix epoch (the start of 1970 AD), while the BCL types
+        /// count from the start of 1 AD. This constructor requires the former; to convert from a number-of-ticks since
+        /// the BCL epoch, construct a <see cref="DateTime"/> first, then use <see cref="FromDateTimeUtc"/>.
+        /// </remarks>
         /// <param name="ticks">The number of ticks since the Unix epoch. Negative values represent instants before the
         /// Unix epoch.</param>
         public Instant(long ticks)
@@ -643,7 +650,8 @@
         /// </summary>
         /// <returns>An <see cref="Instant"/> value representing the same instant in time as the given universal <see cref="DateTime"/>.</returns>
         /// <param name="dateTime">Date and time value which must have a <see cref="DateTime.Kind"/> of <see cref="DateTimeKind.Utc"/></param>
-        /// <exception cref="ArgumentException"><paramref name="dateTime"/> has the wrong <see cref="DateTime.Kind"/>.</exception>
+        /// <exception cref="ArgumentException"><paramref name="dateTime"/> is not of <see cref="DateTime.Kind"/>
+        /// <see cref="DateTimeKind.Utc"/>.</exception>
         public static Instant FromDateTimeUtc(DateTime dateTime)
         {
             Preconditions.CheckArgument(dateTime.Kind == DateTimeKind.Utc, "dateTime", "Invalid DateTime.Kind for Instant.FromDateTimeUtc");


remove uri check.

remove uri check.

--- src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs
+++ src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs
@@ -104,7 +104,7 @@
         {
             Startup?.Invoke(this, new ControlledApplicationLifetimeStartupEventArgs(args));

-            if (args.Length > 0 && Uri.TryCreate(args[0], UriKind.Absolute, out _))
+            if (args.Length > 0))
             {
                 ((IApplicationPlatformEvents)Application.Current).RaiseUrlsOpened(args);
             }


Added autofocus on page name when creating a new page

--- src/BrickPile/BrickPile.Sample/Areas/UI/Views/Shared/EditorTemplates/PageName.cshtml
+++ src/BrickPile/BrickPile.Sample/Areas/UI/Views/Shared/EditorTemplates/PageName.cshtml
@@ -5,6 +5,6 @@
         @Html.LabelForModel()
     </div>
     <div class="editor-field">
-        @Html.TextBoxFor(_ => Model, new { @class = "title", required = "required", placeholder = "My awesome page" })
+        @Html.TextBoxFor(_ => Model, new { @class = "title", required = "required", placeholder = "My awesome page", autofocus = "autofocus" })
     </div>
 </div>


RA-1456 added new error code to xml doc.

--- src/Esfa.Vacancy.Register.Api/Controllers/SearchApprenticeshipVacanciesController.cs
+++ src/Esfa.Vacancy.Register.Api/Controllers/SearchApprenticeshipVacanciesController.cs
@@ -110,6 +110,7 @@
         /// | 30114       | Distance in miles must be between 1 and 1000 (inclusive)                         |
         /// | 30115       | Searching by geo-location and national vacancies is not a valid combination      |
         /// | 30116       | Invalid search and sort combination (e.g. sort by distance but not a geo-search) |
+        /// | 30117       | SortBy value outside of accepted values                                          |
         ///
         /// </summary>
         [HttpGet]


Fix halfCatchWidth not being reset between runs

--- osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs
+++ osu.Game.Rulesets.Catch/Difficulty/CatchDifficultyCalculator.cs
@@ -23,8 +23,6 @@

         protected override int SectionLength => 750;

-        private float? halfCatchWidth;
-
         public CatchDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap)
             : base(ruleset, beatmap)
         {
@@ -49,14 +47,14 @@

         protected override IEnumerable<DifficultyHitObject> CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
         {
-            if (halfCatchWidth == null)
+            float halfCatchWidth;
+
+            using (var catcher = new CatcherArea.Catcher(beatmap.BeatmapInfo.BaseDifficulty))
             {
-                var catcher = new CatcherArea.Catcher(beatmap.BeatmapInfo.BaseDifficulty);
                 halfCatchWidth = catcher.CatchWidth * 0.5f;
+                halfCatchWidth *= 0.8f; // We're only using 80% of the catcher's width to simulate imperfect gameplay.
+            }

-                // We're only using 80% of the catcher's width to simulate imperfect gameplay.
-                halfCatchWidth *= 0.8f;
-            }

             CatchHitObject lastObject = null;

@@ -72,14 +70,14 @@
                 {
                     // We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations.
                     case Fruit fruit:
-                        yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth.Value);
+                        yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth);

                         lastObject = hitObject;
                         break;
                     case JuiceStream _:
                         foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
                         {
-                            yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth.Value);
+                            yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth);

                             lastObject = nested;
                         }


Add missing wait calls on `async` test steps

--- osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs
+++ osu.Game.Tests/Visual/Multiplayer/TestSceneMatchStartControl.cs
@@ -192,7 +192,7 @@
             AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready);
             AddUntilStep("countdown button visible", () => this.ChildrenOfType<MultiplayerCountdownButton>().Single().IsPresent);

-            AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) }));
+            AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) }).WaitSafely());

             ClickButtonWhenEnabled<MultiplayerReadyButton>();
             AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready);
@@ -202,7 +202,7 @@
         [Test]
         public void TestClickingReadyButtonUnReadiesDuringAutoStart()
         {
-            AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) }));
+            AddStep("enable auto start", () => MultiplayerClient.ChangeSettings(new MultiplayerRoomSettings { AutoStartDuration = TimeSpan.FromMinutes(1) }).WaitSafely());
             ClickButtonWhenEnabled<MultiplayerReadyButton>();
             AddUntilStep("local user became ready", () => MultiplayerClient.LocalUser?.State == MultiplayerUserState.Ready);


Move event subscriptions out of `RunOnUiThread`

No need to run them on the UI thread. Only Android native methods need to run there.

Also includes a small change to `EnsureActivated`, it'll now request focus.
Didn't run into any problems with losing focus, but doesn't hurt to include.

--- osu.Framework.Android/Input/AndroidTextInput.cs
+++ osu.Framework.Android/Input/AndroidTextInput.cs
@@ -52,12 +52,13 @@

         public void Activate()
         {
+            view.KeyDown += keyDown;
+            view.CommitText += commitText;
+
             activity.RunOnUiThread(() =>
             {
                 view.RequestFocus();
                 inputMethodManager?.ShowSoftInput(view, 0);
-                view.KeyDown += keyDown;
-                view.CommitText += commitText;
             });
         }

@@ -65,18 +66,20 @@
         {
             activity.RunOnUiThread(() =>
             {
+                view.RequestFocus();
                 inputMethodManager?.ShowSoftInput(view, 0);
             });
         }

         public void Deactivate()
         {
+            view.KeyDown -= keyDown;
+            view.CommitText -= commitText;
+
             activity.RunOnUiThread(() =>
             {
                 inputMethodManager?.HideSoftInputFromWindow(view.WindowToken, HideSoftInputFlags.None);
                 view.ClearFocus();
-                view.KeyDown -= keyDown;
-                view.CommitText -= commitText;
             });
         }


Invoke text mutation method events only when done by user input

--- osu.Framework/Graphics/UserInterface/TextBox.cs
+++ osu.Framework/Graphics/UserInterface/TextBox.cs
@@ -5,7 +5,6 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
-using System.Text;
 using osu.Framework.Caching;
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Sprites;
@@ -163,8 +162,12 @@
                     if (string.IsNullOrEmpty(SelectedText) || !AllowClipboardExport) return true;

                     clipboard?.SetText(SelectedText);
+
                     if (action.ActionType == PlatformActionType.Cut)
-                        removeSelection();
+                    {
+                        string removedText = removeSelection();
+                        OnUserTextRemoved(removedText);
+                    }

                     return true;

@@ -248,7 +251,10 @@
                             selectionEnd = Math.Clamp(selectionStart + amount.Value, 0, text.Length);

                         if (selectionLength > 0)
-                            removeSelection();
+                        {
+                            string removedText = removeSelection();
+                            OnUserTextRemoved(removedText);
+                        }

                         break;
                 }
@@ -419,7 +425,7 @@
         /// <summary>
         /// Removes the selected text if a selection persists.
         /// </summary>
-        private void removeSelection() => removeCharacters(selectionLength);
+        private string removeSelection() => removeCharacters(selectionLength);

         /// <summary>
         /// Removes a specified <paramref name="number"/> of characters left side of the current position.
@@ -427,16 +433,17 @@
         /// <remarks>
         /// If a selection persists, <see cref="removeSelection"/> must be called instead.
         /// </remarks>
-        private void removeCharacters(int number = 1)
+        /// <returns>A string of the removed characters.</returns>
+        private string removeCharacters(int number = 1)
         {
             if (Current.Disabled || text.Length == 0)
-                return;
+                return string.Empty;

             int removeStart = Math.Clamp(selectionRight - number, 0, selectionRight);
             int removeCount = selectionRight - removeStart;

             if (removeCount == 0)
-                return;
+                return string.Empty;

             Debug.Assert(selectionLength == 0 || removeCount == selectionLength);

@@ -455,7 +462,6 @@

             var removedText = text.Substring(removeStart, removeCount);
             text = text.Remove(removeStart, removeCount);
-            OnTextRemoved(removedText);

             // Reorder characters depth after removal to avoid ordering issues with newly added characters.
             for (int i = removeStart; i < TextFlow.Count; i++)
@@ -464,6 +470,8 @@
             selectionStart = selectionEnd = removeStart;

             cursorAndLayout.Invalidate();
+
+            return removedText;
         }

         /// <summary>
@@ -507,8 +515,6 @@

         private void insertString(string value, Action<Drawable> drawableCreationParameters = null)
         {
-            StringBuilder inserted = new StringBuilder();
-
             if (string.IsNullOrEmpty(value)) return;

             if (Current.Disabled)
@@ -540,15 +546,11 @@
                 drawableCreationParameters?.Invoke(drawable);

                 text = text.Insert(selectionLeft, c.ToString());
-                inserted.Append(c);

                 selectionStart = selectionEnd = selectionLeft + 1;

                 cursorAndLayout.Invalidate();
             }
-
-            if (inserted.Length > 0)
-                OnTextAdded(inserted.ToString());
         }

         /// <summary>
@@ -557,18 +559,18 @@
         protected abstract void NotifyInputError();

         /// <summary>
-        /// Invoked whenever a text string has been inserted to <see cref="Text"/>.
-        /// </summary>
-        /// <param name="added">The inserted text string.</param>
-        protected virtual void OnTextAdded(string added)
-        {
-        }
-
-        /// <summary>
-        /// Invoked whenever a text string has been removed from <see cref="Text"/>.
+        /// Invoked whenever pending text input from user has been consumed, this is not necessarily what has been inserted to <see cref="Text"/> (i.e. some may have been disallowed by <see cref="CanAddCharacter"/>)
+        /// </summary>
+        /// <param name="consumed">The consumed text string.</param>
+        protected virtual void OnUserTextConsumed(string consumed)
+        {
+        }
+
+        /// <summary>
+        /// Invoked whenever a text string has been removed by user input.
         /// </summary>
         /// <param name="removed">The removed text string.</param>
-        protected virtual void OnTextRemoved(string removed)
+        protected virtual void OnUserTextRemoved(string removed)
         {
         }

@@ -682,7 +684,10 @@
             string pendingText = textInput?.GetPendingText();

             if (!string.IsNullOrEmpty(pendingText) && !ReadOnly)
+            {
                 InsertString(pendingText);
+                OnUserTextConsumed(pendingText);
+            }

             if (consumingText)
                 Schedule(consumePendingText);
@@ -953,12 +958,16 @@
                 //in the case of backspacing (or a NOP), we can exit early here.
                 return;

-            insertString(s.Substring(matchCount), d =>
+            var insertedValue = s.Substring(matchCount);
+
+            insertString(insertedValue, d =>
             {
                 d.Colour = Color4.Aqua;
                 d.Alpha = 0.6f;
                 imeDrawables.Add(d);
             });
+
+            OnUserTextConsumed(insertedValue);
         }

         #endregion


Don't return any resolutions for macOS

Don't return any resolutions for macOS

These are wrong on retina displays, and as far as I can see there's no way to get the "dpi" from DisplayResolution...

--- osu.Framework/Platform/MacOS/MacOSGameWindow.cs
+++ osu.Framework/Platform/MacOS/MacOSGameWindow.cs
@@ -216,16 +216,8 @@
         // Apple recommends not changing the system resolution for fullscreen access
         protected override void ChangeResolution(DisplayDevice display, Size newSize) => ClientSize = newSize;

-        public override IEnumerable<DisplayResolution> AvailableResolutions
-        {
-            get
-            {
-                // only return the current resolution for reasons mentioned above.
-                var display = GetCurrentDisplay();
-                return display.AvailableResolutions.Where(dr =>
-                    dr.Width == display.Width && dr.Height == display.Height && dr.BitsPerPixel == display.BitsPerPixel && dr.RefreshRate == display.RefreshRate);
-            }
-        }
+        // Doesn't return any resolution for the reason mentioned above
+        public override IEnumerable<DisplayResolution> AvailableResolutions => Enumerable.Empty<DisplayResolution>();

         protected override void RestoreResolution(DisplayDevice displayDevice)
         {


Clear delegate list rather than relying on unbinds

--- osu.Game/Skinning/LocalSkinOverrideContainer.cs
+++ osu.Game/Skinning/LocalSkinOverrideContainer.cs
@@ -96,6 +96,9 @@

         protected override void Dispose(bool isDisposing)
         {
+            // Must be done before base.Dispose()
+            SourceChanged = null;
+
             base.Dispose(isDisposing);

             if (fallbackSource != null)


Fix after merge.

Fix after merge.

--- src/NHibernate.Test/Linq/WhereSubqueryTests.cs
+++ src/NHibernate.Test/Linq/WhereSubqueryTests.cs
@@ -477,24 +477,7 @@
 			Assert.AreEqual(5, query.Count);
 		}

-		[Test]
-		public void OrdersWithSubqueryWithJoin()
-		{
-			//NH-3147
-			var subquery = from line in db.OrderLines
-						   join product in db.Products
-							   on line.Product.ProductId equals product.ProductId
-						   where line.Quantity == 5
-						   select line.Order;
-
-			var query = (from order in db.Orders
-						 where subquery.Contains(order)
-						 select order).ToList();
-
-			Assert.AreEqual(61, query.Count);
-		}
-
-		[Test]
+        [Test]
 		public void OrdersWithSubqueryWithJoin()
 		{
 			//NH-3147


Adding batch ZADD

Adding batch ZADD

--- src/NServiceKit.Redis/RedisClient_SortedSet.cs
+++ src/NServiceKit.Redis/RedisClient_SortedSet.cs
@@ -95,9 +95,9 @@
 			{
 				pipeline.WriteCommand(Commands.ZAdd, uSetId, uScore, value.ToUtf8Bytes());
 			}
-
+
 			pipeline.Flush();
-
+
 			var success = pipeline.ReadAllAsIntsHaveSuccess();
 			return success;
 		}


Refactoring.

Refactoring.

--- Applications/Rss.Reader/Xui/Behaviors/CommandBehavior.cs
+++ Applications/Rss.Reader/Xui/Behaviors/CommandBehavior.cs
@@ -61,7 +61,7 @@
         /* ----------------------------------------------------------------- */
         public static readonly DependencyProperty CommandProperty
             = DependencyProperty.RegisterAttached(
-                "Command",
+                nameof(Command),
                 typeof(ICommand),
                 typeof(CommandBehavior<T>),
                 new UIPropertyMetadata(null)


remove ask for user name and show menu from user options

--- Assets/HappyFunTimes/HappyFunTimesCore/HFTGameOptions.cs
+++ Assets/HappyFunTimes/HappyFunTimesCore/HFTGameOptions.cs
@@ -55,18 +55,6 @@
         ///</summary>
         [Tooltip("For multi-computer games. Set from command line --hft-id=<id>")]
         public string id = "";
-
-        /// <summary>
-        /// Ask the user for a name when they start
-        /// </summary>
-        [Tooltip("ask users for name when they join")]
-        public bool askUserForName = true;
-
-        /// <summary>
-        /// Show game menu(allow user to set name)
-        /// </summary>
-        [Tooltip("show gear menu on controller")]
-        public bool showMenu = true;

         ///<summary>
         ///For a multiple machine game designates this game as the game where players start.


[xcode] Reordered the output of the .pbxproj file to be more similar to that generated by XCode

--- packages/XCodeBuilder/dev/Scripts/PBXProject.cs
+++ packages/XCodeBuilder/dev/Scripts/PBXProject.cs
@@ -92,6 +92,11 @@

         void IWriteableNode.Write(System.IO.TextWriter writer)
         {
+            (this.BuildFiles as IWriteableNode).Write(writer);
+            (this.FileReferences as IWriteableNode).Write(writer);
+            (this.Groups as IWriteableNode).Write(writer);
+            (this.NativeTargets as IWriteableNode).Write(writer);
+
             writer.WriteLine("");
             writer.WriteLine("/* Begin PBXProject section */");
             writer.WriteLine("\t\t{0} /* Project object */ = {{", this.UUID);
@@ -116,13 +121,9 @@
             writer.WriteLine("\t\t};");
             writer.WriteLine("/* End PBXProject section */");

-            (this.NativeTargets as IWriteableNode).Write(writer);
-            (this.FileReferences as IWriteableNode).Write(writer);
-            (this.BuildFiles as IWriteableNode).Write(writer);
+            (this.SourceBuildPhases as IWriteableNode).Write(writer);
             (this.BuildConfigurations as IWriteableNode).Write(writer);
             (this.ConfigurationLists as IWriteableNode).Write(writer);
-            (this.Groups as IWriteableNode).Write(writer);
-            (this.SourceBuildPhases as IWriteableNode).Write(writer);
         }
 #endregion
     }