added mising initialization from reintegrating all patches

--- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -60,7 +60,7 @@
     public Thread m_physicsThread;

     public Dictionary<uint, BSPhysObject> PhysObjects;
-    public ReaderWriterLock PhysObjectsRwLock;
+    public ReaderWriterLock PhysObjectsRwLock = new ReaderWriterLock();

     public BSShapeCollection Shapes;


add an ignore

add an ignore

--- MatterControl.Printing/Settings/PrinterSettings.cs
+++ MatterControl.Printing/Settings/PrinterSettings.cs
@@ -561,6 +561,7 @@
 		/// </summary>
 		public PrinterSettingsLayer UserLayer { get; private set; } = new PrinterSettingsLayer();

+		[JsonIgnore]
 		public PrinterSettingsLayer SceneLayer
 		{
 			get


Unit tests for ToAddressProtectionIndicator

--- PART/Source/CprBroker/DPR.Tests/PersonTotal.Converters.Tests.cs
+++ PART/Source/CprBroker/DPR.Tests/PersonTotal.Converters.Tests.cs
@@ -224,6 +224,27 @@
             }
         }

+        [TestFixture]
+        public class ToAddressProtectionIndicator
+        {
+            [Test]
+            public void ToAddressProtectionIndicator_1_True()
+            {
+                var personTotal = new PersonTotalStub() { AddressProtectionMarker = '1' };
+                var result = personTotal.ToAddressProtectionIndicator();
+                Assert.True(result);
+            }
+
+            [Test]
+            public void ToAddressProtectionIndicator_OtherValues_False(
+                [Values(null, '2', '0', 'w', 'A')]char? protectionIndicator)
+            {
+                var personTotal = new PersonTotalStub() { AddressProtectionMarker = protectionIndicator };
+                var result = personTotal.ToAddressProtectionIndicator();
+                Assert.False(result);
+            }
+        }
+

     }


Make all graph via querystring

Make all graph via querystring

--- Opserver/Views/Dashboard/Dashboard.Table.cshtml
+++ Opserver/Views/Dashboard/Dashboard.Table.cshtml
@@ -13,22 +13,13 @@
 }
 @helper Graph(Node n, string type)
 {
-if (DashboardModule.HasData)
-{
-}
-else
-{
-
No Data Available
}
-}
-@helper GraphAll(Node n, string type)
-{
-if (DashboardModule.HasData)
-{
-
-}
-else
-{
-
No Data Available
}
+    if (DashboardModule.HasData) {
+        if (Request.QueryString["allGraph"].HasValue())
+        {}
+        else
+        {}
+    }
+    else {
No Data Available
}
 }
 @helper DiskText(Node n)
 {


[trunk] Option delegate and properties are now written in preprocessor regions per interface

--- OpusOptionInterfacePropertyGenerator/Program.cs
+++ OpusOptionInterfacePropertyGenerator/Program.cs
@@ -38,23 +38,30 @@
             set;
         }

-        public string Interface
+        public bool HasGet
         {
             get;
             set;
         }

-        public bool HasGet
+        public bool HasSet
         {
             get;
             set;
         }
-
-        public bool HasSet
+    }
+
+    class PropertySignatureList : System.Collections.Generic.List<PropertySignature>
+    {
+        public string InterfaceName
         {
             get;
             set;
         }
+    }
+
+    class PropertySignatureMap : System.Collections.Generic.Dictionary<string, PropertySignatureList>
+    {
     }

     class DelegateSignature
@@ -373,11 +380,10 @@

         static void Execute(Parameters parameters)
         {
-            System.Collections.Generic.List<PropertySignature> propertyList = new System.Collections.Generic.List<PropertySignature>();
+            PropertySignatureMap propertyMap = new PropertySignatureMap();

             // TODO:
             // * handle anything before an interface, e.g. enum
-            // * write out delegates in regions per interface
             foreach (string inputPath in parameters.inputPathNames)
             {
                 if (!System.IO.File.Exists(inputPath))
@@ -429,6 +435,15 @@
                         throw new Exception("No scope opened after interface");
                     }

+                    PropertySignatureList propertyList = propertyMap[inputPath] = new PropertySignatureList();
+                    if (parameters.outputNamespace != namespaceName)
+                    {
+                        propertyList.InterfaceName = namespaceName + "." + interfaceName;
+                    }
+                    else
+                    {
+                        propertyList.InterfaceName = interfaceName;
+                    }
                     do
                     {
                         line = ReadLine(reader, true);
@@ -443,14 +458,6 @@
                         PropertySignature property = new PropertySignature();
                         property.Name = propertyStrings[1];
                         property.Type = propertyStrings[0];
-                        if (parameters.outputNamespace != namespaceName)
-                        {
-                            property.Interface = namespaceName + "." + interfaceName;
-                        }
-                        else
-                        {
-                            property.Interface = interfaceName;
-                        }

                         // determine if the type is value or reference
                         string[] typeSplit = property.Type.Split(new char[] { '.' });
@@ -532,16 +539,16 @@
             if (Parameters.Mode.GenerateProperties == (parameters.mode & Parameters.Mode.GenerateProperties))
             {
                 System.Console.WriteLine("Generating properties...");
-                WritePropertiesFile(parameters, propertyList);
+                WritePropertiesFile(parameters, propertyMap);
             }
             if (Parameters.Mode.GenerateDelegates == (parameters.mode & Parameters.Mode.GenerateDelegates))
             {
                 System.Console.WriteLine ("Generating delegates...");
-                WriteDelegatesFile(parameters, propertyList, delegateSignatures);
-            }
-        }
-
-        private static void WritePropertiesFile(Parameters parameters, System.Collections.Generic.List<PropertySignature> propertyList)
+                WriteDelegatesFile(parameters, propertyMap, delegateSignatures);
+            }
+        }
+
+        private static void WritePropertiesFile(Parameters parameters, PropertySignatureMap propertyMap)
         {
             // write out C# file containing the properties
             if (parameters.toStdOut)
@@ -563,26 +570,32 @@
                 WriteLine(writer, 1, "public partial class {0}", parameters.outputClassName);
                 WriteLine(writer, 1, "{");

-                foreach (PropertySignature property in propertyList)
-                {
-                    WriteLine(writer, 2, "{0} {1}.{2}", property.Type, property.Interface, property.Name);
-                    WriteLine(writer, 2, "{");
-                    if (property.HasGet)
-                    {
-                        WriteLine(writer, 3, "get");
-                        WriteLine(writer, 3, "{");
-                        WriteLine(writer, 4, "return this.Get{0}Option<{1}>(\"{2}\");", property.IsValueType ? "ValueType" : "ReferenceType", property.Type, property.Name);
-                        WriteLine(writer, 3, "}");
-                    }
-                    if (property.HasSet)
-                    {
-                        WriteLine(writer, 3, "set");
-                        WriteLine(writer, 3, "{");
-                        WriteLine(writer, 4, "this.Set{0}Option<{1}>(\"{2}\", value);", property.IsValueType ? "ValueType" : "ReferenceType", property.Type, property.Name);
-                        WriteLine(writer, 4, "this.ProcessNamedSetHandler(\"{0}SetHandler\", this[\"{0}\"]);", property.Name);
-                        WriteLine(writer, 3, "}");
-                    }
-                    WriteLine(writer, 2, "}");
+                foreach (string interfacePath in propertyMap.Keys)
+                {
+                    PropertySignatureList propertyList = propertyMap[interfacePath];
+                    WriteLine(writer, 2, "#region {0} Option properties", propertyList.InterfaceName);
+                    foreach (PropertySignature property in propertyList)
+                    {
+                        WriteLine(writer, 2, "{0} {1}.{2}", property.Type, propertyList.InterfaceName, property.Name);
+                        WriteLine(writer, 2, "{");
+                        if (property.HasGet)
+                        {
+                            WriteLine(writer, 3, "get");
+                            WriteLine(writer, 3, "{");
+                            WriteLine(writer, 4, "return this.Get{0}Option<{1}>(\"{2}\");", property.IsValueType ? "ValueType" : "ReferenceType", property.Type, property.Name);
+                            WriteLine(writer, 3, "}");
+                        }
+                        if (property.HasSet)
+                        {
+                            WriteLine(writer, 3, "set");
+                            WriteLine(writer, 3, "{");
+                            WriteLine(writer, 4, "this.Set{0}Option<{1}>(\"{2}\", value);", property.IsValueType ? "ValueType" : "ReferenceType", property.Type, property.Name);
+                            WriteLine(writer, 4, "this.ProcessNamedSetHandler(\"{0}SetHandler\", this[\"{0}\"]);", property.Name);
+                            WriteLine(writer, 3, "}");
+                        }
+                        WriteLine(writer, 2, "}");
+                    }
+                    WriteLine(writer, 2, "#endregion");
                 }

                 WriteLine(writer, 1, "}");
@@ -744,7 +757,7 @@
             return layout;
         }

-        private static void WriteDelegatesFile(Parameters parameters, System.Collections.Generic.List<PropertySignature> propertyList, System.Collections.Generic.List<DelegateSignature> delegateSignatures)
+        private static void WriteDelegatesFile(Parameters parameters, PropertySignatureMap propertyMap, System.Collections.Generic.List<DelegateSignature> delegateSignatures)
         {
             // write out C# file containing the delegates
             if (parameters.toStdOut)
@@ -814,45 +827,50 @@
                 System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> delegatesToRegister = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>>();

                 // write delegates for each property of the interface
-                foreach (PropertySignature property in propertyList)
-                {
-                    delegatesToRegister[property.Name] = new System.Collections.Generic.List<string>();
-
-                    foreach (DelegateSignature delegateSig in delegateSignatures)
-                    {
-                        string delegateName = property.Name + delegateSig.InNamespace;
-                        delegatesToRegister[property.Name].Add(delegateName);
-
-                        System.Text.StringBuilder propertyDelegate = new System.Text.StringBuilder();
-                        propertyDelegate.AppendFormat("private static {0} {1}{2}", delegateSig.ReturnType, delegateName, delegateSig.ArgumentString);
-                        WriteLine(writer, 2, propertyDelegate.ToString());
-                        if (null != layout && layout.functions.ContainsKey(propertyDelegate.ToString()))
-                        {
-                            System.Console.WriteLine("Function '{0}' reusing from file", propertyDelegate.ToString());
-                            foreach (IndentedString line in layout.functions[propertyDelegate.ToString()])
+                foreach (string interfacePath in propertyMap.Keys)
+                {
+                    WriteLine(writer, 2, "#region {0} Option delegates", propertyMap[interfacePath].InterfaceName);
+                    foreach (PropertySignature property in propertyMap[interfacePath])
+                    {
+                        delegatesToRegister[property.Name] = new System.Collections.Generic.List<string>();
+
+                        foreach (DelegateSignature delegateSig in delegateSignatures)
+                        {
+                            string delegateName = property.Name + delegateSig.InNamespace;
+                            delegatesToRegister[property.Name].Add(delegateName);
+
+                            System.Text.StringBuilder propertyDelegate = new System.Text.StringBuilder();
+                            propertyDelegate.AppendFormat("private static {0} {1}{2}", delegateSig.ReturnType, delegateName, delegateSig.ArgumentString);
+                            WriteLine(writer, 2, propertyDelegate.ToString());
+                            if (null != layout && layout.functions.ContainsKey(propertyDelegate.ToString()))
                             {
-                                // TODO: magic number
-                                WriteLine(writer, 2 + line.NumSpaces / 4, line.Line);
-                            }
-                        }
-                        else
-                        {
-                            System.Console.WriteLine("Function '{0}' generating code for", propertyDelegate.ToString());
-                            WriteLine(writer, 2, "{");
-                            if (null != delegateSig.Body)
-                            {
-                                foreach (string line in delegateSig.Body)
+                                System.Console.WriteLine("Function '{0}' reusing from file", propertyDelegate.ToString());
+                                foreach (IndentedString line in layout.functions[propertyDelegate.ToString()])
                                 {
-                                    WriteLine(writer, 3, line);
+                                    // TODO: magic number
+                                    WriteLine(writer, 2 + line.NumSpaces / 4, line.Line);
                                 }
                             }
-                            WriteLine(writer, 2, "}");
-                            writeToDisk = true;
-                        }
-                    }
-                }
-
-                if (null != layout && (propertyList.Count * delegateSignatures.Count + 1) != layout.functions.Count)
+                            else
+                            {
+                                System.Console.WriteLine("Function '{0}' generating code for", propertyDelegate.ToString());
+                                WriteLine(writer, 2, "{");
+                                if (null != delegateSig.Body)
+                                {
+                                    foreach (string line in delegateSig.Body)
+                                    {
+                                        WriteLine(writer, 3, line);
+                                    }
+                                }
+                                WriteLine(writer, 2, "}");
+                                writeToDisk = true;
+                            }
+                        }
+                    }
+                    WriteLine(writer, 2, "#endregion");
+                }
+
+                if (null != layout && (propertyMap.Count * delegateSignatures.Count + 1) != layout.functions.Count)
                 {
                     writeToDisk = true;
                 }


Extra Class Removed

Extra Class Removed

--- MongoRepository/Repositories/HospitalRepository.cs
+++ MongoRepository/Repositories/HospitalRepository.cs
@@ -1,37 +0,0 @@
-using MongoDB.Bson;
-using MongoDB.Driver;
-using MongoDB.Driver.Builders;
-using System;
-using MongoRepository.Base;
-using MongoRepository.DbModels;
-
-namespace MongoRepository.Repositories
-{
-    public class HospitalRepository : BaseRepository<Hospital>
-    {
-        public HospitalRepository() : base(Utilities.Configurations.ConnectionString)
-        {
-        }
-
-        public override Hospital Add(Hospital item)
-        {
-            item.Id = ObjectId.GenerateNewId().ToString();
-            item.LastModified = DateTime.UtcNow;
-            Collection.Insert(item);
-            return item;
-        }
-
-        public override bool Update(Hospital item)
-        {
-            var query = Query.EQ("_id", item.Id);
-            item.LastModified = DateTime.UtcNow;
-            IMongoUpdate update = Update<Hospital>
-                .Set(h => h.Email, item.Email)
-                .Set(h => h.LastModified, DateTime.UtcNow)
-                .Set(h => h.Name, item.Name)
-                .Set(h => h.Phone, item.Phone);
-            Collection.Update(query, update);
-            return true;
-        }
-    }
-}


Remove dependence to sample file and fixed typo

--- NBi.UI/Presenter/GenericTest/CsvImportPresenter.cs
+++ NBi.UI/Presenter/GenericTest/CsvImportPresenter.cs
@@ -51,7 +51,7 @@
             }
             catch (ExpectedVariableNotFoundException)
             {
-                View.ShowException("The template as at least one variable which wasn't supplied by the Csv. Check the name of the variables.");
+                View.ShowException("The template has at least one variable which wasn't supplied by the Csv. Check the name of the variables.");
             }
         }

@@ -101,8 +101,9 @@
             View.EmbeddedTemplates = new BindingList<string>();
             View.Tests = new BindingList<TestXml>();

-            var csvReader = new CsvReader(@"C:\mydims.csv", true);
-            View.CsvContent = csvReader.Read();
+            //var csvReader = new CsvReader(@"C:\mydims.csv", true);
+            //View.CsvContent = csvReader.Read();
+            View.CsvContent = new DataTable();
             foreach (DataColumn col in View.CsvContent.Columns)
                 View.Variables.Add(col.ColumnName);
             //Template


Search job options filenames

Search job options filenames

--- PSAtlasDatasetCommands/FindATLASMCJobOptions.cs
+++ PSAtlasDatasetCommands/FindATLASMCJobOptions.cs
@@ -6,6 +6,7 @@
 using System.Linq;
 using System.Management.Automation;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;

 namespace PSAtlasDatasetCommands
@@ -19,8 +20,14 @@
         /// <summary>
         /// The MC run number, if we want a specific run number
         /// </summary>
-        [Parameter(HelpMessage = "Run number to fetch", ValueFromPipeline = true, Mandatory = true, Position = 1)]
+        [Parameter(HelpMessage = "Run number to fetch", ValueFromPipeline = true, Mandatory = true, Position = 1, ParameterSetName = "ByRunNumber")]
         public int MCJobNumber;
+
+        /// <summary>
+        /// Search by name rather than run number
+        /// </summary>
+        [Parameter(HelpMessage = "Name (or partial name) of the dataset", ValueFromPipeline = true, Mandatory = true, Position = 1, ParameterSetName = "ByName")]
+        public string Name { get; set; }

         /// <summary>
         /// Get/Set the mc campaign.
@@ -111,17 +118,36 @@
         protected override void ProcessRecord()
         {
             // Loop through the file, looking for what we need.
-            var jobText = MCJobNumber.ToString("D6");
+            var searchText = ParameterSetName == "ByRunNumber"
+                ? MCJobNumber.ToString("D6")
+                : Name;

             var matches = GetDatabaseFilename()
                 .ReadLines()
-                .Where(l => l.Contains(jobText))
-                .Select(l => new ATLASMCJobInfo() { RunNumber = MCJobNumber, FileName = l });
+                .Where(l => l.Contains(searchText))
+                .Select(l => new ATLASMCJobInfo() { RunNumber = ParseRunNumberFromName(l), FileName = l });

             foreach (var item in matches)
             {
                 WriteObject(item);
             }
+        }
+
+        /// <summary>
+        /// Match the run number in a MC filename
+        /// </summary>
+        private Regex _runMatch = new Regex(@"\.([0-9]+)\.");
+
+        /// <summary>
+        /// Pull the run number from the filename.
+        /// </summary>
+        /// <param name="l"></param>
+        /// <returns></returns>
+        private int ParseRunNumberFromName(string l)
+        {
+            var m = _runMatch.Match(l);
+            return m.Success == false ? 0
+                : int.Parse(m.Groups[1].Value);
         }

         /// <summary>


The map in Contacts/Index.cshtml has been changed from Google Maps to BgMaps.

--- NelitaBeautyStudio.Web/Views/Contacts/Index.cshtml
+++ NelitaBeautyStudio.Web/Views/Contacts/Index.cshtml
@@ -39,8 +39,14 @@

     @Html.ActionLink("Добавяне", "Create", null, new { @class = "btn btn-primary" })
+
+
+    @*
Google Maps Generator von RegioHelden
Google Maps Generator by RegioHelden
*@
+

+
+

-
Google Maps Generator von RegioHelden
Google Maps Generator by RegioHelden

+

     if (User.IsInRole(GlobalConstants.AdminRole))
     {


Also try to acquire node on project relaod

--- Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs
+++ Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs
@@ -100,7 +100,7 @@
                 }
             }
 #if DEV14
-            TryToAcquireTypings();
+            TryToAcquireCurrentTypings();
 #endif
         }

@@ -133,9 +133,17 @@
             }
         }

-        private void TryToAcquireTypings() {
+        private void TryToAcquireTypings(IEnumerable<string> packages) {
+            if (ShouldAcquireTypingsAutomatically && TypingsAcquirer != null) {
+                TypingsAcquirer
+                    .AcquireTypings(packages, null /*redirector*/)
+                    .ContinueWith(x => x);
+            }
+        }
+
+        private void TryToAcquireCurrentTypings() {
             var controller = ModulesNode != null ? ModulesNode.NpmController : null;
-            if (!ShouldAcquireTypingsAutomatically || TypingsAcquirer == null || controller == null) {
+            if (controller == null) {
                 return;
             }

@@ -148,9 +156,7 @@
                 .Select(package => package.Name)
                 .Concat(new[] { "node" });

-            TypingsAcquirer
-                .AcquireTypings(currentPackages, null /*redirector*/)
-                .ContinueWith(x => x);
+            TryToAcquireTypings(currentPackages);
         }
 #endif

@@ -484,6 +490,10 @@

                 NodejsPackage.Instance.CheckSurveyNews(false);
                 ModulesNode.ReloadHierarchySafe();
+
+#if DEV14
+                TryToAcquireTypings(new[] { "node" });
+#endif

                 // scan for files which were loaded from cached analysis but no longer
                 // exist and remove them.


use raw INPC to avoid reactive ui code

use raw INPC to avoid reactive ui code

--- ReactiveCompositeCollectionsSpec/src/CompositeBranchListSpec.cs
+++ ReactiveCompositeCollectionsSpec/src/CompositeBranchListSpec.cs
@@ -263,7 +263,7 @@

             using (var s = e.Subscribe())
             {
-                s.WhenAnyValue(p => p.Items).Subscribe(_ => count++);
+                s.PropertyChanged += (_,__)=>count++;
                 s.Items.Should().BeEquivalentTo("1x", "2x");
                 a.Source=a.Source.Remove(bt);
                 s.Items.Should().BeEquivalentTo();
@@ -278,7 +278,7 @@
             }

             // 6 changes should be recorded
-            count.Should().Be(5);
+            count.Should().Be(4);
         }
     }
 }


bump version

bump version

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -1,5 +1,5 @@
 using System.Reflection;
 [assembly: AssemblyTitle("Fody.Equals")]
 [assembly: AssemblyProduct("Fody.Equals")]
-[assembly: AssemblyVersion("1.3.8")]
-[assembly: AssemblyFileVersion("1.3.8")]
+[assembly: AssemblyVersion("1.3.9")]
+[assembly: AssemblyFileVersion("1.3.9")]


Releasing 0.13.0

Releasing 0.13.0

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -3,6 +3,6 @@

 [assembly: AssemblyTitle("GitFlowVersion")]
 [assembly: AssemblyProduct("GitFlowVersion")]
-[assembly: AssemblyVersion("0.12.0")]
-[assembly: AssemblyFileVersion("0.12.0")]
+[assembly: AssemblyVersion("0.13.0")]
+[assembly: AssemblyFileVersion("0.13.0")]
 [assembly: InternalsVisibleTo("Tests")]


(GH-828) Update Cake.Gitter reference from 1.0.1 to 1.0.2

--- Source/Cake.Recipe/Content/addins.cake
+++ Source/Cake.Recipe/Content/addins.cake
@@ -12,7 +12,7 @@
 #addin nuget:?package=Cake.Email.Common&version=0.4.2
 #addin nuget:?package=Cake.Email&version=1.0.0
 #addin nuget:?package=Cake.Figlet&version=2.0.0
-#addin nuget:?package=Cake.Gitter&version=1.0.1
+#addin nuget:?package=Cake.Gitter&version=1.0.2
 #addin nuget:?package=Cake.Incubator&version=6.0.0
 #addin nuget:?package=Cake.Kudu&version=1.0.0
 #addin nuget:?package=Cake.MicrosoftTeams&version=1.0.0


Sandbox Bugfix #FIX: Fixed a bug that would cause an error when leaving Sandbox mode from a runtime-only scene that was active while a plugin reload occurred. This would sometimes prevent the editor from closing.

--- Source/Editor/DualityEditor/Sandbox.cs
+++ Source/Editor/DualityEditor/Sandbox.cs
@@ -146,8 +146,17 @@
 			state = SandboxState.Inactive;
 			DualityApp.ExecContext = DualityApp.ExecutionContext.Editor;

-			// (Re)Load Scene - now in editor context
-			Scene.SwitchTo(startScene);
+			// Check if the Scene we started the sandbox with is still valid, and switch back to it.
+			if (startScene.IsAvailable)
+			{
+				Scene.SwitchTo(startScene);
+			}
+			// Otherwise, just switch back to the previously active Scene. This can happen if the
+			// start scene was a runtime-only Scene that was active while a plugin reload occurred.
+			else if (activeScene.IsAvailable)
+			{
+				Scene.SwitchTo(activeScene);
+			}

 			OnLeaveSandbox();
 			OnSandboxStateChanged();


fix AbpDbContext.IsHardDeleteEntity NullReferenceException

--- src/Abp.EntityFramework/EntityFramework/AbpDbContext.cs
+++ src/Abp.EntityFramework/EntityFramework/AbpDbContext.cs
@@ -311,7 +311,7 @@

         protected virtual bool IsHardDeleteEntity(DbEntityEntry entry)
         {
-            if (CurrentUnitOfWorkProvider.Current?.Items == null)
+            if (CurrentUnitOfWorkProvider?.Current?.Items == null)
             {
                 return false;
             }
@@ -588,4 +588,4 @@
             return AbpSession.TenantId;
         }
     }
-}+}


+Create factory method to initialize an instance as a builder

Users will go through this method (instead of a constructor) to obtain
an instance. This allows the class to do setup and pass any constructor
parameters it needs--in this case, a TypeBuilder.

It starts by defining the new dynamic assembly, the module, and the new
type (whose name is generated, since we don't care about the name). It
hands the TypeBuilder off to a new instance and kicks it back.

Next steps, the caller would call more things on this ClassBuilder to
add more things to the object we're building--properties, then
attributes, etc.

--- src/ArguMint/ArguMint.UnitTests/Dynamic/ClassBuilder.cs
+++ src/ArguMint/ArguMint.UnitTests/Dynamic/ClassBuilder.cs
@@ -1,6 +1,37 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
 namespace ArguMint.UnitTests.Dynamic
 {
    public class ClassBuilder
    {
+      private readonly TypeBuilder _typeBuilder;
+
+      private ClassBuilder( TypeBuilder typeBuilder )
+      {
+         _typeBuilder = typeBuilder;
+      }
+
+      public static ClassBuilder Create()
+      {
+         var assemblyName = new AssemblyName( $"ClassBuilderProxyAssembly_{Guid.NewGuid()}" );
+
+         AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( assemblyName, AssemblyBuilderAccess.Run );
+         ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule( "MainModule" );
+
+         var typeName = $"DynamicClass_{Guid.NewGuid()}";
+
+         TypeBuilder typeBuilder = moduleBuilder.DefineType( typeName,
+            TypeAttributes.Public |
+            TypeAttributes.Class |
+            TypeAttributes.AutoClass |
+            TypeAttributes.AnsiClass |
+            TypeAttributes.BeforeFieldInit |
+            TypeAttributes.AutoLayout,
+            typeof( object ) );
+
+         return new ClassBuilder( typeBuilder );
+      }
    }
 }


Added console help

Added console help

--- src/AutoTest.TestRunner/AutoTest.TestRunners/Program.cs
+++ src/AutoTest.TestRunner/AutoTest.TestRunners/Program.cs
@@ -33,7 +33,41 @@

         private static void printUseage()
         {
+            Console.WriteLine("AutoTest.TestRunner v0.1");
+            Console.WriteLine("Author - Svein Arne Ackenhausen");
             Console.WriteLine("AutoTest.TestRunner is a plugin based generic test runner. ");
+            Console.WriteLine("");
+            Console.WriteLine("Syntax: AutoTest.TestRunner.exe OPTIONS_FILE RESULT_FILE");
+            Console.WriteLine("");
+            Console.WriteLine("Options format");
+            Console.WriteLine("<=====================================================>");
+            Console.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
+            Console.WriteLine("<run>");
+            Console.WriteLine("\t<!--It can contain 0-n plugins. If 0 the runner will load all available plugins-->");
+            Console.WriteLine("\t<plugin type=\"Plugin.IAutoTestNetTestRunner.Implementation\">C:\\Some\\Path\\PluginAssembly.dll</plugin>");
+            Console.WriteLine("\t<!--It can contain 0-n runners. The id is what determines which runner will handle that run-->");
+            Console.WriteLine("\t<runner id=\"NUnit\">");
+            Console.WriteLine("\t\t<!--It can contain 0-n categories to ignore-->");
+            Console.WriteLine("\t\t<categories>");
+            Console.WriteLine("\t\t\t<ignore_category>IgnoreCategory</ignore_category>");
+            Console.WriteLine("\t\t</categories>");
+            Console.WriteLine("\t\t<!--It can contain 1-n assemblies to test. Framework is optional-->");
+            Console.WriteLine("\t\t<test_assembly name=\"C:\\my\\testassembly.dll\" framework=\"3.5\">");
+            Console.WriteLine("\t\t\t<!--It can contain 0-n tests-->");
+            Console.WriteLine("\t\t\t<tests>");
+            Console.WriteLine("\t\t\t\t<test>testassembly.class.test1</test>");
+            Console.WriteLine("\t\t\t</tests>");
+            Console.WriteLine("\t\t\t<!--It can contain 0-n members-->");
+            Console.WriteLine("\t\t\t<members>");
+            Console.WriteLine("\t\t\t\t<member>testassembly.class2</member>");
+            Console.WriteLine("\t\t\t</members>");
+            Console.WriteLine("\t\t\t<!--It can contain 0-n namespaces-->");
+            Console.WriteLine("\t\t\t<namespaces>");
+            Console.WriteLine("\t\t\t\t<namespace>testassembly.somenamespace1</namespace>");
+            Console.WriteLine("\t\t\t</namespaces>");
+            Console.WriteLine("\t\t</test_assembly>");
+            Console.WriteLine("\t</runner>");
+            Console.WriteLine("</run>");
         }

         private static IEnumerable<TestResult> run(OptionsParser parser)


After password reset, wipe the token

After password reset, wipe the token

--- src/ChessVariantsTraining/Controllers/UserController.cs
+++ src/ChessVariantsTraining/Controllers/UserController.cs
@@ -327,6 +327,7 @@
             Tuple<string, string> hashAndSalt = passwordHasher.HashPassword(password);
             associated.PasswordHash = hashAndSalt.Item1;
             associated.Salt = hashAndSalt.Item2;
+            associated.PasswordRecoveryToken = null;
             userRepository.Update(associated);
             return View("PasswordUpdated");
         }


Just trying to get builder to rebuild. It is complaining about newrelic

--- Purchasing.Web/Controllers/AccountController.cs
+++ Purchasing.Web/Controllers/AccountController.cs
@@ -9,7 +9,7 @@
     /// <summary>
     /// Controller for the Account class.
     /// </summary>
-    public class AccountController : Controller
+    public class AccountController : Controller
     {
         public string Message
         {


bump version

bump version

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -1,4 +1,4 @@
 using System.Reflection;

-[assembly: AssemblyVersion("3.0.2")]
-[assembly: AssemblyFileVersion("3.0.2")]+[assembly: AssemblyVersion("3.0.3")]
+[assembly: AssemblyFileVersion("3.0.3")]


V 2.2

V 2.2

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -8,5 +8,5 @@
 static class Product
 {
     public const string Name = "JetBrainsAnnotations.Fody";
-    public const string Version = "2.1.0";
+    public const string Version = "2.2.0";
 }


bump version

bump version

--- CommonAssemblyInfo.cs
+++ CommonAssemblyInfo.cs
@@ -2,5 +2,5 @@

 [assembly: AssemblyTitle("Fody")]
 [assembly: AssemblyProduct("Fody")]
-[assembly: AssemblyVersion("2.0.7")]
-[assembly: AssemblyFileVersion("2.0.7")]+[assembly: AssemblyVersion("2.0.8")]
+[assembly: AssemblyFileVersion("2.0.8")]


fixed object-collision issue after uncheck phantom-flag

Signed-off-by: Michael Cerquoni <aa59f40be69e6ea786d2005fc02b31107eaf029c@gmail.com>

--- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4227,6 +4227,8 @@
                     if (pa != null)
                     {
                         pa.SetMaterial(Material);
+                        pa.Position = GetWorldPosition();
+                        pa.Orientation = GetWorldRotation();
                         DoPhysicsPropertyUpdate(UsePhysics, true);

                         SubscribeForCollisionEvents();


Configure correct validator. Closes #82

Configure correct validator. Closes #82

--- Orleans.Providers.MongoDB/MongoDBSiloExtensions.cs
+++ Orleans.Providers.MongoDB/MongoDBSiloExtensions.cs
@@ -161,7 +161,7 @@
         {
             services.Configure<MongoDBMembershipTableOptions>(configuration);
             services.AddSingleton<IMembershipTable, MongoMembershipTable>();
-            services.AddSingleton<IConfigurationValidator, MongoDBOptionsValidator<MongoDBRemindersOptions>>();
+            services.AddSingleton<IConfigurationValidator, MongoDBOptionsValidator<MongoDBMembershipTableOptions>>();

             return services;
         }


- Modified Simulator to storage memory as 32bit integer (not working)

--- Source/Mosa.TinyCPUSimulator/SimCPU.cs
+++ Source/Mosa.TinyCPUSimulator/SimCPU.cs
@@ -93,7 +93,20 @@
 			}
 		}

-		private uint InternalRead32(ulong address)
+		protected virtual ulong TranslateToPhysical(ulong address)
+		{
+			return address;
+		}
+
+		protected virtual void MemoryUpdate(ulong address, byte size)
+		{
+			foreach (var device in SimMemoryDevices)
+			{
+				device.MemoryWrite(address, size);
+			}
+		}
+
+		private uint InternalRead32Ex(ulong address)
 		{
 			Debug.Assert(address % 4 == 0);

@@ -119,7 +132,7 @@
 			return block[offset];
 		}

-		private void InternalWrite32(ulong address, uint value, uint mask)
+		private void InternalWrite32Ex(ulong address, uint value, uint mask)
 		{
 			Debug.Assert(address % 4 == 0);

@@ -149,32 +162,32 @@
 			Debug.Assert(InternalRead32(address) == newvalue); // very slow performance if assert enabled
 		}

-		protected virtual uint InternalRead32Ex(ulong address)
+		protected uint InternalRead32(ulong address)
 		{
 			var offset = address % 4;

 			if (offset == 0)
 			{
-				return InternalRead32(address);
+				return InternalRead32Ex(address);
 			}
 			else if (offset == 1)
 			{
-				uint a = InternalRead32(address - 1);
-				uint b = InternalRead32(address + 3);
+				uint a = InternalRead32Ex(address - 1);
+				uint b = InternalRead32Ex(address + 3);

 				return (a & 0x00FFFFFF) | (b & 0xFF000000);
 			}
 			else if (offset == 2)
 			{
-				uint a = InternalRead32(address - 2);
-				uint b = InternalRead32(address + 2);
+				uint a = InternalRead32Ex(address - 2);
+				uint b = InternalRead32Ex(address + 2);

 				return (a & 0x0000FFFF) | (b & 0xFFFF0000);
 			}
 			else if (offset == 3)
 			{
-				uint a = InternalRead32(address - 3);
-				uint b = InternalRead32(address + 1);
+				uint a = InternalRead32Ex(address - 3);
+				uint b = InternalRead32Ex(address + 1);

 				return (a & 0x000000FF) | (b & 0xFFFFFF00);
 			}
@@ -182,176 +195,177 @@
 			throw new InvalidProgramException();
 		}

-		protected virtual uint InternalRead16Ex(ulong address)
+		protected ushort InternalRead16(ulong address)
 		{
 			var offset = address % 4;

-			uint a = InternalRead32(address - 1);
+			uint a = InternalRead32Ex(address - offset);

 			if (offset == 0)
 			{
-				return (a & 0xFFFF0000) >> 16;
+				return (ushort)((a & 0xFFFF0000) >> 16);
 			}
 			else if (offset == 1)
 			{
-				return (a & 0x00FFFF00) >> 8;
+				return (ushort)((a & 0x00FFFF00) >> 8);
 			}
 			else if (offset == 2)
 			{
-				return (a & 0x0000FFFF);
+				return (ushort)(a & 0x0000FFFF);
 			}
 			else if (offset == 3)
 			{
-				uint b = InternalRead32(address + 1);
-
-				return ((a & 0x000000FF) << 8) | ((b & 0xFF000000) >> 24);
+				uint b = InternalRead32Ex(address + 1);
+
+				return (ushort)(((a & 0x000000FF) << 8) | ((b & 0xFF000000) >> 24));
 			}

 			throw new InvalidProgramException();
 		}

-		protected virtual ulong TranslateToPhysical(ulong address)
-		{
-			return address;
-		}
-
-		protected virtual void MemoryUpdate(ulong address, byte size)
-		{
-			foreach (var device in SimMemoryDevices)
-			{
-				device.MemoryWrite(address, size);
-			}
+		protected byte InternalRead8(ulong address)
+		{
+			uint offset = (uint)(address % 4);
+
+			uint value = InternalRead32(address - offset);
+
+			int shift = (3 - (int)offset) * 8;
+
+			return (byte)((value >> shift) & 0xFF);
+		}
+
+		protected void InternalWrite32(ulong address, uint value)
+		{
+			uint offset = (uint)(address % 4);
+
+			if (offset == 0)
+			{
+				InternalWrite32Ex(address, value, 0xFFFFFFFF);
+			}
+			else if (offset == 1)
+			{
+				InternalWrite32Ex(address - 1, value, 0x00FFFFFF);
+				InternalWrite32Ex(address + 3, value, 0xFF000000);
+			}
+			else if (offset == 2)
+			{
+				InternalWrite32Ex(address - 2, value, 0x0000FFFF);
+				InternalWrite32Ex(address + 2, value, 0xFFFF0000);
+			}
+			else if (offset == 3)
+			{
+				InternalWrite32Ex(address - 3, value, 0x000000FF);
+				InternalWrite32Ex(address + 1, value, 0xFFFFFF00);
+			}
+		}
+
+		protected void InternalWrite16(ulong address, ushort value)
+		{
+			uint offset = (uint)(address % 4);
+
+			if (offset == 0)
+			{
+				InternalWrite32Ex(address, ((uint)value) << 16, 0xFFFF0000);
+			}
+			else if (offset == 1)
+			{
+				InternalWrite32Ex(address - 1, ((uint)value) << 8, 0x00FFFF00);
+			}
+			else if (offset == 2)
+			{
+				InternalWrite32Ex(address - 2, ((uint)value), 0x0000FFFF);
+			}
+			else if (offset == 3)
+			{
+				InternalWrite32Ex(address - 2, ((uint)value >> 8), 0x000000FF);
+				InternalWrite32Ex(address + 1, ((uint)value << 24), 0xFF000000);
+			}
+		}
+
+		protected void InternalWrite8(ulong address, byte value)
+		{
+			uint offset = (uint)(address % 4);
+
+			int shift = (3 - (int)offset) * 8;
+
+			InternalWrite32Ex(address - offset, ((uint)value) << shift, (uint)0xFF << shift);
+
+			// very slow performance if assert enabled
+			Debug.Assert(DirectRead8(address) == value);
 		}

 		public uint DirectRead32(ulong address)
 		{
-			uint value = InternalRead32Ex(address);
+			uint value = InternalRead32(address);

 			if (Endian.NativeIsLittleEndian)
+			{
 				value = Endian.Swap(value);
-
+			}
+
+			return value;
+		}
+
+		public ushort DirectRead16(ulong address)
+		{
+			ushort value = InternalRead16(address);
+
+			if (Endian.NativeIsLittleEndian)
+			{
+				value = Endian.Swap(value);
+			}
+
+			return value;
+		}
+
+		public byte DirectRead8(ulong address)
+		{
+			return InternalRead8(address);
+		}
+
+		public void DirectWrite32(ulong address, uint value)
+		{
+			uint val = value;
+
+			if (Endian.NativeIsLittleEndian)
+			{
+				val = Endian.Swap(val);
+			}
+
+			InternalWrite32(address, val);
+
+			// very slow performance if assert enabled
+			Debug.Assert(DirectRead32(address) == value);
 			//Debug.Assert(((uint)DirectRead16(address) | ((uint)DirectRead16(address + 2) << 16)) == value);

-			return value;
-		}
-
-		public void DirectWrite32(ulong address, uint value)
-		{
-			uint offset = (uint)(address % 4);
-
-			if (offset == 0)
-			{
-				InternalWrite32(address, value, 0xFFFFFFFF);
-			}
-			else if (offset == 1)
-			{
-				InternalWrite32(address - 1, value, 0x00FFFFFF);
-				InternalWrite32(address + 3, value & 0xFF000000, 0xFF000000);
-			}
-			else if (offset == 2)
-			{
-				InternalWrite32(address - 2, value, 0x0000FFFF);
-				InternalWrite32(address + 2, value & 0xFFFF0000, 0xFFFF0000);
-			}
-			else if (offset == 3)
-			{
-				InternalWrite32(address - 3, value, 0x000000FF);
-				InternalWrite32(address + 1, value & 0xFFFFFF00, 0xFFFFFF00);
-			}
-
-			Debug.Assert(((uint)DirectRead16(address) | ((uint)DirectRead16(address + 2) << 16)) == value);
-			Debug.Assert(DirectRead32(address) == value);	// very slow performance if assert enabled
-
 			MemoryUpdate(address, 32);
 		}

-		public ushort DirectRead16(ulong address)
-		{
-			uint offset = (uint)(address % 4);
-
-			uint value = 0;
-
-			if (offset == 0)
-			{
-				uint a = InternalRead32(address);
-
-				value = a & 0x0000FFFF;
-			}
-			else if (offset == 1)
-			{
-				uint a = InternalRead32(address - 1);
-
-				value = (a >> 8) & 0x0000FFFF;
-			}
-			else if (offset == 2)
-			{
-				uint a = InternalRead32(address - 2);
-
-				value = (a >> 16) & 0x0000FFFF;
-			}
-			else if (offset == 3)
-			{
-				uint a = InternalRead32(address - 3);
-				uint b = InternalRead32(address + 1);
-
-				value = ((a >> 24) & 0x000000FF) | ((b & 0xFF000000) >> 24);
-			}
-
-			return (ushort)value;
-		}
-
 		public void DirectWrite16(ulong address, ushort value)
 		{
-			uint offset = (uint)(address % 4);
-
-			var val = (uint)value;
-
-			if (offset == 0)
-			{
-				InternalWrite32(address, val, 0x0000FFFF);
-			}
-			else if (offset == 1)
-			{
-				InternalWrite32(address - 1, val << 8, 0x00FFFF00);
-			}
-			else if (offset == 2)
-			{
-				InternalWrite32(address - 2, val << 16, 0xFFFF0000);
-			}
-			else if (offset == 3)
-			{
-				InternalWrite32(address - 3, val << 24, 0x00000FF);
-				InternalWrite32(address + 1, (val & 0x0000FF00) << 16, 0xFF000000);
-			}
-
-			Debug.Assert(DirectRead16(address) == val);	// very slow performance if assert enabled
+			ushort val = value;
+
+			if (Endian.NativeIsLittleEndian)
+			{
+				val = Endian.Swap(val);
+			}
+
+			InternalWrite16(address, val);
+
+			// very slow performance if assert enabled
+			Debug.Assert(DirectRead16(address) == value);

 			MemoryUpdate(address, 16);
 		}

-		public byte DirectRead8(ulong address)
-		{
-			uint offset = (uint)(address % 4);
-
-			uint value = InternalRead32(address - offset);
-
-			int shift = (3 - (int)offset) * 8;
-
-			return (byte)((value >> shift) & 0xFF);
-		}
-
 		public void DirectWrite8(ulong address, byte value)
 		{
-			uint offset = (uint)(address % 4);
-
-			int shift = (3 - (int)offset) * 8;
-
-			InternalWrite32(address - offset, ((uint)value) << shift, (uint)0xFF << shift);
-
-			Debug.Assert(DirectRead8(address) == value);	// very slow performance if assert enabled
+			InternalWrite8(address, value);

 			MemoryUpdate(address, 8);
 		}
+
+

 		public void Write8(ulong address, byte value)
 		{


we're past checkin 6000, so now cleaning up all the cruft of the pre migration database upgrade paths.  This is coming in in stages.

--- OpenSim/Data/MySQL/MySQLRegionData.cs
+++ OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -138,12 +138,8 @@
             // This actually does the roll forward assembly stuff
             Assembly assem = GetType().Assembly;
             Migration m = new Migration(m_connection, assem, "RegionStore");
-
-            // TODO: After rev 6000, remove this.  People should have
-            // been rolled onto the new migration code by then.
-            TestTables(m_connection, m);
-
             m.Update();
+

             MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection);
             m_primDataAdapter = new MySqlDataAdapter(primSelectCmd);
@@ -166,6 +162,7 @@
             MySqlCommand regionSettingsSelectCmd = new MySqlCommand(m_regionSettingsSelect, m_connection);
             m_regionSettingsDataAdapter = new MySqlDataAdapter(regionSettingsSelectCmd);

+            // TODO: move out the ADO.NET pieces here and just go to the db directly
             lock (m_dataSet)
             {
                 m_primTable = createPrimTable();
@@ -294,18 +291,6 @@
                 }
             }
         }
-        // private void TestTablesVersionable(MySqlConnection dbconn)
-        // {
-        //     Dictionary<string, string> tableList = new Dictionary<string, string>();
-
-        //     tableList["land"] = null;
-        //     dbconn.Open();
-        //     GetTableVersion(tableList,dbconn);
-
-        //     UpgradeLandTable(tableList["land"], dbconn);
-        //     //database.Close();
-
-        // }

         /// <summary>
         /// Execute a SQL statement stored in a resource, as a string
@@ -344,28 +329,6 @@
             }
             throw new Exception(string.Format("Resource '{0}' was not found", name));
         }
-
-        /// <summary>
-        /// <list type="bullet">
-        /// <item>Execute CreateLandTable.sql if oldVersion == null</item>
-        /// <item>Execute UpgradeLandTable.sqm if oldVersion contain "Rev."</item>
-        /// </list>
-        /// </summary>
-        /// <param name="oldVersion"></param>
-        /// <param name="dbconn">The database connection handler</param>
-        // private void UpgradeLandTable(string oldVersion, MySqlConnection dbconn)
-        // {
-        //     // null as the version, indicates that the table didn't exist
-        //     if (oldVersion == null)
-        //     {
-        //         ExecuteResourceSql("CreateLandTable.sql",dbconn);
-        //         oldVersion = "Rev. 2; InnoDB free: 0 kB";
-        //     }
-        //     if (!oldVersion.Contains("Rev."))
-        //     {
-        //         ExecuteResourceSql("UpgradeLandTableToVersion2.sql", dbconn);
-        //     }
-        // }

         /// <summary>
         /// Adds an object into region storage
@@ -816,7 +779,7 @@
                 m_primDataAdapter.Update(m_primTable);
                 m_shapeDataAdapter.Update(m_shapeTable);

-                    m_itemsDataAdapter.Update(m_itemsTable);
+                m_itemsDataAdapter.Update(m_itemsTable);

                 m_terrainDataAdapter.Update(m_terrainTable);
                 m_landDataAdapter.Update(m_landTable);
@@ -2005,36 +1968,6 @@
             return cmd;
         }

-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="dt"></param>
-        /// <returns></returns>
-        // private static string defineTable(DataTable dt)
-        // {
-        //     string sql = "create table " + dt.TableName + "(";
-        //     string subsql = String.Empty;
-        //     foreach (DataColumn col in dt.Columns)
-        //     {
-        //         if (subsql.Length > 0)
-        //         {
-        //             // a map function would rock so much here
-        //             subsql += ",\n";
-        //         }
-        //         subsql += col.ColumnName + " " + MySqlType(col.DataType);
-        //         if (dt.PrimaryKey.Length > 0 && col == dt.PrimaryKey[0])
-        //         {
-        //             subsql += " primary key";
-        //         }
-        //     }
-        //     sql += subsql;
-        //     sql += ")";
-
-        //     //m_log.InfoFormat("[DATASTORE]: defineTable() sql {0}", sql);
-
-        //     return sql;
-        // }
-
         /***********************************************************************
          *
          *  Database Binding functions
@@ -2176,206 +2109,6 @@
             da.DeleteCommand = delete;
         }

-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="conn">MySQL connection handler</param>
-        // private static void InitDB(MySqlConnection conn)
-        // {
-        //     string createPrims = defineTable(createPrimTable());
-        //     string createShapes = defineTable(createShapeTable());
-        //     string createItems = defineTable(createItemsTable());
-        //     string createTerrain = defineTable(createTerrainTable());
-
-        //     // Land table is created from the Versionable Test Table routine now.
-        //     //string createLand = defineTable(createLandTable());
-        //     string createLandAccessList = defineTable(createLandAccessListTable());
-
-        //     MySqlCommand pcmd = new MySqlCommand(createPrims, conn);
-        //     MySqlCommand scmd = new MySqlCommand(createShapes, conn);
-        //     MySqlCommand icmd = new MySqlCommand(createItems, conn);
-        //     MySqlCommand tcmd = new MySqlCommand(createTerrain, conn);
-        //     //MySqlCommand lcmd = new MySqlCommand(createLand, conn);
-        //     MySqlCommand lalcmd = new MySqlCommand(createLandAccessList, conn);
-
-        //     if (conn.State != ConnectionState.Open)
-        //     {
-        //         try
-        //         {
-        //             conn.Open();
-        //         }
-        //         catch (Exception ex)
-        //         {
-        //             m_log.Error("[REGION DB]: Error connecting to MySQL server: " + ex.Message);
-        //             m_log.Error("[REGION DB]: Application is terminating!");
-        //             Thread.CurrentThread.Abort();
-        //         }
-        //     }
-
-        //     try
-        //     {
-        //         pcmd.ExecuteNonQuery();
-        //     }
-        //     catch (MySqlException e)
-        //     {
-        //         m_log.WarnFormat("[REGION DB]: Primitives Table Already Exists: {0}", e);
-        //     }
-
-        //     try
-        //     {
-        //         scmd.ExecuteNonQuery();
-        //     }
-        //     catch (MySqlException e)
-        //     {
-        //         m_log.WarnFormat("[REGION DB]: Shapes Table Already Exists: {0}", e);
-        //     }
-
-        //     try
-        //     {
-        //         icmd.ExecuteNonQuery();
-        //     }
-        //     catch (MySqlException e)
-        //     {
-        //         m_log.WarnFormat("[REGION DB]: Items Table Already Exists: {0}", e);
-        //     }
-
-        //     try
-        //     {
-        //         tcmd.ExecuteNonQuery();
-        //     }
-        //     catch (MySqlException e)
-        //     {
-        //         m_log.WarnFormat("[REGION DB]: Terrain Table Already Exists: {0}", e);
-        //     }
-
-        //     //try
-        //     //{
-        //         //lcmd.ExecuteNonQuery();
-        //     //}
-        //     //catch (MySqlException e)
-        //     //{
-        //         //m_log.WarnFormat("[MySql]: Land Table Already Exists: {0}", e);
-        //     //}
-
-        //     try
-        //     {
-        //         lalcmd.ExecuteNonQuery();
-        //     }
-        //     catch (MySqlException e)
-        //     {
-        //         m_log.WarnFormat("[REGION DB]: LandAccessList Table Already Exists: {0}", e);
-        //     }
-        //     conn.Close();
-        // }
-
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="conn"></param>
-        /// <param name="m"></param>
-        /// <returns></returns>
-        private bool TestTables(MySqlConnection conn, Migration m)
-        {
-            // we already have migrations, get out of here
-            if (m.Version > 0)
-                return false;
-
-            MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, conn);
-            MySqlDataAdapter pDa = new MySqlDataAdapter(primSelectCmd);
-            MySqlCommand shapeSelectCmd = new MySqlCommand(m_shapeSelect, conn);
-            MySqlDataAdapter sDa = new MySqlDataAdapter(shapeSelectCmd);
-            MySqlCommand itemsSelectCmd = new MySqlCommand(m_itemsSelect, conn);
-            MySqlDataAdapter iDa = new MySqlDataAdapter(itemsSelectCmd);
-            MySqlCommand terrainSelectCmd = new MySqlCommand(m_terrainSelect, conn);
-            MySqlDataAdapter tDa = new MySqlDataAdapter(terrainSelectCmd);
-            MySqlCommand landSelectCmd = new MySqlCommand(m_landSelect, conn);
-            MySqlDataAdapter lDa = new MySqlDataAdapter(landSelectCmd);
-            MySqlCommand landAccessListSelectCmd = new MySqlCommand(m_landAccessListSelect, conn);
-            MySqlDataAdapter lalDa = new MySqlDataAdapter(landAccessListSelectCmd);
-
-            DataSet tmpDS = new DataSet();
-            try
-            {
-                pDa.Fill(tmpDS, "prims");
-                sDa.Fill(tmpDS, "primshapes");
-
-                iDa.Fill(tmpDS, "primitems");
-
-                tDa.Fill(tmpDS, "terrain");
-                lDa.Fill(tmpDS, "land");
-                lalDa.Fill(tmpDS, "landaccesslist");
-            }
-            catch (MySqlException)
-            {
-                m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating");
-                return false;
-            }
-
-            // we have tables, but not a migration model yet
-            if (m.Version == 0)
-                m.Version = 1;
-
-            return true;
-
-            // pDa.Fill(tmpDS, "prims");
-            // sDa.Fill(tmpDS, "primshapes");
-
-            //     iDa.Fill(tmpDS, "primitems");
-
-            // tDa.Fill(tmpDS, "terrain");
-            // lDa.Fill(tmpDS, "land");
-            // lalDa.Fill(tmpDS, "landaccesslist");
-
-            // foreach (DataColumn col in createPrimTable().Columns)
-            // {
-            //     if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName))
-            //     {
-            //         m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
-            //         return false;
-            //     }
-            // }
-
-            // foreach (DataColumn col in createShapeTable().Columns)
-            // {
-            //     if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName))
-            //     {
-            //         m_log.Info("[REGION DB]: Missing required column:" + col.ColumnName);
-            //         return false;
-            //     }
-            // }
-
-            // // XXX primitems should probably go here eventually
-
-            // foreach (DataColumn col in createTerrainTable().Columns)
-            // {
-            //     if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName))
-            //     {
-            //         m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
-            //         return false;
-            //     }
-            // }
-
-            // foreach (DataColumn col in createLandTable().Columns)
-            // {
-            //     if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName))
-            //     {
-            //         m_log.Info("[REGION DB]: Missing require column:" + col.ColumnName);
-            //         return false;
-            //     }
-            // }
-
-            // foreach (DataColumn col in createLandAccessListTable().Columns)
-            // {
-            //     if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName))
-            //     {
-            //         m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName);
-            //         return false;
-            //     }
-            // }
-
-            // return true;
-        }
-
         /***********************************************************************
          *
          *  Type conversion functions
@@ -2419,37 +2152,5 @@
             }
         }

-        /// <summary>
-        /// </summary>
-        /// <param name="type"></param>
-        /// <returns></returns>
-        /// <remarks>this is something we'll need to implement for each db slightly differently.</remarks>
-        // private static string MySqlType(Type type)
-        // {
-        //     if (type == typeof (String))
-        //     {
-        //         return "varchar(255)";
-        //     }
-        //     else if (type == typeof (Int32))
-        //     {
-        //         return "integer";
-        //     }
-        //     else if (type == typeof (Int64))
-        //     {
-        //         return "bigint";
-        //     }
-        //     else if (type == typeof (Double))
-        //     {
-        //         return "float";
-        //     }
-        //     else if (type == typeof (Byte[]))
-        //     {
-        //         return "longblob";
-        //     }
-        //     else
-        //     {
-        //         return "string";
-        //     }
-        // }
     }
 }


* Correct build break, no idea how that one managed to slip by me

--- OpenSim/Data/SQLite/SQLiteUserData.cs
+++ OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -545,7 +545,7 @@
                 }
                 else
                 {
-                    m_log.Warn("[USER DB]: Ignoring add since user with id {0} already exists", user.ID);
+                    m_log.WarnFormat("[USER DB]: Ignoring add since user with id {0} already exists", user.ID);
                 }
             }
         }


paste note to playpos

paste note to playpos

--- OpenUtau/ViewModels/NotesViewModel.cs
+++ OpenUtau/ViewModels/NotesViewModel.cs
@@ -489,20 +489,23 @@

         public void PasteNotes() {
             if (Part != null && DocManager.Inst.NotesClipboard != null && DocManager.Inst.NotesClipboard.Count > 0) {
-                TickToLineTick((int)TickOffset, out int left, out int right);
+                TickToLineTick(DocManager.Inst.playPosTick, out int left, out int right);
                 int minPosition = DocManager.Inst.NotesClipboard.Select(note => note.position).Min();
-                int offset = right - minPosition;
-                var notes = DocManager.Inst.NotesClipboard.Select(note => note.Clone()).ToList();
-                notes.ForEach(note => note.position += offset);
-                DocManager.Inst.StartUndoGroup();
-                DocManager.Inst.ExecuteCmd(new AddNoteCommand(Part, notes));
-                int minDurTick = Part.GetMinDurTick(Project);
-                if (Part.Duration < minDurTick) {
-                    DocManager.Inst.ExecuteCmd(new ResizePartCommand(Project, Part, minDurTick));
-                }
-                DocManager.Inst.EndUndoGroup();
-                Selection.Select(notes);
-                MessageBus.Current.SendMessage(new NotesSelectionEvent(Selection));
+                //If PlayPos is before the beginning of the part, don't paste.
+                if (left > Part.position) {
+                    int offset = left - minPosition - Part.position;
+                    var notes = DocManager.Inst.NotesClipboard.Select(note => note.Clone()).ToList();
+                    notes.ForEach(note => note.position += offset);
+                    DocManager.Inst.StartUndoGroup();
+                    DocManager.Inst.ExecuteCmd(new AddNoteCommand(Part, notes));
+                    int minDurTick = Part.GetMinDurTick(Project);
+                    if (Part.Duration < minDurTick) {
+                        DocManager.Inst.ExecuteCmd(new ResizePartCommand(Project, Part, minDurTick));
+                    }
+                    DocManager.Inst.EndUndoGroup();
+                    Selection.Select(notes);
+                    MessageBus.Current.SendMessage(new NotesSelectionEvent(Selection));
+                }
             }
         }


Removed optional parameters from method

Removed optional parameters from method

--- PART/Source/Core/Utilities/Strings.cs
+++ PART/Source/Core/Utilities/Strings.cs
@@ -107,6 +107,11 @@
             return EnsureEndString(directory, Path.DirectorySeparatorChar.ToString(), shouldHaveSlash);
         }

+        public static string EnsureEndString(string str, string endString, bool shouldHaveSlash)
+        {
+            return EnsureEndString(str, endString, shouldHaveSlash, StringComparison.CurrentCulture);
+        }
+
         /// <summary>
         /// Ensures that a folder's path ends (or does not end) with a backslash
         /// </summary>
@@ -114,7 +119,7 @@
         /// <param name="endString">The character that should/should not be at the end</param>
         /// <param name="shouldHaveSlash">Whether to put or remove a slash</param>
         /// <returns></returns>
-        public static string EnsureEndString(string str, string endString, bool shouldHaveSlash, StringComparison comparison = StringComparison.CurrentCulture)
+        public static string EnsureEndString(string str, string endString, bool shouldHaveSlash, StringComparison comparison)
         {
             bool containsEndChar = str.EndsWith(endString.ToString(), comparison);
             if (shouldHaveSlash && !containsEndChar)
@@ -126,6 +131,11 @@
                 str = str.Substring(0, str.Length - endString.Length);
             }
             return str;
+        }
+
+        public static string EnsureStartString(string str, string startString, bool shouldHaveChar)
+        {
+            return EnsureStartString(str, startString, shouldHaveChar, StringComparison.CurrentCulture);
         }

         /// <summary>
@@ -135,7 +145,7 @@
         /// <param name="startString">The character that should/should not be at the end</param>
         /// <param name="shouldHaveChar">Whether to put or remove a slash</param>
         /// <returns></returns>
-        public static string EnsureStartString(string str, string startString, bool shouldHaveChar, StringComparison comparison = StringComparison.CurrentCulture)
+        public static string EnsureStartString(string str, string startString, bool shouldHaveChar, StringComparison comparison)
         {
             bool containsStartChar = str.StartsWith(startString, comparison);
             if (shouldHaveChar && !containsStartChar)


Fixed spacing

Fixed spacing

--- PInvoke/Shared/WinError/Win32Error.cs
+++ PInvoke/Shared/WinError/Win32Error.cs
@@ -159,6 +159,7 @@
 		/// Returns a hash code for this instance.
 		/// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 		public override int GetHashCode() => unchecked((int)value);
+
 		/// Throws if failed.
 		/// <param name="message">The message.</param>
 		/// <exception cref="Win32Exception"></exception>


spacing

spacing

--- PJenkins.Web/Views/Home/Resume.cshtml
+++ PJenkins.Web/Views/Home/Resume.cshtml
@@ -153,7 +153,7 @@

ASP.NET MVC 5

C# 5.0

JavaScript

-
HTML5, CSS3

+
HTML 5, CSS 3

Twitter Bootstrap


SP-1816 Crash archiving IMDI (#732)

SP-1816 Crash archiving IMDI (#732)

check for empty path before combining.
(Approved May 18 & 23 on a different pull request but never merged)

--- SIL.Archiving/IMDI/IMDIArchivingDlgViewModel.cs
+++ SIL.Archiving/IMDI/IMDIArchivingDlgViewModel.cs
@@ -616,7 +616,9 @@
 			set
 			{
 				_outputFolder = value;
-				PackagePath = Path.Combine(value, CorpusDirectoryName);
+				PackagePath = !string.IsNullOrEmpty(value)?
+					Path.Combine(value, CorpusDirectoryName):
+					CorpusDirectoryName;
 				if (_imdiData != null)
 					_imdiData.PackagePath = "";
 			}


BUG FIXED: IF THEN ELSE, cosmetic glitch: extra space after THEN and ELSE

--- PRGReaderLibrary/Utilities/Decoder.cs
+++ PRGReaderLibrary/Utilities/Decoder.cs
@@ -209,48 +209,73 @@
                             offset++;
                             result += GetExpression(PCode, ref offset);
                             isFirstToken = false;
+                            //THEN PART BEGINS
                             result += " THEN ";
-
-                            int newOffset = GetThenElseOffset(PCode, ref offset)-1;
-
-                            result += RemoveCRLF(GetThenPart(PCode, ref offset, newOffset));
-                            offset++;
+                            offset++;
+                            int OffsetTHEN = BitConverter.ToInt16(PCode, offset);
+                            if(OffsetTHEN > 2000)
+                            {
+                                throw new Exception("Out of bounds: THEN Offset it's over PRG capacity ");
+                            }
+                            offset += 2;
+
+                            //Look ahead for ELSE token to adjust OffsetTHEN
+                            for(int pos = offset; pos <= OffsetTHEN; pos++)
+                            {
+                                if (PCode[pos] == (byte)LINE_TOKEN.ELSE)
+                                {
+                                    OffsetTHEN = pos;
+                                }
+                            }
+
+                            result += RemoveCRLF(GetThenPart(PCode, ref offset, OffsetTHEN));
+
+                            if (PCode[offset] == (byte)LINE_TOKEN.EOE) offset++; //Ignore the token.
+
+                            switch (PCode[offset])
+                            {
+                                case (byte)TYPE_TOKEN.NUMBER:
+                                    isFirstToken = true;
+                                    break;
+                                case (byte)LINE_TOKEN.ELSE:
+                                    result += " ELSE ";
+                                    offset+=2; //ELSE and MKR
+                                    int newElseOffset = BitConverter.ToInt16(PCode, offset);
+                                    if (newElseOffset > 2000)
+                                    {
+                                        throw new Exception("Out of bounds: ELSE Offset it's over PRG capacity ");
+                                    }
+                                    offset += 2; //offset +2 bytes
+                                    result += RemoveCRLF(GetElsePart(PCode, ref offset, newElseOffset));
+
+                                    if (PCode[offset] == (byte)LINE_TOKEN.EOE) offset++; //Ignore the token.
+                                    //After ELSE PART only new line allowed.
+                                    isFirstToken = true;
+                                    break;
+                                default:
+                                    break;
+                            }
+
+                            break;
+
+                        //case (byte)LINE_TOKEN.ELSE:
+                        //    //ELSE

-                            if (PCode[offset] == (byte)LINE_TOKEN.EOE) //optional end marker
-                            {
-                                offset++; //jump this marker
-
-                                if (PCode[offset] == (byte)LINE_TOKEN.ELSE)
-                                    isFirstToken = false;
-                                else isFirstToken = true;
-                            }
-                            else
-                                if (PCode[offset] == (byte)TYPE_TOKEN.NUMBER) { isFirstToken = true; }
-
-                            break;
-
-                        case (byte)LINE_TOKEN.ELSE:
-                            //ELSE
-
-                            offset += 1;
-                            result += " ELSE ";
-
-                            int newElseOffset = GetThenElseOffset(PCode, ref offset) - 1;
-                            result += GetElsePart(PCode, ref offset, newElseOffset);
-                            offset++;
-
-                            if (PCode[offset] == (byte)LINE_TOKEN.EOE) //optional end marker
-                            {
-                                offset++; //jump this marker
-                            }
-                            else
-                                if (PCode[offset] == (byte)TYPE_TOKEN.NUMBER) { isFirstToken = true;
-                                offset++;
-                            }
-                            isFirstToken = true;
-
-                            break;
+                        //    result += " ELSE ";
+                        //    offset++;
+
+                        //    if (PCode[offset] == (byte)LINE_TOKEN.EOE) //optional end marker
+                        //    {
+                        //        offset++; //jump this marker
+                        //    }
+                        //    else
+                        //        if (PCode[offset] == (byte)TYPE_TOKEN.NUMBER) { isFirstToken = true;
+
+                        //    }
+                        //    isFirstToken = true;
+
+                        //    break;
                         #endregion

@@ -345,7 +370,9 @@

             try
             {
-                result += DecodeBytes(pCode, offset, newElseOffset);
+                //el nuevo offset ya apunta a la siguiente instrucción después de la parte ELSE
+                //Para garantizar que solo se decodifica ELSE PART, se resta 1
+                result += DecodeBytes(pCode, offset, newElseOffset - 1);
                 //set new referenced offset
                 offset = newElseOffset;
             }
@@ -371,7 +398,9 @@

             try
             {
-                result += DecodeBytes(pCode, offset, newOffset);
+                //el nuevo offset ya apunta a la siguiente instrucción después de la parte THEN
+                //Para garantizar que solo se decodifica THEN PART, se resta 1
+                result += DecodeBytes(pCode, offset, newOffset - 1);
                 //set new referenced offset.
                 offset = newOffset;
             }


fix Chart validation

fix Chart validation

--- Signum.Entities.Extensions/Chart/ChartColumn.cs
+++ Signum.Entities.Extensions/Chart/ChartColumn.cs
@@ -146,8 +146,11 @@

         protected override string PropertyValidation(PropertyInfo pi)
         {
-            if (pi.Is(() => Token))
-            {
+            if (pi.Is(() => TokenString))
+            {
+                if (TokenString != null && Token == null)
+                    return null;
+
                 if (Token == null)
                     return !scriptColumn.IsOptional ? "{0} is not optional".Formato(scriptColumn.DisplayName) : null;


GameInfo.cs: Introduce RemainTalk/WhisperMap.

--- AIWolfLib/GameInfo.cs
+++ AIWolfLib/GameInfo.cs
@@ -270,6 +270,40 @@
         /// </remarks>
         [DataMember(Name = "roleMap")]
         Dictionary<int, string> _RoleMap { get; }
+
+#if JHELP
+        /// <summary>
+        /// トークの残り回数
+        /// </summary>
+#else
+        /// <summary>
+        /// The number of opportunities to talk remaining.
+        /// </summary>
+#endif
+        public Dictionary<Agent, int> RemainTalkMap { get; }
+
+        /// <summary>
+        /// The number of opportunities to talk remaining.
+        /// </summary>
+        [DataMember(Name = "remainTalkMap")]
+        Dictionary<int, int> _RemainTalkMap { get; }
+
+#if JHELP
+        /// <summary>
+        /// 囁きの残り回数
+        /// </summary>
+#else
+        /// <summary>
+        /// The number of opportunities to whisper remaining.
+        /// </summary>
+#endif
+        public Dictionary<Agent, int> RemainWhisperMap { get; }
+
+        /// <summary>
+        /// The number of opportunities to whisper remaining.
+        /// </summary>
+        [DataMember(Name = "remainWhisperMap")]
+        Dictionary<int, int> _RemainWhisperMap { get; }

 #if JHELP
         /// <summary>
@@ -324,10 +358,13 @@
         /// <param name="lastDeadAgentList">The list of agents who died last night.</param>
         /// <param name="statusMap">The map between agent and its status.</param>
         /// <param name="roleMap">The map between agent and its role.</param>
+        /// <param name="remainTalkMap">The map between agent and its number of remaining talks.</param>
+        /// <param name="remainWhisperMap">The map between agent and its number of remaining whispers.</param>
         [JsonConstructor]
         GameInfo(int day, int agent, Judge mediumResult, Judge divineResult, int executedAgent, int attackedAgent, int guardedAgent,
             List<Vote> voteList, List<Vote> attackVoteList, List<Talk> talkList, List<Whisper> whisperList, List<int> lastDeadAgentList,
-            Dictionary<int, string> statusMap, Dictionary<int, string> roleMap)
+            Dictionary<int, string> statusMap, Dictionary<int, string> roleMap,
+            Dictionary<int, int> remainTalkMap, Dictionary<int, int> remainWhisperMap)
         {
             Day = day;
             if (Day < 0)
@@ -408,6 +445,26 @@
                 }
             }
             _RoleMap = RoleMap.Where(m => m.Value != Role.UNC).ToDictionary(m => m.Key.AgentIdx, m => m.Value.ToString());
+
+            RemainTalkMap = new Dictionary<Agent, int>();
+            if (remainTalkMap != null)
+            {
+                foreach (var p in remainTalkMap)
+                {
+                    RemainTalkMap[Agent.GetAgent(p.Key)] = p.Value;
+                }
+            }
+            _RemainTalkMap = RemainTalkMap.ToDictionary(p => p.Key.AgentIdx, p => p.Value);
+
+            RemainWhisperMap = new Dictionary<Agent, int>();
+            if (remainWhisperMap != null)
+            {
+                foreach (var p in remainWhisperMap)
+                {
+                    RemainWhisperMap[Agent.GetAgent(p.Key)] = p.Value;
+                }
+            }
+            _RemainWhisperMap = RemainWhisperMap.ToDictionary(p => p.Key.AgentIdx, p => p.Value);
         }
     }
 }


Extend events args

Extend events args

--- SimpleHttpServerExtensions/AsyncStreamCopier.cs
+++ SimpleHttpServerExtensions/AsyncStreamCopier.cs
@@ -21,6 +21,20 @@

 namespace SimpleHttpServer
 {
+    public class AsynStreamCopyCompleteEventArgs : EventArgs
+    {
+        readonly Stream inputStream;
+        readonly Stream outputStream;
+
+        public Stream InputStream { get { return inputStream; } }
+        public Stream OutputStream { get { return outputStream; } }
+
+        public AsynStreamCopyCompleteEventArgs(Stream input, Stream output)
+        {
+            inputStream = input;
+            outputStream = output;
+        }
+    }
     /// <summary>
     /// Copies data from one stream into another using the async pattern. Copies are done in 4k blocks.
     /// </summary>
@@ -34,7 +48,7 @@
         /// <summary>
         /// Raised when all data is copied
         /// </summary>
-        public event EventHandler Completed;
+        public event EventHandler<AsynStreamCopyCompleteEventArgs> Completed;

         public AsyncStreamCopier(Stream input, Stream output)
         {
@@ -76,7 +90,7 @@
             var handler = Completed;

             if (handler != null)
-                handler(this, EventArgs.Empty);
+                handler(this,new AsynStreamCopyCompleteEventArgs(_input, _output));
         }
     }
 }


put x-ms-routing-name in cookie when calling auth provider

--- SimpleWAWS/Authentication/GoogleAuthProvider.cs
+++ SimpleWAWS/Authentication/GoogleAuthProvider.cs
@@ -19,7 +19,8 @@
             builder.Append("?response_type=id_token");
             var slot = String.Empty;
             if (context.Request.QueryString["x-ms-routing-name"] != null)
-                slot = $"?x-ms-routing-name={context.Request.QueryString["x-ms-routing-name"]}";
+               // slot = $"?x-ms-routing-name={context.Request.QueryString["x-ms-routing-name"]}";
+               context.Response.Cookies.Add(new HttpCookie("x-ms-routing-name", context.Request.QueryString["x-ms-routing-name"]));

             builder.AppendFormat("&redirect_uri={0}", WebUtility.UrlEncode(string.Format(CultureInfo.InvariantCulture, "https://{0}/Login{1}", context.Request.Headers["HOST"], slot)));
             builder.AppendFormat("&client_id={0}", AuthSettings.GoogleAppId);


Added new properties

Added new properties

--- SlackHistoryViewer.Configuration/AppSettings.cs
+++ SlackHistoryViewer.Configuration/AppSettings.cs
@@ -1,4 +1,4 @@
-namespace SlackHistoryViewer.RestoreFromLocal.Configuration
+namespace SlackHistoryViewer.Configuration

 {
     public class AppSettings
@@ -7,7 +7,15 @@

         public string ChannelsFile { get; set; }

+        public string IntegrationLogsFile { get; set; }
+
         public string SlackBotId { get; set; }
+
+        public string SlackBotName { get; set; }
+
+        public string UnknownBotId { get; set; }
+
+        public string UnknownBotName { get; set; }

         public string ConnectionString { get; set; }


[AI] Huge improvement in smart player by taking advantage of knowing played cards. Player now plays smallest non-trump card from opponents shortest suit =========================================================================== ....................................................................................................00:00:40.5883137 Total games: 61,370 - 38,630 Rounds played: 1,235,927 Total round points: 946,250 - 794,568 =========================================================================== Closed games: 3041 Running SmartAndDummyPlayerChangingTrumpSimulator... ....................................................................................................00:00:17.2791239 Total games: 99,991 - 09 Rounds played: 697,689 Total round points: 1,155,195 - 113,342 =========================================================================== Running SmartAndDummyPlayersSimulator... ....................................................................................................00:00:17.1599363 Total games: 99,997 - 03 Rounds played: 686,932 Total round points: 1,154,961 - 99,620

--- Source/AI/Santase.AI.SmartPlayer/SmartPlayer.cs
+++ Source/AI/Santase.AI.SmartPlayer/SmartPlayer.cs
@@ -50,7 +50,7 @@
             this.playedCards.Add(context.SecondPlayedCard);
         }

-        // TODO: Close the game?
+        // TODO: Improve close game decision
         private bool CloseGame(PlayerTurnContext context)
         {
             var shouldCloseGame = this.PlayerActionValidator.IsValid(PlayerAction.CloseGame(), context, this.Cards)
@@ -63,7 +63,7 @@
             return shouldCloseGame;
         }

-        // TODO: Choose appropriate card
+        // TODO: Improve choosing best card to play
         private PlayerAction ChooseCard(PlayerTurnContext context)
         {
             var possibleCardsToPlay = this.PlayerActionValidator.GetPossibleCardsToPlay(context, this.Cards);
@@ -80,12 +80,14 @@
             PlayerTurnContext context,
             ICollection<Card> possibleCardsToPlay)
         {
+            // Announce 40 or 20 if possible
             var action = this.TryToAnnounce20Or40(context, possibleCardsToPlay);
             if (action != null)
             {
                 return action;
             }

+            // If the player is close to the win => play trump card which will surely win the trick
             var opponentBiggestTrumpCard =
                 this.opponentSuitCardsProvider.GetOpponentCards(
                     this.Cards,
@@ -109,17 +111,25 @@
                 }
             }

-            // Smallest non-trump card
+            // Smallest non-trump card from the shortest opponent suit
             var cardToPlay =
                 possibleCardsToPlay.Where(x => x.Suit != context.TrumpCard.Suit)
-                    .OrderBy(x => x.GetValue())
+                    .OrderBy(
+                        x =>
+                        this.opponentSuitCardsProvider.GetOpponentCards(
+                            this.Cards,
+                            this.playedCards,
+                            context.TrumpCard,
+                            x.Suit).Count)
+                    .ThenBy(x => x.GetValue())
                     .FirstOrDefault();
             if (cardToPlay != null)
             {
                 return this.PlayCard(cardToPlay);
             }

-            cardToPlay = possibleCardsToPlay.OrderByDescending(x => x.GetValue()).FirstOrDefault();
+            // Should never happen
+            cardToPlay = possibleCardsToPlay.OrderBy(x => x.GetValue()).FirstOrDefault();
             return this.PlayCard(cardToPlay);
         }

@@ -156,7 +166,7 @@
                 }
             }

-            // Announce 20 or 40 if possible
+            // Announce 40 or 20 if possible
             var action = this.TryToAnnounce20Or40(context, possibleCardsToPlay);
             if (action != null)
             {


Replaced aggregate function with a simple string.join (more efficient).

--- Source/GSoft.Dynamite/WebParts/WebPartHelper.cs
+++ Source/GSoft.Dynamite/WebParts/WebPartHelper.cs
@@ -236,7 +236,7 @@

             if (extraCssClasses != null)
             {
-                cssClasses = extraCssClasses.Aggregate(cssClasses, (current, cssClass) => current + (" " + cssClass));
+                cssClasses += string.Join(" ", extraCssClasses);
             }

             var formattedContent = string.Format(


(maint) Correcting inspectcode issue

(maint) Correcting inspectcode issue

--- Source/GitReleaseManager/ReleaseNotesBuilder.cs
+++ Source/GitReleaseManager/ReleaseNotesBuilder.cs
@@ -107,7 +107,7 @@
             if (count != 1)
             {
                 var allIssueLabels = this.configuration.IssueLabelsInclude.Union(this.configuration.IssueLabelsExclude).ToList();
-                var allIssuesExceptLast = allIssueLabels.Take(allIssueLabels.Count() - 1);
+                var allIssuesExceptLast = allIssueLabels.Take(allIssueLabels.Count - 1);
                 var lastLabel = allIssueLabels.Last();

                 var allIssuesExceptLastString = string.Join(", ", allIssuesExceptLast);


Delete Pharmacy_Information.aspx.designer.cs

--- Pharmacy_Information.aspx.designer.cs
+++ Pharmacy_Information.aspx.designer.cs
@@ -1,15 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace RepApp {
-
-
-    public partial class Prescription_History {
-    }
-}