Tiny improvements stacked label sample

Tiny improvements stacked label sample

--- Tests/Mapsui.Tests.Common/Maps/StackedLabelsSample.cs
+++ Tests/Mapsui.Tests.Common/Maps/StackedLabelsSample.cs
@@ -10,6 +10,8 @@
 {
     public static class StackedLabelsSample
     {
+        private const string LabelColumn = "Label";
+
         public static Map CreateMap()
         {
             var map = new Map
@@ -28,8 +30,8 @@
             {
                 DataSource = provider,
                 UseLabelStacking = true,
-                LabelColumn = "Label",
-                Style = new LabelStyle { LabelColumn = "Label"},
+                LabelColumn = LabelColumn,
+                Style = new LabelStyle {LabelColumn = LabelColumn}
             };
         }

@@ -38,11 +40,11 @@
             return new MemoryLayer
             {
                 DataSource = dataSource,
-                Style = new SymbolStyle { SymbolScale = 1, Fill = new Brush(Color.Blue) }
+                Style = new SymbolStyle {SymbolScale = 1, Fill = new Brush(new Color {A = 128, R = 8, G = 20, B = 192})}
             };
         }

-        public static MemoryProvider CreateRandomPointsProvider(IEnumerable<IGeometry> randomPoints)
+        private static MemoryProvider CreateRandomPointsProvider(IEnumerable<IGeometry> randomPoints)
         {
             var features = new Features();
             var count = 0;
@@ -51,7 +53,7 @@
                 var feature = new Feature
                 {
                     Geometry = point,
-                    ["Label"] = count.ToString(CultureInfo.InvariantCulture)
+                    [LabelColumn] = count.ToString(CultureInfo.InvariantCulture)
                 };
                 features.Add(feature);
                 count++;
@@ -59,11 +61,11 @@
             return new MemoryProvider(features);
         }

-        public static IEnumerable<IGeometry> GenerateRandomPoints(BoundingBox box, int count = 25)
+        private static IEnumerable<IGeometry> GenerateRandomPoints(BoundingBox box, int count = 25)
         {
             var result = new List<IGeometry>();
             var random = new Random(0);
-
+
             for (var i = 0; i < count; i++)
             {
                 var x = random.NextDouble()*box.Width + box.Left;


changed CreateShortCut method to handle with macros, replaced method Utils.AppendToLog() with Logging.Manager()

--- RelicModManager/InstallerComponents/Installer.cs
+++ RelicModManager/InstallerComponents/Installer.cs
@@ -52,7 +52,7 @@
         private string xvmConfigDir = "";
         private int patchNum = 0;
         private List<string> originalPatchNames;
-        private FileStream fs;
+        // private FileStream fs;
         private string InstalledFilesLogPath = "";
         private object lockerInstaller = new object();

@@ -103,7 +103,7 @@
             if (!Directory.Exists(Path.Combine(TanksLocation, "mods", TanksVersion))) Directory.CreateDirectory(Path.Combine(TanksLocation, "mods", TanksVersion));
             args.InstalProgress = InstallerEventArgs.InstallProgress.UninstallDone;
             InstallWorker.ReportProgress(0);
-            Utils.AppendToLog("Uninstallation process finished");
+            Logging.Manager("Uninstallation process finished");
             MessageBox.Show(Translations.getTranslatedString("uninstallFinished"), Translations.getTranslatedString("information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
         }

@@ -113,34 +113,34 @@
             ResetArgs();
             InstalledFilesLogPath = Path.Combine(TanksLocation, "logs", "installedRelhaxFiles.log");
             //Step 1: do a backup if requested
-            Utils.AppendToLog("Installation BackupMods");
+            Logging.Manager("Installation BackupMods");
             args.InstalProgress = InstallerEventArgs.InstallProgress.BackupMods;
             if (Settings.BackupModFolder)
                 BackupMods();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 2: do a backup of user data
-            Utils.AppendToLog("Installation BackupUserData");
+            Logging.Manager("Installation BackupUserData");
             args.InstalProgress = InstallerEventArgs.InstallProgress.BackupUserData;
             if (Settings.SaveUserData)
                 BackupUserData();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 3: Delete Mods
-            Utils.AppendToLog("Installation UninstallMods");
+            Logging.Manager("Installation UninstallMods");
             args.InstalProgress = InstallerEventArgs.InstallProgress.DeleteMods;
             if (Settings.CleanInstallation)
                 UninstallMods();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Setp 3a: delete log files
-            Utils.AppendToLog("Installation deleteLogs");
+            Logging.Manager("Installation deleteLogs");
             if (Settings.DeleteLogs)
             {
-                Utils.AppendToLog("deleteLogs selected: deleting wot, xvm, and pmod logs");
+                Logging.Manager("deleteLogs selected: deleting wot, xvm, and pmod logs");
                 try
                 {
                     if (File.Exists(Path.Combine(TanksLocation, "python.log")))
@@ -160,31 +160,31 @@
                 }
             }
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 4: Delete user appdata cache
-            Utils.AppendToLog("Installation DeleteWoTCache");
+            Logging.Manager("Installation DeleteWoTCache");
             args.InstalProgress = InstallerEventArgs.InstallProgress.DeleteWoTCache;
             if (Settings.ClearCache)
                 ClearWoTCache();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 5-10: Extracts Mods
-            Utils.AppendToLog("Installation ExtractDatabaseObjects");
+            Logging.Manager("Installation ExtractDatabaseObjects");
             args.InstalProgress = InstallerEventArgs.InstallProgress.ExtractGlobalDependencies;
             ExtractDatabaseObjects();
             ResetArgs();
             //Step 11: Restore User Data
-            Utils.AppendToLog("Installation RestoreUserData");
+            Logging.Manager("Installation RestoreUserData");
             args.InstalProgress = InstallerEventArgs.InstallProgress.RestoreUserData;
             if (Settings.SaveUserData)
                 RestoreUserData();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 12: unpack original game xml file
-            Utils.AppendToLog("Installation UnpackXmlFiles");
+            Logging.Manager("Installation UnpackXmlFiles");
             args.InstalProgress = InstallerEventArgs.InstallProgress.UnpackXmlFiles;
             if (Directory.Exists(Path.Combine(TanksLocation, "_xmlUnPack")))
             {
@@ -192,36 +192,36 @@
                 Directory.Delete(Path.Combine(TanksLocation, "_xmlUnPack"), true);
             }
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 13: Patch Mods
-            Utils.AppendToLog("Installation PatchMods");
+            Logging.Manager("Installation PatchMods");
             args.InstalProgress = InstallerEventArgs.InstallProgress.PatchMods;
             if (Directory.Exists(Path.Combine(TanksLocation, "_patch")))
                 PatchFiles();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 14: InstallFonts
             // => only Step 17 for both now
             //Step 15: Extract User Mods
-            Utils.AppendToLog("Installation ExtractUserMods");
+            Logging.Manager("Installation ExtractUserMods");
             args.InstalProgress = InstallerEventArgs.InstallProgress.ExtractUserMods;
             if (UserMods.Count > 0)
                 ExtractUserMods();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 16: Patch Mods if User Mods extracted patch files
-            Utils.AppendToLog("Installation PatchUserMods");
+            Logging.Manager("Installation PatchUserMods");
             args.InstalProgress = InstallerEventArgs.InstallProgress.PatchUserMods;
             if (Directory.Exists(Path.Combine(TanksLocation, "_patch")))
                 PatchFiles();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 17: Extract Atlases
-            Utils.AppendToLog("Installation ExtractAtlases");
+            Logging.Manager("Installation ExtractAtlases");
             args.InstalProgress = InstallerEventArgs.InstallProgress.ExtractAtlases;
             if (Directory.Exists(Path.Combine(TanksLocation, "_atlases")))
             {
@@ -229,43 +229,42 @@
                 Directory.Delete(Path.Combine(TanksLocation, "_atlases"), true);
             }
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 18: Create Atlases
-            Utils.AppendToLog("Installation CreateAtlases");
+            Logging.Manager("Installation CreateAtlases");
             args.InstalProgress = InstallerEventArgs.InstallProgress.CreateAtlases;
             if (atlasesList != null && atlasesList.Count > 0)
                 CreateAtlases();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 19: Install Fonts
-            Utils.AppendToLog("Installation UserFonts");
+            Logging.Manager("Installation UserFonts");
             args.InstalProgress = InstallerEventArgs.InstallProgress.InstallUserFonts;
             if (Directory.Exists(Path.Combine(TanksLocation, "_fonts")))
                 InstallFonts();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 20: create shortCuts
-            Utils.AppendToLog("Installation CreateShortscuts");
+            Logging.Manager("Installation CreateShortscuts");
             args.InstalProgress = InstallerEventArgs.InstallProgress.CreateShortCuts;
             if (Settings.CreateShortcuts)
                 CreateShortCuts();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 21: CheckDatabase and delete outdated or no more needed files
-            Utils.AppendToLog("Installation CheckDatabase");
+            Logging.Manager("Installation CheckDatabase");
             args.InstalProgress = InstallerEventArgs.InstallProgress.CheckDatabase;
             if (!Program.testMode)
                 checkForOldZipFiles();
             else
-                Utils.AppendToLog("... skipped");
+                Logging.Manager("... skipped");
             ResetArgs();
             //Step 22: Cleanup
-            Utils.AppendToLog("Intallation CleanUp");
-            Logging.stubsInstallerFinished();                                       // installation is finished. logfile will be flushed and filestream will be disposed
+            Logging.Manager("Intallation CleanUp");
             args.InstalProgress = InstallerEventArgs.InstallProgress.CleanUp;
             try
             {
@@ -279,6 +278,7 @@
                 Utils.ExceptionLog("ActuallyStartInstallation", "Cleanup _folders", ex);
             }
             InstallWorker.ReportProgress(0);
+            Logging.InstallerFinished();                                      // installation is finished. logfile will be flushed and filestream will be disposed
         }

         public void WorkerReportProgress(object sender, ProgressChangedEventArgs e)
@@ -288,7 +288,7 @@

         public void WorkerReportComplete(object sender, AsyncCompletedEventArgs e)
         {
-            Utils.AppendToLog("Installation Done");
+            Logging.Manager("Installation Done");
             args.InstalProgress = InstallerEventArgs.InstallProgress.Done;
             OnInstallProgressChanged();
         }
@@ -359,13 +359,13 @@
                                         if (File.Exists(@startLoc))
                                         {
                                             File.Move(startLoc, destLoc);
-                                            Utils.AppendToLog(string.Format("BackupUserData: {0} ({1})", Path.Combine(Path.GetDirectoryName(correctedPath), Path.GetFileName(startLoc)), Path.GetFileName(correctedPath)));
+                                            Logging.Manager(string.Format("BackupUserData: {0} ({1})", Path.Combine(Path.GetDirectoryName(correctedPath), Path.GetFileName(startLoc)), Path.GetFileName(correctedPath)));
                                         }
                                     }
                                     catch
                                     {
                                         if (Program.testMode) { MessageBox.Show(string.Format("Error: can not move file.\nstartLoc: \"{0}\"\ndestLoc: \"{1}\"", startLoc, destLoc)); };
-                                        Utils.AppendToLog(string.Format("Error: can not move file. startLoc: \"{0}\" destLoc: \"{1}\"", startLoc, destLoc));
+                                        Logging.Manager(string.Format("Error: can not move file. startLoc: \"{0}\" destLoc: \"{1}\"", startLoc, destLoc));
                                     }
                                 }
                             }
@@ -494,7 +494,7 @@
                 InstallWorker.ReportProgress(0);
                 args.ChildProcessed = 0;
                 args.ChildTotalToProcess = lines.Count();
-                Utils.AppendToLog(string.Format("Elements to delete (from logfile): {0}", lines.Count()));
+                Logging.Manager(string.Format("Elements to delete (from logfile): {0}", lines.Count()));
                 try
                 {
                     string logFile = Path.Combine(TanksLocation, "logs", "uninstallRelhaxFiles.log");
@@ -524,7 +524,7 @@
                     // reverse the parsed list, to delete files and folders from the lowest to the highest folder level
                     lines.Reverse();
                     InstallWorker.ReportProgress(0);
-                    Utils.AppendToLog(string.Format("Elements to delete (from parsing): {0}", lines.Count()));
+                    Logging.Manager(string.Format("Elements to delete (from parsing): {0}", lines.Count()));
                     if (lines.Count()> 0)
                     {
                         args.ChildProcessed = 0;
@@ -596,11 +596,11 @@
                 {
                     if (AppDataFolder == null) AppDataFolder = "(null)";
                     if (AppDataFolder.Equals("")) AppDataFolder = "(empty string)";
-                    Utils.AppendToLog("ERROR: AppDataFolder not correct, value: " + AppDataFolder);
-                    Utils.AppendToLog("Aborting ClearWoTCache()");
+                    Logging.Manager("ERROR: AppDataFolder not correct, value: " + AppDataFolder);
+                    Logging.Manager("Aborting ClearWoTCache()");
                     return;
                 }
-                Utils.AppendToLog("Started clearing of WoT cache files");
+                Logging.Manager("Started clearing of WoT cache files");

                 string[] fileFolderNames = { "preferences.xml", "preferences_ct.xml", "modsettings.dat", "xvm", "pmod" };
                 string AppPathTempFolder = Path.Combine(AppPath, "RelHaxTemp", "AppDataBackup");
@@ -659,7 +659,7 @@
                 {
                     Utils.ExceptionLog("ClearWoTCache, step 3", ex);
                 }
-                Utils.AppendToLog("Finished clearing of WoT cache files");
+                Logging.Manager("Finished clearing of WoT cache files");
             }
             catch (Exception ex)
             {
@@ -681,6 +681,8 @@
                 if (!Directory.Exists(Path.Combine(TanksLocation, "logs"))) Directory.CreateDirectory(Path.Combine(TanksLocation, "logs"));

                 //start the entry for the database version in installedRelhaxFiles.log
+                // moved to Logging class
+                /*
                 try
                 {
                     //if a current log and backup log exist
@@ -700,16 +702,16 @@
                 catch (Exception ex)
                 {
                     Utils.ExceptionLog("ExtractDatabaseObjects", "move installedRelhaxFiles.log", ex);
-                }
+                }*/
                 //start the entry for the files log
-                fs = new FileStream(InstalledFilesLogPath, FileMode.Append, FileAccess.Write);
-                string databaseHeader = string.Format("Database Version: {0}\n", Settings.DatabaseVersion);
-                string dateTimeHeader = string.Format("/*  Date: {0:yyyy-MM-dd HH:mm:ss}  */\n", DateTime.Now);
-                fs.Write(Encoding.UTF8.GetBytes(databaseHeader), 0, Encoding.UTF8.GetByteCount(databaseHeader));
-                fs.Write(Encoding.UTF8.GetBytes(dateTimeHeader), 0, Encoding.UTF8.GetByteCount(dateTimeHeader));
+                // fs = new FileStream(InstalledFilesLogPath, FileMode.Append, FileAccess.Write);
+                // string databaseHeader = string.Format("Database Version: {0}\n", Settings.DatabaseVersion);
+                // string dateTimeHeader = string.Format("/*  Date: {0:yyyy-MM-dd HH:mm:ss}  */\n", DateTime.Now);
+                // fs.Write(Encoding.UTF8.GetBytes(databaseHeader), 0, Encoding.UTF8.GetByteCount(databaseHeader));
+                // fs.Write(Encoding.UTF8.GetBytes(dateTimeHeader), 0, Encoding.UTF8.GetByteCount(dateTimeHeader));

                 //extract RelHax Mods
-                Utils.AppendToLog("Starting Relhax Modpack Extraction");
+                Logging.Manager("Starting Relhax Modpack Extraction");
                 string downloadedFilesDir = Path.Combine(Application.StartupPath, "RelHaxDownloads");
                 //calculate the total number of zip files to install
                 foreach (Dependency d in GlobalDependencies)
@@ -738,7 +740,7 @@
                 {
                     if (!d.ZipFile.Equals(""))
                     {
-                        Utils.AppendToLog("Extracting Global Dependency " + d.ZipFile);
+                        Logging.Manager("Extracting Global Dependency " + d.ZipFile);
                         try
                         {
                             if(Settings.InstantExtraction)
@@ -771,7 +773,7 @@
                 {
                     if (!d.ZipFile.Equals(""))
                     {
-                        Utils.AppendToLog("Extracting Dependency " + d.ZipFile);
+                        Logging.Manager("Extracting Dependency " + d.ZipFile);
                         try
                         {
                             if (Settings.InstantExtraction)
@@ -804,7 +806,7 @@
                 {
                     if (!d.ZipFile.Equals(""))
                     {
-                        Utils.AppendToLog("Extracting Logical Dependency " + d.ZipFile);
+                        Logging.Manager("Extracting Logical Dependency " + d.ZipFile);
                         try
                         {
                             if (Settings.InstantExtraction)
@@ -839,7 +841,7 @@
                 {
                     if (!dbo.ZipFile.Equals(""))
                     {
-                        Utils.AppendToLog("Extracting Mod/Config " + dbo.ZipFile);
+                        Logging.Manager("Extracting Mod/Config " + dbo.ZipFile);
                         try
                         {
                             if (Settings.InstantExtraction)
@@ -872,7 +874,7 @@
                 {
                     if (!d.ZipFile.Equals(""))
                     {
-                        Utils.AppendToLog("Extracting Appended Dependency " + d.ZipFile);
+                        Logging.Manager("Extracting Appended Dependency " + d.ZipFile);
                         try
                         {
                             if (Settings.InstantExtraction)
@@ -905,7 +907,7 @@
                 string folderToMove = Path.Combine(TanksLocation, "WoTAppData");
                 if (Directory.Exists(folderToMove))
                 {
-                    Utils.AppendToLog("WoTAppData folder detected, moving files to WoT cache folder");
+                    Logging.Manager("WoTAppData folder detected, moving files to WoT cache folder");
                     //get each file and folder and move them
                     // Get the subdirectories for the specified directory
                     DirectoryInfo dir = new DirectoryInfo(folderToMove);
@@ -937,7 +939,7 @@
                     if (Directory.Exists(folderToMove))
                         Directory.Delete(folderToMove);
                 }
-                Utils.AppendToLog("Finished Relhax Modpack Extraction");
+                Logging.Manager("Finished Relhax Modpack Extraction");
             }
             catch (Exception ex)
             {
@@ -980,7 +982,7 @@
                                         if (File.Exists(Path.Combine(TanksLocation, targetDir, targetFilename)))
                                             File.Delete(Path.Combine(TanksLocation, targetDir, targetFilename));
                                         File.Move(Path.Combine(Application.StartupPath, "RelHaxTemp", Path.GetFileName(ss)), Path.Combine(TanksLocation, targetDir, targetFilename));
-                                        Utils.AppendToLog(string.Format("RestoredUserData: {0}", Path.Combine(targetDir, targetFilename)));
+                                        Logging.Manager(string.Format("RestoredUserData: {0}", Path.Combine(targetDir, targetFilename)));
                                     }
                                     catch (Exception p)
                                     {
@@ -1040,8 +1042,8 @@
                 }
                 if (xmlUnpackList.Count > 0)
                 {
-                    Utils.AppendToInstallLog(@"/*  unpacked XML files  */");
-                    Logging.stubsInstallerGroup("unpacked XML files");            // write comment line
+                    // Utils.AppendToInstallLog(@"/*  unpacked XML files  */");
+                    Logging.InstallerGroup("unpacked XML files");            // write comment line
                 }
                 foreach (XmlUnpack r in xmlUnpackList)
                 {
@@ -1055,8 +1057,8 @@
                             {
                                 // if value of pkg is empty, it is not contained in an archive
                                 File.Copy(Path.Combine(r.directoryInArchive, r.fileName), Path.Combine(r.extractDirectory, fn), false);     // no overwrite of an exsisting file !!
-                                Utils.AppendToInstallLog(Path.Combine(r.extractDirectory, fn));
-                                Logging.stubsInstallerGroup(Path.Combine(r.extractDirectory, fn));            // write created file with path
+                                // Utils.AppendToInstallLog(Path.Combine(r.extractDirectory, fn));
+                                Logging.InstallerGroup(Path.Combine(r.extractDirectory, fn));            // write created file with path
                             }
                             catch (Exception ex)
                             {
@@ -1158,7 +1160,7 @@
                     args.currentFile = p.file;
                     InstallWorker.ReportProgress(0);
                     //if nativeProcessingFile is not empty, it is the first entry of a new nativ xml processing file. Add a comment at the loglist, to be able to traceback the native Processing File
-                    if (p.nativeProcessingFile != "") { Utils.AppendToLog(string.Format("nativeProcessingFile: {0}, originalName: {1}", p.nativeProcessingFile, p.actualPatchName)); }
+                    if (p.nativeProcessingFile != "") { Logging.Manager(string.Format("nativeProcessingFile: {0}, originalName: {1}", p.nativeProcessingFile, p.actualPatchName)); }
                     string patchFileOutput = p.file;
                     int maxLength = 200;
                     if (p.file.Length > maxLength)
@@ -1176,13 +1178,13 @@
                         if (p.lines == null)
                         {
                             //perform regex patch on entire file, line by line
-                            Utils.AppendToLog("Regex patch, all lines, line by line, " + p.file + ", " + p.search + ", " + p.replace);
+                            Logging.Manager("Regex patch, all lines, line by line, " + p.file + ", " + p.search + ", " + p.replace);
                             PatchUtils.RegxPatch(p.file, p.search, p.replace, TanksLocation, TanksVersion);
                         }
                         else if (p.lines.Count() == 1 && tempp == -1)
                         {
                             //perform regex patch on entire file, as one whole string
-                            Utils.AppendToLog("Regex patch, all lines, whole file, " + p.file + ", " + p.search + ", " + p.replace);
+                            Logging.Manager("Regex patch, all lines, whole file, " + p.file + ", " + p.search + ", " + p.replace);
                             PatchUtils.RegxPatch(p.file, p.search, p.replace, TanksLocation, TanksVersion, -1);
                         }
                         else
@@ -1191,7 +1193,7 @@
                             {
                                 //perform regex patch on specific file lines
                                 //will need to be a standard for loop BTW
-                                Utils.AppendToLog("Regex patch, line " + s + ", " + p.file + ", " + p.search + ", " + p.replace);
+                                Logging.Manager("Regex patch, line " + s + ", " + p.file + ", " + p.search + ", " + p.replace);
                                 PatchUtils.RegxPatch(p.file, p.search, p.replace, TanksLocation, TanksVersion, int.Parse(s));
                             }
                         }
@@ -1199,25 +1201,25 @@
                     else if (p.type.Equals("xml"))
                     {
                         //perform xml patch
-                        Utils.AppendToLog("Xml patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
+                        Logging.Manager("Xml patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
                         PatchUtils.XMLPatch(p.file, p.path, p.mode, p.search, p.replace, TanksLocation, TanksVersion);
                     }
                     else if (p.type.Equals("json"))
                     {
                         //perform json patch
-                        Utils.AppendToLog("Json patch, " + p.file + ", " + p.path + ", " + p.replace);
+                        Logging.Manager("Json patch, " + p.file + ", " + p.path + ", " + p.replace);
                         PatchUtils.JSONPatch(p.file, p.path, p.search, p.replace, p.mode, TanksLocation, TanksVersion);
                     }
                     else if (p.type.Equals("xvm"))
                     {
                         //perform xvm style json patch
-                        Utils.AppendToLog("XVM patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
+                        Logging.Manager("XVM patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
                         PatchUtils.XVMPatch(p.file, p.path, p.search, p.replace, p.mode, TanksLocation, TanksVersion);
                     }
                     else if (p.type.Equals("pmod"))
                     {
                         //perform pmod/generic style json patch
-                        Utils.AppendToLog("PMOD/Generic patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
+                        Logging.Manager("PMOD/Generic patch, " + p.file + ", " + p.path + ", " + p.mode + ", " + p.search + ", " + p.replace);
                         PatchUtils.PMODPatch(p.file, p.path, p.search, p.replace, p.mode, TanksLocation, TanksVersion);
                     }
                     args.ParrentProcessed++;
@@ -1267,8 +1269,8 @@
                     {
                         Installer.args.ParrentProcessed++;
                         if (!Directory.Exists(a.atlasSaveDirectory)) Directory.CreateDirectory(a.atlasSaveDirectory);
-                        Utils.AppendToInstallLog(Path.Combine(a.atlasSaveDirectory));
-                        Logging.stubsInstaller(Path.Combine(a.atlasSaveDirectory));                      // write used folder
+                        // Utils.AppendToInstallLog(Path.Combine(a.atlasSaveDirectory));
+                        Logging.Installer(Utils.ReplaceDirectorySeparatorChar(Utils.AddTrailingBackslashChar(Path.Combine(a.atlasSaveDirectory))));                      // write used folder
                         if (!Directory.Exists(a.workingFolder)) Directory.CreateDirectory(a.workingFolder);

                         if (!a.pkg.Equals(""))
@@ -1351,10 +1353,10 @@
         {
             try
             {
-                Utils.AppendToLog("Checking for fonts to install");
+                Logging.Manager("Checking for fonts to install");
                 if (!Directory.Exists(Path.Combine(TanksLocation, "_fonts")))
                 {
-                    Utils.AppendToLog("No fonts to install");
+                    Logging.Manager("No fonts to install");
                     //no fonts to install, done display
                     return;
                 }
@@ -1362,7 +1364,7 @@
                 if (fonts.Count() == 0)
                 {
                     //done display
-                    Utils.AppendToLog("No fonts to install");
+                    Logging.Manager("No fonts to install");
                     return;
                 }
                 //load fonts and move names to a list
@@ -1398,11 +1400,11 @@
                     //re-check the fonts to install list
                     if (fontsList.Count == 0)
                     {
-                        Utils.AppendToLog("No fonts to install");
+                        Logging.Manager("No fonts to install");
                         //done display
                         return;
                     }
-                    Utils.AppendToLog("Installing fonts: " + string.Join(", ", fontsList));
+                    Logging.Manager("Installing fonts: " + string.Join(", ", fontsList));
                     DialogResult dr = DialogResult.No;
                     if (Program.autoInstall)
                     {
@@ -1456,21 +1458,21 @@
                             installFontss.StartInfo = info;
                             installFontss.Start();
                             installFontss.WaitForExit();
-                            Utils.AppendToLog("FontReg.exe ExitCode: " + installFontss.ExitCode);
+                            Logging.Manager("FontReg.exe ExitCode: " + installFontss.ExitCode);
                         }
                         catch (Exception e)
                         {
                             Utils.ExceptionLog("InstallFonts", "could not start font installer", e);
                             MessageBox.Show(Translations.getTranslatedString("fontsPromptError_1") + TanksLocation + Translations.getTranslatedString("fontsPromptError_2"));
-                            Utils.AppendToLog("Installation done, but fonts install failed");
+                            Logging.Manager("Installation done, but fonts install failed");
                             return;
                         }
-                        Utils.AppendToLog("Fonts Installed Successfully");
+                        Logging.Manager("Fonts Installed Successfully");
                         return;
                     }
                     else
                     {
-                        Utils.AppendToLog("Installation done, but fonts install failed");
+                        Logging.Manager("Installation done, but fonts install failed");
                         return;
                     }
                 }
@@ -1496,29 +1498,30 @@
                 if (xvmConfigDir == null || xvmConfigDir.Equals(""))
                     xvmConfigDir = PatchUtils.GetXVMBootLoc(TanksLocation);
                 //extract user mods
-                Utils.AppendToLog("Starting Relhax Modpack User Mod Extraction");
+                Logging.Manager("Starting Relhax Modpack User Mod Extraction");
                 string downloadedFilesDir = Path.Combine(Application.StartupPath, "RelHaxUserMods");
                 foreach (Mod m in UserMods)
                 {
                     if (m.Enabled && m.Checked)
                     {
-                        Utils.AppendToLog("Exracting " + Path.GetFileName(m.ZipFile));
+                        Logging.Manager("Exracting " + Path.GetFileName(m.ZipFile));
                         this.Unzip(Path.Combine(downloadedFilesDir, Path.GetFileName(m.ZipFile)), TanksLocation);
                         InstallWorker.ReportProgress(0);
                     }
                 }
+                /*
                 //done with the filestream
                 if (fs != null)
                 {
                     fs.Dispose();
                     fs = null;
-                }
+                }*/
             }
             catch (Exception ex)
             {
                 Utils.ExceptionLog("ExtractUserMods", ex);
             }
-            Utils.AppendToLog("Finished Relhax Modpack User Mod Extraction");
+            Logging.Manager("Finished Relhax Modpack User Mod Extraction");
         }

         //Step 18: Create Shortcuts
@@ -1526,16 +1529,16 @@
         {
             try
             {
-                Utils.AppendToInstallLog(@"/*  Desktop shortcuts  */");
-                Logging.stubsInstallerGroup("Desktop shortcuts");                     // write comment line
+                // Utils.AppendToInstallLog(@"/*  Desktop shortcuts  */");
+                Logging.InstallerGroup("Desktop shortcuts");                     // write comment line
                 foreach (Shortcut sc in Shortcuts)
                 {
                     if (sc.Enabled)
                     {
-                        string fileTarget = Path.Combine(TanksLocation, sc.Path);
-                        Utils.AppendToLog(string.Format("creating desktop ShortCut: {0} ({1})", sc.Path, sc.Name));
+                        string fileTarget = Utils.ReplaceDirectorySeparatorChar(Utils.ReplaceMacro(sc.Path));
                         if (File.Exists(fileTarget))
                         {
+                            Logging.Manager(string.Format("creating desktop ShortCut: {0} ({1})", sc.Path, sc.Name));
                             Utils.CreateShortcut(fileTarget, sc.Name, true, true);
                         }
                     }
@@ -1662,7 +1665,7 @@
                         };
                         if (r["directoryInArchive"].Equals("") || r["extractDirectory"].Equals("") || r["fileName"].Equals(""))
                         {
-                            Utils.AppendToLog(string.Format("ERROR. XmlUnPackFile '{0}' has an empty but needed node ('fileName', 'directoryInArchive' and 'extractDirectory' MUST be set\n----- dump of object ------\n{1}\n----- end of dump ------", xup.actualPatchName.ToString(), xup.ToString()));
+                            Logging.Manager(string.Format("ERROR. XmlUnPackFile '{0}' has an empty but needed node ('fileName', 'directoryInArchive' and 'extractDirectory' MUST be set\n----- dump of object ------\n{1}\n----- end of dump ------", xup.actualPatchName.ToString(), xup.ToString()));
                         }
                         else
                         {
@@ -1731,13 +1734,13 @@
                                                         atlases.imageFolderList.Add(Utils.ReplaceMacro(image.Value.ToString().Trim()));
                                                     break;
                                                 default:
-                                                    Utils.AppendToLog(string.Format("unexpected Node found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
+                                                    Logging.Manager(string.Format("unexpected Node found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
                                                     break;
                                             }
                                         }
                                         break;
                                     default:
-                                        Utils.AppendToLog(string.Format("unexpected Item found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
+                                        Logging.Manager(string.Format("unexpected Item found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
                                         break;
                                 }
                             }
@@ -1748,12 +1751,12 @@
                         }
                         if (atlases.imageFolderList.Count == 0)
                         {
-                            Utils.AppendToLog(string.Format("ERROR. Missing imageFolders in File: {0} => file will be skipped", atlases.actualPatchName));
+                            Logging.Manager(string.Format("ERROR. Missing imageFolders in File: {0} => file will be skipped", atlases.actualPatchName));
                             break;
                         }
                         if (atlases.directoryInArchive.Equals("") || atlases.atlasFile.Equals("") || atlases.atlasSaveDirectory.Equals(""))
                         {
-                            Utils.AppendToLog(string.Format("ERROR. xmlAtlases file {0} is not valid and has empty (but important) nodes", atlases.actualPatchName));
+                            Logging.Manager(string.Format("ERROR. xmlAtlases file {0} is not valid and has empty (but important) nodes", atlases.actualPatchName));
                             break;
                         }
                         atlases.workingFolder = Path.Combine(Application.StartupPath, "RelHaxTemp", Path.GetFileNameWithoutExtension(atlases.atlasFile));
@@ -1873,9 +1876,9 @@
                     }
                 }
                 else
-                    Utils.AppendToLog(string.Format("Directory {0} is not existing", r));
-            }
-            Utils.AppendToLog("files collected: " + shortNameList.Count);
+                    Logging.Manager(string.Format("Directory {0} is not existing", r));
+            }
+            Logging.Manager("files collected: " + shortNameList.Count);
             int i = collectiveList.Count - 1;
             while (i > 0)
             {
@@ -1889,13 +1892,13 @@
                 i--;
             }
             // files to be added, after deleting needless base files (last file added is winning):
-            Utils.AppendToLog("files to be added: " + collectiveList.Count);
+            Logging.Manager("files to be added: " + collectiveList.Count);
             return collectiveList;
         }

         private void ExtractAtlases_run(Atlases args)
         {
-            Utils.AppendToLog("extracting Atlas: " + args.atlasFile);
+            Logging.Manager("extracting Atlas: " + args.atlasFile);

             stopWatch.Reset();
             stopWatch.Start();
@@ -1905,7 +1908,7 @@

             if (!File.Exists(ImageFile))
             {
-                Utils.AppendToLog("ERROR. Atlas file not found: " + ImageFile);
+                Logging.Manager("ERROR. Atlas file not found: " + ImageFile);
                 return;
             }

@@ -1914,7 +1917,7 @@

             if (!File.Exists(MapFile))
             {
-                Utils.AppendToLog("ERROR. Map file not found: " + MapFile);
+                Logging.Manager("ERROR. Map file not found: " + MapFile);
                 return;
             }

@@ -1959,7 +1962,7 @@
                                             t.height = int.Parse("0" + item.Value.ToString().Trim());
                                             break;
                                         default:
-                                            Utils.AppendToLog(string.Format("unexpected Item found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
+                                            Logging.Manager(string.Format("unexpected Item found. Name: {0}  Value: {1}", item.Name.ToString(), item.Value));
                                             break;
                                     }
                                 }
@@ -1980,7 +1983,7 @@
                 {
                     Utils.ExceptionLog("ExtractAtlases_run", "foreach root", ex);
                 }
-                Utils.AppendToLog("Parsed Textures: " + textureList.Count);
+                Logging.Manager("Parsed Textures: " + textureList.Count);

                 Installer.args.ChildTotalToProcess = textureList.Count;
                 PixelFormat pixelFormat = atlasImage.PixelFormat;
@@ -2006,7 +2009,7 @@
                         Utils.ExceptionLog("ExtractAtlases_run", "CroppedImage: " + Path.Combine(workingFolder, t.name + ".png"), ex);
                     }
                 }
-                Utils.AppendToLog(string.Format("Extracted Textures: {0} {1}", c, c == textureList.Count ? "(all successfully done)" : "(missed some, why?)"));
+                Logging.Manager(string.Format("Extracted Textures: {0} {1}", c, c == textureList.Count ? "(all successfully done)" : "(missed some, why?)"));
             }
             finally
             {
@@ -2017,7 +2020,7 @@
                 CroppedImage.Dispose();
                 stopWatch.Stop();
             }
-            Utils.AppendToLog("Extraction completed in " + stopWatch.Elapsed.TotalSeconds.ToString("N3", System.Globalization.CultureInfo.InvariantCulture) + " seconds.");
+            Logging.Manager("Extraction completed in " + stopWatch.Elapsed.TotalSeconds.ToString("N3", System.Globalization.CultureInfo.InvariantCulture) + " seconds.");
         }

         //gets the total number of files to process to eithor delete or copy
@@ -2195,9 +2198,9 @@
         //main unzip worker method
         private void Unzip(string zipFile, string extractFolder)
         {
-            string zipFileHeader = string.Format(@"/*  {0}  */\n", Path.GetFileNameWithoutExtension(zipFile));
-            fs.Write(Encoding.UTF8.GetBytes(zipFileHeader), 0, Encoding.UTF8.GetByteCount(zipFileHeader));
-            Logging.stubsInstallerGroup(Path.GetFileNameWithoutExtension(zipFile));         // write a formated comment line
+            // string zipFileHeader = string.Format(@"/*  {0}  */\n", Path.GetFileNameWithoutExtension(zipFile));
+            // fs.Write(Encoding.UTF8.GetBytes(zipFileHeader), 0, Encoding.UTF8.GetByteCount(zipFileHeader));
+            Logging.InstallerGroup(Path.GetFileNameWithoutExtension(zipFile));         // write a formated comment line
             try
             {
                 using (ZipFile zip = new ZipFile(zipFile))
@@ -2226,8 +2229,8 @@
                         //finish entry name modifications
                         zip[i].FileName = zipEntryName;
                         //put the entries on disk
-                        fs.Write(Encoding.UTF8.GetBytes(Path.Combine(extractFolder, zip[i].FileName) + "\n"), 0, Encoding.UTF8.GetByteCount(Path.Combine(extractFolder, zip[i].FileName) + "\n"));
-                        Logging.stubsInstaller(Path.Combine(extractFolder, zip[i].FileName));           // write the the file entry / with the first call at the installation process, the logfile will be created including headline, ....
+                        // fs.Write(Encoding.UTF8.GetBytes(Path.Combine(extractFolder, zip[i].FileName) + "\n"), 0, Encoding.UTF8.GetByteCount(Path.Combine(extractFolder, zip[i].FileName) + "\n"));
+                        Logging.Installer(Utils.ReplaceDirectorySeparatorChar(Path.Combine(extractFolder, zip[i].FileName)));           // write the the file entry / with the first call at the installation process, the logfile will be created including headline, ....
                     }
                     zip.ExtractProgress += Zip_ExtractProgress;
                     zip.ExtractAll(extractFolder, ExtractExistingFileAction.OverwriteSilently);


quickLog fixed (wrong argument order)

quickLog fixed (wrong argument order)

--- TheQ.Utilities.CloudTools/Infrastructure/LogHelper.cs
+++ TheQ.Utilities.CloudTools/Infrastructure/LogHelper.cs
@@ -59,7 +59,7 @@
 			[NotNull] string message,
 			[NotNull] params object[] formatArguments)
 		{
-			if (logService != null) logService.Error(exception, string.Format(CultureInfo.InvariantCulture, message, formatArguments), "TheQ/CloudTools/" + category);
+			if (logService != null) logService.Error(exception, "TheQ/CloudTools/" + category, string.Format(CultureInfo.InvariantCulture, message, formatArguments));
 		}
 	}
 }


Fix comment removal order

Fix comment removal order

--- Core/VVVV.DX11.Factories/AbstractDX11ShaderFactory.cs
+++ Core/VVVV.DX11.Factories/AbstractDX11ShaderFactory.cs
@@ -117,13 +117,12 @@
                 using (var sr = new StreamReader(filename))
                 {
                 	var code = sr.ReadToEnd();
-                	//remove comments: between (* and *)
-                	code = Regex.Replace(code, @"/\*.*?\*/", "", RegexOptions.Singleline);
-                	//remove comments: from // to lineend
-                	code = Regex.Replace(code, @"//.*?\n", "", RegexOptions.Singleline);
-
+                    //remove comments: from // to lineend
+                    code = Regex.Replace(code, @"//.*?\n", "", RegexOptions.Singleline);
+                    //remove comments: between (* and *)
+                    code = Regex.Replace(code, @"/\*.*?\*/", "", RegexOptions.Singleline);
                     //if the code contains now contains "technique10 " or "technique11 " this must be a dx11 effect
-					if (code.Contains("technique10 ") || code.Contains("technique11 "))
+                    if (code.Contains("technique10 ") || code.Contains("technique11 "))
                 		isDX11 = true;
             	}


fix performance tests on RadixTree

fix performance tests on RadixTree

--- DataTanker/Tests/Performance/RadixTreeStorageTests.cs
+++ DataTanker/Tests/Performance/RadixTreeStorageTests.cs
@@ -23,7 +23,7 @@

         public static void EnglishWords(Action<string> writeInfo)
         {
-            using (var fileStream = new FileStream("..\\..\\..\\Data\\words.txt", FileMode.Open))
+            using (var fileStream = new FileStream("..\\..\\..\\Performance\\Data\\words.txt", FileMode.Open))
             {
                 using (var textReader = new StreamReader(fileStream))
                 {


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsDateTime.cs
@@ -2375,7 +2375,16 @@
             Assert.AreEqual(result, expected);
         }

-        [TestMethod]
+      [TestMethod]
+      public void TestMethod_Bissextile_2010()
+      {
+        DateTime source = new DateTime(2010, 1, 1);
+        const bool expected = false;
+        bool result = DateFunc.IsBissextile(source);
+        Assert.AreEqual(result, expected);
+      }
+
+    [TestMethod]
         public void TestMethod_Bissextile_2012()
         {
             DateTime source = new DateTime(2012, 1, 1);


Extended pipeline

Extended pipeline

--- DotJEM.Web.Host/Providers/Pipeline/PipelineManager.cs
+++ DotJEM.Web.Host/Providers/Pipeline/PipelineManager.cs
@@ -29,11 +29,11 @@
     public interface IJsonDecorator
     {
         bool Accept(string contentType);
-        JObject DecorateGet(dynamic entity);
-        JObject DecorateBeforePost(dynamic entity);
-        JObject DecorateAfterPost(dynamic entity);
-        JObject DecoratePut(dynamic entity);
-        JObject DecorateDelete(dynamic entity);
+        JObject OnGet(dynamic entity);
+        JObject OnBeforePost(dynamic entity);
+        JObject OnAfterPost(dynamic entity);
+        JObject OnPut(dynamic entity);
+        JObject OnDelete(dynamic entity);
     }

     public class Pipeline : IPipeline
@@ -47,27 +47,27 @@

         public JObject ExecuteOnGet(JObject json, string contentType)
         {
-            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.DecorateGet(jo));
+            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.OnGet(jo));
         }

         public JObject ExecuteOnPut(JObject json, string contentType)
         {
-            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.DecoratePut(jo));
+            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.OnPut(jo));
         }

         public JObject ExecuteBeforePost(JObject json, string contentType)
         {
-            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.DecorateBeforePost(jo));
+            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.OnBeforePost(jo));
         }

         public JObject ExecuteAfterPost(JObject json, string contentType)
         {
-            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.DecorateAfterPost(jo));
+            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.OnAfterPost(jo));
         }

         public JObject ExecuteOnDelete(JObject json, string contentType)
         {
-            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.DecorateDelete(jo));
+            return steps.Where(step => step.Accept(contentType)).Aggregate(json, (jo, step) => step.OnDelete(jo));
         }

     }
@@ -79,27 +79,27 @@
             return true;
         }

-        public virtual JObject DecorateGet(dynamic entity)
+        public virtual JObject OnGet(dynamic entity)
         {
             return entity;
         }

-        public virtual JObject DecorateBeforePost(dynamic entity)
+        public virtual JObject OnBeforePost(dynamic entity)
         {
             return entity;
         }

-        public virtual JObject DecorateAfterPost(dynamic entity)
+        public virtual JObject OnAfterPost(dynamic entity)
         {
             return entity;
         }

-        public virtual JObject DecoratePut(dynamic entity)
+        public virtual JObject OnPut(dynamic entity)
         {
             return entity;
         }

-        public virtual JObject DecorateDelete(dynamic entity)
+        public virtual JObject OnDelete(dynamic entity)
         {
             return entity;
         }


Use evaluated Math.Pow expressions for testing

--- UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs
+++ UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs
@@ -50,9 +50,9 @@

         protected override double DecimetersToTheFourthInOneMeterToTheFourth => 1e4;

-        protected override double FeetToTheFourthInOneMeterToTheFourth => 1/Math.Pow(0.3048, 4);
+        protected override double FeetToTheFourthInOneMeterToTheFourth => 115.861767;

-        protected override double InchesToTheFourthInOneMeterToTheFourth => 1/Math.Pow(2.54e-2, 4);
+        protected override double InchesToTheFourthInOneMeterToTheFourth => 2402509.61003;

         protected override double MetersToTheFourthInOneMeterToTheFourth => 1;


Added messages for restraining people (only shows for restainer) (untested)


delete validationAttributeCore

delete validationAttributeCore

--- ValidationAttributeCoreTest/DiscoverValidationTest.cs
+++ ValidationAttributeCoreTest/DiscoverValidationTest.cs
@@ -1,128 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using DiscoverValidationCore.Application;
-using DiscoverValidationCore.Model;
-using FluentValidation.Results;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using ValidationAttributeCoreTest.Model.Animals;
-
-namespace ValidationAttributeCoreTest
-{
-    [TestClass]
-    public class DiscoverValidationTest
-    {
-        private readonly List<object> _animals;
-
-        public DiscoverValidationTest()
-        {
-            _animals = new List<object>()
-            {
-                new Dog("Max", 6, false, "Mammal"),
-                new Dog("", 4, false, "Mammal"),
-                new Dog("Bobby", 8, true, "Mammal"),
-
-                new Cat("Meow", 1, false, "Mammal"),
-                new Cat("Calcetines", -1, false, "Mammal"),
-
-                new Bird("Jimmy", 1, true, "Bird"),
-                new Bird("Twetty", 2, false, ""),
-
-                new BigFoot()
-            };
-        }
-
-        [TestMethod]
-        [TestCategory("Discover Validation - One Element")]
-        public void ValidationOneValidDogElement()
-        {
-            //Arrange
-            var dog = new Dog("Max", 1, false, "Mammal");
-
-            //Act
-            var target = DiscoverValidator.ValidateEntity(dog);
-
-            //Assert
-            Assert.IsNotNull(target);
-            Assert.IsInstanceOfType(target, typeof(ValidData<Dog>));
-        }
-
-        [TestMethod]
-        [TestCategory("Discover Validation - One Element")]
-        public void ValidationOneInvalidCatElement()
-        {
-            //Arrange
-            var cat = new Cat("Max", 1, true, "Mammal");
-
-            //Act
-            var target = DiscoverValidator.ValidateEntity(cat);
-            var valid = target.IsValid();
-            var validationFailures = target.GetValidationFailures();
-
-            //Assert
-            Assert.IsNotNull(target);
-            Assert.IsInstanceOfType(target, typeof(InvalidData<Cat>));
-            Assert.IsNotNull((target as InvalidData<Cat>)?.ValidationFailures);
-        }
-
-        [TestMethod]
-        [TestCategory("Discover Validation - Multiple Elements")]
-        public void ValidationMultipleElementsOfOneUniqueType()
-        {
-            //Act
-            var resultsOneEntity = DiscoverValidator.ValidateEntity(new List<Dog>()
-            {
-                new Dog("Max", 6, false, "Mammal"),
-                new Dog("", 4, false, "Mammal"),
-                new Dog("Bobby", 8, true, "Mammal"),
-            });
-
-            var allValidData = resultsOneEntity.OfType<ValidData<Dog>>();
-            var allInvalidData = resultsOneEntity.OfType<InvalidData<Dog>>();
-
-
-            var allNotValidatableData = resultsOneEntity.OfType<NotValidatableData<Dog>>();
-
-            allNotValidatableData.ToList().ForEach(data =>
-            {
-                var entity = data.Entity;
-                //Do whatever you want
-            });
-            //Assert
-            Assert.IsNotNull(resultsOneEntity);
-            Assert.AreEqual(1, resultsOneEntity.OfType<ValidData<Dog>>().Count());
-            Assert.AreEqual(2, resultsOneEntity.OfType<InvalidData<Dog>>().Count());
-        }
-
-        [TestMethod]
-        [TestCategory("Discover Validation - Multiple Elements")]
-        public void ValidationMultipleElements()
-        {
-            //Act
-            var results = DiscoverValidator.ValidateMultipleEntities(_animals); // Animals is a List<IAnimal>
-
-
-            var allresultsOfDogs = results.GetDataOfType<Dog>();
-            allresultsOfDogs.ToList().ForEach(data =>
-            {
-                var entity = data.Entity;
-                //Do whatever you want
-            });
-            var allInvalidDataOfCats = results.GetInvalidDataOfType<Cat>();
-            var allNotValidatableDataOfBigFoot = results.GetNotValidatableDataOfType<BigFoot>();
-
-            //Assert
-            Assert.IsNotNull(results);
-            Assert.AreEqual(3, results.GetDataOfType<Dog>().Count);
-            Assert.AreEqual(1, results.GetValidDataOfType<Dog>().Count);
-            Assert.AreEqual(2, results.GetInvalidDataOfType<Dog>().Count);
-            var a = results.GetInvalidDataOfType<Dog>();
-            var b = a.First();
-            var c = (InvalidData<Dog>) b;
-            var d = c.ValidationFailures;
-            Assert.IsNotNull(
-                ((InvalidData<Dog>) results
-                    .GetInvalidDataOfType<Dog>().First()).ValidationFailures);
-        }
-    }
-}


Implemented draughtspoint

Implemented draughtspoint

--- Engine/Engine/Geometry/Points/Custom/DraughtsPoint.cs
+++ Engine/Engine/Geometry/Points/Custom/DraughtsPoint.cs
@@ -1,4 +1,5 @@
-using System;
+using Engine.Geometry.Directions.Custom.Draughts;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -8,9 +9,25 @@
 {
     class DraughtsPoint : IPoint
     {
+
+        int _left;
+        int _right;
+
+        public DraughtsPoint(int left, int right)
+        {
+            _left = left;
+            _right = right;
+        }
+
+
         public IPoint get_next_point_in_direction(Direction direction)
         {
-            throw new NotImplementedException();
+            if (direction is WhiteManLeftDirection) return new IsometricPoint(_left + 1, _right);
+            if (direction is WhiteManRightDirection) return new IsometricPoint(_left, _right + 1);
+            if (direction is BlackManLeftDirection) return new IsometricPoint(_left - 1, _right);
+            if (direction is BlackManRightDirection) return new IsometricPoint(_left, _right - 1);
+
+            throw new NotImplementedException(direction.ToString() + " is not a valid dimension");
         }
     }
 }


Fix case of method

Fix case of method

--- src/avfoundation.cs
+++ src/avfoundation.cs
@@ -720,7 +720,7 @@
 		IntPtr Constructor (AVAssetWriterInput input, NSDictionary sourcePixelBufferAttributes);

 		[Export ("appendPixelBuffer:withPresentationTime:")]
-		bool AppendPixelBufferwithPresentationTime (CVPixelBuffer pixelBuffer, CMTime presentationTime);
+		bool AppendPixelBufferWithPresentationTime (CVPixelBuffer pixelBuffer, CMTime presentationTime);
 	}

 	[Since (4,0)]


[isa.wp] Fix a bug with incorrect caching.

--- Windows/Source/IsAcademia/ViewModels/MainViewModel.cs
+++ Windows/Source/IsAcademia/ViewModels/MainViewModel.cs
@@ -101,7 +101,8 @@

             if ( DateTime.Now >= WeekDate && ( DateTime.Now - WeekDate ).TotalDays < DaysInWeek )
             {
-                return CachedTask.Create( getter, expirationDate: WeekDate.AddDays( DaysInWeek ) );
+                // cache ID must be non-zero so that other requests don't think this can be used as a placeholder
+                return CachedTask.Create( getter, 1, WeekDate.AddDays( DaysInWeek ) );
             }
             return CachedTask.DoNotCache( getter );
         }


Changed HTML banner for All Relevant Items to match RC6

--- GPConnect.Provider.AcceptanceTests/Steps/HtmlSteps.cs
+++ GPConnect.Provider.AcceptanceTests/Steps/HtmlSteps.cs
@@ -233,7 +233,7 @@
                     foreach (Composition.SectionComponent section in composition.Section)
                     {
                         var html = section.Text.Div;
-                        html.ShouldContain("
All relevant items subject to patient preferences and/or RCGP exclusions
");
+                        html.ShouldContain("
All relevant items
");
                     }
                 }
             }


Added priority to title results

Added priority to title results

--- Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs
+++ Wox.Plugin.SystemPlugins/ControlPanel/ControlPanel.cs
@@ -64,24 +64,49 @@
             {
                 if (item.LocalizedString.IndexOf(myQuery, StringComparison.OrdinalIgnoreCase) >= 0 || item.InfoTip.IndexOf(myQuery, StringComparison.OrdinalIgnoreCase) >= 0)
                 {
-                    results.Add(new Result()
+
+                    if (item.LocalizedString.IndexOf(myQuery, StringComparison.OrdinalIgnoreCase) >= 0) //Items with Query in title have higher score.
                     {
-                        Title = item.LocalizedString,
-                        SubTitle = item.InfoTip,
-                        IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + ".ico",  //Relative path to plugin directory
-                        Action = e =>
+                        results.Insert(0, new Result()
                         {
-                            try
+                            Title = item.LocalizedString,
+                            SubTitle = item.InfoTip,
+                            IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + ".ico",
+                            Action = e =>
                             {
-                                Process.Start(item.ExecutablePath);
+                                try
+                                {
+                                    Process.Start(item.ExecutablePath);
+                                }
+                                catch (Exception)
+                                {
+                                    //Silently Fail for now..
+                                }
+                                return true;
                             }
-                            catch (Exception)
+                        });
+                    }
+                    else
+                    {
+                        results.Add(new Result()
+                        {
+                            Title = item.LocalizedString,
+                            SubTitle = item.InfoTip,
+                            IcoPath = "Images\\ControlPanelIcons\\" + item.ApplicationName + ".ico",
+                            Action = e =>
                             {
-                                //Silently Fail for now..
+                                try
+                                {
+                                    Process.Start(item.ExecutablePath);
+                                }
+                                catch (Exception)
+                                {
+                                    //Silently Fail for now..
+                                }
+                                return true;
                             }
-                            return true;
-                        }
-                    });
+                        });
+                    }
                 }
             }
             return results;


Added constructor overload in QueryStringBuilder to pass in UrlResolver instance.

--- Geta.EPi.Extensions/QueryString/QueryStringBuilder.cs
+++ Geta.EPi.Extensions/QueryString/QueryStringBuilder.cs
@@ -12,6 +12,7 @@
     public class QueryStringBuilder : IHtmlString
     {
         protected readonly UrlBuilder UrlBuilder;
+        protected readonly UrlResolver EPiUrlResolver;

         /// <summary>
         ///     Represents the empty query string. Field is read-only.
@@ -25,6 +26,25 @@
         public QueryStringBuilder(string url)
         {
             UrlBuilder = new UrlBuilder(url);
+        }
+
+        /// <summary>
+        ///     Instantiates new QueryStringBuilder with provided URL.
+        /// </summary>
+        /// <param name="contentLink">ContentReference for which to build query.</param>
+        public QueryStringBuilder(ContentReference contentLink) : this(contentLink, ServiceLocator.Current.GetInstance<UrlResolver>())
+        {
+        }
+
+        /// <summary>
+        ///     Instantiates new QueryStringBuilder with provided URL.
+        /// </summary>
+        /// <param name="contentLink">ContentReference for which to build query.</param>
+        /// <param name="urlResolver">UrlResolver instance.</param>
+        public QueryStringBuilder(ContentReference contentLink, UrlResolver urlResolver)
+        {
+            EPiUrlResolver = urlResolver;
+            UrlBuilder = new UrlBuilder(EPiUrlResolver.GetUrl(contentLink));
         }

         /// <summary>
@@ -44,9 +64,20 @@
         /// <returns>Instance of QueryStringBuilder.</returns>
         public static QueryStringBuilder Create(ContentReference contentLink)
         {
-            var urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>();
-            return new QueryStringBuilder(urlResolver.GetUrl(contentLink));
+            return new QueryStringBuilder(contentLink);
         }
+
+        /// <summary>
+        ///     Factory method for instantiating new QueryStringBuilder with provided URL.
+        /// </summary>
+        /// <param name="contentLink">Content for which to build query.</param>
+        /// <returns>Instance of QueryStringBuilder.</returns>
+        /// <param name="urlResolver">UrlResolver instance.</param>
+        public static QueryStringBuilder Create(ContentReference contentLink, UrlResolver urlResolver)
+        {
+            return new QueryStringBuilder(contentLink, urlResolver);
+        }
+
         /// <summary>
         ///     Adds query string parameter to query URL encoded.
         /// </summary>


Ability to update existing property when alias remains the same...

--- NicBell.UCreate/Helpers/BaseContentTypeHelper.cs
+++ NicBell.UCreate/Helpers/BaseContentTypeHelper.cs
@@ -84,16 +84,34 @@

                 if (propAttr != null)
                 {
-                    ct.RemovePropertyType(propAttr.Alias);
+                    var newProp = propAttr.GetPropertyType();

-                    if (!String.IsNullOrEmpty(propAttr.TabName))
+                    if (ct.PropertyTypeExists(propAttr.Alias))
                     {
-                        ct.AddPropertyGroup(propAttr.TabName);
-                        ct.AddPropertyType(propAttr.GetPropertyType(), propAttr.TabName);
+                        var existingProp = ct.PropertyTypes.First(x => x.Alias == propAttr.Alias);
+
+                        existingProp.DataTypeDefinitionId = newProp.DataTypeDefinitionId;
+                        existingProp.Name = newProp.Name;
+                        existingProp.Description = newProp.Description;
+                        existingProp.Mandatory = newProp.Mandatory;
+                        existingProp.ValidationRegExp = newProp.ValidationRegExp;
+
+                        if (!String.IsNullOrEmpty(propAttr.TabName))
+                        {
+                            ct.MovePropertyType(propAttr.Alias, propAttr.TabName);
+                        }
                     }
                     else
                     {
-                        ct.AddPropertyType(propAttr.GetPropertyType());
+                        if (!String.IsNullOrEmpty(propAttr.TabName))
+                        {
+                            ct.AddPropertyGroup(propAttr.TabName);
+                            ct.AddPropertyType(newProp, propAttr.TabName);
+                        }
+                        else
+                        {
+                            ct.AddPropertyType(newProp);
+                        }
                     }
                 }
             }


Some tests

Some tests

--- ITCC.HTTP.Testing/Program.cs
+++ ITCC.HTTP.Testing/Program.cs
@@ -3,6 +3,7 @@
 using System;
 using System.Threading;
 using System.Threading.Tasks;
+using ITCC.HTTP.Client.Core;
 using ITCC.HTTP.Client.Utils;
 using ITCC.Logging.Core;
 using ITCC.Logging.Windows.Loggers;
@@ -27,13 +28,8 @@
                 return;
             Logger.LogEntry("MAIN", LogLevel.Info, "Started");

-            var testObject = new TestClass
-            {
-                First = "First",
-                Second = "Second"
-            };
-            var serialized = JsonConvert.SerializeObject(testObject);
-            var dummy = JsonConvert.DeserializeObject<None>(serialized);
+            StaticClient.ServerAddress = "http://localhost:8888/";
+            var result = await StaticClient.HeadRawAsync("files/Test/1.jpg");

             await Task.Yield();
             Logger.LogEntry("MAIN", LogLevel.Info, "Finished");


#488 - node modules open icon is a folder

--- Nodejs/Product/Nodejs/Project/NodeModulesNode.cs
+++ Nodejs/Product/Nodejs/Project/NodeModulesNode.cs
@@ -496,9 +496,9 @@
         }

         public override object GetIconHandle(bool open) {
-            return
-                ProjectMgr.ImageHandler.GetIconHandle(
-                    open ? (int)ProjectNode.ImageName.OpenReferenceFolder : (int)ProjectNode.ImageName.ReferenceFolder);
+            //We don't want the icon to become an expanded folder 'OpenReferenceFolder'
+            //  Thus we always return 'ReferenceFolder'
+            return ProjectMgr.GetIconHandleByName(ProjectNode.ImageName.ReferenceFolder);
         }

         public override string Url {


unit test bug fix

unit test bug fix

--- OBeautifulCode.IO.Recipes.Test/FileHelperTest.cs
+++ OBeautifulCode.IO.Recipes.Test/FileHelperTest.cs
@@ -684,6 +684,7 @@
             string workingDirectory = Directory.GetCurrentDirectory();

             // Act
+            Thread.Sleep(1000);
             string tempFilePath1 = FileHelper.CreateFileNamedByTimestamp(null);
             Thread.Sleep(1000);
             string tempFilePath2 = FileHelper.CreateFileNamedByTimestamp(string.Empty);
@@ -703,6 +704,7 @@
         public static void CreateFileNamedByTimestamp_RootDirectoryIsNullOrWhiteSpace_CreatesFile()
         {
             // Arrange, Act
+            Thread.Sleep(1000);
             string tempFilePath1 = FileHelper.CreateFileNamedByTimestamp(null);
             Thread.Sleep(2000);
             string tempFilePath2 = FileHelper.CreateFileNamedByTimestamp(string.Empty);
@@ -755,6 +757,7 @@
             string tempDirectory = DirectoryHelper.CreateTemporaryFolder();

             // Act
+            Thread.Sleep(1000);
             string tempFile1 = FileHelper.CreateFileNamedByTimestamp(tempDirectory);
             Thread.Sleep(1000);
             string tempFile2 = FileHelper.CreateFileNamedByTimestamp(tempDirectory);
@@ -783,6 +786,7 @@
             const string Prefix2 = "pre ";

             // Act
+            Thread.Sleep(1000);
             string tempFile1 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, Prefix1);
             Thread.Sleep(1000);
             string tempFile2 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, Prefix2);
@@ -814,6 +818,7 @@
             const string Suffix2 = " suffix";

             // Act
+            Thread.Sleep(1000);
             string tempFile1 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, Suffix1);
             Thread.Sleep(1000);
             string tempFile2 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, Suffix2);
@@ -864,6 +869,7 @@
             const string Ext2 = " test";

             // Act
+            Thread.Sleep(1000);
             string tempFile1 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, null, Ext1);
             Thread.Sleep(1000);
             string tempFile2 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, null, Ext2);
@@ -883,6 +889,7 @@
             const string Suffix = "ENDING";

             // Act
+            Thread.Sleep(1000);
             string tempFile1 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, Suffix, null);
             Thread.Sleep(1000);
             string tempFile2 = FileHelper.CreateFileNamedByTimestamp(tempDirectory, null, Suffix, string.Empty);


Remove non-decoded code values from 32-bit method

--- Iced.UnitTests/Intel/DecoderTests/DecoderTestUtils.cs
+++ Iced.UnitTests/Intel/DecoderTests/DecoderTestUtils.cs
@@ -260,7 +260,6 @@
 			yield return Code.Vmsavew;
 			yield return Code.Invlpgaw;
 			yield return Code.Monitorxw;
-			yield return Code.Popw_CS;
 			yield return Code.Add_rm8_imm8_82;
 			yield return Code.Or_rm8_imm8_82;
 			yield return Code.Adc_rm8_imm8_82;
@@ -276,25 +275,8 @@
 			yield return Code.Jmpe_rm32;
 			yield return Code.Loadall286;
 			yield return Code.Loadall386;
-			yield return Code.Cflsh;
-			yield return Code.Umov_rm8_r8;
-			yield return Code.Umov_rm16_r16;
-			yield return Code.Umov_rm32_r32;
-			yield return Code.Umov_r8_rm8;
-			yield return Code.Umov_r16_rm16;
-			yield return Code.Umov_r32_rm32;
 			yield return Code.Mov_r32_tr;
 			yield return Code.Mov_tr_r32;
-			yield return Code.Wrecr;
-			yield return Code.Rdecr;
-			yield return Code.Xbts_r16_rm16;
-			yield return Code.Xbts_r32_rm32;
-			yield return Code.Ibts_rm16_r16;
-			yield return Code.Ibts_rm32_r32;
-			yield return Code.Cmpxchg486_rm8_r8;
-			yield return Code.Cmpxchg486_rm16_r16;
-			yield return Code.Cmpxchg486_rm32_r32;
-			yield return Code.Zalloc_m256;
 			yield return Code.Jmpe_disp16;
 			yield return Code.Jmpe_disp32;
 			yield return Code.Umonitor_r16;


Added missing copyright header.

Added missing copyright header.

--- ImpromptuInterface/EmitProxy/ActLikeProxyAttribute.cs
+++ ImpromptuInterface/EmitProxy/ActLikeProxyAttribute.cs
@@ -1,4 +1,20 @@
-using System;
+//
+//  Copyright 2011 Ekon Benefits
+//
+//    Licensed under the Apache License, Version 2.0 (the "License");
+//    you may not use this file except in compliance with the License.
+//    You may obtain a copy of the License at
+//
+//        http://www.apache.org/licenses/LICENSE-2.0
+//
+//    Unless required by applicable law or agreed to in writing, software
+//    distributed under the License is distributed on an "AS IS" BASIS,
+//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//    See the License for the specific language governing permissions and
+//    limitations under the License.
+
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;


Dont increment Serial when sending wearables.  The client does that through the appearance packets.

--- OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3313,7 +3313,7 @@
         /// </summary>
         public void SendWearables()
         {
-            ControllingClient.SendWearables(m_appearance.GetWearables().ToArray(), m_appearance.Serial++);
+            ControllingClient.SendWearables(m_appearance.GetWearables().ToArray(), m_appearance.Serial);
         }

         /// <summary>


Add test

Add test


Marked obsolete method

Marked obsolete method

--- PART/Source/Core/Data/Part/PersonRegistration.cs
+++ PART/Source/Core/Data/Part/PersonRegistration.cs
@@ -162,6 +162,7 @@
             return string.Equals(xml, thisXml);
         }

+        [Obsolete("Replaced by the newer GetBy...() methods")]
         public static Expression<Func<PersonRegistration, bool>> CreateWhereExpression(PartDataContext dataContext, CprBroker.Schemas.Part.SoegInputType1 searchCriteria)
         {
             var pred = PredicateBuilder.True<Data.Part.PersonRegistration>();


Swapped spaces for tabs to make code uniform

--- OneBullet/OneBullet/Game1.cs
+++ OneBullet/OneBullet/Game1.cs
@@ -4,90 +4,90 @@

 namespace OneBullet
 {
-    /// <summary>
-    /// This is the main type for your game.
-    /// </summary>
-    public class Game1 : Game
-    {
-        GraphicsDeviceManager graphics;
-        SpriteBatch spriteBatch;
-        Texture2D megaManXR;
+	/// <summary>
+	/// This is the main type for your game.
+	/// </summary>
+	public class Game1 : Game
+	{
+		GraphicsDeviceManager graphics;
+		SpriteBatch spriteBatch;
+		Texture2D megaManXR;
 		Texture2D megaManXL;
 		Texture2D p1Sprite;
-        Rectangle p1Position;
+		Rectangle p1Position;
 		Vector2 p1Velocity;
 		const int p1Acceleration = 3;
 		bool onGround, jumping;
-        KeyboardState kState;
+		KeyboardState kState;
 		private KeyboardState oldKState;

-        public Game1()
-        {
-            graphics = new GraphicsDeviceManager(this);
-            Content.RootDirectory = "Content";
-        }
+		public Game1()
+		{
+			graphics = new GraphicsDeviceManager(this);
+			Content.RootDirectory = "Content";
+		}

-        /// <summary>
-        /// Allows the game to perform any initialization it needs to before starting to run.
-        /// This is where it can query for any required services and load any non-graphic
-        /// related content.  Calling base.Initialize will enumerate through any components
-        /// and initialize them as well.
-        /// </summary>
-        protected override void Initialize()
-        {
-            // TODO: Add your initialization logic here
+		/// <summary>
+		/// Allows the game to perform any initialization it needs to before starting to run.
+		/// This is where it can query for any required services and load any non-graphic
+		/// related content.  Calling base.Initialize will enumerate through any components
+		/// and initialize them as well.
+		/// </summary>
+		protected override void Initialize()
+		{
+			// TODO: Add your initialization logic here

-            base.Initialize();
-            p1Position = new Rectangle(200, 200, 260, 250);
+			base.Initialize();
+			p1Position = new Rectangle(200, 200, 260, 250);
 			p1Velocity = new Vector2(0, 0);
 			onGround = true;
 			jumping = false;
-        }
+		}

-        /// <summary>
-        /// LoadContent will be called once per game and is the place to load
-        /// all of your content.
-        /// </summary>
-        protected override void LoadContent()
-        {
-            // Create a new SpriteBatch, which can be used to draw textures.
-            spriteBatch = new SpriteBatch(GraphicsDevice);
+		/// <summary>
+		/// LoadContent will be called once per game and is the place to load
+		/// all of your content.
+		/// </summary>
+		protected override void LoadContent()
+		{
+			// Create a new SpriteBatch, which can be used to draw textures.
+			spriteBatch = new SpriteBatch(GraphicsDevice);

-            // TODO: use this.Content to load your game content here
-            megaManXR = Content.Load<Texture2D>("MegaManX_Right");
+			// TODO: use this.Content to load your game content here
+			megaManXR = Content.Load<Texture2D>("MegaManX_Right");
 			megaManXL = Content.Load<Texture2D>("MegaManX_Left");
 			p1Sprite = megaManXR;
 		}

-        /// <summary>
-        /// UnloadContent will be called once per game and is the place to unload
-        /// game-specific content.
-        /// </summary>
-        protected override void UnloadContent()
-        {
-            // TODO: Unload any non ContentManager content here
-        }
+		/// <summary>
+		/// UnloadContent will be called once per game and is the place to unload
+		/// game-specific content.
+		/// </summary>
+		protected override void UnloadContent()
+		{
+			// TODO: Unload any non ContentManager content here
+		}

-        /// <summary>
-        /// Allows the game to run logic such as updating the world,
-        /// checking for collisions, gathering input, and playing audio.
-        /// </summary>
-        /// <param name="gameTime">Provides a snapshot of timing values.</param>
-        protected override void Update(GameTime gameTime)
-        {
-            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
-                Exit();
+		/// <summary>
+		/// Allows the game to run logic such as updating the world,
+		/// checking for collisions, gathering input, and playing audio.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Update(GameTime gameTime)
+		{
+			if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
+				Exit();

-            // TODO: Add your update logic here
+			// TODO: Add your update logic here

 			// ------------------------------------------ Keyboard inputs
-            kState = Keyboard.GetState();
+			kState = Keyboard.GetState();

-            if (kState.IsKeyDown(Keys.A))
-            {
+			if (kState.IsKeyDown(Keys.A))
+			{
 				p1Velocity.X -= 10;
 				p1Sprite = megaManXL;
-            }
+			}
 			if (kState.IsKeyDown(Keys.D))
 			{
 				p1Velocity.X += 10;
@@ -134,22 +134,22 @@
 			p1Velocity.X = 0;

 			base.Update(gameTime);
-        }
+		}

-        /// <summary>
-        /// This is called when the game should draw itself.
-        /// </summary>
-        /// <param name="gameTime">Provides a snapshot of timing values.</param>
-        protected override void Draw(GameTime gameTime)
-        {
-            GraphicsDevice.Clear(Color.CornflowerBlue);
+		/// <summary>
+		/// This is called when the game should draw itself.
+		/// </summary>
+		/// <param name="gameTime">Provides a snapshot of timing values.</param>
+		protected override void Draw(GameTime gameTime)
+		{
+			GraphicsDevice.Clear(Color.CornflowerBlue);

-            // TODO: Add your drawing code here
-            spriteBatch.Begin();
-            spriteBatch.Draw(p1Sprite, p1Position, Color.White);
-            spriteBatch.End();
+			// TODO: Add your drawing code here
+			spriteBatch.Begin();
+			spriteBatch.Draw(p1Sprite, p1Position, Color.White);
+			spriteBatch.End();

-            base.Draw(gameTime);
-        }
-    }
+			base.Draw(gameTime);
+		}
+	}
 }


Fixed json escaping of content.

Fixed json escaping of content.


New clientlib ver

New clientlib ver

--- KalturaClient/KalturaClient.cs
+++ KalturaClient/KalturaClient.cs
@@ -34,7 +34,7 @@
 		public KalturaClient(KalturaConfiguration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:16-08-19";
+				ClientTag = "dotnet:16-08-20";
 		}

 		KalturaAccessControlProfileService _AccessControlProfileService;


New clientlib ver

New clientlib ver

--- KalturaClient/KalturaClient.cs
+++ KalturaClient/KalturaClient.cs
@@ -34,7 +34,7 @@
 		public KalturaClient(KalturaConfiguration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:15-12-25";
+				ClientTag = "dotnet:15-12-26";
 		}

 		KalturaAccessControlProfileService _AccessControlProfileService;


Update BatchNormalization.cs

Update BatchNormalization.cs

--- KelpNet/Functions/Normalization/BatchNormalization.cs
+++ KelpNet/Functions/Normalization/BatchNormalization.cs
@@ -70,8 +70,8 @@

             if (!this.IsTrain)
             {
-                this.Parameters [2] = this.AvgMean;
-                this.Parameters [3] = this.AvgVar;
+                this.Parameters[2] = this.AvgMean;
+                this.Parameters[3] = this.AvgVar;
             }

             SingleInputForward = ForwardCpu;
@@ -89,8 +89,7 @@
             //計算用パラメータの取得
             if (this.IsTrain) {
                 //メンバのMeanとVarianceを設定する
-                this.Variance = new Real[this.ChannelSize];
-
+                this.Variance = new Real[this.ChannelSize];
                 for (int i = 0; i < this.Variance.Length; i++)
                 {
                     this.Variance[i] = 0;
@@ -99,7 +98,7 @@
                 this.Mean = new Real[this.ChannelSize];

                 // ChannelSize
-                for (int c = 0; c < this.Mean.Length; c++)
+                for (int i = 0; i < this.Mean.Length; i++)
                 {
                     // BatchSize
                     for (int b = 0; b < x.BatchCount; b++)
@@ -107,63 +106,63 @@
                         // DataSize
                         for (int location = 0; location < dataSize; location++)
                         {
-                            this.Mean[c] += x.Data[b * x.Length + c * dataSize + location];
-                        }
-                    }
-
-                    this.Mean[c] /= x.BatchCount;
-                    this.Mean[c] /= dataSize;
-                }
-
-                for (int c = 0; c < this.Mean.Length; c++)
+                            this.Mean[i] += x.Data[b * x.Length + i * dataSize + location];
+                        }
+                    }
+
+                    this.Mean[i] /= x.BatchCount;
+                    this.Mean[i] /= dataSize;
+                }
+
+                for (int i = 0; i < this.Mean.Length; i++)
                 {
                     for (int b = 0; b < x.BatchCount; b++)
                     {
                         for (int location = 0; location < dataSize; location++)
                         {
-                            this.Variance[c] += (x.Data[b * x.Length + c * dataSize + location] - this.Mean[c])
-                                * (x.Data[b * x.Length + c * dataSize + location] - this.Mean[c]);
-                        }
-                    }
-
-                    this.Variance [c] /= x.BatchCount;
-                    this.Variance [c] /= dataSize;
+                            this.Variance[i] += (x.Data[b * x.Length + i * dataSize + location] - this.Mean[i])
+                                * (x.Data[b * x.Length + i * dataSize + location] - this.Mean[i]);
+                        }
+                    }
+
+                    this.Variance [i] /= x.BatchCount;
+                    this.Variance [i] /= dataSize;
                 }

                 for (int i = 0; i < this.Variance.Length; i++)
                 {
-                    this.Variance [i] += this.Eps;
-                }
-            }
+                    this.Variance[i] += this.Eps;
+                }
+            }
             else
             {
                 this.Mean = this.AvgMean.Data;
                 this.Variance = this.AvgVar.Data;
             }

-            this.Std = new Real [this.Variance.Length];
+            this.Std = new Real[this.Variance.Length];
             for (int i = 0; i < this.Variance.Length; i++)
             {
-                this.Std [i] = Math.Sqrt (this.Variance [i]);
+                this.Std[i] = Math.Sqrt(this.Variance [i]);
             }

             //結果を計算
-            this.Xhat = new Real [x.Data.Length];
-
-            Real [] y = new Real [x.Data.Length];
+            this.Xhat = new Real[x.Data.Length];
+
+            Real[] y = new Real[x.Data.Length];

             // BatchSize
             for (int batchCount = 0; batchCount < x.BatchCount; batchCount++)
             {
                 // ChannelSize
-                for (int c = 0; c < this.ChannelSize; c++)
+                for (int i = 0; i < this.ChannelSize; i++)
                 {
                     // DataSize
                     for (int location = 0; location < dataSize; location++)
                     {
-                        int index = batchCount * x.Length + c * dataSize + location;
-                        this.Xhat[index] = (x.Data[index] - this.Mean[c]) / this.Std[c];
-                        y[index] = this.Gamma.Data[c] * this.Xhat[index] + this.Beta.Data[c];
+                        int index = batchCount * x.Length + i * dataSize + location;
+                        this.Xhat[index] = (x.Data[index] - this.Mean[i]) / this.Std[i];
+                        y[index] = this.Gamma.Data[i] * this.Xhat[index] + this.Beta.Data[i];
                     }
                 }
             }
@@ -172,9 +171,9 @@
             if (this.IsTrain)
             {
                 int m = x.BatchCount;
-                Real adjust = m / Math.Max (m - 1.0, 1.0); // unbiased estimation
-
-                for (int i = 0; i < this.AvgMean.Data.Length; i++)
+                Real adjust = m / Math.Max(m - 1.0, 1.0); // unbiased estimation
+
+                for (int i = 0; i < this.AvgMean.Data.Length; i++)
                 {
                     this.AvgMean.Data[i] *= this.Decay;
                     this.Mean[i] *= 1 - this.Decay; // reuse buffer as a temporary
@@ -197,11 +196,11 @@
             int dataSize = 1;
             for (int i = 1; i < x.Shape.Length; i++)
             {
-                dataSize *= x.Shape [i];
+                dataSize *= x.Shape[i];
             }

             // ChannelSize
-            for (int c = 0; c < this.ChannelSize; c++)
+            for (int i = 0; i < this.ChannelSize; i++)
             {
                 // BatchSize
                 for (int b = 0; b < x.BatchCount; b++)
@@ -209,8 +208,8 @@
                     // dataSize
                     for (int location = 0; location < dataSize; location++)
                     {
-                        this.Beta.Grad[c] += y.Grad[b * y.Length + c * dataSize + location];
-                        this.Gamma.Grad[c] += y.Grad[b * y.Length + c * dataSize + location] * this.Xhat[b * x.Length + c * dataSize + location];
+                        this.Beta.Grad[i] += y.Grad[b * y.Length + i * dataSize + location];
+                        this.Gamma.Grad[i] += y.Grad[b * y.Length + i * dataSize + location] * this.Xhat[b * x.Length + i * dataSize + location];
                     }
                 }
             }
@@ -221,17 +220,17 @@
                 int m = y.BatchCount;

                 // ChannelSize
-                for (int c = 0; c < this.ChannelSize; c++)
-                {
-                    Real gs = this.Gamma.Data[c] / this.Std[c];
+                for (int i = 0; i < this.ChannelSize; i++)
+                {
+                    Real gs = this.Gamma.Data[i] / this.Std[i];
                     // BatchSize
                     for (int b = 0; b < y.BatchCount; b++)
                     {
                         // dataSize
                         for (int location = 0; location < dataSize; location++)
                         {
-                            Real val = (this.Xhat[b * y.Length + c * dataSize + location] * this.Gamma.Grad[c] + this.Beta.Grad[c]) / (m * dataSize);
-                            x.Grad[b * y.Length + c * dataSize + location] += gs * (y.Grad[b * y.Length + c * dataSize + location] - val);
+                            Real val = (this.Xhat[b * y.Length + i * dataSize + location] * this.Gamma.Grad[i] + this.Beta.Grad[i]) / (m * dataSize);
+                            x.Grad[b * y.Length + i * dataSize + location] += gs * (y.Grad[b * y.Length + i * dataSize + location] - val);
                         }
                     }
                 }
@@ -239,17 +238,17 @@
             else
             {
                 // 学習なし
-                for (int c = 0; c < this.ChannelSize; c++)
-                {
-                    Real gs = this.Gamma.Data[c] / this.Std[c];
-                    this.AvgMean.Grad[c] = -gs * this.Beta.Grad[c];
-                    this.AvgVar.Grad[c] = -0.5 * this.Gamma.Data[c] / this.AvgVar.Data[c] * this.Gamma.Grad[c];
+                for (int i = 0; i < this.ChannelSize; i++)
+                {
+                    Real gs = this.Gamma.Data[i] / this.Std[i];
+                    this.AvgMean.Grad[i] = -gs * this.Beta.Grad[i];
+                    this.AvgVar.Grad[i] = -0.5 * this.Gamma.Data[i] / this.AvgVar.Data[i] * this.Gamma.Grad[i];

                     for (int b = 0; b < y.BatchCount; b++)
                     {
                         for (int location = 0; location < dataSize; location++)
                         {
-                            x.Grad[b * y.Length + c * dataSize + location] += gs * y.Grad[b * y.Length + c * dataSize + location];
+                            x.Grad[b * y.Length + i * dataSize + location] += gs * y.Grad[b * y.Length + i * dataSize + location];
                         }
                     }
                 }


added test for adding headers

added test for adding headers

--- Kentico.Kontent.Delivery.Tests/TrackingHeaderTests.cs
+++ Kentico.Kontent.Delivery.Tests/TrackingHeaderTests.cs
@@ -6,7 +6,9 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
+using System.Linq;
 using System.Net.Http;
+using System.Net.Http.Headers;
 using System.Text;
 using System.Threading.Tasks;
 using Xunit;
@@ -54,18 +56,43 @@
         }

         [Fact]
+        public void HeadersAddedCorrectlyToTheCollection()
+        {
+            // Arrange
+            var assembly = typeof(DeliveryClient).Assembly;
+            var fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
+            var sdkVersion = fileVersionInfo.ProductVersion;
+            var sdkPackageId = assembly.GetName().Name;
+
+            var sourceAssembly = HttpRequestHeadersExtensions.GetOriginatingAssembly();
+            var sourceFileVersionInfo = FileVersionInfo.GetVersionInfo(sourceAssembly.Location);
+            var sourceVersion = sourceFileVersionInfo.ProductVersion;
+
+            HttpRequestHeaders headers = new HttpRequestMessage().Headers;
+
+            // Act
+            headers.AddSdkTrackingHeader();
+            headers.AddSourceTrackingHeader();
+
+            var id = headers.GetValues("X-KC-SDKID").FirstOrDefault();
+            var source = headers.GetValues("X-KC-SOURCE").FirstOrDefault();
+
+            // Assert
+            Assert.Equal($"nuget.org;{sdkPackageId};{sdkVersion}", id);
+            Assert.Equal($"Kentico.Kontent.Delivery.Tests;{sourceVersion}", source);
+        }
+
+        [Fact]
         public async Task CorrectSdkVersionHeaderAdded()
         {
             var assembly = typeof(DeliveryClient).Assembly;
             var fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
             var sdkVersion = fileVersionInfo.ProductVersion;
             var sdkPackageId = assembly.GetName().Name;
-            _output.WriteLine($"Test SDK version: {sdkVersion}");

             var sourceAssembly = HttpRequestHeadersExtensions.GetOriginatingAssembly();
             var sourceFileVersionInfo = FileVersionInfo.GetVersionInfo(sourceAssembly.Location);
             var sourceVersion = sourceFileVersionInfo.ProductVersion;
-            _output.WriteLine($"Test source version: {sourceVersion}");

             _mockHttp
                 .Expect($"{_baseUrl}/items")
@@ -80,7 +107,7 @@
             A.CallTo(() => retryPolicy.ExecuteAsync(A<Func<Task<HttpResponseMessage>>>._))
                 .ReturnsLazily(c => c.GetArgument<Func<Task<HttpResponseMessage>>>(0)());

-            await client.GetItemsAsync<object>();
+            await client.GetItemsAsync<object>();

             _mockHttp.VerifyNoOutstandingExpectation();
         }