updates

updates

--- PropertyGraphs/GenericPropertyGraph/GenericPropertyVertex.cs
+++ PropertyGraphs/GenericPropertyGraph/GenericPropertyVertex.cs
@@ -641,52 +641,52 @@
         ///
         /// <param name="GraphInitializer">A delegate to initialize the new property graph.</param>
         internal GenericPropertyVertex(TIdVertex  GraphId,
-                                    String     Description,
-
-                                    TKeyVertex VertexIdKey,
-                                    TKeyVertex VertexRevIdKey,
-                                    TKeyVertex VertexDescriptionKey,
-                                    VertexIdCreatorDelegate   <TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                               TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                               TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                               TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> VertexIdCreatorDelegate,
-                                    TVertexLabel DefaultVertexLabel,
-
-
-                                    TKeyEdge   EdgeIdKey,
-                                    TKeyEdge   EdgeRevIdKey,
-                                    TKeyEdge   EdgeDescriptionKey,
-                                    EdgeIdCreatorDelegate     <TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                               TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                               TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                               TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> EdgeIdCreatorDelegate,
-                                    TEdgeLabel DefaultEdgeLabel,
-
-
-                                    TKeyMultiEdge MultiEdgeIdKey,
-                                    TKeyMultiEdge MultiEdgeRevIdKey,
-                                    TKeyMultiEdge MultiEdgeDescriptionKey,
-                                    MultiEdgeIdCreatorDelegate<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                               TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                               TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                               TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> MultiEdgeIdCreatorDelegate,
-                                    TMultiEdgeLabel DefaultMultiEdgeLabel,
-
-
-                                    TKeyHyperEdge HyperEdgeIdKey,
-                                    TKeyHyperEdge HyperEdgeRevIdKey,
-                                    TKeyHyperEdge HyperEdgeDescriptionKey,
-                                    HyperEdgeIdCreatorDelegate<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                               TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                               TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                               TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> HyperEdgeIdCreatorDelegate,
-                                    THyperEdgeLabel DefaultHyperEdgeLabel,
-
-
-                                    GraphInitializer<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                     TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                     TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                     TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> GraphInitializer = null)
+                                       String     Description,
+
+                                       // Vertices
+                                       TKeyVertex VertexIdKey,
+                                       TKeyVertex VertexRevIdKey,
+                                       TKeyVertex VertexDescriptionKey,
+                                       VertexIdCreatorDelegate   <TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                                  TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                                  TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                                  TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> VertexIdCreatorDelegate,
+                                       TVertexLabel DefaultVertexLabel,
+
+                                       // Edges
+                                       TKeyEdge   EdgeIdKey,
+                                       TKeyEdge   EdgeRevIdKey,
+                                       TKeyEdge   EdgeDescriptionKey,
+                                       EdgeIdCreatorDelegate     <TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                                  TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                                  TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                                  TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> EdgeIdCreatorDelegate,
+                                       TEdgeLabel DefaultEdgeLabel,
+
+                                       // MultiEdges
+                                       TKeyMultiEdge MultiEdgeIdKey,
+                                       TKeyMultiEdge MultiEdgeRevIdKey,
+                                       TKeyMultiEdge MultiEdgeDescriptionKey,
+                                       MultiEdgeIdCreatorDelegate<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                                  TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                                  TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                                  TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> MultiEdgeIdCreatorDelegate,
+                                       TMultiEdgeLabel DefaultMultiEdgeLabel,
+
+                                       // HyperEdges
+                                       TKeyHyperEdge HyperEdgeIdKey,
+                                       TKeyHyperEdge HyperEdgeRevIdKey,
+                                       TKeyHyperEdge HyperEdgeDescriptionKey,
+                                       HyperEdgeIdCreatorDelegate<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                                  TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                                  TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                                  TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> HyperEdgeIdCreatorDelegate,
+                                       THyperEdgeLabel DefaultHyperEdgeLabel,
+
+                                       GraphInitializer<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                        TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                        TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                        TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> GraphInitializer = null)

             : this (

@@ -866,7 +866,7 @@

         #endregion

-        #region (internal) GenericPropertyVertex(...IIdCreators...)
+        #region GenericPropertyVertex(...IIdCreators...)

         /// <summary>
         /// Creates a new class-based in-memory implementation of a generic property vertex.
@@ -899,41 +899,41 @@
         /// <param name="DefaultHyperEdgeLabel">The default label of the hyperedges.</param>
         ///
         /// <param name="GraphInitializer">A delegate to initialize the new property graph.</param>
-        internal GenericPropertyVertex(TIdVertex  GraphId,
-                                    String     Description,
-
-                                    TKeyVertex VertexIdKey,
-                                    TKeyVertex VertexRevIdKey,
-                                    TKeyVertex VertexDescriptionKey,
-                                    IIdGenerator<TIdVertex> VertexIdCreator,
-                                    TVertexLabel DefaultVertexLabel,
-
-
-                                    TKeyEdge   EdgeIdKey,
-                                    TKeyEdge   EdgeRevIdKey,
-                                    TKeyEdge   EdgeDescriptionKey,
-                                    IIdGenerator<TIdEdge> EdgeIdCreator,
-                                    TEdgeLabel DefaultEdgeLabel,
-
-
-                                    TKeyMultiEdge MultiEdgeIdKey,
-                                    TKeyMultiEdge MultiEdgeRevIdKey,
-                                    TKeyMultiEdge MultiEdgeDescriptionKey,
-                                    IIdGenerator<TIdMultiEdge> MultiEdgeIdCreator,
-                                    TMultiEdgeLabel DefaultMultiEdgeLabel,
-
-
-                                    TKeyHyperEdge HyperEdgeIdKey,
-                                    TKeyHyperEdge HyperEdgeRevIdKey,
-                                    TKeyHyperEdge HyperEdgeDescriptionKey,
-                                    IIdGenerator<TIdHyperEdge> HyperEdgeIdCreator,
-                                    THyperEdgeLabel DefaultHyperEdgeLabel,
-
-
-                                    GraphInitializer<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
-                                                     TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
-                                                     TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
-                                                     TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> GraphInitializer = null)
+        public GenericPropertyVertex(TIdVertex  GraphId,
+                                     String     Description,
+
+                                     // Vertices
+                                     TKeyVertex VertexIdKey,
+                                     TKeyVertex VertexRevIdKey,
+                                     TKeyVertex VertexDescriptionKey,
+                                     IIdGenerator<TIdVertex> VertexIdCreator,
+                                     TVertexLabel DefaultVertexLabel,
+
+                                     // Edges
+                                     TKeyEdge   EdgeIdKey,
+                                     TKeyEdge   EdgeRevIdKey,
+                                     TKeyEdge   EdgeDescriptionKey,
+                                     IIdGenerator<TIdEdge> EdgeIdCreator,
+                                     TEdgeLabel DefaultEdgeLabel,
+
+                                     // MultiEdges
+                                     TKeyMultiEdge MultiEdgeIdKey,
+                                     TKeyMultiEdge MultiEdgeRevIdKey,
+                                     TKeyMultiEdge MultiEdgeDescriptionKey,
+                                     IIdGenerator<TIdMultiEdge> MultiEdgeIdCreator,
+                                     TMultiEdgeLabel DefaultMultiEdgeLabel,
+
+                                     // HyperEdges
+                                     TKeyHyperEdge HyperEdgeIdKey,
+                                     TKeyHyperEdge HyperEdgeRevIdKey,
+                                     TKeyHyperEdge HyperEdgeDescriptionKey,
+                                     IIdGenerator<TIdHyperEdge> HyperEdgeIdCreator,
+                                     THyperEdgeLabel DefaultHyperEdgeLabel,
+
+                                     GraphInitializer<TIdVertex,    TRevIdVertex,    TVertexLabel,    TKeyVertex,    TValueVertex,
+                                                      TIdEdge,      TRevIdEdge,      TEdgeLabel,      TKeyEdge,      TValueEdge,
+                                                      TIdMultiEdge, TRevIdMultiEdge, TMultiEdgeLabel, TKeyMultiEdge, TValueMultiEdge,
+                                                      TIdHyperEdge, TRevIdHyperEdge, THyperEdgeLabel, TKeyHyperEdge, TValueHyperEdge> GraphInitializer = null)

             : this (

@@ -1133,6 +1133,7 @@

                               TIdVertex    VertexId,
                               TVertexLabel VertexLabel,
+
                               TKeyVertex   IdKey,
                               TKeyVertex   RevIdKey,
                               TKeyVertex   DescriptionKey,


Added some comments to CSharpScript wrapper

--- ScriptWrapper/CSharpScript.cs
+++ ScriptWrapper/CSharpScript.cs
@@ -2,25 +2,25 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
-using System.Text;
 using System.Threading.Tasks;
-using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.Scripting;
+using MCS = Microsoft.CodeAnalysis.Scripting;

 namespace ScriptWrapper
 {
     /// <summary>
-    /// This class wrapps
+    /// This class wrapps the Microsoft.CodeAnalysis.Scripting API
+    /// This is needed because Visual Studio uses Microsoft.VisualStudio.LanguageServices Version 1.0
+    /// while Microsoft.CodeAnalysis.Scripting requires versio 1.1
     /// </summary>
     public class CSharpScript
     {
         public static Task<T> EvaluateAsync<T>(string code, object globals)
         {
-            var options = ScriptOptions.Default
+            var options = MCS.ScriptOptions.Default
                 .WithReferences(GetReferencedAssemblies())
                 .WithNamespaces(Usings);

-            return Microsoft.CodeAnalysis.Scripting.CSharp.CSharpScript.EvaluateAsync<T>(code, options, globals);
+            return MCS.CSharp.CSharpScript.EvaluateAsync<T>(code, options, globals);
         }

         private static IEnumerable<Assembly> GetReferencedAssemblies()
@@ -28,9 +28,8 @@
             // Reference all Assemblies currently loaded in the running AppDomain
             return AppDomain.CurrentDomain.GetAssemblies()
                 .Where(a => !a.IsDynamic && !string.IsNullOrEmpty(a.Location))
-                // If versions of the same assembly are loaded we only reference the one with the lowest version
-                // This is neede because currently we use two versions of Microsoft.VisualStudio.LanguageServices
-
+                // HACK! If multiple versions of the same assembly are loaded we only reference the one with the lowest version
+                // This is needed because currently we use two versions of Microsoft.VisualStudio.LanguageServices
                 .GroupBy(a => a.GetName().Name).Select(g => g.OrderBy(a => a.GetName().Version).First());
         }


change the controls for generating single buildings

--- Scripts/BuildingController.cs
+++ Scripts/BuildingController.cs
@@ -5,25 +5,25 @@
 {
   void Update ()
   {
-    if (Input.GetKeyUp(KeyCode.Alpha2))
+    if (Input.GetKeyUp(KeyCode.F5))
     {
       BuildingManager.Instance.DestroyBuildings();
       BuildingManager.Instance.CreateNeoclassical(BuildMode.Two);
     }

-    if (Input.GetKeyUp(KeyCode.Alpha3))
+    if (Input.GetKeyUp(KeyCode.F6))
     {
       BuildingManager.Instance.DestroyBuildings();
       BuildingManager.Instance.CreateNeoclassical(BuildMode.Three);
     }

-    if (Input.GetKeyUp(KeyCode.Alpha4))
+    if (Input.GetKeyUp(KeyCode.F7))
     {
       BuildingManager.Instance.DestroyBuildings();
       BuildingManager.Instance.CreateNeoclassical(BuildMode.Four);
     }

-    if (Input.GetKeyUp(KeyCode.Alpha5))
+    if (Input.GetKeyUp(KeyCode.F8))
     {
       BuildingManager.Instance.DestroyBuildings();
       BuildingManager.Instance.CreateNeoclassical(BuildMode.Five);


FIxed array size related stuff

FIxed array size related stuff

how silly of me

--- SharpTox/Core/ToxDelegates.cs
+++ SharpTox/Core/ToxDelegates.cs
@@ -59,10 +59,10 @@
         public delegate int CallbackPacketDelegate(IntPtr obj, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] data, uint length);

         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate void CallbackAvatarInfoDelegate(IntPtr tox, int friendnumber, byte format, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] hash, IntPtr userdata);
+        public delegate void CallbackAvatarInfoDelegate(IntPtr tox, int friendnumber, byte format, [In, MarshalAs(UnmanagedType.LPArray, SizeConst = 32)] byte[] hash, IntPtr userdata);

         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate void CallbackAvatarDataDelegate(IntPtr tox, int friendnumber, byte format, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] hash, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] byte[] data, uint datalen, IntPtr userdata);
+        public delegate void CallbackAvatarDataDelegate(IntPtr tox, int friendnumber, byte format, [In, MarshalAs(UnmanagedType.LPArray, SizeConst = 32)] byte[] hash, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] byte[] data, uint datalen, IntPtr userdata);

     }
 }


UI updating

UI updating

--- RelhaxModpack/RelhaxModpack/Windows/ModSelectionList.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/ModSelectionList.xaml.cs
@@ -579,6 +579,7 @@
                     {
                         AddPackage(cat.Packages);
                     });
+                    Utils.AllowUIToUpdate();
                 }

                 //perform any final loading to do


Remove unused variable

Remove unused variable

--- Sharper.C.Maybe/Data/Maybe.cs
+++ Sharper.C.Maybe/Data/Maybe.cs
@@ -139,7 +139,7 @@
             try
             {   return Just(xs.First());
             }
-            catch (InvalidOperationException _)
+            catch (InvalidOperationException)
             {   return Nothing<A>();
             }
         }


update comments, logging, names. Added checking enabled status for if package out of date

--- RelhaxModpack/RelhaxModpack/Windows/ModSelectionList.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/ModSelectionList.xaml.cs
@@ -1761,13 +1761,7 @@

         private bool IsSelectionV3PackageOutOfDate(DatabasePackage packageFromSelection, DatabasePackage packageFromDatabase)
         {
-            /*
-            nameof(ZipFile),
-            nameof(Timestamp),
-            nameof(CRC),
-            nameof(Version)
-            */
-            Logging.Info("Comparing package: {0}", packageFromDatabase);
+            Logging.Info("Comparing package: {0}", packageFromDatabase.PackageName);

             Logging.Debug("Selection ZipFile: {0}", packageFromSelection.ZipFile);
             Logging.Debug("Database ZipFile:  {0}", packageFromDatabase.ZipFile);
@@ -1801,6 +1795,13 @@
                 return true;
             }

+            Logging.Debug("Selection Enabled: {0}", packageFromSelection.Enabled);
+            Logging.Debug("Database Enabled:  {0}", packageFromDatabase.Enabled);
+            if (!packageFromSelection.Enabled.Equals(packageFromDatabase.Enabled))
+            {
+                Logging.Info("Enabled is out of date");
+                return true;
+            }
             return false;
         }

@@ -1941,7 +1942,7 @@
                 {
                     if (!packageFromDatabase.Enabled)
                     {
-                        Logging.Info("Package {0} was disabled since last selection save, won't be checked");
+                        Logging.Info("Package {0} is disabled in database and still exists in selection. It won't be checked");
                         disabledPackages.Add(packageFromSelection);
                         //if setting is high for keeping disabled packages, then don't remove it from selection file
                         if (ModpackSettings.SaveDisabledMods)
@@ -2404,8 +2405,8 @@

             //add global root
-            XElement nodeglobal = new XElement("globalPackages");
-            doc.Element("packages").Add(nodeglobal);
+            XElement nodeGlobal = new XElement("globalPackages");
+            doc.Element("packages").Add(nodeGlobal);

             //relhax mods root
             XElement nodeRelhax = new XElement("relhaxPackages");
@@ -2424,7 +2425,7 @@
                 {
                     SaveV3PropertiesToXmlElement(globalPackage, xpackageGlobal, propName);
                 }
-                nodeglobal.Add(xpackageGlobal);
+                nodeGlobal.Add(xpackageGlobal);
             }

             //check relhax Mods


- Use cancellable WriteAsync - Don't forget to flush and dispose the stream

--- RestSharp.Portable.WebRequest/Impl/Http/DefaultHttpClient.cs
+++ RestSharp.Portable.WebRequest/Impl/Http/DefaultHttpClient.cs
@@ -159,10 +159,14 @@
 #else
                     var requestStream = await wr.GetRequestStreamAsync().HandleCancellation(cancellationToken);
 #endif
-                    var temp = new MemoryStream();
-                    await request.Content.CopyToAsync(temp);
-                    temp.Position = 0;
-                    await temp.CopyToAsync(requestStream);
+                    using (requestStream)
+                    {
+                        var temp = new MemoryStream();
+                        await request.Content.CopyToAsync(temp);
+                        var buffer = temp.ToArray();
+                        await requestStream.WriteAsync(buffer, 0, buffer.Length, cancellationToken);
+                        await requestStream.FlushAsync(cancellationToken);
+                    }
                 }
                 catch (OperationCanceledException)
                 {


Fix typo in Adventure sample (#6496)

Fix typo in Adventure sample (#6496)

--- Samples/2.0/Adventure/AdventureGrainInterfaces/IRoomGrain.cs
+++ Samples/2.0/Adventure/AdventureGrainInterfaces/IRoomGrain.cs
@@ -19,7 +19,7 @@
         Task Enter(PlayerInfo player);
         Task Exit(PlayerInfo player);

-        // Players can enter or exit a room
+        // Monsters can enter or exit a room
         Task Enter(MonsterInfo monster);
         Task Exit(MonsterInfo monster);


OperationAuthLogic fix AvoidAutomaticUpgradeCollection

--- Signum.Engine.Extensions/Authorization/OperationAuthLogic.cs
+++ Signum.Engine.Extensions/Authorization/OperationAuthLogic.cs
@@ -65,7 +65,7 @@
             if (AvoidAutomaticUpgradeCollection == null)
                 return operation;

-            AvoidAutomaticUpgradeCollection.Add(operation.Key);
+            AvoidAutomaticUpgradeCollection.Add(operation.OperationSymbol);

             return operation;
         }


Added more translation entries, fixed names of some translation entries, added some lower level named components to the blacklist

--- RelhaxModpack/RelhaxModpack/Utils/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Utils/Translations.cs
@@ -32,7 +32,9 @@
             "ApplicationVersionLabel",
             "DatabaseVersionLabel",
             "InstallProgressTextBox",
-            "LanguagesSelector"
+            "LanguagesSelector",
+            "PART_ContentHostDescription",
+            "toggleButtonDescription"
         };
         private const string TranslationNeeded = "TODO";
         private static Dictionary<string, string> English = new Dictionary<string, string>();
@@ -273,19 +275,47 @@
             #endregion

             #region Main Window
-            //Componet: installRelhaxMod
+            //Componet: InstallModpackButton
             //The button for installing the modpack
-            English.Add("installRelhaxMod", "Start mod selection");
-            Gernam.Add("installRelhaxMod", "Auswahl der Mods");
-            Polish.Add("installRelhaxMod", "Przejdź Do Wyboru Modyfikacji");
-            French.Add("installRelhaxMod", "Sélection des mods");
-
-            //Componet: uninstallRelhaxMod
-            //
-            English.Add("uninstallRelhaxMod", "Uninstall Relhax Modpack");
-            Gernam.Add("uninstallRelhaxMod", "Relhax Modpack deinstallieren");
-            Polish.Add("uninstallRelhaxMod", "Odinstaluj Paczkę Relhax");
-            French.Add("uninstallRelhaxMod", "Désinstaller Relhax Modpack");
+            English.Add("InstallModpackButton", "Start mod selection");
+            Gernam.Add("InstallModpackButton", "Auswahl der Mods");
+            Polish.Add("InstallModpackButton", "Przejdź Do Wyboru Modyfikacji");
+            French.Add("InstallModpackButton", "Sélection des mods");
+
+            //Componet: InstallModpackButtonDescription
+            //
+            English.Add("InstallModpackButtonDescription", "Select the mods you want to install to your WoT client");
+            Gernam.Add("InstallModpackButtonDescription", TranslationNeeded);
+            Polish.Add("InstallModpackButtonDescription", TranslationNeeded);
+            French.Add("InstallModpackButtonDescription", TranslationNeeded);
+
+            //Componet: UninstallModpackButton
+            //
+            English.Add("UninstallModpackButton", "Uninstall Relhax Modpack");
+            Gernam.Add("UninstallModpackButton", "Relhax Modpack deinstallieren");
+            Polish.Add("UninstallModpackButton", "Odinstaluj Paczkę Relhax");
+            French.Add("UninstallModpackButton", "Désinstaller Relhax Modpack");
+
+            //Componet: UninstallModpackButtonDescription
+            //
+            English.Add("UninstallModpackButtonDescription", "Remove *all* mods installed to your WoT client");
+            Gernam.Add("UninstallModpackButtonDescription", TranslationNeeded);
+            Polish.Add("UninstallModpackButtonDescription", TranslationNeeded);
+            French.Add("UninstallModpackButtonDescription", TranslationNeeded);
+
+            //Componet: ViewNewsButton
+            //
+            English.Add("ViewNewsButton", "View update news");
+            Gernam.Add("ViewNewsButton", TranslationNeeded);
+            Polish.Add("ViewNewsButton", TranslationNeeded);
+            French.Add("ViewNewsButton", TranslationNeeded);
+
+            //Componet: ViewNewsButtonDescription
+            //
+            English.Add("ViewNewsButtonDescription", "View application, database, and other update news");
+            Gernam.Add("ViewNewsButtonDescription", TranslationNeeded);
+            Polish.Add("ViewNewsButtonDescription", TranslationNeeded);
+            French.Add("ViewNewsButtonDescription", TranslationNeeded);

             //Componet: toolTip
             //MainForm
@@ -304,10 +334,10 @@

             //Componet: forceManuel
             //
-            English.Add("LanguageSelectionGB", "Language selection");
-            Gernam.Add("LanguageSelectionGB", "Sprachauswahl");
-            Polish.Add("LanguageSelectionGB", "Wybór języka");
-            French.Add("LanguageSelectionGB", "Choix de langue");
+            English.Add("LanguageSelectionGBHeader", "Language selection");
+            Gernam.Add("LanguageSelectionGBHeader", "Sprachauswahl");
+            Polish.Add("LanguageSelectionGBHeader", "Wybór języka");
+            French.Add("LanguageSelectionGBHeader", "Choix de langue");

             //Componet: Forms_ENG_NAButtonDescription
             English.Add("Forms_ENG_NAButtonDescription", "Go to the English-speaking 'World of Tanks' forum page for the NA server");
@@ -573,6 +603,12 @@
             //Component: ApplicationVersionLabel
             AddTranslationToAll("ApplicationVersionLabel", "Application");

+            //Component: ApplicationVersionLabelDescription
+            English.Add("ApplicationVersionLabelDescription", "The version of the application currently running");
+            Gernam.Add("ApplicationVersionLabelDescription", TranslationNeeded);
+            Polish.Add("ApplicationVersionLabelDescription", TranslationNeeded);
+            French.Add("ApplicationVersionLabelDescription", TranslationNeeded);
+
             //Component: ErrorCounterLabel
             AddTranslationToAll("ErrorCounterLabel", "Error Counter: ");

@@ -718,6 +754,13 @@
             Gernam.Add("DevLinkLabel", "Entwickler webseite");
             Polish.Add("DevLinkLabel", "Strona Dewelopera");
             French.Add("DevLinkLabel", "Site web du développeur");
+
+            //Componet: InstallProgressTextBoxDescription
+            //
+            English.Add("InstallProgressTextBoxDescription", "Progress of an installation will be shown here");
+            Gernam.Add("InstallProgressTextBoxDescription", TranslationNeeded);
+            Polish.Add("InstallProgressTextBoxDescription", TranslationNeeded);
+            French.Add("InstallProgressTextBoxDescription", TranslationNeeded);
             #endregion

             #region Update Window
@@ -1355,6 +1398,13 @@
             Polish.Add("DiagnosticUtilitiesButton", "Narzędzia diagnostyczne");
             French.Add("DiagnosticUtilitiesButton", "Utilitaires de diagnostique");

+            //Component: DiagnosticUtilitiesButtonDescription
+            //
+            English.Add("DiagnosticUtilitiesButtonDescription", "Report a bug, attempt a WG client repair, etc.");
+            Gernam.Add("DiagnosticUtilitiesButtonDescription", TranslationNeeded);
+            Polish.Add("DiagnosticUtilitiesButtonDescription", TranslationNeeded);
+            French.Add("DiagnosticUtilitiesButtonDescription", TranslationNeeded);
+
             //Component: DatabaseVersionLabel
             //
             English.Add("DatabaseVersionLabel", "Latest Database");
@@ -1362,6 +1412,12 @@
             Polish.Add("DatabaseVersionLabel", "Baza danych");
             French.Add("DatabaseVersionLabel", "Base de donnés");

+            //Component: DatabaseVersionLabelDescription
+            English.Add("DatabaseVersionLabelDescription", "The latest public stable database version");
+            Gernam.Add("DatabaseVersionLabelDescription", TranslationNeeded);
+            Polish.Add("DatabaseVersionLabelDescription", TranslationNeeded);
+            French.Add("DatabaseVersionLabelDescription", TranslationNeeded);
+
             //Component: UninstallModeGroupBox
             //
             English.Add("UninstallModeGroupBox", "Uninstall Mode:");
@@ -1460,12 +1516,12 @@
             Polish.Add("selectionView_MouseEnter", "Wybierz listę wyboru modyfikacji.");
             French.Add("selectionView_MouseEnter", "Sélectionnez une vue de liste de sélection de mod.");

-            //Componet: LanguageComboBoxDescription
-            //
-            English.Add("LanguageComboBoxDescription", "Select your preferred language.");
-            Gernam.Add("LanguageComboBoxDescription", "wähle Deine bevorzugte Sprache");
-            Polish.Add("LanguageComboBoxDescription", "Wybierz preferowany język.");
-            French.Add("LanguageComboBoxDescription", "Sélectionnez votre langue préféré");
+            //Componet: LanguageSelectionGBDescription
+            //
+            English.Add("LanguageSelectionGBDescription", "Select your preferred language.");
+            Gernam.Add("LanguageSelectionGBDescription", "wähle Deine bevorzugte Sprache");
+            Polish.Add("LanguageSelectionGBDescription", "Wybierz preferowany język.");
+            French.Add("LanguageSelectionGBDescription", "Sélectionnez votre langue préféré");

             //Componet: fontSizeGB
             //
@@ -2417,6 +2473,7 @@
             #endregion
         }
         #endregion
+
         #region Applying Window Translations
         /// <summary>
         /// Applies and UI elements with translated strings
@@ -2539,6 +2596,7 @@
                 ApplyContentTranslations(cc);
         }
         #endregion
+
         #region Applying Window Translations the right way
         /// <summary>
         /// Applies localized text translations for the passed in window


Moved Vid and Pid to TreehopperUsb.Settings

--- NET/API/Treehopper.Desktop/ConnectionService.cs
+++ NET/API/Treehopper.Desktop/ConnectionService.cs
@@ -16,15 +16,7 @@
     {
         private static readonly ConnectionService instance = new ConnectionService();
         public static ConnectionService Instance { get { return instance; } }
-
-        private IDeviceNotifier myNotifier = DeviceNotifier.OpenDeviceNotifier();
-        // Microchip
-        //int vid = 0x04d8;
-        //int pid = 0xF426;
-
-        // SiLabs
-        int vid = 0x10c4;
-        int pid = 0x8a7e;
+

         /// <summary>
@@ -65,6 +57,10 @@
         public string NameFilter { get; set; }

         System.Timers.Timer pollingTimer;
+
+
+
+

         /// <summary>
         /// Manages Treehopper boards connected to the computer. If optional filter parameters are provided, only boards matching the filter will be available.
@@ -189,7 +185,7 @@
                 bool boardExistsInDeviceList = false;
                 foreach (UsbRegistry regDevice in UsbDevice.AllDevices)
                 {
-                    if (regDevice.Vid == vid && regDevice.Pid == pid)
+                    if (regDevice.Vid == TreehopperUsb.Settings.Vid && regDevice.Pid == TreehopperUsb.Settings.Pid)
                     {
                         if (regDevice.Device != null)
                         {
@@ -222,7 +218,7 @@
             // Now add any new boards
             foreach (UsbRegistry regDevice in UsbDevice.AllDevices)
             {
-                if (regDevice.Vid == vid && regDevice.Pid == pid)
+                if (regDevice.Vid == TreehopperUsb.Settings.Vid && regDevice.Pid == TreehopperUsb.Settings.Pid)
                 {
                     if (regDevice.Device != null)
                     {
@@ -260,7 +256,7 @@
         {
             if (PollingTimerIsEnabled)
                 return;
-            if (e.Device.IdVendor != vid || e.Device.IdProduct != pid)
+            if (e.Device.IdVendor != TreehopperUsb.Settings.Vid || e.Device.IdProduct != TreehopperUsb.Settings.Pid)
                 return;

             if(e.EventType == EventType.DeviceArrival) // board added
@@ -269,7 +265,7 @@
                 {
                     if(regDevice.Device != null)
                     {
-						if (regDevice.Vid == vid || regDevice.Pid == pid) {
+						if (regDevice.Vid == TreehopperUsb.Settings.Vid || regDevice.Pid == TreehopperUsb.Settings.Pid) {
 							bool isInBoardList = false;
 							foreach (var board in Boards) {
 								if (regDevice.SymbolicName == board.Connection.DevicePath) {


More database fixes?

More database fixes?

--- NadekoBot.Core/Modules/Xp/Services/XpService.cs
+++ NadekoBot.Core/Modules/Xp/Services/XpService.cs
@@ -510,13 +510,10 @@
             {
                 du = uow.DiscordUsers.GetOrCreate(user);
                 totalXp = du.TotalXp;
-                var ranks = await Task.WhenAll(
-                    uow.DiscordUsers.GetUserGlobalRankingAsync(user.Id),
-                    uow.Xp.GetUserGuildRankingAsync(user.Id, user.GuildId));
+                globalRank = uow.DiscordUsers.GetUserGlobalRank(user.Id);
+                guildRank = await uow.Xp.GetUserGuildRankingAsync(user.Id, user.GuildId);
                 stats = uow.Xp.GetOrCreateUser(user.GuildId, user.Id);
-                globalRank = ranks[0];
-                guildRank = ranks[1];
-                uow.Complete();
+                await uow.CompleteAsync();
             }

             return new FullUserStats(du,


Fixlet to get a better webApplicationName

--- NugetCracker/Components/CSharp/CSharpWebsite.cs
+++ NugetCracker/Components/CSharp/CSharpWebsite.cs
@@ -1,5 +1,7 @@
 using System.IO;
 using System.Collections.Generic;
+using System.Linq;
+using NugetCracker.Interfaces;

 namespace NugetCracker.Components.CSharp
 {
@@ -11,7 +13,7 @@
 			base(Path.Combine(Path.GetDirectoryName(solutionPath), webApplicationPath))
 		{
 			SolutionPath = solutionPath;
-			Name = webApplicationName;
+			Name = webApplicationName.Split('\\').Last(s => !string.IsNullOrWhiteSpace(s));
 			_isWeb = true;
 		}

@@ -29,7 +31,7 @@

 		public override string Type { get { return "C# Web Site"; } }

-		protected override void UpdatePackagesOnProject(Interfaces.INugetSpec newPackage)
+		protected override void UpdatePackagesOnProject(INugetSpec newPackage)
 		{
 			// TODO
 		}


implemented prim inventories for nhibernate

--- OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ OpenSim/Data/NHibernate/NHibernateRegionData.cs
@@ -250,6 +250,16 @@
                 {
                     SOG[p.ParentUUID].AddPart(p);
                 }
+                // get the inventory
+
+                ICriteria InvCriteria = session.CreateCriteria(typeof(TaskInventoryItem));
+                InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID));
+                IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
+                foreach (TaskInventoryItem i in InvCriteria.List())
+                {
+                    inventory.Add(i);
+                }
+                p.RestoreInventoryItems(inventory);
             }
             foreach (SceneObjectGroup g in SOG.Values)
             {
@@ -385,7 +395,26 @@
         /// <param name="items"></param>
         public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items)
         {
-
+             ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem));
+             criteria.Add(Expression.Eq("ParentPartID", primID));
+             try
+             {
+                 foreach (TaskInventoryItem i in criteria.List())
+                 {
+                     session.Delete(i);
+                 }
+
+                 foreach (TaskInventoryItem i in items)
+                 {
+                     session.Save(i);
+
+                 }
+                 session.Flush();
+             }
+             catch (Exception e)
+             {
+                 m_log.Error("[NHIBERNATE] StoreInvetory", e);
+             }
         }
     }
 }


fix build break

fix build break

--- OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ OpenSim/Data/NHibernate/NHibernateRegionData.cs
@@ -298,7 +298,7 @@
                 Terrain t = session.Load(typeof(Terrain), regionID) as Terrain;
                 return t.Doubles;
             }
-            catch (NHibernate.ObjectNotFoundException e)
+            catch (ObjectNotFoundException e)
             {
                 m_log.Info("No terrain yet");
                 return null;


documentation (OnClientMovement)

documentation (OnClientMovement)

--- OpenSim/Region/Framework/Scenes/EventManager.cs
+++ OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -59,6 +59,13 @@

         public delegate void ClientMovement(ScenePresence client);

+        /// <summary>
+        /// Trigerred when an agent moves.
+        /// </summary>
+        /// <remarks>
+        /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.HandleAgentUpdate"/>
+        /// prior to <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.TriggerScenePresenceUpdated"/>
+        /// </remarks>
         public event ClientMovement OnClientMovement;

         public delegate void OnTerrainTaintedDelegate();


Normalized casing in version endpoint

Normalized casing in version endpoint

--- src/func/Version.cs
+++ src/func/Version.cs
@@ -7,7 +7,6 @@

 using Microsoft.Azure.WebJobs;
 using Microsoft.Azure.WebJobs.Extensions.Http;
-using Microsoft.Azure.WebJobs.Host;

 namespace MusicBot.Functions
 {
@@ -15,9 +14,9 @@
     {
         public static object AssemblyInfo { get; private set; }

-        [FunctionName("Version")]
+        [FunctionName("version")]
         public static HttpResponseMessage Run(
-            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequestMessage req, TraceWriter log)
+            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequestMessage req)
         {
             return req.CreateResponse(HttpStatusCode.OK, Assembly.GetExecutingAssembly().FullName);
         }


Raw int numbers (ex.LSL Constants) are displayed like "1.000000" when type cast to string

--- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -1396,13 +1396,19 @@
                 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value);
                 m_string=s;
             }
-
-            public LSLString(LSLInteger i)
+
+            public LSLString(int i)
             {
                 string s = String.Format("{0}", i);
                 m_string = s;
             }

+            public LSLString(LSLInteger i)
+            {
+                string s = String.Format("{0}", i);
+                m_string = s;
+            }
+
             #endregion

             #region Operators
@@ -1468,6 +1474,11 @@
             public static explicit operator LSLString(double d)
             {
                 return new LSLString(d);
+            }
+
+            static public explicit operator LSLString(int i)
+            {
+                return new LSLString(i);
             }

             public static explicit operator LSLString(LSLFloat f)


Defect resolution - HETS Pdf interface

Defect resolution - HETS Pdf interface

--- PDF/src/PDF.Server/Controllers/PDFController.cs
+++ PDF/src/PDF.Server/Controllers/PDFController.cs
@@ -73,7 +73,7 @@
                 _logger.LogInformation("GetRentalAgreementPdf [FileName: {0}] - Pdf Length: {1}", name, pdfResponse.Length);

                 _logger.LogInformation("GetRentalAgreementPdf [FileName: {0}] - Done", name);
-                return File(pdfResponse, "application/pdf");
+                return File(pdfResponseBytes, "application/pdf");
             }
             catch (Exception e)
             {


Add safeguard in move folder process to avoid exception if folder for record that was deleted is encountered

--- PX.SM.BoxStorageProvider/ScreenConfiguration.cs
+++ PX.SM.BoxStorageProvider/ScreenConfiguration.cs
@@ -69,7 +69,9 @@
             var tokenHandler = PXGraph.CreateInstance<UserTokenHandler>();

             PXLongOperation.StartOperation(this, () =>
-            {
+            {
+                EntityHelper entityHelper = new EntityHelper(this);
+
                 var screenFolderCache = (BoxFolderCache)fileHandlerGraph.FoldersByScreen.Select(Screens.Current.ScreenID);

                 var list = new List<BoxUtils.FileFolderInfo>();
@@ -92,11 +94,15 @@
                     BoxFolderCache bfc = (BoxFolderCache) fileHandlerGraph.FoldersByFolderID.Select(folder.ID);
                     if(bfc != null && bfc.RefNoteID.HasValue)
                     {
+                        object entityRow = entityHelper.GetEntityRow(new Guid?(bfc.RefNoteID.Value), true);
+                        if (entityRow == null) continue; //GetOrCreateSublevelFolder will throw an exception because the entity no longer exist - folder was deleted after initial Box sync...
+
                         string presumedParentFolderID = screenFolderCache.FolderID;
                         if (fileHandlerGraph.FieldsGroupingByScreenID.Select(Screens.Current.ScreenID).Any())
                         {
                             presumedParentFolderID = fileHandlerGraph.GetOrCreateSublevelFolder(tokenHandler, Screens.Current.ScreenID, screenFolderCache.FolderID, bfc.RefNoteID.Value);
                         }
+
                         //if nested under the wrong folder
                         if (folder.ParentFolderID != presumedParentFolderID)
                         {


basic method.

basic method.

--- SampleCSharp7/ClassesAndGenerics/PerformAction.cs
+++ SampleCSharp7/ClassesAndGenerics/PerformAction.cs
@@ -1,12 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using static System.Console;

 namespace ClassesAndGenerics
 {
     public class PerformAction<T>
     {
-        private T _value;
+        private readonly T _value;

+        public PerformAction(T value) => _value = value;
+
+        public void IdentityDataType()
+        {
+            WriteLine($" The data type of the supplied variable is {_value.GetType()}");
+        }
     }
 }


Code clean up

Code clean up

--- Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
+++ Samples.CSharp7/Source/CSharp7.DemoApp/Program.cs
@@ -87,40 +87,13 @@
             Write($"We have to remove {tobeRemoved} characters for ");

             WriteLine($"***** Reapted String *****");
-            Write($"Enter a String [For searching a]");
+            Write($"Enter a String [For searching (a)]");
             var inputString = ReadLine();
             Write($"Enter The Length: ");
             long n = Convert.ToInt64(Console.ReadLine());

             var count = new RepeatedString().Execute(inputString, n);
             WriteLine($"a found {count} times");
-
-            //long count = 0;
-            //long remaining = 0;
-
-            //long toTraverse = (inputString.Length <= n) ? inputString.Length : n;
-            //for(int iCtr=0; iCtr<toTraverse; iCtr++)
-            //{
-            //    if(inputString[iCtr] == 'a')
-            //    {
-            //        count++;
-            //    }
-            //}
-
-            //if(inputString.Length <= n)
-            //{
-            //    count = (n / inputString.Length) * count;
-            //    remaining = (n % inputString.Length);
-
-            //    for (int iCtr = 0; iCtr < remaining; iCtr++)
-            //    {
-            //        if (inputString[iCtr] == 'a')
-            //        {
-            //            count++;
-            //        }
-            //    }
-            //}
-

             new ShowLogicDemos()
                 .JumpingOnTheCloudsDemo()


UserQueries - When opening one with lite filters, toString is not filled - fixed

--- Signum.Windows/DynamicQuery/FilterBuilder.xaml.cs
+++ Signum.Windows/DynamicQuery/FilterBuilder.xaml.cs
@@ -60,6 +60,11 @@
             Type type = f.Token.Type;
             if (type.IsLite())
             {
+                Lite lite = f.RealValue as Lite;
+
+               if (lite != null && string.IsNullOrEmpty(lite.ToStr))
+                    Server.FillToStr(lite);
+
                 Type cleanType = Reflector.ExtractLite(type);

                 if (Reflector.IsLowPopulation(cleanType) && !(implementations is ImplementedByAllAttribute))


Kommentert FileUtility og ryddet litt.

Kommentert FileUtility og ryddet litt.

--- SikkerDigitalPost.Klient/Utilities/FileUtility.cs
+++ SikkerDigitalPost.Klient/Utilities/FileUtility.cs
@@ -60,22 +60,34 @@
         /// Hvis din basesti er "C:\base" og du sender inn "mappe\hei.txt", så vil filen lagres
         /// på "C:\base\mappe\hei.txt".
         /// </summary>
-        /// <param name="pathRelativeToBase">The relative part of the path. The base path is set in your settings. </param>
-        /// <param name="data">The data to write.</param>
+        /// <param name="pathRelativeToBase">Relativ del av stien. Den absolutte delen er i FileUtility.BasePath </param>
+        /// <param name="data">Data som skal skrives.</param>
+        public static void WriteXmlToFileInBasePath(string pathRelativeToBase, string xml)
+        {
+            var doc = XDocument.Parse(xml);
+            WriteToFileInBasePath(pathRelativeToBase, doc.ToString());
+        }
+
+        /// <summary>
+        /// Hvis din basesti er "C:\base" og du sender inn "mappe\hei.txt", så vil filen lagres
+        /// på "C:\base\mappe\hei.txt".
+        /// </summary>
+        /// <param name="pathRelativeToBase">Relativ del av stien. Den absolutte delen er i FileUtility.BasePath </param>
+        /// <param name="data">Data som skal skrives.</param>
         public static void WriteToFileInBasePath(string pathRelativeToBase, string data)
         {
             File.WriteAllText(Path.Combine(BasePath,pathRelativeToBase),data);
         }

+        /// <summary>
+        /// Hvis din basesti er "C:\base" og du sender inn "mappe\hei.txt", så vil filen lagres
+        /// på "C:\base\mappe\hei.txt". Legg er tekst til allerede eksisterende tekst.
+        /// </summary>
+        /// <param name="pathRelativeToBase">Relativ del av stien. Den absolutte delen er i FileUtility.BasePath </param>
+        /// <param name="data">Data som skal skrives.</param>
         public static void AppendToFileInBasePath(string pathRelativeToBase, string data)
         {
             File.AppendAllText(Path.Combine(BasePath, pathRelativeToBase),data);
         }
-
-        public static void WriteXmlToFileInBasePath(string pathRelativeToBase, string xml)
-        {
-            XDocument doc = XDocument.Parse(xml);
-            WriteToFileInBasePath(pathRelativeToBase, doc.ToString());
-        }
     }
 }


Renamed all string Equip methods to "Quick<Action>" to follow the same format.

--- Some2DRPG/Some2DRPG/GameObjects/Characters/NPC.cs
+++ Some2DRPG/Some2DRPG/GameObjects/Characters/NPC.cs
@@ -95,7 +95,7 @@
             Drawables.Union(item.Drawables);
         }

-        public void Unequip(string itemName)
+        public void QuickUnequip(string itemName)
         {
             Unequip(ItemRepository.GameItems[itemName]);
         }
@@ -113,7 +113,7 @@
             Equiped.Remove(itemType);
         }

-        public bool IsEquiped(string itemName)
+        public bool QuickIsEquiped(string itemName)
         {
             return IsEquiped(ItemRepository.GameItems[itemName]);
         }


Started to change from interactiveservice to interactive.

--- SoraBot-v2/SoraBot-v2/Services/ReminderService.cs
+++ SoraBot-v2/SoraBot-v2/Services/ReminderService.cs
@@ -5,7 +5,7 @@
 using System.Threading;
 using System.Threading.Tasks;
 using Discord;
-using Discord.Addons.InteractiveCommands;
+using Discord.Addons.Interactive;
 using Discord.Commands;
 using Discord.WebSocket;
 using Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal;
@@ -113,8 +113,8 @@
                     });
                 }
                 var msg = await context.Channel.SendMessageAsync("", embed: eb);
-                var response =
-                    await _interactive.WaitForMessage(context.User, context.Channel, TimeSpan.FromSeconds(45));
+                //var response = await _interactive.WaitForMessage(context.User, context.Channel, TimeSpan.FromSeconds(45));
+                var response = await _interactive.NextMessageAsync(context);//TODO test if this listens only to source user and source channel
                 await msg.DeleteAsync();
                 if (response == null)
                 {


Vendors work again, with nearly no change. (#1111)

* Vendors work again, with nearly no change.

Get's rid of old code. Removes item from player with networking, and saves item to database once it has been transfered to Vendor.

* Update Player_Commerce.cs

Updated comments

--- Source/ACE.Server/WorldObjects/Player_Commerce.cs
+++ Source/ACE.Server/WorldObjects/Player_Commerce.cs
@@ -242,20 +242,19 @@
                 else
                 {
                     // remove item from inventory.
-                    TryRemoveFromInventory(profile.Guid);
+                    TryRemoveFromInventoryWithNetworking(item);
                 }

                 //Session.Network.EnqueueSend(new GameMessagePrivateUpdateInstanceId(profile, PropertyInstanceId.Container, new ObjectGuid(0).Full));

                 item.SetPropertiesForVendor();
-
-                // clean up the shard database.
-                throw new NotImplementedException();
-                // todo fix for EF
-                //DatabaseManager.Shard.DeleteObject(item.SnapShotOfAceObject(), null);
-
                 Session.Network.EnqueueSend(new GameMessageDeleteObject(item));
                 purchaselist.Add(item);
+                // We must update the database with the latest ContainerId.
+                // If we don't, the player can drop the item, log out, and log back in. If the landblock hasn't queued a database save in that time,
+                // the player will end up loading with this object in their inventory even though the landblock is the true owner. This is because
+                // when we load player inventory, the database still has the record that shows this player as the ContainerId for the item.
+                item.SaveBiotaToDatabase();
             }

             var vendor = CurrentLandblock?.GetObject(vendorId) as Vendor;


fixing /hr for some apartments (#1778)

fixing /hr for some apartments (#1778)

--- Source/ACE.Server/WorldObjects/Player_Location.cs
+++ Source/ACE.Server/WorldObjects/Player_Location.cs
@@ -294,8 +294,11 @@
             actionChain.EnqueueChain();
         }

-        public void Teleport(Position newPosition)
-        {
+        public void Teleport(Position _newPosition)
+        {
+            var newPosition = new Position(_newPosition);
+            newPosition.PositionZ += 0.005f;
+
             //Console.WriteLine($"{Name}.Teleport() - Sending to {newPosition.ToLOCString()}");

             Teleporting = true;


revert 3537 based on further investigation (#3556)

* Revert "Test: adjust magic CriticalMultiplier/CripplingBlow/CD/CDR to match physical, add comments for further investigation about the combination of these factors (#3537)"

This reverts commit e66227811c1220fdf0ecad24157a56850620b035.

* add comments

--- Source/ACE.Server/WorldObjects/SpellProjectile.cs
+++ Source/ACE.Server/WorldObjects/SpellProjectile.cs
@@ -462,13 +462,14 @@
                 // if so, did they use the same 1.5x formula as war magic, instead of 2.0x?
                 if (criticalHit)
                 {
-                    // TODO: review how this is factored in
-                    // should this apply to just the crit bonus, or everything?
-                    // should this be additively combined with DR?
+                    // TODO: review how CD/CDR is factored in
+                    // there is evidence to indicate that CriticalMultiplier did indeed factor in only for the critDamageBonus portion
+                    // however, CD/CDR might have been applied to the total damage (base damage + crit portion) for crits
+                    // also investigate if damage and crit damage ratings should be combined additively, instead of multiplicatively
+
                     weaponCritDamageMod = GetWeaponCritDamageMod(sourceCreature, attackSkill, target);

-                    //critDamageBonus = lifeMagicDamage * 0.5f * weaponCritDamageMod;
-                    critDamageBonus = lifeMagicDamage * 0.5f;
+                    critDamageBonus = lifeMagicDamage * 0.5f * weaponCritDamageMod;
                 }

                 weaponResistanceMod = GetWeaponResistanceModifier(sourceCreature, attackSkill, Spell.DamageType);
@@ -478,7 +479,7 @@

                 resistanceMod = (float)Math.Max(0.0f, target.GetResistanceMod(resistanceType, this, null, weaponResistanceMod));

-                finalDamage = (lifeMagicDamage + critDamageBonus) * weaponCritDamageMod * elementalDamageMod * slayerMod * resistanceMod * absorbMod;
+                finalDamage = (lifeMagicDamage + critDamageBonus) * elementalDamageMod * slayerMod * resistanceMod * absorbMod;
             }
             // war/void magic projectiles
             else
@@ -506,12 +507,14 @@
                     else   // PvE: 50% of the MAX damage added to normal damage roll
                         critDamageBonus = Spell.MaxDamage * 0.5f;

-                    // TODO: review how this is factored in
-                    // should this apply to just the crit bonus, or everything?
-                    // should this be additively combined with DR?
+                    // TODO: review how CD/CDR is factored in
+                    // there is evidence to indicate that CriticalMultiplier did indeed factor in only for the critDamageBonus portion
+                    // however, CD/CDR might have been applied to the total damage (base damage + crit portion) for crits
+                    // also investigate if damage and crit damage ratings should be combined additively, instead of multiplicatively
+
                     weaponCritDamageMod = GetWeaponCritDamageMod(sourceCreature, attackSkill, target);

-                    //critDamageBonus *= weaponCritDamageMod;
+                    critDamageBonus *= weaponCritDamageMod;
                 }

                 /* War Magic skill-based damage bonus
@@ -553,7 +556,7 @@

                 finalDamage = baseDamage + critDamageBonus + skillBonus;

-                finalDamage *= weaponCritDamageMod * elementalDamageMod * slayerMod * resistanceMod * absorbMod;
+                finalDamage *= elementalDamageMod * slayerMod * resistanceMod * absorbMod;
             }

             // show debug info


Re-enabled parallelism in the maptile cleanup for debug builds.

--- Source/Anaximander/TileMapping/TileImageWriter.cs
+++ Source/Anaximander/TileMapping/TileImageWriter.cs
@@ -224,7 +224,7 @@
 			var counter = 0;

 #if DEBUG
-			var options = new ParallelOptions { MaxDegreeOfParallelism = 1 }; // -1 means full parallel.  1 means non-parallel.
+			var options = new ParallelOptions { MaxDegreeOfParallelism = -1 }; // -1 means full parallel.  1 means non-parallel.

 			Parallel.ForEach(files, options, (filename) => {
 #else


Fixed compiler warning.

Fixed compiler warning.

--- Source/Magick.NET/Shared/MagickImageCollection.cs
+++ Source/Magick.NET/Shared/MagickImageCollection.cs
@@ -213,7 +213,7 @@
         /// Converts the specified instance to a byte array.
         /// </summary>
         /// <param name="collection">The <see cref="MagickImageCollection"/> to convert.</param>
-        public static explicit operator byte[] (MagickImageCollection collection)
+        public static explicit operator byte[](MagickImageCollection collection)
         {
             Throw.IfNull(nameof(collection), collection);


add Task-based async versions of APIs

add Task-based async versions of APIs

--- samples/OIDC/Thinktecture.IdentityModel.Oidc/OidcClient.cs
+++ samples/OIDC/Thinktecture.IdentityModel.Oidc/OidcClient.cs
@@ -7,6 +7,7 @@
 using System.Net.Http;
 using System.Security.Claims;
 using System.Security.Cryptography.X509Certificates;
+using System.Threading.Tasks;
 using Thinktecture.IdentityModel.Clients;

 namespace Thinktecture.IdentityModel.Oidc
@@ -60,6 +61,29 @@
             var json = JObject.Parse(response.Content.ReadAsStringAsync().Result);
             return json.ToObject<OidcTokenResponse>();
         }
+
+        public async static Task<OidcTokenResponse> CallTokenEndpointAsync(Uri tokenEndpoint, Uri redirectUri, string code, string clientId, string clientSecret)
+        {
+            var client = new HttpClient
+            {
+                BaseAddress = tokenEndpoint
+            };
+
+            client.SetBasicAuthentication(clientId, clientSecret);
+
+            var parameter = new Dictionary<string, string>
+                {
+                    { "grant_type", "authorization_code" },
+                    { "code", code },
+                    { "redirect_uri", redirectUri.AbsoluteUri }
+                };
+
+            var response = await client.PostAsync("", new FormUrlEncodedContent(parameter));
+            response.EnsureSuccessStatusCode();
+
+            var json = JObject.Parse(await response.Content.ReadAsStringAsync());
+            return json.ToObject<OidcTokenResponse>();
+        }

         public static OidcTokenResponse RefreshAccessToken(Uri tokenEndpoint, string clientId, string clientSecret, string refreshToken)
         {
@@ -94,13 +118,45 @@
             return handler.ValidateToken(token, parameters);
         }

+        public async static Task<IEnumerable<Claim>> GetUserInfoClaimsAsync(Uri userInfoEndpoint, string accessToken)
+        {
+            var client = new HttpClient
+            {
+                BaseAddress = userInfoEndpoint
+            };
+
+            client.SetBearerToken(accessToken);
+
+            var response = await client.GetAsync("");
+            response.EnsureSuccessStatusCode();
+
+            var dictionary = await response.Content.ReadAsAsync<Dictionary<string, string>>();
+
+            var claims = new List<Claim>();
+            foreach (var pair in dictionary)
+            {
+                if (pair.Value.Contains(','))
+                {
+                    foreach (var item in pair.Value.Split(','))
+                    {
+                        claims.Add(new Claim(pair.Key, item));
+                    }
+                }
+                else
+                {
+                    claims.Add(new Claim(pair.Key, pair.Value));
+                }
+            }
+
+            return claims;
+        }
         public static IEnumerable<Claim> GetUserInfoClaims(Uri userInfoEndpoint, string accessToken)
         {
             var client = new HttpClient
             {
                 BaseAddress = userInfoEndpoint
             };
-
+
             client.SetBearerToken(accessToken);

             var response = client.GetAsync("").Result;


Fix typo (fixes #36)

Fix typo (fixes #36)

--- StackExchange.Profiling/UI/MiniProfilerHandler.cs
+++ StackExchange.Profiling/UI/MiniProfilerHandler.cs
@@ -116,7 +116,7 @@
                     showControls = showControls ?? MiniProfiler.Settings.ShowControls ? "true" : "false",
                     currentId = profiler.Id,
                     authorized = authorized ? "true" : "false",
-                    seExistingjQuery = useExistingjQuery ?? MiniProfiler.Settings.UseExistingjQuery ? "true" : "false"
+                    useExistingjQuery = useExistingjQuery ?? MiniProfiler.Settings.UseExistingjQuery ? "true" : "false"
                 });

             }


PlatformPreferencesDatabasesTests: Fix PlatformPrefsTest in preparation for database rewrite

--- Snowflake.Tests/Platform/PlatformPreferencesDatabaseTests.cs
+++ Snowflake.Tests/Platform/PlatformPreferencesDatabaseTests.cs
@@ -37,8 +37,8 @@
                 {"FakeScraper", fakeScraper.Object}
             };

-            fakePluginManager.SetupGet(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
-            fakePluginManager.SetupGet(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);
+            fakePluginManager.Setup(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
+            fakePluginManager.Setup(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);

             IPlatformPreferenceDatabase database = new PlatformPreferencesDatabase(filename, fakePluginManager.Object);

@@ -73,10 +73,10 @@
                 {"FakeScraper", fakeScraper.Object}
             };

-            fakePluginManager.SetupGet(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
-            fakePluginManager.SetupGet(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);
+            fakePluginManager.Setup(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
+            fakePluginManager.Setup(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);

-            fakePlatform.SetupGet(platform => platform.PlatformID).Returns("TESTPLATFORM");
+            fakePlatform.Setup(platform => platform.PlatformID).Returns("TESTPLATFORM");
             IPlatformPreferenceDatabase database = new PlatformPreferencesDatabase(filename, fakePluginManager.Object);

             database.AddPlatform(fakePlatform.Object);
@@ -116,8 +116,8 @@
                 {"FakeScraper", fakeScraper.Object}
             };

-            fakePluginManager.SetupGet(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
-            fakePluginManager.SetupGet(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);
+            fakePluginManager.Setup(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
+            fakePluginManager.Setup(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);

             fakePlatform.SetupGet(platform => platform.PlatformID).Returns("TESTPLATFORM");
             IPlatformPreferenceDatabase database = new PlatformPreferencesDatabase(filename, fakePluginManager.Object);
@@ -157,8 +157,8 @@
                 {"FakeScraper", fakeScraper.Object}
             };

-            fakePluginManager.SetupGet(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
-            fakePluginManager.SetupGet(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);
+            fakePluginManager.Setup(manager => manager.Plugins<IEmulatorBridge>()).Returns(loadedEmulators);
+            fakePluginManager.Setup(manager => manager.Plugins<IScraper>()).Returns(loadedScrapers);

             fakePlatform.SetupGet(platform => platform.PlatformID).Returns("TESTPLATFORM");
             IPlatformPreferenceDatabase database = new PlatformPreferencesDatabase(filename, fakePluginManager.Object);


Set bindable default outside the if statement instead

--- osu.Framework/Configuration/ConfigManager.cs
+++ osu.Framework/Configuration/ConfigManager.cs
@@ -42,14 +42,15 @@

             if (bindable == null)
             {
-                bindable = new BindableDouble(value) { Default = value };
-                addBindable(lookup, bindable);
-            }
-            else
-            {
-                bindable.Default = bindable.Value = value;
-            }
-
+                bindable = new BindableDouble(value);
+                addBindable(lookup, bindable);
+            }
+            else
+            {
+                bindable.Value = value;
+            }
+
+            bindable.Default = value;
             if (min.HasValue) bindable.MinValue = min.Value;
             if (max.HasValue) bindable.MaxValue = max.Value;

@@ -62,14 +63,15 @@

             if (bindable == null)
             {
-                bindable = new BindableFloat(value) { Default = value };
-                addBindable(lookup, bindable);
-            }
-            else
-            {
-                bindable.Default = bindable.Value = value;
-            }
-
+                bindable = new BindableFloat(value);
+                addBindable(lookup, bindable);
+            }
+            else
+            {
+                bindable.Value = value;
+            }
+
+            bindable.Default = value;
             if (min.HasValue) bindable.MinValue = min.Value;
             if (max.HasValue) bindable.MaxValue = max.Value;

@@ -82,14 +84,15 @@

             if (bindable == null)
             {
-                bindable = new BindableInt(value) { Default = value };
-                addBindable(lookup, bindable);
-            }
-            else
-            {
-                bindable.Default = bindable.Value = value;
-            }
-
+                bindable = new BindableInt(value);
+                addBindable(lookup, bindable);
+            }
+            else
+            {
+                bindable.Value = value;
+            }
+
+            bindable.Default = value;
             if (min.HasValue) bindable.MinValue = min.Value;
             if (max.HasValue) bindable.MaxValue = max.Value;

@@ -102,13 +105,15 @@

             if (bindable == null)
             {
-                bindable = new BindableBool(value) { Default = value };
-                addBindable(lookup, bindable);
-            }
-            else
-            {
-                bindable.Default = bindable.Value = value;
-            }
+                bindable = new BindableBool(value);
+                addBindable(lookup, bindable);
+            }
+            else
+            {
+                bindable.Value = value;
+            }
+
+            bindable.Default = value;

             return bindable;
         }
@@ -120,7 +125,10 @@
             if (bindable == null)
                 bindable = set(lookup, value);
             else
-                bindable.Default = bindable.Value = value;
+                bindable.Value = value;
+
+            bindable.Default = value;
+
             return bindable;
         }

@@ -132,7 +140,7 @@

         private Bindable<U> set<U>(T lookup, U value)
         {
-            Bindable<U> bindable = new Bindable<U>(value) { Default = value };
+            Bindable<U> bindable = new Bindable<U>(value);
             addBindable(lookup, bindable);
             return bindable;
         }


Add comments to layout implementation to aid comprehension

--- osu.Framework/Graphics/UserInterface/Menu.cs
+++ osu.Framework/Graphics/UserInterface/Menu.cs
@@ -352,40 +352,56 @@
             {
                 var inputManager = GetContainingInputManager();

+                // This is the default position to which this menu should be anchored to the parent menu item which triggered it (top left of the triggering item)
                 var itemAlignmentPosition = triggeringItem.ToSpaceOfOtherDrawable(Vector2.Zero, parentMenu);

+                // The "maximum" position is the worst case position of the bottom right corner of this menu
+                // if this menu is anchored top-left to the triggering item.
                 var menuMaximumPosition = triggeringItem.ToSpaceOfOtherDrawable(
                     new Vector2(
                         triggeringItem.DrawWidth + DrawWidth,
                         triggeringItem.DrawHeight + DrawHeight), inputManager);
+
+                // The "minimum" position is the worst case position of the top left corner of this menu
+                // if this menu is anchored bottom-right to the parent menu item that triggered it.
                 var menuMinimumPosition = triggeringItem.ToSpaceOfOtherDrawable(new Vector2(-DrawWidth, -DrawHeight), inputManager);

+                // We will be making anchor adjustments by changing the parent's "submenu container" to be positioned and anchored correctly to the parent menu.
+                // Therefore note that all X and Y adjustments below will occur in the parent menu's coordinates.
                 var parentSubmenuContainer = parentMenu.submenuContainer;

                 if (Direction == Direction.Vertical)
                 {
+                    // If this menu won't fit on the screen horizontally if it's anchored to the right of its triggering item, but it will fit when anchored to the left...
                     if (menuMaximumPosition.X > inputManager.DrawWidth && menuMinimumPosition.X > 0)
                     {
+                        // switch the origin and position of the submenu container so that it's right-aligned to the left side of the triggering item.
                         parentSubmenuContainer.Origin = switchAxisAnchors(parentSubmenuContainer.Origin, Anchor.x0, Anchor.x2);
                         parentSubmenuContainer.X = 0;
                     }
                     else
                     {
+                        // otherwise, switch the origin and position of the submenu container so that it's left-aligned to the right side of the triggering item.
                         parentSubmenuContainer.Origin = switchAxisAnchors(parentSubmenuContainer.Origin, Anchor.x2, Anchor.x0);
                         parentSubmenuContainer.X = triggeringItem.DrawWidth;
                     }

+                    // If this menu won't fit on the screen vertically if its top edge is aligned to the top of the triggering item,
+                    // but it will fit if its bottom edge is aligned to the bottom of the triggering item...
                     if (menuMaximumPosition.Y > inputManager.DrawHeight && menuMinimumPosition.Y > 0)
                     {
+                        // switch the origin and position of the submenu container so that it's bottom-aligned to the bottom of the triggering item.
                         parentSubmenuContainer.Origin = switchAxisAnchors(parentSubmenuContainer.Origin, Anchor.y0, Anchor.y2);
                         parentSubmenuContainer.Y = itemAlignmentPosition.Y + triggeringItem.DrawHeight;
                     }
                     else
                     {
+                        // otherwise, switch the origin and position of the submenu container so that it's top-aligned to the top of the triggering item.
                         parentSubmenuContainer.Origin = switchAxisAnchors(parentSubmenuContainer.Origin, Anchor.y2, Anchor.y0);
                         parentSubmenuContainer.Y = itemAlignmentPosition.Y;
                     }
                 }
+                // the "horizontal" case is the same as above, but with the axes everywhere swapped.
                 else
                 {
                     if (menuMaximumPosition.Y > inputManager.DrawHeight && menuMinimumPosition.Y > 0)


AdminOrders was not using the last action date filters

--- Purchasing.Web/Controllers/HistoryController.cs
+++ Purchasing.Web/Controllers/HistoryController.cs
@@ -98,7 +98,12 @@
         /// Page to view Administrative Workgroup Orders
         /// </summary>
         /// <returns></returns>
-        public ActionResult AdminOrders(string selectedOrderStatus, DateTime? startDate, DateTime? endDate, DateTime? startLastActionDate, DateTime? endLastActionDate, bool showPending = false)
+        public ActionResult AdminOrders(string selectedOrderStatus,
+            DateTime? startDate,
+            DateTime? endDate,
+            DateTime? startLastActionDate,
+            DateTime? endLastActionDate,
+            bool showPending = false)
         {
             //TODO: Review even/odd display of table once Trish has look at it. (This page is a single, and the background color is the same as the even background color.
             var saveSelectedOrderStatus = selectedOrderStatus;
@@ -114,7 +119,7 @@
                 isComplete = true;
             }

-            var orders = _orderService.GetAdministrativeListofOrders(isComplete, showPending, selectedOrderStatus, startDate, endDate);
+            var orders = _orderService.GetAdministrativeListofOrders(isComplete, showPending, selectedOrderStatus, startDate, endDate, startLastActionDate, endLastActionDate);

             if (saveSelectedOrderStatus == "Received")
             {


Update BufferedSumoLogicTarget.cs

Update BufferedSumoLogicTarget.cs

--- SumoLogic.Logging.NLog/BufferedSumoLogicTarget.cs
+++ SumoLogic.Logging.NLog/BufferedSumoLogicTarget.cs
@@ -34,7 +34,6 @@
     using System.Timers;
     using global::NLog;
     using global::NLog.Targets;
-    using NLog.Common;
     using SumoLogic.Logging.Common.Log;
     using SumoLogic.Logging.Common.Queue;
     using SumoLogic.Logging.Common.Sender;


Revert Menu.UpdateAfterChildren changes which are not required anymore

--- osu.Framework/Graphics/UserInterface/Menu.cs
+++ osu.Framework/Graphics/UserInterface/Menu.cs
@@ -330,44 +330,40 @@

             if (!sizeCache.IsValid)
             {
-                ComputeSize();
+                // Our children will be relatively-sized on the axis separate to the menu direction, so we need to compute
+                // that size ourselves, based on the content size of our children, to give them a valid relative size
+
+                float width = 0;
+                float height = 0;
+
+                foreach (var item in Children)
+                {
+                    width = Math.Max(width, item.ContentDrawWidth);
+                    height = Math.Max(height, item.ContentDrawHeight);
+                }
+
+                // When scrolling in one direction, ItemsContainer is auto-sized in that direction and relative-sized in the other
+                // In the case of the auto-sized direction, we want to use its size. In the case of the relative-sized direction, we want
+                // to use the (above) computed size.
+                width = Direction == Direction.Horizontal ? ItemsContainer.Width : width;
+                height = Direction == Direction.Vertical ? ItemsContainer.Height : height;
+
+                width = Math.Min(MaxWidth, width);
+                height = Math.Min(MaxHeight, height);
+
+                // Regardless of the above result, if we are relative-sizing, just use the stored width/height
+                width = RelativeSizeAxes.HasFlag(Axes.X) ? Width : width;
+                height = RelativeSizeAxes.HasFlag(Axes.Y) ? Height : height;
+
+                if (State == MenuState.Closed && Direction == Direction.Horizontal)
+                    width = 0;
+                if (State == MenuState.Closed && Direction == Direction.Vertical)
+                    height = 0;
+
+                UpdateSize(new Vector2(width, height));
+
                 sizeCache.Validate();
             }
-        }
-
-        protected virtual void ComputeSize()
-        {
-            // Our children will be relatively-sized on the axis separate to the menu direction, so we need to compute
-            // that size ourselves, based on the content size of our children, to give them a valid relative size
-
-            float width = 0;
-            float height = 0;
-
-            foreach (var item in Children)
-            {
-                width = Math.Max(width, item.ContentDrawWidth);
-                height = Math.Max(height, item.ContentDrawHeight);
-            }
-
-            // When scrolling in one direction, ItemsContainer is auto-sized in that direction and relative-sized in the other
-            // In the case of the auto-sized direction, we want to use its size. In the case of the relative-sized direction, we want
-            // to use the (above) computed size.
-            width = Direction == Direction.Horizontal ? ItemsContainer.Width : width;
-            height = Direction == Direction.Vertical ? ItemsContainer.Height : height;
-
-            width = Math.Min(MaxWidth, width);
-            height = Math.Min(MaxHeight, height);
-
-            // Regardless of the above result, if we are relative-sizing, just use the stored width/height
-            width = RelativeSizeAxes.HasFlag(Axes.X) ? Width : width;
-            height = RelativeSizeAxes.HasFlag(Axes.Y) ? Height : height;
-
-            if (State == MenuState.Closed && Direction == Direction.Horizontal)
-                width = 0;
-            if (State == MenuState.Closed && Direction == Direction.Vertical)
-                height = 0;
-
-            UpdateSize(new Vector2(width, height));
         }

         /// <summary>


Added a massive todo-list for the plugin.

--- Source/FluentSecurity.Glimpse/FluentSecurityGlimpsePlugin.cs
+++ Source/FluentSecurity.Glimpse/FluentSecurityGlimpsePlugin.cs
@@ -14,6 +14,28 @@
 			var configuration = GetSecurityConfiguration();
 			if (configuration != null)
 			{
+				// TODO: See below...
+				// * Current version of the loaded Fluent Security assembly
+				// * Link to documentation
+				// * Current version of Fluent Security (Link to NuGet)
+				// * Ignore missing configuration
+				// * Service locator specified + type
+				// * Current configuration events (what was the path that led to the current configurtion)
+				// * Current configuration (policies)
+				// * Request details (what did Fluent Security do during the most recent request)
+				//		- What was the controller and action that was called
+				//		- How many policies was in the container that matched that controller action
+				//		- How many policies executed
+				//		- Which policies executed
+				//		- How long did it take to execute them
+				//		- What was the result of each policy
+				//		- What did Fluent Security do with that result
+				//		- What violation handler was selected
+				//		- How was that violation handler selected
+				//		- What was the result of that violation handler
+				//		- How long did it take to execute that violation handler
+				//		- ...
+
 				//var topLevel = new GlimpseRoot();
 				//topLevel.AddRow().Column("Key").Column("Value");


The min-ified js was not working in the bundle

--- Purchasing.Web/Views/History/AdminOrders.cshtml
+++ Purchasing.Web/Views/History/AdminOrders.cshtml
@@ -5,8 +5,7 @@
     ViewBag.SingleColumn = false;
     ViewBag.GetMethod = "AdminOrders";
     ViewBag.LoadFixedHeaders = true;
-
-    Bundles.Reference("scripts/public/single/FixedHeader.min.js");
+    Bundles.Reference("Scripts/public/single/FixedHeader.js");
 }

 @section SubNav


added RUA info and associated fields. Not adding fabrication info

--- Purchasing.Web/Views/OrderMockup/Request.cshtml
+++ Purchasing.Web/Views/OrderMockup/Request.cshtml
@@ -369,27 +369,39 @@

-
Field1

-

-                        <input type="text"/>
-

-

-

-
Field2

-

-                        <input type="text"/>
-

-

-

-
Field3

-

-                        <input type="text"/>
-

-

-

-
Field4

-

-                        <input type="text"/>
+
RUA Number

+

+                        <input type="text" placeholder="RUA #" title="Radioactive Use Authorization Number"/>
+

+

+

+
Class/Schedule

+

+                        <input type="text" placeholder="Class/Schedule"/>
+

+

+

+
How it is used?

+

+                        <input type="text" placeholder="How it is used"/>
+

+

+

+
Storage Site

+

+                        <input type="text" placeholder="Storage Site" title="Approved storage site on record"/>
+

+

+

+
Custodian

+

+                        <input type="text" placeholder="Custodian"/>
+

+

+

+
Authorized User(s)

+

+                        <input type="text" placeholder="Authorized User(s)" title="Enter authorized users here. Multiple names should be separated with a comma."/>


Fixed unexpected NULL when Asset is not assigned to a Location, causing issues when deleting the Asset

--- Source/Libraries/openXDA.Model/TransmissionElements/Asset.cs
+++ Source/Libraries/openXDA.Model/TransmissionElements/Asset.cs
@@ -208,6 +208,8 @@
                     assetLocation.LazyContext = LazyContext;
                 }
             }
+            else
+                return new List<AssetLocation>();

             return assetLocations;
         }


Annotate nullables

Annotate nullables

--- osu.Game/Online/Spectator/SpectatorClient.cs
+++ osu.Game/Online/Spectator/SpectatorClient.cs
@@ -1,12 +1,13 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.
+
+#nullable enable

 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
 using System.Threading.Tasks;
-using JetBrains.Annotations;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
 using osu.Framework.Graphics;
@@ -45,36 +46,37 @@

         private readonly Dictionary<int, SpectatorState> playingUserStates = new Dictionary<int, SpectatorState>();

-        [CanBeNull]
-        private IBeatmap currentBeatmap;
-
-        [CanBeNull]
-        private Score currentScore;
+        private IBeatmap? currentBeatmap;
+
+        private Score? currentScore;

         [Resolved]
-        private IBindable<RulesetInfo> currentRuleset { get; set; }
+        private IBindable<RulesetInfo> currentRuleset { get; set; } = null!;

         [Resolved]
-        private IBindable<IReadOnlyList<Mod>> currentMods { get; set; }
+        private IBindable<IReadOnlyList<Mod>> currentMods { get; set; } = null!;

         private readonly SpectatorState currentState = new SpectatorState();

+        /// <summary>
+        /// Whether the local user is playing.
+        /// </summary>
         protected bool IsPlaying { get; private set; }

         /// <summary>
         /// Called whenever new frames arrive from the server.
         /// </summary>
-        public event Action<int, FrameDataBundle> OnNewFrames;
+        public event Action<int, FrameDataBundle>? OnNewFrames;

         /// <summary>
         /// Called whenever a user starts a play session, or immediately if the user is being watched and currently in a play session.
         /// </summary>
-        public event Action<int, SpectatorState> OnUserBeganPlaying;
+        public event Action<int, SpectatorState>? OnUserBeganPlaying;

         /// <summary>
         /// Called whenever a user finishes a play session.
         /// </summary>
-        public event Action<int, SpectatorState> OnUserFinishedPlaying;
+        public event Action<int, SpectatorState>? OnUserFinishedPlaying;

         [BackgroundDependencyLoader]
         private void load()
@@ -215,7 +217,7 @@

         private double lastSendTime;

-        private Task lastSend;
+        private Task? lastSend;

         private const int max_pending_frames = 30;


REFACTOR: Make some AstBuilder methods return more-derived types.

--- Source/System.Management/Pash/ParserIntrinsics/AstBuilder.cs
+++ Source/System.Management/Pash/ParserIntrinsics/AstBuilder.cs
@@ -1193,7 +1193,7 @@

         }

-        CommandElementAst BuildCommandNameExprAst(ParseTreeNode parseTreeNode)
+        ExpressionAst BuildCommandNameExprAst(ParseTreeNode parseTreeNode)
         {

             VerifyTerm(parseTreeNode, this._grammar.command_name_expr);
@@ -1207,7 +1207,7 @@
             throw new InvalidOperationException(parseTreeNode.ToString());
         }

-        CommandElementAst BuildCommandNameAst(ParseTreeNode parseTreeNode)
+        StringConstantExpressionAst BuildCommandNameAst(ParseTreeNode parseTreeNode)
         {
             VerifyTerm(parseTreeNode, this._grammar.command_name);

@@ -1257,7 +1257,7 @@
             throw new InvalidOperationException(parseTreeNode.ToString());
         }

-        CommandElementAst BuildCommandArgumentAst(ParseTreeNode parseTreeNode)
+        ExpressionAst BuildCommandArgumentAst(ParseTreeNode parseTreeNode)
         {

             VerifyTerm(parseTreeNode, this._grammar.command_argument);


Simplify description logic for overlay tab items

--- osu.Game/Overlays/TabControlOverlayHeader.cs
+++ osu.Game/Overlays/TabControlOverlayHeader.cs
@@ -3,7 +3,6 @@

 #nullable disable

-using System;
 using JetBrains.Annotations;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
@@ -13,7 +12,6 @@
 using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.UserInterface;
-using osu.Framework.Localisation;
 using osu.Game.Graphics;
 using osu.Game.Graphics.UserInterface;

@@ -110,20 +108,7 @@
                 public OverlayHeaderTabItem(T value)
                     : base(value)
                 {
-                    if (!(Value is Enum enumValue))
-                        Text.Text = Value.ToString().ToLowerInvariant();
-                    else
-                    {
-                        case LocalisableString localisableString:
-                            Text.Text = localisableString.ToLower();
-                            break;
-
-                        // If localisable == non-localisable, then we must have a basic string, so .ToLowerInvariant() is used.
-                        Text.Text = localisableDescription.Equals(nonLocalisableDescription)
-                            ? nonLocalisableDescription.ToLowerInvariant()
-                            : localisableDescription;
-                    }
-
+                    Text.Text = value.GetLocalisableDescription().ToLower();
                     Text.Font = OsuFont.GetFont(size: 14);
                     Text.Margin = new MarginPadding { Vertical = 16.5f }; // 15px padding + 1.5px line-height difference compensation
                     Bar.Margin = new MarginPadding { Bottom = bar_height };


3.0.2

3.0.2

NUnit and async tests do not mix well

--- Tests/SystemTests/IOTests/StreamExtensionsTest.cs
+++ Tests/SystemTests/IOTests/StreamExtensionsTest.cs
@@ -12,16 +12,21 @@
     [TestFixture]
     public static class StreamExtensionsTest
     {
-        [Test]
-        public static async Task ReadAsyncReads()
+        private static async Task ReadAsyncReadsExtracted()
         {
-            using (var stream = new MemoryStream(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }))
+            using (var stream = new MemoryStream(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0}))
             {
                 var buffer = new byte[10];
                 var x = await stream.ReadAsync(buffer, 0, 10).ConfigureAwait(false);
                 Assert.AreEqual(10, x);
-                AssertEx.CollectionEquals(buffer, new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 });
+                AssertEx.CollectionEquals(buffer, new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0});
             }
+        }
+
+        [Test]
+        public static void ReadAsyncReads()
+        {
+            ReadAsyncReadsExtracted().Wait();
         }

         [Test]


Update CuidCorrelationService.cs

Update CuidCorrelationService.cs

--- TIKSN.Core/Integration/Correlation/CuidCorrelationService.cs
+++ TIKSN.Core/Integration/Correlation/CuidCorrelationService.cs
@@ -62,6 +62,8 @@
             char[] charArrayRepresentation = CreateCharsArray();
             byte[] byteArrayRepresentation = CreateByteArray();

+            CreateChunks(ref charArrayRepresentation, ref byteArrayRepresentation);
+
             var chars = charArrayRepresentation.AsSpan();
             var bytes = byteArrayRepresentation.AsSpan();

@@ -98,7 +100,9 @@

         private char[] CreateCharsArray()
         {
-            return new char[CharsArraySize];
+            var chars = new char[CharsArraySize];
+            chars[0] = 'c';
+            return chars;
         }

         private void CreateChunks(
@@ -108,7 +112,6 @@
             if (charArrayRepresentation is null)
             {
                 charArrayRepresentation = CreateCharsArray();
-                charArrayRepresentation[0] = 'c';
             }
             else
             {


Add unit test

Add unit test


Fixed cobble and stone textures being mixed up

--- TrueCraft.Client/Rendering/Blocks/SlabRenderer.cs
+++ TrueCraft.Client/Rendering/Blocks/SlabRenderer.cs
@@ -17,9 +17,9 @@
         private static Vector2 WoodTopTexture = new Vector2(4, 0);
         private static Vector2 WoodSideTexture = new Vector2(4, 0);
         private static Vector2 WoodBottomTexture = new Vector2(4, 0);
-        private static Vector2 CobbleTopTexture = new Vector2(1, 0);
-        private static Vector2 CobbleSideTexture = new Vector2(1, 0);
-        private static Vector2 CobbleBottomTexture = new Vector2(1, 0);
+        private static Vector2 CobbleTopTexture = new Vector2(0, 1);
+        private static Vector2 CobbleSideTexture = new Vector2(0, 1);
+        private static Vector2 CobbleBottomTexture = new Vector2(0, 1);

         private static Vector2[] StoneTextureMap =
         {


Fixed to explicitly get the ValueReference's Value if implicit method evaluation is allowed

--- Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
+++ Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
@@ -178,7 +178,7 @@

 		object IObjectValueSource.GetRawValue (ObjectPath path, EvaluationOptions options)
 		{
-			return ctx.Adapter.ToRawValue (GetContext (options), this, Value);
+			return ctx.Adapter.ToRawValue (GetContext (options), this, options.AllowTargetInvoke ? GetValueExplicitly () : Value);
 		}

 		void IObjectValueSource.SetRawValue (ObjectPath path, object value, EvaluationOptions options)


Rename connection to client

Rename connection to client

--- NetworkItUnity/Assets/NetworkIt/Scripts/NetworkItEvents.cs
+++ NetworkItUnity/Assets/NetworkIt/Scripts/NetworkItEvents.cs
@@ -15,7 +15,7 @@
     private volatile LinkedList<Message> messageEvents = new LinkedList<Message>();

-    private Client connection;
+    private Client client;

     void Start() {

@@ -29,12 +29,12 @@
             return;
         }

-        connection = new Client(username, urlAddress, port);            //create and establish connection to server
-        connection.StartConnection();
-        connection.Connected += Connection_Connected;
-        connection.Disconnected += Connection_Disconnected;
-        connection.MessageReceived += Connection_MessageReceived;
-        connection.Error += Connection_Error;
+        client = new Client(username, urlAddress, port);            //create and establish connection to server
+        client.StartConnection();
+        client.Connected += Connection_Connected;
+        client.Disconnected += Connection_Disconnected;
+        client.MessageReceived += Connection_MessageReceived;
+        client.Error += Connection_Error;
 	}

     void Update()
@@ -64,7 +64,6 @@
         }

     }
-
     private void Connection_MessageReceived(object sender, NetworkItMessageEventArgs e)
     {
         NotifyMessageListeners(e.ReceivedMessage);
@@ -95,7 +94,7 @@

     private void OnApplicationQuit()
     {
-        connection.CloseConnection();
+        client.CloseConnection();
     }

 }


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsMath.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsMath.cs
@@ -1034,6 +1034,15 @@
     public void TestMethod_IsPrime_47()
     {
       const int source = 47;
+      const bool expected = true;
+      bool result = FunctionsMath.IsPrime(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_IsPrime_53()
+    {
+      const int source = 53;
       const bool expected = true;
       bool result = FunctionsMath.IsPrime(source);
       Assert.AreEqual(result, expected);


ファイルの書き込みテスト

ファイルの書き込みテスト

--- Unity/MeshDemo/Assets/Scripts/MeshStatusViewer.cs
+++ Unity/MeshDemo/Assets/Scripts/MeshStatusViewer.cs
@@ -5,6 +5,12 @@
 using UnityEngine.VR.WSA.Input;
 using UnityEngine.VR.WSA;
 using System;
+
+#if !UNITY_EDITOR
+using Windows.Storage;
+using Windows.System;
+using System.Runtime.InteropServices.WindowsRuntime;
+#endif

 public class MeshStatusViewer : MonoBehaviour {
     SpatialMapping mapping;
@@ -71,6 +77,35 @@
             cubes[6].transform.localPosition = new Vector3(max.x, max.y, max.z);
             cubes[7].transform.localPosition = new Vector3(max.x, max.y, min.z);

+#if !UNITY_EDITOR
+            var ao = KnownFolders.PicturesLibrary.CreateFileAsync("mapping.jpg", CreationCollisionOption.ReplaceExisting);
+            ao.Completed = async delegate {
+                if (ao.Status == Windows.Foundation.AsyncStatus.Completed)
+                {
+                    var file = ao.GetResults();
+                    Debug.Log(file.Name);
+
+                    using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite))
+                    {
+                        var imageBuffer = new byte[stream.Size];
+                        await stream.WriteAsync(imageBuffer.AsBuffer());
+                    }
+
+                    Debug.Log("write comlete");
+                }
+                else if(ao.Status == Windows.Foundation.AsyncStatus.Error)
+                {
+                     Debug.Log(ao.ErrorCode.Message);
+                }
+            };
+
+            while (ao.Status == Windows.Foundation.AsyncStatus.Started)   // …… （3）
+            {
+                yield return new WaitForEndOfFrame();
+            }
+
+#endif
+
             yield return new WaitForSeconds(1);
         }
     }


Handle case where no tabs exist at startup. Duh.

--- Utilities.Controls/Behaviors/TabWheelScrolling.cs
+++ Utilities.Controls/Behaviors/TabWheelScrolling.cs
@@ -14,6 +14,7 @@
 //  See the License for the specific language governing permissions and
 //  limitations under the License.

+using System;
 using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
@@ -34,9 +35,25 @@
 			_tabPanel = (
 				from child in AssociatedObject.VisualChildren()
 				from subChild in child.VisualChildren()
-				select subChild).OfType<TabPanel>().Single();
+				select subChild).OfType<TabPanel>().SingleOrDefault();

-			_tabPanel.MouseWheel += tabPanel_MouseWheel;
+			// If the tab panel is not found, no tab panel may exist because there are no tabs.
+			// Therefore, subscribe to the event that will occur when a tab is finally added.
+			if (_tabPanel == null)
+				AssociatedObject.ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged;
+			else
+				_tabPanel.MouseWheel += tabPanel_MouseWheel;
+		}
+
+		private void ItemContainerGenerator_StatusChanged(object sender, EventArgs e)
+		{
+			// The status here is important because the event will fire more than once at different stages.
+			// The tab panel will only exist after container generation has completed.
+			if (AssociatedObject.ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated)
+			{
+				AssociatedObject.ItemContainerGenerator.StatusChanged -= ItemContainerGenerator_StatusChanged;
+				OnLoaded();
+			}
 		}

 		/// <see cref="Behavior.OnDetaching"/>