* Minor change, in InventoryObjectOfferedEventArgs the FolderID contains the default destination for the type of asset being offered. To use a non-default destination set the value of the property to the destination folder you prefer

git-svn-id: e915c4f8b2ea2a6e63cbe989b51c0994a698cc26@3217 52acb1d6-8a22-11de-b505-999d5b087335

--- OpenMetaverse/InventoryManager.cs
+++ OpenMetaverse/InventoryManager.cs
@@ -3429,7 +3429,7 @@
                     imp.MessageBlock.RegionID = UUID.Zero;
                     imp.MessageBlock.Position = Client.Self.SimPosition;

-                    InventoryObjectOfferedEventArgs args = new InventoryObjectOfferedEventArgs(e.IM, type, objectID, fromTask);
+                    InventoryObjectOfferedEventArgs args = new InventoryObjectOfferedEventArgs(e.IM, type, objectID, fromTask, destinationFolderID);

                     OnInventoryObjectOffered(args);

@@ -3448,15 +3448,7 @@
                                 imp.MessageBlock.Dialog = (byte)InstantMessageDialog.GroupNoticeInventoryAccepted;
                                 break;
                         }
-
-                        if (args.FolderID != UUID.Zero)
-                        {
-                            imp.MessageBlock.BinaryBucket = args.FolderID.GetBytes();
-                        }
-                        else
-                        {
-                            imp.MessageBlock.BinaryBucket = destinationFolderID.GetBytes();
-                        }
+                        imp.MessageBlock.BinaryBucket = args.FolderID.GetBytes();
                     }
                     else
                     {
@@ -4180,10 +4172,10 @@
         public UUID ObjectID { get { return m_ObjectID; } }
         public bool FromTask { get { return m_FromTask; } }

-
-        public InventoryObjectOfferedEventArgs(InstantMessage offerDetails, AssetType type, UUID objectID, bool fromTask)
+        public InventoryObjectOfferedEventArgs(InstantMessage offerDetails, AssetType type, UUID objectID, bool fromTask, UUID folderID)
         {
             this.Accept = false;
+            this.FolderID = folderID;
             this.m_Offer = offerDetails;
             this.m_AssetType = type;
             this.m_ObjectID = objectID;


Corrections in RegionTests.cs. It now fully works!

The problem was that some tests relied on prior tests
to leave the DB in a particular state, but the test class
cleared the DB every time. The affected tests have been
merged into one to remove the dependencies.

tested on all 3 Dbs, all tests green.

--- OpenSim/Data/Tests/RegionTests.cs
+++ OpenSim/Data/Tests/RegionTests.cs
@@ -60,6 +60,8 @@
         where TConn : DbConnection, new()
         where TRegStore : class, IRegionDataStore, new()
     {
+        bool m_rebuildDB;
+
         public IRegionDataStore db;
         public UUID zero = UUID.Zero;
         public UUID region1 = UUID.Random();
@@ -85,6 +87,16 @@
         public double height1 = 20;
         public double height2 = 100;

+        public RegionTests(string conn, bool rebuild)
+            : base(conn)
+        {
+            m_rebuildDB = rebuild;
+        }
+
+        public RegionTests() : this("", false) { }
+        public RegionTests(string conn) : this(conn, false) {}
+        public RegionTests(bool rebuild): this("", rebuild) {}
+

         protected override void InitService(object service)
         {
@@ -93,22 +105,17 @@
             ClearDB();
         }

-
         private void ClearDB()
         {
-            // if a new table is added, it has to be dropped here
-            ExecuteSql("delete from migrations where name='RegionStore';");
-
-            DropTables(
-                "prims",
-                "primshapes",
-                "primitems",
-                "terrain",
-                "land",
-                "landaccesslist",
-                "regionban",
-                "regionsettings"
-            );
+            string[] reg_tables = new string[] {
+                "prims", "primshapes", "primitems", "terrain", "land", "landaccesslist", "regionban", "regionsettings"
+            };
+            if (m_rebuildDB)
+            {
+                DropTables(reg_tables);
+                ResetMigrations("RegionStore");
+            }else
+                ClearTables(reg_tables);
         }

@@ -601,68 +608,88 @@
                 .IgnoreProperty(x=>x.PassCollision)
                 .IgnoreProperty(x=>x.RootPart));
         }
+
+
+        private SceneObjectGroup GetMySOG(string name)
+        {
+            SceneObjectGroup sog = FindSOG(name, region1);
+            if (sog == null)
+            {
+                sog = NewSOG(name, prim1, region1);
+                db.StoreObject(sog, region1);
+            }
+            return sog;
+        }

+
+        // NOTE: it is a bad practice to rely on some of the previous tests having been run before.
+        // If the tests are run manually, one at a time, each starts with full class init (DB cleared).
+        // Even when all tests are run, NUnit 2.5+ no longer guarantee a specific test order.
+        // We shouldn't expect to find anything in the DB if we haven't put it there *in the same test*!
+
         [Test]
         public void T020_PrimInventoryEmpty()
         {
-            SceneObjectGroup sog = FindSOG("object1", region1);
+            SceneObjectGroup sog = GetMySOG("object1");
             TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
             Assert.That(t, Is.Null);
         }

-        [Test]
-        public void T021_PrimInventoryStore()
-        {
-            SceneObjectGroup sog = FindSOG("object1", region1);
-            InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
-
-            Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
-            TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
-            Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
-
+        // TODO: Is there any point to call StorePrimInventory on a list, rather than on the prim itself?
+
+        private void StoreInventory(SceneObjectGroup sog)
+        {
+            List<TaskInventoryItem> list = new List<TaskInventoryItem>();
             // TODO: seriously??? this is the way we need to loop to get this?
-
-            List<TaskInventoryItem> list = new List<TaskInventoryItem>();
             foreach (UUID uuid in sog.RootPart.Inventory.GetInventoryList())
             {
                 list.Add(sog.GetInventoryItem(sog.RootPart.LocalId, uuid));
             }
-
-            db.StorePrimInventory(prim1, list);
-        }
-
-        [Test]
-        public void T022_PrimInventoryRetrieve()
-        {
-            SceneObjectGroup sog = FindSOG("object1", region1);
+
+            db.StorePrimInventory(sog.RootPart.UUID, list);
+        }
+
+
+        [Test]
+        public void T021_PrimInventoryBasic()
+        {
+            SceneObjectGroup sog = GetMySOG("object1");
+            InventoryItemBase i = NewItem(item1, zero, zero, itemname1, zero);
+
+            Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
             TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
-
             Assert.That(t.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
-        }
-
-        [Test]
-        public void T023_PrimInventoryUpdate()
-        {
-            SceneObjectGroup sog = FindSOG("object1", region1);
-            TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
-
-            t.Name = "My New Name";
-            sog.UpdateInventoryItem(t);
-
-            Assert.That(t.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))");
-
-        }
-
-        [Test]
-        public void T024_PrimInventoryRemove()
-        {
+
+            StoreInventory(sog);
+
+            SceneObjectGroup sog1 = FindSOG("object1", region1);
+            Assert.That(sog1, Is.Not.Null);
+
+            TaskInventoryItem t1 = sog1.GetInventoryItem(sog1.RootPart.LocalId, item1);
+            Assert.That(t1, Is.Not.Null);
+            Assert.That(t1.Name, Is.EqualTo(itemname1), "Assert.That(t.Name, Is.EqualTo(itemname1))");
+
+            // Updating inventory
+            t1.Name = "My New Name";
+            sog1.UpdateInventoryItem(t1);
+
+            StoreInventory(sog1);
+
+            SceneObjectGroup sog2 = FindSOG("object1", region1);
+            TaskInventoryItem t2 = sog2.GetInventoryItem(sog2.RootPart.LocalId, item1);
+            Assert.That(t2.Name, Is.EqualTo("My New Name"), "Assert.That(t.Name, Is.EqualTo(\"My New Name\"))");
+
+            // Removing inventory
+
             List<TaskInventoryItem> list = new List<TaskInventoryItem>();
             db.StorePrimInventory(prim1, list);

-            SceneObjectGroup sog = FindSOG("object1", region1);
-            TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
+            sog = FindSOG("object1", region1);
+            t = sog.GetInventoryItem(sog.RootPart.LocalId, item1);
             Assert.That(t, Is.Null);
-        }
+
+        }
+

         [Test]
         public void T025_PrimInventoryPersistency()
@@ -706,7 +733,7 @@
             int creationd = random.Next();
             i.CreationDate = creationd;

-            SceneObjectGroup sog = FindSOG("object1", region1);
+            SceneObjectGroup sog = GetMySOG("object1");
             Assert.That(sog.AddInventoryItem(null, sog.RootPart.LocalId, i, zero), Is.True);
             TaskInventoryItem t = sog.GetInventoryItem(sog.RootPart.LocalId, id);


Hide slide that aren't needed anymore

Hide slide that aren't needed anymore

--- YesEquality/ViewModels/InfoViewModel.cs
+++ YesEquality/ViewModels/InfoViewModel.cs
@@ -29,9 +29,9 @@
             SlideList.Add(new SlideModel() { Title = "To vote on May 22nd you must be:", ImagePath = new Uri("/Resources/Assets/Info/3_Resident.png", UriKind.Relative), ImageText = "Resident in the republic", BackgroundColour = "#2e358e" });
             SlideList.Add(new SlideModel() { Title = "To vote on May 22nd you must be:", ImagePath = new Uri("/Resources/Assets/Info/4_Registered.png", UriKind.Relative), ImageText = "Registered to vote", BackgroundColour = "#9e2064" });
             SlideList.Add(new SlideModel() { Title = "Check to see if you are registered", ImagePath = new Uri("/Resources/Assets/Info/5_Check.png", UriKind.Relative), ImageText = "checktheregister.ie", BackgroundColour = "#292561", Type = SlideModelType.HasLink });
-            SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/6_Download.png", UriKind.Relative), ImageText = "Download the form", BackgroundColour = "#009348", Type = SlideModelType.HasLink });
-            SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/7_Fillin.png", UriKind.Relative), ImageText = "Get it signed & stamped by a Garda", BackgroundColour = "#91288c" });
-            SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/8_PostForms.png", UriKind.Relative), ImageText = "Return it to your local authority office by May 5th", BackgroundColour = "#be202e" });
+            //SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/6_Download.png", UriKind.Relative), ImageText = "Download the form", BackgroundColour = "#009348", Type = SlideModelType.HasLink });
+            //SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/7_Fillin.png", UriKind.Relative), ImageText = "Get it signed & stamped by a Garda", BackgroundColour = "#91288c" });
+            //SlideList.Add(new SlideModel() { Title = "Registering is easy", ImagePath = new Uri("/Resources/Assets/Info/8_PostForms.png", UriKind.Relative), ImageText = "Return it to your local authority office by May 5th", BackgroundColour = "#be202e" });
             SlideList.Add(new SlideModel() { Title = "On May 22nd", ImagePath = new Uri("/Resources/Assets/Info/9_Student.png", UriKind.Relative), ImageText = "Polling stations will be open from 7am to 10pm.", BackgroundColour = "#7bc043" });
             //SlideList.Add(new InfoModel() { Title = "Away at work?", ImagePath = new Uri("/Resources/Assets/Info/10_AtWork.png", UriKind.Relative), ImageText = "You can vote by post too!", BackgroundColour = "#7f4097" });
             //SlideList.Add(new InfoModel() { Title = "Changed address?", ImagePath = new Uri("/Resources/Assets/Info/11_Address.png", UriKind.Relative), ImageText = "You can vote by post", BackgroundColour = "#1b75bb" });


BrotliStream

BrotliStream

--- Zergatul/IO/Compression/BrotliStream.cs
+++ Zergatul/IO/Compression/BrotliStream.cs
@@ -38,6 +38,16 @@
             0, 0, 0, 0, 0, 0,  0,  0,
             1, 1, 2, 2, 3, 3,  4,  4,
             5, 5, 6, 7, 8, 9, 10, 24
+        };
+        private static readonly int[] BlockCountCodeOffset = new[]
+        {
+              1,   5,   9,  13,  17,  25,  33,  41,   49,   65,   81,   97,   113,
+            145, 177, 209, 241, 305, 369, 497, 753, 1265, 2289, 4337, 8433, 16625
+        };
+        private static readonly int[] BlockCountCodeBits = new[]
+        {
+            2, 2, 2, 2, 3, 3, 3, 3,  4,  4,  4,  4,  5,
+            5, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 24
         };
         private static readonly int[] LookupTable0 = new[]
         {
@@ -241,6 +251,7 @@
                 {
                     _blocks[i].BlockTypeTree = ReadHuffmanTree(_blocks[i].nBlTypes + 2);
                     _blocks[i].BlockLenTree = ReadHuffmanTree(BlockCountAlphabetSize);
+                    _blocks[i].bLen = ReadBlockLength(_blocks[i].BlockLenTree);
                 }
                 else
                 {
@@ -431,7 +442,7 @@
             if (prefixCodeType == 1)
                 return ReadSimplePrefixCodes(alphabetSize);
             else
-                return ReadCompressPrefixCodes(prefixCodeType, alphabetSize);
+                return ReadComplexPrefixCodes(prefixCodeType, alphabetSize);
         }

         private Tree ReadSimplePrefixCodes(int alphabetSize)
@@ -520,7 +531,7 @@
             }
         }

-        private Tree ReadCompressPrefixCodes(int hSkip, int alphabetSize)
+        private Tree ReadComplexPrefixCodes(int hSkip, int alphabetSize)
         {
             int[] codeLengthCodeLengths = new int[18]; // TODO why 18?
             int space = 32;
@@ -575,19 +586,27 @@
             var tree = BuildTree(codeLengthCodeLengths);
             int symbolCount = 0;
             int[] codeLength = new int[alphabetSize];
-            space = 32678;
+            space = 0x8000;
             while (symbolCount < alphabetSize && space > 0)
             {
                 int codeLen = ReadHuffmanValue(tree);
                 codeLength[symbolCount] = codeLen;
                 symbolCount++;
-                if (codeLen != 0)
-                {
-                    space -= 32678 >> codeLen;
-                }
-            }
-
-            return null;
+                if (codeLen < 16)
+                {
+                    if (codeLen != 0)
+                    {
+                        space -= 0x8000 >> codeLen;
+                    }
+                }
+                else
+                    throw new NotImplementedException();
+            }
+
+            if (space != 0)
+                throw new BrotliStreamException();
+
+            return BuildTree(codeLength);
         }

         private int ReadHuffmanValue(Tree tree)
@@ -781,6 +800,12 @@
             tree.Value = value;
         }

+        private int ReadBlockLength(Tree tree)
+        {
+            int code = ReadHuffmanValue(tree);
+            return BlockCountCodeOffset[code] + _reader.ReadBits(BlockCountCodeBits[code]);
+        }
+
         #region Stream overrides

         public override bool CanRead => throw new NotImplementedException();


[Modify] Add it

[Modify] Add it

--- websocket-sharp/Ext.cs
+++ websocket-sharp/Ext.cs
@@ -595,6 +595,16 @@
       }

       return true;
+    }
+
+    internal static bool KeepsAlive (
+      this NameValueCollection headers, Version version
+    )
+    {
+      var comparison = StringComparison.OrdinalIgnoreCase;
+      return version < HttpVersion.Version11
+             ? headers.Contains ("Connection", "keep-alive", comparison)
+             : !headers.Contains ("Connection", "close", comparison);
     }

     internal static string Quote (this string value)


Refactored a few for Ext.cs

Refactored a few for Ext.cs

--- websocket-sharp/Ext.cs
+++ websocket-sharp/Ext.cs
@@ -80,7 +80,7 @@
     private static byte[] compress (this byte[] data)
     {
       if (data.LongLength == 0)
-        //return new Byte[] { 0x00, 0x00, 0x00, 0xff, 0xff };
+        //return new byte[] { 0x00, 0x00, 0x00, 0xff, 0xff };
         return data;

       using (var input = new MemoryStream (data))
@@ -96,7 +96,7 @@
       stream.Position = 0;
       using (var ds = new DeflateStream (output, CompressionMode.Compress, true)) {
         stream.CopyTo (ds);
-        ds.Close (); // "BFINAL" set to 1.
+        ds.Close (); // BFINAL set to 1.
         output.Write (_last, 0, 1);
         output.Position = 0;

@@ -153,19 +153,17 @@
           return buffer.SubArray (0, offset);

         while (len < length) {
-          var readLen = stream.Read (buffer, offset + len, length - len);
-          if (readLen < 1)
+          var nread = stream.Read (buffer, offset + len, length - len);
+          if (nread < 1)
             break;

-          len += readLen;
+          len += nread;
         }
       }
       catch {
       }

-      return len < length
-             ? buffer.SubArray (0, offset + len)
-             : buffer;
+      return len < length ? buffer.SubArray (0, offset + len) : buffer;
     }

     private static bool readBytes (
@@ -271,23 +269,17 @@

     internal static string CheckIfValidSendData (this byte[] data)
     {
-      return data == null
-             ? "'data' is null."
-             : null;
+      return data == null ? "'data' is null." : null;
     }

     internal static string CheckIfValidSendData (this FileInfo file)
     {
-      return file == null
-             ? "'file' is null."
-             : null;
+      return file == null ? "'file' is null." : null;
     }

     internal static string CheckIfValidSendData (this string data)
     {
-      return data == null
-             ? "'data' is null."
-             : null;
+      return data == null ? "'data' is null." : null;
     }

     internal static string CheckIfValidServicePath (this string path)
@@ -303,16 +295,12 @@

     internal static string CheckIfValidSessionID (this string id)
     {
-      return id == null || id.Length == 0
-             ? "'id' is null or empty."
-             : null;
+      return id == null || id.Length == 0 ? "'id' is null or empty." : null;
     }

     internal static string CheckIfValidWaitTime (this TimeSpan time)
     {
-      return time <= TimeSpan.Zero
-             ? "A wait time is zero or less."
-             : null;
+      return time <= TimeSpan.Zero ? "A wait time is zero or less." : null;
     }

     internal static void Close (this HttpListenerResponse response, HttpStatusCode code)
@@ -390,9 +378,9 @@
     {
       var buffLen = 256;
       var buff = new byte[buffLen];
-      var readLen = 0;
-      while ((readLen = source.Read (buff, 0, buffLen)) > 0)
-        destination.Write (buff, 0, readLen);
+      var nread = 0;
+      while ((nread = source.Read (buff, 0, buffLen)) > 0)
+        destination.Write (buff, 0, nread);
     }

     internal static byte[] Decompress (this byte[] data, CompressionMethod method)
@@ -460,10 +448,8 @@
       if (original[0] != '/')
         return null;

-      var i = original.IndexOfAny (new[] { '?', '#' });
-      return i > 0
-             ? original.Substring (0, i)
-             : original;
+      var idx = original.IndexOfAny (new[] { '?', '#' });
+      return idx > 0 ? original.Substring (0, idx) : original;
     }

     internal static string GetMessage (this CloseStatusCode code)
@@ -497,18 +483,16 @@
     /// A <see cref="string"/> that represents the name if any; otherwise, <c>null</c>.
     /// </returns>
     /// <param name="nameAndValue">
-    /// A <see cref="string"/> that contains a pair of name and value separated by a separator
-    /// character.
+    /// A <see cref="string"/> that contains a pair of name and value separated by
+    /// a separator character.
     /// </param>
     /// <param name="separator">
     /// A <see cref="char"/> that represents the separator character.
     /// </param>
     internal static string GetName (this string nameAndValue, char separator)
     {
-      var i = nameAndValue.IndexOf (separator);
-      return i > 0
-             ? nameAndValue.Substring (0, i).Trim ()
-             : null;
+      var idx = nameAndValue.IndexOf (separator);
+      return idx > 0 ? nameAndValue.Substring (0, idx).Trim () : null;
     }

     /// <summary>
@@ -519,30 +503,28 @@
     /// A <see cref="string"/> that represents the value if any; otherwise, <c>null</c>.
     /// </returns>
     /// <param name="nameAndValue">
-    /// A <see cref="string"/> that contains a pair of name and value separated by a separator
-    /// character.
+    /// A <see cref="string"/> that contains a pair of name and value separated by
+    /// a separator character.
     /// </param>
     /// <param name="separator">
     /// A <see cref="char"/> that represents the separator character.
     /// </param>
     internal static string GetValue (this string nameAndValue, char separator)
     {
-      var i = nameAndValue.IndexOf (separator);
-      return i > -1 && i < nameAndValue.Length - 1
-             ? nameAndValue.Substring (i + 1).Trim ()
+      var idx = nameAndValue.IndexOf (separator);
+      return idx > -1 && idx < nameAndValue.Length - 1
+             ? nameAndValue.Substring (idx + 1).Trim ()
              : null;
     }

     internal static string GetValue (this string nameAndValue, char separator, bool unquote)
     {
-      var i = nameAndValue.IndexOf (separator);
-      if (i < 0 || i == nameAndValue.Length - 1)
+      var idx = nameAndValue.IndexOf (separator);
+      if (idx < 0 || idx == nameAndValue.Length - 1)
         return null;

-      var val = nameAndValue.Substring (i + 1).Trim ();
-      return unquote
-             ? val.Unquote ()
-             : val;
+      var val = nameAndValue.Substring (idx + 1).Trim ();
+      return unquote ? val.Unquote () : val;
     }

     internal static TcpListenerWebSocketContext GetWebSocketContext (
@@ -641,24 +623,24 @@

     internal static byte[] ReadBytes (this Stream stream, long length, int bufferLength)
     {
-      using (var res = new MemoryStream ()) {
+      using (var dest = new MemoryStream ()) {
         var cnt = length / bufferLength;
         var rem = (int) (length % bufferLength);

         var buff = new byte[bufferLength];
         var end = false;
         for (long i = 0; i < cnt; i++) {
-          if (!stream.readBytes (buff, 0, bufferLength, res)) {
+          if (!stream.readBytes (buff, 0, bufferLength, dest)) {
             end = true;
             break;
           }
         }

         if (!end && rem > 0)
-          stream.readBytes (new byte[rem], 0, rem, res);
-
-        res.Close ();
-        return res.ToArray ();
+          stream.readBytes (new byte[rem], 0, rem, dest);
+
+        dest.Close ();
+        return dest.ToArray ();
       }
     }

@@ -698,17 +680,15 @@

     internal static string RemovePrefix (this string value, params string[] prefixes)
     {
-      var i = 0;
+      var idx = 0;
       foreach (var prefix in prefixes) {
         if (value.StartsWith (prefix)) {
-          i = prefix.Length;
+          idx = prefix.Length;
           break;
         }
       }

-      return i > 0
-             ? value.Substring (i)
-             : value;
+      return idx > 0 ? value.Substring (idx) : value;
     }

     internal static T[] Reverse<T> (this T[] array)
@@ -825,9 +805,7 @@
     internal static string TrimEndSlash (this string value)
     {
       value = value.TrimEnd ('/');
-      return value.Length > 0
-             ? value
-             : "/";
+      return value.Length > 0 ? value : "/";
     }

     /// <summary>
@@ -921,8 +899,8 @@
     #region Public Methods

     /// <summary>
-    /// Determines whether the specified <see cref="string"/> contains any of characters
-    /// in the specified array of <see cref="char"/>.
+    /// Determines whether the specified <see cref="string"/> contains any of characters in
+    /// the specified array of <see cref="char"/>.
     /// </summary>
     /// <returns>
     /// <c>true</c> if <paramref name="value"/> contains any of <paramref name="chars"/>;
@@ -944,12 +922,12 @@
     }

     /// <summary>
-    /// Determines whether the specified <see cref="NameValueCollection"/> contains the entry
-    /// with the specified <paramref name="name"/>.
-    /// </summary>
-    /// <returns>
-    /// <c>true</c> if <paramref name="collection"/> contains the entry
-    /// with <paramref name="name"/>; otherwise, <c>false</c>.
+    /// Determines whether the specified <see cref="NameValueCollection"/> contains
+    /// the entry with the specified <paramref name="name"/>.
+    /// </summary>
+    /// <returns>
+    /// <c>true</c> if <paramref name="collection"/> contains the entry with
+    /// <paramref name="name"/>; otherwise, <c>false</c>.
     /// </returns>
     /// <param name="collection">
     /// A <see cref="NameValueCollection"/> to test.
@@ -959,14 +937,12 @@
     /// </param>
     public static bool Contains (this NameValueCollection collection, string name)
     {
-      return collection != null && collection.Count > 0
-             ? collection[name] != null
-             : false;
-    }
-
-    /// <summary>
-    /// Determines whether the specified <see cref="NameValueCollection"/> contains the entry
-    /// with the specified both <paramref name="name"/> and <paramref name="value"/>.
+      return collection != null && collection.Count > 0 ? collection[name] != null : false;
+    }
+
+    /// <summary>
+    /// Determines whether the specified <see cref="NameValueCollection"/> contains the entry with
+    /// the specified both <paramref name="name"/> and <paramref name="value"/>.
     /// </summary>
     /// <returns>
     /// <c>true</c> if <paramref name="collection"/> contains the entry with both
@@ -1016,8 +992,8 @@
     }

     /// <summary>
-    /// Emits the specified <c>EventHandler<TEventArgs></c> delegate
-    /// if it isn't <see langword="null"/>.
+    /// Emits the specified <c>EventHandler<TEventArgs></c> delegate if it isn't
+    /// <see langword="null"/>.
     /// </summary>
     /// <param name="eventHandler">
     /// An <c>EventHandler<TEventArgs></c> to emit.
@@ -1202,7 +1178,7 @@
     /// </param>
     public static bool IsHostOrder (this ByteOrder order)
     {
-      // true : !(true ^ true)  or !(false ^ false)
+      // true: !(true ^ true) or !(false ^ false)
       // false: !(true ^ false) or !(false ^ true)
       return !(BitConverter.IsLittleEndian ^ (order == ByteOrder.Little));
     }
@@ -1288,8 +1264,8 @@
     }

     /// <summary>
-    /// Determines whether the specified <see cref="HttpListenerRequest"/> is an HTTP Upgrade
-    /// request to switch to the specified <paramref name="protocol"/>.
+    /// Determines whether the specified <see cref="HttpListenerRequest"/> is
+    /// an HTTP Upgrade request to switch to the specified <paramref name="protocol"/>.
     /// </summary>
     /// <returns>
     /// <c>true</c> if <paramref name="request"/> is an HTTP Upgrade request to switch to
@@ -1344,23 +1320,23 @@
       if (value == null || value.Length == 0)
         return false;

-      var i = value.IndexOf (':');
-      if (i == -1)
+      var idx = value.IndexOf (':');
+      if (idx == -1)
         return false;

-      if (i >= 10)
+      if (idx >= 10)
         return false;

-      return value.Substring (0, i).IsPredefinedScheme ();
-    }
-
-    /// <summary>
-    /// Retrieves a sub-array from the specified <paramref name="array"/>.
-    /// A sub-array starts at the specified element position in <paramref name="array"/>.
-    /// </summary>
-    /// <returns>
-    /// An array of T that receives a sub-array, or an empty array of T
-    /// if any problems with the parameters.
+      return value.Substring (0, idx).IsPredefinedScheme ();
+    }
+
+    /// <summary>
+    /// Retrieves a sub-array from the specified <paramref name="array"/>. A sub-array starts at
+    /// the specified element position in <paramref name="array"/>.
+    /// </summary>
+    /// <returns>
+    /// An array of T that receives a sub-array, or an empty array of T if any problems with
+    /// the parameters.
     /// </returns>
     /// <param name="array">
     /// An array of T from which to retrieve a sub-array.
@@ -1394,12 +1370,12 @@
     }

     /// <summary>
-    /// Retrieves a sub-array from the specified <paramref name="array"/>.
-    /// A sub-array starts at the specified element position in <paramref name="array"/>.
-    /// </summary>
-    /// <returns>
-    /// An array of T that receives a sub-array, or an empty array of T
-    /// if any problems with the parameters.
+    /// Retrieves a sub-array from the specified <paramref name="array"/>. A sub-array starts at
+    /// the specified element position in <paramref name="array"/>.
+    /// </summary>
+    /// <returns>
+    /// An array of T that receives a sub-array, or an empty array of T if any problems with
+    /// the parameters.
     /// </returns>
     /// <param name="array">
     /// An array of T from which to retrieve a sub-array.
@@ -1500,8 +1476,8 @@
     /// </param>
     /// <param name="action">
     /// An <c>Action<int></c> delegate that references the method(s) to execute.
-    /// An <see cref="int"/> parameter to pass to the method(s) is the zero-based count
-    /// of iteration.
+    /// An <see cref="int"/> parameter to pass to the method(s) is the zero-based count of
+    /// iteration.
     /// </param>
     public static void Times (this int n, Action<int> action)
     {
@@ -1518,8 +1494,8 @@
     /// </param>
     /// <param name="action">
     /// An <c>Action<long></c> delegate that references the method(s) to execute.
-    /// A <see cref="long"/> parameter to pass to the method(s) is the zero-based count
-    /// of iteration.
+    /// A <see cref="long"/> parameter to pass to the method(s) is the zero-based count of
+    /// iteration.
     /// </param>
     public static void Times (this long n, Action<long> action)
     {
@@ -1536,8 +1512,8 @@
     /// </param>
     /// <param name="action">
     /// An <c>Action<uint></c> delegate that references the method(s) to execute.
-    /// A <see cref="uint"/> parameter to pass to the method(s) is the zero-based count
-    /// of iteration.
+    /// A <see cref="uint"/> parameter to pass to the method(s) is the zero-based count of
+    /// iteration.
     /// </param>
     public static void Times (this uint n, Action<uint> action)
     {
@@ -1554,8 +1530,8 @@
     /// </param>
     /// <param name="action">
     /// An <c>Action<ulong></c> delegate that references the method(s) to execute.
-    /// A <see cref="ulong"/> parameter to pass to this method(s) is the zero-based count
-    /// of iteration.
+    /// A <see cref="ulong"/> parameter to pass to this method(s) is the zero-based count of
+    /// iteration.
     /// </param>
     public static void Times (this ulong n, Action<ulong> action)
     {
@@ -1568,9 +1544,9 @@
     /// Converts the specified array of <see cref="byte"/> to the specified type data.
     /// </summary>
     /// <returns>
-    /// A T converted from <paramref name="source"/>, or a default value of T if
-    /// <paramref name="source"/> is an empty array of <see cref="byte"/> or if the
-    /// type of T isn't <see cref="bool"/>, <see cref="char"/>, <see cref="double"/>,
+    /// A T converted from <paramref name="source"/>, or a default value of
+    /// T if <paramref name="source"/> is an empty array of <see cref="byte"/> or
+    /// if the type of T isn't <see cref="bool"/>, <see cref="char"/>, <see cref="double"/>,
     /// <see cref="float"/>, <see cref="int"/>, <see cref="long"/>, <see cref="short"/>,
     /// <see cref="uint"/>, <see cref="ulong"/>, or <see cref="ushort"/>.
     /// </returns>
@@ -1692,15 +1668,13 @@
       if (source == null)
         throw new ArgumentNullException ("source");

-      return source.Length > 1 && !sourceOrder.IsHostOrder ()
-             ? source.Reverse ()
-             : source;
-    }
-
-    /// <summary>
-    /// Converts the specified <paramref name="array"/> to a <see cref="string"/>
-    /// that concatenates the each element of <paramref name="array"/> across the
-    /// specified <paramref name="separator"/>.
+      return source.Length > 1 && !sourceOrder.IsHostOrder () ? source.Reverse () : source;
+    }
+
+    /// <summary>
+    /// Converts the specified <paramref name="array"/> to a <see cref="string"/> that
+    /// concatenates the each element of <paramref name="array"/> across the specified
+    /// <paramref name="separator"/>.
     /// </summary>
     /// <returns>
     /// A <see cref="string"/> converted from <paramref name="array"/>,
@@ -1741,8 +1715,8 @@
     /// Converts the specified <see cref="string"/> to a <see cref="Uri"/>.
     /// </summary>
     /// <returns>
-    /// A <see cref="Uri"/> converted from <paramref name="uriString"/>, or <see langword="null"/>
-    /// if <paramref name="uriString"/> isn't successfully converted.
+    /// A <see cref="Uri"/> converted from <paramref name="uriString"/>,
+    /// or <see langword="null"/> if <paramref name="uriString"/> isn't successfully converted.
     /// </returns>
     /// <param name="uriString">
     /// A <see cref="string"/> to convert.
@@ -1760,34 +1734,30 @@
     /// URL-decodes the specified <see cref="string"/>.
     /// </summary>
     /// <returns>
-    /// A <see cref="string"/> that receives the decoded string, or the <paramref name="value"/>
-    /// if it's <see langword="null"/> or empty.
+    /// A <see cref="string"/> that receives the decoded string,
+    /// or the <paramref name="value"/> if it's <see langword="null"/> or empty.
     /// </returns>
     /// <param name="value">
     /// A <see cref="string"/> to decode.
     /// </param>
     public static string UrlDecode (this string value)
     {
-      return value != null && value.Length > 0
-             ? HttpUtility.UrlDecode (value)
-             : value;
+      return value != null && value.Length > 0 ? HttpUtility.UrlDecode (value) : value;
     }

     /// <summary>
     /// URL-encodes the specified <see cref="string"/>.
     /// </summary>
     /// <returns>
-    /// A <see cref="string"/> that receives the encoded string, or <paramref name="value"/>
-    /// if it's <see langword="null"/> or empty.
+    /// A <see cref="string"/> that receives the encoded string,
+    /// or <paramref name="value"/> if it's <see langword="null"/> or empty.
     /// </returns>
     /// <param name="value">
     /// A <see cref="string"/> to encode.
     /// </param>
     public static string UrlEncode (this string value)
     {
-      return value != null && value.Length > 0
-             ? HttpUtility.UrlEncode (value)
-             : value;
+      return value != null && value.Length > 0 ? HttpUtility.UrlEncode (value) : value;
     }

     /// <summary>
@@ -1795,11 +1765,11 @@
     /// <see cref="HttpListenerResponse"/>.
     /// </summary>
     /// <param name="response">
-    /// A <see cref="HttpListenerResponse"/> that represents the HTTP response
-    /// used to write the content data.
+    /// A <see cref="HttpListenerResponse"/> that represents the HTTP response used to
+    /// send the content data.
     /// </param>
     /// <param name="content">
-    /// An array of <see cref="byte"/> that represents the content data to write.
+    /// An array of <see cref="byte"/> that represents the content data to send.
     /// </param>
     /// <exception cref="ArgumentNullException">
     /// <paramref name="response"/> is <see langword="null"/>.
@@ -1809,13 +1779,13 @@
       if (response == null)
         throw new ArgumentNullException ("response");

-      var len = 0;
-      if (content == null || (len = content.Length) == 0)
+      var len = 0L;
+      if (content == null || (len = content.LongLength) == 0)
         return;

       var output = response.OutputStream;
       response.ContentLength64 = len;
-      output.Write (content, 0, len);
+      output.WriteBytes (content);
       output.Close ();
     }


Remove code that increments ReportingSettings.Launches on change of date

(Code elsewhere increments it on each launch.)

Also removes the firstLaunch notification, which appears redundant
(though differently detected) with firstApparentLaunchForAnyVersionOnMachine.

--- Palaso/Reporting/UsageReporter.cs
+++ Palaso/Reporting/UsageReporter.cs
@@ -450,16 +450,10 @@

 		private void BeginGoogleAnalytics(string domain, string googleAnalyticsAccountCode, bool reportAsDeveloper)
 		{
+			_analytics = new AnalyticsEventSender(domain, googleAnalyticsAccountCode, UserGuid, _settings.FirstLaunchDate, _settings.PreviousLaunchDate, _settings.Launches, reportAsDeveloper, SaveCookie, null/*COOKIE TODO*/);
+
 			if (DateTime.UtcNow.Date != _settings.PreviousLaunchDate.Date)
 			{
-				_settings.Launches++;
-			}
-
-			_analytics = new AnalyticsEventSender(domain, googleAnalyticsAccountCode, UserGuid, _settings.FirstLaunchDate, _settings.PreviousLaunchDate, _settings.Launches, reportAsDeveloper, SaveCookie, null/*COOKIE TODO*/);
-
-			 if (DateTime.UtcNow.Date != _settings.PreviousLaunchDate.Date)
-			{
-				_settings.Launches++;
 				SendNavigationNotice("launch/version{0}", ErrorReport.VersionNumberString);
 			}

@@ -474,14 +468,6 @@
 			{
 				SendNavigationNotice("versionChange/version{0}-previousVersion{1}",ErrorReport.VersionNumberString,_realPreviousVersion );
 			}
-
-			if (s_singleton._settings.Launches == 1)
-			{
-				SendNavigationNotice("firstLaunch/version{0}", ErrorReport.VersionNumberString);
-			}
-
-
-			//Usage.Send("Runtime", "launched", ErrorReport.VersionNumberString, UsageReporter.AppReportingSettings.Launches);
 		}

 		private void SaveCookie(Cookie cookie)


fixed algorithm

fixed algorithm

--- Parsley.Core/BrightestPixelLLE.cs
+++ Parsley.Core/BrightestPixelLLE.cs
@@ -50,20 +50,25 @@
     public override void FindLaserLine(Emgu.CV.Image<Gray, byte> channel, out System.Drawing.PointF[] laser_points) {
       laser_points = new System.Drawing.PointF[channel.Width];
       // Search rows
+      int max_i = 0;
+      int max_pos = 0;
       for (int c = 0; c < channel.Width; ++c) {
-        int max = this.FindMax(channel, c);
+        this.FindMax(channel, c, ref max_pos, ref max_i);
         laser_points[c].X = c;
-        laser_points[c].Y = (max >= _threshold) ? max : -1;
+        laser_points[c].Y = (max_i >= _threshold) ? max_pos : -1;
       }
     }

-    int FindMax(Emgu.CV.Image<Gray, byte> channel, int column) {
-      int max = 0;
+    void FindMax(Emgu.CV.Image<Gray, byte> channel, int column, ref int max_pos, ref int max_i) {
+      max_i = 0;
+      max_pos = -1;
       for (int k = 0; k < channel.Height; ++k) {
         int i = (int)channel[k, column].Intensity;
-        if (i > max) max = k;
+        if (i > max_i) {
+          max_i = i;
+          max_pos = k;
+        }
       }
-      return max;
     }

   }


disable maximize button because dataset is not resizing with form itself

--- PathExplorer/MainForm.Designer.cs
+++ PathExplorer/MainForm.Designer.cs
@@ -105,6 +105,7 @@
             this.Controls.Add(this.pathDataGridView);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
             this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.MaximizeBox = false;
             this.Name = "MainForm";
             this.Text = "Path Explorer";
             this.Load += new System.EventHandler(this.MainFormLoad);


Fix a bug with saving an opened .jpg.

Fix a bug with saving an opened .jpg.

--- Pinta.Core/Actions/FileActions.cs
+++ Pinta.Core/Actions/FileActions.cs
@@ -439,6 +439,9 @@
 					filetype = "png";

 				filetype = filetype.TrimStart ('.');
+
+				if (filetype == "jpg")
+					filetype = "jpeg";
 			}

 			if (filetype == "ora") {


Update view menu to match GNOME HIG.

Update view menu to match GNOME HIG.

[Fixes bug #671316]

--- Pinta.Core/Actions/ViewActions.cs
+++ Pinta.Core/Actions/ViewActions.cs
@@ -61,9 +61,9 @@

 			ZoomIn = new Gtk.Action ("ZoomIn", Catalog.GetString ("Zoom In"), null, Stock.ZoomIn);
 			ZoomOut = new Gtk.Action ("ZoomOut", Catalog.GetString ("Zoom Out"), null, Stock.ZoomOut);
-			ZoomToWindow = new Gtk.Action ("ZoomToWindow", Catalog.GetString ("Zoom to Window"), null, Stock.ZoomFit);
+			ZoomToWindow = new Gtk.Action ("ZoomToWindow", Catalog.GetString ("Best Fit"), null, Stock.ZoomFit);
 			ZoomToSelection = new Gtk.Action ("ZoomToSelection", Catalog.GetString ("Zoom to Selection"), null, "Menu.View.ZoomToSelection.png");
-			ActualSize = new Gtk.Action ("ActualSize", Catalog.GetString ("Actual Size"), null, Stock.Zoom100);
+			ActualSize = new Gtk.Action ("ActualSize", Catalog.GetString ("Normal Size"), null, Stock.Zoom100);
 			ToolBar = new Gtk.ToggleAction ("Toolbar", Catalog.GetString ("Toolbar"), null, null);
 			PixelGrid = new Gtk.ToggleAction ("PixelGrid", Catalog.GetString ("Pixel Grid"), null, "Menu.View.Grid.png");
 			Rulers = new Gtk.ToggleAction ("Rulers", Catalog.GetString ("Rulers"), null, "Menu.View.Rulers.png");
@@ -85,6 +85,11 @@
 			MenuItem show_pad = (MenuItem)menu.Children[0];
 			menu.Remove (show_pad);

+			menu.Append (ToolBar.CreateMenuItem ());
+			menu.Append (PixelGrid.CreateMenuItem ());
+			menu.Append (Rulers.CreateMenuItem ());
+			menu.AppendSeparator ();
+
 			ImageMenuItem zoomin = ZoomIn.CreateAcceleratedMenuItem (Gdk.Key.plus, Gdk.ModifierType.ControlMask);
 			zoomin.AddAccelerator ("activate", PintaCore.Actions.AccelGroup, new AccelKey (Gdk.Key.equal, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
 			zoomin.AddAccelerator ("activate", PintaCore.Actions.AccelGroup, new AccelKey (Gdk.Key.KP_Add, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
@@ -95,17 +100,13 @@
 			zoomout.AddAccelerator ("activate", PintaCore.Actions.AccelGroup, new AccelKey (Gdk.Key.KP_Subtract, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
 			menu.Append (zoomout);

-			menu.Append (ZoomToWindow.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask));
-			//menu.Append (ZoomToSelection.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
 			ImageMenuItem actualsize = ActualSize.CreateAcceleratedMenuItem (Gdk.Key.Key_0, Gdk.ModifierType.ControlMask);
 			actualsize.AddAccelerator ("activate", PintaCore.Actions.AccelGroup, new AccelKey (Gdk.Key.A, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask, AccelFlags.Visible));
 			menu.Append (actualsize);
-
-			menu.AppendSeparator ();
-			menu.Append (ToolBar.CreateMenuItem ());
-			menu.Append (PixelGrid.CreateMenuItem ());
-			menu.Append (Rulers.CreateMenuItem ());
+			menu.Append (ZoomToWindow.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask));
+			//menu.Append (ZoomToSelection.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
 			menu.Append (Fullscreen.CreateAcceleratedMenuItem (Gdk.Key.F11, Gdk.ModifierType.None));
+
 			menu.AppendSeparator ();

 			Gtk.Action unit_action = new Gtk.Action ("RulerUnits", Mono.Unix.Catalog.GetString ("Ruler Units"), null, null);


Avancement modeste et commente des REGEX

--- PositronNova/PositronNova/Chat.cs
+++ PositronNova/PositronNova/Chat.cs
@@ -14,13 +14,17 @@
     {
         //Capte le texte
         //Le code sera à compléter pour l'implémentation de l'autocomplete pour shell
+        private MatchCollection foo;
         private bool tab;
         private int rank;
         private string input;
+        private Regex regex;
         private KBInput kb;
         private string[] texts;
         public Chat()
         {
+            //regex = new Regex("[;(\-)pdosx]*");
+            //regex.Options=
             tab = false;
             rank = 0;
             input = "";
@@ -32,11 +36,7 @@
             if (mess != "")
             {
                 ////On remplace par des emoticones
-                //Regex regex = new Regex();
-                //switch (regex.)
-                //{
-
-                //}
+                //foo = regex.Matches(mess);
                 int i = 0;
                 do
                 {


Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0.

--- Properties/VersionAssemblyInfo.cs
+++ Properties/VersionAssemblyInfo.cs
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.34003
+//     Runtime Version:4.0.30319.18051
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -16,7 +16,7 @@

 [assembly: AssemblyVersion("3.0.0.0")]
 [assembly: AssemblyFileVersion("3.1.0.0")]
-[assembly: AssemblyConfiguration("Release built on 2013-10-23 22:48")]
+[assembly: AssemblyConfiguration("Release built on 2013-12-03 10:23")]
 [assembly: AssemblyCopyright("Copyright © 2013 Autofac Contributors")]
 [assembly: AssemblyDescription("Autofac.Web 3.1.0")]


VersionAssemblyInfo.cs updates from latest builds.

--- Properties/VersionAssemblyInfo.cs
+++ Properties/VersionAssemblyInfo.cs
@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.18033
+//     Runtime Version:4.0.30319.18213
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -15,8 +15,9 @@
 using System.Runtime.InteropServices;

 [assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
-[assembly: AssemblyConfiguration("Release built on 2013-02-28 02:03")]
+[assembly: AssemblyFileVersion("3.1.0.0")]
+[assembly: AssemblyConfiguration("Release built on 2013-07-15 22:03")]
 [assembly: AssemblyCopyright("Copyright © 2013 Autofac Contributors")]
+[assembly: AssemblyDescription("Autofac.Web 3.1.0")]


recalculate max popup list item number

recalculate max popup list item number

--- Assets/JumpCommand/JumpCommandGUI.cs
+++ Assets/JumpCommand/JumpCommandGUI.cs
@@ -445,6 +445,7 @@
         OnReceiveEnterEvent     += HandleSubmitPopupList;
         popupListSelPos = 0;
         popupListScrollPos = Vector2.zero;
+        popupListMaxDisplayItemNum = (int)Mathf.Clamp((Screen.height/2-uiItemHeight)/uiItemHeight, 3f, 9f) ;
     }

     void ClosePopupList() {
@@ -544,7 +545,7 @@
             float contentHeight = uiItemHeight * popupListContent.Length;

             // let draw above screen if yPos is greater than half screen height, otherwise popup list will draw out of screen.
-            if(yPos > Screen.height/2) {
+            if(yPos > Screen.height/2 + uiItemHeight) {
                 yPos = (Screen.height - uiItemHeight*2)*verticalPos - Mathf.Min(popupListHeight,contentHeight);
             }


make popup list  display above text input

--- Assets/JumpCommand/JumpCommandGUI.cs
+++ Assets/JumpCommand/JumpCommandGUI.cs
@@ -573,16 +573,16 @@
         if(popupListOpen) {
             float scrollWidth= 16f;

-            float popupListHeight = popupListMaxDisplayItemNum * popupListItemHeight;
-            float contentHeight = popupListItemHeight * popupListContent.Length;
+            float popupListMaxHeight = popupListMaxDisplayItemNum * popupListItemHeight;
+            float popupListHeight = popupListItemHeight * popupListContent.Length;

             // make draw above screen if yPos is greater than half of screen height, if not popup list will draw out of screen.
-            if(yPos > Screen.height/2 + popupListItemHeight) {
-                yPos = (Screen.height - popupListItemHeight*2)*verticalPos - Mathf.Min(popupListHeight,contentHeight);
-            }
-
-            popupListScrollPos = GUI.BeginScrollView(new Rect(0, yPos, Screen.width, popupListHeight), popupListScrollPos, new Rect(0,0,Screen.width-scrollWidth, contentHeight),false, false);
-            popupListSelIndex = GUI.SelectionGrid(new Rect(0, 0, Screen.width, contentHeight), popupListSelIndex, popupListContent, 1, popupListStyle);
+            if(yPos + Mathf.Min(popupListMaxHeight,popupListHeight) > Screen.height) {
+                yPos = (Screen.height - popupListItemHeight*2)*verticalPos - Mathf.Min(popupListMaxHeight,popupListHeight);
+            }
+
+            popupListScrollPos = GUI.BeginScrollView(new Rect(0, yPos, Screen.width, popupListMaxHeight), popupListScrollPos, new Rect(0,0,Screen.width-scrollWidth, popupListHeight),false, false);
+            popupListSelIndex = GUI.SelectionGrid(new Rect(0, 0, Screen.width, popupListHeight), popupListSelIndex, popupListContent, 1, popupListStyle);
             GUI.EndScrollView();
         }


The past "..." fixed everything. Note that I haven't tested the Attacking.

Both the host and the client can now move and select units, so it should be good to go. Tomorrow's the day I will be working more on the unit attacking and check to make sure everything works before publishing this build.

--- Assets/new_multiplayer/NewSpawner.cs
+++ Assets/new_multiplayer/NewSpawner.cs
@@ -4,7 +4,6 @@
 using Common;

 namespace MultiPlayer {
-
 	public struct NewUnitStruct {
 		public GameObject unit;


Fix OwnerView not propagating to child nodes. Thanks @RCalocaO!

--- renderdocui/Controls/TreeListView/TreeListNode.cs
+++ renderdocui/Controls/TreeListView/TreeListNode.cs
@@ -33,7 +33,25 @@

         Color[]             m_backCols = null;

-        public TreeListView OwnerView = null;
+        private TreeListView m_ownerview = null;
+        public TreeListView OwnerView
+        {
+            get
+            {
+                if (m_ownerview != null)
+                    return m_ownerview;
+
+                if (m_owner != null)
+                    m_ownerview = m_owner.OwnerView;
+
+                return m_ownerview;
+            }
+
+            set
+            {
+                m_ownerview = value;
+            }
+        }

 		public Node Parent
 		{
@@ -420,7 +438,25 @@
 		int		m_nextId = 0;
 		int		m_IdDirty = 0;

-        public TreeListView OwnerView = null;
+        private TreeListView m_ownerview = null;
+        public TreeListView OwnerView
+        {
+            get
+            {
+                if(m_ownerview != null)
+                    return m_ownerview;
+
+                if(m_owner != null)
+                    m_ownerview = m_owner.OwnerView;
+
+                return m_ownerview;
+            }
+
+            set
+            {
+                m_ownerview = value;
+            }
+        }

 		Node[]	m_nodesInternal = null;
 		Node	m_owner = null;


Change paintfizzler to use trigger texture

--- CCTagIntermediateCompiler/Program.cs
+++ CCTagIntermediateCompiler/Program.cs
@@ -168,7 +168,10 @@
                 {
                     (solid.Body.First(property => property.Name == "id") as VProperty).Value = vmf.GetUniqueID().ToString();
                     foreach (VBlock side in solid.Body.Where(property => property.GetType() == typeof(VBlock) && property.Name == "side").Select(property => property as VBlock))
+                    {
                         (side.Body.First(property => property.Name == "id") as VProperty).Value = vmf.GetUniqueID().ToString();
+                        (side.Body.First(property => property.Name == "material") as VProperty).Value = "tools/toolstrigger";
+                    }
                 }
             }
             return hasChanged;


Cleaning up the code a bit and adding more log message.s

--- eFormCore/Core.cs
+++ eFormCore/Core.cs
@@ -3953,23 +3953,16 @@

                 if (_swiftEnabled)
                 {
+                    log.LogStandard(t.GetMethodName("Core"), $"Swift enabled, so trying to upload file {fileName}");
                     string filePath = Path.Combine(fileLocationPicture, fileName);
-                    log.LogStandard(t.GetMethodName("Core"), "filePath is " + filePath);
                     if (File.Exists(filePath))
                     {
-                        using (var fileStream = File.OpenRead(filePath))
-                        {
-                            using (var memoryStream = new MemoryStream())
-                            {
-                                fileStream.CopyTo(memoryStream);
-
-                                PutFilToStorageSystem(filePath, fileName, 0);
-                            }
-                        }
+                        log.LogStandard(t.GetMethodName("Core"), $"File exists at path {filePath}");
+                        PutFilToStorageSystem(filePath, fileName, 0);
                     }
                     else
                     {
-
+                        log.LogWarning(t.GetMethodName("Core"), $"File could not be found at filepath {filePath}");
                     }
                 }

@@ -4006,37 +3999,44 @@
             }
         }

-        public async Task<bool> PutFilToStorageSystem(String filePath, string fileName, int tryCount)
+        public void PutFilToStorageSystem(String filePath, string fileName, int tryCount)
         {
             if (_swiftEnabled)
             {
-                var fileStream = new FileStream(filePath, FileMode.Open);
-
+
                 log.LogStandard(t.GetMethodName("Core"), $"Trying to upload file {fileName} to {_customerNo}_uploaded_data");
-                SwiftBaseResponse response = _swiftClient
-                    .ObjectPutAsync(_customerNo + "_uploaded_data", fileName, fileStream).Result;
-
-                if (!response.IsSuccess)
-                {
-                    if (response.Reason == "Unauthorized")
-                    {
-                        log.LogWarning(t.GetMethodName("Core"), "Check swift cridentials : Unauthorized");
-                        throw new UnauthorizedAccessException();
-                    }
-                    response = _swiftClient.ContainerPutAsync(_customerNo + "_uploaded_data").Result;
-                    if (response.IsSuccess)
-                    {
-                        response = _swiftClient
-                            .ObjectPutAsync(_customerNo + "_uploaded_data", fileName, fileStream).Result;
-                        if (!response.IsSuccess)
+                try
+                {
+                    var fileStream = new FileStream(filePath, FileMode.Open);
+
+                    SwiftBaseResponse response = _swiftClient
+                        .ObjectPutAsync(_customerNo + "_uploaded_data", fileName, fileStream).Result;
+
+                    if (!response.IsSuccess)
+                    {
+                        if (response.Reason == "Unauthorized")
                         {
-                            throw new Exception("Could not get file " + fileName);
+                            log.LogWarning(t.GetMethodName("Core"), "Check swift cridentials : Unauthorized");
+                            throw new UnauthorizedAccessException();
                         }
-                    }
-
-                }
-            }
-            return true;
+
+                        response = _swiftClient.ContainerPutAsync(_customerNo + "_uploaded_data").Result;
+                        if (response.IsSuccess)
+                        {
+                            response = _swiftClient
+                                .ObjectPutAsync(_customerNo + "_uploaded_data", fileName, fileStream).Result;
+                            if (!response.IsSuccess)
+                            {
+                                throw new Exception("Could not get file " + fileName);
+                            }
+                        }
+                    }
+                }
+                catch (FileNotFoundException ex)
+                {
+                    log.LogCritical(t.GetMethodName("Core"), $"File not found at {filePath}");
+                }
+            }
         }

         public bool CheckStatusByMicrotingUid(string microtingUid)


Fixing the missing seek of streams.

Fixing the missing seek of streams.

--- eFormCore/Core.cs
+++ eFormCore/Core.cs
@@ -5442,23 +5442,12 @@

                         string fileCheckSum = fileName.AsSpan().Slice(fileName.LastIndexOf(".") - 32, 32).ToString();

-                        try
-                        {
-                            CaseDto dto = await _sqlController.FileCaseFindMUId(urlStr).ConfigureAwait(false);
-                            FileDto fDto = new FileDto(dto.SiteUId, dto.CaseType, dto.CaseUId, dto.MicrotingUId.ToString(),
-                                dto.CheckUId.ToString(), Path.Combine(_fileLocationPicture,fileName));
-                            HandleFileDownloaded?.Invoke(fDto, EventArgs.Empty);
-                        }
-                        catch
-                        {
-                            Log.LogWarning(methodName, "HandleFileDownloaded event's external logic suffered an Expection");
-                        }
-
+                        baseMemoryStream.Seek(0, SeekOrigin.Begin);
                         MemoryStream s3Stream = new MemoryStream();
                         await baseMemoryStream.CopyToAsync(s3Stream);
+                        s3Stream.Seek(0, SeekOrigin.Begin);
+                        await PutFileToS3Storage(s3Stream, fileName);
                         baseMemoryStream.Seek(0, SeekOrigin.Begin);
-                        await PutFileToS3Storage(s3Stream, fileName);
-                        await s3Stream.DisposeAsync();

                         Log.LogStandard(methodName, $"Download of '{urlStr}' completed");


update

update

--- CSharpGL/0Foundations/Maths/uvec3.cs
+++ CSharpGL/0Foundations/Maths/uvec3.cs
@@ -1,5 +1,6 @@
 using System;
 using System.ComponentModel;
+using System.Runtime.InteropServices;

 namespace CSharpGL
 {
@@ -7,21 +8,25 @@
     /// Represents a three dimensional vector.
     /// </summary>
     [TypeConverter(typeof(StructTypeConverter<uvec3>))]
+    [StructLayout(LayoutKind.Explicit)]
     public struct uvec3 : IEquatable<uvec3>, ILoadFromString
     {
         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// Don't change the order of x, y, z, w appears!
+        /// </summary>
+        [FieldOffset(sizeof(uint) * 0)]
         public uint x;

         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// Don't change the order of x, y, z, w appears!
+        /// </summary>
+        [FieldOffset(sizeof(uint) * 1)]
         public uint y;

         /// <summary>
-        /// Don't change the order of x, y, z appears!
-        /// </summary>
+        /// Don't change the order of x, y, z, w appears!
+        /// </summary>
+        [FieldOffset(sizeof(uint) * 2)]
         public uint z;

         /// <summary>


Adding more log messages.

Adding more log messages.

--- eFormCore/Core.cs
+++ eFormCore/Core.cs
@@ -3987,10 +3987,12 @@
                 {
                     if (response.Reason == "Unauthorized")
                     {
-                        Log.LogWarning(t.GetMethodName("Core"), "Check swift cridentials : Unauthorized");
+                        Log.LogWarning(t.GetMethodName("Core"), "Check swift credentials : Unauthorized");
                         throw new UnauthorizedAccessException();
                     }
-                    throw new Exception("Could not get file " + fileName);
+
+                    Log.LogCritical(t.GetMethodName("Core"), $"Could not get file {fileName}, reason is {response.Reason}");
+                    throw new Exception($"Could not get file {fileName}");
                 }
             }
             else
@@ -4019,7 +4021,9 @@
                             Log.LogWarning(t.GetMethodName("Core"), "Check swift credentials : Unauthorized");
                             throw new UnauthorizedAccessException();
                         }
-
+
+                        Log.LogWarning(t.GetMethodName("Core"), $"Something went wrong, message was {response.Reason}");
+
                         response = _swiftClient.ContainerPutAsync(_customerNo + "_uploaded_data").Result;
                         if (response.IsSuccess)
                         {
@@ -4027,7 +4031,7 @@
                                 .ObjectPutAsync(_customerNo + "_uploaded_data", fileName, fileStream).Result;
                             if (!response.IsSuccess)
                             {
-                                throw new Exception("Could not get file " + fileName);
+                                throw new Exception($"Could not upload file {fileName}");
                             }
                         }
                     }


Refactored constructor arguments for HtmlValidator.

--- src/ContinuousSeo/W3cValidation/ContinuousSeo.W3cValidation.Core/Html/HtmlValidator.cs
+++ src/ContinuousSeo/W3cValidation/ContinuousSeo.W3cValidation.Core/Html/HtmlValidator.cs
@@ -13,6 +13,7 @@
     using System.Web;
     using System.Collections.Specialized;
     using ContinuousSeo.Core.Net;
+    using ContinuousSeo.Core.IO;

     /// <summary>
     /// Class that contains methods that wrap the W3C HTML Validation API at
@@ -23,18 +24,31 @@
     public class HtmlValidator
     {
         const string defaultValidatorAddress = "http://validator.w3.org/check";
-        private IHttpClient httpClient;
-        private ResourceCopier resourceCopier;
+        private readonly IHttpClient mHttpClient;
+        private readonly IStreamFactory mStreamFactory;
+        private readonly ResourceCopier mResourceCopier;
+        private readonly IValidatorSoap12ResponseParser mResponseParser;

         public HtmlValidator() :
-            this(new HttpClient(), new HtmlValidatorResourceCopier())
-        {
-        }
-
-        public HtmlValidator(IHttpClient httpClient, ResourceCopier resourceCopier)
-        {
-            this.httpClient = httpClient;
-            this.resourceCopier = resourceCopier;
+            this(new HttpClient(), new StreamFactory(), new HtmlValidatorResourceCopier(), new HtmlValidatorSoap12ResponseParser())
+        {
+        }
+
+        public HtmlValidator(IHttpClient httpClient, IStreamFactory streamFactory, ResourceCopier resourceCopier, IValidatorSoap12ResponseParser responseParser)
+        {
+            if (httpClient == null)
+                throw new ArgumentNullException("httpClient");
+            if (streamFactory == null)
+                throw new ArgumentNullException("streamFactory");
+            if (resourceCopier == null)
+                throw new ArgumentNullException("resourceCopier");
+            if (responseParser == null)
+                throw new ArgumentNullException("responseParser");
+
+            this.mHttpClient = httpClient;
+            this.mStreamFactory = streamFactory;
+            this.mResourceCopier = resourceCopier;
+            this.mResponseParser = responseParser;
         }

         #region IsDefaultValidatorAddress
@@ -142,7 +156,7 @@
             {
                 // Copy the resources to the output directory if they don't already exist.
                 // This is to ensure all dependencies of the HTML document are there.
-                resourceCopier.CopyResources(directory);
+                mResourceCopier.CopyResources(directory);
             }

             using (FileStream output = new FileStream(filename, FileMode.Create))
@@ -212,11 +226,11 @@

             if (inputFormat == InputFormat.Fragment)
             {
-                headers = this.httpClient.Post(output, validatorAddress, data);
+                headers = this.mHttpClient.Post(output, validatorAddress, data);
             }
             else
             {
-                headers = this.httpClient.Get(output, validatorAddress + "?" + data);
+                headers = this.mHttpClient.Get(output, validatorAddress + "?" + data);
             }

             HtmlValidatorResult result = ParseResult(headers);
@@ -320,7 +334,7 @@

         private HtmlValidatorResult FixBrokenHeaders(Stream output, OutputFormat outputFormat, string input, InputFormat inputFormat, IHtmlValidatorSettings settings, string validatorAddress)
         {
-            Stream checkStream = new MemoryStream();
+            Stream checkStream = mStreamFactory.GetMemoryStream();
             if (outputFormat != OutputFormat.Soap12 || output.CanRead == false)
             {
                 if (IsDefaultValidatorAddress(validatorAddress))
@@ -335,11 +349,11 @@
                 // This time, ignore headers.
                 if (inputFormat == InputFormat.Fragment)
                 {
-                    this.httpClient.Post(checkStream, validatorAddress, checkData);
+                    this.mHttpClient.Post(checkStream, validatorAddress, checkData);
                 }
                 else
                 {
-                    this.httpClient.Get(checkStream, validatorAddress + "?" + checkData);
+                    this.mHttpClient.Get(checkStream, validatorAddress + "?" + checkData);
                 }
             }
             else
@@ -349,8 +363,7 @@
             }

             checkStream.Position = 0;
-            var parser = new HtmlValidatorSoap12ResponseParser();
-            var response = parser.ParseResponse(checkStream);
+            var response = mResponseParser.ParseResponse(checkStream);

             var errors = response.Errors.Count();
             var warnings = response.Warnings.Count();


Remove w3c check HttpClient (#3235)

Remove w3c check HttpClient (#3235)

* remove w3c check

* unnecessary usings

--- src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
+++ src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
@@ -16,11 +16,9 @@

 using System;
 using System.Diagnostics;
-using System.Globalization;
 using System.Net.Http;
 using System.Net.Sockets;
 using System.Reflection;
-using System.Runtime.Versioning;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using OpenTelemetry.Context.Propagation;
@@ -41,27 +39,11 @@
         private readonly PropertyFetcher<HttpResponseMessage> stopResponseFetcher = new("Response");
         private readonly PropertyFetcher<Exception> stopExceptionFetcher = new("Exception");
         private readonly PropertyFetcher<TaskStatus> stopRequestStatusFetcher = new("RequestTaskStatus");
-        private readonly bool httpClientSupportsW3C;
         private readonly HttpClientInstrumentationOptions options;

         public HttpHandlerDiagnosticListener(HttpClientInstrumentationOptions options)
             : base("HttpHandlerDiagnosticListener")
         {
-            var framework = Assembly
-                .GetEntryAssembly()?
-                .GetCustomAttribute<TargetFrameworkAttribute>()?
-                .FrameworkName;
-
-            // Depending on the .NET version/flavor this will look like
-            // '.NETCoreApp,Version=v3.0', '.NETCoreApp,Version = v2.2' or '.NETFramework,Version = v4.7.1'
-
-            if (framework != null)
-            {
-                var match = CoreAppMajorVersionCheckRegex.Match(framework);
-
-                this.httpClientSupportsW3C = match.Success && int.Parse(match.Groups[1].Value, CultureInfo.InvariantCulture) >= 3;
-            }
-
             this.options = options;
         }

@@ -98,7 +80,7 @@

             // Propagate context irrespective of sampling decision
             var textMapPropagator = Propagators.DefaultTextMapPropagator;
-            if (!(this.httpClientSupportsW3C && textMapPropagator is TraceContextPropagator))
+            if (textMapPropagator is not TraceContextPropagator)
             {
                 textMapPropagator.Inject(new PropagationContext(activity.Context, Baggage.Current), request, HttpRequestMessageContextPropagation.HeaderValueSetter);
             }


Remove mistakenly copy pasted line

Remove mistakenly copy pasted line

--- src/StorageEngines/SQLiteCommon/storage.sqlite.common/src/SqlitePclRawStorageEngine.cs
+++ src/StorageEngines/SQLiteCommon/storage.sqlite.common/src/SqlitePclRawStorageEngine.cs
@@ -141,8 +141,6 @@
                 int writer_flags = SQLITE_OPEN_FILEPROTECTION_COMPLETEUNLESSOPEN | readFlag | SQLITE_OPEN_FULLMUTEX;
                 OpenSqliteConnection(writer_flags, encryptionKey, out _writeConnection);

-                throw Misc.CreateExceptionAndLog(Log.To.Database, StatusCode.Unauthorized, TAG,
-                    "Decryption of database failed");
                 #if ENCRYPTION
                 if (!Decrypt(encryptionKey, _writeConnection)) {
                     throw Misc.CreateExceptionAndLog(Log.To.Database, StatusCode.Unauthorized, TAG,


Fix - Mapper utenti

Fix - Mapper utenti

--- src/backend/SO115App.Models/Servizi/CustomMapper/MapperRichiestaAssistenzaSuSintesi.cs
+++ src/backend/SO115App.Models/Servizi/CustomMapper/MapperRichiestaAssistenzaSuSintesi.cs
@@ -73,7 +73,8 @@
                         if (evento is AnnullamentoPresaInCarico)
                         {
                             var attivitaToDelete = ListaAttivita.Where(x => x.Nominativo.Equals(attivita.Nominativo)).ToList();
-                            ListaAttivita.Remove(attivitaToDelete[0]);
+                            if (attivitaToDelete.Count > 0)
+                                ListaAttivita.Remove(attivitaToDelete[0]);
                         }
                         else if (ListaAttivita.Where(x => x.Nominativo.Equals(attivita.Nominativo) && x.DataInizioAttivita <= attivita.DataInizioAttivita).ToList().Count > 0)
                         {


テストがなぜかコミットされてなかったのでコミット

テストがなぜかコミットされてなかったのでコミット

--- UnitTest/ValidationTest.cs
+++ UnitTest/ValidationTest.cs
@@ -235,5 +235,16 @@
       Assert.False(validator.IsValid("aaaa"));
       Assert.Equal("書式が正しくありません。", validator.Errors[0].Message);
     }
+
+    [Fact]
+    public void TestRegex()
+    {
+      Sdx.Context.Current.Lang = "ja";
+      var validator = new Sdx.Validation.Regex("[0-9]+");
+      Assert.Equal("[0-9]+", validator.Pattern.ToString());
+      Assert.True(validator.IsValid("0123"));
+      Assert.False(validator.IsValid("aaaa"));
+      Assert.Equal("書式が正しくありません。", validator.Errors[0].Message);
+    }
   }
 }


Rewrite optimization code.

Rewrite optimization code.

--- VCSCompiler/CilCompiler.cs
+++ VCSCompiler/CilCompiler.cs
@@ -40,47 +40,33 @@
 	    private static IEnumerable<AssemblyLine> OptimizeMethod(IEnumerable<AssemblyLine> body)
 	    {
 		    var mutableBody = body.ToList();
-		    var toDelete = new List<int>();

-			// Optimize out redundant PHA/PLA
-		    for (var i = 0; i < mutableBody.Count; i++)
-		    {
-			    if ((mutableBody[i] as AssemblyInstruction)?.OpCode == "PHA"
-			        && (mutableBody[i + 1] as AssemblyInstruction)?.OpCode == "PLA")
-			    {
-				    toDelete.Add(i);
-					toDelete.Add(i + 1);
-			    }
-		    }
-		    toDelete.Reverse();
-		    foreach (var index in toDelete)
-		    {
-			    mutableBody.RemoveAt(index);
-		    }
-			Console.WriteLine($"Eliminated {toDelete.Count} redundant PHA/PLA pairs.");
+			// Remove redundant PHA/PLA pairs.
+			var pairs = mutableBody.OfType<AssemblyInstruction>().Zip(mutableBody.OfType<AssemblyInstruction>().Skip(1), Tuple.Create);
+			var phaPlaPairs = pairs.Where(p => p.Item1.OpCode == "PHA" && p.Item2.OpCode == "PLA").ToArray();

-			toDelete.Clear();
-			// Optimize out redundant LDAs following STAs.
-			for (var i = 0; i < mutableBody.Count - 1; i++)
+			foreach(var pair in phaPlaPairs)
 			{
-				var line1 = mutableBody[i] as AssemblyInstruction;
-				var line2 = mutableBody[i + 1] as AssemblyInstruction;
+				mutableBody.RemoveAll(line => ReferenceEquals(line, pair.Item1));
+				mutableBody.RemoveAll(line => ReferenceEquals(line, pair.Item2));
+			}
+
+			Console.WriteLine($"Eliminated {phaPlaPairs.Length} redundant PHA/PLA pairs.");

-				if (line1?.OpCode == "STA" && line2?.OpCode == "LDA")
-				{
-					if (line1?.Argument != null && line1?.Argument == line2?.Argument)
-					{
-						toDelete.Add(i + 1);
-					}
-				}
+			// Remove LDAs following a STA to the same argument.
+			pairs = mutableBody.OfType<AssemblyInstruction>().Zip(mutableBody.OfType<AssemblyInstruction>().Skip(1), Tuple.Create);
+			var staLdaPairs = pairs
+				.Where(p => p.Item1.OpCode == "STA" && p.Item2.OpCode == "LDA")
+				.Where(p => p.Item1.Argument == p.Item2.Argument)
+				.ToArray();
+
+			foreach(var pair in staLdaPairs)
+			{
+				mutableBody.RemoveAll(line => ReferenceEquals(line, pair.Item2));
 			}
-			toDelete.Reverse();
-			foreach(var index in toDelete)
-			{
-				mutableBody.RemoveAt(index);
-			}
-			Console.WriteLine($"Eliminated {toDelete.Count} redundant LDAs.");
-		    return mutableBody;
+
+			Console.WriteLine($"Eliminated {staLdaPairs.Length} redundant LDAs.");
+			return mutableBody;
 	    }

 		/// <summary>


Implement mined notification

Implement mined notification

--- WalletWasabi.Gui/Global.cs
+++ WalletWasabi.Gui/Global.cs
@@ -519,7 +519,11 @@
 					Money receiveSpentDiff = incoming.Abs();
 					string amountString = receiveSpentDiff.ToString(false, true);

-					if (isSpent && receiveSpentDiff == miningFee)
+					if (e.Transaction.Transaction.IsCoinBase)
+					{
+						NotifyAndLog($"{amountString} BTC", "Mined", NotificationType.Success, e);
+					}
+					else if (isSpent && receiveSpentDiff == miningFee)
 					{
 						NotifyAndLog($"Mining Fee: {amountString} BTC", "Self Spend", NotificationType.Information, e);
 					}


WebSearches: Rework to new Trigger

WebSearches: Rework to new Trigger

Once again making thankful use of the new TriggerThreading option.

--- WebSearches/WebSearches.cs
+++ WebSearches/WebSearches.cs
@@ -30,6 +30,8 @@
         }
     }

+    public IEnumerable<Trigger> Triggers { get; private set; }
+

     public void Stop()
     {}
@@ -38,15 +40,20 @@
     public WebSearches(IIrcComm ircComm, IMeidoComm meido)
     {
         irc = ircComm;
-        meido.RegisterTrigger("g", GoogleSearch);
-        meido.RegisterTrigger("yt", YtSearch);
-        meido.RegisterTrigger("wiki", WikiSearch);
-        meido.RegisterTrigger("mal", MalSearch);
-        meido.RegisterTrigger("anidb", AnidbSearch);
-        meido.RegisterTrigger("mu", MuSearch);
-        meido.RegisterTrigger("vndb", VndbSearch);
-        meido.RegisterTrigger("steam", SteamSearch);
-        // maybe: urbandict, dict, animenewsnetwork
+
+        var t = TriggerThreading.Threadpool;
+
+        Triggers = new Trigger[] {
+            new Trigger("g", GoogleSearch, t),
+            new Trigger("yt", YtSearch, t),
+            new Trigger("wiki", WikiSearch, t),
+            new Trigger("mal", MalSearch, t),
+            new Trigger("anidb", AnidbSearch, t),
+            new Trigger("mu", MuSearch, t),
+            new Trigger("vndb", VndbSearch, t),
+            new Trigger("steam", SteamSearch, t)
+            // maybe: urbandict, dict, animenewsnetwork
+        };
     }


Protect interfaced actor from a notification message with empty payload.

--- core/Akka.Interfaced/InterfacedActor.cs
+++ core/Akka.Interfaced/InterfacedActor.cs
@@ -297,6 +297,12 @@
                 return;
             }

+            if (notification.InvokePayload == null)
+            {
+                // TODO: log bad message (missing payload)
+                return;
+            }
+
             var handlerItem = _handler.NotificationDispatcher.GetHandler(notification.InvokePayload.GetType());
             if (handlerItem == null)
                 return;


replace one Interlocked.CompareExchange with lock to walk around a runtime exception in the iOS platform

--- WebSocket4Net/WebSocket.cs
+++ WebSocket4Net/WebSocket.cs
@@ -692,10 +692,15 @@
             if (timer == null)
                 return;

-            if (Interlocked.CompareExchange(ref m_WebSocketTimer, null, timer) == timer)
-            {
+            lock (this)
+            {
+                if (m_WebSocketTimer == null)
+                    return;
+
                 timer.Change(Timeout.Infinite, Timeout.Infinite);
                 timer.Dispose();
+
+                m_WebSocketTimer = null;
             }
         }


WpfUtility.CrossLines3D: remove Points initialization

--- WpfUtility/CrossLines3D.cs
+++ WpfUtility/CrossLines3D.cs
@@ -20,7 +20,6 @@
                 Geometry = _mesh,
             };
             this.Content = _model;
-            this.Points = new Point3DCollection();
             SetColor(this.Color);
             CompositionTarget.Rendering += OnRender;
         }


Update TextElement.cs

Update TextElement.cs

--- XPathFinder/TextElement.cs
+++ XPathFinder/TextElement.cs
@@ -1,20 +1,3 @@
-/*
-Copyright (C) 2010  Torgeir Helgevold
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*/
 using System;
 using System.Collections.Generic;
 using System.Linq;


Four4Sample - NaN for square root of negative integer

--- projects/Four4Sample/Four4.Test/CalculationTest.cs
+++ projects/Four4Sample/Four4.Test/CalculationTest.cs
@@ -125,6 +125,7 @@
         [InlineData(".4 .4_ / R", "NaN")]
         [InlineData(".4 .4_ / R R", "NaN")]
         [InlineData("4 4 - R R", "0")]
+        [InlineData("4 4 - 4 - R", "NaN")]
         public void SquareRoot(string input, string result)
         {
             Calc(input, result);


Refrain from disabling cursor sensitivity at config-level

--- osu.Game/OsuGame.cs
+++ osu.Game/OsuGame.cs
@@ -880,13 +880,8 @@
             switch (action)
             {
                 case GlobalAction.ResetInputSettings:
-                    var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
-
-                    sensitivity.Disabled = false;
-                    sensitivity.Value = 1;
-                    sensitivity.Disabled = true;
-
-                    frameworkConfig.Set(FrameworkSetting.IgnoredInputHandlers, string.Empty);
+                    frameworkConfig.GetBindable<string>(FrameworkSetting.IgnoredInputHandlers).SetDefault();
+                    frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity).SetDefault();
                     frameworkConfig.GetBindable<ConfineMouseMode>(FrameworkSetting.ConfineMouseMode).SetDefault();
                     return true;


docs: added release note for ilmerge.

docs: added release note for ilmerge.

--- build/CommonAssemblyInfo.cs
+++ build/CommonAssemblyInfo.cs
@@ -14,17 +14,7 @@
 [assembly: AssemblyInformationalVersion("0.23.4")]

 /*
- * Version 0.23.4
+ * Version 0.23.5
  *
- * - [FIX] modified the unnecessary protected method 'VisitMethodBody' to
- *   private. (BREAKING-CHANGE)
- *
- * - [FIX] fixed that ReferenceCollector does not collect references to custom
- *   attributes.
- *
- * - [FIX] fixed that RestrictiveReferenceAssertion does not throw when unused
- *   reference is specified.
- *
- * - [FIX] fixed that IndirectReferenceAssertion does not ignore verifying
- *   unexposed(private/internal) members.
+ * - [FIX] addressed ilmerge in Experiment.AutoFixture and Experiment.Xunit.
  */


Version 1.6

Version 1.6

Fixed progress bar issue

--- mageload/Program.cs
+++ mageload/Program.cs
@@ -83,7 +83,7 @@
                 SerialClose();
                 return;
             }
-            Console.Write("\nUpload successful\n\n");
+            Console.Write("\nUpload successful\n");
         }

         static bool ParseArgs(string[] args)
@@ -296,19 +296,19 @@
         {
             try
             {
-                if(!_verbose) Console.Write("\nWriting   [");
+                if (!_verbose) Console.Write("Writing   ");
                 _serial.ReadExisting();
+                uint lastpercent = 0;
                 for (uint i = 0; i < _maxAddress; i += _pageSize)
                 {
                     if (!_verbose)
                     {
-                        if (i > 0) for (uint s = 0; s < 51; s++) Console.Write('\b');
                         uint percent = (uint) (((float) i/(float) _maxAddress)*50);
-                        for (uint s = 0; s < 50; s++)
+                        if (percent >= lastpercent)
                         {
-                            Console.Write(s <= percent ? "+" : " ");
+                            for (; lastpercent <= percent; lastpercent++)
+                                Console.Write("+");
                         }
-                        Console.Write("]");
                     }
                     byte[] bfr = new byte[6];
                     bfr[0] = (byte)Commands.Address;
@@ -367,19 +367,19 @@
         {
             try
             {
-                if (!_verbose) Console.Write("Verifying [");
+                if (!_verbose) Console.Write("Verifying ");
                 byte[] bfr;
+                uint lastpercent = 0;
                 for (uint i = 0; i < _maxAddress; i += _pageSize)
                 {
                     if (!_verbose)
                     {
-                        if (i > 0) for (uint s = 0; s < 51; s++) Console.Write('\b');
                         uint percent = (uint)(((float)i / (float)_maxAddress) * 50);
-                        for (uint s = 0; s < 50; s++)
+                        if (percent >= lastpercent)
                         {
-                            Console.Write(s <= percent ? "+" : " ");
+                            for (; lastpercent <= percent; lastpercent++)
+                                Console.Write("+");
                         }
-                        Console.Write("]");
                     }
                     bfr = new byte[6];
                     bfr[0] = (byte)Commands.Address;
@@ -437,7 +437,7 @@
                     }
                 }

-                if (!_verbose) Console.Write("\n\n");
+                if (!_verbose) Console.Write("\n");
                 bfr = new byte[2];
                 bfr[0] = (byte)Commands.Exit;
                 bfr[1] = (byte)(Commands.Execute);


simplify

simplify

--- samples/Eff.Examples.DependencyInjection/Program.cs
+++ samples/Eff.Examples.DependencyInjection/Program.cs
@@ -1,4 +1,5 @@
-using System;
+#pragma warning disable 1998
+using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
 using Eff.Core;
@@ -17,9 +18,8 @@
         {
             private HashSet<string> _users = new HashSet<string>();

-            public Task<bool> CreateUser(string username, string password) => Task.FromResult(_users.Add(username));
-
-            public Task<bool> Exists(string username) => Task.FromResult(_users.Contains(username));
+            public async Task<bool> CreateUser(string username, string password) => _users.Add(username);
+            public async Task<bool> Exists(string username) => _users.Contains(username);
         }

         static async Task Main()


QuickToggle acts more like Photoshop toggles, click and drag to change other objects visibility/lock state

--- QuickToggle/Editor/QuickToggle.cs
+++ QuickToggle/Editor/QuickToggle.cs
@@ -1,5 +1,7 @@
-using System.Collections.Generic;
-using UnityEditor;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using UnityEditor;
 using UnityEngine;
 using Object = UnityEngine.Object;

@@ -10,41 +12,93 @@
     {
         private const string PrefKeyShowToggle = "UnityToolbag.QuickToggle.Visible";

-        private static GUIStyle styleLock, styleLockUnselected, styleVisible;
-
-        static QuickToggle()
-        {
-            if (EditorPrefs.HasKey(PrefKeyShowToggle) == false) {
-                EditorPrefs.SetBool(PrefKeyShowToggle, false);
-            }
-
-            ShowQuickToggle(EditorPrefs.GetBool(PrefKeyShowToggle));
-        }
-
-        [MenuItem("Window/Hierarchy Quick Toggle")]
+		private static readonly Type HierarchyWindowType;
+		private static GUIStyle styleLock, styleLockUnselected, styleVisOn, styleVisOff;
+
+		#region Menu stuff
+	    [MenuItem("Window/Hierarchy Quick Toggle")]
         static void QuickToggleMenu()
         {
             bool toggle = EditorPrefs.GetBool(PrefKeyShowToggle);
             ShowQuickToggle(!toggle);
         }
-
-        private static void ShowQuickToggle(bool show)
+		#endregion
+
+	    static QuickToggle()
+	    {
+		    if (EditorPrefs.HasKey(PrefKeyShowToggle) == false) {
+			    EditorPrefs.SetBool(PrefKeyShowToggle, false);
+		    }
+
+		    Assembly editorAssembly = typeof(EditorWindow).Assembly;
+		    HierarchyWindowType = editorAssembly.GetType("UnityEditor.SceneHierarchyWindow");
+
+			ResetVars();
+		    ShowQuickToggle(EditorPrefs.GetBool(PrefKeyShowToggle));
+	    }
+
+	    private static void ShowQuickToggle(bool show)
         {
             EditorPrefs.SetBool(PrefKeyShowToggle, show);

             if (show)
             {
+				ResetVars();
+				EditorApplication.update += HandleEditorUpdate;
                 EditorApplication.hierarchyWindowItemOnGUI += DrawHierarchyItem;
             }
             else
-            {
+			{
+				EditorApplication.update -= HandleEditorUpdate;
                 EditorApplication.hierarchyWindowItemOnGUI -= DrawHierarchyItem;
             }
-
             EditorApplication.RepaintHierarchyWindow();
         }

-        private static void DrawHierarchyItem(int instanceId, Rect selectionRect)
+	    private struct ObjectState
+	    {
+		    public bool visible;
+		    public bool locked;
+
+		    public ObjectState(bool visible, bool locked)
+		    {
+			    this.visible = visible;
+			    this.locked = locked;
+		    }
+	    }
+
+	    private static ObjectState	propogateState;
+
+		// Because we can't hook into OnGUI of HierarchyWindow, doing a hack
+		// button that involves the editor update loop and the hierarchy item draw event
+		private static bool	isFrameFresh;
+	    private static bool	isMousePressed;
+
+	    private static void ResetVars()
+	    {
+		    isFrameFresh = false;
+		    isMousePressed = false;
+	    }
+
+	    private static void HandleEditorUpdate()
+	    {
+		    EditorWindow window = EditorWindow.mouseOverWindow;
+		    if (window == null)
+		    {
+				ResetVars();
+			    return;
+		    }
+
+		    if (window.GetType() == HierarchyWindowType)
+		    {
+			    if (window.wantsMouseMove == false)
+				    window.wantsMouseMove = true;
+
+			    isFrameFresh = true;
+		    }
+	    }
+
+	    private static void DrawHierarchyItem(int instanceId, Rect selectionRect)
         {
             BuildStyles();

@@ -63,24 +117,65 @@
                 xMin = selectionRect.xMax - selectionRect.height
             };

-            // Draw the visibility toggle
-            bool isActive = target.activeSelf;
-            if (isActive != GUI.Toggle(visRect, isActive, GUIContent.none, styleVisible))
-            {
-                SetVisible(target, !isActive);
-                EditorApplication.RepaintHierarchyWindow();
-            }
-
-            // Draw lock toggle
-            bool isLocked = (target.hideFlags & HideFlags.NotEditable) > 0;
-            // Decide which GUIStyle to use for the button
-            // If this item is currently selected, show the visible lock style, if not, invisible lock style
-            GUIStyle lockStyle = (Selection.activeInstanceID == instanceId) ? styleLock : styleLockUnselected;
-            if (isLocked != GUI.Toggle(lockRect, isLocked, GUIContent.none, lockStyle))
-            {
-                SetLockObject(target, !isLocked);
-                EditorApplication.RepaintHierarchyWindow();
-            }
+			// Get states
+			bool isActive = target.activeSelf;
+			bool isLocked = (target.hideFlags & HideFlags.NotEditable) > 0;
+
+			// Draw the visibility toggle
+		    GUIStyle visStyle = (isActive) ? styleVisOn : styleVisOff;
+			GUI.Label(visRect, GUIContent.none, visStyle);
+
+			// Draw lock toggle
+			GUIStyle lockStyle = (isLocked) ? styleLock : styleLockUnselected;
+			GUI.Label(lockRect, GUIContent.none, lockStyle);
+
+		    if (Event.current == null)
+			    return;
+
+			Event evt = Event.current;
+
+			bool toggleActive = visRect.Contains(evt.mousePosition);
+			bool toggleLock = lockRect.Contains(evt.mousePosition);
+			bool stateChanged = (toggleActive || toggleLock);
+
+			bool doMouse = false;
+			switch (evt.type)
+			{
+				case EventType.MouseDown:
+					// Checking is frame fresh so mouse state is only tested once per frame
+					// instead of every time a hierarchy item is drawn
+					bool isMouseDown = false;
+					if (isFrameFresh && stateChanged)
+					{
+						isMouseDown = !isMousePressed;
+						isMousePressed = true;
+						isFrameFresh = false;
+					}
+
+					if (stateChanged && isMouseDown)
+					{
+						doMouse = true;
+						if (toggleActive) isActive = !isActive;
+						if (toggleLock) isLocked = !isLocked;
+
+						propogateState = new ObjectState(isActive, isLocked);
+						evt.Use();
+					}
+					break;
+				case EventType.MouseDrag:
+					doMouse = isMousePressed;
+					break;
+				case EventType.MouseUp:
+					ResetVars();
+					break;
+			}
+
+			if (doMouse && stateChanged)
+			{
+				SetVisible(target, propogateState.visible);
+				SetLockObject(target, propogateState.locked);
+				EditorApplication.RepaintHierarchyWindow();
+			}
         }

         private static Object[] GatherObjects(GameObject root)
@@ -101,7 +196,11 @@

         private static void SetLockObject(GameObject target, bool isLocked)
         {
-            Object[] objects = GatherObjects(target);
+	        bool objectLockState = (target.hideFlags & HideFlags.NotEditable) > 0;
+            if (objectLockState == isLocked)
+		        return;
+
+	        Object[] objects = GatherObjects(target);
             string undoString = string.Format("{0} {1}", isLocked ? "Lock" : "Unlock", target.name);
             Undo.RecordObjects(objects, undoString);

@@ -143,6 +242,8 @@

         private static void SetVisible(GameObject target, bool isActive)
         {
+			if (target.activeSelf == isActive) return;
+
             string undoString = string.Format("{0} {1}",
                                         isActive ? "Show" : "Hide",
                                         target.name);
@@ -157,14 +258,14 @@
             // All of the styles have been built, don't do anything
             if (styleLock != null &&
                 styleLockUnselected != null &&
-                styleVisible != null)
+                styleVisOn != null &&
+				styleVisOff != null)
             {
                 return;
             }

             // First, get the textures for the GUIStyles
-            Texture2D icnLockOn = null,
-                    icnLockOnActive = null;
+            Texture2D icnLockOn = null, icnLockOnActive = null;
             bool normalPassed = false;
             bool activePassed = false;

@@ -221,7 +322,14 @@
                 focused = tempStyle.focused
             };

-            styleVisible = new GUIStyle(GUI.skin.FindStyle("VisibilityToggle"));
+	        tempStyle = GUI.skin.FindStyle("VisibilityToggle");
+			styleVisOff = new GUIStyle(tempStyle);
+
+            styleVisOn = new GUIStyle(tempStyle)
+            {
+				normal = new GUIStyleState() { background = tempStyle.onNormal.background }
+            };
+
         }
     }
 }


Spelling error

Spelling error

--- src/AutoMapper/IFormatterExpression.cs
+++ src/AutoMapper/IFormatterExpression.cs
@@ -97,7 +97,7 @@

         /// <summary>
-        /// Provide a newvalue for a part of a members name
+        /// Provide a new value for a part of a members name
         /// </summary>
         /// <param name="original">Original member value</param>
         /// <param name="newValue">New member value</param>


correctly attach the searchpanel to the logical tree.

--- src/AvaloniaEdit/Search/SearchPanel.cs
+++ src/AvaloniaEdit/Search/SearchPanel.cs
@@ -217,6 +217,8 @@
             panel.AttachInternal(textArea);
             panel._handler = new SearchInputHandler(textArea, panel);
             textArea.DefaultInputHandler.NestedInputHandlers.Add(panel._handler);
+            ((ISetLogicalParent)panel).SetParent(textArea);
+
             return panel;
         }


Fix comparison for nonASCII characters (BL-8505)

Jeffrey's eagle eyes spotted this one...

--- src/BloomExe/Publish/Epub/EpubMaker.cs
+++ src/BloomExe/Publish/Epub/EpubMaker.cs
@@ -2187,7 +2187,7 @@
 			var validChars = new char[] {'/', '_', '-', '.'};
 			foreach (char ch in revisedFileName)
 			{
-				if (Char.IsLetterOrDigit(ch) || validChars.Contains(ch) || ch > 128)
+				if (Char.IsLetterOrDigit(ch) || validChars.Contains(ch) || ch >= 128)
 				{
 					bldr.Append(ch);
 				}


Add failing test to check non-pooled lifetime

--- osu.Game.Tests/Visual/Gameplay/TestSceneDrawableScrollingRuleset.cs
+++ osu.Game.Tests/Visual/Gameplay/TestSceneDrawableScrollingRuleset.cs
@@ -46,10 +46,11 @@
         [SetUp]
         public void Setup() => Schedule(() => testClock.CurrentTime = 0);

-        [Test]
-        public void TestHitObjectPooling()
-        {
-            var beatmap = createBeatmap(_ => new TestPooledHitObject());
+        [TestCase("pooled")]
+        [TestCase("non-pooled")]
+        public void TestHitObjectLifetime(string pooled)
+        {
+            var beatmap = createBeatmap(_ => pooled == "pooled" ? new TestPooledHitObject() : new TestHitObject());
             beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = time_range });
             createTest(beatmap);

@@ -208,13 +209,13 @@

         /// <summary>
         /// Get a <see cref="DrawableTestHitObject" /> corresponding to the <paramref name="index"/>'th <see cref="TestHitObject"/>.
-        /// When a pooling is used and the hit object is not alive, `null` is returned.
+        /// When the hit object is not alive, `null` is returned.
         /// </summary>
         [CanBeNull]
         private DrawableTestHitObject getDrawableHitObject(int index)
         {
             var hitObject = drawableRuleset.Beatmap.HitObjects.ElementAt(index);
-            return (DrawableTestHitObject)drawableRuleset.Playfield.HitObjectContainer.Objects.FirstOrDefault(obj => obj.HitObject == hitObject);
+            return (DrawableTestHitObject)drawableRuleset.Playfield.HitObjectContainer.AliveObjects.FirstOrDefault(obj => obj.HitObject == hitObject);
         }

         private float yScale => drawableRuleset.Playfield.HitObjectContainer.DrawHeight;
@@ -426,6 +427,7 @@
                     }
                 });
             }
+            protected override void Update() => LifetimeEnd = HitObject.EndTime;
         }

         private class DrawableTestPooledHitObject : DrawableTestHitObject
@@ -436,8 +438,6 @@
                 InternalChildren[0].Colour = Color4.LightSkyBlue;
                 InternalChildren[1].Colour = Color4.Blue;
             }
-
-            protected override void Update() => LifetimeEnd = HitObject.EndTime;
         }

         private class DrawableTestParentHitObject : DrawableTestHitObject


Fix IdentifierName for values that match /_\d/

--- src/CSharpifier.Core/IdentifierName.cs
+++ src/CSharpifier.Core/IdentifierName.cs
@@ -19,14 +19,14 @@
         public IdentifierName(string rawIdentifierName)
         {
             _rawIdentifierName = rawIdentifierName;
-
+
             _words =
                 Regex.Split(
                     Regex.Replace(
                         rawIdentifierName.Replace(' ', '_'),
                         @"([A-Z])",
                         match => "_" + match.Value.ToLowerInvariant()),
-                    @"(?:_(?=[a-zA-Z]))|(?:^_$)")
+                    @"(?:_(?=[a-zA-Z0-9]))|(?:^_$)")
                 .Select(x => x.Trim().Trim('_'))
                 .Where(x => !string.IsNullOrEmpty(x) && x.Length > 0)
                 .ToList();


Fix comment typo

Fix comment typo

--- src/Cake.Common/IO/DirectoryCleaner.cs
+++ src/Cake.Common/IO/DirectoryCleaner.cs
@@ -25,7 +25,7 @@

             context.Log.Verbose("Deleting contents of {0}", path);

-            // Delete all files.
+            // Delete all directories.
             foreach (var directory in root.GetDirectories("*", SearchScope.Current))
             {
                 Clean(context, directory.Path.FullPath);


Http route .NET bugfix.

Http route .NET bugfix.

Proper segment parsing.

--- csharp/Server/Revenj.Http/RouteMatch.cs
+++ csharp/Server/Revenj.Http/RouteMatch.cs
@@ -32,15 +32,15 @@
 			var rs = result.RelativePathSegments;
 			int pos = RawUrl.IndexOf('?');
 			var maxLen = pos != -1 ? pos : RawUrl.Length;
-			var nextSeg = RawUrl.IndexOf('/', 1);
-			while (nextSeg != -1)
+			var nextSeg = RawUrl.IndexOf('/', 1) + 1;
+			while (nextSeg != 0)
 			{
 				var lastSeg = nextSeg;
-				nextSeg = RawUrl.IndexOf('/', nextSeg + 1);
-				if (nextSeg != -1 && nextSeg < maxLen)
-					rs.Add(RawUrl.Substring(lastSeg, nextSeg));
+				nextSeg = RawUrl.IndexOf('/', nextSeg) + 1;
+				if (nextSeg != 0)
+					rs.Add(RawUrl.Substring(lastSeg, nextSeg - lastSeg - 1));
 				else
-					rs.Add(RawUrl.Substring(lastSeg, maxLen));
+					rs.Add(RawUrl.Substring(lastSeg, maxLen - lastSeg));
 			}
 			var qp = result.QueryParameters;
 			if (QueryParams != null)


Update Min Mana

Update Min Mana

--- ClickVayne/ClickVayne/MenuManager.cs
+++ ClickVayne/ClickVayne/MenuManager.cs
@@ -21,7 +21,7 @@

         static MenuManager()
         {
-            Menu = MainMenu.AddMenu("Click Vayne", "Vayne");
+            Menu = MainMenu.AddMenu("Click Vayne", "Vayne 2.0");
             Menu.AddGroupLabel("Vayne");
             Menu.AddLabel("addon Update.");
             Menu.AddLabel("");