Clean up the code a but and avoid double loading the assembly.

--- XUnitRemote/Remote/Service/TestService.cs
+++ XUnitRemote/Remote/Service/TestService.cs
@@ -24,18 +24,25 @@

         public async Task RunTest(string assemblyPath, string typeName, string methodName)
         {
-            var assembly = Assembly.LoadFrom(assemblyPath);
-            var assemblyInfo = new ReflectionAssemblyInfo(assembly);
             var visitor = new MessageSink(_NotificationService.TestFinished);
             var sourceProvider = new NullSourceInformationProvider();
-            var xunit2 = new Xunit2(AppDomainSupport.Denied, sourceProvider, assemblyPath,null, false, null,visitor, true);
+            var xunit2 = new Xunit2
+                ( appDomainSupport: AppDomainSupport.Denied
+                , sourceInformationProvider: sourceProvider
+                , assemblyFileName: assemblyPath
+                , configFileName: null
+                , shadowCopy: false // Has no effect if appDomainSupport is 'denied'.
+                , shadowCopyFolder: null
+                , diagnosticMessageSink: visitor
+                , verifyTestAssemblyExists: true
+                );

             var testAssemblyConfiguration = new TestAssemblyConfiguration
             {
                 MaxParallelThreads = 1,
                 ParallelizeAssembly = false,
+                AppDomain = AppDomainSupport.Denied,
                 ShadowCopy = false,
-                AppDomain = AppDomainSupport.Denied,
                 ParallelizeTestCollections = false
             };

@@ -44,7 +51,7 @@

             var discoveryVisitor = new TestDiscoveryVisitor(testCase => FilterTestCase(testCase, assemblyPath, typeName, methodName));

-            var discover = new XunitTestFrameworkDiscoverer(assemblyInfo,sourceProvider,visitor);
+            var discover = xunit2;

             discover.Find(true, discoveryVisitor, discoveryOptions);
             discoveryVisitor.Finished.WaitOne();


Revise parameters to better enforce UIField for content convention

--- DesignTools/PublicPropertyEditor.cs
+++ DesignTools/PublicPropertyEditor.cs
@@ -124,14 +124,10 @@
 			return mainContainer;
 		}

-		private static FlowLayoutWidget CreateSettingsRow(EditableProperty property, GuiWidget widget = null)
+		private static FlowLayoutWidget CreateSettingsRow(EditableProperty property, UIField field)
 		{
 			var row = CreateSettingsRow(property.DisplayName.Localize(), property.Description.Localize());
-
-			if (widget != null)
-			{
-				row.AddChild(widget);
-			}
+			row.AddChild(field.Content);

 			return row;
 		}
@@ -244,7 +240,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			else if (property.Value is Vector2 vector2)
 			{
@@ -258,7 +254,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			else if (property.Value is Vector3 vector3)
 			{
@@ -272,7 +268,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			else if (property.Value is DirectionVector directionVector)
 			{
@@ -286,7 +282,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			else if (property.Value is DirectionAxis directionAxis)
 			{
@@ -320,7 +316,7 @@
 					property.Item.Invalidated -= updateData;
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			else if (property.Value is ChildrenSelector childSelector)
 			{
@@ -340,7 +336,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			// create a bool editor
 			else if (property.Value is bool boolValue)
@@ -355,7 +351,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			// create a string editor
 			else if (property.Value is string stringValue)
@@ -370,7 +366,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			// create a char editor
 			else if (property.Value is char charValue)
@@ -385,7 +381,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			// create an enum editor
 			else if (property.PropertyType.IsEnum)
@@ -409,7 +405,7 @@
 					propertyGridModifier?.UpdateControls(context);
 				};

-				rowContainer = CreateSettingsRow(property, field.Content);
+				rowContainer = CreateSettingsRow(property, field);
 			}
 			// Use known IObject3D editors
 			else if (property.Value is IObject3D object3D


Index Modification

Index Modification

--- DestinyAuth/Views/Home/Index.cshtml
+++ DestinyAuth/Views/Home/Index.cshtml
@@ -2,108 +2,21 @@
     ViewData["Title"] = "Home Page";
 }

-

-

-

-

-

-

-

-

-

-
-

-

-                    Learn how to build ASP.NET apps that can run anywhere.
-
-                        Learn More
-
-

-

-

-

-
-

-

-                    There are powerful new features in Visual Studio for building modern web apps.
-
-                        Learn More
-
-

-

-

-

-
-

-

-                    Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
-
-                        Learn More
-
-

-

-

-

-
-

-

-                    Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
-
-                        Learn More
-
-

-

-

-

-
-
-        Previous
-
-
-
-        Next
-
-

-

-

-
Application uses

+

+
Destiny Auth Example in .NET

+

+            This is a simple example of how to use the new Bungie OAuth authentication in .NET.
+            This example is made in .NET Core, but should work as a base for anything else C#.
+
+

+

+            Please note the following:
+

-
Sample pages using ASP.NET Core MVC

-
Bower for managing client-side libraries

-
Theming using Bootstrap

-

-

-

-
How to

-

-
Add a Controller and View

-
Add an appsetting in config and access it in app.

-
Manage User Secrets using Secret Manager.

-
Use logging to log a message.

-
Add packages using NuGet.

-
Add client packages using Bower.

-
Target development, staging or production environment.

-

-

-

-
Overview

-

-
Conceptual overview of what is ASP.NET Core

-
Fundamentals of ASP.NET Core such as Startup and middleware.

-
Working with Data

-
Security

-
Client side development

-
Develop on different platforms

-
Read more on the documentation site

-

-

-

-
Run & Deploy

-

-
Run your app

-
Run tools such as EF migrations and more

-
Publish to Microsoft Azure Web Apps

+
Is not intended to be Highly secure. Just works. I don't use the state param for example

+
I'm not using any best practices or something like that. Again, just works.

+
Any question related to this, should be made on GitHub, or the Bungie.net's dev community.


忽略AY与AZ

忽略AY与AZ

--- DigitalPlatform.SIP2/BaseMessage.cs
+++ DigitalPlatform.SIP2/BaseMessage.cs
@@ -79,9 +79,16 @@

         protected string GetVariableFieldValue(string id)
         {
+
             VariableLengthField field = this.GetVariableField(id);
             if (field == null)
+            {
+                // 20170811 jane todo
+                if (id == "AY" || id == "AZ")
+                    return "";
+
                 throw new Exception("未定义变长字段" + id);
+            }

             return field.Value;
         }
@@ -89,9 +96,16 @@
         // 设置某个定长字段的值
         protected void SetVariableFieldValue(string id, string value)
         {
+
             VariableLengthField field = this.GetVariableField(id);
             if (field == null)
+            {
+                // 20170811 jane todo
+                if (id == "AY" || id == "AZ")
+                    return;
+
                 throw new Exception("未定义变长字段" + id);
+            }

             field.Value = value;
         }


Fix: Client WMI Serial Number

Fix: Client WMI Serial Number

Potential bug where a NULL serial number could cause an unexpected
error.
See: http://discoict.com.au/forum/support/2013/2/client-error.aspx

--- Disco.Client/Interop/SystemAudit.cs
+++ Disco.Client/Interop/SystemAudit.cs
@@ -1,180 +1,198 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Management;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Disco.Client.Interop
-{
-    public static class SystemAudit
-    {
-
-        public static string DeviceSerialNumber { get; private set; }
-        public static string DeviceSMBIOSVersion { get; private set; }
-        public static string DeviceManufacturer { get; private set; }
-        public static string DeviceModel { get; private set; }
-        public static string DeviceType { get; private set; }
-        public static string DeviceUUID { get; private set; }
-        public static bool DeviceIsPartOfDomain { get; private set; }
-
-        static SystemAudit()
-        {
-            // Get BIOS Information
-            try
-            {
-                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT SerialNumber, SMBIOSBIOSVersion FROM Win32_BIOS WHERE PrimaryBios=true"))
-                {
-                    using (ManagementObjectCollection mResults = mSearcher.Get())
-                    {
-                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
-                        {
-                            if (mItem != null)
-                            {
-                                DeviceSerialNumber = mItem.GetPropertyValue("SerialNumber").ToString().Trim();
-                                ErrorReporting.DeviceIdentifier = DeviceSerialNumber;
-                                DeviceSMBIOSVersion = mItem.GetPropertyValue("SMBIOSBIOSVersion").ToString().Trim();
-                            }
-                            else
-                            {
-                                throw new Exception("No Win32_BIOS WHERE PrimaryBios=true was found");
-                            }
-                        }
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                throw new Exception("Disco Client was unable to retrieve BIOS information from WMI", ex);
-            }
-
-            // Get System Information
-            try
-            {
-                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT Manufacturer, Model, PartOfDomain, PCSystemType FROM Win32_ComputerSystem"))
-                {
-                    using (ManagementObjectCollection mResults = mSearcher.Get())
-                    {
-                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
-                        {
-                            if (mItem != null)
-                            {
-                                DeviceManufacturer = mItem.GetPropertyValue("Manufacturer").ToString().Trim();
-                                DeviceModel = mItem.GetPropertyValue("Model").ToString().Trim();
-                                DeviceIsPartOfDomain = bool.Parse(mItem.GetPropertyValue("PartOfDomain").ToString());
-                                DeviceType = PCSystemTypeToString((UInt16)mItem.GetPropertyValue("PCSystemType"));
-                            }
-                            else
-                            {
-                                throw new Exception("No Win32_ComputerSystem was found");
-                            }
-                        }
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                throw new Exception("Disco Client was unable to retrieve ComputerSystem information from WMI", ex);
-            }
-
-            // Get System Product Information
-            string ComputerSystemProductSerialNumber;
-            try
-            {
-                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT IdentifyingNumber, UUID FROM Win32_ComputerSystemProduct"))
-                {
-                    using (ManagementObjectCollection mResults = mSearcher.Get())
-                    {
-                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
-                        {
-                            if (mItem != null)
-                            {
-                                ComputerSystemProductSerialNumber = mItem.GetPropertyValue("IdentifyingNumber").ToString().Trim();
-                                DeviceUUID = mItem.GetPropertyValue("UUID").ToString().Trim();
-                            }
-                            else
-                            {
-                                throw new Exception("No Win32_ComputerSystemProduct was found");
-                            }
-                        }
-                    }
-                }
-            }
-            catch (Exception ex)
-            {
-                throw new Exception("Disco Client was unable to retrieve ComputerSystemProduct information from WMI", ex);
-            }
-
-            // Added 2012-11-22 G# - Lenovo IdeaPad Serial SHIM
-            // http://www.discoict.com.au/forum/feature-requests/2012/11/serial-number-detection-on-ideapads.aspx
-            if (string.IsNullOrWhiteSpace(DeviceSerialNumber) ||
-                (DeviceManufacturer.Equals("LENOVO", StringComparison.InvariantCultureIgnoreCase) &&
-                (DeviceModel.Equals("S10-3", StringComparison.InvariantCultureIgnoreCase) // S10-3
-                || DeviceModel.Equals("2957", StringComparison.InvariantCultureIgnoreCase)))) // S10-2
-            {
-                try
-                {
-                    using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_BaseBoard"))
-                    {
-                        using (ManagementObjectCollection mResults = mSearcher.Get())
-                        {
-                            using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
-                            {
-                                if (mItem != null)
-                                {
-                                    DeviceSerialNumber = mItem.GetPropertyValue("SerialNumber").ToString().Trim();
-                                }
-                                else
-                                {
-                                    throw new Exception("No Win32_BaseBoard was found");
-                                }
-                            }
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    throw new Exception("Disco Client was unable to retrieve BaseBoard information from WMI", ex);
-                }
-                if (string.IsNullOrWhiteSpace(DeviceSerialNumber))
-                    DeviceSerialNumber = ComputerSystemProductSerialNumber;
-            }
-            // End Added 2012-11-22 G#
-
-            ErrorReporting.DeviceIdentifier = DeviceSerialNumber;
-
-            // Validate Device 'State'
-            if (string.IsNullOrWhiteSpace(DeviceSerialNumber))
-                throw new Exception("This device has no serial number stored in BIOS or BaseBoard");
-            if (DeviceSerialNumber.Length > 60)
-                throw new Exception(string.Format("The serial number reported by this device is over 60 characters long:{0}{1}", Environment.NewLine, DeviceSerialNumber));
-        }
-
-        private static string PCSystemTypeToString(UInt16 PCSystemType)
-        {
-            switch (PCSystemType)
-            {
-                case 0:
-                    return "Unknown";
-                case 1:
-                    return "Desktop";
-                case 2:
-                    return "Mobile";
-                case 3:
-                    return "Workstation";
-                case 4:
-                    return "EnterpriseServer";
-                case 5:
-                    return "SmallOfficeAndHomeOfficeServer";
-                case 6:
-                    return "AppliancePC";
-                case 7:
-                    return "PerformanceServer";
-                case 8:
-                    return "Maximum";
-                default:
-                    return "Unknown";
-            }
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Disco.Client.Interop
+{
+    public static class SystemAudit
+    {
+
+        public static string DeviceSerialNumber { get; private set; }
+        public static string DeviceSMBIOSVersion { get; private set; }
+        public static string DeviceManufacturer { get; private set; }
+        public static string DeviceModel { get; private set; }
+        public static string DeviceType { get; private set; }
+        public static string DeviceUUID { get; private set; }
+        public static bool DeviceIsPartOfDomain { get; private set; }
+
+        static SystemAudit()
+        {
+            // Get BIOS Information
+            try
+            {
+                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT SerialNumber, SMBIOSBIOSVersion FROM Win32_BIOS WHERE PrimaryBios=true"))
+                {
+                    using (ManagementObjectCollection mResults = mSearcher.Get())
+                    {
+                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
+                        {
+                            if (mItem != null)
+                            {
+                                DeviceSerialNumber = mItem.GetPropertyValue("SerialNumber") as string;
+                                if (!string.IsNullOrEmpty(DeviceSerialNumber))
+                                    DeviceSerialNumber = DeviceSerialNumber.Trim();
+
+                                ErrorReporting.DeviceIdentifier = DeviceSerialNumber;
+                                DeviceSMBIOSVersion = mItem.GetPropertyValue("SMBIOSBIOSVersion") as string;
+                                if (!string.IsNullOrEmpty(DeviceSMBIOSVersion))
+                                    DeviceSMBIOSVersion = DeviceSMBIOSVersion.Trim();
+                            }
+                            else
+                            {
+                                throw new Exception("No Win32_BIOS WHERE PrimaryBios=true was found");
+                            }
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception("Disco Client was unable to retrieve BIOS information from WMI", ex);
+            }
+
+            // Get System Information
+            try
+            {
+                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT Manufacturer, Model, PartOfDomain, PCSystemType FROM Win32_ComputerSystem"))
+                {
+                    using (ManagementObjectCollection mResults = mSearcher.Get())
+                    {
+                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
+                        {
+                            if (mItem != null)
+                            {
+                                DeviceManufacturer = mItem.GetPropertyValue("Manufacturer") as string;
+                                if (!string.IsNullOrEmpty(DeviceManufacturer))
+                                    DeviceManufacturer = DeviceManufacturer.Trim();
+
+                                DeviceModel = mItem.GetPropertyValue("Model") as string;
+                                if (!string.IsNullOrEmpty(DeviceModel))
+                                    DeviceModel = DeviceModel.Trim();
+
+                                DeviceIsPartOfDomain = (bool)mItem.GetPropertyValue("PartOfDomain");
+                                DeviceType = PCSystemTypeToString((UInt16)mItem.GetPropertyValue("PCSystemType"));
+                            }
+                            else
+                            {
+                                throw new Exception("No Win32_ComputerSystem was found");
+                            }
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception("Disco Client was unable to retrieve ComputerSystem information from WMI", ex);
+            }
+
+            // Get System Product Information
+            string ComputerSystemProductSerialNumber;
+            try
+            {
+                using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT IdentifyingNumber, UUID FROM Win32_ComputerSystemProduct"))
+                {
+                    using (ManagementObjectCollection mResults = mSearcher.Get())
+                    {
+                        using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
+                        {
+                            if (mItem != null)
+                            {
+                                ComputerSystemProductSerialNumber = mItem.GetPropertyValue("IdentifyingNumber") as string;
+                                if (!string.IsNullOrEmpty(ComputerSystemProductSerialNumber))
+                                    ComputerSystemProductSerialNumber = ComputerSystemProductSerialNumber.Trim();
+
+                                DeviceUUID = mItem.GetPropertyValue("UUID") as string;
+                                if (!string.IsNullOrEmpty(DeviceUUID))
+                                    DeviceUUID = DeviceUUID.Trim();
+                            }
+                            else
+                            {
+                                throw new Exception("No Win32_ComputerSystemProduct was found");
+                            }
+                        }
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception("Disco Client was unable to retrieve ComputerSystemProduct information from WMI", ex);
+            }
+
+            // Added 2012-11-22 G# - Lenovo IdeaPad Serial SHIM
+            // http://www.discoict.com.au/forum/feature-requests/2012/11/serial-number-detection-on-ideapads.aspx
+            if (string.IsNullOrWhiteSpace(DeviceSerialNumber) ||
+                (DeviceManufacturer.Equals("LENOVO", StringComparison.InvariantCultureIgnoreCase) &&
+                (DeviceModel.Equals("S10-3", StringComparison.InvariantCultureIgnoreCase) // S10-3
+                || DeviceModel.Equals("2957", StringComparison.InvariantCultureIgnoreCase)))) // S10-2
+            {
+                try
+                {
+                    using (ManagementObjectSearcher mSearcher = new ManagementObjectSearcher("SELECT SerialNumber FROM Win32_BaseBoard"))
+                    {
+                        using (ManagementObjectCollection mResults = mSearcher.Get())
+                        {
+                            using (var mItem = mResults.Cast<ManagementObject>().FirstOrDefault())
+                            {
+                                if (mItem != null)
+                                {
+                                    DeviceSerialNumber = mItem.GetPropertyValue("SerialNumber") as string;
+                                    if (!string.IsNullOrEmpty(DeviceSerialNumber))
+                                        DeviceSerialNumber = DeviceSerialNumber.Trim();
+                                }
+                                else
+                                {
+                                    throw new Exception("No Win32_BaseBoard was found");
+                                }
+                            }
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    throw new Exception("Disco Client was unable to retrieve BaseBoard information from WMI", ex);
+                }
+                if (string.IsNullOrWhiteSpace(DeviceSerialNumber))
+                    DeviceSerialNumber = ComputerSystemProductSerialNumber;
+            }
+            // End Added 2012-11-22 G#
+
+            ErrorReporting.DeviceIdentifier = DeviceSerialNumber;
+
+            // Validate Device 'State'
+            if (string.IsNullOrWhiteSpace(DeviceSerialNumber))
+                throw new Exception("This device has no serial number stored in BIOS or BaseBoard");
+            if (DeviceSerialNumber.Length > 60)
+                throw new Exception(string.Format("The serial number reported by this device is over 60 characters long:{0}{1}", Environment.NewLine, DeviceSerialNumber));
+        }
+
+        private static string PCSystemTypeToString(UInt16 PCSystemType)
+        {
+            switch (PCSystemType)
+            {
+                case 0:
+                    return "Unknown";
+                case 1:
+                    return "Desktop";
+                case 2:
+                    return "Mobile";
+                case 3:
+                    return "Workstation";
+                case 4:
+                    return "EnterpriseServer";
+                case 5:
+                    return "SmallOfficeAndHomeOfficeServer";
+                case 6:
+                    return "AppliancePC";
+                case 7:
+                    return "PerformanceServer";
+                case 8:
+                    return "Maximum";
+                default:
+                    return "Unknown";
+            }
+        }
+    }
+}


added support for using / (slash) as param indicator

--- DotNet.Basics/ConsoleApp/CmdLine.cs
+++ DotNet.Basics/ConsoleApp/CmdLine.cs
@@ -156,7 +156,7 @@

         private bool IsParameter(string s)
         {
-            return s.Length > 0 && s[0] == '-';
+            return s.Length > 0 && (s[0] == '-' || s[0] == '/');
         }

         public string HelpScreen()


Handle .db and .dw in code segment

Handle .db and .dw in code segment

--- z80assemble/z80assembler.cs
+++ z80assemble/z80assembler.cs
@@ -1415,12 +1415,60 @@
                         }

                     }
-
+                    if (codesegment == true)
+                    {
+                        byte[] data;
+                        switch (directive.ToUpper())
+                        {
+                            case "DB":
+                                data = new byte[1];
+                                int idata;
+                                if (isnumber(value, out idata))
+                                {
+                                    if (idata > 255)
+                                    {
+                                        Exception e = new Exception("Number too big for .db");
+                                        throw e;
+                                    }
+
+                                    data[0] = (byte)idata;
+                                    pushbytes(data);
+                                }
+                                else
+                                {
+                                    Exception e = new Exception("Unable to parse " + value);
+                                    throw e;
+                                }
+
+                                break;
+                            case "DW":
+                                data = new byte[2];
+                                int val;
+                                if (int.TryParse(value, out val))
+                                {
+                                    data[0] = (byte)(val & 0xFF);
+                                    data[1] = (byte)(val >> 8 & 0xff);
+                                    pushbytes(data);
+                                }
+                                else
+                                {
+                                    linkrequiredatdata d = new linkrequiredatdata(2,value);
+                                    linkrequiredat.Add(org, d);
+                                    org += 2;
+                                }
+                                break;
+                            case "DS":
+                                //FIXME!!!
+                                break;
+
+                        }
+                    }
+
+                    /*
                     //word size data
                     if (directive.ToUpper() == "DW")
                     {
-                        if (codesegment == true)
-                        {
+
                             int val;
                             argtype at = validatearg(value, out val);

@@ -1447,8 +1495,9 @@
                                 //WTF was that,, parse error;
                             }

-                        }
-                    }
+
+                    }
+                     */
                 }
             }


Adding missing XML documentation

Adding missing XML documentation

--- Fluent/Controls/RibbonTabControl.cs
+++ Fluent/Controls/RibbonTabControl.cs
@@ -808,6 +808,9 @@

         #endregion

+        /// <summary>
+        /// Gets the first visible item
+        /// </summary>
         public object GetFirstVisibleItem()
         {
             foreach (var item in this.Items)


Improved SDK robustness about unexpected agents and points of interest updates

--- GeeoSdk/GeeoSdk/HighLevel/GeeoWS.cs
+++ GeeoSdk/GeeoSdk/HighLevel/GeeoWS.cs
@@ -243,26 +243,36 @@
 		/// <param name="agentData">Received message data about an agent.</param>
 		private void WebSocketMessage_AgentUpdate(AgentJson agentData)
 		{
+			Agent agent;
+
 			// If the agent just entered the viewport
 			if (agentData.entered)
 			{
-				// Ensure the agent doesn't exist yet in the agents list
+				// If the agent already exists in the agents list, only update this agent's position
 				if (agents.ContainsKey(agentData.agent_id))
 				{
-					DebugLogs.LogError("[GeeoWS:WebSocketMessage_AgentUpdate] A new agent entered the viewport ›› Identifier ‘" + agentData.agent_id + "’ already exists");
-					if (OnError != null) { OnError("A new agent entered the viewport ›› Identifier ‘" + agentData.agent_id + "’ already exists"); }
-					return;
-				}
-
-				// Create a new Agent instance and fill its data from the received message
-				Agent agent = new Agent();
-				agent.id = agentData.agent_id;
-				agent.latitude = agentData.pos[1];
-				agent.longitude = agentData.pos[0];
-				agent.publicData = agentData.publicData;
-
-				// Add the new agent to the agents list
-				agents.Add(agentData.agent_id, agent);
+					DebugLogs.LogWarning("[GeeoWS:WebSocketMessage_AgentUpdate] Agent ‘" + agentData.agent_id + "’ received 2 ‘entered’ updates without any ‘left’ one");
+
+					// Get the agent corresponding to its identifier from the agents list
+					agent = agents[agentData.agent_id];
+
+					// Update agent's data from the received message
+					agent.latitude = agentData.pos[1];
+					agent.longitude = agentData.pos[0];
+				}
+				// If the agent doesn't exist in the agents list, add this agent to the list
+				else
+				{
+					// Create a new Agent instance and fill its data from the received message
+					agent = new Agent();
+					agent.id = agentData.agent_id;
+					agent.latitude = agentData.pos[1];
+					agent.longitude = agentData.pos[0];
+					agent.publicData = agentData.publicData;
+
+					// Add the new agent to the agents list
+					agents.Add(agentData.agent_id, agent);
+				}

 				// Trigger the OnAgentEntered event if any callback registered to it
 				if (OnAgentEntered != null) { OnAgentEntered(agent); }
@@ -270,19 +280,24 @@
 			// If the agent just left the viewport
 			else if (agentData.left)
 			{
-				// Ensure the agent does exist in the agents list
+				// If the agent doesn't exist in the agents list, just ignore this update
 				if (!agents.ContainsKey(agentData.agent_id))
 				{
-					DebugLogs.LogError("[GeeoWS:WebSocketMessage_AgentUpdate] An agent left the viewport ›› Identifier ‘" + agentData.agent_id + "’ does not exist");
-					if (OnError != null) { OnError("An agent left the viewport ›› Identifier ‘" + agentData.agent_id + "’ does not exist"); }
-					return;
-				}
-
-				// Get the agent corresponding to its identifier for the agents list
-				Agent agent = agents[agentData.agent_id];
-
-				// Remove the agent from the agents list
-				agents.Remove(agentData.agent_id);
+					DebugLogs.LogWarning("[GeeoWS:WebSocketMessage_AgentUpdate] Agent ‘" + agentData.agent_id + "’ received a ‘left’ update after another ‘left’ one or no prior ‘entered’ one");
+
+					// Create a new Agent instance and fill its data from the received message
+					agent = new Agent();
+					agent.id = agentData.agent_id;
+				}
+				// If the agent does exist in the agents list, remove this agent from the list
+				else
+				{
+					// Get the agent corresponding to its identifier from the agents list
+					agent = agents[agentData.agent_id];
+
+					// Remove the agent from the agents list
+					agents.Remove(agentData.agent_id);
+				}

 				// Trigger the OnAgentLeft event if any callback registered to it
 				if (OnAgentLeft != null) { OnAgentLeft(agent); }
@@ -290,20 +305,30 @@
 			// If the agent just moved in the viewport
 			else
 			{
-				// Ensure the agent does exist in the agents list
+				// If the agent doesn't exist in the agents list, add this agent to the list
 				if (!agents.ContainsKey(agentData.agent_id))
 				{
-					DebugLogs.LogError("[GeeoWS:WebSocketMessage_AgentUpdate] An agent moved in the viewport ›› Identifier ‘" + agentData.agent_id + "’ does not exist");
-					if (OnError != null) { OnError("An agent moved in the viewport ›› Identifier ‘" + agentData.agent_id + "’ does not exist"); }
-					return;
-				}
-
-				// Get the agent corresponding to its identifier for the agents list
-				Agent agent = agents[agentData.agent_id];
-
-				// Update agent's data from the received message
-				agent.latitude = agentData.pos[1];
-				agent.longitude = agentData.pos[0];
+					DebugLogs.LogWarning("[GeeoWS:WebSocketMessage_AgentUpdate] Agent ‘" + agentData.agent_id + "’ received a ‘moved’ update without any prior ‘entered’ one");
+
+					// Create a new Agent instance and fill its data from the received message
+					agent = new Agent();
+					agent.id = agentData.agent_id;
+					agent.latitude = agentData.pos[1];
+					agent.longitude = agentData.pos[0];
+
+					// Add the new agent to the agents list
+					agents.Add(agentData.agent_id, agent);
+				}
+				// If the agent does exist in the agents list, update this agent's position
+				else
+				{
+					// Get the agent corresponding to its identifier from the agents list
+					agent = agents[agentData.agent_id];
+
+					// Update agent's data from the received message
+					agent.latitude = agentData.pos[1];
+					agent.longitude = agentData.pos[0];
+				}

 				// Trigger the OnAgentMoved event if any callback registered to it
 				if (OnAgentMoved != null) { OnAgentMoved(agent); }
@@ -316,27 +341,33 @@
 		/// <param name="pointOfInterestData">Received message data about a point of interest.</param>
 		private void WebSocketMessage_PointOfInterestUpdate(PointOfInterestJson pointOfInterestData)
 		{
+			PointOfInterest pointOfInterest;
+
 			// If the point of interest just entered the viewport
 			if (pointOfInterestData.entered)
 			{
-				// Ensure the point of interest doesn't exist yet in the points of interest list
+				// If the point of interest already exists in the points of interest list, just ignore this update
 				if (pointsOfInterest.ContainsKey(pointOfInterestData.poi_id))
 				{
-					DebugLogs.LogError("[GeeoWS:WebSocketMessage_PointOfInterestUpdate] A new point of interest entered the viewport ›› Identifier ‘" + pointOfInterestData.poi_id + "’ already exists");
-					if (OnError != null) { OnError("A new point of interest entered the viewport ›› Identifier ‘" + pointOfInterestData.poi_id + "’ already exists"); }
-					return;
-				}
-
-				// Create a new PointOfInterest instance and fill its data from the received message
-				PointOfInterest pointOfInterest = new PointOfInterest();
-				pointOfInterest.id = pointOfInterestData.poi_id;
-				pointOfInterest.latitude = pointOfInterestData.pos[1];
-				pointOfInterest.longitude = pointOfInterestData.pos[0];
-				pointOfInterest.publicData = pointOfInterestData.publicData;
-				pointOfInterest.creatorId = pointOfInterestData.creator;
-
-				// Add the new point of interest to the points of interest list
-				pointsOfInterest.Add(pointOfInterestData.poi_id, pointOfInterest);
+					DebugLogs.LogWarning("[GeeoWS:WebSocketMessage_PointOfInterestUpdate] Point of interest ‘" + pointOfInterestData.poi_id + "’ received 2 ‘entered’ updates without any ‘left’ one");
+
+					// Get the point of interest corresponding to its identifier from the points of interest list
+					pointOfInterest = pointsOfInterest[pointOfInterestData.poi_id];
+				}
+				// If the point of interest doesn't exist in the points of interest list, add this point of interest to the list
+				else
+				{
+					// Create a new PointOfInterest instance and fill its data from the received message
+					pointOfInterest = new PointOfInterest();
+					pointOfInterest.id = pointOfInterestData.poi_id;
+					pointOfInterest.latitude = pointOfInterestData.pos[1];
+					pointOfInterest.longitude = pointOfInterestData.pos[0];
+					pointOfInterest.publicData = pointOfInterestData.publicData;
+					pointOfInterest.creatorId = pointOfInterestData.creator;
+
+					// Add the new point of interest to the points of interest list
+					pointsOfInterest.Add(pointOfInterestData.poi_id, pointOfInterest);
+				}

 				// Trigger the OnPointOfInterestEntered event if any callback registered to it
 				if (OnPointOfInterestEntered != null) { OnPointOfInterestEntered(pointOfInterest); }
@@ -344,19 +375,24 @@
 			// If the point of interest just left the viewport
 			else if (pointOfInterestData.left)
 			{
-				// Ensure the point of interest does exist in the points of interest list
+				// If the point of interest doesn't exist in the points of interest list, just ignore this update
 				if (!pointsOfInterest.ContainsKey(pointOfInterestData.poi_id))
 				{
-					DebugLogs.LogError("[GeeoWS:WebSocketMessage_PointOfInterestUpdate] A point of interest left the viewport ›› Identifier ‘" + pointOfInterestData.poi_id + "’ does not exist");
-					if (OnError != null) { OnError("A point of interest left the viewport ›› Identifier ‘" + pointOfInterestData.poi_id + "’ does not exist"); }
-					return;
-				}
-
-				// Get the point of interest corresponding to its identifier for the points of interest list
-				PointOfInterest pointOfInterest = pointsOfInterest[pointOfInterestData.poi_id];
-
-				// Remove the point of interest from the points of interest list
-				pointsOfInterest.Remove(pointOfInterestData.poi_id);
+					DebugLogs.LogWarning("[GeeoWS:WebSocketMessage_PointOfInterestUpdate] Point of interest ‘" + pointOfInterestData.poi_id + "’ received a ‘left’ update after another ‘left’ one or no prior ‘entered’ one");
+
+					// Create a new PointOfInterest instance and fill its data from the received message
+					pointOfInterest = new PointOfInterest();
+					pointOfInterest.id = pointOfInterestData.poi_id;
+				}
+				// If the point of interest does exist in the points of interest list, remove this point of interest from the list
+				else
+				{
+					// Get the point of interest corresponding to its identifier from the points of interest list
+					pointOfInterest = pointsOfInterest[pointOfInterestData.poi_id];
+
+					// Remove the point of interest from the points of interest list
+					pointsOfInterest.Remove(pointOfInterestData.poi_id);
+				}

 				// Trigger the OnPointOfInterestLeft event if any callback registered to it
 				if (OnPointOfInterestLeft != null) { OnPointOfInterestLeft(pointOfInterest); }
@@ -572,7 +608,7 @@
 		}

 		/// <summary>
-		/// Create a new point of interest.
+		/// The connected agent creates a new point of interest.
 		/// </summary>
 		/// <param name="id">Point of interest's identifier.</param>
 		/// <param name="latitude">Point of interest's location latitude.</param>
@@ -585,7 +621,7 @@
 		}

 		/// <summary>
-		/// Remove an existing point of interest.
+		/// The connected agent removes an existing point of interest. (only the creator agent is allowed to do this)
 		/// </summary>
 		/// <param name="id">Point of interest's identifier.</param>
 		public void RemovePointOfInterest(string id)
@@ -595,7 +631,7 @@
 		}

 		/// <summary>
-		/// Create a new air beacon.
+		/// The connected agent creates a new air beacon.
 		/// </summary>
 		/// <param name="id">Air beacon's identifier.</param>
 		/// <param name="latitude1">Air beacon's first latitude bound.</param>
@@ -610,7 +646,7 @@
 		}

 		/// <summary>
-		/// Remove an existing air beacon.
+		/// The connected agent removes an existing air beacon. (only the creator agent is allowed to do this)
 		/// </summary>
 		/// <param name="id">Air beacon's identifier.</param>
 		public void RemoveAirBeacon(string id)


Update JsResource.cs

Update JsResource.cs

fixed breaking change

--- Glimpse.NLog/Resource/JsResource.cs
+++ Glimpse.NLog/Resource/JsResource.cs
@@ -7,10 +7,14 @@
     public class JsResource : FileResource, IDynamicClientScript
     {
         private const string InternalName = "glimpse_nlog_js";
+
+        protected override EmbeddedResourceInfo GetEmbeddedResourceInfo(IResourceContext context)
+        {
+            return new EmbeddedResourceInfo(this.GetType().Assembly, "Glimpse.NLog.Resource.glimpse.nlog.js", @"application/x-javascript");
+        }
+

         public JsResource() {
-            ResourceName = "Glimpse.NLog.Resource.glimpse.nlog.js";
-            ResourceType = @"application/x-javascript";
             Name = InternalName;
         }

@@ -22,4 +26,4 @@
             return InternalName;
         }
     }
-}+}


BasketMessageAdapter. Fix portfolio subscriptions.

--- Algo/BasketMessageAdapter.cs
+++ Algo/BasketMessageAdapter.cs
@@ -977,6 +977,8 @@
 						SendOutMessage(message.Type.ToResultType().CreateLookupResult(subscrMsg.TransactionId));
 						return;
 					}
+
+					_subscription.TryAdd(subscrMsg.TransactionId, Tuple.Create((ISubscriptionMessage)subscrMsg.Clone(), adapters, subscrMsg.ToDataType()));
 				}
 				else
 					adapters = null;
@@ -1451,14 +1453,20 @@
 						}

 						var pfMsg = (IPortfolioNameMessage)message;
-						PortfolioAdapterProvider.SetAdapter(pfMsg.PortfolioName, GetUnderlyingAdapter(innerAdapter).Id);
+						var pfName = pfMsg.PortfolioName;
+
+						var underlyingAdapter = GetUnderlyingAdapter(innerAdapter);
+						PortfolioAdapterProvider.SetAdapter(pfName, underlyingAdapter.Id);

 						if (HasSubscription(DataType.PositionChanges) && innerAdapter.IsSupportSubscriptionByPortfolio())
 						{
-							var pfSubscrMsg = CreatePortfolioSubscription(innerAdapter, pfMsg.PortfolioName);
-
-							if (pfSubscrMsg != null)
-								extra = new List<Message> { pfSubscrMsg };
+							if (_subscribedPortfolios.SafeAdd(underlyingAdapter, key => new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)).Add(pfName))
+							{
+								var pfSubscrMsg = FillIdAndAdapter(innerAdapter, new PortfolioMessage { PortfolioName = pfName });
+
+								if (pfSubscrMsg != null)
+									extra = new List<Message> { pfSubscrMsg };
+							}
 						}

 						break;
@@ -1577,19 +1585,6 @@
 			m.IsBack = true;

 			return m;
-		}
-
-		private PortfolioMessage CreatePortfolioSubscription(IMessageAdapter adapter, string portfolioName)
-		{
-			if (portfolioName.IsEmpty())
-				throw new ArgumentNullException(nameof(portfolioName));
-
-			var underlyingAdapter = GetUnderlyingAdapter(adapter);
-
-			if (!_subscribedPortfolios.SafeAdd(underlyingAdapter, key => new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)).Add(portfolioName))
-				return null;
-
-			return FillIdAndAdapter(adapter, new PortfolioMessage { PortfolioName = portfolioName });
 		}

 		private void ProcessConnectMessage(IMessageAdapter innerAdapter, ConnectMessage message, List<Message> extra)


Change name of SQL connection string

Change name of SQL connection string

--- AnonymousPhotoBin/Startup.cs
+++ AnonymousPhotoBin/Startup.cs
@@ -38,7 +38,7 @@
         {
             // Add framework services.
             services.AddDbContext<PhotoBinDbContext>(options =>
-                options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
+                options.UseSqlServer(Configuration.GetConnectionString("SqlConnectionString")));

             services.AddSingleton<IConfiguration>(Configuration);
             services.AddMvc()


Inicial

Inicial

--- AppCantina/Form1.Designer.cs
+++ AppCantina/Form1.Designer.cs
@@ -12,6 +12,7 @@
         /// </summary>
         /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
         protected override void Dispose(bool disposing)
+
         {
             if (disposing && (components != null))
             {


Added Item Select to Item Property when there is no binding

--- Aras.ViewModel/Props/Item.cs
+++ Aras.ViewModel/Props/Item.cs
@@ -183,8 +183,19 @@
         {
             if (this.Dialog == null)
             {
-                // Create Search Dialog
-                this.Dialog = new Dialogs.Search(this, ((Model.Properties.Item)this.Binding).Store);
+                if (this.Binding != null)
+                {
+                    // Create Search Dialog
+                    this.Dialog = new Dialogs.Search(this, ((Model.Properties.Item)this.Binding).Store);
+                }
+                else
+                {
+                    Model.Query query = this.Session.Model.Query(((Model.PropertyTypes.Item)this.PropertyType).ValueType);
+                    query.Select = ((Model.PropertyTypes.Item)this.PropertyType).ValueType.SearchSelect + ",keyed_name";
+
+                    // Create Search Dialog
+                    this.Dialog = new Dialogs.Search(this, query.Store);
+                }

                 // Watch for changes in selection
                 this.Dialog.Grid.Selected.ListChanged += Selected_ListChanged;


implemented AP-3 images.

implemented AP-3 images.

--- ArcFormats/Kaguya/ImageAP.cs
+++ ArcFormats/Kaguya/ImageAP.cs
@@ -115,7 +115,7 @@
     public class Ap0Format : ImageFormat
     {
         public override string         Tag { get { return "AP-0"; } }
-        public override string Description { get { return "KaGuYa script engine image format"; } }
+        public override string Description { get { return "KaGuYa script engine grayscale image format"; } }
         public override uint     Signature { get { return 0x302D5041; } } // 'AP-0'

         public Ap0Format ()
@@ -192,4 +192,51 @@
             throw new System.NotImplementedException ("Ap2Format.Write not implemented");
         }
     }
+
+    [Export(typeof(ImageFormat))]
+    public class Ap3Format : ImageFormat
+    {
+        public override string         Tag { get { return "AP-3"; } }
+        public override string Description { get { return "KaGuYa script engine image format"; } }
+        public override uint     Signature { get { return 0x332D5041; } } // 'AP-3'
+
+        public Ap3Format ()
+        {
+            Extensions = new string[] { "alp" };
+        }
+
+        public override ImageMetaData ReadMetaData (IBinaryStream stream)
+        {
+            stream.Position = 4;
+            var info = new ImageMetaData();
+            info.OffsetX = stream.ReadInt32();
+            info.OffsetY = stream.ReadInt32();
+            info.Width   = stream.ReadUInt32();
+            info.Height  = stream.ReadUInt32();
+            if (info.Width > 0x8000 || info.Height > 0x8000)
+                return null;
+            info.BPP     = stream.ReadInt32();
+            if (info.BPP != 8 && info.BPP != 24 && info.BPP != 32)
+                return null;
+            return info;
+        }
+
+        public override ImageData Read (IBinaryStream stream, ImageMetaData info)
+        {
+            stream.Position = 0x18;
+            int stride = info.BPP/8 * (int)info.Width;
+            var pixels = new byte[stride * (int)info.Height];
+            if (pixels.Length != stream.Read (pixels, 0, pixels.Length))
+                throw new EndOfStreamException();
+            PixelFormat format = 24 == info.BPP ? PixelFormats.Bgr24
+                               : 32 == info.BPP ? PixelFormats.Bgra32
+                               : PixelFormats.Gray8;
+            return ImageData.CreateFlipped (info, format, null, pixels, stride);
+        }
+
+        public override void Write (Stream file, ImageData image)
+        {
+            throw new System.NotImplementedException ("Ap3Format.Write not implemented");
+        }
+    }
 }


implemented Palette 'FilePack' archives.

--- ArcFormats/Palette/ArcPAK.cs
+++ ArcFormats/Palette/ArcPAK.cs
@@ -32,7 +32,7 @@
 namespace GameRes.Formats.Palette
 {
     [Export(typeof(ArchiveFormat))]
-    public class PakOpener : ArchiveFormat
+    public class Pak2Opener : ArchiveFormat
     {
         public override string         Tag { get { return "PAK2/Palette"; } }
         public override string Description { get { return "Palette resource archive"; } }
@@ -40,9 +40,10 @@
         public override bool  IsHierarchic { get { return true; } }
         public override bool      CanWrite { get { return false; } }

-        public PakOpener ()
+        public Pak2Opener ()
         {
             Extensions = new string[] { "pak" };
+            ContainedFormats = new[] { "PGA", "CHR/Palette", "OGG", "WAV" };
         }

         public override ArcFile TryOpen (ArcView file)
@@ -66,7 +67,7 @@
                     name_buf[j] ^= 0xFF;
                 index_offset += (uint)name_length;
                 var name = Encodings.cp932.GetString (name_buf, 0, name_length);
-                var entry = FormatCatalog.Instance.Create<Entry> (name);
+                var entry = Create<Entry> (name);
                 entry.Offset = file.View.ReadUInt32 (index_offset);
                 entry.Size   = file.View.ReadUInt32 (index_offset+4);
                 if (!entry.CheckPlacement (file.MaxOffset))
@@ -77,4 +78,49 @@
             return new ArcFile (file, this, dir);
         }
     }
+
+    [Export(typeof(ArchiveFormat))]
+    public class FilePackOpener : ArchiveFormat
+    {
+        public override string         Tag { get { return "PAK/FilePack"; } }
+        public override string Description { get { return "Palette resource archive"; } }
+        public override uint     Signature { get { return 0x656C6946; } } // 'FilePack'
+        public override bool  IsHierarchic { get { return false; } }
+        public override bool      CanWrite { get { return false; } }
+
+        public FilePackOpener ()
+        {
+            ContainedFormats = new[] { "PGA", "CHR/Palette", "OGG", "WAV" };
+        }
+
+        public override ArcFile TryOpen (ArcView file)
+        {
+            if (!file.View.AsciiEqual (4, "Pack"))
+                return null;
+            int count = file.View.ReadInt32 (8);
+            if (!IsSaneCount (count))
+                return null;
+
+            uint index_offset = 0xC;
+            var name_buf = new byte[0x20];
+            var dir = new List<Entry> (count);
+            for (int i = 0; i < count; ++i)
+            {
+                file.View.Read (index_offset, name_buf, 0, 0x20);
+                for (int j = 0; j < 0x20; ++j)
+                    name_buf[j] ^= 0xFF;
+                var name = Binary.GetCString (name_buf, 0);
+                if (string.IsNullOrEmpty (name))
+                    return null;
+                var entry = Create<Entry> (name);
+                entry.Size   = file.View.ReadUInt32 (index_offset+0x20);
+                entry.Offset = file.View.ReadUInt32 (index_offset+0x24);
+                if (!entry.CheckPlacement (file.MaxOffset))
+                    return null;
+                dir.Add (entry);
+                index_offset += 0x28;
+            }
+            return new ArcFile (file, this, dir);
+        }
+    }
 }


(UnityAssetOpener): fixed.

(UnityAssetOpener): fixed.

--- ArcFormats/Unity/ArcASSET.cs
+++ ArcFormats/Unity/ArcASSET.cs
@@ -46,6 +46,10 @@
             uint file_size = Binary.BigEndian (file.View.ReadUInt32 (4));
             if (file_size != file.MaxOffset || header_size > file_size || 0 == header_size)
                 return null;
+            int format = Binary.BigEndian (file.View.ReadInt32 (8));
+            uint data_offset = Binary.BigEndian (file.View.ReadUInt32 (12));
+            if (format <= 0 || format > 0x100 || data_offset >= file_size || data_offset < header_size)
+                return null;
             using (var stream = file.CreateStream())
             using (var input = new AssetReader (stream))
             {
@@ -170,7 +174,6 @@
                                 Offset = tex.m_StreamData.Offset,
                                 Size = tex.m_StreamData.Size,
                                 Bundle = GetBundle (tex.m_StreamData.Path),
-                                AssetObject = obj,
                             };
                         }
                         break;
@@ -187,7 +190,6 @@
                                 Offset = clip.m_Offset,
                                 Size = (uint)clip.m_Size,
                                 Bundle = GetBundle (clip.m_Source),
-                                AssetObject = obj,
                             };
                         }
                         break;
@@ -201,7 +203,6 @@
                             Name =  name,
                             Offset = input.Position,
                             Size = size,
-                            AssetObject = obj,
                         };
                         break;
                     }
@@ -210,14 +211,14 @@
                         entry = new AssetEntry {
                             Offset = obj.Offset,
                             Size = obj.Size,
-                            AssetObject = obj,
                         };
                         break;
                     }
                 }
                 if (entry != null)
                 {
-                    if (string.IsNullOrEmpty (entry.Name)
+                    entry.AssetObject = obj;
+                    if (string.IsNullOrEmpty (entry.Name))
                         entry.Name = string.Format ("{0:D4} [{1}]", obj.PathId, obj.TypeId);
                     else if (!used_names.Add (entry.Name))
                         entry.Name = string.Format ("{0}-{1}", entry.Name, obj.PathId);


article like

article like

--- Articles.Entities/Article.cs
+++ Articles.Entities/Article.cs
@@ -58,6 +58,15 @@
         Normal = 5
     }

+    public class ArticleLike
+    {
+        public string Id { get; set; }
+
+        public string UserId { get; set; }
+
+        public string ArticleId { get; set; }
+    }
+
     //public class ApplicationUser : IdentityUser
     //{
     //    public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)


removed Debug.Log spam

removed Debug.Log spam

--- Assets/Scripts/Data/DCity.cs
+++ Assets/Scripts/Data/DCity.cs
@@ -398,7 +398,7 @@
         if (entry.Key == entry0.Key)
         {
           int change = entry.Value.Amount - entry0.Value.Amount;
-          Debug.Log(entry0.Value.Name +"[prev]: "+ entry0.Value.Amount);
+          // Debug.Log(entry0.Value.Name +"[prev]: "+ entry0.Value.Amount);
           resourceRates[entry.Key] = DResource.Create(entry.Value,  change);
           break;
         }
@@ -406,7 +406,7 @@

     }
     foreach (var entry in resourceRates)
-    Debug.Log(entry.Value.Name +":  "+ entry.Value.Amount);
+    // Debug.Log(entry.Value.Name +":  "+ entry.Value.Amount);
   }
     public DResource GetResource(string name)
     {


Spawn powerui

Spawn powerui

--- Assets/scripts/LoadAssets.cs
+++ Assets/scripts/LoadAssets.cs
@@ -341,7 +341,11 @@
 			spawner.AddComponent<BallSpawner>().ballPrefab = NetworkManager.singleton.spawnPrefabs[0];// Don't like this at all...
 			spawner.AddComponent<ResetBallUI>();

-			if (GameObject.FindGameObjectsWithTag("Score").Length <= 0)
+            //Create the power UI for the players
+            const string powerUIPrefab = "entities/powers/PowerUI";
+            Instantiate(Resources.Load(powerUIPrefab));
+
+            if (GameObject.FindGameObjectsWithTag("Score").Length <= 0)
 			{
 				GameObject scoreManager = GameObject.Instantiate(NetworkManager.singleton.spawnPrefabs[1]);


Fixed path exceptions.

Fixed path exceptions.

--- JexusManager.Shared/DialogHelper.cs
+++ JexusManager.Shared/DialogHelper.cs
@@ -112,9 +112,19 @@
         public static void ShowOpenFileDialog(TextBox textBox, string filter)
         {
             var initial = textBox.Text.ExpandIisExpressEnvironmentVariables();
+            string initialDirectory;
+            try
+            {
+                initialDirectory = string.IsNullOrEmpty(initial) ? string.Empty : Path.GetDirectoryName(initial);
+            }
+            catch (ArgumentException)
+            {
+                initialDirectory = string.Empty;
+            }
+
             var dialog = new OpenFileDialog
             {
-                InitialDirectory = string.IsNullOrEmpty(initial) ? string.Empty : Path.GetDirectoryName(initial),
+                InitialDirectory = initialDirectory,
                 Filter = filter
             };
             try
@@ -143,9 +153,19 @@
         public static string ShowSaveFileDialog(TextBox textBox, string filter)
         {
             var initial = textBox?.Text.ExpandIisExpressEnvironmentVariables();
+            string initialDirectory;
+            try
+            {
+                initialDirectory = string.IsNullOrEmpty(initial) ? string.Empty : Path.GetDirectoryName(initial);
+            }
+            catch (ArgumentException)
+            {
+                initialDirectory = string.Empty;
+            }
+
             var dialog = new SaveFileDialog
             {
-                InitialDirectory = string.IsNullOrEmpty(initial) ? string.Empty : Path.GetDirectoryName(initial),
+                InitialDirectory = initialDirectory,
                 Filter = filter,
                 FileName = textBox?.Text
             };


Added CFD type to the SecurityType Enum.

--- Krs.Ats.IBNet/Enums/SecurityType.cs
+++ Krs.Ats.IBNet/Enums/SecurityType.cs
@@ -54,6 +54,10 @@
         /// </summary>
         [Description("BILL")] Bill,
         /// <summary>
+        /// CFD
+        /// </summary>
+        [Description("CFD")] CFD,
+        /// <summary>
         /// Undefined Security Type
         /// </summary>
         [Description("")] Undefined


Safer threading

Safer threading

--- LmpMasterServer/Structure/Server.cs
+++ LmpMasterServer/Structure/Server.cs
@@ -18,7 +18,8 @@
             new TimeoutConcurrentDictionary<IPEndPoint, string>(TimeSpan.FromHours(24).TotalMilliseconds);

         public long LastRegisterTime { get; set; }
-        public bool RefreshingCountryCode { get; set; }
+
+        public volatile bool RefreshingCountryCode;

         public void Update(MsRegisterServerMsgData msg)
         {
@@ -77,20 +78,26 @@
                 if (RefreshingCountryCode) return;

                 RefreshingCountryCode = true;
-                if (EndpointCountries.TryGet(externalEndpoint, out var countryCode))
+                try
                 {
-                    server.Country = countryCode;
+                    if (EndpointCountries.TryGet(externalEndpoint, out var countryCode))
+                    {
+                        server.Country = countryCode;
+                    }
+                    else
+                    {
+                        server.Country = IpApi.GetCountry(externalEndpoint);
+                        if (string.IsNullOrEmpty(server.Country))
+                            server.Country = IpLocate.GetCountry(externalEndpoint);
+
+                        if (!string.IsNullOrEmpty(server.Country))
+                            EndpointCountries.TryAdd(externalEndpoint, server.Country);
+                    }
                 }
-                else
+                finally
                 {
-                    server.Country = IpApi.GetCountry(externalEndpoint);
-                    if (string.IsNullOrEmpty(server.Country))
-                        server.Country = IpLocate.GetCountry(externalEndpoint);
-
-                    if (!string.IsNullOrEmpty(server.Country))
-                        EndpointCountries.TryAdd(externalEndpoint, server.Country);
+                    RefreshingCountryCode = false;
                 }
-                RefreshingCountryCode = false;
             });
         }


correct spelling i comment

correct spelling i comment

--- MbCache/Logic/MethodInfoComparer.cs
+++ MbCache/Logic/MethodInfoComparer.cs
@@ -1,34 +1,34 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-
-namespace MbCache.Logic
-{
-	public class MethodInfoComparer : IEqualityComparer<MethodInfo>
-	{
-		public bool Equals(MethodInfo x, MethodInfo y)
-		{
-			//no need to check what type methodinfo is on - already check before entering this method
-
-			if (!x.Name.Equals(y.Name))
-				return false;
-			var xParams = x.GetParameters();
-			var yParams = y.GetParameters();
-			var xParamCount = xParams.Count();
-			if(xParamCount != yParams.Count())
-				return false;
-			for (var i = 0; i < xParamCount; i++)
-			{
-				if(xParams[i].ParameterType != yParams[i].ParameterType)
-					return false;
-			}
-			return true;
-		}
-
-		public int GetHashCode(MethodInfo obj)
-		{
-			throw new NotImplementedException("Not currently used by MbCache");
-		}
-	}
+ using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace MbCache.Logic
+{
+	public class MethodInfoComparer : IEqualityComparer<MethodInfo>
+	{
+		public bool Equals(MethodInfo x, MethodInfo y)
+		{
+			//no need to check what type methodinfo is on - already checked before entering this method
+
+			if (!x.Name.Equals(y.Name))
+				return false;
+			var xParams = x.GetParameters();
+			var yParams = y.GetParameters();
+			var xParamCount = xParams.Count();
+			if(xParamCount != yParams.Count())
+				return false;
+			for (var i = 0; i < xParamCount; i++)
+			{
+				if(xParams[i].ParameterType != yParams[i].ParameterType)
+					return false;
+			}
+			return true;
+		}
+
+		public int GetHashCode(MethodInfo obj)
+		{
+			throw new NotImplementedException("Not currently used by MbCache");
+		}
+	}
 }


delete buttons for user without channels, rectruited or administrated

--- MegatubeV2/Views/Users/Index.cshtml
+++ MegatubeV2/Views/Users/Index.cshtml
@@ -68,6 +68,10 @@
                     @Html.DisplayFor(modelItem => item.CompanyKind)

+                    @if (item.AdministratorOf.Count == 0 && item.OwnedChannels.Count == 0 && item.RecruitedChannels.Count == 0)
+                    {
+
+                    }


- Patched CreatePCIList (Mono can't handle 64-bit switch tables)

git-svn-id: 61c3ae23f3a6520e9bc357b51591209af2ede9d8@547 45b04e34-05f1-4d87-a130-40a8491d5c8b

--- Mosa/Tools/CreatePCIList/Program.cs
+++ Mosa/Tools/CreatePCIList/Program.cs
@@ -67,7 +67,7 @@

 					textWriter.WriteLine("\t\tpublic static string Lookup(ushort vendorID, ushort deviceID)");
 					textWriter.WriteLine("\t\t{");
-					textWriter.WriteLine("\t\t\tswitch ((uint)((vendorID << 16) | deviceID)) {");
+					textWriter.WriteLine("\t\t\tswitch ((uint)(((uint)vendorID << 16) | (uint)deviceID)) {");

 					using (TextReader textReader = new StreamReader(args[0])) {
 						string line = null;
@@ -92,7 +92,8 @@

 					textWriter.WriteLine("\t\tpublic static string Lookup(ushort vendorID, ushort deviceID, ushort subSystem, ushort subVendor)");
 					textWriter.WriteLine("\t\t{");
-					textWriter.WriteLine("\t\t\tswitch ((ulong)((vendorID << 48) | (deviceID << 32) | (subSystem << 16) | subVendor)) {");
+					textWriter.WriteLine("\t\t\tswitch ((((ulong)vendorID << 48) | ((ulong)deviceID << 32) | ((ulong)subSystem << 16) | subVendor)) {");
+					textWriter.WriteLine("#if !MONO");

 					using (TextReader textReader = new StreamReader(args[0])) {
 						string line = null;
@@ -111,6 +112,7 @@
 						textReader.Close();
 					}

+					textWriter.WriteLine("#endif");
 					textWriter.WriteLine("\t\t\t\tdefault: return string.Empty;");
 					textWriter.WriteLine("\t\t\t}");
 					textWriter.WriteLine("\t\t}");


Change natural comparer to respect negative numbers

--- NBTModel/Utility/NaturalComparer.cs
+++ NBTModel/Utility/NaturalComparer.cs
@@ -29,11 +29,11 @@
             }
             string[] x1, y1;
             if (!table.TryGetValue(x, out x1)) {
-                x1 = Regex.Split(x.Replace(" ", ""), "([0-9]+)");
+                x1 = Regex.Split(x.Replace(" ", ""), "(-?[0-9]+)");
                 table.Add(x, x1);
             }
             if (!table.TryGetValue(y, out y1)) {
-                y1 = Regex.Split(y.Replace(" ", ""), "([0-9]+)");
+                y1 = Regex.Split(y.Replace(" ", ""), "(-?[0-9]+)");
                 table.Add(y, y1);
             }


version bump

version bump

--- NBitcoin/Properties/AssemblyInfo.cs
+++ NBitcoin/Properties/AssemblyInfo.cs
@@ -31,6 +31,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("3.0.2.13")]
-[assembly: AssemblyFileVersion("3.0.2.13")]
-[assembly: AssemblyInformationalVersion("3.0.2.13")]
+[assembly: AssemblyVersion("3.0.2.14")]
+[assembly: AssemblyFileVersion("3.0.2.14")]
+[assembly: AssemblyInformationalVersion("3.0.2.14")]


Fix AddAsync on dns endpoints

Fix AddAsync on dns endpoints

--- NBitcoin/Protocol/AddressManager.cs
+++ NBitcoin/Protocol/AddressManager.cs
@@ -44,7 +44,7 @@
 			{
 				Add(new NetworkAddress(ip2), IPAddress.Loopback);
 			}
-			else if (endpoint.AsOnionDNSEndpoint() is DnsEndPoint dns)
+			else if (endpoint is DnsEndPoint dns)
 			{
 				var ips = await Dns.GetHostAddressesAsync(dns.Host);
 				foreach (var ip3 in ips)


Added missing doc in ILogger

Added missing doc in ILogger

--- Neo4j.Driver/Neo4j.Driver/Logger.cs
+++ Neo4j.Driver/Neo4j.Driver/Logger.cs
@@ -30,6 +30,12 @@
         Trace
     }

+    /// <summary>
+    /// The logger used by this driver.
+    /// </summary>
+    /// <remarks>
+    /// Set the logger that you want to use via <see cref="Config"/>.
+    /// If no logger is explicitly set, then a default debug logger would be used <see cref="Config.DefaultConfig"/></remarks>
     public interface ILogger : IDisposable
     {
         /// <summary>Log a message at <see cref="LogLevel.Error"/> level.</summary>


Work on ErrorCollectorWalker.

Work on ErrorCollectorWalker.

--- Nitra.Visualizer/MainWindow.xaml.cs
+++ Nitra.Visualizer/MainWindow.xaml.cs
@@ -284,7 +284,7 @@
           marker.ToolTip = error.Message + "\r\n\r\n" + text;

           var errorNode = new TreeViewItem();
-          errorNode.Header = "(" + error.Location.EndLineColumn + "): " + error.Message;
+          errorNode.Header = "(" + error.Location.EndLineColumn + "): " + error.ToString();
           errorNode.Tag = error;
           errorNode.MouseDoubleClick += errorNode_MouseDoubleClick;


Don't keep ASP.NET sessions around

Don't keep ASP.NET sessions around

--- Ooui.AspNetCore/WebSocketHandler.cs
+++ Ooui.AspNetCore/WebSocketHandler.cs
@@ -11,21 +11,21 @@
     {
         public static string WebSocketPath { get; set; } = "/ooui.ws";

-        public static TimeSpan SessionTimeout { get; set; } = TimeSpan.FromMinutes (5);
+        public static TimeSpan SessionTimeout { get; set; } = TimeSpan.FromMinutes (1);

-        static readonly ConcurrentDictionary<string, ActiveSession> activeSessions =
-            new ConcurrentDictionary<string, ActiveSession> ();
+        static readonly ConcurrentDictionary<string, PendingSession> pendingSessions =
+            new ConcurrentDictionary<string, PendingSession> ();

         public static string BeginSession (HttpContext context, Element element)
         {
             var id = Guid.NewGuid ().ToString ("N");

-            var s = new ActiveSession {
+            var s = new PendingSession {
                 Element = element,
-                LastConnectTimeUtc = DateTime.UtcNow,
+                CreateTimeUtc = DateTime.UtcNow,
             };

-            if (!activeSessions.TryAdd (id, s)) {
+            if (!pendingSessions.TryAdd (id, s)) {
                 throw new Exception ("Failed to schedule pending session");
             }

@@ -62,19 +62,18 @@
             //
             // Clear old sessions
             //
-            var toClear = activeSessions.Where (x => (DateTime.UtcNow - x.Value.LastConnectTimeUtc) > SessionTimeout).ToList ();
+            var toClear = pendingSessions.Where (x => (DateTime.UtcNow - x.Value.CreateTimeUtc) > SessionTimeout).ToList ();
             foreach (var c in toClear) {
-                activeSessions.TryRemove (c.Key, out var _);
+                pendingSessions.TryRemove (c.Key, out var _);
             }

             //
             // Find the pending session
             //
-            if (!activeSessions.TryGetValue (id, out var activeSession)) {
+            if (!pendingSessions.TryRemove (id, out var activeSession)) {
                 BadRequest ("Unknown `id`");
                 return;
             }
-            activeSession.LastConnectTimeUtc = DateTime.UtcNow;

             //
             // Set the element's dimensions
@@ -102,10 +101,10 @@
             await session.RunAsync ().ConfigureAwait (false);
         }

-        class ActiveSession
+        class PendingSession
         {
             public Element Element;
-            public DateTime LastConnectTimeUtc;
+            public DateTime CreateTimeUtc;
         }
     }
 }


should autoscroll view conditionally

should autoscroll view conditionally

will autoscroll view if user has not scrolled or if scrollbar is at
bottom

--- Packager/UserInterface/ViewModel.cs
+++ Packager/UserInterface/ViewModel.cs
@@ -1,10 +1,17 @@
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Diagnostics;
 using System.Linq;
+using System.Net.Mime;
 using System.Runtime.CompilerServices;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using ICSharpCode.AvalonEdit;
 using ICSharpCode.AvalonEdit.Document;
+using ICSharpCode.AvalonEdit.Editing;
 using ICSharpCode.AvalonEdit.Folding;
+using ICSharpCode.AvalonEdit.Rendering;
 using Packager.Annotations;
 using Packager.Exceptions;
 using Packager.Models;
@@ -12,7 +19,7 @@

 namespace Packager.UserInterface
 {
-    public class ViewModel:INotifyPropertyChanged
+    public class ViewModel : INotifyPropertyChanged
     {
         private readonly List<SectionModel> _sections = new List<SectionModel>();
         private string _title;
@@ -32,29 +39,72 @@
             }
         }

+        private bool AutoScroll { get; set; }
+
         public TextDocument Document { get; private set; }
+
         private FoldingManager FoldingManager { get; set; }

-        private int TextLength
-        {
-            get { return Document.TextLength; }
-        }
+        private int TextLength => Document.TextLength;
+
+        private TextArea TextArea => TextEditor.TextArea;
+
+        private TextEditor TextEditor { get; set; }

         public void Initialize(OutputWindow outputWindow, IProgramSettings programSettings)
         {
+            AutoScroll = true;
+            TextEditor = outputWindow.OutputText;
+
             outputWindow.DataContext = this;
             outputWindow.Show();
-
-            Title = string.Format("{0} Media Packager", programSettings.ProjectCode.ToUpperInvariant());
+
+            ((IScrollInfo)outputWindow.OutputText.TextArea).ScrollOwner.ScrollChanged += ScrollChangedHandler;
+
+            Document.PropertyChanged += DocumentPropertyChangedHandler;
+            Title = $"{programSettings.ProjectCode.ToUpperInvariant()} Media Packager";

             FoldingManager = FoldingManager.Install(outputWindow.OutputText.TextArea);
         }

+        private void ScrollChangedHandler(object sender, ScrollChangedEventArgs e)
+        {
+            var viewer = sender as ScrollViewer;
+            if (viewer == null)
+            {
+                return;
+            }
+
+            if (!e.ExtentHeightChange.Equals(0))
+            {
+                return;
+            }
+
+            AutoScroll = viewer.VerticalOffset.Equals(viewer.ScrollableHeight);
+        }
+
+        private void DocumentPropertyChangedHandler(object sender, PropertyChangedEventArgs e)
+        {
+            if (!e.PropertyName.Equals("LineCount"))
+            {
+                return;
+            }
+
+            if (!AutoScroll)
+            {
+                return;
+            }
+
+            var scrollTo = TextArea.TextView.GetVisualTopByDocumentLine(Document.LineCount);
+            TextEditor.ScrollToVerticalOffset(scrollTo);
+
+        }
+
         private void InsertLine()
         {
             Document.Insert(TextLength, "\n");
         }
-
+
         public void InsertLine(string value)
         {
             value = value.TrimEnd('\n');
@@ -64,7 +114,7 @@

             foreach (var line in lines)
             {
-                Document.Insert(TextLength, string.Format("{0}\n", Indent(line, indent)));
+                Document.Insert(TextLength, $"{Indent(line, indent)}\n");
             }
         }

@@ -72,12 +122,12 @@
         {
             if (e is AbstractEngineException)
             {
-                InsertLine(string.Format("ERROR: {0}", e.Message));
-                return;
-            }
-
+                InsertLine($"ERROR: {e.Message}");
+                return;
+            }
+
             var sectionKey = Guid.NewGuid();
-            BeginSection(sectionKey, string.Format("ERROR: {0}", e.Message));
+            BeginSection(sectionKey, $"ERROR: {e.Message}");
             InsertLine(e.StackTrace);
             EndSection(sectionKey);
         }
@@ -163,34 +213,30 @@

         private static string Indent(string value, int indent)
         {
-            return indent == 0
-                ? value
-                : string.Format("{0}{1}", new String(' ', indent*2), value);
+            return indent == 0
+                ? value
+                : $"{new string(' ', indent * 2)}{value}";
         }

         public void FlagSectionAsSuccessful(Guid key, string newTitle)
         {
             var section = FoldingManager.AllFoldings.SingleOrDefault(s => IsSection(s, key));
-            if (section == null)
-            {
-                return;
-            }
-
+
+            var model = section?.Tag as SectionModel;
+            if (model == null)
+            {
+                return;
+            }
+
+            section.Title = Indent(newTitle, model.Indent);
+            section.IsFolded = true;
+        }
+
+        private static bool IsSection(FoldingSection section, Guid key)
+        {
             var model = section.Tag as SectionModel;
             if (model == null)
             {
-                return;
-            }
-
-            section.Title = Indent(newTitle, model.Indent);
-            section.IsFolded = true;
-        }
-
-        private static bool IsSection(FoldingSection section, Guid key)
-        {
-            var model = section.Tag as SectionModel;
-            if (model == null)
-            {
                 return false;
             }

@@ -203,7 +249,7 @@
         protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
         {
             var handler = PropertyChanged;
-            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
+            handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
     }
 }


Add support for wincache settings

Add support for wincache settings

--- PhpManager/Models/PlacementRules.cs
+++ PhpManager/Models/PlacementRules.cs
@@ -612,6 +612,26 @@
             {"vld.execute" , ConfigLocation.PHP_INI_SYSTEM},
             {"vld.skip_append" , ConfigLocation.PHP_INI_SYSTEM},
             {"vld.skip_prepend" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.fcenabled" , ConfigLocation.PHP_INI_ALL},
+            {"wincache.fcenabledfilter" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.fcachesize" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.fcndetect" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.maxfilesize" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ocenabled" , ConfigLocation.PHP_INI_ALL},
+            {"wincache.ocenabledfilter" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ocachesize" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.filecount" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.chkinterval" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ttlmax" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.enablecli" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ignorelist" , ConfigLocation.PHP_INI_ALL},
+            {"wincache.namesalt" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ucenabled" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.ucachesize" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.scachesize" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.rerouteini" , ConfigLocation.PHP_INI_SYSTEM},
+            {"wincache.reroute_enabled" , ConfigLocation.PHP_INI_PERDIR},
+            {"wincache.srwlocks" , ConfigLocation.PHP_INI_SYSTEM},
             {"windows.show_crt_warning" , ConfigLocation.PHP_INI_ALL},
             {"windows_show_crt_warning" , ConfigLocation.PHP_INI_ALL},
             {"xbithack" , ConfigLocation.PHP_INI_ALL},


Add test iteration

Add test iteration

--- test/AnimationTest.cs
+++ test/AnimationTest.cs
@@ -7,6 +7,7 @@
     public class AnimationTest : IFrameTimer, IAnimatable
     {
         private Random random = new Random();
+        private int iterations = 10;

         public IFrameTimer FrameTimer => this;

@@ -33,20 +34,23 @@
         [InlineData(10000)]
         public void target_is_place_at_the_exactly_end_position_when_tween_ends(double step)
         {
-            var repeat = random.Next(10) + 1;
+            for (var i = 0; i < iterations; i++)
+            {
+                var repeat = random.Next(10) + 1;

-            double value = random.NextDouble();
+                double value = random.NextDouble();

-            var repeatCount = 0;
-            var to = random.NextDouble() * 100;
-            var anim = this.Tween(x => value = x, 0, to).SetRepeat(repeat).SetDuration(random.NextDouble() + 0.8);
-            anim.Repeated += () => repeatCount++;
+                var repeatCount = 0;
+                var to = random.NextDouble() * 100;
+                var anim = this.Tween(x => value = x, 0, to).SetRepeat(repeat).SetDuration(random.NextDouble() + 0.8);
+                anim.Repeated += () => repeatCount++;

-            while (anim.IsPlaying) Update((random.NextDouble() * 0.5 + 0.5) * step);
+                while (anim.IsPlaying) Update((random.NextDouble() * 0.5 + 0.5) * step);

-            Assert.True(anim.IsCompleted);
-            Assert.Equal(to, value);
-            Assert.Equal(repeat - 1, repeatCount);
+                Assert.True(anim.IsCompleted);
+                Assert.Equal(to, value);
+                Assert.Equal(repeat - 1, repeatCount);
+            }
         }

         [Theory]
@@ -55,20 +59,23 @@
         [InlineData(20000)]
         public void target_is_place_at_the_exactly_begin_position_when_tween_ends(double step)
         {
-            var repeat = random.Next(10) + 1;
+            for (var i = 0; i < iterations; i++)
+            {
+                var repeat = random.Next(10) + 1;

-            double value = random.NextDouble();
+                double value = random.NextDouble();

-            var repeatCount = 0;
-            var from = random.NextDouble() * 100;
-            var anim = this.Tween(x => value = x, from, 0).SetRepeat(repeat).SetDirection(AnimationDirection.Backward);
-            anim.Repeated += () => repeatCount++;
+                var repeatCount = 0;
+                var from = random.NextDouble() * 100;
+                var anim = this.Tween(x => value = x, from, 0).SetRepeat(repeat).SetDirection(AnimationDirection.Backward);
+                anim.Repeated += () => repeatCount++;

-            while (anim.IsPlaying) Update((random.NextDouble() * 0.5 + 0.5) * step);
+                while (anim.IsPlaying) Update((random.NextDouble() * 0.5 + 0.5) * step);

-            Assert.True(anim.IsCompleted);
-            Assert.Equal(from, value);
-            Assert.Equal(repeat - 1, repeatCount);
+                Assert.True(anim.IsCompleted);
+                Assert.Equal(from, value);
+                Assert.Equal(repeat - 1, repeatCount);
+            }
         }
     }
 }


Fixes #12

Fixes #12

--- PushSharp.Apple/ApplePushChannel.cs
+++ PushSharp.Apple/ApplePushChannel.cs
@@ -237,10 +237,10 @@

 		void Cleanup()
 		{
-			bool wasRemoved = false;
-
 			while (true)
 			{
+				bool wasRemoved = false;
+
 				lock (sentLock)
 				{
 					//See if anything is here to process


Adds crappy error handling

Adds crappy error handling

--- Raci/Controllers/ImageController.cs
+++ Raci/Controllers/ImageController.cs
@@ -1,5 +1,6 @@
 namespace Raci.Controllers
 {
+    using System;
     using System.Drawing;
     using System.Drawing.Imaging;
     using System.IO;
@@ -13,19 +14,26 @@

     public class ImageController : ApiController
     {
-        public HttpResponseMessage Get(string tags)
+        public object Get(string tags)
         {
-            var flickrService = new FlickrImageService();
-            var image = flickrService.GetImages(tags).First();
-            HttpResponseMessage result;
-            using (var ms = new MemoryStream())
+            try
             {
-                var bitmap = new Bitmap(image);
-                bitmap.Save(ms, ImageFormat.Jpeg);
-                result = new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(ms.ToArray()) };
+                var flickrService = new FlickrImageService();
+                var image = flickrService.GetImages(tags).First();
+                HttpResponseMessage result;
+                using (var ms = new MemoryStream())
+                {
+                    var bitmap = new Bitmap(image);
+                    bitmap.Save(ms, ImageFormat.Jpeg);
+                    result = new HttpResponseMessage(HttpStatusCode.OK) { Content = new ByteArrayContent(ms.ToArray()) };
+                }
+                result.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg");
+                return result;
             }
-            result.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg");
-            return result;
+            catch (Exception e)
+            {
+                return e;
+            }
         }
     }
 }


Fixed bugs with the json patcher. Added ability to edit xvm paths

--- RelicModManager/Utils/PatchUtils.cs
+++ RelicModManager/Utils/PatchUtils.cs
@@ -297,6 +297,9 @@
                 testValue = addPathArray[addPathArray.Count() - 1];
                 testValue = testValue.Split(new string[] { @"[index=" }, StringSplitOptions.None)[0];
             }
+            //check if the replace value is an xvm path and manually put in the macro equivilants
+            //testValue = testValue.Replace(@"[dollar]", @"$").Replace(@"[lbracket]", @"{").Replace(@"[quote]", @"""").Replace(@"[rbracket]""", @"}");
+            p.replace = p.replace.Replace(@"$", @"[dollar]").Replace(@"{", @"[lbracket]").Replace(@"""", @"[quote]").Replace(@"}", @"[rbracket]");
             //try a bool first, only works with "true" and "false"
             try
             {
@@ -334,6 +337,16 @@

             //load file from disk...
             string file = File.ReadAllText(p.completePath);
+
+            //replace all the invalid"${" refrences with
+            string[] fileSplit = Regex.Split(file, @"\$[ \t]*\{[ \t]*""");
+            for(int i = 1; i < fileSplit.Length; i++)
+            {
+                fileSplit[i] = @"""[dollar][lbracket][quote]" + fileSplit[i];
+                fileSplit[i] = Regex.Replace(fileSplit[i], @"""[\t ]*\}", @"[quote][rbracket]""");
+            }
+
+            /*
             //save the "$" lines
             List<StringSave> ssList = new List<StringSave>();
             StringBuilder backTogether = new StringBuilder();
@@ -369,7 +382,7 @@
                     ssList.Add(ss);
                     temp = "-42069";
                 }
-                else if (Regex.IsMatch(temp, @"^[ \t]*""\$ref"" *: *{.*}"))
+                else if (Regex.IsMatch(temp, @"^[ \t]*""\$ref"" *: *{.*}"))//NEED_THIS
                 {
                     modified = true;
                     //jobject
@@ -382,7 +395,9 @@
                     temp = temp + ",";
                 backTogether.Append(temp + "\n");
             }
-            file = backTogether.ToString();
+            */
+
+            file = string.Join("", fileSplit);
             JsonLoadSettings settings = new JsonLoadSettings()
             {
                 CommentHandling = CommentHandling.Ignore
@@ -395,17 +410,17 @@
             }
             catch (JsonReaderException j)
             {
-                Logging.Manager(string.Format("ERROR: Failed to patch {0}", p.completePath));
+                Logging.Manager(string.Format("JsonReader Exception: Failed to patch {0}, the file is not valid json (run test mode to get more details)", p.completePath));
                 if (Program.testMode)
                 {
-                    //in test mode this is worthy of an EXCEPTION
-                    throw new JsonReaderException(j.Message);
+                    //in test mode this is worthy of an EXCEPTION message
+                    //throw new JsonReaderException(j.Message);
+                    Logging.Manager(j.ToString());
                 }
             }
             //if it failed to parse show the message (above) and pull out
             if (root == null)
             {
-                Logging.Manager(string.Format("ERROR: Failed to patch {0}", p.completePath));
                 return;
             }
             if (p.mode.Equals("add"))
@@ -792,6 +807,8 @@
             {
                 Logging.Manager(string.Format("ERROR: Unknown json patch mode, {0}", p.mode));
             }
+
+            /*
             StringBuilder rebuilder = new StringBuilder();
             string[] putBackDollas = root.ToString().Split('\n');
             for (int i = 0; i < putBackDollas.Count(); i++)
@@ -824,7 +841,10 @@
                 Logging.Manager(string.Format("There was an error with patching the file {0}, with extra refrences. aborting patch", p.completePath));
                 return;
             }
-            File.WriteAllText(p.completePath, rebuilder.ToString());
+            */
+            string toWrite = root.ToString().Replace(@"""[dollar]", @"$").Replace(@"[lbracket]", @"{").Replace(@"[quote]", @"""").Replace(@"[rbracket]""", @"}");
+            //string toWrite = root.ToString();
+            File.WriteAllText(p.completePath, toWrite);
         }

         public static void PMODPatch(Patch p, bool testMods = false, string testXVMBootLoc = "")


added regex check if invalid for mat is actually there before making changes. fixed issues with new escaping not compatible with add and addArray modes. added more logging and enabled exception logging at the application level

--- RelicModManager/Utils/PatchUtils.cs
+++ RelicModManager/Utils/PatchUtils.cs
@@ -287,6 +287,10 @@
             //legacy compatibility: treat p.mode being nothing or null default to edit
             if (p.mode == null || p.mode.Equals("") || p.mode.Equals("arrayEdit"))
                 p.mode = "edit";
+            //check if the replace value is an xvm path and manually put in the macro equivilants
+            //testValue = testValue.Replace(@"[dollar]", @"$").Replace(@"[lbracket]", @"{").Replace(@"[quote]", @"""").Replace(@"[rbracket]""", @"}");
+            if(Regex.IsMatch(p.replace, @"\$[ \t]*\{[ \t]*"""))
+                p.replace = p.replace.Replace(@"$", @"[dollar]").Replace(@"{", @"[lbracket]").Replace(@"""", @"[quote]").Replace(@"}", @"[rbracket]");
             //split the replace path here so both can use it later
             string[] addPathArray = null;
             string testValue = p.replace;
@@ -297,9 +301,6 @@
                 testValue = addPathArray[addPathArray.Count() - 1];
                 testValue = testValue.Split(new string[] { @"[index=" }, StringSplitOptions.None)[0];
             }
-            //check if the replace value is an xvm path and manually put in the macro equivilants
-            //testValue = testValue.Replace(@"[dollar]", @"$").Replace(@"[lbracket]", @"{").Replace(@"[quote]", @"""").Replace(@"[rbracket]""", @"}");
-            p.replace = p.replace.Replace(@"$", @"[dollar]").Replace(@"{", @"[lbracket]").Replace(@"""", @"[quote]").Replace(@"}", @"[rbracket]");
             //try a bool first, only works with "true" and "false"
             try
             {
@@ -389,8 +390,8 @@
             }
             catch (JsonReaderException j)
             {
-                Logging.Manager(string.Format("JsonReader Exception: Failed to patch {0}, the file is not valid json (run test mode to get more details)", p.completePath));
-                if (Program.testMode)
+                Logging.Manager(string.Format("JsonReader Exception: Failed to patch {0}, the file is not valid json (run test or beta application to get more details)", p.completePath));
+                if (Program.testMode || Program.betaApplication)
                 {
                     //in test mode this is worthy of an EXCEPTION message
                     //throw new JsonReaderException(j.Message);
@@ -641,7 +642,13 @@
                 }
                 JArray newObjectArray = (JArray)newObject;
                 //check for index value in p.replace (name/value[index=NUMBER])
-                int index = Utils.ParseInt(p.replace.Split(new string[] { @"[index=" }, StringSplitOptions.None)[1].Replace(@"]", ""), -1);
+                string[] splitForAdd = p.replace.Split(new string[] { @"[index=" }, StringSplitOptions.None);
+                if(splitForAdd.Length < 2)
+                {
+                    Logging.Manager(string.Format("ERROR: arrayAdd selected but replace value does not have [index=] tag"));
+                    return;
+                }
+                int index = Utils.ParseInt(splitForAdd[1].Replace(@"]", ""), -1);
                 if(index >= newObjectArray.Count)
                 {
                     //if the array is empty and the index is 0, trying to add to a blank array, don't log it


Added a startup routine to the 2.4.1 rancher

--- RepRancher/2.4.1/ConveyorRancher.cs
+++ RepRancher/2.4.1/ConveyorRancher.cs
@@ -105,6 +105,92 @@

             ConveyorListenerParserThread = new System.Threading.Thread(new System.Threading.ThreadStart(ConveyorListenerParser.ListenerParserThreadRun));
             ConveyorListenerParserThread.Start();
+
+            /*
+             * Now lets do the Startup routine the Mimics Conveyor
+             */
+
+            //Saying hello
+            HelloCommand Hello = new HelloCommand(SharedResources.rpcid.FetchRPCID());
+            Command MethodReception = Hello;
+            //Waiting for world
+            while (!MethodReception.Recieved)
+            {
+                System.Threading.Thread.Sleep(500);
+                SharedResources.CommandHistory.TryGetValue(Hello.rpcid, out MethodReception);
+                //Check if reply recieved
+            }
+
+            //Request Ports
+            GetPortsCommand GetPorts = new GetPortsCommand(SharedResources.rpcid.FetchRPCID());
+            MethodReception = GetPorts;
+            //Wait for Ports
+            while (!MethodReception.Recieved)
+            {
+                System.Threading.Thread.Sleep(500);
+                SharedResources.CommandHistory.TryGetValue(Hello.rpcid, out MethodReception);
+                //Check if reply recieved
+            }
+
+            //Request Printers
+            GetPrintersCommand GetPrinters = new GetPrintersCommand(SharedResources.rpcid.FetchRPCID());
+            MethodReception = GetPrinters;
+            //Wait for Printers
+            while (!MethodReception.Recieved)
+            {
+                System.Threading.Thread.Sleep(500);
+                SharedResources.CommandHistory.TryGetValue(Hello.rpcid, out MethodReception);
+                //Check if reply recieved
+            }
+
+            //Request Jobs
+            GetJobsCommand GetJobs = new GetJobsCommand(SharedResources.rpcid.FetchRPCID());
+            MethodReception = GetJobs;
+            //Wait for Jobs
+            while (!MethodReception.Recieved)
+            {
+                System.Threading.Thread.Sleep(500);
+                SharedResources.CommandHistory.TryGetValue(Hello.rpcid, out MethodReception);
+                //Check if reply recieved
+            }
+
+             //Preparing to Connect
+             foreach (string key in SharedResources.CurrentPorts.Keys)
+             {
+                 ConveyorPort P = null;
+                 if (SharedResources.CurrentPorts.TryGetValue(key, out P))
+                 {
+                     //Port Found, Test if it is attached to printer. if not, connect
+                     bool PortAttached = false;
+                     //Checking if Port is Attached to a Printer
+                     foreach (string pkey in SharedResources.CurrentPrinters.Keys)
+                     {
+                         ConveyorPrinter p = null;
+                         if (SharedResources.CurrentPrinters.TryGetValue(pkey, out p))
+                         {
+                             if (P.name.Equals(p.port_name))
+                             {
+                                 PortAttached = true;
+                                 //Port exists and is attached to a printer
+                             }
+                         }
+                     }
+                     if (!PortAttached)
+                     {
+                         //Port was not attached to a printer, Connecting
+                         ConnectCommand Connect = new ConnectCommand(SharedResources.rpcid.FetchRPCID(), null, null, false, P.name, null);
+                         MethodReception = Connect;
+                         SharedResources.IssueCommand(Connect);
+                         while (!MethodReception.Recieved)
+                         {
+                             System.Threading.Thread.Sleep(500);
+                             SharedResources.CommandHistory.TryGetValue(Hello.rpcid, out MethodReception);
+                             //Check if reply recieved set to true, breaking the loop
+                         }
+                         //Port Connected
+                     }
+                 }
+             }////////////
         }

         public string[] GetKnownPrinters()


Forgot to make it internal

Forgot to make it internal

--- SQLDatabase/ConfigurationFactory.cs
+++ SQLDatabase/ConfigurationFactory.cs
@@ -4,7 +4,7 @@
 namespace SQLDatabase
 {
     // ReSharper disable once ClassNeverInstantiated.Global
-    public class ConfigurationFactory
+    internal class ConfigurationFactory
     {
         // ReSharper disable once MemberCanBeMadeStatic.Global
         public IConfiguration CreateConfiguration()


enum key bugfix

enum key bugfix

--- Serenity.Core/Helpers/EnumMapper.cs
+++ Serenity.Core/Helpers/EnumMapper.cs
@@ -6,6 +6,9 @@

 namespace Serenity
 {
+    using System.Reflection;
+    using Serenity.ComponentModel;
+
     public static class EnumMapper
     {
         private static Hashtable cache;
@@ -105,9 +108,11 @@
                 enumType.IsEnum &&
                 System.Enum.GetName(enumType, value) != null)
             {
-                var typeName = enumType.Name;
+                var enumKeyAttr = enumType.GetCustomAttribute<EnumKeyAttribute>();
+                var enumKey = enumKeyAttr != null ? enumKeyAttr.Value : enumType.FullName;
+
                 var enumName = System.Enum.GetName(enumType, value);
-                var key = "Enums." + typeName + "." + enumName;
+                var key = "Enums." + enumKey + "." + enumName;
                 var text = LocalText.TryGet(key);
                 if (text == null)
                 {