Still testing. Had to take out the fixed column sizes for each... Wait one more thing.

--- Badges/Views/Shared/_ExperienceWork.cshtml
+++ Badges/Views/Shared/_ExperienceWork.cshtml
@@ -4,12 +4,12 @@

         @foreach (var work in @Model.SupportingWorks)
         {
-

+        	@*
 *@

 	                @Html.Partial("_ViewWork", work)

@work.Description

-

+            @*
 *@
         }


Add FATDS to position

Add FATDS to position

--- BatteryCommander.Common/Models/Position.cs
+++ BatteryCommander.Common/Models/Position.cs
@@ -34,9 +34,6 @@
         [Display(Name = "Ammo Section Sergeant", ShortName = "AMMO SGT")]
         Ammo_Section_Sergeant,

-        [Display(Name = "Ammo Section Chief", ShortName = "AMMO CHF")]
-        Ammo_Section_Chief,
-
         [Display(Name = "Ammo Team Chief", ShortName = "ATC")]
         Ammo_Team_Chief,

@@ -51,6 +48,9 @@

         [Display(Name = "Gunner", ShortName = "G")]
         Gunner,
+
+        [Display(Name = "Field Artillery Tactical Data Specialist", ShortName = "FATDS")]
+        FATDS,

         [Display(Name = "Section Chief", ShortName = "CHF")]
         Gun_Section_Chief,


WriteHeader is a virtual function to allow changing behaviour on derivated classes.

--- BennuLib/BennuLib.Core/IO/NativeEncoder.cs
+++ BennuLib/BennuLib.Core/IO/NativeEncoder.cs
@@ -8,7 +8,14 @@

         protected abstract byte GetLastHeaderByte ( T what );

-        protected abstract void WriteNativeFormatBody ( T obj, NativeFormatWriter writer );
+        protected abstract void WriteNativeFormatBody ( T what, NativeFormatWriter writer );
+
+        protected virtual void WriteNativeFormatHeader ( T what, NativeFormatWriter writer )
+        {
+            writer.WriteAsciiZ ( GetFileMagic ( what ).Substring ( 0, 3 ), 3 );
+            writer.Write ( NativeFormat.Terminator );
+            writer.Write ( GetLastHeaderByte ( what ) );
+        }

         protected abstract string GetFileMagic ( T what );

@@ -36,9 +43,7 @@

             using ( NativeFormatWriter writer = new NativeFormatWriter ( output ) )
             {
-                writer.WriteAsciiZ ( GetFileMagic ( what ).Substring ( 0, 3 ), 3 );
-                writer.Write ( NativeFormat.Terminator );
-                writer.Write ( GetLastHeaderByte ( what ) );
+                WriteNativeFormatHeader ( what, writer );
                 WriteNativeFormatBody ( what, writer );
             }
         }


don't allow dot when cleaning identifier

--- samples/xcst-codegen/Program.cs
+++ samples/xcst-codegen/Program.cs
@@ -98,7 +98,7 @@

       // Transforms invalid identifier (class, namespace, variable) characters
       string CleanIdentifier(string identifier) =>
-         Regex.Replace(identifier, "[^a-z0-9_.]", "_", RegexOptions.IgnoreCase);
+         Regex.Replace(identifier, "[^a-z0-9_]", "_", RegexOptions.IgnoreCase);

       // Show compilation errors on Visual Studio's Error List
       // Also makes the error on the Output window clickable
@@ -193,7 +193,10 @@
                   string relativeDir = startUri.MakeRelativeUri(new Uri(Path.GetDirectoryName(file), UriKind.Absolute))
                      .OriginalString;

-                  ns = ns + "." + CleanIdentifier(relativeDir.Replace("/", "."));
+                  ns = String.Join(".", new[] { ns }.Concat(
+                     relativeDir
+                        .Split('/')
+                        .Select(n => CleanIdentifier(n))));
                }

                compiler.TargetClass = "_Page_" + CleanIdentifier(fileBaseName);


Remove un-used usings

Remove un-used usings

--- CardGames/Whist/GermanWhist/GermanWhist.cs
+++ CardGames/Whist/GermanWhist/GermanWhist.cs
@@ -2,9 +2,6 @@
 // <copyright file="GermanWhist.cs"> This code is protected under the MIT License. </copyright>
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using CardsLibrary;

 namespace CardGames.Whist.GermanWhist


deleted some of the console client

deleted some of the console client

--- CentaurFactory.ConsoleClient/EntryPoint.cs
+++ CentaurFactory.ConsoleClient/EntryPoint.cs
@@ -65,14 +65,6 @@
             //}

             ExtractZipFiles();
-            var deliveryParser = new DeliveryParser();
-            deliveryParser.ReadFromExcelFiles();
-            var deliveries = deliveryParser.Deliveries;
-
-            foreach (var deliveryInfo in deliveries)
-            {
-                Console.WriteLine(deliveryInfo);
-            }
         }

         /// <summary>


Fix bug on resizing Deque

Fix bug on resizing Deque

--- src/Deque/Deque.cs
+++ src/Deque/Deque.cs
@@ -98,13 +98,14 @@
                 }

                 // Create a new array and copy the old values.
-                T[] newBuffer = new T[value];
+                int powOfTwo = Utility.ClosestPowerOfTwoGreaterThan(value);
+                T[] newBuffer = new T[powOfTwo];
                 this.CopyTo(newBuffer, 0);

                 // Set up to use the new buffer.
                 buffer = newBuffer;
                 startOffset = 0;
-                endOffset = 0;
+                endOffset = Count - 1;
             }
         }


Fix stylecop issue within Trace

Fix stylecop issue within Trace

--- source/Glimpse.AspNet/Tab/Trace.cs
+++ source/Glimpse.AspNet/Tab/Trace.cs
@@ -45,7 +45,9 @@
         {
             var traceListeners = System.Diagnostics.Trace.Listeners;
             if (!traceListeners.OfType<TraceInspector>().Any())
+            {
                 traceListeners.Add(new TraceInspector(context));
+            }
         }
     }
 }


Clean Startup.cs and use ILogger<>

Clean Startup.cs and use ILogger<>


Add '__OFFSET__' and '__FILESIZE__' keywords.

--- Src/WHampson.Bft/Keywords.cs
+++ Src/WHampson.Bft/Keywords.cs
@@ -85,6 +85,10 @@
         public const string Name = "name";
         //public const string Typename = "typename";

+        // Special variables
+        public const string Filesize = "__FILESIZE__";
+        public const string Offset = "__OFFSET__";
+
         public static readonly IEnumerable<string> KeywordList = new List<string>()
         {
             // Root element
@@ -128,7 +132,10 @@
             Kind,
             Message,
             Name,
-            //Typename
+
+            // Special Variables
+            Filesize,
+            Offset
         };
     }
 }


Fixed race condition for auto name generation

--- Stacks/Actors/ActorSystem.cs
+++ Stacks/Actors/ActorSystem.cs
@@ -29,6 +29,7 @@

         private ConcurrentDictionary<string, IActor> registeredActors;
         private string autoGenActorName;
+        private object genActorNameGate;
         private volatile IDependencyResolver dependencyResolver;

         internal IDependencyResolver DependencyResolver => dependencyResolver;
@@ -67,6 +68,7 @@
             registeredActors = new ConcurrentDictionary<string, IActor>();
             CreateActor<IRootActor, RootActor>("root");
             autoGenActorName = "$a";
+            genActorNameGate = new object();
         }

         private Type GuessActorInterfaceType<T>()
@@ -245,7 +247,7 @@
             return actor;
         }

-        internal static string GenerateActorName(string lastName)
+        private static string GenerateActorName(string lastName)
         {
             var n = lastName;
             var idx = n.Length - 1;
@@ -274,9 +276,11 @@

         private string GenerateActorName()
         {
-            lock (autoGenActorName)
-            {
-                return autoGenActorName = GenerateActorName(autoGenActorName);
+            lock (genActorNameGate)
+            {
+                var newName = GenerateActorName(autoGenActorName);
+                autoGenActorName = newName;
+                return newName;
             }
         }


Add some more reporting info.

Add some more reporting info.

--- Cogito.Fabric.Http/AppBuilderExtensions.cs
+++ Cogito.Fabric.Http/AppBuilderExtensions.cs
@@ -35,7 +35,13 @@
             Contract.Requires<ArgumentNullException>(service != null);
             Contract.Requires<ArgumentNullException>(path != null);

-            return UseFabricHealth(app, path, service.ServiceInitializationParameters.PartitionId, service.ServiceInitializationParameters.InstanceId);
+            return UseFabricHealth(
+                app,
+                path,
+                new Uri(service.ServiceInitializationParameters.CodePackageActivationContext.ApplicationName),
+                service.ServiceInitializationParameters.ServiceName,
+                service.ServiceInitializationParameters.PartitionId,
+                service.ServiceInitializationParameters.InstanceId);
         }

         /// <summary>
@@ -51,7 +57,13 @@
             Contract.Requires<ArgumentNullException>(service != null);
             Contract.Requires<ArgumentNullException>(path != null);

-            return UseFabricHealth(app, path, service.ServiceInitializationParameters.PartitionId, service.ServiceInitializationParameters.ReplicaId);
+            return UseFabricHealth(
+                app,
+                path,
+                new Uri(service.ServiceInitializationParameters.CodePackageActivationContext.ApplicationName),
+                service.ServiceInitializationParameters.ServiceName,
+                service.ServiceInitializationParameters.PartitionId,
+                service.ServiceInitializationParameters.ReplicaId);
         }

         /// <summary>
@@ -62,12 +74,14 @@
         /// <param name="partitionId"></param>
         /// <param name="replicaOrInstanceId"></param>
         /// <returns></returns>
-        static IAppBuilder UseFabricHealth(this IAppBuilder app, string path, Guid partitionId, long replicaOrInstanceId)
+        static IAppBuilder UseFabricHealth(this IAppBuilder app, string path, Uri applicationName, Uri serviceName, Guid partitionId, long replicaOrInstanceId)
         {
             Contract.Requires<ArgumentNullException>(app != null);
             Contract.Requires<ArgumentNullException>(path != null);
+            Contract.Requires<ArgumentNullException>(applicationName != null);
+            Contract.Requires<ArgumentNullException>(serviceName != null);

-            return UseFabricHealth(app, path, async () =>
+            return UseFabricHealth(app, path, applicationName, serviceName, async () =>
             {
                 using (var fabric = new FabricClient())
                     return await fabric.HealthManager.GetReplicaHealthAsync(partitionId, replicaOrInstanceId);
@@ -79,12 +93,16 @@
         /// </summary>
         /// <param name="app"></param>
         /// <param name="path"></param>
+        /// <param name="applicationName"></param>
+        /// <param name="serviceName"></param>
         /// <param name="health"></param>
         /// <returns></returns>
-        static IAppBuilder UseFabricHealth(this IAppBuilder app, string path, Func<Task<EntityHealth>> health)
+        static IAppBuilder UseFabricHealth(this IAppBuilder app, string path, Uri applicationName, Uri serviceName, Func<Task<EntityHealth>> health)
         {
             Contract.Requires<ArgumentNullException>(app != null);
             Contract.Requires<ArgumentNullException>(path != null);
+            Contract.Requires<ArgumentNullException>(applicationName != null);
+            Contract.Requires<ArgumentNullException>(serviceName != null);
             Contract.Requires<ArgumentNullException>(health != null);

             // attach service to context
@@ -93,6 +111,7 @@
                 // check for requests to health path
                 if (context.Request.Path.Value == path)
                 {
+                    // obtain health report
                     var h = await health();
                     if (h == null)
                         throw new NullReferenceException("EntityHealth was null");
@@ -108,13 +127,21 @@
                             break;
                     }

+                    // object to output
+                    var o = new
+                    {
+                        ApplicationName = applicationName,
+                        ServiceName = serviceName,
+                        Health = h,
+                    };
+
                     // to serialize object
                     var s = new JsonSerializer();
                     s.Converters.Add(new StringEnumConverter());

                     // write out health report
                     context.Response.ContentType = "application/json";
-                    context.Response.Write(JObject.FromObject(h, s).ToString(Formatting.Indented));
+                    context.Response.Write(JObject.FromObject(o, s).ToString(Formatting.Indented));

                     return;
                 }


Added option to set permissions on Lists for the Set-SPOGroupPermission command

--- Commands/Principals/SetGroupPermissions.cs
+++ Commands/Principals/SetGroupPermissions.cs
@@ -1,75 +1,102 @@
-using System.Linq;
-using System.Management.Automation;
-using Microsoft.SharePoint.Client;
-using OfficeDevPnP.PowerShell.CmdletHelpAttributes;
-using OfficeDevPnP.PowerShell.Commands.Base.PipeBinds;
-
-namespace OfficeDevPnP.PowerShell.Commands.Principals
-{
-    [Cmdlet(VerbsCommon.Set, "SPOGroupPermissions")]
-    [CmdletHelp("Adds and/or removes permissions of a specific SharePoint group",
-        Category = CmdletHelpCategory.Principals)]
-    [CmdletExample(
-        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -AddRole Contribute",
-        Remarks = "Adds the 'Contribute' permission to the SharePoint group with the name 'My Site Members'",
-        SortOrder = 1)]
-    [CmdletExample(
-        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -RemoveRole 'Full Control' -AddRole 'Read'",
-        Remarks = "Removes the 'Full Control' from and adds the 'Contribute' permissions to the SharePoint group with the name 'My Site Members'",
-        SortOrder = 2)]
-    [CmdletExample(
-        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -AddRole @('Contribute', 'Design')",
-        Remarks = "Adds the 'Contribute' and 'Design' permissions to the SharePoint group with the name 'My Site Members'",
-        SortOrder = 3)]
-    [CmdletExample(
-        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -RemoveRole @('Contribute', 'Design')",
-        Remarks = "Removes the 'Contribute' and 'Design' permissions from the SharePoint group with the name 'My Site Members'",
-        SortOrder = 4)]
-    public class SetGroupPermissions : SPOWebCmdlet
-    {
-        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "ByName", HelpMessage = "Get the permissions of a specific group by name")]
-        [Alias("Name")]
-        public GroupPipeBind Identity = new GroupPipeBind();
-
-        [Parameter(Mandatory = false, HelpMessage = "Name of the permission set to add to this SharePoint group")]
-        public string[] AddRole = null;
-
-        [Parameter(Mandatory = false, HelpMessage = "Name of the permission set to remove from this SharePoint group")]
-        public string[] RemoveRole = null;
-
-        protected override void ExecuteCmdlet()
-        {
-            var group = Identity.GetGroup(SelectedWeb);
-
-            if (AddRole != null)
-            {
-                foreach (var role in AddRole)
-                {
-                    var roleDefinition = SelectedWeb.RoleDefinitions.GetByName(role);
-                    var roleDefinitionBindings = new RoleDefinitionBindingCollection(ClientContext) {roleDefinition};
-                    var roleAssignments = SelectedWeb.RoleAssignments;
-                    roleAssignments.Add(group, roleDefinitionBindings);
-                    ClientContext.Load(roleAssignments);
-                    ClientContext.ExecuteQueryRetry();
-                }
-            }
-            if (RemoveRole != null)
-            {
-                foreach (var role in RemoveRole)
-                {
-                    var roleAssignment = SelectedWeb.RoleAssignments.GetByPrincipal(group);
-                    var roleDefinitionBindings = roleAssignment.RoleDefinitionBindings;
-                    ClientContext.Load(roleDefinitionBindings);
-                    ClientContext.ExecuteQueryRetry();
-                    foreach (var roleDefinition in roleDefinitionBindings.Where(roleDefinition => roleDefinition.Name == role))
-                    {
-                        roleDefinitionBindings.Remove(roleDefinition);
-                        roleAssignment.Update();
-                        ClientContext.ExecuteQueryRetry();
-                        break;
-                    }
-                }
-            }
-        }
-    }
-}
+using System.Linq;
+using System.Management.Automation;
+using Microsoft.SharePoint.Client;
+using OfficeDevPnP.PowerShell.CmdletHelpAttributes;
+using OfficeDevPnP.PowerShell.Commands.Base.PipeBinds;
+
+namespace OfficeDevPnP.PowerShell.Commands.Principals
+{
+    [Cmdlet(VerbsCommon.Set, "SPOGroupPermissions")]
+    [CmdletHelp("Adds and/or removes permissions of a specific SharePoint group",
+        Category = CmdletHelpCategory.Principals)]
+    [CmdletExample(
+        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -AddRole Contribute",
+        Remarks = "Adds the 'Contribute' permission to the SharePoint group with the name 'My Site Members'",
+        SortOrder = 1)]
+    [CmdletExample(
+        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -RemoveRole 'Full Control' -AddRole 'Read'",
+        Remarks = "Removes the 'Full Control' from and adds the 'Contribute' permissions to the SharePoint group with the name 'My Site Members'",
+        SortOrder = 2)]
+    [CmdletExample(
+        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -AddRole @('Contribute', 'Design')",
+        Remarks = "Adds the 'Contribute' and 'Design' permissions to the SharePoint group with the name 'My Site Members'",
+        SortOrder = 3)]
+    [CmdletExample(
+        Code = @"PS:> Set-SPOGroupPermissions -Identity 'My Site Members' -RemoveRole @('Contribute', 'Design')",
+        Remarks = "Removes the 'Contribute' and 'Design' permissions from the SharePoint group with the name 'My Site Members'",
+        SortOrder = 4)]
+    public class SetGroupPermissions : SPOWebCmdlet
+    {
+        [Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = "ByName", HelpMessage = "Get the permissions of a specific group by name")]
+        [Alias("Name")]
+        public GroupPipeBind Identity = new GroupPipeBind();
+
+        [Parameter(Mandatory = false, HelpMessage = "The list to apply the command to.")]
+        public ListPipeBind List = new ListPipeBind();
+
+        [Parameter(Mandatory = false, HelpMessage = "Name of the permission set to add to this SharePoint group")]
+        public string[] AddRole = null;
+
+        [Parameter(Mandatory = false, HelpMessage = "Name of the permission set to remove from this SharePoint group")]
+        public string[] RemoveRole = null;
+
+        protected override void ExecuteCmdlet()
+        {
+            var group = Identity.GetGroup(SelectedWeb);
+
+            List list = null;
+            if (List != null)
+            {
+                list = List.GetList(SelectedWeb);
+            }
+
+            if (AddRole != null)
+            {
+                foreach (var role in AddRole)
+                {
+                    var roleDefinition = SelectedWeb.RoleDefinitions.GetByName(role);
+                    var roleDefinitionBindings = new RoleDefinitionBindingCollection(ClientContext) { roleDefinition };
+
+                    RoleAssignmentCollection roleAssignments;
+                    if (list != null)
+                    {
+                        roleAssignments = list.RoleAssignments;
+                    }
+                    else
+                    {
+                        roleAssignments = SelectedWeb.RoleAssignments;
+                    }
+
+                    roleAssignments.Add(group, roleDefinitionBindings);
+                    ClientContext.Load(roleAssignments);
+                    ClientContext.ExecuteQueryRetry();
+                }
+            }
+            if (RemoveRole != null)
+            {
+                foreach (var role in RemoveRole)
+                {
+                    RoleAssignment roleAssignment;
+                    if (list != null)
+                    {
+                        roleAssignment = list.RoleAssignments.GetByPrincipal(group);
+                    }
+                    else
+                    {
+                        roleAssignment = SelectedWeb.RoleAssignments.GetByPrincipal(group);
+                    }
+                    var roleDefinitionBindings = roleAssignment.RoleDefinitionBindings;
+                    ClientContext.Load(roleDefinitionBindings);
+                    ClientContext.ExecuteQueryRetry();
+                    foreach (var roleDefinition in roleDefinitionBindings.Where(roleDefinition => roleDefinition.Name == role))
+                    {
+                        roleDefinitionBindings.Remove(roleDefinition);
+                        roleAssignment.Update();
+                        ClientContext.ExecuteQueryRetry();
+                        break;
+                    }
+                }
+            }
+        }
+    }
+}


Fixed bug in UntypedNativeMemoryEnumerator where enumerated type was not set.

--- Core/Collections/NativeMemoryEnumerator.cs
+++ Core/Collections/NativeMemoryEnumerator.cs
@@ -70,6 +70,7 @@
 				throw new ArgumentOutOfRangeException(nameof(length));
 			if (type is null)
 				throw new ArgumentNullException(nameof(type));
+			this.type = type;
 			this.ptr = ptr;
 			count = length;
 			prefix = prefixBytes;


updates

updates

--- Cream/Commands/UpdateWebResourceCommand.cs
+++ Cream/Commands/UpdateWebResourceCommand.cs
@@ -64,7 +64,7 @@
                 }

                 var name = file.Name;
-                var existingResource = (from record in CrmContext.CreateQuery("webresource")
+                var eresource = (from record in CrmContext.CreateQuery("webresource")
                                         where (string)record["name"] == name
                                         select new
                                         {
@@ -79,9 +79,9 @@
                 nresource["webresourcetype"] = new OptionSetValue(type);

                 OrganizationRequest request;
-                if (existingResource != null)
+                if (eresource != null)
                 {
-                    if (!Options.Force && existingResource.ModifiedOn >= file.LastWriteTime.ToUniversalTime())
+                    if (!Options.Force && eresource.ModifiedOn >= file.LastWriteTime.ToUniversalTime())
                     {
                         Logger.Write(log, category.Compose("Ignore"), relativeFilePath);
                         Logger.Write(log.ToString());
@@ -89,7 +89,7 @@
                     }

                     Logger.Write(log, category.Compose("Update"), relativeFilePath);
-                    nresource.Id = existingResource.Id;
+                    nresource.Id = eresource.Id;
                     request = new UpdateRequest() { Target = nresource };
                 }
                 else


Fixing multithreading logic in DictionaryCache

--- CsScriptManaged/Utility/DictionaryCache.cs
+++ CsScriptManaged/Utility/DictionaryCache.cs
@@ -75,8 +75,11 @@
                 {
                     lock (values)
                     {
-                        value = populateAction(key);
-                        values.TryAdd(key, value);
+                        if (!values.TryGetValue(key, out value))
+                        {
+                            value = populateAction(key);
+                            values.TryAdd(key, value);
+                        }
                     }
                 }


Changed property

Changed property

--- DavesAddin/Processors/SolutionProcessor.cs
+++ DavesAddin/Processors/SolutionProcessor.cs
@@ -68,8 +68,8 @@
 							}
 						}

-
-						if (proj.GetProjectTypes().Contains("IPhone"))
+						//GetProjectTypes().Contains("IPhone"
+						if (proj.ProjectType.Equals("IPhone"))
 						{
 							var apVersion = new iOSAppVersion ();


Select linked PuTTY session profile when editing a session

--- SuperPutty/dlgEditSession.cs
+++ SuperPutty/dlgEditSession.cs
@@ -50,6 +50,9 @@
                 this.textBoxHostname.Text = Session.Host;
                 this.textBoxPort.Text = Session.Port.ToString();
                 this.textBoxUsername.Text = Session.Username;
+
+                if (this.comboBoxPuttyProfile.Items.Contains(session.SessionName))
+                    this.comboBoxPuttyProfile.SelectedItem = session.SessionName;

                 switch (Session.Proto)
                 {


parse messages pieces about gold too

parse messages pieces about gold too

--- TCC.Core/Data/ChatMessage.cs
+++ TCC.Core/Data/ChatMessage.cs
@@ -408,15 +408,17 @@

                     var endsWithK = split[j].ToLower().EndsWith("k ", StringComparison.InvariantCultureIgnoreCase) ||
                                     split[j].ToLower().EndsWith("k", StringComparison.InvariantCultureIgnoreCase);
-                    var isNumber = int.TryParse(split[j].ToLower().Replace("k " , "").Replace("k", ""), out var money);
+                    var endsWithG = split[j].ToLower().EndsWith("g ", StringComparison.InvariantCultureIgnoreCase) ||
+                                    split[j].ToLower().EndsWith("g", StringComparison.InvariantCultureIgnoreCase);
+                    var isNumber = int.TryParse(split[j].ToLower().Replace("k ", "").Replace("k", "").Replace("g ", "").Replace("g", ""), out var money);

                     //var isEmoji = split[j].StartsWith(":") && (split[j].EndsWith(":") || split[j].EndsWith(": "));

-                    var mp = endsWithK && isNumber && (chatMessage.Channel == ChatChannel.Trade ||
+                    var mp = (endsWithK || endsWithG)&& isNumber && (chatMessage.Channel == ChatChannel.Trade ||
                                                         chatMessage.Channel == ChatChannel.TradeRedirect ||
                                                         chatMessage.Channel == ChatChannel.Megaphone ||
                                                         chatMessage.Channel == ChatChannel.Global)?
-                        new MessagePiece(new Money(money*1000, 0, 0))
+                        new MessagePiece(new Money(endsWithK ? money*1000 : money, 0, 0))
                         //:
                         //isEmoji?
                         //new MessagePiece(split[j]) { Type = MessagePieceType.Emoji}


AWS S3 のデータが appsettings にない場合には、S3へのアップロードをしないように変更。

--- TKRain/Models/Observation.cs
+++ TKRain/Models/Observation.cs
@@ -94,6 +94,8 @@
         //AmazonのS3へのアップロード
         public async Task AmazonS3Upload(string path, int ntry = 0)
         {
+            if (AppInit.AWSAccessKey == null)
+                return;
             AWSCredentials credentials = new Amazon.Runtime.BasicAWSCredentials(AppInit.AWSAccessKey, AppInit.AWSSecretKey);

             try
@@ -125,6 +127,8 @@

         public static async Task AmazonS3DirctoryUpload(string name, int ntry = 0)
         {
+            if (AppInit.AWSAccessKey == null)
+                return;
             AWSCredentials credentials = new Amazon.Runtime.BasicAWSCredentials(AppInit.AWSAccessKey, AppInit.AWSSecretKey);

             try
@@ -152,6 +156,8 @@

         public static async Task AmazonS3ListUpload(string name, string[] filenames, int ntry = 0)
         {
+            if (AppInit.AWSAccessKey == null)
+                return;
             AWSCredentials credentials = new Amazon.Runtime.BasicAWSCredentials(AppInit.AWSAccessKey, AppInit.AWSSecretKey);

             try


Avoid endless recursion

Avoid endless recursion

--- TVHeadEnd/HTSP/HTSMessage.cs
+++ TVHeadEnd/HTSP/HTSMessage.cs
@@ -237,7 +237,7 @@
             StringBuilder sb = new StringBuilder();
             sb.Append("\nHTSMessage:\n");
             sb.Append("  <dump>\n");
-            sb.Append(getValueString(this, "    "));
+            sb.Append(getValueString(_dict, "    "));
             sb.Append("  </dump>\n\n");
             return sb.ToString();
         }


Change clickable space in Tab

Change clickable space in Tab

--- Dev/Editor/Effekseer/GUI/Dock/DockPanel.cs
+++ Dev/Editor/Effekseer/GUI/Dock/DockPanel.cs
@@ -10,7 +10,7 @@
     {
 		public string Label { get; set; } = string.Empty;

-		public string TabLabel { get { return (AllowsShortTab) ? Label.Substring(0, 1) : Label; } }
+		public string TabLabel { get { return (AllowsShortTab) ? Label.Substring(0, 1) + "   " : Label; } }

 		public string WindowID { get { return Label.Substring(Label.IndexOf("###")); } }


Increased delay between Device retry attempts

--- Project-Aurora/Project-Aurora/Devices/DeviceManager.cs
+++ Project-Aurora/Project-Aurora/Devices/DeviceManager.cs
@@ -77,7 +77,7 @@

         private bool anyInitialized = false;
         private bool retryActivated = false;
-        private const int retryInterval = 5000;
+        private const int retryInterval = 10000;
         private const int retryAttemps = 5;
         private int retryAttemptsLeft = retryAttemps;
         private Thread retryThread;


Fix a NRE when loading an empty route

Fix a NRE when loading an empty route

--- EDDiscovery/SavedRouteExpeditionControl.cs
+++ EDDiscovery/SavedRouteExpeditionControl.cs
@@ -287,23 +287,26 @@
         }
         private void UpdateTotalDistances()
         {
-            SystemClass firstSC = null;
-            SystemClass lastSC = null;
             double distance = 0;
-            for (int i = 0; i < dataGridViewRouteSystems.Rows.Count; i++)
-            {
-                if (firstSC == null && dataGridViewRouteSystems[0, i].Tag != null)
-                    firstSC = (SystemClass)dataGridViewRouteSystems[0, i].Tag;
-                if (dataGridViewRouteSystems[0, i].Tag != null)
-                    lastSC = (SystemClass)dataGridViewRouteSystems[0, i].Tag;
-                String value = dataGridViewRouteSystems[1, i].Value as string;
-                if(!String.IsNullOrWhiteSpace(value))
-                    distance += Double.Parse(value);
-            }
-            txtCmlDistance.Text = distance.ToString("0.00") + "LY";
-            Point3D first = new Point3D(firstSC.x, firstSC.y, firstSC.z);
-            Point3D last = new Point3D(lastSC.x, lastSC.y, lastSC.z);
-            distance = Point3D.DistanceBetween(first, last);
+            if (dataGridViewRouteSystems.Rows.Count > 1)
+            {
+                SystemClass firstSC = null;
+                SystemClass lastSC = null;
+                for (int i = 0; i < dataGridViewRouteSystems.Rows.Count; i++)
+                {
+                    if (firstSC == null && dataGridViewRouteSystems[0, i].Tag != null)
+                        firstSC = (SystemClass)dataGridViewRouteSystems[0, i].Tag;
+                    if (dataGridViewRouteSystems[0, i].Tag != null)
+                        lastSC = (SystemClass)dataGridViewRouteSystems[0, i].Tag;
+                    String value = dataGridViewRouteSystems[1, i].Value as string;
+                    if (!String.IsNullOrWhiteSpace(value))
+                        distance += Double.Parse(value);
+                }
+                txtCmlDistance.Text = distance.ToString("0.00") + "LY";
+                Point3D first = new Point3D(firstSC.x, firstSC.y, firstSC.z);
+                Point3D last = new Point3D(lastSC.x, lastSC.y, lastSC.z);
+                distance = Point3D.DistanceBetween(first, last);
+            }
             txtP2PDIstance.Text = distance.ToString("0.00") + "LY";
         }


Fix delay between result storage updates in BacktestingResultHandler

The 30-second delay for the next update was set before (instead of after) calling StoreResult, which could potentially take a while (if the algorithm submits many orders).

--- Engine/Results/BacktestingResultHandler.cs
+++ Engine/Results/BacktestingResultHandler.cs
@@ -273,13 +273,20 @@
                 if (progress > 0.999m) progress = 0.999m;

                 //1. Cloud Upload -> Upload the whole packet to S3  Immediately:
-                var completeResult = new BacktestResult(Algorithm.IsFrameworkAlgorithm, Charts, _transactionHandler.Orders, Algorithm.Transactions.TransactionRecord, new Dictionary<string, string>(), runtimeStatistics, new Dictionary<string, AlgorithmPerformance>());
-                var complete = new BacktestResultPacket(_job, completeResult, progress);
-
                 if (DateTime.UtcNow > _nextS3Update)
                 {
+                    var completeResult = new BacktestResult(
+                        Algorithm.IsFrameworkAlgorithm,
+                        Charts,
+                        _transactionHandler.Orders,
+                        Algorithm.Transactions.TransactionRecord,
+                        new Dictionary<string, string>(),
+                        runtimeStatistics,
+                        new Dictionary<string, AlgorithmPerformance>());
+
+                    StoreResult(new BacktestResultPacket(_job, completeResult, progress));
+
                     _nextS3Update = DateTime.UtcNow.AddSeconds(30);
-                    StoreResult(complete);
                 }

                 //2. Backtest Update -> Send the truncated packet to the backtester:


PrimeNum case updated

PrimeNum case updated

--- EpLibrary.cs/EpLibrary.cs/Math/PrimeNum.cs
+++ EpLibrary.cs/EpLibrary.cs/Math/PrimeNum.cs
@@ -84,6 +84,11 @@
         /// <returns>first prime number larger than x</returns>
         public static uint NextPrime(uint x)
         {
+            if (x < 2)
+                return 2;
+            if (x == 2)
+                return 3;
+
             uint multIdx=x/6;
 	        uint check1;
 	        uint check2;


builds

builds

--- Fetcher.Playground.Droid/ReadmeActivity.cs
+++ Fetcher.Playground.Droid/ReadmeActivity.cs
@@ -38,7 +38,7 @@
             // Search cached entries by Url...
             IEnumerable<IUrlCacheInfo> info = await repository.GetAllUrlCacheInfo();
             IEnumerable<IFetcherWebRequest> request = await repository.GetAllWebRequests();
-            IEnumerable<IFetcherWebResponse> response = await repository.GetAllWebResponses();
+            IEnumerable<IFetcherWebResponse> responses = await repository.GetAllWebResponses();

             // ... or anything else
             IUrlCacheInfo info2 = await repository.GetEntryForRequestAsync(new FetcherWebRequest
@@ -50,6 +50,8 @@
                     {"X-ZUMO-APPLICATION" , "Hello world!" }
                 }
             });
+
+            IUrlCacheInfo info3 = await repository.GetUrlCacheInfoForId(15);

             // This call will be removed in a future version but for now you still have to call
             await repository.Initialize();


Update CardIds for 21.4.0

Update CardIds for 21.4.0


Simplify interface implementation in viewmodel by removing unimplemented setters which no longer present in interface

--- R7.University.Division/ViewModels/DivisionViewModel.cs
+++ R7.University.Division/ViewModels/DivisionViewModel.cs
@@ -58,146 +58,61 @@

         #region IDivision implementation

-        public string Address {
-            get { return Division.Address; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int CreatedByUserID {
-            get { return Division.CreatedByUserID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public DateTime CreatedOnDate {
-            get { return Division.CreatedOnDate; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int DivisionID {
-            get { return Division.DivisionID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int? DivisionTermID {
-            get { return Division.DivisionTermID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string DocumentUrl {
-            get { return Division.DocumentUrl; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Email {
-            get { return Division.Email; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public DateTime? EndDate {
-            get { return Division.EndDate; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Fax {
-            get { return Division.Fax; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int? HeadPositionID {
-            get { return Division.HeadPositionID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string HomePage {
-            get { return Division.HomePage; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public bool IsInformal {
-            get { return Division.IsInformal; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public bool IsVirtual {
-            get { return Division.IsVirtual; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int LastModifiedByUserID {
-            get { return Division.LastModifiedByUserID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public DateTime LastModifiedOnDate {
-            get { return Division.LastModifiedOnDate; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int Level {
-            get { return Division.Level; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Location {
-            get { return Division.Location; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public int? ParentDivisionID {
-            get { return Division.ParentDivisionID; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Path
-        {
-            get { return Division.Path; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Phone {
-            get { return Division.Phone; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string SecondaryEmail {
-            get { return Division.SecondaryEmail; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string ShortTitle {
-            get { return Division.ShortTitle; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public DateTime? StartDate {
-            get { return Division.StartDate; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public ICollection<DivisionInfo> SubDivisions {
-            get { return Division.SubDivisions; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string Title {
-            get { return Division.Title; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string WebSite {
-            get { return Division.WebSite; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string WebSiteLabel {
-            get { return Division.WebSiteLabel; }
-            set { throw new NotImplementedException (); }
-        }
-
-        public string WorkingHours {
-            get { return Division.WorkingHours; }
-            set { throw new NotImplementedException (); }
-        }
+        public string Address => Division.Address;
+
+        public int CreatedByUserID => Division.CreatedByUserID;
+
+        public DateTime CreatedOnDate => Division.CreatedOnDate;
+
+        public int DivisionID => Division.DivisionID;
+
+        public int? DivisionTermID => Division.DivisionTermID;
+
+        public string DocumentUrl => Division.DocumentUrl;
+
+        public string Email => Division.Email;
+
+        public DateTime? EndDate => Division.EndDate;
+
+        public string Fax => Division.Fax;
+
+        public int? HeadPositionID => Division.HeadPositionID;
+
+        public string HomePage => Division.HomePage;
+
+        public bool IsInformal => Division.IsInformal;
+
+        public bool IsVirtual => Division.IsVirtual;
+
+        public int LastModifiedByUserID => Division.LastModifiedByUserID;
+
+        public DateTime LastModifiedOnDate => Division.LastModifiedOnDate;
+
+        public int Level => Division.Level;
+
+        public string Location => Division.Location;
+
+        public int? ParentDivisionID => Division.ParentDivisionID;
+
+        public string Path => Division.Path;
+
+        public string Phone => Division.Phone;
+
+        public string SecondaryEmail => Division.SecondaryEmail;
+
+        public string ShortTitle => Division.ShortTitle;
+
+        public DateTime? StartDate => Division.StartDate;
+
+        public ICollection<DivisionInfo> SubDivisions => Division.SubDivisions;
+
+        public string Title => Division.Title;
+
+        public string WebSite => Division.WebSite;
+
+        public string WebSiteLabel => Division.WebSiteLabel;
+
+        public string WorkingHours => Division.WorkingHours;

         #endregion


Implemented Assert.IsTrue

Implemented Assert.IsTrue


add functionality for toggling transparency of custom hand controllers

--- NewtonVR/NVRHand.cs
+++ NewtonVR/NVRHand.cs
@@ -100,7 +100,10 @@
         private GameObject RenderModel;

         private HTW.HTWHandController       m_handController;
-        private HTW.HTWChildCollision []      m_handColliders;
+        private HTW.HTWChildCollision []    m_handColliders;
+        private Material                    m_handMaterial;
+        private Texture                     m_handTexture;
+        private Color                       m_handAmbientColor;

         public NVRInputDevice CurrentInputDevice
 		{
@@ -937,6 +940,9 @@

                 m_handController = gameObject.GetComponentInChildren<HTW.HTWHandController>();
                 m_handColliders = gameObject.GetComponentsInChildren<HTW.HTWChildCollision>();
+                m_handMaterial = m_handController.gameObject.GetComponentInChildren<Renderer>().material;
+                m_handTexture = m_handMaterial.mainTexture;
+                m_handAmbientColor = m_handMaterial.color;
             }

             Player.RegisterHand(this);
@@ -999,6 +1005,27 @@
         {
             SetVisibility(VisibilityLevel.Ghost);
             PhysicalController.Off();
+        }
+
+        public void SetOpaque()
+        {
+            if (m_handController != null)
+            {
+                NVRHelpers.SetOpaque(m_handController.gameObject.GetComponentInChildren<Renderer>().material);
+                m_handMaterial.color = m_handAmbientColor;
+                m_handMaterial.mainTexture = m_handTexture;
+            }
+        }
+
+        public void SetTransparent()
+        {
+            if (m_handController != null)
+            {
+                Color transparentcolor = Color.white;
+                transparentcolor.a = (float)VisibilityLevel.Ghost / 100f;
+
+                NVRHelpers.SetTransparent(m_handController.gameObject.GetComponentInChildren<Renderer>().material, transparentcolor);
+            }
         }
     }


Reverting InfoLayersSample commit

Reverting InfoLayersSample commit

--- Samples/Mapsui.Samples.Common/Maps/InfoLayersSample.cs
+++ Samples/Mapsui.Samples.Common/Maps/InfoLayersSample.cs
@@ -1,6 +1,5 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Threading.Tasks;
 using Mapsui.Geometries;
 using Mapsui.Layers;
 using Mapsui.Providers;
@@ -19,39 +18,21 @@
         {
             var map = new Map();

-            var t = OpenStreetMap.CreateTileLayer();
-            var p = CreatePolygonLayer();
-            map.Layers.Add(t);
+            map.Layers.Add(OpenStreetMap.CreateTileLayer());
             map.Layers.Add(CreateInfoLayer(map.Envelope));
             map.Layers.Add(CreateHoverLayer(map.Envelope));
-            map.Layers.Add(p);
+            map.Layers.Add(CreatePolygonLayer());

             map.InfoLayers.Add(map.Layers.First(l => l.Name == InfoLayerName));
             map.InfoLayers.Add(map.Layers.First(l => l.Name == PolygonLayerName));
             map.HoverLayers.Add(map.Layers.First(l => l.Name == HoverLayerName));

-            StartTimerToRemoveAndAddLayer(map,t, p);
-
             return map;
-        }
-
-        private static void StartTimerToRemoveAndAddLayer(Map map, ILayer t, ILayer p)
-        {
-            Task.Run(() =>
-            {
-                Task.Delay(5000).Wait();
-
-                map.Layers.Clear();
-                map.Layers.Add(t);
-                map.Layers.Add(CreateInfoLayer(map.Envelope));
-                map.Layers.Add(CreateHoverLayer(map.Envelope));
-                map.Layers.Add(p);
-            });
         }

         private static ILayer CreatePolygonLayer()
         {
-            var layer = new MemoryLayer {Name = PolygonLayerName};
+            var layer = new MemoryLayer { Name = PolygonLayerName };
             var provider = new MemoryProvider();
             provider.Features.Add(CreatePolygonFeature());
             provider.Features.Add(CreateMultiPolygonFeature());
@@ -67,7 +48,7 @@
                 Geometry = CreateMultiPolygon(),
                 ["Name"] = "Multipolygon 1"
             };
-            feature.Styles.Add(new VectorStyle { Fill = new Brush(Color.Gray), Outline = new Pen(Color.Black)});
+            feature.Styles.Add(new VectorStyle { Fill = new Brush(Color.Gray), Outline = new Pen(Color.Black) });
             return feature;
         }

@@ -145,7 +126,7 @@
             {
                 SymbolScale = 0.8,
                 Fill = new Brush(new Color(251, 236, 215)),
-                Outline = {Color = Color.Gray, Width = 1}
+                Outline = { Color = Color.Gray, Width = 1 }
             };
         }

@@ -155,7 +136,7 @@
             {
                 SymbolScale = 0.8,
                 Fill = new Brush(new Color(213, 234, 194)),
-                Outline = {Color = Color.Gray, Width = 1}
+                Outline = { Color = Color.Gray, Width = 1 }
             };
         }
     }


(GH-808) Output new config value in ToString

This was omitted when the configuration parameter was first added.

--- Source/ChocolateyGui.Common/Models/AppConfiguration.cs
+++ Source/ChocolateyGui.Common/Models/AppConfiguration.cs
@@ -78,20 +78,22 @@
         {
             return @"
 OutdatedPackagesCacheDurationInMinutes: {0}
-ShowConsoleOutput: {1}
-DefaultToTileViewForLocalSource: {2}
-DefaultToTileViewForRemoteSource: {3}
-UseDelayedSearch: {4}
-PreventPreload: {5}
-PreventAutomatedOutdatedPackagesCheck: {6}
-ExcludeInstalledPackages: {7}
-ShowAggregatedSourceView: {8}
-ShowAdditionalPackageInformation: {9}
-AllowNonAdminAccessToSettings: {10}
-UseKeyboardBindings: {11}
-HidePackageDownloadCount: {12}
+DefaultSourceName: {1}
+ShowConsoleOutput: {2}
+DefaultToTileViewForLocalSource: {3}
+DefaultToTileViewForRemoteSource: {4}
+UseDelayedSearch: {5}
+PreventPreload: {6}
+PreventAutomatedOutdatedPackagesCheck: {7}
+ExcludeInstalledPackages: {8}
+ShowAggregatedSourceView: {9}
+ShowAdditionalPackageInformation: {10}
+AllowNonAdminAccessToSettings: {11}
+UseKeyboardBindings: {12}
+HidePackageDownloadCount: {13}
 ".format_with(
                 OutdatedPackagesCacheDurationInMinutes,
+                DefaultSourceName,
                 ShowConsoleOutput,
                 DefaultToTileViewForLocalSource,
                 DefaultToTileViewForRemoteSource,


Android graphics handler, in progress.

Android graphics handler, in progress.

--- Source/Eto.Platform.Android/Drawing/GraphicsHandler.cs
+++ Source/Eto.Platform.Android/Drawing/GraphicsHandler.cs
@@ -191,12 +191,15 @@

 		public void SetClip(IGraphicsPath path)
 		{
+			// NOTE: This may not work with hardware acceleration.
+			// See http://developer.android.com/guide/topics/graphics/hardware-accel.html#drawing-support
+			// See http://stackoverflow.com/questions/16889815/canvas-clippath-only-works-on-android-emulator
 			Control.ClipPath(path.ToAndroid(), ag.Region.Op.Replace);
 		}

 		public void ResetClip()
 		{
-			throw new NotImplementedException();
+			Control.ClipRect(new ag.Rect(int.MinValue, int.MinValue, int.MaxValue, int.MaxValue));
 		}

 		public void Clear(SolidBrush brush)


Bug fix when using tab control and the totalmilliseconds resets to 0 in composite rendering.

--- Source/HelixToolkit.Wpf.SharpDX/Controls/FpsCounter.cs
+++ Source/HelixToolkit.Wpf.SharpDX/Controls/FpsCounter.cs
@@ -57,8 +57,8 @@
                 return;
             }
             var sec = AveragingInterval.TotalMilliseconds;
-            var target = m_frames.Last.Value - sec;
-            while (m_frames.Count > 0 && target > m_frames.First.Value)
+            var target = m_frames.Last.Value - sec;
+            while (m_frames.Count > 0 && (target > m_frames.First.Value || m_frames.First.Value > m_frames.Last.Value)) //the second condition happened when switching tabs, the TotalMilliseconds reset to 0 from composite rendering
             {
                 m_frames.RemoveFirst();
             }


WPF - handle context menu

WPF - handle context menu

--- Source/HtmlRenderer.WPF/Adapters/ContextMenuAdapter.cs
+++ Source/HtmlRenderer.WPF/Adapters/ContextMenuAdapter.cs
@@ -11,15 +11,17 @@
 // "The Art of War"

 using System;
+using System.Windows;
+using System.Windows.Controls;
 using HtmlRenderer.Adapters;
 using HtmlRenderer.Adapters.Entities;
 using HtmlRenderer.Core.Utils;
+using HtmlRenderer.WPF.Utilities;

 namespace HtmlRenderer.WPF.Adapters
 {
     /// <summary>
-    /// Adapter for WinForms context menu for core.
-    // TODO:a handle WPF context menu
+    /// Adapter for WPF context menu for core.
     /// </summary>
     internal sealed class ContextMenuAdapter : RContextMenu
     {
@@ -28,7 +30,7 @@
         /// <summary>
         /// the underline WPF context menu
         /// </summary>
-//        private readonly ContextMenuStrip _contextMenu;
+        private readonly ContextMenu _contextMenu;

         #endregion

@@ -38,71 +40,49 @@
         /// </summary>
         public ContextMenuAdapter()
         {
-//            _contextMenu = new ContextMenuStrip();
-//            _contextMenu.ShowImageMargin = false;
+            _contextMenu = new ContextMenu();
         }

-        /// <summary>
-        /// The total number of items in the context menu
-        /// </summary>
         public override int ItemsCount
         {
-            get
-            {
-                //                return _contextMenu.Items.Count;
-                return 0;
-            }
+            get { return _contextMenu.Items.Count; }
         }

-        /// <summary>
-        /// Add divider item to the context menu.<br/>
-        /// The divider is a non clickable place holder used to separate items.
-        /// </summary>
         public override void AddDivider()
         {
-//            _contextMenu.Items.Add("-");
+            _contextMenu.Items.Add(new Separator());
         }

-        /// <summary>
-        /// Add item to the context menu with the given text that will raise the given event when clicked.
-        /// </summary>
-        /// <param name="text">the text to set on the new context menu item</param>
-        /// <param name="enabled">if to set the item as enabled or disabled</param>
-        /// <param name="onClick">the event to raise when the item is clicked</param>
         public override void AddItem(string text, bool enabled, EventHandler onClick)
         {
             ArgChecker.AssertArgNotNullOrEmpty(text, "text");
             ArgChecker.AssertArgNotNull(onClick, "onClick");

-//            var item = _contextMenu.Items.Add(text, null, onClick);
-//            item.Enabled = enabled;
+            var item = new MenuItem();
+            item.Header = text;
+            item.IsEnabled = enabled;
+            item.Click += new RoutedEventHandler(onClick);
+            _contextMenu.Items.Add(item);
         }

-        /// <summary>
-        /// Remove the last item from the context menu iff it is a divider
-        /// </summary>
         public override void RemoveLastDivider()
         {
-//            if (_contextMenu.Items[_contextMenu.Items.Count - 1].Text == string.Empty)
-//                _contextMenu.Items.RemoveAt(_contextMenu.Items.Count - 1);
+            if (_contextMenu.Items[_contextMenu.Items.Count - 1].GetType() == typeof(Separator))
+                _contextMenu.Items.RemoveAt(_contextMenu.Items.Count - 1);
         }

-        /// <summary>
-        /// Show the context menu in the given parent control at the given location.
-        /// </summary>
-        /// <param name="parent">the parent control to show in</param>
-        /// <param name="location">the location to show at relative to the parent control</param>
         public override void Show(RControl parent, RPoint location)
         {
-//            _contextMenu.Show(((ControlAdapter)parent).Control, Utils.ConvertRound(location));
+            _contextMenu.PlacementTarget = ((ControlAdapter)parent).Control;
+            _contextMenu.PlacementRectangle = new Rect(Utils.ConvertRound(location), Size.Empty);
+            _contextMenu.IsOpen = true;
         }

-        /// <summary>
-        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
-        /// </summary>
         public override void Dispose()
         {
-//            _contextMenu.Dispose();
+            _contextMenu.IsOpen = false;
+            _contextMenu.PlacementTarget = null;
+            _contextMenu.Items.Clear();
         }
     }
 }


Check CanRefreshData before calling RefreshData() in SecurityProviderCache.

--- Source/Libraries/GSF.Security/SecurityProviderCache.cs
+++ Source/Libraries/GSF.Security/SecurityProviderCache.cs
@@ -150,7 +150,9 @@
                     if ((object)provider == null)
                         return false;

-                    provider.RefreshData();
+                    if (provider.CanRefreshData)
+                        provider.RefreshData();
+
                     provider.Authenticate();
                     LastRefreshTime = DateTime.UtcNow;


- Fixed Leave SSA stage - it won't resolve phi instructions in the Epilogue block

--- Source/Mosa.Compiler.Framework/Stages/LeaveSSAStage.cs
+++ Source/Mosa.Compiler.Framework/Stages/LeaveSSAStage.cs
@@ -25,9 +25,6 @@
 		{
 			foreach (var block in basicBlocks)
 			{
-				if (block.Label == BasicBlock.EpilogueLabel)
-					continue;
-
 				for (var context = new Context(instructionSet, block); !context.EndOfInstruction; context.GotoNext())
 				{
 					if (context.Instruction is IR.Phi)


complete XML doc for Elements

complete XML doc for Elements

--- core/Omego.Extensions/Elements.cs
+++ core/Omego.Extensions/Elements.cs
@@ -1,11 +1,23 @@
 namespace Omego.Extensions
 {
+    /// <summary>
+    /// Represents a quantity category of elements.
+    /// </summary>
     public enum Elements
     {
+        /// <summary>
+        /// Represents no elements.
+        /// </summary>
         None,

+        /// <summary>
+        /// Represents one element.
+        /// </summary>
         One,

+        /// <summary>
+        /// Represents multiple elements.
+        /// </summary>
         Multiple
     }
 }


Make sure validate lifetime is correctly set in the logs

--- source/Core/Validation/TokenValidator.cs
+++ source/Core/Validation/TokenValidator.cs
@@ -120,6 +120,8 @@
             Logger.Info("Start access token validation");

             _log.ExpectedScope = expectedScope;
+            _log.ValidateLifetime = true;
+
             TokenValidationResult result;

             if (token.Contains("."))


Disabled Glimpse when request init is bypassed

--- source/Glimpse.Core/Framework/Factory.cs
+++ source/Glimpse.Core/Framework/Factory.cs
@@ -408,7 +408,34 @@
         public Func<RuntimePolicy> InstantiateRuntimePolicyStrategy()
         {
             var frameworkProvider = InstantiateFrameworkProvider();
-            return () => frameworkProvider.HttpRequestStore.Get<RuntimePolicy>(Constants.RuntimePolicyKey);
+            var logger = InstantiateLogger();
+
+            return () =>
+            {
+                // this code is indirectly called from 2 places :
+                // - From inside an AlternateMethod instance (or basically everything that is related to a Glimpse proxy) to decide whether
+                //   or not Glimpse is enabled and data should be collected, and in case RuntimePolicy.Off is returned, the original method
+                //   will be called, which has the same effect as if Glimpse is not there.
+                // - By any Inspector, since it is exposed on the InspectorContext
+
+                // Now the assumption that is made here, is that this code will only be called after that the GlimpseRuntime's BeginRequest method
+                // has run and properly initialized the 'GlimpseContext' for the current request, which means it has at least set the current runtime policy.
+                // Unfortunately there are use-cases where users are creative and (ab)use specific concepts to achieve a specific goal, and those uses don't
+                // always align with Glimpse's assumptions. For example a new instance of an HttpContext is sometimes created and assigned to the HttpContext.Current
+                // property to have a new controller instance render a view to a string as if it was a request... This has the nasty side-effect that Glimpse is not
+                // given the opportunity to do a proper setup of that request, resulting in non-deterministic behavior.
+
+                // Therefore if we notice that the current request has not properly been initialized by the GlimpseRuntime's BeginRequest method then we'll decide
+                // that Glimpse is disabled, which is the safest assumption we can make here, preventing any further Glimpse specific code from collection information for that new "request".
+                if (!frameworkProvider.HttpRequestStore.Contains(Constants.RuntimePolicyKey))
+                {
+                    logger.Debug("Apparently GlimpseRuntime has not yet initialized this request. This might happen in case you're doing something specific like mentioned in this issue: https://github.com/Glimpse/Glimpse/issues/703 . Either way, Glimpse will be disabled to prevent any further non-deterministic behavior during this request.");
+                    // we'll store a RuntimePolicy.Off in the HttpRequestStore for subsequent calls for this request.
+                    frameworkProvider.HttpRequestStore.Set(Constants.RuntimePolicyKey, RuntimePolicy.Off);
+                }
+
+                return frameworkProvider.HttpRequestStore.Get<RuntimePolicy>(Constants.RuntimePolicyKey);
+            };
         }

         /// <summary>


[closes gh-33] Configured CORS preflight cache.

--- source/Web.Api/App_Start/WebApiConfig.cs
+++ source/Web.Api/App_Start/WebApiConfig.cs
@@ -11,11 +11,13 @@
     public static class WebApiConfig {
         public static void Register(HttpConfiguration config) {
             config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
-            config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
+            config.EnableCors(new EnableCorsAttribute("*", "*", "*") {
+                PreflightMaxAge = 60 * 60 * 1000 // 1 hour, though Chrome would limit to 10 mins I believe
+            });

             RegisterContainer(config);
             RegisterFormatters(config);
-
+
             // routes
             config.MapHttpAttributeRoutes();
             config.EnableSystemDiagnosticsTracing();


ml commit 2

ml commit 2


fixed error in type activator parameters binding (now more specific types binds successfully)

--- TypeConvert/TypeActivator.cs
+++ TypeConvert/TypeActivator.cs
@@ -230,7 +230,7 @@
 		private static object CreateInstance<Arg1T, Arg2T, Arg3T, Arg4T>(Type type, Arg1T arg1, Arg2T arg2, Arg3T arg3, Arg4T arg4, int argCount)
 		{
 			if (type == null) throw new ArgumentNullException("type");
-			if (argCount < 1 || argCount > 3) throw new ArgumentOutOfRangeException("argCount");
+			if (argCount < 1 || argCount > 4) throw new ArgumentOutOfRangeException("argCount");

 			var signature = new ConstructorSignature(type,
 				typeof(Arg1T), argCount > 1 ?
@@ -256,13 +256,13 @@
 						var ctrParams = constructorInfo.GetParameters();
 						if (ctrParams.Length != argCount)
 							continue;
-						if (argCount > 0 && IsAssignableFrom(typeof(Arg1T), ctrParams[0].ParameterType) == false)
-							continue;
-						if (argCount > 1 && IsAssignableFrom(typeof(Arg2T), ctrParams[1].ParameterType) == false)
-							continue;
-						if (argCount > 2 && IsAssignableFrom(typeof(Arg3T), ctrParams[2].ParameterType) == false)
-							continue;
-						if (argCount > 3 && IsAssignableFrom(typeof(Arg4T), ctrParams[3].ParameterType) == false)
+						if (argCount > 0 && IsAssignableFrom(ctrParams[0].ParameterType, typeof(Arg1T)) == false)
+							continue;
+						if (argCount > 1 && IsAssignableFrom(ctrParams[1].ParameterType, typeof(Arg2T)) == false)
+							continue;
+						if (argCount > 2 && IsAssignableFrom(ctrParams[2].ParameterType, typeof(Arg3T)) == false)
+							continue;
+						if (argCount > 3 && IsAssignableFrom(ctrParams[3].ParameterType, typeof(Arg4T)) == false)
 							continue;

 						foundCtr = constructorInfo;


Enable getting the query text from a repository unminified

--- Utilitron/Data/Repository.cs
+++ Utilitron/Data/Repository.cs
@@ -13,8 +13,8 @@
     /// </summary>
     public abstract class Repository
     {
-        private static readonly ConcurrentDictionary<string, string> Queries =
-            new ConcurrentDictionary<string, string>();
+        private static readonly ConcurrentDictionary<string, string> Queries = new ConcurrentDictionary<string, string>();
+        private static readonly ConcurrentDictionary<string, string> QueriesRaw = new ConcurrentDictionary<string, string>();

         /// <summary>
         ///     The <see cref="IRepositoryConfiguration" /> for this repository.
@@ -124,7 +124,7 @@
         ///     minified once.
         /// </summary>
         /// <param name="queryName">The name of the query to get. This defaults to the calling method.</param>
-        /// <returns>The query text.</returns>
+        /// <returns>The query text (minified).</returns>
         protected string GetQuery([CallerMemberName] string queryName = null)
         {
             if (queryName == null)
@@ -132,17 +132,32 @@

             var type = GetType();
             var fullName = $"{type.FullName}.{queryName}";
+
+            return Queries.GetOrAdd(fullName, x =>
+            {
+                var queryRaw = QueriesRaw.GetOrAdd(fullName, y => QueryUtilities.GetEmbeddedQuery(queryName, type));

-            return Queries.GetOrAdd(fullName, x => GetQueryInternal(queryName, type));
+                return QueryUtilities.Minify(queryRaw);
+            });
         }

-        private static string GetQueryInternal(string queryName, Type type)
+        /// <summary>
+        ///     Get the query text for the calling method.
+        ///     <see cref="QueryUtilities.GetEmbeddedQuery" /> for more details.
+        ///     The resulting query text is cached by each repository on a per-class basis so each query is only extracted and
+        ///     minified once.
+        /// </summary>
+        /// <param name="queryName">The name of the query to get. This defaults to the calling method.</param>
+        /// <returns>The query text (unminified).</returns>
+        protected string GetQueryRaw([CallerMemberName] string queryName = null)
         {
-            // Get the query
-            var query = QueryUtilities.GetEmbeddedQuery(queryName, type);
+            if (queryName == null)
+                throw new ArgumentNullException(nameof(queryName));

-            // minify and return the query
-            return QueryUtilities.Minify(query);
+            var type = GetType();
+            var fullName = $"{type.FullName}.{queryName}";
+
+            return QueriesRaw.GetOrAdd(fullName, x => QueryUtilities.GetEmbeddedQuery(queryName, type));
         }
     }
 }


Don't set RenderWindow size directly.

Don't set RenderWindow size directly.

Since the call might originated outside the main thread
we need to ensure that only the mainthread timer (UiUpdate)
handles resizing.

#RH-31641 Needs Testing

--- Viewport/RenderedViewport.cs
+++ Viewport/RenderedViewport.cs
@@ -148,7 +148,6 @@
 		public override bool RestartRender(bool tiled, int width, int height)
 		{
 			ssd.WriteLine("RestartRender {0}", m_serial);
-			m_cycles.SetRenderSize(width, height);
 			SetGamma(m_cycles.Database.Gamma);
 			m_starttime = GeCurrentTimeStamp();


more test work

more test work

--- Spa/NakedObjects.Spa.Selenium.Test/tests/GeminiTest.cs
+++ Spa/NakedObjects.Spa.Selenium.Test/tests/GeminiTest.cs
@@ -106,6 +106,10 @@
             br.Navigate().GoToUrl(url);
             Thread.Sleep(10 * 1000);

+            br.Navigate().Refresh();
+
+            Thread.Sleep(10 * 1000);
+
             if (trw) {
                 var u = br.Url;


Fixing CatalogCRUD for Category and adding Notes. Closes #109

--- Views/Widgets/CatalogCRUD.cs
+++ Views/Widgets/CatalogCRUD.cs
@@ -42,6 +42,16 @@
             } else {
                 CategoryName = "";
             }
+
+            MethodInfo notesMethod = mod.Type.GetMethod("Notes");
+            hasNotes = notesMethod != null;
+            if (hasNotes) {
+                PropertyInfo notesProp =  mod.Type.GetProperty ("Notes");
+                Notes = (notesProp.GetValue(record, null) as String);
+            } else {
+                Notes = "";
+            }
+

             Selected = false;
         }
@@ -51,8 +61,10 @@
         public int parentId;
         bool hasParent;
         public Object ParentRecord {get; set;}
+        public Object CategoryRecord {get; set;}
         public int categoryId;
         bool hasCategory;
+        bool hasNotes;

         [Gtk.TreeNodeValue (Column=0)]
         public bool Selected;
@@ -62,6 +74,8 @@
         public string ParentName;
         [Gtk.TreeNodeValue (Column=3)]
         public string CategoryName;
+        [Gtk.TreeNodeValue (Column=4)]
+        public string Notes;

         public int ParentId {
             get {
@@ -78,6 +92,15 @@
                 PropertyInfo parentIdProp =  mod.Type.GetProperty ("ParentId");
                 PropertyInfo idParentProp = ParentRecord.GetType ().GetProperty ("Id");
                 parentIdProp.SetValue (Record, idParentProp.GetValue (ParentRecord, null), null);
+            }
+            if (hasCategory) {
+                PropertyInfo categoryIdProp =  mod.Type.GetProperty ("CategaryId");
+                PropertyInfo idCategoryProp = CategoryRecord.GetType ().GetProperty ("Id");
+                categoryIdProp.SetValue (Record, idCategoryProp.GetValue (CategoryRecord, null), null);
+            }
+            if (hasNotes) {
+                PropertyInfo notesProp =  mod.PropertyDictionary["Notes"].Property;
+                notesProp.SetValue (Record, Notes, null);
             }
             ActiveRecordMetaBase.Save (Record);

@@ -158,10 +181,18 @@
                     //Type pt = asm.GetType ("HumanRightsTracker.Models." + ParentClassName);

                     CellRendererCatalogSelector categoryCell = new CellRendererCatalogSelector (CategoryClassName);
-                    categoryCell.Changed += HandleParentChanged;
+                    categoryCell.Changed += HandleCategoryChanged;
                     categoryCell.Editable = true;

                     table.AppendColumn ("Category", categoryCell, "text", 3);
+                }
+
+                MethodInfo notesMethod = t.GetMethod("Notes");
+                if (notesMethod != null) {
+                    Gtk.CellRendererText notesCell = new Gtk.CellRendererText ();
+                    notesCell.Editable = true;
+                    notesCell.Edited += HandleNotesCellEdited;
+                    table.AppendColumn ("Notes", notesCell, "text", 4);
                 }
             }
         }
@@ -218,10 +249,37 @@

         }

+        void HandleCategoryChanged (object o, ComboSelectionChangedArgs args)
+        {
+            RecordNode node = store.GetNode(new Gtk.TreePath(args.Path)) as RecordNode;
+
+            CatalogSelector selector = o as CatalogSelector;
+            Object category = selector.Active;
+            if (category != null)
+            {
+                node.CategoryRecord = category;
+                PropertyInfo CategoryNameProp = category.GetType ().GetProperty ("Name");
+                //parentIdProp.SetValue (Record, idParentProp.GetValue (ParentRecord, null), null);
+                selector.Combobox.Entry.Text = CategoryNameProp.GetValue (category, null) as String;
+                node.CategoryName = CategoryNameProp.GetValue (category, null) as String;
+                // tell node to save the value
+                node.SaveRecord ();
+            }
+
+        }
+
         void HandleNameCellEdited (object o, Gtk.EditedArgs args)
         {
             RecordNode node = store.GetNode(new Gtk.TreePath(args.Path)) as RecordNode;
             node.Name = args.NewText;
+            // tell node to save the value
+            node.SaveRecord ();
+        }
+
+        void HandleNotesCellEdited (object o, Gtk.EditedArgs args)
+        {
+            RecordNode node = store.GetNode(new Gtk.TreePath(args.Path)) as RecordNode;
+            node.Notes = args.NewText;
             // tell node to save the value
             node.SaveRecord ();
         }


Pro ASP.Net MVC 5 - SportsStore - Ch 07 - Changed Paging URL

Updated the routing so that the page number is part of the URL, not in a
querystring. The framework automagically generates the correct links.

--- SportsStore/SportsStore.WebUI/App_Start/RouteConfig.cs
+++ SportsStore/SportsStore.WebUI/App_Start/RouteConfig.cs
@@ -14,6 +14,12 @@
             routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

             routes.MapRoute(
+                name: null,
+                url: "Page{page}",
+                defaults: new { Controller = "Product", action = "List" }
+            );
+
+            routes.MapRoute(
                 name: "Default",
                 url: "{controller}/{action}/{id}",
                 defaults: new { controller = "Product", action = "List", id = UrlParameter.Optional }


Optimized code

Optimized code

--- Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs
+++ Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs
@@ -9,7 +9,7 @@

     public class InstanceFactory
     {
-        static Assembly assembly = Assembly.Load(UtilConstants.AssemblyName);
+        static Assembly assembly = Assembly.GetExecutingAssembly();
         static Dictionary<string, Type> typeCache = new Dictionary<string, Type>();
         public static bool NoCache = false;


Trying to fix gitversion in PRs

Trying to fix gitversion in PRs


Exposed a nice static method to return the current license

--- src/Arcturus/Concrete/Licensing.cs
+++ src/Arcturus/Concrete/Licensing.cs
@@ -4,7 +4,7 @@
 {
     public class Licensing
     {
-        internal static ILicenseProvider Instance { get; set; }
+        public static ILicenseProvider Instance { get; set; }

         public static void SetLicenseProvider(ILicenseProvider provider)
         {


Removed some old code and formating

Removed some old code and formating

--- src/Clients/MainApp/PixbufUtils.cs
+++ src/Clients/MainApp/PixbufUtils.cs
@@ -30,7 +30,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-
 using Gdk;
 using System.Collections;
 using System.Runtime.InteropServices;
@@ -48,8 +47,10 @@
 using Pinta.Core;
 using Pinta.Effects;

-public static class PixbufUtils {
+public static class PixbufUtils
+{
 	static Pixbuf error_pixbuf = null;
+
 	public static Pixbuf ErrorPixbuf {
 		get {
 			if (error_pixbuf == null)
@@ -57,6 +58,7 @@
 			return error_pixbuf;
 		}
 	}
+
 	public static Pixbuf LoadingPixbuf = PixbufUtils.LoadFromAssembly ("f-spot-loading.png");

 	public static double Fit (Pixbuf pixbuf,
@@ -87,8 +89,8 @@
 		if (scale > 1.0 && !upscale_smaller)
 			scale = 1.0;

-		fit_width = (int) Math.Round (scale * orig_width);
-		fit_height = (int) Math.Round (scale * orig_height);
+		fit_width = (int)Math.Round (scale * orig_width);
+		fit_height = (int)Math.Round (scale * orig_height);

 		return scale;
 	}
@@ -97,7 +99,8 @@
 	// FIXME: These should be in GTK#.  When my patch is committed, these LoadFrom* methods will
 	// go away.

-	public class AspectLoader {
+	public class AspectLoader
+	{
 		Gdk.PixbufLoader loader = new Gdk.PixbufLoader ();
 		int max_width;
 		int max_height;
@@ -138,16 +141,16 @@
 		{
 			int count;
 			byte [] data = new byte [8192];
-			while (((count = stream.Read (data, 0, data.Length)) > 0) && loader.Write (data, (ulong)count))
+			while (((count = stream.Read (data, 0, data.Length)) > 0) && loader.Write (data, (ulong)count)) {
 				;
+			}

 			loader.Close ();
 			Pixbuf orig = loader.Pixbuf;
 			Gdk.Pixbuf rotated = FSpot.Utils.PixbufUtils.TransformOrientation (orig, orientation);

-			if (orig != rotated) {
+			if (orig != rotated)
 				orig.Dispose ();
-			}
 			loader.Dispose ();
 			return rotated;
 		}
@@ -155,7 +158,7 @@
 		public Pixbuf LoadFromFile (string path)
 		{
 			try {
-				orientation = GetOrientation (path);
+				orientation = GetOrientation (new SafeUri (path));
 				using (FileStream fs = System.IO.File.OpenRead (path)) {
 					return Load (fs, orientation);
 				}
@@ -194,7 +197,7 @@

 	public static Pixbuf TagIconFromPixbuf (Pixbuf source)
 	{
-		return IconFromPixbuf (source, (int) Tag.IconSize.Large);
+		return IconFromPixbuf (source, (int)Tag.IconSize.Large);
 	}

 	public static Pixbuf IconFromPixbuf (Pixbuf source, int size)
@@ -203,9 +206,9 @@
 		Pixbuf icon = null;

 		if (source.Width > source.Height)
-			source = tmp = new Pixbuf (source, (source.Width - source.Height) /2, 0, source.Height, source.Height);
+			source = tmp = new Pixbuf (source, (source.Width - source.Height) / 2, 0, source.Height, source.Height);
 		else if (source.Width < source.Height)
-			source = tmp = new Pixbuf (source, 0, (source.Height - source.Width) /2, source.Width, source.Width);
+			source = tmp = new Pixbuf (source, 0, (source.Height - source.Width) / 2, source.Width, source.Width);

 		if (source.Width == source.Height)
 			icon = source.ScaleSimple (size, size, InterpType.Bilinear);
@@ -261,130 +264,123 @@
 		return flattened;
 	}

-    unsafe public static byte[] Pixbuf_GetRow(byte* pixels, int row, int rowstride, int width, int channels, byte[] dest)
-    {
-        byte* ptr = ((byte*)pixels) + (row*rowstride);
-
-        Marshal.Copy(((IntPtr)ptr), dest, 0, width*channels);
-
-        return dest;
-    }
-
-    unsafe public static void Pixbuf_SetRow(byte* pixels, byte[] dest, int row, int rowstride, int width, int channels)
-    {
-        byte* destPtr = pixels + row * rowstride;
-
-        for (int i=0; i < width*channels; i++)
-        {
-            destPtr[i] = dest[i];
-        }
-    }
-
-    unsafe public static Pixbuf UnsharpMask (Pixbuf src,
+	unsafe public static byte[] Pixbuf_GetRow (byte* pixels, int row, int rowstride, int width, int channels, byte[] dest)
+	{
+		byte* ptr = ((byte*)pixels) + (row * rowstride);
+
+		Marshal.Copy (((IntPtr)ptr), dest, 0, width * channels);
+
+		return dest;
+	}
+
+	unsafe public static void Pixbuf_SetRow (byte* pixels, byte[] dest, int row, int rowstride, int width, int channels)
+	{
+		byte* destPtr = pixels + row * rowstride;
+
+		for (int i=0; i < width*channels; i++) {
+			destPtr [i] = dest [i];
+		}
+	}
+
+	unsafe public static Pixbuf UnsharpMask (Pixbuf src,
                                              double radius,
                                              double amount,
                                              double threshold,
                                              ThreadProgressDialog progressDialog)
-    {
-        // Make sure the pixbuf has an alpha channel before we try to blur it
-        src = src.AddAlpha(false, 0, 0, 0);
-
-        Pixbuf result = Blur(src, (int)radius, progressDialog);
-
-        int sourceRowstride = src.Rowstride;
-        int sourceHeight = src.Height;
-        int sourceChannels = src.NChannels;
-        int sourceWidth = src.Width;
-
-        int resultRowstride = result.Rowstride;
-        int resultWidth = result.Width;
-        int resultChannels = result.NChannels;
-
-        byte[] srcRow = new byte[sourceRowstride];
-        byte[] destRow = new byte[resultRowstride];
-
-        byte* sourcePixels = (byte*)src.Pixels;
-        byte* resultPixels = (byte*)result.Pixels;
-
-        for (int row=0; row < sourceHeight; row++)
-        {
-            Pixbuf_GetRow(sourcePixels, row, sourceRowstride, sourceWidth, sourceChannels, srcRow);
-            Pixbuf_GetRow(resultPixels, row, resultRowstride, resultWidth, resultChannels, destRow);
-
-            int diff;
-            for (int i=0; i < sourceWidth*sourceChannels; i++)
-            {
-                diff = srcRow[i] - destRow[i];
-                if (Math.Abs(2*diff) < threshold)
-                    diff = 0;
-
-                int val = (int)(srcRow[i] + amount * diff);
-
-                if (val > 255)
-                    val = 255;
-                else if (val < 0)
-                    val = 0;
-
-                destRow[i] = (byte)val;
-            }
-
-            Pixbuf_SetRow(resultPixels, destRow, row, resultRowstride, resultWidth, resultChannels);
-
-            // This is the other half of the progress so start and halfway
-            if (progressDialog != null)
-            {
+	{
+		// Make sure the pixbuf has an alpha channel before we try to blur it
+		src = src.AddAlpha (false, 0, 0, 0);
+
+		Pixbuf result = Blur (src, (int)radius, progressDialog);
+
+		int sourceRowstride = src.Rowstride;
+		int sourceHeight = src.Height;
+		int sourceChannels = src.NChannels;
+		int sourceWidth = src.Width;
+
+		int resultRowstride = result.Rowstride;
+		int resultWidth = result.Width;
+		int resultChannels = result.NChannels;
+
+		byte[] srcRow = new byte[sourceRowstride];
+		byte[] destRow = new byte[resultRowstride];
+
+		byte* sourcePixels = (byte*)src.Pixels;
+		byte* resultPixels = (byte*)result.Pixels;
+
+		for (int row=0; row < sourceHeight; row++) {
+			Pixbuf_GetRow (sourcePixels, row, sourceRowstride, sourceWidth, sourceChannels, srcRow);
+			Pixbuf_GetRow (resultPixels, row, resultRowstride, resultWidth, resultChannels, destRow);
+
+			int diff;
+			for (int i=0; i < sourceWidth*sourceChannels; i++) {
+				diff = srcRow [i] - destRow [i];
+				if (Math.Abs (2 * diff) < threshold)
+					diff = 0;
+
+				int val = (int)(srcRow [i] + amount * diff);
+
+				if (val > 255)
+					val = 255;
+				else if (val < 0)
+					val = 0;
+
+				destRow [i] = (byte)val;
+			}
+
+			Pixbuf_SetRow (resultPixels, destRow, row, resultRowstride, resultWidth, resultChannels);
+
+			// This is the other half of the progress so start and halfway
+			if (progressDialog != null)
                 progressDialog.Fraction = ((double)row / ((double) sourceHeight - 1) ) * 0.25 + 0.75;
-            }
-        }
-
-        return result;
-   }
-
-    public static Pixbuf Blur (Pixbuf src, int radius, ThreadProgressDialog dialog)
-	{
-        ImageSurface sourceSurface = Hyena.Gui.PixbufImageSurface.Create(src);
-        ImageSurface destinationSurface = new ImageSurface(Format.Rgb24, src.Width, src.Height);
-
-        // If we do it as a bunch of single lines (rectangles of one pixel) then we can give the progress
-        // here instead of going deeper to provide the feedback
-        for (int i=0; i < src.Height; i++)
-        {
-            GaussianBlurEffect.RenderBlurEffect(sourceSurface, destinationSurface, new[] { new Gdk.Rectangle(0, i, src.Width, 1) }, radius);
-
-            if (dialog != null)
-            {
-                // This only half of the entire process
-                double fraction = ((double)i / (double)(src.Height-1)) *0.75;
-                dialog.Fraction = fraction;
-            }
-        }
-
-        return destinationSurface.ToPixbuf();
-	}
-
-    public static ImageSurface Clone (this ImageSurface surf)
-    {
-        ImageSurface newsurf = new ImageSurface (surf.Format, surf.Width, surf.Height);
-
-        using (Context g = new Context (newsurf)) {
-            g.SetSource (surf);
-            g.Paint ();
-        }
+		}
+
+		return result;
+	}
+
+	public static Pixbuf Blur (Pixbuf src, int radius, ThreadProgressDialog dialog)
+	{
+		ImageSurface sourceSurface = Hyena.Gui.PixbufImageSurface.Create (src);
+		ImageSurface destinationSurface = new ImageSurface (Format.Rgb24, src.Width, src.Height);
+
+		// If we do it as a bunch of single lines (rectangles of one pixel) then we can give the progress
+		// here instead of going deeper to provide the feedback
+		for (int i=0; i < src.Height; i++) {
+			GaussianBlurEffect.RenderBlurEffect (sourceSurface, destinationSurface, new[] { new Gdk.Rectangle (0, i, src.Width, 1) }, radius);
+
+			if (dialog != null) {
+				// This only half of the entire process
+				double fraction = ((double)i / (double)(src.Height - 1)) * 0.75;
+				dialog.Fraction = fraction;
+			}
+		}
+
+		return destinationSurface.ToPixbuf ();
+	}
+
+	public static ImageSurface Clone (this ImageSurface surf)
+	{
+		ImageSurface newsurf = new ImageSurface (surf.Format, surf.Width, surf.Height);
+
+		using (Context g = new Context (newsurf)) {
+			g.SetSource (surf);
+			g.Paint ();
+		}

-        return newsurf;
-    }
+		return newsurf;
+	}

 	public unsafe static Gdk.Pixbuf RemoveRedeye (Gdk.Pixbuf src, Gdk.Rectangle area)
 	{
 		return RemoveRedeye (src, area, -15);
 	}

-    //threshold, factors and comparisons borrowed from the gimp plugin 'redeye.c' by Robert Merkel
-    public unsafe static Gdk.Pixbuf RemoveRedeye (Gdk.Pixbuf src, Gdk.Rectangle area, int threshold)
+	//threshold, factors and comparisons borrowed from the gimp plugin 'redeye.c' by Robert Merkel
+	public unsafe static Gdk.Pixbuf RemoveRedeye (Gdk.Pixbuf src, Gdk.Rectangle area, int threshold)
 	{
 		Gdk.Pixbuf copy = src.Copy ();
 		Gdk.Pixbuf selection = new Gdk.Pixbuf (copy, area.X, area.Y, area.Width, area.Height);
-		byte *spix = (byte *)selection.Pixels;
+		byte * spix = (byte *)selection.Pixels;
 		int h = selection.Height;
 		int w = selection.Width;
 		int channels = src.NChannels;
@@ -394,15 +390,15 @@
 		double BLUE_FACTOR = 0.1933333;

 		for (int j = 0; j < h; j++) {
-			byte *s = spix;
+			byte * s = spix;
 			for (int i = 0; i < w; i++) {
-				int adjusted_red = (int)(s[0] * RED_FACTOR);
-				int adjusted_green = (int)(s[1] * GREEN_FACTOR);
-				int adjusted_blue = (int)(s[2] * BLUE_FACTOR);
+				int adjusted_red = (int)(s [0] * RED_FACTOR);
+				int adjusted_green = (int)(s [1] * GREEN_FACTOR);
+				int adjusted_blue = (int)(s [2] * BLUE_FACTOR);

 				if (adjusted_red >= adjusted_green - threshold
 				    && adjusted_red >= adjusted_blue - threshold)
-					s[0] = (byte)(((double)(adjusted_green + adjusted_blue)) / (2.0 * RED_FACTOR));
+					s [0] = (byte)(((double)(adjusted_green + adjusted_blue)) / (2.0 * RED_FACTOR));
 				s += channels;
 			}
 			spix += selection.Rowstride;
@@ -453,16 +449,15 @@
 		bchsw.Dispose ();
 	}

-
 	public static unsafe void ColorAdjust (Gdk.Pixbuf src, Gdk.Pixbuf dest, Cms.Transform trans)
 	{
 		int width = src.Width;
-		byte * srcpix  = (byte *) src.Pixels;
-		byte * destpix = (byte *) dest.Pixels;
+		byte * srcpix = (byte *)src.Pixels;
+		byte * destpix = (byte *)dest.Pixels;

 		for (int row = 0; row < src.Height; row++) {
-			trans.Apply ((IntPtr) (srcpix + row * src.Rowstride),
-				     (IntPtr) (destpix + row * dest.Rowstride),
+			trans.Apply ((IntPtr)(srcpix + row * src.Rowstride),
+				     (IntPtr)(destpix + row * dest.Rowstride),
 				     (uint)width);
 		}

@@ -472,17 +467,16 @@
 	{
 		int chan = pixbuf.NChannels;

-		byte *pix = (byte *)pixbuf.Pixels;
+		byte * pix = (byte *)pixbuf.Pixels;
 		int h = pixbuf.Height;
 		int w = pixbuf.Width;
 		int stride = pixbuf.Rowstride;

 		for (int j = 0; j < h; j++) {
-			byte *p = pix;
+			byte * p = pix;
 			for (int i = 0; i < w; i++) {
-				if (Math.Abs (p[0] - p[1]) > max_difference || Math.Abs (p[0] - p [2]) > max_difference) {
+				if (Math.Abs (p [0] - p [1]) > max_difference || Math.Abs (p [0] - p [2]) > max_difference)
 					goto Found;
-				}
 				p += chan;
 			}
 			pix += stride;
@@ -490,8 +484,8 @@

 		return true;

-	Found:
-		return false;
+		Found:
+			return false;
 	}

 	public static unsafe void ReplaceColor (Gdk.Pixbuf src, Gdk.Pixbuf dest)
@@ -499,17 +493,17 @@
 		if (src.HasAlpha || !dest.HasAlpha || (src.Width != dest.Width) || (src.Height != dest.Height))
 			throw new ApplicationException ("invalid pixbufs");

-		byte *dpix = (byte *)dest.Pixels;
-		byte *spix = (byte *)src.Pixels;
+		byte * dpix = (byte *)dest.Pixels;
+		byte * spix = (byte *)src.Pixels;
 		int h = src.Height;
 		int w = src.Width;
 		for (int j = 0; j < h; j++) {
-			byte *d = dpix;
-			byte *s = spix;
+			byte * d = dpix;
+			byte * s = spix;
 			for (int i = 0; i < w; i++) {
-				d[0] = s[0];
-				d[1] = s[1];
-				d[2] = s[2];
+				d [0] = s [0];
+				d [1] = s [1];
+				d [2] = s [2];
 				d += 4;
 				s += 3;
 			}
@@ -525,103 +519,97 @@
 		}
 	}

-	[Obsolete ("Use GetOrientation (SafeUri) instead")]
-	public static ImageOrientation GetOrientation (string path)
-	{
-        return GetOrientation (new SafeUri (path));
-	}
-
 	[DllImport("libgnomeui-2-0.dll")]
-	static extern IntPtr gnome_thumbnail_scale_down_pixbuf(IntPtr pixbuf, int dest_width, int dest_height);
+	static extern IntPtr gnome_thumbnail_scale_down_pixbuf (IntPtr pixbuf, int dest_width, int dest_height);

 	public static Gdk.Pixbuf ScaleDown (Gdk.Pixbuf src, int width, int height)
 	{
-		IntPtr raw_ret = gnome_thumbnail_scale_down_pixbuf(src.Handle, width, height);
+		IntPtr raw_ret = gnome_thumbnail_scale_down_pixbuf (src.Handle, width, height);
 		Gdk.Pixbuf ret;
 		if (raw_ret == IntPtr.Zero)
 			ret = null;
 		else
-			ret = (Gdk.Pixbuf) GLib.Object.GetObject(raw_ret, true);
+			ret = (Gdk.Pixbuf)GLib.Object.GetObject (raw_ret, true);
 		return ret;
 	}

-    public static void CreateDerivedVersion (SafeUri source, SafeUri destination)
-    {
-        CreateDerivedVersion (source, destination, 95);
-    }
-
-    public static void CreateDerivedVersion (SafeUri source, SafeUri destination, uint jpeg_quality)
-    {
-        if (source.GetExtension () == destination.GetExtension ()) {
-            // Simple copy will do!
-            var file_from = GLib.FileFactory.NewForUri (source);
-            var file_to = GLib.FileFactory.NewForUri (destination);
-            file_from.Copy (file_to, GLib.FileCopyFlags.AllMetadata | GLib.FileCopyFlags.Overwrite, null, null);
-            return;
-        }
-
-        // Else make a derived copy with metadata copied
-        using (var img = ImageFile.Create (source)) {
-            using (var pixbuf = img.Load ()) {
-                CreateDerivedVersion (source, destination, jpeg_quality, pixbuf);
-            }
-        }
-    }
-
-    public static void CreateDerivedVersion (SafeUri source, SafeUri destination, uint jpeg_quality, Pixbuf pixbuf)
-    {
-        SaveToSuitableFormat (destination, pixbuf, jpeg_quality);
-
-        using (var metadata_from = Metadata.Parse (source)) {
-            using (var metadata_to = Metadata.Parse (destination)) {
-                metadata_to.CopyFrom (metadata_from);
-
-                // Reset orientation to make sure images appear upright.
-                metadata_to.ImageTag.Orientation = ImageOrientation.TopLeft;
-                metadata_to.Save ();
-            }
-        }
-    }
-
-    private static void SaveToSuitableFormat (SafeUri destination, Pixbuf pixbuf, uint jpeg_quality)
-    {
-        // FIXME: this needs to work on streams rather than filenames. Do that when we switch to
-        // newer GDK.
-        var extension = destination.GetExtension ().ToLower ();
-        if (extension == ".png") {
-            pixbuf.Save (destination.LocalPath, "png");
-        } else if (extension == ".jpg" || extension == ".jpeg") {
-            pixbuf.Save (destination.LocalPath, "jpeg", jpeg_quality);
-        } else {
-            throw new NotImplementedException ("Saving this file format is not supported");
-        }
-    }
+	public static void CreateDerivedVersion (SafeUri source, SafeUri destination)
+	{
+		CreateDerivedVersion (source, destination, 95);
+	}
+
+	public static void CreateDerivedVersion (SafeUri source, SafeUri destination, uint jpeg_quality)
+	{
+		if (source.GetExtension () == destination.GetExtension ()) {
+			// Simple copy will do!
+			var file_from = GLib.FileFactory.NewForUri (source);
+			var file_to = GLib.FileFactory.NewForUri (destination);
+			file_from.Copy (file_to, GLib.FileCopyFlags.AllMetadata | GLib.FileCopyFlags.Overwrite, null, null);
+			return;
+		}
+
+		// Else make a derived copy with metadata copied
+		using (var img = ImageFile.Create (source)) {
+			using (var pixbuf = img.Load ()) {
+				CreateDerivedVersion (source, destination, jpeg_quality, pixbuf);
+			}
+		}
+	}
+
+	public static void CreateDerivedVersion (SafeUri source, SafeUri destination, uint jpeg_quality, Pixbuf pixbuf)
+	{
+		SaveToSuitableFormat (destination, pixbuf, jpeg_quality);
+
+		using (var metadata_from = Metadata.Parse (source)) {
+			using (var metadata_to = Metadata.Parse (destination)) {
+				metadata_to.CopyFrom (metadata_from);
+
+				// Reset orientation to make sure images appear upright.
+				metadata_to.ImageTag.Orientation = ImageOrientation.TopLeft;
+				metadata_to.Save ();
+			}
+		}
+	}
+
+	private static void SaveToSuitableFormat (SafeUri destination, Pixbuf pixbuf, uint jpeg_quality)
+	{
+		// FIXME: this needs to work on streams rather than filenames. Do that when we switch to
+		// newer GDK.
+		var extension = destination.GetExtension ().ToLower ();
+		if (extension == ".png")
+			pixbuf.Save (destination.LocalPath, "png");
+		else if (extension == ".jpg" || extension == ".jpeg")
+			pixbuf.Save (destination.LocalPath, "jpeg", jpeg_quality);
+		else
+			throw new NotImplementedException ("Saving this file format is not supported");
+	}

 #region Gdk hackery

-    // This hack below is needed because there is no wrapped version of
-    // Save which allows specifying the variable arguments (it's not
-    // possible with p/invoke).
-
-    [DllImport("libgdk_pixbuf-2.0-0.dll")]
-    static extern bool gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error,
+	// This hack below is needed because there is no wrapped version of
+	// Save which allows specifying the variable arguments (it's not
+	// possible with p/invoke).
+
+	[DllImport("libgdk_pixbuf-2.0-0.dll")]
+	static extern bool gdk_pixbuf_save (IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error,
             IntPtr optlabel1, IntPtr optvalue1, IntPtr dummy);

-    private static bool Save (this Pixbuf pixbuf, string filename, string type, uint jpeg_quality)
-    {
-        IntPtr error = IntPtr.Zero;
-        IntPtr nfilename = GLib.Marshaller.StringToPtrGStrdup (filename);
-        IntPtr ntype = GLib.Marshaller.StringToPtrGStrdup (type);
-        IntPtr optlabel1 = GLib.Marshaller.StringToPtrGStrdup ("quality");
-        IntPtr optvalue1 = GLib.Marshaller.StringToPtrGStrdup (jpeg_quality.ToString ());
-        bool ret = gdk_pixbuf_save(pixbuf.Handle, nfilename, ntype, out error, optlabel1, optvalue1, IntPtr.Zero);
-        GLib.Marshaller.Free (nfilename);
-        GLib.Marshaller.Free (ntype);
-        GLib.Marshaller.Free (optlabel1);
-        GLib.Marshaller.Free (optvalue1);
-        if (error != IntPtr.Zero) throw new GLib.GException (error);
-        return ret;
-    }
+	private static bool Save (this Pixbuf pixbuf, string filename, string type, uint jpeg_quality)
+	{
+		IntPtr error = IntPtr.Zero;
+		IntPtr nfilename = GLib.Marshaller.StringToPtrGStrdup (filename);
+		IntPtr ntype = GLib.Marshaller.StringToPtrGStrdup (type);
+		IntPtr optlabel1 = GLib.Marshaller.StringToPtrGStrdup ("quality");
+		IntPtr optvalue1 = GLib.Marshaller.StringToPtrGStrdup (jpeg_quality.ToString ());
+		bool ret = gdk_pixbuf_save (pixbuf.Handle, nfilename, ntype, out error, optlabel1, optvalue1, IntPtr.Zero);
+		GLib.Marshaller.Free (nfilename);
+		GLib.Marshaller.Free (ntype);
+		GLib.Marshaller.Free (optlabel1);
+		GLib.Marshaller.Free (optvalue1);
+		if (error != IntPtr.Zero)
+			throw new GLib.GException (error);
+		return ret;
+	}

 #endregion
 }


Add null check

Add null check

--- Winston/Serialization/Yml.cs
+++ Winston/Serialization/Yml.cs
@@ -34,11 +34,12 @@
         public static bool TryLoad<T>(string path, out T result, Func<T> defaultVal)
         {
             var success = TryLoad(path, out result);
-            if (!success)
+            if (success) { return true; }
+            if (defaultVal != null)
             {
                 result = defaultVal();
             }
-            return success;
+            throw new ArgumentNullException(nameof(defaultVal));
         }

         public static void Save(object obj, string path)


remove unused TermTaxanomy enum

remove unused TermTaxanomy enum

--- WordPressPCL/Models/Enums.cs
+++ WordPressPCL/Models/Enums.cs
@@ -518,58 +518,4 @@
         [EnumMember(Value = "application")]
         Application
     }
-
-    /// <summary>
-    /// Type attribution for the term.
-    /// </summary>
-    [JsonConverter(typeof(StringEnumConverter))]
-    public enum TermTaxonomy
-    {
-        /// <summary>
-        /// Category
-        /// </summary>
-        [EnumMember(Value = "category")]
-        Category,
-
-        /// <summary>
-        /// Post Tag
-        /// </summary>
-        [EnumMember(Value = "post_tag")]
-        PostTag,
-
-        /// <summary>
-        /// Nav Menu
-        /// </summary>
-        [EnumMember(Value = "nav_menu")]
-        NavMenu,
-
-        /// <summary>
-        /// Link Category
-        /// </summary>
-        [EnumMember(Value = "link_category")]
-        LinkCategory,
-
-        /// <summary>
-        /// Post Format
-        /// </summary>
-        [EnumMember(Value = "post_format")]
-        PostFormat,
-
-        /// <summary>
-        /// Placeholder for unknown terms
-        /// </summary>
-        [EnumMember(Value = "unknown")]
-        Unknown,
-
-        ///
-        /// Custom Tags below
-        ///
-
-        /// <summary>
-        /// Yoast Seo Plugin - Prominent Words
-        /// </summary>
-        [EnumMember(Value = "yst_prominent_words")]
-        YoastProminentWords
-
-    }
 }


Fixed sorting of builds so that the latest build is displayed

--- WorldSmith/CheckForUpdate.cs
+++ WorldSmith/CheckForUpdate.cs
@@ -56,7 +56,7 @@
             else
             {
                 var builds = UpdaterLib.Updater.GetBuildsForChannel(v.Channel, UpdateURL);
-                var b = builds.OrderBy(x => x.Date).FirstOrDefault();
+                var b = builds.OrderByDescending(x => x.Date).FirstOrDefault();
                 Console.WriteLine("[UpdateChecker] There is an update to worldsmith!  ");
                 Console.WriteLine("[UpdateChecker] " + b.Version + " released on " + b.Date.ToShortDateString() + ".  Build notes: " + b.Notes);
             }


Update test

Update test

--- Wox.Test/FuzzyMatcherTest.cs
+++ Wox.Test/FuzzyMatcherTest.cs
@@ -161,21 +161,32 @@
             Assert.IsTrue(orderedResults[3].Score == 107 && orderedResults[3].Title == searchStrings[3]);
             Assert.IsTrue(orderedResults[4].Score == 0 && orderedResults[4].Title == searchStrings[4]);
         }
-
+
+        [TestCase("goo", "Google Chrome", (int)StringMatcher.SearchPrecisionScore.Regular, true)]
         [TestCase("chr", "Chrome", (int)StringMatcher.SearchPrecisionScore.Regular, true)]
+        [TestCase("chr", "Google Chrome", (int)StringMatcher.SearchPrecisionScore.Low, true)]
         [TestCase("chr", "Help cure hope raise on mind entity Chrome", (int)StringMatcher.SearchPrecisionScore.Regular, false)]
         [TestCase("chr", "Help cure hope raise on mind entity Chrome", (int)StringMatcher.SearchPrecisionScore.Low, true)]
         [TestCase("chr", "Candy Crush Saga from King", (int)StringMatcher.SearchPrecisionScore.Regular, false)]
-        [TestCase("chr", "Candy Crush Saga from King", (int)StringMatcher.SearchPrecisionScore.Low, true)]
+        [TestCase("chr", "Candy Crush Saga from King", (int)StringMatcher.SearchPrecisionScore.None, true)]
+        [TestCase("ccs", "Candy Crush Saga from King", (int)StringMatcher.SearchPrecisionScore.Low, true)]
+        [TestCase("cand", "Candy Crush Saga from King", (int)StringMatcher.SearchPrecisionScore.Regular, true)]
+        [TestCase("cand", "Help cure hope raise on mind entity Chrome", (int)StringMatcher.SearchPrecisionScore.Regular, false)]
         public void WhenGivenDesiredPrecisionIsRegularShouldReturnAllResultsEqualGreaterThanRegular(string queryString, string compareString,
                                                                                int expectedPrecisionScore, bool expectedPrecisionResult)
         {
             var expectedPrecisionString = (StringMatcher.SearchPrecisionScore)expectedPrecisionScore;
             StringMatcher.UserSettingSearchPrecision = expectedPrecisionString.ToString();
             var matchResult = StringMatcher.FuzzySearch(queryString, compareString, new MatchOption());
-            var matchScore = matchResult.Score;
-            var matchPrecisionResult = matchResult.IsPreciciseMatch();
-            Debug.WriteLine(matchScore);
+
+            Debug.WriteLine("");
+            Debug.WriteLine("###############################################");
+            Debug.WriteLine($"SearchTerm: {queryString} PrecisionLevelSetAt: {expectedPrecisionString} ({expectedPrecisionScore})");
+            Debug.WriteLine($"SCORE: {matchResult.Score.ToString()}, ComparedString: {compareString}");
+            Debug.WriteLine("###############################################");
+            Debug.WriteLine("");
+
+            var matchPrecisionResult = matchResult.IsPreciciseMatch();
             Assert.IsTrue(matchPrecisionResult == expectedPrecisionResult);
         }
     }