Simplify code (fix codescene?)

Simplify code (fix codescene?)

--- WalletWasabi/TorSocks5/TorProcessManager.cs
+++ WalletWasabi/TorSocks5/TorProcessManager.cs
@@ -98,7 +98,7 @@
 						if (!File.Exists(torPath))
 						{
 							Logger.LogInfo($"Tor instance NOT found at {torPath}. Attempting to acquire it...");
-							InstallTor(fullBaseDirectory, torDir);
+							InstallTor(torDir);
 						}
 						else if (!IoHelpers.CheckExpectedHash(torPath, Path.Combine(fullBaseDirectory, "TorDaemons")))
 						{
@@ -111,7 +111,7 @@
 							}
 							Directory.Move(torDir, backupTorDir);

-							InstallTor(fullBaseDirectory, torDir);
+							InstallTor(torDir);
 						}
 						else
 						{
@@ -167,9 +167,9 @@
 			}).Start();
 		}

-		private static void InstallTor(string fullBaseDirectory, string torDir)
-		{
-			string torDaemonsDir = Path.Combine(fullBaseDirectory, "TorDaemons");
+		private static void InstallTor(string torDir)
+		{
+			string torDaemonsDir = Path.Combine(EnvironmentHelpers.GetFullBaseDirectory(), "TorDaemons");

 			string dataZip = Path.Combine(torDaemonsDir, "data-folder.zip");
 			IoHelpers.BetterExtractZipToDirectoryAsync(dataZip, torDir).GetAwaiter().GetResult();


Reduce boxing in RedirectRule.cs (#8988)

--- src/Middleware/Rewrite/src/Internal/RedirectRule.cs
+++ src/Middleware/Rewrite/src/Internal/RedirectRule.cs
@@ -74,11 +74,11 @@
                         QueryString.FromUriComponent(
                             newPath.Substring(split)));
                     // not using the HttpContext.Response.redirect here because status codes may be 301, 302, 307, 308
-                    response.Headers[HeaderNames.Location] = pathBase + newPath.Substring(0, split) + query;
+                    response.Headers[HeaderNames.Location] = pathBase + newPath.Substring(0, split) + query.ToUriComponent();
                 }
                 else
                 {
-                    response.Headers[HeaderNames.Location] = pathBase + newPath + context.HttpContext.Request.QueryString;
+                    response.Headers[HeaderNames.Location] = pathBase + newPath + context.HttpContext.Request.QueryString.ToUriComponent();
                 }

                 context.Logger?.RedirectedRequest(newPath);


Added [NonSerialized] to match with h2.0.3 - however, I don't see why
they are needed because the class is not marked as being Serializable
in nh or h2.0.3

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@787

--- src/NHibernate/Persister/AbstractEntityPersister.cs
+++ src/NHibernate/Persister/AbstractEntityPersister.cs
@@ -32,71 +32,71 @@
 		protected static readonly System.Type[] NoClasses = new System.Type[0];

 		private System.Type mappedClass;
-		protected Dialect.Dialect dialect;
-		private ConstructorInfo constructor;
-
-		private IIdentifierGenerator idgen;
-		private bool polymorphic;
-		private bool explicitPolymorphism;
-		private bool inherited;
-		private bool hasSubclasses;
-		private bool versioned;
-		private bool abstractClass;
-		private bool implementsLifecycle;
-		private bool implementsValidatable;
-		private bool hasCollections;
-		private bool hasCascades;
-		private bool mutable;
-		private bool useIdentityColumn;
-		private System.Type superclass;
-		private bool dynamicUpdate;
-		private bool dynamicInsert;
-		private string sqlWhereString;
-		private string sqlWhereStringTemplate;
-
-		private string identitySelectString;
-
-		private readonly System.Type[] proxyInterfaces;
-		private System.Type concreteProxyClass;
-		private bool hasProxy;
-		protected bool hasEmbeddedIdentifier;
-
-		private string[] identifierColumnNames;
-		private Cascades.IdentifierValue unsavedIdentifierValue;
-
-		protected Hashtable columnNamesByPropertyPath = new Hashtable();
-		protected Hashtable typesByPropertyPath = new Hashtable();
-
-		private string identifierPropertyName;
-		private IType identifierType;
-		private ReflectHelper.Setter identifierSetter;
-		private ReflectHelper.Getter identifierGetter;
-		private PropertyInfo proxyIdentifierProperty;
-
-		private string[] propertyNames;
-		private IType[] propertyTypes;
-		private bool[] propertyUpdateability;
-		private bool[] propertyInsertability;
-
-		private string versionPropertyName;
-		private string versionColumnName;
-		private IVersionType versionType;
-		private ReflectHelper.Getter versionGetter;
-		private int versionProperty;
-
-		private ReflectHelper.Getter[] getters;
-		private ReflectHelper.Setter[] setters;
-		private readonly Hashtable gettersByPropertyName = new Hashtable();
-		private readonly Hashtable settersByPropertyName = new Hashtable();
-		protected int hydrateSpan;
-
-		private string className;
-
-		private Cascades.CascadeStyle[] cascadeStyles;
-		private ICacheConcurrencyStrategy cache;
+		[NonSerialized] protected Dialect.Dialect dialect;
+		[NonSerialized] private ConstructorInfo constructor;
+
+		[NonSerialized] private IIdentifierGenerator idgen;
+		[NonSerialized] private bool polymorphic;
+		[NonSerialized] private bool explicitPolymorphism;
+		[NonSerialized] private bool inherited;
+		[NonSerialized] private bool hasSubclasses;
+		[NonSerialized] private bool versioned;
+		[NonSerialized] private bool abstractClass;
+		[NonSerialized] private bool implementsLifecycle;
+		[NonSerialized] private bool implementsValidatable;
+		[NonSerialized] private bool hasCollections;
+		[NonSerialized] private bool hasCascades;
+		[NonSerialized] private bool mutable;
+		[NonSerialized] private bool useIdentityColumn;
+		[NonSerialized] private System.Type superclass;
+		[NonSerialized] private bool dynamicUpdate;
+		[NonSerialized] private bool dynamicInsert;
+		[NonSerialized] private string sqlWhereString;
+		[NonSerialized] private string sqlWhereStringTemplate;
+
+		[NonSerialized] private string identitySelectString;
+
+		[NonSerialized] private readonly System.Type[] proxyInterfaces;
+		[NonSerialized] private System.Type concreteProxyClass;
+		[NonSerialized] private bool hasProxy;
+		[NonSerialized] protected bool hasEmbeddedIdentifier;
+
+		[NonSerialized] private string[] identifierColumnNames;
+		[NonSerialized] private Cascades.IdentifierValue unsavedIdentifierValue;
+
+		[NonSerialized] protected Hashtable columnNamesByPropertyPath = new Hashtable();
+		[NonSerialized] protected Hashtable typesByPropertyPath = new Hashtable();
+
+		[NonSerialized] private string identifierPropertyName;
+		[NonSerialized] private IType identifierType;
+		[NonSerialized] private ReflectHelper.Setter identifierSetter;
+		[NonSerialized] private ReflectHelper.Getter identifierGetter;
+		[NonSerialized] private PropertyInfo proxyIdentifierProperty;
+
+		[NonSerialized] private string[] propertyNames;
+		[NonSerialized] private IType[] propertyTypes;
+		[NonSerialized] private bool[] propertyUpdateability;
+		[NonSerialized] private bool[] propertyInsertability;
+
+		[NonSerialized] private string versionPropertyName;
+		[NonSerialized] private string versionColumnName;
+		[NonSerialized] private IVersionType versionType;
+		[NonSerialized] private ReflectHelper.Getter versionGetter;
+		[NonSerialized] private int versionProperty;
+
+		[NonSerialized] private ReflectHelper.Getter[] getters;
+		[NonSerialized] private ReflectHelper.Setter[] setters;
+		[NonSerialized] private readonly Hashtable gettersByPropertyName = new Hashtable();
+		[NonSerialized] private readonly Hashtable settersByPropertyName = new Hashtable();
+		[NonSerialized] protected int hydrateSpan;
+
+		[NonSerialized] private string className;
+
+		[NonSerialized] private Cascades.CascadeStyle[] cascadeStyles;
+		[NonSerialized] private ICacheConcurrencyStrategy cache;

 		// a cglib thing
-		//private MetaClass optimizer;
+		//[NonSerialized] private MetaClass optimizer;

 		public System.Type MappedClass
 		{


cosmetic

cosmetic

--- src/SEEK.AdPostingApi.Client.Tests/ExpireAdTests.cs
+++ src/SEEK.AdPostingApi.Client.Tests/ExpireAdTests.cs
@@ -1,15 +1,9 @@
 using System;
 using System.Collections.Generic;
-using System.Diagnostics;
-using System.Dynamic;
 using System.Net.Http;
 using System.Net.Http.Headers;
-using System.Text;
-using System.Threading;
 using System.Threading.Tasks;
 using FluentAssertions;
-using Marvin.JsonPatch.Operations;
-using PactNet.Mocks.MockHttpService;
 using PactNet.Mocks.MockHttpService.Models;
 using SEEK.AdPostingApi.Client.Models;
 using SEEK.AdPostingApi.Client.Resources;


Update FileRoller.cs

Update FileRoller.cs

Ignore parsing the connection string when RollingPeriod.Never.
This allows the usage of custom ConnectionStrings with Password or Shared=true.

Change-Id: I88d1e7ebd73086fb00f4aefb4b77d8613e7b81d9

--- src/Serilog.Sinks.LiteDB/Sinks/LiteDB/FileRoller.cs
+++ src/Serilog.Sinks.LiteDB/Sinks/LiteDB/FileRoller.cs
@@ -19,6 +19,11 @@
         /// <returns></returns>
         public static string GetFilename(string connectionString, RollingPeriod period, DateTime date)
         {
+            if (period == RollingPeriod.Never)
+            {
+                return connectionString;
+            }
+
             var c = ConnectionStringParser.Parse(connectionString);
             var fullpath = c["filename"];

@@ -30,8 +35,6 @@

             switch (period)
             {
-                case RollingPeriod.Never:
-                    return fullpath;
                 case RollingPeriod.HalfHour:
                 case RollingPeriod.Quarterly:
                     var itv = period == RollingPeriod.Quarterly ? 15 : 30;


Making the setter of the "Properties" property public for easier use

--- src/Skybrud.Umbraco.Dashboard/Model/DashboardTab.cs
+++ src/Skybrud.Umbraco.Dashboard/Model/DashboardTab.cs
@@ -33,7 +33,7 @@
         /// Gets a list containing all the properties added to the tab.
         /// </summary>
         [JsonProperty("properties")]
-        public List<DashboardProperty> Properties { get; private set; }
+        public List<DashboardProperty> Properties { get; set; }

         #endregion


Add Command Args support to debug, fix exception when folder is open in file explorer

--- CupCake.Debug/Program.cs
+++ CupCake.Debug/Program.cs
@@ -14,15 +14,16 @@
         {
             if (args.Length > 0)
             {
-                string command = args[0].ToLower();
+                var command = args[0].ToLower();
+                var newArgs = args.Skip(1);

                 if (command == "deploy")
                 {
-                    Deploy(args.Skip(1));
+                    Deploy(newArgs);
                 }
                 else if (command == "debug")
                 {
-                    Debug();
+                    Debug(newArgs);
                 }
                 else
                 {
@@ -50,7 +51,7 @@

             string debugProfilePath = profilesPath + "\\Debug";
             if (Directory.Exists(debugProfilePath))
-                Directory.Delete(debugProfilePath, true);
+                DeleteDirectory(debugProfilePath);

             Directory.CreateDirectory(debugProfilePath);

@@ -69,7 +70,32 @@
             }
         }

-        private static void Debug()
+        /// <summary>
+        /// Depth-first recursive delete, with handling for descendant
+        /// directories open in Windows Explorer.
+        /// </summary>
+        public static void DeleteDirectory(string path)
+        {
+            foreach (string directory in Directory.GetDirectories(path))
+            {
+                DeleteDirectory(directory);
+            }
+
+            try
+            {
+                Directory.Delete(path, true);
+            }
+            catch (IOException)
+            {
+                Directory.Delete(path, true);
+            }
+            catch (UnauthorizedAccessException)
+            {
+                Directory.Delete(path, true);
+            }
+        }
+
+        private static void Debug(IEnumerable<string> args)
         {
             string path;
             try
@@ -96,7 +122,7 @@
                 throw new ConnectionException("Problem communicating with the client, make sure it is running.", ex);
             }

-            AppDomain.CurrentDomain.ExecuteAssembly(path + "\\CupCake.Server.exe", new[] {"--envpath", path, "--debug"});
+            AppDomain.CurrentDomain.ExecuteAssembly(path + "\\CupCake.Server.exe", new[] { "--envpath", path, "--debug"}.Concat(args).ToArray());
         }
     }
 }


Added unit tests

Added unit tests

--- src/Take.Blip.Builder.UnitTests/FlowManagerTests.cs
+++ src/Take.Blip.Builder.UnitTests/FlowManagerTests.cs
@@ -6,6 +6,7 @@
 using System.Collections.Generic;
 using System.Threading;
 using System.Threading.Tasks;
+using Shouldly;
 using Take.Blip.Builder.Models;
 using Takenet.Iris.Messaging.Resources.ArtificialIntelligence;
 using Xunit;
@@ -78,7 +79,7 @@
                         && m.To.ToIdentity().Equals(User)
                         && m.Type.ToString().Equals(messageType)
                         && m.Content.ToString() == messageContent),
-                    Arg.Any<CancellationToken>());
+                    Arg.Is<CancellationToken>(c => !c.IsCancellationRequested));
         }

         [Fact]
@@ -1127,6 +1128,173 @@
                     Arg.Any<CancellationToken>());
         }

+        [Fact]
+        public async Task TimeoutOnActionShouldOverrideDefaultConfiguration()
+        {
+              // Arrange
+            var input = new PlainText() { Text = "Ping!" };
+            var messageType = "text/plain";
+            var messageContent = "Pong!";
+            var flow = new Flow()
+            {
+                Id = Guid.NewGuid().ToString(),
+                States = new[]
+                {
+                    new State
+                    {
+                        Id = "root",
+                        Root = true,
+                        Input = new Input(),
+                        Outputs = new[]
+                        {
+                            new Output
+                            {
+                                StateId = "ping"
+                            }
+                        }
+                    },
+                    new State
+                    {
+                        Id = "ping",
+                        InputActions = new[]
+                        {
+                            new Action
+                            {
+                                Type = "SendMessage",
+                                Timeout = 0.0000001, // Very small timeout to force cancellation
+                                Settings = new JObject()
+                                {
+                                    {"type", messageType},
+                                    {"content", messageContent}
+                                }
+                            }
+                        }
+                    }
+                }
+            };
+            var target = GetTarget();
+
+            // Act
+            await target.ProcessInputAsync(input, User, Application, flow, CancellationToken);
+
+            // Assert
+            Sender
+                .Received(1)
+                .SendMessageAsync(
+                    Arg.Is<Message>(m =>
+                        m.Id != null
+                        && m.To.ToIdentity().Equals(User)
+                        && m.Type.ToString().Equals(messageType)
+                        && m.Content.ToString() == messageContent),
+                    Arg.Is<CancellationToken>(c => c.IsCancellationRequested)); // The token should be cancelled
+        }
+
+        [Fact]
+        public async Task ActionWithInvalidSettingShouldBreakProcessing()
+        {
+              // Arrange
+            var input = new PlainText() { Text = "Ping!" };
+            var messageType = "application/json";
+            var messageContent = "NOT A JSON";
+            var flow = new Flow()
+            {
+                Id = Guid.NewGuid().ToString(),
+                States = new[]
+                {
+                    new State
+                    {
+                        Id = "root",
+                        Root = true,
+                        Input = new Input(),
+                        Outputs = new[]
+                        {
+                            new Output
+                            {
+                                StateId = "ping"
+                            }
+                        }
+                    },
+                    new State
+                    {
+                        Id = "ping",
+                        InputActions = new[]
+                        {
+                            new Action
+                            {
+                                Type = "SendMessage",
+                                Settings = new JObject()
+                                {
+                                    {"type", messageType},
+                                    {"content", messageContent}
+                                }
+                            }
+                        }
+                    }
+                }
+            };
+            var target = GetTarget();
+
+            // Act
+            await target
+                .ProcessInputAsync(input, User, Application, flow, CancellationToken)
+                .ShouldThrowAsync<ActionProcessingException>();
+        }
+
+        [Fact]
+        public async Task ActionWithInvalidSettingShouldNotBreakProcessingWhenContinueOnErrorIsTrue()
+        {
+            // Arrange
+            var input = new PlainText() { Text = "Ping!" };
+            var messageType = "application/json";
+            var messageContent = "NOT A JSON";
+            var flow = new Flow()
+            {
+                Id = Guid.NewGuid().ToString(),
+                States = new[]
+                {
+                    new State
+                    {
+                        Id = "root",
+                        Root = true,
+                        Input = new Input(),
+                        Outputs = new[]
+                        {
+                            new Output
+                            {
+                                StateId = "ping"
+                            }
+                        }
+                    },
+                    new State
+                    {
+                        Id = "ping",
+                        InputActions = new[]
+                        {
+                            new Action
+                            {
+                                Type = "SendMessage",
+                                ContinueOnError = true,
+                                Settings = new JObject()
+                                {
+                                    {"type", messageType},
+                                    {"content", messageContent}
+                                }
+                            }
+                        }
+                    }
+                }
+            };
+            var target = GetTarget();
+
+            // Act
+            await target.ProcessInputAsync(input, User, Application, flow, CancellationToken);
+
+            // Assert
+            ContextProvider.Received(1).CreateContext(User, Application, Arg.Is<LazyInput>(i => i.Content == input), flow);
+            StateManager.Received(1).SetStateIdAsync(Context, "ping", Arg.Any<CancellationToken>());
+            StateManager.Received(1).DeleteStateIdAsync(Context, Arg.Any<CancellationToken>());
+        }
+
         public void Dispose()
         {
             CancellationTokenSource.Dispose();


Fix the redirect tracking composer

Fix the redirect tracking composer

--- src/Umbraco.Web/Routing/RedirectTrackingComposer.cs
+++ src/Umbraco.Web/Routing/RedirectTrackingComposer.cs
@@ -12,6 +12,6 @@
     /// <para>recycle bin = moving to and from does nothing: to = the node is gone, where would we redirect? from = same</para>
     /// </remarks>
     [RuntimeLevel(MinLevel = RuntimeLevel.Run)]
-    public class RedirectTrackingComposer : ComponentComposer<RelateOnCopyComponent>, ICoreComposer
+    public class RedirectTrackingComposer : ComponentComposer<RedirectTrackingComponent>, ICoreComposer
     { }
 }


Fix - Added Tag's albums.

Fix - Added Tag's albums.

--- Data/pSher.Models/Tag.cs
+++ Data/pSher.Models/Tag.cs
@@ -8,10 +8,12 @@
     public class Tag
     {
         private ICollection<Image> images;
+        private ICollection<Album> albums;

         public Tag()
         {
             this.images = new HashSet<Image>();
+            this.albums = new HashSet<Album>();
         }

         [Key]
@@ -27,5 +29,11 @@
             get { return this.images; }
             set { this.images = value; }
         }
+
+        public virtual ICollection<Album> Albums
+        {
+            get { return this.albums; }
+            set { this.albums = value; }
+        }
     }
 }


Stub for code generation

Stub for code generation

--- NLiquid.Compiler.Service/Compiler.cs
+++ NLiquid.Compiler.Service/Compiler.cs
@@ -31,26 +31,22 @@
 			TypeBuilder tb = mb.DefineType("NLiquidTemplates", TypeAttributes.Public);

             foreach (var compileUnit in asts)
-            {
                 if (compileUnit.Field1)
-                {
-                    var ast = compileUnit.Field0;
-                    var file = ast.Location.Source.File;
-                    var templateName = Path.GetFileNameWithoutExtension(file.Name).Replace(".", "_").Replace("-", "_");
-                    MethodBuilder methodBuilder = tb.DefineMethod(templateName, MethodAttributes.Public | MethodAttributes.Static, null, null);
-                    Expression<Action> expressionTree = EmitTemplateMethod(ast, methodBuilder);
-                    expressionTree.CompileToMethod(methodBuilder);
-                }
-            }
+                    EmitTemplateMethod(compileUnit.Field0, tb);

 			tb.CreateType();
 			ab.Save(dllName);
 		}

-        Expression<Action> EmitTemplateMethod(IAst field0, MethodBuilder methodBuilder)
+        void EmitTemplateMethod(IAst ast, TypeBuilder tb)
         {
+            var file = ast.Location.Source.File;
+            var templateName = Path.GetFileNameWithoutExtension(file.Name).Replace(".", "_").Replace("-", "_");
+            // здесь надо сформировать параметр по первому элементу АСТ, если он есть.
+            MethodBuilder methodBuilder = tb.DefineMethod(templateName, MethodAttributes.Public | MethodAttributes.Static, null, null);
             // генерируем код
-            return () => Console.WriteLine("Здесь надо сгенерировать код");
+            Expression<Action> expressionTree = () => Console.WriteLine("Здесь надо сгенерировать код");
+            expressionTree.CompileToMethod(methodBuilder);
         }
     }
 }


foreach .. "items.OfType<" replaced with traditional for-loop

--- src/Avalonia.Base/Styling/Styles.cs
+++ src/Avalonia.Base/Styling/Styles.cs
@@ -2,7 +2,6 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Specialized;
-using System.Linq;
 using Avalonia.Collections;
 using Avalonia.Controls;

@@ -246,9 +245,12 @@
         {
             if (owner is not null)
             {
-                foreach (var resourceProvider in items.OfType<IResourceProvider>())
-                {
-                    resourceProvider.AddOwner(owner);
+                for (var i = 0; i < items.Count; ++i)
+                {
+                    if (items[i] is IResourceProvider provider)
+                    {
+                        provider.AddOwner(owner);
+                    }
                 }

                 (owner as IStyleHost)?.StylesAdded(ToReadOnlyList<IStyle>(items));
@@ -264,9 +266,12 @@
         {
             if (owner is not null)
             {
-                foreach (var resourceProvider in items.OfType<IResourceProvider>())
-                {
-                    resourceProvider.RemoveOwner(owner);
+                for (var i = 0; i < items.Count; ++i)
+                {
+                    if (items[i] is IResourceProvider provider)
+                    {
+                        provider.RemoveOwner(owner);
+                    }
                 }

                 (owner as IStyleHost)?.StylesRemoved(ToReadOnlyList<IStyle>(items));


Improve if-else-if structure and comment

--- src/BloomExe/Publish/PublishView.cs
+++ src/BloomExe/Publish/PublishView.cs
@@ -327,15 +327,13 @@
 				_model.BookletPortion = PublishModel.BookletPortions.BookletCover;
 			else if (_bodyRadio.Checked)
 				_model.BookletPortion = PublishModel.BookletPortions.BookletPages;
+			// The version we want to upload for web previews is the one that is shown for
+			// the _simplePDFRadio button, so pick AllPagesNoBooklet for both of these.
+			else if (_simplePDFRadio.Checked || _uploadRadio.Checked)
+					_model.BookletPortion = PublishModel.BookletPortions.AllPagesNoBooklet;
+			// otherwise, we don't yet know what version to show, so we don't show one.
 			else
-			{
-				// if one of the other radios is checked we want to show the all-pages version.
-				// otherwise, we don't yet know what version to show, so we don't show one.
-				if (_simplePDFRadio.Checked || _uploadRadio.Checked)
-					_model.BookletPortion = PublishModel.BookletPortions.AllPagesNoBooklet;
-				else
-					_model.BookletPortion = PublishModel.BookletPortions.None;
-			}
+				_model.BookletPortion = PublishModel.BookletPortions.None;
 			_model.UploadMode = _uploadRadio.Checked;
 			_model.ShowCropMarks = _showCropMarks.Checked && !_uploadRadio.Checked; // don't want crop-marks on upload PDF
 		}


Added realization of proxy support to client.

--- DropNet/Client/Client.cs
+++ DropNet/Client/Client.cs
@@ -62,7 +62,7 @@
         private RequestHelper _requestHelper;

 #if !WINDOWS_PHONE && !WINRT
-        public IWebProxy Proxy { get; set; }
+        private IWebProxy _proxy;
 #endif

         /// <summary>
@@ -78,10 +78,11 @@
         /// </summary>
         /// <param name="apiKey">The Api Key to use for the Dropbox Requests</param>
         /// <param name="appSecret">The Api Secret to use for the Dropbox Requests</param>
+        /// <param name="proxy">The proxy to use for web requests</param>
         /// <param name="authenticationMethod">The authentication method to use.</param>
-        /// <param name="proxy">The proxy to use for web requests</param>
-        public DropNetClient(string apiKey, string appSecret, AuthenticationMethod authenticationMethod = AuthenticationMethod.OAuth1)
-        {
+        public DropNetClient(string apiKey, string appSecret, IWebProxy proxy = null, AuthenticationMethod authenticationMethod = AuthenticationMethod.OAuth1)
+        {
+            _proxy = proxy;
             LoadClient();
             _apiKey = apiKey;
             _appsecret = appSecret;
@@ -96,8 +97,8 @@
         /// <param name="appSecret">The Api Secret to use for the Dropbox Requests</param>
         /// <param name="accessToken">The OAuth2 access token</param>
         /// <param name="proxy">The proxy to use for web requests</param>
-        public DropNetClient(string apiKey, string appSecret, string accessToken)
-            : this(apiKey, appSecret, AuthenticationMethod.OAuth2)
+        public DropNetClient(string apiKey, string appSecret, string accessToken, IWebProxy proxy)
+            : this(apiKey, appSecret, proxy, AuthenticationMethod.OAuth2)
         {
             UserLogin = new UserLogin { Token = accessToken };
         }
@@ -110,10 +111,10 @@
         /// <param name="userToken">The OAuth1 User authentication token</param>
         /// <param name="userSecret">The OAuth1 Users matching secret</param>
         /// <param name="proxy">The proxy to use for web requests</param>
-        public DropNetClient(string apiKey, string appSecret, string userToken, string userSecret)
-            :this(apiKey, appSecret)
-        {
-            UserLogin = new UserLogin { Token = userToken, Secret = userSecret };
+        public DropNetClient(string apiKey, string appSecret, string userToken, string userSecret, IWebProxy proxy)
+            : this(apiKey, appSecret, proxy)
+        {
+            UserLogin = new UserLogin {Token = userToken, Secret = userSecret};
         }

         private void LoadClient()
@@ -121,13 +122,18 @@
             _restClient = new RestClient(ApiBaseUrl);

 #if !WINDOWS_PHONE && !WINRT
-            _restClient.Proxy = Proxy;
+            _restClient.Proxy = _proxy;
 #endif

             _restClient.ClearHandlers();
             _restClient.AddHandler("*", new JsonDeserializer());

             _restClientContent = new RestClient(ApiContentBaseUrl);
+
+#if !WINDOWS_PHONE && !WINRT
+            _restClientContent.Proxy = _proxy;
+#endif
+
             _restClientContent.ClearHandlers();
             _restClientContent.AddHandler("*", new JsonDeserializer());


Make the proxy parameter optional for all constructors

--- DropNet/Client/Client.cs
+++ DropNet/Client/Client.cs
@@ -127,7 +127,7 @@
         /// <param name="appSecret">The Api Secret to use for the Dropbox Requests</param>
         /// <param name="accessToken">The OAuth2 access token</param>
         /// <param name="proxy">The proxy to use for web requests</param>
-        public DropNetClient(string apiKey, string appSecret, string accessToken, IWebProxy proxy)
+        public DropNetClient(string apiKey, string appSecret, string accessToken, IWebProxy proxy = null)
             : this(apiKey, appSecret, proxy, AuthenticationMethod.OAuth2)
         {
             UserLogin = new UserLogin { Token = accessToken };
@@ -141,7 +141,7 @@
         /// <param name="userToken">The OAuth1 User authentication token</param>
         /// <param name="userSecret">The OAuth1 Users matching secret</param>
         /// <param name="proxy">The proxy to use for web requests</param>
-        public DropNetClient(string apiKey, string appSecret, string userToken, string userSecret, IWebProxy proxy)
+        public DropNetClient(string apiKey, string appSecret, string userToken, string userSecret, IWebProxy proxy = null)
             : this(apiKey, appSecret, proxy)
         {
             UserLogin = new UserLogin {Token = userToken, Secret = userSecret};


Set HttpClient to proper lifecycle

Set HttpClient to proper lifecycle

--- source/Signatory/App_Start/NinjectWebCommon.cs
+++ source/Signatory/App_Start/NinjectWebCommon.cs
@@ -1,4 +1,5 @@
 using System.Configuration;
+using System.Net.Http;
 using Signatory.Controllers;
 using Signatory.Data;
 using WorldDomination.Web.Authentication;
@@ -78,6 +79,7 @@
             kernel.Bind<IAuthenticationService>().ToConstant(authenticationService);
             kernel.Bind<IAuthenticationCallbackProvider>().To<AuthenticationCallbackController>();
             kernel.Bind<DataContext>().ToSelf().InRequestScope();
+            kernel.Bind<HttpClient>().ToSelf().InRequestScope();
         }
     }
 }


trivial optimization

trivial optimization

--- EPPlus/ExcelWorksheet.cs
+++ EPPlus/ExcelWorksheet.cs
@@ -3476,15 +3476,15 @@
             var cache = new StringBuilder();
             cache.Append("<sheetData>");

-            //Set a value for cells with style and no value set.
-            var cseStyle = new CellsStoreEnumerator<ExcelCoreValue>(_values, 0, 0, ExcelPackage.MaxRows, ExcelPackage.MaxColumns);
-            foreach (var s in cseStyle)
-            {
-                if(!_values.Exists(cseStyle.Row, cseStyle.Column))
-                {
-                    SetValueInner(cseStyle.Row, cseStyle.Column, null);
-                }
-            }
+            ////Set a value for cells with style and no value set.
+            //var cseStyle = new CellsStoreEnumerator<ExcelCoreValue>(_values, 0, 0, ExcelPackage.MaxRows, ExcelPackage.MaxColumns);
+            //foreach (var s in cseStyle)
+            //{
+            //    if(!ExistsValueInner(cseStyle.Row, cseStyle.Column))
+            //    {
+            //        SetValueInner(cseStyle.Row, cseStyle.Column, null);
+            //    }
+            //}

             columnStyles = new Dictionary<int, int>();
             var cse = new CellsStoreEnumerator<ExcelCoreValue>(_values, 1, 0, ExcelPackage.MaxRows, ExcelPackage.MaxColumns);


Guard against dotnet runtime creating a duplicate task. (#239)

--- neo/Network/LocalNode.cs
+++ neo/Network/LocalNode.cs
@@ -350,6 +350,10 @@

                     var connectTask = ConnectToPeerAsync(ipEndPoint);

+                    // Completed tasks that run synchronously may use a non-unique cached task object.
+                    if (connectTask.IsCompleted)
+                        continue;
+
                     tasksDict.Add(connectTask, ipEndPoint.Address);
                     currentlyConnectingIPs.Add(ipEndPoint.Address, connectTask);
                 }
@@ -401,10 +405,13 @@
                         connectToPeers(endpoints);
                         lastSufficientPeersTimestamp = DateTime.UtcNow;
                     }
-
-                    try
-                    {
-                        var tasksArray = tasksDict.Keys.ToArray();
+                }
+
+                try
+                {
+                    var tasksArray = tasksDict.Keys.ToArray();
+                    if (tasksArray.Length > 0)
+                    {
                         Task.WaitAny(tasksArray, 5000, cancellationTokenSource.Token);

                         foreach (var task in tasksArray)
@@ -417,11 +424,12 @@
                             task.Dispose();
                         }
                     }
-                    catch (OperationCanceledException)
-                    {
-                        break;
-                    }
-                }
+                }
+                catch (OperationCanceledException)
+                {
+                    break;
+                }
+
                 for (int i = 0; i < 50 && !cancellationTokenSource.IsCancellationRequested; i++)
                 {
                     Thread.Sleep(100);


private should do it

private should do it

--- src/AutoMapper/Execution/TypeMapPlanBuilder.cs
+++ src/AutoMapper/Execution/TypeMapPlanBuilder.cs
@@ -92,7 +92,7 @@
             }
         }

-        public void CheckPropertyMapForCycles(PropertyMap propertyMap, HashSet<TypeMap> visitedTypeMaps)
+        private void CheckPropertyMapForCycles(PropertyMap propertyMap, HashSet<TypeMap> visitedTypeMaps)
         {
             if(propertyMap.SourceType == null)
             {


DepthFirstVisitor.VisitAllowingCancellation (remove duplication later)

git-svn-id: fcce7d6ce0ac15bf24f68871b5145d46fc068279@3438 2c1201b4-01cd-e047-a400-b836ae1fbc61

--- src/Boo.Lang.Compiler/Ast/DepthFirstVisitor.cs
+++ src/Boo.Lang.Compiler/Ast/DepthFirstVisitor.cs
@@ -42,6 +42,10 @@
 					node.Accept(this);
 					return true;
 				}
+				catch (LongJumpException)
+				{
+					throw;
+				}
 				catch (Boo.Lang.Compiler.CompilerError)
 				{
 					throw;
@@ -52,6 +56,26 @@
 				}
 			}
 			return false;
+		}
+
+		protected bool VisitAllowingCancellation(Node node)
+		{
+			try
+			{
+				Visit(node);
+				return true;
+			}
+			catch (LongJumpException)
+			{
+			}
+			return false;
+		}
+
+		static readonly LongJumpException CancellationException = new LongJumpException();
+
+		protected void Cancel()
+		{
+			throw CancellationException;
 		}

 		protected virtual void OnError(Node node, Exception error)


Sort usings.

Sort usings.

--HG--
branch : 1.4oob

--- src/CommandLine/Common/MSBuildProjectSystem.cs
+++ src/CommandLine/Common/MSBuildProjectSystem.cs
@@ -2,9 +2,9 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Reflection;
 using System.Runtime.Versioning;
 using Microsoft.Build.Evaluation;
-using System.Reflection;

 namespace NuGet.Common {
     public class MSBuildProjectSystem : PhysicalFileSystem, IProjectSystem, IMSBuildProjectSystem {


Disabled XmlStorageTest in SlimDX project

Fails with "mixed-mode assembly" error on CI server with VS2015

--- src/Common.UnitTests/Storage/XmlStorageTest.cs
+++ src/Common.UnitTests/Storage/XmlStorageTest.cs
@@ -36,6 +36,9 @@
     /// Contains test methods for <see cref="XmlStorage"/>.
     /// </summary>
     [TestFixture]
+#if SLIMDX
+    [Ignore]
+#endif
     public class XmlStorageTest
     {
         // ReSharper disable MemberCanBePrivate.Global


Adding back IgnoreTaskbarOnMaximize to GlowWindowBehavior

--- src/ControlzEx/Behaviors/GlowWindowBehavior.cs
+++ src/ControlzEx/Behaviors/GlowWindowBehavior.cs
@@ -85,13 +85,12 @@

             if(this.AssociatedObject.WindowState == WindowState.Normal)
             {
-                //var metroWindow = this.AssociatedObject as MetroWindow;
-                //var ignoreTaskBar = metroWindow != null && metroWindow.IgnoreTaskbarOnMaximize;
-                //if (this.makeGlowVisibleTimer != null && SystemParameters.MinimizeAnimation && !ignoreTaskBar)
-                //{
-                //    this.makeGlowVisibleTimer.Start();
-                //}
-                //else
+                var ignoreTaskBar = Interaction.GetBehaviors(this.AssociatedObject).OfType<WindowChromeBehavior>().FirstOrDefault()?.IgnoreTaskbarOnMaximize == true;
+                if (this.makeGlowVisibleTimer != null && SystemParameters.MinimizeAnimation && !ignoreTaskBar)
+                {
+                    this.makeGlowVisibleTimer.Start();
+                }
+                else
                 {
                     this.RestoreGlow();
                 }


update receipt object

update receipt object

--- src/Core/Models/Business/AppleReceiptStatus.cs
+++ src/Core/Models/Business/AppleReceiptStatus.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 using Newtonsoft.Json;

 namespace Bit.Billing.Models
@@ -7,16 +8,17 @@
     {
         [JsonProperty("status")]
         public int? Status { get; set; }
+        [JsonProperty("environment")]
+        public string Environment { get; set; }
         [JsonProperty("latest_receipt")]
         public string LatestReceipt { get; set; }
         [JsonProperty("receipt")]
         public AppleReceipt Receipt { get; set; }
         [JsonProperty("latest_receipt_info")]
-        public AppleReceipt LatestReceiptInfo { get; set; }
+        public List<AppleTransaction> LatestReceiptInfo { get; set; }
+        /*
         [JsonProperty("latest_expired_receipt_info")]
         public AppleReceipt LatestExpiredReceiptInfo { get; set; }
-        [JsonProperty("environment")]
-        public string Environment { get; set; }
         [JsonProperty("auto_renew_status")]
         public string AutoRenewStatus { get; set; }
         [JsonProperty("auto_renew_product_id")]
@@ -27,31 +29,38 @@
         public string ExpirationIntent { get; set; }
         [JsonProperty("is_in_billing_retry_period")]
         public string IsInBillingRetryPeriod { get; set; }
+        */

         public class AppleReceipt
         {
+            [JsonProperty("receipt_type")]
+            public string ReceiptType { get; set; }
+            [JsonProperty("bundle_id")]
+            public string BundleId { get; set; }
+            [JsonProperty("receipt_creation_date")]
+            public DateTime ReceiptCreationDate { get; set; }
+            [JsonProperty("in_app")]
+            public List<AppleTransaction> InApp { get; set; }
+        }
+
+        public class AppleTransaction
+        {
+            [JsonProperty("quantity")]
+            public string Quantity { get; set; }
+            [JsonProperty("product_id")]
+            public string ProductId { get; set; }
+            [JsonProperty("transaction_id")]
+            public string TransactionId { get; set; }
+            [JsonProperty("original_transaction_id")]
+            public string OriginalTransactionId { get; set; }
             [JsonProperty("purchase_date")]
             public DateTime PurchaseDate { get; set; }
             [JsonProperty("original_purchase_date")]
             public DateTime OriginalPurchaseDate { get; set; }
-            [JsonProperty("expires_date_formatted")]
+            [JsonProperty("expires_date")]
             public DateTime ExpiresDate { get; set; }
-            [JsonProperty("bid")]
-            public string Bid { get; set; }
-            [JsonProperty("bvrs")]
-            public string Bvrs { get; set; }
-            [JsonProperty("product_id")]
-            public string ProductId { get; set; }
-            [JsonProperty("item_id")]
-            public string ItemId { get; set; }
             [JsonProperty("web_order_line_item_id")]
             public string WebOrderLineItemId { get; set; }
-            [JsonProperty("quantity")]
-            public string Quantity { get; set; }
-            [JsonProperty("transaction_id")]
-            public string TransactionId { get; set; }
-            [JsonProperty("unique_identifier")]
-            public string UniqueIdentifier { get; set; }
         }
     }
 }


Add taskTypeStatus as subproperty of taskType

--- src/HQ.API.SDK/Client/HQAPIClient_generated.cs
+++ src/HQ.API.SDK/Client/HQAPIClient_generated.cs
@@ -15155,6 +15155,10 @@
         [JsonProperty("Id", Required = Required.Always)]
         public int Id { get; set; }

+        /// All task type status from this type
+        [JsonProperty("TaskTypeStatus", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
+        public ObservableCollection<TaskTypeStatus> TaskTypeStatus { get; set; }
+
         /// The id of the user who created this entity
         [JsonProperty("CreatedBy", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
         public int? CreatedBy { get; set; }
@@ -15200,10 +15204,6 @@
         [JsonProperty("TaskTypeId", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
         public int? TaskTypeId { get; set; }

-        /// The task type this status belongs to
-        [JsonProperty("TaskType", Required = Required.Default, NullValueHandling = NullValueHandling.Ignore)]
-        public TaskType TaskType { get; set; } = new TaskType();
-
         /// The unique identifier of this entity
         [JsonProperty("Id", Required = Required.Always)]
         public int Id { get; set; }


I guess this would break the tests for you

--- Eve.Tests/MethodsBase.cs
+++ Eve.Tests/MethodsBase.cs
@@ -35,7 +35,7 @@
             // very limited resources (for free), and we want everyone to keep enjoying it. To hit
             // the remote test server simply set 'EveTestServer' envvar to "http://evenet-testbed.herokuapp.com";

-            Service = Environment.GetEnvironmentVariable("EveTestServer") ?? "http://127.0.0.1:5000";
+            Service = Environment.GetEnvironmentVariable("EveTestServer") ?? "http://10.0.2.2:5000";

 			// Make sure remote remote endpoint is completely empty.
 			// We use the standard HttpClient for this (we aren't testing anything yet).


Give remove duplicate instance value for resource key test

--- src/Humanizer.Tests.Shared/ResourceKeyTests.cs
+++ src/Humanizer.Tests.Shared/ResourceKeyTests.cs
@@ -110,14 +110,14 @@
                     new object[]{6, "TimeSpanHumanize_Zero", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Month, 0, true) },
                     new object[]{7, "TimeSpanHumanize_Zero", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Year, 0, true) },

-                    new object[]{0, "TimeSpanHumanize_MultipleMilliseconds", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Millisecond, 0) },
-                    new object[]{1, "TimeSpanHumanize_MultipleSeconds", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Second, 0) },
-                    new object[]{2, "TimeSpanHumanize_MultipleMinutes", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Minute, 0) },
-                    new object[]{3, "TimeSpanHumanize_MultipleHours", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Hour, 0) },
-                    new object[]{4, "TimeSpanHumanize_MultipleDays", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Day, 0) },
-                    new object[]{5, "TimeSpanHumanize_MultipleWeeks", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Week, 0) },
-                    new object[]{6, "TimeSpanHumanize_MultipleMonths", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Month, 0) },
-                    new object[]{7, "TimeSpanHumanize_MultipleYears", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Year, 0) }
+                    new object[]{1, "TimeSpanHumanize_MultipleMilliseconds", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Millisecond, 0) },
+                    new object[]{2, "TimeSpanHumanize_MultipleSeconds", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Second, 0) },
+                    new object[]{3, "TimeSpanHumanize_MultipleMinutes", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Minute, 0) },
+                    new object[]{4, "TimeSpanHumanize_MultipleHours", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Hour, 0) },
+                    new object[]{5, "TimeSpanHumanize_MultipleDays", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Day, 0) },
+                    new object[]{6, "TimeSpanHumanize_MultipleWeeks", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Week, 0) },
+                    new object[]{7, "TimeSpanHumanize_MultipleMonths", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Month, 0) },
+                    new object[]{8, "TimeSpanHumanize_MultipleYears", ResourceKeys.TimeSpanHumanize.GetResourceKey(TimeUnit.Year, 0) }
                 };
             }
         }


Changed loading dev config behaviour, its now either normal ocnfig or dev config not both

--- src/IdentityBase.Public/IdentityBaseWebHost.cs
+++ src/IdentityBase.Public/IdentityBaseWebHost.cs
@@ -28,7 +28,7 @@
             where TStartup : class
         {
             IConfiguration config = IdentityBaseWebHost
-                .LoadConfig<TStartup>(args, basePath);
+                .LoadConfig<TStartup>(args, basePath);

             // Use in case you changed the example data in ExampleData.cs file
             // Configuration.ExampleDataWriter.Write(config);
@@ -57,6 +57,20 @@
                 .Run();
         }

+        private static string GetConfigFilePath(
+            string basePath,
+            bool isDevelopment)
+        {
+            string configFilePath = "./AppData/config.development.json";
+
+            if (File.Exists(Path.Combine(basePath, configFilePath)))
+            {
+                return configFilePath;
+            }
+
+            return "./AppData/config.json";
+        }
+
         private static IConfigurationRoot LoadConfig<TStartup>(
             string[] args,
             string basePath)
@@ -66,16 +80,16 @@

             IConfigurationBuilder configBuilder = new ConfigurationBuilder()
                 .SetBasePath(basePath)
-                .AddJsonFile("./AppData/config.json", false, false);
+                .AddJsonFile(
+                    path: IdentityBaseWebHost.GetConfigFilePath(
+                        basePath,
+                        isDevelopment
+                    ),
+                    optional: false,
+                    reloadOnChange: false);

             if (isDevelopment)
             {
-                configBuilder.AddJsonFile(
-                    "./AppData/config.development.json",
-                    true,
-                    false
-                );
-
                 configBuilder.AddUserSecrets<TStartup>();
             }


Nullability constraints in IOperationResult

--- src/Kephas.Core/Operations/IOperationResult.cs
+++ src/Kephas.Core/Operations/IOperationResult.cs
@@ -137,7 +137,7 @@
         /// <returns>
         /// The provided result.
         /// </returns>
-        public static TResult ReturnValue<TResult>(this TResult result, object returnValue)
+        public static TResult ReturnValue<TResult>(this TResult result, object? returnValue)
             where TResult : class, IOperationResult
         {
             Requires.NotNull(result, nameof(result));


I hope you like blue v1.5.3R0.1

I hope you like blue v1.5.3R0.1

--- IRCTerraria/Indigoirc.cs
+++ IRCTerraria/Indigoirc.cs
@@ -80,13 +80,13 @@

-            if (!File.Exists("IndigoIRC.settings"))
+            if (!File.Exists("IIRC/IndigoIRC.settings"))
             {
                 CreateConfig();
             }

             ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);

             ServerApi.Hooks.ServerChat.Register(this, OnChat);
@@ -105,7 +105,7 @@
         private void connect()
         {
             ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);

             //Thread.Sleep(8000);
@@ -282,7 +282,7 @@
              * Always make sure to check the chat to see if it has been handled
              */
             ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
             String channel = config.AppSettings.Settings["channel"].Value;

@@ -321,9 +321,9 @@
         }
         private void CreateConfig()
         {
-            //File.Create("IndigoIRC.settings");
-            ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            //File.Create("IIRC/IndigoIRC.settings");
+            ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
             config.AppSettings.Settings.Add("host", "irc.esper.net");
             config.AppSettings.Settings.Add("port", "6667");
@@ -346,7 +346,7 @@
         private void OnJoin(JoinEventArgs args)
         {
             ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
             String channel = config.AppSettings.Settings["channel"].Value;

@@ -362,7 +362,7 @@
         private void OnLeave(LeaveEventArgs args)
         {
             ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();
-            configMap.ExeConfigFilename = "IndigoIRC.settings";
+            configMap.ExeConfigFilename = "IIRC/IndigoIRC.settings";
             Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
             String channel = config.AppSettings.Settings["channel"].Value;


Various bugfixes

Various bugfixes

--- KSPNameGen/KSPNameGen.cs
+++ KSPNameGen/KSPNameGen.cs
@@ -80,32 +80,33 @@
 			"\nthat the generated name is proper."; // CMBO
 		const string rosterFormat =
 			"\tKERBAL\n" +
+			"\t{{\n" +
+			"\t\tname = {0}\n" +
+			"\t\tgender = {1}\n" +
+			"\t\ttype = Crew\n" +
+			"\t\ttrait = {2}\n" +
+			"\t\tbrave = {3}\n" +
+			"\t\tdumb = {4}\n" +
+			"\t\tbadS = {5}\n" +
+			"\t\tveteran = False\n" +
+			"\t\ttour = False\n" +
+			"\t\tstate = Available\n" +
+			"\t\tinactive = False\n" +
+			"\t\tinactiveTimeEnd = 0\n" +
+			"\t\tgExperienced = 0\n" +
+			"\t\toutDueToG = False\n" +
+			"\t\tToD = 0\n" +
+			"\t\tidx = -1\n" +
+			"\t\textraXP = 0\n" +
+			"\t\tCAREER_LOG\n" +
 			"\t\t{{\n" +
-			"\t\t\tname = {0}\n" +
-			"\t\t\tgender = {1}\n" +
-			"\t\t\ttype = Crew\n" +
-			"\t\t\ttrait = {2}\n" +
-			"\t\t\tbrave = {3}\n" +
-			"\t\t\tdumb = {4}\n" +
-			"\t\t\tbadS = {5}\n" +
-			"\t\t\tveteran = False\n" +
-			"\t\t\ttour = False\n" +
-			"\t\t\tstate = Available\n" +
-			"\t\t\tinactive = False\n" +
-			"\t\t\tinactiveTimeEnd = 0\n" +
-			"\t\t\tgExperienced = 0\n" +
-			"\t\t\toutDueToG = False\n" +
-			"\t\t\tToD = 0\n" +
-			"\t\t\tidx = -1\n" +
-			"\t\t\textraXP = 0\n" +
-			"\t\t\tCAREER_LOG\n" +
-			"\t\t\t{{\n" +
-			"\t\t\t\tflight = 0\n" +
-			"\t\t\t}}\n" +
-			"\t\t\tFLIGHT_LOG\n" +
-			"\t\t\t{{\n" +
-			"\t\t\t\tflight = 0\n" +
-			"\t\t\t}}\n";
+			"\t\t\tflight = 0\n" +
+			"\t\t}}\n" +
+			"\t\tFLIGHT_LOG\n" +
+			"\t\t{{\n" +
+			"\t\t\tflight = 0\n" +
+			"\t\t}}\n" +
+			"\t}}\n";

 		// application logic begins here

@@ -178,6 +179,8 @@
 					FlagParse(args, "--number", out genNum, genNum))
 					{
 						RosterIterator(genNum, Stringify(param), bufferSize);
+						ReadKey(true);
+						Kill(0);
 					}
 					else
 					{
@@ -429,7 +432,7 @@
 			ConsoleColor fexBack = ConsoleColor.Green;
 			ConsoleColor dneBack = ConsoleColor.Red;

-			Clear();
+			Console.Clear();
 			switch (drawMode)
 			{
 				case Modes.Main:
@@ -621,18 +624,18 @@

 		static void RosterIterator(ulong number, string _param, ulong buffsize)
 		{
-			string gender = random.Next(0, 1) == 1 ? "Male" : "Female";
-			string trait = random.Next(0, 2) == 0 ? "Pilot" :
-			random.Next(0, 1) == 0 ? "Engineer" : "Scientist";
-			string brave = random.NextDouble().ToString();
-			string dumb = random.NextDouble().ToString();
-			string badS = random.Next(0, 9) == 0 ? "True" : "False";
 			if (writeFile)
 			{
 				StreamWriter sw = CreateText(filePath);
 				sw.Write("ROSTER\n{\n");
 				for (ulong i = 0; i < number; i++)
 				{
+					string gender = _param.ToCharArray()[2] == 'm' ? "Male" : "Female";
+					string trait = random.Next(0, 2) == 0 ? "Pilot" :
+					random.Next(0, 1) == 0 ? "Engineer" : "Scientist";
+					string brave = random.NextDouble().ToString();
+					string dumb = random.NextDouble().ToString();
+					string badS = random.Next(0, 9) == 0 ? "True" : "False";
 					sw.Write(
 						String.Format(rosterFormat, Generate(_param), gender, trait, brave, dumb, badS)
 					);
@@ -644,8 +647,15 @@
 			}
 			string buffer = "";
 			string Generated = "";
+			Write("ROSTER\n{\n");
 			for (ulong i = 0; i < number; i++)
 			{
+				string gender = _param.ToCharArray()[2] == 'm' ? "Male" : "Female";
+				string trait = random.Next(0, 2) == 0 ? "Pilot" :
+				random.Next(0, 1) == 0 ? "Engineer" : "Scientist";
+				string brave = random.NextDouble().ToString();
+				string dumb = random.NextDouble().ToString();
+				string badS = random.Next(0, 9) == 0 ? "True" : "False";
 				Generated = Generate(_param);
 				buffer += String.Format(rosterFormat, Generated, gender, trait, brave, dumb, badS) + "\n";
 				if (i % buffsize == 0)
@@ -655,6 +665,7 @@
 				}
 			}
 			Write(buffer);
+			Write("}\n");
 		}
 	}
 }


[Libraries/GraphDB] fixed GetHostNodes(hopefully)

--- Libraries/GraphDB/DAL.cs
+++ Libraries/GraphDB/DAL.cs
@@ -21,7 +21,8 @@

 		public IEnumerator<Vertex> GetHostNodes ()
 		{
-			return graph.Categories[Category.USERS].Edges.Where(x => x.Value.Attribute == EdgeAttribute.HOSTS_EVENT).GetEnumerator ();
+			return graph.Categories[Category.USERS].Edges.Where(x => x.Value.Attribute == EdgeAttribute.HOSTS_EVENT)
+														.ToDictionary(i => i.Key, i => i.Value).Keys.GetEnumerator();
 		}

 		public IEnumerator<Vertex> GetEventNodes ()


Simplify code for ChainWith/ChainedComparer

Reduce complexity by reducing the number of branches. Now there's a single
path, and 100% test coverage.

--- Linq.Extras/XComparer.cs
+++ Linq.Extras/XComparer.cs
@@ -42,16 +42,15 @@
             comparer.CheckArgumentNull(nameof(comparer));
             nextComparer.CheckArgumentNull(nameof(nextComparer));

-            // Optimized to avoid nested chained comparers
-            var chained = comparer as ChainedComparer<T>;
-            var nextChained = nextComparer as ChainedComparer<T>;
-            if (chained != null && nextChained != null)
-                return new ChainedComparer<T>(chained, nextChained);
-            if (chained != null)
-                return new ChainedComparer<T>(chained, nextComparer);
-            if (nextChained != null)
-                return new ChainedComparer<T>(comparer, nextChained);
-            return new ChainedComparer<T>(new[] { comparer, nextComparer });
+            var comparers = GetComparers(comparer);
+            var nextComparers = GetComparers(nextComparer);
+
+            return new ChainedComparer<T>(comparers.Concat(nextComparers).ToArray());
+        }
+
+        private static IEnumerable<IComparer<T>> GetComparers<T>(IComparer<T> comparer)
+        {
+            return (comparer as IChainedComparer<T>)?.Comparers ?? XEnumerable.Unit(comparer);
         }

         /// <summary>
@@ -203,33 +202,23 @@
             }
         }

-        sealed class ChainedComparer<T> : IComparer<T>
-        {
-            private readonly IComparer<T>[] _comparers;
-
-            public ChainedComparer(IComparer<T>[] comparers)
-            {
-                _comparers = comparers;
-            }
-
-            public ChainedComparer(ChainedComparer<T> first, IComparer<T> next)
-            {
-                _comparers = first._comparers.Append(next).ToArray();
-            }
-
-            public ChainedComparer(IComparer<T> first, ChainedComparer<T> next)
-            {
-                _comparers = next._comparers.Prepend(first).ToArray();
-            }
-
-            public ChainedComparer(ChainedComparer<T> first, ChainedComparer<T> next)
-            {
-                _comparers = first._comparers.Concat(next._comparers).ToArray();
+        private interface IChainedComparer<T> : IComparer<T>
+        {
+            IEnumerable<IComparer<T>> Comparers { get; }
+        }
+
+        sealed class ChainedComparer<T> : IChainedComparer<T>
+        {
+            public IEnumerable<IComparer<T>> Comparers { get; }
+
+            public ChainedComparer(IEnumerable<IComparer<T>> comparers)
+            {
+                Comparers = comparers.ToArray();
             }

             public int Compare(T x, T y)
             {
-                return _comparers.Select(comparer => comparer.Compare(x, y)).FirstOrDefault(cmp => cmp != 0);
+                return Comparers.Select(comparer => comparer.Compare(x, y)).FirstOrDefault(cmp => cmp != 0);
             }
         }


added NetPeer as result of Connect method. fix 118

--- LiteNetLib/NetManager.cs
+++ LiteNetLib/NetManager.cs
@@ -957,18 +957,19 @@
         /// </summary>
         /// <param name="address">Server IP or hostname</param>
         /// <param name="port">Server Port</param>
-        public void Connect(string address, int port)
+        public NetPeer Connect(string address, int port)
         {
             //Create target endpoint
             NetEndPoint ep = new NetEndPoint(address, port);
-            Connect(ep);
+            return Connect(ep);
         }

         /// <summary>
         /// Connect to remote host
         /// </summary>
         /// <param name="target">Server end point (ip and port)</param>
-        public void Connect(NetEndPoint target)
+        /// <returns>peer awatinig connection or already connected peer</returns>
+        public NetPeer Connect(NetEndPoint target)
         {
             if (!IsRunning)
             {
@@ -976,16 +977,18 @@
             }
             lock (_peers)
             {
-                if (_peers.ContainsAddress(target) || _peers.Count >= _maxConnections)
+                NetPeer peer;
+                if (_peers.TryGetValue(target, out peer) || _peers.Count >= _maxConnections)
                 {
                     //Already connected
-                    return;
+                    return peer;
                 }

                 //Create reliable connection
                 //And request connection
-                var newPeer = new NetPeer(this, target, 0);
-                _peers.Add(target, newPeer);
+                peer = new NetPeer(this, target, 0);
+                _peers.Add(target, peer);
+                return peer;
             }
         }


add volatile again

add volatile again

--- LiteNetLib/NetManager.cs
+++ LiteNetLib/NetManager.cs
@@ -169,7 +169,7 @@
         private readonly Dictionary<IPEndPoint, ConnectionRequest> _requestsDict;
         private readonly ReaderWriterLockSlim _peersLock;
         private volatile NetPeer _headPeer;
-        private int _connectedPeersCount;
+        private volatile int _connectedPeersCount;
         private readonly List<NetPeer> _connectedPeerListCache;
         private NetPeer[] _peersArray;
         private readonly PacketLayerBase _extraPacketLayer;


numberB -> rhs

numberB -> rhs

--- MathParser/MathParser.cs
+++ MathParser/MathParser.cs
@@ -505,17 +505,17 @@

                 while ((opPlace = tokens.IndexOf(op.Key)) != -1)
                 {
-                    var numberB = double.Parse(tokens[opPlace + 1], CultureInfo);
+                    var rhs = double.Parse(tokens[opPlace + 1], CultureInfo);

                     if (op.Key == "-" && opPlace == 0)
                     {
-                        var result = op.Value(0.0, numberB);
+                        var result = op.Value(0.0, rhs);
                         tokens[0] = result.ToString(CultureInfo);
                         tokens.RemoveRange(opPlace + 1, 1);
                     }
                     else
                     {
-                        var result = op.Value(double.Parse(tokens[opPlace - 1], CultureInfo), numberB);
+                        var result = op.Value(double.Parse(tokens[opPlace - 1], CultureInfo), rhs);
                         tokens[opPlace - 1] = result.ToString(CultureInfo);
                         tokens.RemoveRange(opPlace, 2);
                     }


MidiChord now calls M.IntDivisionSizes.

MidiChord now calls M.IntDivisionSizes.

--- Moritz.Midi/MidiChord.cs
+++ Moritz.Midi/MidiChord.cs
@@ -4,6 +4,7 @@

 using Sanford.Multimedia.Midi;
 using Moritz.Spec;
+using Moritz.Globals;

 namespace Moritz.Midi
 {
@@ -19,7 +20,7 @@

             List<BasicMidiChordDef> basicMidiChordDefs = midiChordDef.BasicMidiChordDefs;
             Debug.Assert(basicMidiChordDefs.Count > 0);
-            List<int> realBasicMidiChordDurations = MidiChordDef.GetIntDurations(MsDuration, midiChordDef.BasicChordDurations, basicMidiChordDefs.Count);
+            List<int> realBasicMidiChordDurations = M.IntDivisionSizes(MsDuration, midiChordDef.BasicChordDurations);

             var notesToStop = new SortedSet<byte>();
             int i = 0;


NameCheckerの改行コード統一

NameCheckerの改行コード統一

--- NameChecker/MainClass.cs
+++ NameChecker/MainClass.cs
@@ -26,14 +26,14 @@

                 var pmx = args.Host.Connector.Pmx.GetCurrentState();

-                foreach ( var bone in pmx.Bone ) {
+                foreach ( var bone in pmx.Bone ) {
                     string name = CheckFinger( bone.Name );
-                    if ( name != null ) {
+                    if ( name != null ) {
                         bone.Name = name;
                         continue;
-                    }
+                    }
                     name = CheckIK( bone.Name );
-                    if ( name != null ) {
+                    if ( name != null ) {
                         bone.Name = name;
                         continue;
                     }
@@ -52,7 +52,7 @@
             string pattern = "((?:左|右).指)([1-3])";

             var m = Regex.Match( name, pattern );
-            if ( !m.Success ) {
+            if ( !m.Success ) {
                 return null;
             }

@@ -64,7 +64,7 @@
             string pattern = "((?:左|右)(?:足|つま先))IK";

             var m = Regex.Match( name, pattern );
-            if ( !m.Success ) {
+            if ( !m.Success ) {
                 return null;
             }


Use var declaration. Fix ArgumentNullException parameter name.

--- Pdf/PdfPageExtensions.cs
+++ Pdf/PdfPageExtensions.cs
@@ -19,19 +19,19 @@
     /// <returns>An enumeration of images contained on the page.</returns>
     public static IEnumerable<Image> GetImages(this PdfPage page, Func<PdfPage, int, Image, Image> filter = null)
     {
-      if (page == null) throw new ArgumentNullException("item", "The provided PDF page was null.");
+      if (page == null) throw new ArgumentNullException("page", "The provided PDF page was null.");
       if (filter == null) filter = (pg, idx, img) => img;

       int index = 0;
-      PdfDictionary resources = page.Elements.GetDictionary("/Resources");
+      var resources = page.Elements.GetDictionary("/Resources");
       if (resources != null) {
-        PdfDictionary xObjects = resources.Elements.GetDictionary("/XObject");
+        var xObjects = resources.Elements.GetDictionary("/XObject");
         if (xObjects != null) {
-          ICollection<PdfItem> items = xObjects.Elements.Values;
+          var items = xObjects.Elements.Values;
           foreach (PdfItem item in items) {
-            PdfReference reference = item as PdfReference;
+            var reference = item as PdfReference;
             if (reference != null) {
-              PdfDictionary xObject = reference.Value as PdfDictionary;
+              var xObject = reference.Value as PdfDictionary;
               if (xObject.IsImage()) {
                 yield return filter.Invoke(page, index++, xObject.ToImage());
               }


Sorting Layer changes.

Sorting Layer changes.

--- Player/PlayerMovement.cs
+++ Player/PlayerMovement.cs
@@ -156,6 +156,7 @@
 		}

 		CheckForFreefall();
+
 		SaveCurrentPosition();

 		// compute x and y movements
@@ -163,6 +164,7 @@
 		velocity.x = Mathf.Lerp(velocity.x, normalizedHorizontalSpeed * runSpeed, Time.deltaTime * smoothedMovementFactor);

 		ApplyGravity();
+
 		ClampYMovement();

 		controller.move(velocity * Time.deltaTime);


TitledFragment fix

TitledFragment fix

--- MasDev.Common/MasDev.Common.Droid/Source/App/TitledFragment.cs
+++ MasDev.Common/MasDev.Common.Droid/Source/App/TitledFragment.cs
@@ -33,19 +33,18 @@

 		#region View states managment

-		protected View LoadingLayout { set; get; }
+		protected View LoadingLayout { get; private set; }

-		protected View ErrorLayout { get; set; }
+		protected View ErrorLayout { get; private set; }

-		protected View ContentLayout { set; get; }
+		protected View ContentLayout { get; private set; }

-		protected View NoResultsLayout { set; get; }
+		protected View NoResultsLayout { get; private set; }

 		UiState? _uiState;
 		const int ANIMATION_DURATION = 400;
 		const string ALPHA = "alpha";
 		bool _useAnimation;
-

 		protected void InitStates (View rootView, int? loadingViewId, int? failureViewId, int? successFulViewId, int? noResultsViewId, bool useAnimation = true)
 		{
@@ -64,8 +63,6 @@
 			if (NoResultsLayout != null)
 				NoResultsLayout.SetInvisible ();
 		}
-
-

 		protected UiState UiState {
 			get { return _uiState.Value; }
@@ -90,7 +87,6 @@
 				}
 			}
 		}
-

 		void ShowLoadingUi ()
 		{
@@ -135,14 +131,13 @@
 			FadeOut (ContentLayout);
 			FadeOut (ErrorLayout);
 		}
-
-
+
 		void FadeIn (View layoutToShow)
 		{
 			if (layoutToShow.Visibility == ViewStates.Visible && !(layoutToShow.Tag != null && (bool)layoutToShow.Tag))
 				return;

-			layoutToShow.Tag = false; //isHiding = false
+			layoutToShow.Tag = false; // isHiding = false
 			if (_useAnimation)
 				ObjectAnimator.OfFloat (layoutToShow, ALPHA, 0f, 1f).SetDuration (ANIMATION_DURATION).Start ();

@@ -155,10 +150,10 @@
 				return;

 			if (_useAnimation) {
-				layoutToHide.Tag = true; //isHiding = true
+				layoutToHide.Tag = true; // isHiding = true
 				var an = ObjectAnimator.OfFloat (layoutToHide, ALPHA, 1f, 0f).SetDuration (ANIMATION_DURATION);
 				an.AnimationEnd += delegate {
-					if ((bool)layoutToHide.Tag) {
+					if ((bool)layoutToHide.Tag) { // if the layout is set to Visible during the animation, I don't want to set it as Invisible when the animation ends.
 						layoutToHide.SetInvisible ();
 					}
 				};


Fix Datepicker with popover

Fix Datepicker with popover

--- Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs
+++ Xwt.Gtk/Xwt.GtkBackend/DatePickerBackend.cs
@@ -4,6 +4,7 @@
 // Author:
 //       Jérémie Laval <jeremie.laval@xamarin.com>
 //       Vsevolod Kukol <sevo@sevo.org>
+//       Claudio Rodrigo Pereyra Diaz <claudiorodrigo@pereyradiaz.com.ar>
 //
 // Copyright (c) 2012 Xamarin, Inc.
 //
@@ -46,11 +47,11 @@
 			get { return (GtkDatePicker)base.Widget; }
 			set { base.Widget = value; }
 		}
-
+
 		protected new IDatePickerEventSink EventSink {
 			get { return (IDatePickerEventSink)base.EventSink; }
 		}
-
+
 		public DateTime DateTime {
 			get {
 				return Widget.DateTime;
@@ -86,7 +87,7 @@
 				Widget.Style = value;
 			}
 		}
-
+
 		public override void EnableEvent (object eventId)
 		{
 			base.EnableEvent (eventId);
@@ -95,7 +96,7 @@
 					Widget.ValueChanged += HandleValueChanged;
 			}
 		}
-
+
 		public override void DisableEvent (object eventId)
 		{
 			base.DisableEvent (eventId);
@@ -111,29 +112,29 @@
 				EventSink.ValueChanged ();
 			});
 		}
-
+
 		public class GtkDatePickerEntry : Gtk.SpinButton
 		{
 			static string[] styleFormats = new string[3];

 			static GtkDatePickerEntry ()
 			{
-				styleFormats[(int)DatePickerStyle.Date] = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
+				styleFormats [(int)DatePickerStyle.Date] = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
 				// we use a custom static long time pattern, since we do not support 12/24 formats
 				string timeSeparator = CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator;
-				styleFormats[(int)DatePickerStyle.Time] = "HH" + timeSeparator + "mm" + timeSeparator + "ss";
-				styleFormats[(int)DatePickerStyle.DateTime] = styleFormats[(int)DatePickerStyle.Date] + " " + styleFormats[(int)DatePickerStyle.Time];
-			}
-
-			Dictionary<DateTimeComponent, int> componentPosition = new Dictionary<DateTimeComponent, int>();
-			Dictionary<DateTimeComponent, int> componentLength = new Dictionary<DateTimeComponent, int>();
-			List<DateTimeComponent> componentsSorted = new List<DateTimeComponent>();
+				styleFormats [(int)DatePickerStyle.Time] = "HH" + timeSeparator + "mm" + timeSeparator + "ss";
+				styleFormats [(int)DatePickerStyle.DateTime] = styleFormats [(int)DatePickerStyle.Date] + " " + styleFormats [(int)DatePickerStyle.Time];
+			}
+
+			Dictionary<DateTimeComponent, int> componentPosition = new Dictionary<DateTimeComponent, int> ();
+			Dictionary<DateTimeComponent, int> componentLength = new Dictionary<DateTimeComponent, int> ();
+			List<DateTimeComponent> componentsSorted = new List<DateTimeComponent> ();

-			public EventHandler ValueChanged;
+			public new EventHandler ValueChanged;

 			DateTimeComponent selectedComponent = DateTimeComponent.None;

-			GtkClipboardBackend clipboard = new GtkClipboardBackend();
+			GtkClipboardBackend clipboard = new GtkClipboardBackend ();

 			DateTime currentValue = DateTime.MinValue;

@@ -171,7 +172,8 @@
 			}

 			DatePickerStyle style;
-			public DatePickerStyle Style {
+
+			public new DatePickerStyle Style {
 				get {
 					return style;
 				}
@@ -210,10 +212,10 @@
 			public GtkDatePickerEntry () : this (DatePickerStyle.DateTime)
 			{
 			}
-
+
 			public GtkDatePickerEntry (DatePickerStyle style) : base (DateTime.MinValue.Ticks,
-			                                                          DateTime.MaxValue.Ticks,
-			                                                          TimeSpan.TicksPerSecond)
+				                                                         DateTime.MaxValue.Ticks,
+				                                                         TimeSpan.TicksPerSecond)
 			{
 				Style = style;

@@ -228,22 +230,16 @@
 			{
 				if (Math.Abs (Adjustment.Value - currentValue.Ticks) < 1)
 					return;
-				}
-				double currentValue = oldValue;
-
-				if (selectedComponent == DateTimeComponent.None) {
-					if (style == DatePickerStyle.Date)
-						SelectComponent (DateTimeComponent.Day);
-					else
-						SelectComponent (componentsSorted.Last ());
-				}
+
+				if (selectedComponent == DateTimeComponent.None)
+					SelectComponent (componentsSorted.Last ());

 				if (Adjustment.Value > currentValue.Ticks)
 					DateTime = currentValue.AddComponent (selectedComponent, 1);
 				else if (Adjustment.Value < currentValue.Ticks)
 					DateTime = currentValue.AddComponent (selectedComponent, -1);
 			}
-
+
 			protected override int OnOutput ()
 			{
 				DateTime dateTime = new DateTime ((long)Adjustment.Value);
@@ -252,7 +248,7 @@
 				Text = dateTime.ToString (format);
 				return 1;
 			}
-
+
 			protected override int OnInput (out double new_value)
 			{
 				new_value = Adjustment.Value;
@@ -280,13 +276,13 @@

 			protected override void OnClipboardPasted ()
 			{
-				if (clipboard.IsTypeAvailable(TransferDataType.Text)) {
-					var newText = clipboard.GetData(TransferDataType.Text) as string;
+				if (clipboard.IsTypeAvailable (TransferDataType.Text)) {
+					var newText = clipboard.GetData (TransferDataType.Text) as string;
 					DateTime newDateTime;
 					if (DateTime.TryParse (newText, out newDateTime))
 						DateTime = newDateTime;
-					else  if (componentLength.ContainsKey (selectedComponent)
-					          && componentLength[selectedComponent] == newText.Length) {
+					else if (componentLength.ContainsKey (selectedComponent)
+					         && componentLength [selectedComponent] == newText.Length) {

 						try {
 							var value = int.Parse (newText);
@@ -299,6 +295,7 @@
 			}

 			Gdk.Window entryWindow;
+
 			Gdk.Window EntryWindow {
 				get {
 					if (entryWindow == null) {
@@ -333,7 +330,7 @@
 					return entryWindow;
 				}
 			}
-
+
 			protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
 			{
 				// handle left click only
@@ -349,27 +346,26 @@
 				GetLayoutOffsets (out layoutX, out layoutY);
 				int index, trailing;
 				bool insideLayout = Layout.XyToIndex (Pango.Units.FromPixels ((int)evnt.X),
-				                                      Pango.Units.FromPixels ((int)evnt.Y),
-				                                      out index,
-				                                      out trailing);
+					                    Pango.Units.FromPixels ((int)evnt.Y),
+					                    out index,
+					                    out trailing);

 				if (insideLayout) {
 					SelectComponentAtPosition (TextIndexToLayoutIndex (index));
 					GrabFocus ();
 					return false;
-				} else {
-					return base.OnButtonPressEvent (evnt);
 				}
 				SelectComponent (DateTimeComponent.None);
 				return base.OnButtonPressEvent (evnt);
 			}

 			int currentDigitInsert;
+
 			protected override bool OnKeyReleaseEvent (Gdk.EventKey evnt)
 			{
 				char pressedKey = (char)Gdk.Keyval.ToUnicode (evnt.KeyValue);

-				if (char.IsWhiteSpace(pressedKey) || char.IsPunctuation (pressedKey) || char.IsSeparator (pressedKey)) {
+				if (char.IsWhiteSpace (pressedKey) || char.IsPunctuation (pressedKey) || char.IsSeparator (pressedKey)) {
 					if (pressedKey != '\t') // exclude tab
 						SelectNextComponent ();
 				}
@@ -378,7 +374,7 @@
 					try {
 						DateTime current = DateTime;
 						current = current.SetComponent (selectedComponent, AddDigitToValue (current.GetComponent (selectedComponent), pressedKey));
-						if (currentDigitInsert < componentLength[selectedComponent] - 1)
+						if (currentDigitInsert < componentLength [selectedComponent] - 1)
 							currentDigitInsert++;
 						else
 							currentDigitInsert = 0;
@@ -404,7 +400,7 @@
 					return int.Parse (newValue.ToString ());
 				return int.Parse (baseValue.ToString () + newValue);
 			}
-
+
 			protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
 			{

@@ -423,7 +419,7 @@
 				// (i.e. navigation keys)
 				uint value = Gdk.Keyval.ToUnicode (evnt.KeyValue);
 				var xwtModifiers = evnt.State.ToXwtValue ();
-				if (value == 0 || value == '\t' || xwtModifiers.HasFlag(ModifierKeys.Control) || xwtModifiers.HasFlag (ModifierKeys.Alt))
+				if (value == 0 || value == '\t' || xwtModifiers.HasFlag (ModifierKeys.Control) || xwtModifiers.HasFlag (ModifierKeys.Alt))
 					return base.OnKeyPressEvent (evnt);
 				return true;
 			}
@@ -431,7 +427,7 @@
 			void SelectComponentAtPosition (int characterIndex)
 			{
 				foreach (var entry in componentPosition) {
-					if (characterIndex >= entry.Value  && characterIndex <= entry.Value + componentLength [entry.Key]) {
+					if (characterIndex >= entry.Value && characterIndex <= entry.Value + componentLength [entry.Key]) {
 						SelectComponent (entry.Key);
 						return;
 					}
@@ -443,8 +439,8 @@
 			{
 				int startPos, endPos;
 				if (componentPosition.ContainsKey (component) && componentLength.ContainsKey (component)) {
-					startPos = componentPosition[component];
-					endPos = startPos + componentLength[component];
+					startPos = componentPosition [component];
+					endPos = startPos + componentLength [component];
 				} else {
 					startPos = CursorPosition;
 					endPos = CursorPosition;
@@ -460,13 +456,13 @@
 			void SelectNextComponent ()
 			{
 				if (selectedComponent == DateTimeComponent.None ||
-				        componentsSorted.IndexOf (selectedComponent) == componentsSorted.Count - 1)
+				    componentsSorted.IndexOf (selectedComponent) == componentsSorted.Count - 1)
 					selectedComponent = componentsSorted [0];
 				else
 					selectedComponent = componentsSorted [componentsSorted.IndexOf (selectedComponent) + 1];

-				int startPos = componentPosition[selectedComponent];
-				int endPos = startPos + componentLength[selectedComponent];
+				int startPos = componentPosition [selectedComponent];
+				int endPos = startPos + componentLength [selectedComponent];
 				SelectRegion (startPos, endPos);
 				currentDigitInsert = 0;
 			}
@@ -474,17 +470,17 @@
 			void SelectPrevComponent ()
 			{
 				if (selectedComponent == DateTimeComponent.None ||
-				        componentsSorted.IndexOf (selectedComponent) == 0)
+				    componentsSorted.IndexOf (selectedComponent) == 0)
 					selectedComponent = componentsSorted [componentsSorted.Count - 1];
 				else
 					selectedComponent = componentsSorted [componentsSorted.IndexOf (selectedComponent) - 1];

-				int startPos = componentPosition[selectedComponent];
-				int endPos = startPos + componentLength[selectedComponent];
+				int startPos = componentPosition [selectedComponent];
+				int endPos = startPos + componentLength [selectedComponent];
 				SelectRegion (startPos, endPos);
 				currentDigitInsert = 0;
 			}
-
+
 			void RaiseChangedEvent ()
 			{
 				var tmp = ValueChanged;
@@ -492,7 +488,7 @@
 					tmp (this, EventArgs.Empty);
 			}

-			[Obsolete("Use DateTime property instead.")]
+			[Obsolete ("Use DateTime property instead.")]
 			public DateTime CurrentValue {
 				get {
 					return DateTime;
@@ -551,25 +547,25 @@
 				}
 			}

-			public DateTime MinDateTime {
-				get {
-					return datepickerentry.MinDateTime;
-				}
-				set {
-					datepickerentry.MinDateTime = value;
-				}
-			}
-
-			public DateTime MaxDateTime {
-				get {
-					return datepickerentry.MaxDateTime;
-				}
-				set {
-					datepickerentry.MaxDateTime = value;
-				}
-			}
-
-			public DatePickerStyle DateTimeStyle {
+			public DateTime MinimumDateTime {
+				get {
+					return datepickerentry.MinimumDateTime;
+				}
+				set {
+					datepickerentry.MinimumDateTime = value;
+				}
+			}
+
+			public DateTime MaximumDateTime {
+				get {
+					return datepickerentry.MaximumDateTime;
+				}
+				set {
+					datepickerentry.MaximumDateTime = value;
+				}
+			}
+
+			public new DatePickerStyle Style {
 				get {
 					return datepickerentry.Style;
 				}
@@ -664,7 +660,8 @@
 		}
 	}

-	enum DateTimeComponent {
+	enum DateTimeComponent
+	{
 		None = 0,
 		Month,
 		Day,
@@ -676,47 +673,47 @@

 	static class DateTimeExtensions
 	{
-		public static DateTime AddComponent(this DateTime dateTime, DateTimeComponent component, int value)
+		public static DateTime AddComponent (this DateTime dateTime, DateTimeComponent component, int value)
 		{
 			try {
 				switch (component) {
-					case DateTimeComponent.Second:
-						return dateTime.AddSeconds (value);
-					case DateTimeComponent.Minute:
-						return dateTime.AddMinutes (value);
-					case DateTimeComponent.Hour:
-						return dateTime.AddHours (value);
-					case DateTimeComponent.Day:
-						return dateTime.AddDays (value);
-					case DateTimeComponent.Month:
-						return dateTime.AddMonths (value);
-					case DateTimeComponent.Year:
-						return dateTime.AddYears (value);
-					default:
-						return dateTime.AddSeconds (value);
+				case DateTimeComponent.Second:
+					return dateTime.AddSeconds (value);
+				case DateTimeComponent.Minute:
+					return dateTime.AddMinutes (value);
+				case DateTimeComponent.Hour:
+					return dateTime.AddHours (value);
+				case DateTimeComponent.Day:
+					return dateTime.AddDays (value);
+				case DateTimeComponent.Month:
+					return dateTime.AddMonths (value);
+				case DateTimeComponent.Year:
+					return dateTime.AddYears (value);
+				default:
+					return dateTime.AddSeconds (value);
 				}
 			} catch (ArgumentOutOfRangeException) {
 				return dateTime;
 			}
 		}

-		public static int GetComponent(this DateTime dateTime, DateTimeComponent component)
+		public static int GetComponent (this DateTime dateTime, DateTimeComponent component)
 		{
 			switch (component) {
-				case DateTimeComponent.Second:
-					return dateTime.Second;
-				case DateTimeComponent.Minute:
-					return dateTime.Minute;
-				case DateTimeComponent.Hour:
-					return dateTime.Hour;
-				case DateTimeComponent.Day:
-					return dateTime.Day;
-				case DateTimeComponent.Month:
-					return dateTime.Month;
-				case DateTimeComponent.Year:
-					return dateTime.Year;
-				default:
-					return 0;
+			case DateTimeComponent.Second:
+				return dateTime.Second;
+			case DateTimeComponent.Minute:
+				return dateTime.Minute;
+			case DateTimeComponent.Hour:
+				return dateTime.Hour;
+			case DateTimeComponent.Day:
+				return dateTime.Day;
+			case DateTimeComponent.Month:
+				return dateTime.Month;
+			case DateTimeComponent.Year:
+				return dateTime.Year;
+			default:
+				return 0;
 			}
 		}

@@ -729,20 +726,20 @@
 			int minute = source.Minute;
 			int second = source.Second;
 			switch (component) {
-				case DateTimeComponent.Year:
-					return new DateTime (newValue, month, day, hour, minute, second);
-				case DateTimeComponent.Month:
-					return new DateTime (year, newValue, day, hour, minute, second);
-				case DateTimeComponent.Day:
-					return new DateTime (year, month, newValue, hour, minute, second);
-				case DateTimeComponent.Hour:
-					return new DateTime (year, month, day, newValue, minute, second);
-				case DateTimeComponent.Minute:
-					return new DateTime (year, month, day, hour, newValue, second);
-				case DateTimeComponent.Second:
-					return new DateTime (year, month, day, hour, minute, newValue);
-				default:
-					return source;
+			case DateTimeComponent.Year:
+				return new DateTime (newValue, month, day, hour, minute, second);
+			case DateTimeComponent.Month:
+				return new DateTime (year, newValue, day, hour, minute, second);
+			case DateTimeComponent.Day:
+				return new DateTime (year, month, newValue, hour, minute, second);
+			case DateTimeComponent.Hour:
+				return new DateTime (year, month, day, newValue, minute, second);
+			case DateTimeComponent.Minute:
+				return new DateTime (year, month, day, hour, newValue, second);
+			case DateTimeComponent.Second:
+				return new DateTime (year, month, day, hour, minute, newValue);
+			default:
+				return source;
 			}
 		}
 	}


Added TextToToken unit tests

Added TextToToken unit tests

--- NBi.Testing.Core/Transformation/Transformer/Native/TextTest.cs
+++ NBi.Testing.Core/Transformation/Transformer/Native/TextTest.cs
@@ -15,6 +15,36 @@
     public class TextTest
     {
         [Test]
+        [TestCase(0, "1 2017-07-06      CUST0001", "1")]
+        [TestCase(1, "1 2017-07-06      CUST0001", "2017-07-06")]
+        [TestCase(2, "1 2017-07-06      CUST0001", "CUST0001")]
+        public void Execute_TextToToken_DefaultSeparator(int index, string value, string expected)
+        {
+            var function = new TextToToken(new LiteralScalarResolver<int>(index));
+            var result = function.Evaluate(value);
+            Assert.That(result, Is.EqualTo(expected));
+        }
+
+        [Test]
+        [TestCase(0, ';', "1;2017-07-06;CUST0001", "1")]
+        [TestCase(1, ',', "1,      2017-07-06,CUST0001", "2017-07-06")]
+        [TestCase(2, '|', "1 | 2017-07-06 | CUST0001", "CUST0001")]
+        public void Execute_TextToToken_CustomSeparator(int index, char separator, string value, string expected)
+        {
+            var function = new TextToToken(new LiteralScalarResolver<int>(index), new LiteralScalarResolver<char>(separator));
+            var result = function.Evaluate(value);
+            Assert.That(result, Is.EqualTo(expected));
+        }
+
+        [Test]
+        [TestCase(99, "1 2017-07-06 CUST0001")]
+        public void Execute_TextToToken_IndexOutOfRange(int index, string value)
+        {
+            var function = new TextToToken(new LiteralScalarResolver<int>(index));
+            Assert.Throws<IndexOutOfRangeException>(() => function.Evaluate(value));
+        }
+
+        [Test]
         [TestCase("")]
         [TestCase("(null)")]
         [TestCase("\t")]


Made Weapon class public, was causing an accessibility error

--- Navier-Boats/Navier-Boats/Navier-Boats/Game/Entities/Weapon.cs
+++ Navier-Boats/Navier-Boats/Navier-Boats/Game/Entities/Weapon.cs
@@ -19,7 +19,7 @@

 namespace Navier_Boats.Game.Entities
 {
-    class Weapon : Entity, IInteractable
+    public class Weapon : Entity, IInteractable
     {
         enum WeaponState
         {


Literal text was repeated, extract it

Literal text was repeated, extract it

--- NuKeeper.Tests/RepositoryInspection/PackagesFileReaderTests.cs
+++ NuKeeper.Tests/RepositoryInspection/PackagesFileReaderTests.cs
@@ -8,7 +8,13 @@
     [TestFixture]
     public class PackagesFileReaderTests
     {
-        private const string PackagesFileWithPackages = @"<?xml version=""1.0"" encoding=""utf-8""?>
+        const string PackagesFileWithSinglePackage =
+            @"<?xml version=""1.0"" encoding=""utf-8""?>
+<packages>
+  <package id=""foo"" version=""1.2.3.4"" targetFramework=""net45"" />
+</packages>";
+
+        private const string PackagesFileWithTwoPackages = @"<?xml version=""1.0"" encoding=""utf-8""?>
 <packages>
   <package id=""foo"" version=""1.2.3.4"" targetFramework=""net45"" />
   <package id=""bar"" version=""2.3.4.5"" targetFramework=""net45"" />
@@ -31,13 +37,7 @@
         [Test]
         public void SinglePackageShouldBeRead()
         {
-            const string singlePackage =
-@"<?xml version=""1.0"" encoding=""utf-8""?>
-<packages>
-  <package id=""foo"" version=""1.2.3.4"" targetFramework=""net45"" />
-</packages>";
-
-            var packages = PackagesFileReader.Read(singlePackage, TempPath());
+            var packages = PackagesFileReader.Read(PackagesFileWithSinglePackage, TempPath());

             Assert.That(packages, Is.Not.Null);
             Assert.That(packages, Is.Not.Empty);
@@ -46,13 +46,7 @@
         [Test]
         public void SinglePackageShouldBePopulated()
         {
-            const string singlePackage =
-                @"<?xml version=""1.0"" encoding=""utf-8""?>
-<packages>
-  <package id=""foo"" version=""1.2.3.4"" targetFramework=""net45"" />
-</packages>";
-
-            var packages = PackagesFileReader.Read(singlePackage, TempPath());
+            var packages = PackagesFileReader.Read(PackagesFileWithSinglePackage, TempPath());

             var package = packages.FirstOrDefault();
             PackageAssert.IsPopulated(package);
@@ -61,13 +55,7 @@
         [Test]
         public void SinglePackageShouldBeCorrect()
         {
-            const string singlePackage =
-                @"<?xml version=""1.0"" encoding=""utf-8""?>
-<packages>
-  <package id=""foo"" version=""1.2.3.4"" targetFramework=""net45"" />
-</packages>";
-
-            var packages = PackagesFileReader.Read(singlePackage, TempPath());
+            var packages = PackagesFileReader.Read(PackagesFileWithSinglePackage, TempPath());

             var package = packages.FirstOrDefault();

@@ -79,7 +67,7 @@
         [Test]
         public void TwoPackagesShouldBePopulated()
         {
-            var packages = PackagesFileReader.Read(PackagesFileWithPackages, TempPath())
+            var packages = PackagesFileReader.Read(PackagesFileWithTwoPackages, TempPath())
                 .ToList();

             Assert.That(packages, Is.Not.Null);
@@ -92,7 +80,7 @@
         [Test]
         public void TwoPackagesShouldBeRead()
         {
-            var packages = PackagesFileReader.Read(PackagesFileWithPackages, TempPath())
+            var packages = PackagesFileReader.Read(PackagesFileWithTwoPackages, TempPath())
                 .ToList();

             Assert.That(packages.Count, Is.EqualTo(2));
@@ -109,7 +97,7 @@
         {
             var path = TempPath();

-            var packages = PackagesFileReader.Read(PackagesFileWithPackages, path);
+            var packages = PackagesFileReader.Read(PackagesFileWithTwoPackages, path);

             foreach (var package in packages)
             {


modified again

modified again


Writingsystemsetupmodel now gives the consuming app an opportunity to object to deletion.

--- PalasoUIWindowsForms/WritingSystems/WritingSystemSetupModel.cs
+++ PalasoUIWindowsForms/WritingSystems/WritingSystemSetupModel.cs
@@ -867,6 +867,13 @@
 		/// </summary>
 		public event EventHandler CurrentItemUpdated;

+		/// <summary>
+		/// Fired when the user clicks "Delete" but before the WS is deleted in the repo.
+		/// Used to notify the consuming application of a deletion, and process a boolean response
+		/// from the app as to whether it can delete the WS or not (i.e. the WS is in use)
+		/// </summary>
+		public event BeforeDeletedEventHandler BeforeDeleted;
+
 		#endregion

 		public InputLanguage FindInputLanguage(string name)
@@ -902,6 +909,15 @@
 			{
 				throw new InvalidOperationException("Unable to delete current selection when there is no current selection.");
 			}
+
+			var beforeDeletedEventArgs = new BeforeDeletedEventArgs(CurrentDefinition.Id);
+			BeforeDeleted(this, beforeDeletedEventArgs);
+			if (!beforeDeletedEventArgs.CanDelete)
+			{
+				Reporting.ErrorReport.NotifyUserOfProblem(String.Format("The writing system with id '{0}' is still in use and may not be deleted.", CurrentDefinition.Id));
+				return;
+			}
+
 			// new index will be next writing system or previous if this was the last in the list
 			int newIndex = (CurrentIndex == WritingSystemCount - 1) ? CurrentIndex - 1 : CurrentIndex;
 			string idToDelete = CurrentDefinition.StoreID;
@@ -1255,4 +1271,16 @@
 			return languageName;
 		}
 	}
+
+	public delegate void BeforeDeletedEventHandler(object sender, BeforeDeletedEventArgs args);
+
+	public class BeforeDeletedEventArgs : EventArgs
+	{
+		public BeforeDeletedEventArgs(string writingSystemid)
+		{
+			WritingSystemId = writingSystemid;
+		}
+		public string WritingSystemId{get; private set;}
+		public bool CanDelete;
+	}
 }


Bring Attention to the Quick Access Panel On Page Load

--- Portal.CMS.Web/Areas/Admin/Views/Dashboard/_QuickAccess.cshtml
+++ Portal.CMS.Web/Areas/Admin/Views/Dashboard/_QuickAccess.cshtml
@@ -1,6 +1,6 @@
 @model Portal.CMS.Web.Areas.Admin.ViewModels.Dashboard.QuickAccessViewModel

-

+

     @foreach (var category in Model.Categories)
     {
         @category.DesktopText@category.MobileText


Fix display in burst/motionshot mode

Fix display in burst/motionshot mode

--- Project/uwpmm/uwpmm.Shared/DataModel/LiveviewScreenViewData.cs
+++ Project/uwpmm/uwpmm.Shared/DataModel/LiveviewScreenViewData.cs
@@ -101,7 +101,9 @@
                     case ShootModeParam.Still:
                         if (Device.Status.ContShootingMode != null &&
                             (Device.Status.ContShootingMode.Current == ContinuousShootMode.Cont ||
-                            Device.Status.ContShootingMode.Current == ContinuousShootMode.SpeedPriority))
+                            Device.Status.ContShootingMode.Current == ContinuousShootMode.SpeedPriority ||
+                            Device.Status.ContShootingMode.Current == ContinuousShootMode.Burst ||
+                            Device.Status.ContShootingMode.Current == ContinuousShootMode.MotionShot))
                         {
                             return ContShootingImage;
                         }


Update TranslationsGerman.cs

Update TranslationsGerman.cs

--- RelhaxModpack/RelhaxModpack/Translations/TranslationsGerman.cs
+++ RelhaxModpack/RelhaxModpack/Translations/TranslationsGerman.cs
@@ -83,7 +83,7 @@
             German.Add("backupModsSizeCalculating", "Berechne Größe des Backups...");
             German.Add("BackupModsCBDescription", "Wähle diese Option, um ein Backup deiner aktuellen Mod-Installation zu erstellen. "+
                      "Diese werden im Ordner 'RelHaxModBackup' als ZIP-Datei mit einem Zeitstempel gespeichert.");
-            German.Add("BackupModsSizeLabelUsedDescription", Translations.TranslationNeeded);
+            German.Add("BackupModsSizeLabelUsedDescription", "Wenn aktiviert, sichert der Installationsprogramm Ihre aktuellen Mods-Installationsordner an den angegebenen Ort");
             German.Add("SaveLastInstallText", "Speicherung der letzten Installation");
             German.Add("SaveLastInstallCBDescription", "Wenn diese Option aktiviert ist, wendet das Installationsprogramm automatisch deine zuletzt verwendete Auswahl an");
             German.Add("MinimizeToSystemTrayText", "Ins Benachrichtigungsfeld minimieren");
@@ -138,9 +138,9 @@
             German.Add("LauchEditorText", "Starte Datenbank Editor");
             German.Add("LauchEditorDescription", "Starte den Datenbank Editor von hier, anstatt über die Befehlszeile");
             German.Add("LauchPatchDesignerText", "Starte Patch Designer");
-            German.Add("LauchPatchDesignerDescription", Translations.TranslationNeeded);
-            German.Add("LauchAutomationRunnerText", Translations.TranslationNeeded);
-            German.Add("LauchAutomationRunnerDescription", Translations.TranslationNeeded);
+            German.Add("LauchPatchDesignerDescription", "Starte den Patch Designer von hier, anstatt über die Befehlszeile");
+            German.Add("LauchAutomationRunnerText", "Starte den Automation Runner");
+            German.Add("LauchAutomationRunnerDescription", "Starte den Automation Runner von hier, anstatt über die Befehlszeile");
             German.Add("InstallWhileDownloadingText", "Entpacke während des Downloads");
             German.Add("InstallWhileDownloadingCBDescription", "Wenn aktiviert, der Installer wird die Zip-Dateien sofort nach dem Download entpacken" +
                 " und nicht erst auf das Herunterladen aller Dateien warten bevor mit dem Entpacken begonnen wird.");


One final bit of error handling. Actual alpha release.

--- Driver.cs
+++ Driver.cs
@@ -26,6 +26,10 @@
                     var bFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
                     games = (List<Game>)bFormatter.Deserialize(stream);
                 }
+            }
+            else
+            {
+                games = new List<Game>();
             }

             //Kick off a new thread to start backing up games.


replacing windows eol with unix eol for import-sql books (#3396)

--- Source/ACE.Server/Command/Handlers/DeveloperContentCommands.cs
+++ Source/ACE.Server/Command/Handlers/DeveloperContentCommands.cs
@@ -1021,6 +1021,8 @@
         public static void ImportSQL(string sqlFile)
         {
             var sqlCommands = File.ReadAllText(sqlFile);
+
+            sqlCommands = sqlCommands.Replace("\r\n", "\n");

             // not sure why ExecuteSqlCommand doesn't parse this correctly..
             var idx = sqlCommands.IndexOf($"/* Lifestoned Changelog:");


removed warnings

removed warnings

--- SqlServerSpatialTypes.Toolkit/Extensions/SqlTypesExtensions.cs
+++ SqlServerSpatialTypes.Toolkit/Extensions/SqlTypesExtensions.cs
@@ -54,7 +54,7 @@
 				retGeom = v_geomsToKeep.AggregateSqlGeometry();

 			}
-			catch (Exception v_ex)
+			catch (Exception)
 			{
 				throw;
 			}


Flood Fill Demo

Flood Fill Demo


Make sure we order by sequence

Make sure we order by sequence

--- XamarinApp/MyTrips/MyTrips.DataStore.Azure/Stores/TripStore.cs
+++ XamarinApp/MyTrips/MyTrips.DataStore.Azure/Stores/TripStore.cs
@@ -4,6 +4,7 @@
 using System.Threading.Tasks;
 using MyTrips.Utils;
 using System.Collections.Generic;
+using System.Linq;

 namespace MyTrips.DataStore.Azure.Stores
 {
@@ -42,6 +43,9 @@
             foreach(var photo in photos)
                 item.Photos.Add(photo);

+
+            item.Points = item.Points.OrderBy(p => p.Sequence).ToArray();
+
             return item;
         }
     }


changed exceptionLog: exclude type, if type is already defined

--- RelicModManager/Utils.cs
+++ RelicModManager/Utils.cs
@@ -189,26 +189,31 @@
             if (e is WebException)
             {
                 errorType = "WebException";
+                type = "";
             }
             else if (e is IOException)
             {
                 errorType = "IOException";
+                type = "";
             }
             else if (e is UnauthorizedAccessException)
             {
                 errorType = "UnauthorizedAccessException";
+                type = "";
             }
             else if (e is ArgumentException)
             {
                 errorType = "ArgumentException";
                 innerException = "";
                 data = "";
+                type = "";
             }
             else if (e is ZipException)
             {
                 errorType = "ZipException";
                 innerException = "";
                 data = "";
+                type = "";
             }
             string msgHeader = "";
             try { msgHeader = string.Format("{0} {1}(call stack traceback)\n", errorType, msgString.Equals("") || msgString == null ? "" : string.Format(@"at ""{0}"" ", msgString)); } catch { };


Volatile Logger

Volatile Logger

--- Logger.cs
+++ Logger.cs
@@ -19,11 +19,20 @@
             Logger.Writer(s);
         }

-        public static Action<String> Writer
-        {
-            set; private get;
-        } = (String s) => {
+        private static volatile Action<String> _Writer = (String s) => {
             Trace.WriteLine(s);
         };
+
+        public static Action<String> Writer
+        {
+            set
+            {
+                Logger._Writer = value;
+            }
+            private get
+            {
+                return Logger._Writer;
+            }
+        }
     }
 }