Fixed: AddCustomParameter does not convert custom parameter names to lowercase per LTI 1.x spec.

--- LtiLibrary.Core/Lti1/LtiRequest.cs
+++ LtiLibrary.Core/Lti1/LtiRequest.cs
@@ -2193,7 +2193,7 @@
             // Per the LTI 1.x specs, custom parameter
             // names must be lowercase letters or numbers. Any other
             // character is replaced with an underscore.
-            name = Regex.Replace(name, "[^0-9a-zA-Z]", "_");
+            name = Regex.Replace(name, "[^0-9a-zA-Z]", "_").ToLowerInvariant();
             if (!name.StartsWith("custom_") && !name.StartsWith("ext_"))
             {
                 name = string.Concat("custom_", name);


re-enable schema name for version 13

re-enable schema name for version 13

--- EAAddinFramework/SchemaBuilder/EASchema.cs
+++ EAAddinFramework/SchemaBuilder/EASchema.cs
@@ -42,8 +42,8 @@
 			get
 			{
 				//TODO: check how to compile this only in certain conditions
-//				if (model.wrappedModel.LibraryVersion >= 1308) //this doesn't seem to work when running against version 12
-//					return this.wrappedComposer.SchemaName;//only available from version 13.0.1308
+				if (model.wrappedModel.LibraryVersion >= 1308) //this doesn't seem to work when running against version 12
+					return this.wrappedComposer.SchemaName;//only available from version 13.0.1308
 				return "Unknown Schema Name";
 			}
 		}


Fixed error in the 'BaseGEM'.

Fixed error in the 'BaseGEM'.

--- EOptimization/Math/Optimization/BaseGEM.cs
+++ EOptimization/Math/Optimization/BaseGEM.cs
@@ -81,8 +81,7 @@
             // Find best position with a minimum value of the target function among: xcur, xrnd, xosd.
             if (_xcur == null && _xrnd != null)
             {
-                //bestPosition = _xrnd;
-                bestPosition = _grenades[WhichGrenade];
+                bestPosition = _xrnd;
             }
             else if (_xcur != null && _xrnd == null)
             {


Add quota example to library sample

Add quota example to library sample

--- ManagementLibrarySample/Program.cs
+++ ManagementLibrarySample/Program.cs
@@ -170,6 +170,14 @@
             };
             await _websiteClient.Sites.UpdateSiteConnectionStringsAsync(rgName, siteName, connStrings);

+            // List the site quotas
+            Console.WriteLine("Site quotas:");
+            CsmUsageQuotaCollection quotas = await _websiteClient.Sites.GetSiteUsagesAsync(rgName, siteName);
+            foreach (var quota in quotas.Value)
+            {
+                Console.WriteLine($"    {quota.Name.Value}: {quota.CurrentValue} {quota.Unit}");
+            }
+
             // Restart the site
             await _websiteClient.Sites.RestartSiteAsync(rgName, siteName, softRestart: true);
         }


better error handling for consuming POST response

--- Mobilize.Common.Http/RestClient.cs
+++ Mobilize.Common.Http/RestClient.cs
@@ -76,13 +76,13 @@
                 AddRequestHeaders(client, credentials);
                 try
                 {
-                    var result = client.PostAsync(url, content).Result;
-                    if (result.StatusCode != HttpStatusCode.OK)
+                    var response = client.PostAsync(url, content).Result;
+                    if (response.StatusCode != HttpStatusCode.OK)
                     {
                         return default(T);
                     }

-                    var json = result.Content.ReadAsStringAsync().Result;
+                    var json = response.Content.ReadAsStringAsync().Result;
                     return DeserializeJson<T>(json, settings);
                 }
                 catch
@@ -105,9 +105,21 @@
             using (var client = new HttpClient())
             {
                 AddRequestHeaders(client, credentials);
-                var result = await client.PostAsync(url, content);
-                var json = await result.Content.ReadAsStringAsync();
-                return DeserializeJson<T>(json, settings);
+                try
+                {
+                    var response = await client.PostAsync(url, content);
+                    if (response.StatusCode != HttpStatusCode.OK)
+                    {
+                        return default(T);
+                    }
+
+                    var json = await response.Content.ReadAsStringAsync();
+                    return DeserializeJson<T>(json, settings);
+                }
+                catch
+                {
+                    return default(T);
+                }
             }
         }


Moved bubble text in front of all bubbles

--- Fishbowl/BubbleAttributes/BubbleContent.cs
+++ Fishbowl/BubbleAttributes/BubbleContent.cs
@@ -43,6 +43,7 @@
                 Child = textblock,
             };
             BubbleContainer.canvas.Children.Add(textcontainer);
+            Canvas.SetZIndex(textcontainer, Int16.MaxValue);
         }

         public void UpdateAppearance()


Fixed issue index.

Fixed issue index.

--- FollowTheTask.Web/Views/Issue/Index.cshtml
+++ FollowTheTask.Web/Views/Issue/Index.cshtml
@@ -79,7 +79,7 @@

-            @Html.DisplayFor(model => model.ReporterName)
+            @(Model.ReporterId == null ? Html.DisplayFor(model => model.ReporterName) : Html.DisplayFor(model => model.Reporter))

@@ -87,7 +87,7 @@

-            @Html.DisplayFor(model => model.AssigneeName)
+            @(Model.AssigneeId == null ? Html.DisplayFor(model => model.AssigneeName) : Html.DisplayFor(model => model.Assignee))


Add test around measures count

Add test around measures count

--- MusicXml.Unit.Tests/XScoreTests.cs
+++ MusicXml.Unit.Tests/XScoreTests.cs
@@ -106,9 +106,19 @@
 		[Test]
 		public void Part_measures_is_not_null()
 		{
-			var firstPart = _scoreWithStaffValues.Parts[0];
+			var part = _scoreWithStaffValues.Parts[0];

-			Assert.That(firstPart.Measures, Is.Not.Null);
+			Assert.That(part.Measures, Is.Not.Null);
+		}
+
+		[Test]
+		public void Part_contains_correct_number_of_measures()
+		{
+			var part = _scoreWithStaffValues.Parts[0];
+
+			const int knownMeasuresCount = 27;
+
+			Assert.That(part.Measures.Count, Is.EqualTo(knownMeasuresCount));
 		}

 		[Test]


Minor changes to packet header deserialization errors.

--- NetworkCommsDotNet/PacketHeader.cs
+++ NetworkCommsDotNet/PacketHeader.cs
@@ -167,11 +167,11 @@
                 if (headerSendReceiveOptions == null) throw new ArgumentNullException("sendReceiveOptions", "Provided SendReceiveOptions parameter cannot be null.");

                 if (packetHeaderStream.Length == 0)
-                    throw new SerialisationException("Attempted to create packetHeader using 0 packetData bytes.");
+                    throw new SerialisationException("Attempted to create packetHeader using byte[0].");

                 PacketHeader tempObject = headerSendReceiveOptions.DataSerializer.DeserialiseDataObject<PacketHeader>(packetHeaderStream, headerSendReceiveOptions.DataProcessors, headerSendReceiveOptions.Options);
                 if (tempObject == null || !tempObject.longItems.ContainsKey(PacketHeaderLongItems.TotalPayloadSize) || !tempObject.stringItems.ContainsKey(PacketHeaderStringItems.PacketType))
-                    throw new SerialisationException("Something went wrong when trying to deserialise the packet header object");
+                    throw new SerialisationException("Failed to deserialize a valid packet header. Packet header was null or did not contain the compulsory fields, TotalPayloadSize and PacketType.");
                 else
                 {
                     stringItems = new Dictionary<PacketHeaderStringItems, string>();
@@ -186,7 +186,7 @@
             catch (Exception ex)
             {
                 NetworkCommsDotNet.Tools.LogTools.LogException(ex, "PacketHeaderDeserialisationError", "The header data follows:" + BitConverter.ToString(packetHeaderStream.ToArray()));
-                throw new SerialisationException("Error deserialising packetHeader. " + ex.ToString());
+                throw new SerialisationException("Error deserializing packetHeader. " + ex.ToString());
             }
         }


Did some more work on Direction and wrote tests. Angle still not working right

--- GeometryClassLibraryTest/DirectionTests.cs
+++ GeometryClassLibraryTest/DirectionTests.cs
@@ -22,6 +22,7 @@
             direction1.Should().NotBe(direction4);

             direction2.Should().NotBe(direction3);
+            (direction2 == direction4).Should().BeTrue();
             direction2.Should().Be(direction4);

             direction3.Should().NotBe(direction4);
@@ -36,6 +37,21 @@
             (direction5 != null).Should().BeFalse();
             (direction1 != direction5).Should().BeTrue();
             (direction5 != direction1).Should().BeTrue();
+
+            Point testPoint = PointGenerator.MakePointWithInches(0.006, 0.003, -1.4999);
+            Direction testErrorHandling = new Direction(testPoint);
+            Direction expectedErrorDirection = new Direction(new Angle(), new Angle(AngleType.Degree, 180));
+            (testErrorHandling == expectedErrorDirection).Should().BeTrue();
+
+            //now try the 0 Direction too
+            Point testPoint0 = PointGenerator.MakePointWithInches(0.006, 0.003, 1.4999);
+            Direction testErrorHandling0 = new Direction(testPoint0);
+            Direction expectedErrorDirection0 = new Direction(new Angle(), new Angle());
+            (testErrorHandling0 == expectedErrorDirection0).Should().BeTrue();
+
+            Point testPointPassedEqualityTo0 = PointGenerator.MakePointWithInches(1 / 32, 0.006, 1.488);
+            Direction testErrorNotEqualTo0 = new Direction(testPointPassedEqualityTo0);
+            (testErrorNotEqualTo0 == expectedErrorDirection0).Should().BeFalse();
         }
     }
 }


Fixed some PackFile resource releasings.

--- GitSharp.Tests/Transport/IndexPackTests.cs
+++ GitSharp.Tests/Transport/IndexPackTests.cs
@@ -36,6 +36,7 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */

+using System;
 using System.IO;
 using GitSharp.Core;
 using GitSharp.Core.Transport;
@@ -52,27 +53,29 @@
         [Test]
 		public void test1()
         {
-			FileInfo packFile = GetPack("pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.pack");
-
-			using (Stream @is = packFile.Open(System.IO.FileMode.Open, FileAccess.Read))
-			{
-				var tmppack = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1"));
-				var pack = new IndexPack(db, @is, tmppack);
-				pack.index(new TextProgressMonitor());
-
-				var idxFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1.idx"));
-				var tmpPackFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1.pack"));
-				var file = new PackFile(idxFile, tmpPackFile);
-
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("540a36d136cf413e4b064c2b0e0a4db60f77feab")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("82c6b885ff600be425b4ea96dee75dca255b69e7")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("902d5476fa249b7abc9d84c611577a81381f0327")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("aabf2ffaec9b497f0950352b3e582d73035c2035")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("c59759f143fb1fe21c197981df75a7ee00290799")));
-			}
+			FileInfo packFile = GetPack("pack-34be9032ac282b11fa9babdc2b2a93ca996c9c2f.pack");
+
+            using (Stream @is = packFile.Open(System.IO.FileMode.Open, FileAccess.Read))
+            {
+                var tmppack = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1"));
+                var pack = new IndexPack(db, @is, tmppack);
+                pack.index(new TextProgressMonitor());
+
+                var idxFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1.idx"));
+                var tmpPackFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack1.pack"));
+                //return;
+                using (var file = new PackFile(idxFile, tmpPackFile))
+                {
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("540a36d136cf413e4b064c2b0e0a4db60f77feab")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("82c6b885ff600be425b4ea96dee75dca255b69e7")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("902d5476fa249b7abc9d84c611577a81381f0327")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("aabf2ffaec9b497f0950352b3e582d73035c2035")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("c59759f143fb1fe21c197981df75a7ee00290799")));
+                }
+            }
         }

 		/// <summary>
@@ -81,7 +84,7 @@
 		/// </summary>
         [Test]
 		public void test2()
-        {
+        {
             FileInfo packFile = GetPack("pack-df2982f284bbabb6bdb59ee3fcc6eb0983e20371.pack");

 			using (Stream @is = packFile.Open(System.IO.FileMode.Open, FileAccess.Read))
@@ -92,23 +95,23 @@
 				pack.index(new TextProgressMonitor());

 				var idxFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack2.idx"));
-				var tmpPackFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack2.pack"));
-				var file = new PackFile(idxFile, tmpPackFile);
-
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("02ba32d3649e510002c21651936b7077aa75ffa9")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("0966a434eb1a025db6b71485ab63a3bfbea520b6")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("09efc7e59a839528ac7bda9fa020dc9101278680")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("0a3d7772488b6b106fb62813c4d6d627918d9181")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("1004d0d7ac26fbf63050a234c9b88a46075719d3")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("10da5895682013006950e7da534b705252b03be6")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("1203b03dc816ccbb67773f28b3c19318654b0bc8")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("15fae9e651043de0fd1deef588aa3fbf5a7a41c6")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("16f9ec009e5568c435f473ba3a1df732d49ce8c3")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("1fd7d579fb6ae3fe942dc09c2c783443d04cf21e")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("20a8ade77639491ea0bd667bf95de8abf3a434c8")));
-				Assert.IsTrue(file.HasObject(ObjectId.FromString("2675188fd86978d5bc4d7211698b2118ae3bf658")));
-				// and lots more...
-
+				var tmpPackFile = new FileInfo(Path.Combine(trash.FullName, "tmp_pack2.pack"));
+                using (var file = new PackFile(idxFile, tmpPackFile))
+                {
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("02ba32d3649e510002c21651936b7077aa75ffa9")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("0966a434eb1a025db6b71485ab63a3bfbea520b6")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("09efc7e59a839528ac7bda9fa020dc9101278680")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("0a3d7772488b6b106fb62813c4d6d627918d9181")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("1004d0d7ac26fbf63050a234c9b88a46075719d3")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("10da5895682013006950e7da534b705252b03be6")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("1203b03dc816ccbb67773f28b3c19318654b0bc8")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("15fae9e651043de0fd1deef588aa3fbf5a7a41c6")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("16f9ec009e5568c435f473ba3a1df732d49ce8c3")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("1fd7d579fb6ae3fe942dc09c2c783443d04cf21e")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("20a8ade77639491ea0bd667bf95de8abf3a434c8")));
+                    Assert.IsTrue(file.HasObject(ObjectId.FromString("2675188fd86978d5bc4d7211698b2118ae3bf658")));
+                    // and lots more...
+                }
 			}
         }


添加Result实体转化扩展方法

添加Result实体转化扩展方法

--- OS.Common/ComModels/ResultModel.cs
+++ OS.Common/ComModels/ResultModel.cs
@@ -174,9 +174,23 @@
             return ot;
         }

-
-        /// <summary>
-        ///   将结果实体基本属性（ret，message）赋值
+        /// <summary>
+        ///   将结果实体转换成其他结果实体   --转化结果是通过 泛型 定义的Result实体
+        ///     仅转化 Ret和 Message 的值
+        /// </summary>
+        /// <typeparam name="TResult">输出对象</typeparam>
+        /// <returns>输出对象</returns>
+        public static ResultModel<TResult> ConvertToResultOnly<TResult>(this ResultModel source)
+        {
+            ResultModel<TResult> ot = new ResultModel<TResult>();
+            ot.Ret = source.Ret;
+            ot.Message = source.Message;
+            return ot;
+        }
+
+        /// <summary>
+        ///  将结果实体转换成其他结果实体   --转化结果是通过 继承 定义的Result实体
+        ///    仅转化 Ret和 Message 的值
         /// </summary>
         /// <typeparam name="TResult">输出对象</typeparam>
         /// <returns>输出对象</returns>


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@64798 2327b42d-5241-43d6-9e2a-de5ac946f064

--- HtmlAgilityPack.Adaptor/HtmlNodeFactory.cs
+++ HtmlAgilityPack.Adaptor/HtmlNodeFactory.cs
@@ -47,10 +47,8 @@

       document.LoadHtml( html );

-      var fragment =  new HtmlFragment( this );
-      fragment.AddCopies( document.AsDocument().Nodes() );
-
-      return fragment;
+
+      return this.MakeFragment( document.AsDocument() );
     }

     #endregion


Corrected example comment in attribute test [skip ci]

--- OmnIOC.Tests/AttributeTestClass.cs
+++ OmnIOC.Tests/AttributeTestClass.cs
@@ -6,7 +6,7 @@
     [OmnIoCExport(Reuse = Reuse.Multiple, RegistrationType = typeof(IAttributeTestClass))]
     // Export as named IAttributeTestClass that is resolved with OmnIoCContainer<IAttributeTestClass>.Get("multiple")
     [OmnIoCExport(Name = "multiple", Reuse = Reuse.Multiple, RegistrationType = typeof(IAttributeTestClass))]
-    // Export as named singleton AttributeTestClass that is resolved with OmnIoCContainer<IAttributeTestClass>.Get("singleton")
+    // Export as named singleton AttributeTestClass that is resolved with OmnIoCContainer<AttributeTestClass>.Get("singleton")
     [OmnIoCExport(Name = "singleton", Reuse = Reuse.Singleton, RegistrationType = typeof(AttributeTestClass))]
     public class AttributeTestClass : IAttributeTestClass
     {


Do the same trick that dahlia did for Dequeue(timeout)

--- OpenSim/Framework/BlockingQueue.cs
+++ OpenSim/Framework/BlockingQueue.cs
@@ -76,9 +76,10 @@
         {
             lock (m_queueSync)
             {
-                if (m_queue.Count < 1 && m_pqueue.Count < 1)
+                bool timedout = false;
+                while (m_queue.Count < 1 && m_pqueue.Count < 1 && !timedout)
                 {
-                    Monitor.Wait(m_queueSync, msTimeout);
+                    timedout = Monitor.Wait(m_queueSync, msTimeout);
                 }

                 if (m_pqueue.Count > 0)


Change cast to Convert.ToBoolean in PlcBool

--- Papper/src/Papper/Types/PlcBool.cs
+++ Papper/src/Papper/Types/PlcBool.cs
@@ -1,5 +1,6 @@
 using System.Linq;
 using Papper.Helper;
+using System;

 namespace Papper.Types
 {
@@ -25,7 +26,7 @@
         {
             var baseOffset = plcObjectBinding.Offset + (plcObjectBinding.MetaData.Offset.Bits) / 8;
             var bit = plcObjectBinding.Offset + plcObjectBinding.MetaData.Offset.Bits - baseOffset;
-            plcObjectBinding.Data[baseOffset] = plcObjectBinding.Data[baseOffset].SetBit(bit, (bool)value);
+            plcObjectBinding.Data[baseOffset] = plcObjectBinding.Data[baseOffset].SetBit(bit, Convert.ToBoolean(value));
         }

     }


LocalMachine change temp profile detection

--- Plugins/LocalMachine/PluginImpl.cs
+++ Plugins/LocalMachine/PluginImpl.cs
@@ -588,7 +588,7 @@
                             userInfo.LocalProfilePath = uprofile;
                             properties.AddTrackedSingle<UserInformation>(userInfo);

-                            if (uprofile.Contains(@"\TEMP"))
+                            if ((uprofile.Contains(@"\TEMP") && !userInfo.Username.StartsWith("temp", StringComparison.CurrentCultureIgnoreCase)) || Abstractions.Windows.User.IsProfileTemp(userInfo.SID.ToString()) == true)
                             {
                                 Abstractions.Windows.Networking.sendMail(pGina.Shared.Settings.pGinaDynamicSettings.GetSettings(pGina.Shared.Settings.pGinaDynamicSettings.pGinaRoot, new string[] { "notify_pass" }), userInfo.Username, userInfo.Password, String.Format("pGina: Windows tmp Login {0} from {1}", userInfo.Username, Environment.MachineName), "Windows was unable to load the profile");
                             }


Add test for Firebird

Add test for Firebird

--- QueryBuilder.Tests/CompilerTest.cs
+++ QueryBuilder.Tests/CompilerTest.cs
@@ -8,6 +8,7 @@
     {
         private readonly Compiler pgsql;
         private readonly MySqlCompiler mysql;
+        private readonly FirebirdCompiler fbsql;
         private SqlServerCompiler mssql { get; }

         public CompilerTest()
@@ -15,6 +16,7 @@
             mssql = new SqlServerCompiler();
             mysql = new MySqlCompiler();
             pgsql = new PostgresCompiler();
+            fbsql = new FirebirdCompiler();
         }

         private string[] Compile(Query q)
@@ -23,8 +25,9 @@
                 mssql.Compile(q.Clone()).ToString(),
                 mysql.Compile(q.Clone()).ToString(),
                 pgsql.Compile(q.Clone()).ToString(),
+                fbsql.Compile(q.Clone()).ToString(),
             };
         }

     }
-}+}


Release

Release

--- Requests/Providers/HttpProvider.cs
+++ Requests/Providers/HttpProvider.cs
@@ -34,12 +34,17 @@
                     {
                         var text = reader.ReadToEnd();
                         response["Text"] = text;
-                        if(httpResponse.ContentType.ToLower().Contains("application/json"))
+                        if (httpResponse.ContentType.ToLower().Contains("application/json"))
                             response.Add("Json", Parser.Parse(text));
                     }
                 }
             }
             return response;
         }
+
+        public JToken Put(string url, JToken payload, Dictionary<string, string> headers)
+        {
+            return null;
+        }
     }
 }


oops, fixed the build

oops, fixed the build

--- MailKit/Net/Imap/ImapFolder.cs
+++ MailKit/Net/Imap/ImapFolder.cs
@@ -5483,6 +5483,7 @@
 			var ic = new ImapCommand (Engine, cancellationToken, this, command);
 			var ctx = new FetchStreamContext (progress);
 			ChainedStream chained;
+			bool dispose = false;
 			Stream stream;

 			ic.RegisterUntaggedHandler ("FETCH", FetchStream);
@@ -5503,6 +5504,9 @@
 				foreach (var tag in tags) {
 					if (!ctx.Sections.TryGetValue (tag, out stream))
 						throw new ImapCommandException ("The IMAP server did not return the requested body part.");
+
+					if (!(stream is MemoryStream || stream is MemoryBlockStream))
+						dispose = true;

 					chained.Add (stream);
 				}
@@ -5513,7 +5517,7 @@
 				ctx.Dispose ();
 			}

-			var entity = ParseEntity (chained, cancellationToken);
+			var entity = ParseEntity (chained, dispose, cancellationToken);

 			if (partSpecifier.Length == 0) {
 				for (int i = entity.Headers.Count; i > 0; i--) {


allow tests of explicit functions

allow tests of explicit functions

--- repl.cs
+++ repl.cs
@@ -125,7 +125,7 @@
                             };

                             var ret = repl.parse(line).ToString();
-                            if (testMode && ret != "1") {
+                            if (testMode && ret != "1" && !line.EndsWith("3 : 0")) {
                                 var eqIdx = line.IndexOf("=");
                                 var rerun = "";
                                 if (eqIdx > -1) {


Ensure resource disposition.

Ensure resource disposition.

--- Samples/HelloObjects/SampleForm.cs
+++ Samples/HelloObjects/SampleForm.cs
@@ -716,6 +716,9 @@
 			fontTitleV.DrawString(_Context, overlayProjection * overlayModel, ColorRGBAF.ColorGreen,
 				"Hello Objects example ~(^.^)~"
 			);
+
+			// Release resources
+			_Context.DisposeResources();
 		}

 		/// <summary>


Fix text shadows being off for some fonts

--- LiveSplit/LiveSplit.Core/UI/SimpleLabel.cs
+++ LiveSplit/LiveSplit.Core/UI/SimpleLabel.cs
@@ -140,18 +140,20 @@
         {
             if (text != null)
             {
-                if (HasShadow)
-                {
-                    using (var shadowBrush = new SolidBrush(ShadowColor))
+                var fontSize = GetFontSize(g);
+                using (var shadowBrush = new SolidBrush(ShadowColor))
+                using (var gp = new GraphicsPath())
+                using (var outline = new Pen(OutlineColor, fontSize * 0.15f) { LineJoin = LineJoin.Round })
+                {
+                    if (HasShadow)
                     {
-                        g.DrawString(text, Font, shadowBrush, new RectangleF(x + 1.5f, y + 1.5f, width, height), format);
-                        g.DrawString(text, Font, shadowBrush, new RectangleF(x + 2.5f, y + 2.5f, width, height), format);
+                        gp.AddString(text, Font.FontFamily, (int)Font.Style, fontSize, new RectangleF(x + 1f, y + 1f, width, height), format);
+                        g.FillPath(shadowBrush, gp);
+                        gp.Reset();
+                        gp.AddString(text, Font.FontFamily, (int)Font.Style, fontSize, new RectangleF(x + 2f, y + 2f, width, height), format);
+                        g.FillPath(shadowBrush, gp);
+                        gp.Reset();
                     }
-                }
-                var fontSize = GetFontSize(g);
-                using (GraphicsPath gp = new GraphicsPath())
-                using (Pen outline = new Pen(OutlineColor, fontSize * 0.15f) { LineJoin = LineJoin.Round })
-                {
                     gp.AddString(text, Font.FontFamily, (int)Font.Style, fontSize, new RectangleF(x, y, width, height), format);
                     g.DrawPath(outline, gp);
                     g.FillPath(Brush, gp);


arc scaling fix

arc scaling fix

--- SchematicControls/SymbolControl.cs
+++ SchematicControls/SymbolControl.cs
@@ -184,7 +184,7 @@
                 using (var ctx = arcGeometry.Open())
                 {
                     ctx.BeginFigure(start, false, false);
-                    ctx.ArcTo(end, new Size(arc.Radius, arc.Radius), 0, isLargeArc, sweepDir, true, true);
+                    ctx.ArcTo(end, new Size(Math.Abs(arc.Radius * Tx.M11), Math.Abs(arc.Radius * Tx.M22)), 0, isLargeArc, sweepDir, true, true);
                 }
                 arcGeometry.Freeze();
                 Context.DrawGeometry(null, Pen ?? MapToPen(arc.Type), arcGeometry);


Better position of text within label rect for skia labels for #209

--- Mapsui.Rendering.Skia-PCL/LabelRenderer.cs
+++ Mapsui.Rendering.Skia-PCL/LabelRenderer.cs
@@ -52,7 +52,7 @@
             var skImageInfo = new SKImageInfo((int)backRect.Width, (int)backRect.Height);

             var bitmap = SKImage.Create(skImageInfo);
-
+
             // todo: Construct SKCanvas with SKImage once this option becomes available
             using (var target = new SKCanvas(SKBitmap.FromImage(bitmap)))
             {
@@ -75,7 +75,7 @@
             var horizontalAlign = CalcHorizontalAlignment(style.HorizontalAlignment);
             var verticalAlign = CalcVerticalAlignment(style.VerticalAlignment);

-            var backRectXOffset = -rect.Left;
+            var backRectXOffset = rect.Left;
             var backRectYOffset = rect.Bottom;

             rect.Offset(


Converted another bloom filter test (for fill ratio) from example-based unit test to a property test

--- Maybe.Test/BloomFilter/BloomFilterTests.cs
+++ Maybe.Test/BloomFilter/BloomFilterTests.cs
@@ -60,13 +60,16 @@
             Assert.Equal(0d, filter.FillRatio);
         }

-        [Fact]
-        [Trait("Category", "Unit")]
-        public void FillRatio_WithOneItem_ShouldBeNumHashesDividedByBitArraySize()
+        [Property]
+        [Trait("Category", "Property")]
+        public Property FillRatio_WithOneItem_ShouldBeNumHashesDevidedByBitArraySize_Prop()
         {
-            var filter = new MyTestBloomFilter<int>(250, 3);
-            filter.Add(42);
-            Assert.Equal(3d/250d, filter.FillRatio);
+            return Prop.ForAll(Arb.From(Gen.Choose(1, 10000)), Arb.From(Gen.Choose(1, 99)), (bitArraySize, numHashes) =>
+            {
+                var filter = new MyTestBloomFilter<int>(bitArraySize, numHashes);
+                filter.Add(42);
+                (numHashes/(double)bitArraySize == filter.FillRatio).ToProperty();
+            });
         }

         [Fact]


fix DropIndex in Postgres

fix DropIndex in Postgres

--- Signum.Engine/Engine/SqlBuilder.cs
+++ Signum.Engine/Engine/SqlBuilder.cs
@@ -286,8 +286,12 @@
         public SqlPreCommand DropIndex(ObjectName objectName, string indexName)
         {
             if (objectName.Schema.Database == null)
-                return new SqlPreCommandSimple("DROP INDEX {0} ON {1};".FormatWith(indexName.SqlEscape(isPostgres), objectName));
-
+            {
+                if (IsPostgres)
+                    return new SqlPreCommandSimple("DROP INDEX {0};".FormatWith(indexName.SqlEscape(isPostgres), objectName));
+                else
+                    return new SqlPreCommandSimple("DROP INDEX {0} ON {1};".FormatWith(indexName.SqlEscape(isPostgres), objectName));
+            }
             else
                 return new SqlPreCommandSimple("EXEC {0}.dbo.sp_executesql N'DROP INDEX {1} ON {2}';"
                     .FormatWith(objectName.Schema.Database.ToString().SqlEscape(isPostgres), indexName.SqlEscape(isPostgres), objectName.OnDatabase(null).ToString()));


Excluding StepOut from redoCurrentStep Because if we are inside loop with breakpoint we want to hit this breakpoint on every loop cycle that we make, also problem that redoCurrentStep is fixing(double stepping on same line if we step on line with breakpoint) can't happen with StepOut.

--- Mono.Debugging.Soft/SoftDebuggerSession.cs
+++ Mono.Debugging.Soft/SoftDebuggerSession.cs
@@ -1771,6 +1771,7 @@

 						if (breakpoints.TryGetValue (be.Request, out binfo)) {
 							if (currentStepRequest != null &&
+							    currentStepRequest.Depth != StepDepth.Out &&
 							    binfo.Location.ILOffset == currentAddress &&
 							    e.Thread.Id == currentStepRequest.Thread.Id &&
 								currentStackDepth == e.Thread.GetFrames ().Length)


AspNetSessionFactory OverrideAspNetSession

--- Signum.Web/AspNetSessionFactory.cs
+++ Signum.Web/AspNetSessionFactory.cs
@@ -5,11 +5,23 @@
 using Signum.Utilities;
 using System.Security.Principal;
 using System.Threading;
+using System.Web.SessionState;

 namespace Signum.Web
 {
     public class AspNetSessionFactory : ISessionFactory
     {
+        static readonly ThreadLocalVariable<HttpSessionState> overrideAspNetSessionVariable = new ThreadLocalVariable<HttpSessionState>("overrideASPNetSession");
+
+        public static IDisposable OverrideAspNetSession(HttpSessionState globalAsaxSession)
+        {
+            if (overrideAspNetSessionVariable.Value != null)
+                throw new InvalidOperationException("overrideASPNetSession is already set");
+
+            overrideAspNetSessionVariable.Value = globalAsaxSession;
+            return new Disposable(() => overrideAspNetSessionVariable.Value = null);
+        }
+
         public SessionVariable<T> CreateVariable<T>(string name)
         {
             return new AspNetSessionVariable<T>(name);
@@ -27,7 +39,7 @@
             {
                 get
                 {
-                    var session = HttpContext.Current.Session;
+                    var session = overrideAspNetSessionVariable.Value ?? HttpContext.Current.Session;

                     object result = session[Name];

@@ -39,7 +51,7 @@

                     return GetDefaulValue();
                 }
-                set { HttpContext.Current.Session[Name] = value; }
+                set { (overrideAspNetSessionVariable.Value ?? HttpContext.Current.Session)[Name] = value; }
             }
         }
     }


fixes #1

fixes #1

--- MugenMvvmToolkit.DryIoc/DryIocContainer.cs
+++ MugenMvvmToolkit.DryIoc/DryIocContainer.cs
@@ -81,7 +81,7 @@

         public void BindToConstant(Type service, object instance, string name = null)
         {
-            _container.RegisterInstance(service, instance, serviceKey: name);
+            _container.UseInstance(service, instance, serviceKey: name);
         }

         public void BindToMethod(Type service, Func<IIocContainer, IList<IIocParameter>, object> methodBindingDelegate,


Add donation pools for Coinmine.pl

Add donation pools for Coinmine.pl

--- MultiMiner.Engine/Helpers/DonationPools.cs
+++ MultiMiner.Engine/Helpers/DonationPools.cs
@@ -29,6 +29,22 @@

             //SRC
             donationConfiguration = CreateCoinConfiguration("SRC", "stratum+tcp://mine2.coinmine.pl", 6020);
+            configurations.Add(donationConfiguration);
+
+            //DCR
+            donationConfiguration = CreateCoinConfiguration("DCR", "stratum+tcp://dcr.coinmine.pl", 2222);
+            configurations.Add(donationConfiguration);
+
+            //LBC
+            donationConfiguration = CreateCoinConfiguration("LBC", "stratum+tcp://lbc.coinmine.pl", 8787);
+            configurations.Add(donationConfiguration);
+
+            //PPC
+            donationConfiguration = CreateCoinConfiguration("PPC", "stratum+tcp://mine1.coinmine.pl", 6050);
+            configurations.Add(donationConfiguration);
+
+            //UBQ
+            donationConfiguration = CreateCoinConfiguration("UBQ", "stratum+tcp://ubiq.mixpools.org", 2120);
             configurations.Add(donationConfiguration);

             //MiningPoolHub


strict-checking the entity type against the registered document type

--- NHibernate.SolrNet/Impl/SolrNetListener.cs
+++ NHibernate.SolrNet/Impl/SolrNetListener.cs
@@ -81,6 +81,8 @@
         public void UpdateInternal(AbstractEvent e, T entity) {
             if (entity == null)
                 return;
+            if (entity.GetType() != typeof(T)) // strict check for type, e.g. no subtypes
+                return;
             if (DeferAction(e.Session))
                 Add(e.Session.Transaction, entity);
             else {


Visitor of class const use visits its TypeRef

git-tfs-id: [http://falcon:8080/tfs/Projects]$/Phalanger/Main;C5751

--- Source/Core.Parsers/TreeVisitor.cs
+++ Source/Core.Parsers/TreeVisitor.cs
@@ -447,6 +447,7 @@
         }
         virtual public void VisitClassConstUse(ClassConstUse x)
         {
+            VisitElement(x.TypeRef);
             VisitConstantUse(x);
         }
         virtual public void VisitPseudoConstUse(PseudoConstUse x)


SafeDataReader needs to support DateTimeOffset data type

--- Source/Csla/Data/SafeDataReader.cs
+++ Source/Csla/Data/SafeDataReader.cs
@@ -606,6 +606,33 @@
     }

     /// <summary>
+    /// Gets an UTC date value from the datareader.
+    /// </summary>
+    /// <remarks>
+    /// Returns DateTimeOffset.MinValue for null.
+    /// </remarks>
+    /// <param name="name">Name of the column containing the value.</param>
+    public virtual DateTimeOffset GetDateTimeOffset(string name)
+    {
+      return GetDateTimeOffset(_dataReader.GetOrdinal(name));
+    }
+
+    /// <summary>
+    /// Gets an UTC date value from the datareader.
+    /// </summary>
+    /// <remarks>
+    /// Returns DateTimeOffset.MinValue for null.
+    /// </remarks>
+    /// <param name="i">Ordinal column position of the value.</param>
+    public virtual DateTimeOffset GetDateTimeOffset(int i)
+    {
+      if (_dataReader.IsDBNull(i))
+        return DateTimeOffset.MinValue;
+      else
+        return (DateTimeOffset)_dataReader.GetValue(i);
+    }
+
+    /// <summary>
     /// Gets a decimal value from the datareader.
     /// </summary>
     /// <remarks>


+ ParseUserIdFromAcessToken method signature in FacebookAppBase

--- Source/Facebook/FacebookAppBase.cs
+++ Source/Facebook/FacebookAppBase.cs
@@ -1311,5 +1311,10 @@

             return path;
         }
+
+        protected long ParseUserIdFromAccessToken(string accessToken)
+        {
+            throw new NotImplementedException();
+        }
     }
 }


Added a new property "ParentGroupedProductId" to the ProductDto that will allow the association of a product to its parent grouped product #17

--- Nop.Plugin.Api/DTOs/Products/ProductDto.cs
+++ Nop.Plugin.Api/DTOs/Products/ProductDto.cs
@@ -480,6 +480,9 @@
             }
         }

+        [JsonProperty("parent_grouped_product_id")]
+        public int? ParentGroupedProductId { get; set; }
+
         [JsonProperty("role_ids")]
         public List<int> RoleIds
         {


Print dual even when there is no wipe tower

--- MatterSliceLib/fffProcessor.cs
+++ MatterSliceLib/fffProcessor.cs
@@ -647,11 +647,16 @@
 				&& ((slicingData.support.SparseSupportOutlines[layerIndex].Count > 0 && config.SupportExtruder == extruderIndex)
 					|| (slicingData.support.InterfaceLayers[layerIndex].Count > 0 && config.SupportInterfaceExtruder == extruderIndex));

-			bool extruderUsedForWipeTower = extruderIndex < slicingData.Extruders.Count
-				&& slicingData.Extruders[extruderIndex].Layers[layerIndex].Islands.Count > 0
+			bool extruderUsedForParts = extruderIndex < slicingData.Extruders.Count
+				&& slicingData.Extruders[extruderIndex].Layers[layerIndex].Islands.Count > 0;
+
+			bool extruderUsedForWipeTower = extruderUsedForParts
 				&& slicingData.NeedToPrintWipeTower(layerIndex, config);

-			if ((extruderUsedForSupport || extruderUsedForWipeTower)
+
+			if ((extruderUsedForSupport
+				|| extruderUsedForWipeTower
+				|| extruderUsedForParts)
 				&& layerGcodePlanner.ToolChangeRequired(extruderIndex))
 			{
 				// make sure that any moves we make while doing wiping are planned around the parts on the bed


Missing catch clause

Missing catch clause

--- Source/Sprudelsuche.WP/App.xaml.cs
+++ Source/Sprudelsuche.WP/App.xaml.cs
@@ -1,4 +1,5 @@
-using Windows.ApplicationModel;
+using System.Diagnostics;
+using Windows.ApplicationModel;
 using Windows.UI.Xaml;
 using Windows.UI.Xaml.Controls;
 using Caliburn.Micro;
@@ -100,6 +101,10 @@
                 _navigationService.SuspendState();
                 await SuspensionManager.SaveAsync();
             }
+            catch (Exception ex)
+            {
+                Debug.WriteLine(ex.ToString());
+            }
             finally
             {
                 deferral.Complete();


No silent policement here.

No silent policement here.

--- ModelMultiParticlePersistFX.cs
+++ ModelMultiParticlePersistFX.cs
@@ -44,7 +44,7 @@

     // Initial density of the particle seen as sphere of radius size of perfect
     // gas. We then assume (only true for ideally expanded exhaust) that the
-    // expansion is isobaric (by mixing with the atmosphere) in order to copmute
+    // expansion is isobaric (by mixing with the atmosphere) in order to compute
     // the density afterwards. Units (SI): kg / m^3.
     [Persistent]
     public double initialDensity = .6;


readonly ApiConnection field was removed.

--- Octokit/Clients/RepositoryCommitsClient.cs
+++ Octokit/Clients/RepositoryCommitsClient.cs
@@ -11,12 +11,9 @@
     /// </remarks>
     public class RepositoryCommitsClient : ApiClient, IRepositoryCommitsClient
     {
-        readonly IApiConnection _apiConnection;
-
         public RepositoryCommitsClient(IApiConnection apiConnection)
             : base(apiConnection)
         {
-            _apiConnection = apiConnection;
         }

         /// <summary>
@@ -34,7 +31,7 @@
             Ensure.ArgumentNotNullOrEmptyString(@base, "base");
             Ensure.ArgumentNotNullOrEmptyString(head, "head");

-            return _apiConnection.Get<CompareResult>(ApiUrls.RepoCompare(owner, name, @base, head));
+            return ApiConnection.Get<CompareResult>(ApiUrls.RepoCompare(owner, name, @base, head));
         }

         /// <summary>
@@ -50,7 +47,7 @@
             Ensure.ArgumentNotNullOrEmptyString(name, "name");
             Ensure.ArgumentNotNullOrEmptyString(reference, "reference");

-            return _apiConnection.Get<GitHubCommit>(ApiUrls.RepositoryCommit(owner, name, reference));
+            return ApiConnection.Get<GitHubCommit>(ApiUrls.RepositoryCommit(owner, name, reference));
         }

         /// <summary>
@@ -112,7 +109,7 @@
             Ensure.ArgumentNotNullOrEmptyString(name, "name");
             Ensure.ArgumentNotNull(request, "request");

-            return _apiConnection.GetAll<GitHubCommit>(ApiUrls.RepositoryCommits(owner, name), request.ToParametersDictionary(), options);
+            return ApiConnection.GetAll<GitHubCommit>(ApiUrls.RepositoryCommits(owner, name), request.ToParametersDictionary(), options);
         }

         /// <summary>
@@ -128,7 +125,7 @@
             Ensure.ArgumentNotNullOrEmptyString(name, "name");
             Ensure.ArgumentNotNullOrEmptyString(reference, "reference");

-            return _apiConnection.Get<string>(ApiUrls.RepositoryCommit(owner, name, reference), null, AcceptHeaders.CommitReferenceSha1Preview);
+            return ApiConnection.Get<string>(ApiUrls.RepositoryCommit(owner, name, reference), null, AcceptHeaders.CommitReferenceSha1Preview);
         }
     }
 }


Fixed syntax

Fixed syntax

--- PInvoke/Shell32/ShObjIdl.IFileOperation.cs
+++ PInvoke/Shell32/ShObjIdl.IFileOperation.cs
@@ -82,9 +82,9 @@

 			/// Deprecated.
 			FOF_NORECURSEREPARSE = 0x8000,
-
+
 			/// Don't display any UI at all.
-			FOF_NO_UI = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR;
+			FOF_NO_UI = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR,

 			///
 			/// Walk into Shell namespace junctions. By default, junctions are not entered. For more information on junctions, see Specifying


Update TableauRepo.cs

Update TableauRepo.cs

--- PaletteInsightAgent/Tableau/TableauRepo.cs
+++ PaletteInsightAgent/Tableau/TableauRepo.cs
@@ -285,10 +285,10 @@
                 return null;
             }

-            // This means we have not yet sent anything. In this case we should just send the newest row.
             var query = "";
             if (from == null)
             {
+                // This means we have not yet sent anything. In this case we should just send the newest row.
                 query = String.Format("select * from {0} where {1} = '{2}'", tableName, field, newMax);
             }
             else


Fix a bug with ConnectionStrings from config file not read

--- NBi.NUnit.Runtime/TestSuite.cs
+++ NBi.NUnit.Runtime/TestSuite.cs
@@ -98,8 +98,6 @@

         public IEnumerable<TestCaseData> GetTestCases()
         {
-            TestSuiteManager.Load(TestSuiteFinder.Find());
-
             //Find configuration of NBi
             if (ConfigurationFinder != null)
                 ApplyConfig(ConfigurationFinder.Find());
@@ -107,6 +105,9 @@
             //Find connection strings referecned from an external file
             if (ConnectionStringsFinder != null)
                 TestSuiteManager.ConnectionStrings = ConnectionStringsFinder.Find();
+
+            //Build the Test suite
+            TestSuiteManager.Load(TestSuiteFinder.Find());

             return BuildTestCases();
         }


Make properties writes block by default

Make properties writes block by default

--- NET/API/Treehopper/Settings.cs
+++ NET/API/Treehopper/Settings.cs
@@ -44,6 +44,6 @@
         ///         setting this property to false will synchronously wait for the message to be sent to the board.
         ///     </para>
         /// </remarks>
-        public bool PropertyWritesReturnImmediately { get; set; } = true;
+        public bool PropertyWritesReturnImmediately { get; set; } = false;
     }
 }


Don't have localization-dependent tests

Don't have localization-dependent tests

--- Nvelope.Tests/IntervalTests.cs
+++ Nvelope.Tests/IntervalTests.cs
@@ -101,7 +101,11 @@
             var ce = new Interval<DateTime>(C, E);

             var res = ac.And(bd).And(ce).Overlaps();
-            Assert.AreEqual("(2/2/2011 12:00:00 AM—3/3/2011 12:00:00 AM,3/3/2011 12:00:00 AM—4/4/2011 12:00:00 AM)", res.Print());
+            Assert.AreEqual(2, res.Count());
+            Assert.AreEqual(new DateTime(2011, 2, 2), res.First().Start);
+            Assert.AreEqual(new DateTime(2011, 3, 3), res.First().End);
+            Assert.AreEqual(new DateTime(2011, 3, 3), res.Second().Start);
+            Assert.AreEqual(new DateTime(2011, 4, 4), res.Second().End);
             Assert.AreEqual("()", ac.And(ce).Overlaps().Print());
         }

@@ -113,7 +117,9 @@
             var de = new Interval<DateTime>(D, E);

             var res = ab.And(cd).And(de).Gaps();
-            Assert.AreEqual("(2/2/2011 12:00:00 AM—3/3/2011 12:00:00 AM)", res.Print());
+            Assert.AreEqual(1, res.Count());
+            Assert.AreEqual(new DateTime(2011, 2, 2), res.First().Start);
+            Assert.AreEqual(new DateTime(2011, 3, 3), res.First().End);
             Assert.AreEqual("()", cd.And(de).Gaps().Print());
         }
     }


Adicionado Registro D120 do SpedFiscal

Adicionado Registro D120 do SpedFiscal

--- SpedBr/SpedBr.SpedFiscal/BlocoD.cs
+++ SpedBr/SpedBr.SpedFiscal/BlocoD.cs
@@ -258,8 +258,46 @@
             /// <summary>
             /// Outros valores
             /// </summary>
-            [SpedCampos(5, "VL_OUT", "N", 0, 2, true)]
+            [SpedCampos(5, "VL_OUT", "N", 0, 2, false)]
             public decimal VlOut { get; set; }
+        }
+
+        /// <summary>
+        ///     REGISTRO D120: COMPLEMENTO DA NOTA FISCAL DE SERVIÇOS DE TRANSPORTE (CODIGO 07)
+        /// </summary>
+        public class RegistroD120 : RegistroBaseSped
+        {
+            /// <summary>
+            /// Inicializa uma nova instância da classe <see cref="RegistroD120"/>.
+            /// </summary>
+            public RegistroD120()
+            {
+                Reg = "D120";
+            }
+
+            /// <summary>
+            /// Codigo do municipio de origem do serviço, conforme a tabela IBGE(Preencher com 9999999, se Exterior)
+            /// </summary>
+            [SpedCampos(2, "COD_MUN_ORIG", "N", 7, 0, true)]
+            public decimal CodMunOrig { get; set; }
+
+            /// <summary>
+            /// Codigo do municipio de destino, conforme a tabela IBGE(Preencher com 9999999, se Exterior)
+            /// </summary>
+            [SpedCampos(3, "COD_MUN_DEST", "N", 7, 0, true)]
+            public decimal CodMunDest { get; set; }
+
+            /// <summary>
+            /// Placa de identificacao do veiculo
+            /// </summary>
+            [SpedCampos(4, "VEIC_ID", "C", 7, 0, false)]
+            public decimal VeicId { get; set; }
+
+            /// <summary>
+            /// Sigla da UF da placa do veiculo
+            /// </summary>
+            [SpedCampos(5, "UF_ID", "C", 2, 0, false)]
+            public decimal UfId { get; set; }
         }

         /// <summary>


space removed.

space removed.

--- Src/PTester/PRuntime/PrtMachine.cs
+++ Src/PTester/PRuntime/PrtMachine.cs
@@ -308,7 +308,7 @@

         public void PrtExecuteReceiveCase(PrtEvent ev)
         {
-            //figure out where the receive cases are mentioned ??
+            //figure out where the receive cases are stored and how ??
             throw new NotImplementedException();
         }

@@ -368,7 +368,6 @@

         }

-
         public bool PrtStepStateMachine()
         {
             PrtEvent currEventValue;
@@ -612,6 +611,5 @@

             }

-
     }
 }


Version Bump

Version Bump

--- SynUtil/Properties/AssemblyInfo.cs
+++ SynUtil/Properties/AssemblyInfo.cs
@@ -7,5 +7,5 @@
 [assembly: AssemblyProduct("SynUtil")]
 [assembly: AssemblyCopyright("Copyright © 2013, Synel Industries Ltd.")]
 [assembly: ComVisible(false)]
-[assembly: AssemblyVersion("1.9.1")]
-[assembly: AssemblyFileVersion("1.9.1.25")]
+[assembly: AssemblyVersion("1.9.2")]
+[assembly: AssemblyFileVersion("1.9.2.26")]


#420

#420

Url.Clone doesn't need a string extension equivalent (nice catch though)

--- Test/Flurl.Test/UrlBuilderTests.cs
+++ Test/Flurl.Test/UrlBuilderTests.cs
@@ -16,7 +16,7 @@
 		public void extension_methods_consistently_supported() {
 			var urlMethods = typeof(Url).GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(m => !m.IsSpecialName);
 			var stringExts = ReflectionHelper.GetAllExtensionMethods<string>(typeof(Url).GetTypeInfo().Assembly);
-			var whitelist = new[] { "ToString", "IsValid", "ToUri", "Equals", "GetHashCode" }; // cases where string extension of the same name was excluded intentionally
+			var whitelist = new[] { "ToString", "IsValid", "ToUri", "Equals", "GetHashCode", "Clone" }; // cases where string extension of the same name was excluded intentionally

 			foreach (var method in urlMethods) {
 				if (whitelist.Contains(method.Name))


remove fix that don't really be a fix

remove fix that don't really be a fix

--- src/Pong.cs
+++ src/Pong.cs
@@ -239,7 +239,6 @@
             player.vt.SetBackgroundColor(colorPalette.Background);
             player.vt.SetCursor(79, 22);
             player.vt.ClearScreen(VT100.ClearMode.BeginningToCursor);
-            player.vt.WriteText(" ");

             player.vt.SetBackgroundColor(colorPalette.Band);
             player.vt.SetCursor(0, 0);


ByteStream

ByteStream

--- ParsecSharp/Data/ByteStream.cs
+++ ParsecSharp/Data/ByteStream.cs
@@ -6,24 +6,26 @@

 namespace ParsecSharp
 {
-    public partial class ByteStream
+    public static class ByteStream
     {
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static ByteStream Create(Stream source)
-            => new ByteStream(source);
+        public static ByteStream<LinearPosition<byte>> Create(Stream source)
+            => Create(source, LinearPosition<byte>.Initial);

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public static ByteStream Create(Stream source, LinearPosition<byte> position)
-            => new ByteStream(source, position);
+        public static ByteStream<TPosition> Create<TPosition>(Stream source, TPosition position)
+            where TPosition : IPosition<byte, TPosition>
+            => new ByteStream<TPosition>(source, position);
     }

-    public sealed partial class ByteStream : IParsecState<byte, ByteStream>
+    public sealed class ByteStream<TPosition> : IParsecState<byte, ByteStream<TPosition>>
+        where TPosition : IPosition<byte, TPosition>
     {
         private const int MaxBufferSize = 2048;

         private readonly Buffer<byte> _buffer;

-        private readonly LinearPosition<byte> _position;
+        private readonly TPosition _position;

         private int Index => this._position.Column % MaxBufferSize;

@@ -35,15 +37,15 @@

         public IDisposable InnerResource { get; }

-        public ByteStream Next => new ByteStream(this.InnerResource, (this.Index == MaxBufferSize - 1) ? this._buffer.Next : this._buffer, this._position.Next(this.Current));
+        public ByteStream<TPosition> Next => new ByteStream<TPosition>(
+            this.InnerResource,
+            (this.Index == MaxBufferSize - 1) ? this._buffer.Next : this._buffer,
+            this._position.Next(this.Current));

-        public ByteStream(Stream source) : this(source, LinearPosition<byte>.Initial)
+        public ByteStream(Stream source, TPosition position) : this(source, CreateBuffer(source), position)
         { }

-        public ByteStream(Stream source, LinearPosition<byte> position) : this(source, CreateBuffer(source), position)
-        { }
-
-        private ByteStream(IDisposable source, Buffer<byte> buffer, LinearPosition<byte> position)
+        private ByteStream(IDisposable source, Buffer<byte> buffer, TPosition position)
         {
             this.InnerResource = source;
             this._buffer = buffer;
@@ -75,11 +77,11 @@
         public void Dispose()
             => this.InnerResource.Dispose();

-        public bool Equals(ByteStream other)
-            => this._buffer == other._buffer && this._position == other._position;
+        public bool Equals(ByteStream<TPosition> other)
+            => this._buffer == other._buffer && this._position.Equals(other._position);

         public sealed override bool Equals(object? obj)
-            => obj is ByteStream state && this._buffer == state._buffer && this._position == state._position;
+            => obj is ByteStream<TPosition> state && this._buffer == state._buffer && this._position.Equals(state._position);

         public sealed override int GetHashCode()
             => this._buffer.GetHashCode() ^ this._position.GetHashCode();


Add BeepMode APIs

Add BeepMode APIs

--- Project/Api/CameraApiClient.cs
+++ Project/Api/CameraApiClient.cs
@@ -649,5 +649,43 @@
                 res => result = res);
             return result;
         }
+
+        public async Task SetBeepModeAsync(string mode)
+        {
+            BasicResultHandler.HandleNoValue(
+                await AsyncPostClient.Post(endpoint, RequestGenerator.Jsonize("setBeepMode", mode)),
+                code => { throw new RemoteApiException(code); },
+                () => { });
+        }
+
+        public async Task<string> GetBeepModeAsync()
+        {
+            string result = null;
+            BasicResultHandler.HandleSingleValue<string>(
+                await AsyncPostClient.Post(endpoint, RequestGenerator.Jsonize("getBeepMode")),
+                code => { throw new RemoteApiException(code); },
+                mode => result = mode);
+            return result;
+        }
+
+        public async Task<string[]> GetSupportedBeepModeAsync()
+        {
+            string[] result = null;
+            BasicResultHandler.HandleArray<string>(
+                await AsyncPostClient.Post(endpoint, RequestGenerator.Jsonize("getSupportedBeepMode")),
+                code => { throw new RemoteApiException(code); },
+                mode => result = mode);
+            return result;
+        }
+
+        public async Task<Capability<string>> GetAvailableBeepModeAsync()
+        {
+            Capability<string> result = null;
+            BasicResultHandler.HandleCapability<string>(
+                await AsyncPostClient.Post(endpoint, RequestGenerator.Jsonize("getAvailableBeepMode")),
+                code => { throw new RemoteApiException(code); },
+                info => result = info);
+            return result;
+        }
     }
 }


Revert "Remove unused code"

Revert "Remove unused code"

This reverts commit 3fc34bb4bd34f0f118490c646ab9975b80b4fd56.

--- Proto/Assets/Scripts/UI/HUD.cs
+++ Proto/Assets/Scripts/UI/HUD.cs
@@ -59,6 +59,14 @@
         {
             PhotonNetwork.Disconnect();
         }
+        /*if (Input.GetButtonDown("TimeRewind"))
+        {
+            _clockUI.SetActive(true);
+        }
+        else if (Input.GetButtonUp("TimeRewind"))
+        {
+            _clockUI.SetActive(false);
+        }*/
     }

     void SetupAction()


Add additional tests for the breaking changes in this release.

--- Pegasus.Tests/Compiler/PegCompilerTests.cs
+++ Pegasus.Tests/Compiler/PegCompilerTests.cs
@@ -87,6 +87,28 @@
             Assert.That(error.IsWarning, Is.True);
         }

+        [Test]
+        public void Compile_WhenTheGrammarContainsAnAndCodeExpression_ExecutesExpression()
+        {
+            var grammar = new PegParser().Parse("a = &{true} 'OK'");
+
+            var compiled = PegCompiler.Compile(grammar);
+            var parser = CodeCompiler.Compile<string>(compiled);
+
+            Assert.That(parser.Parse("OK"), Is.EqualTo("OK"));
+        }
+
+        [Test]
+        public void Compile_WhenTheGrammarContainsAnAndExpression_ExecutesExpression()
+        {
+            var grammar = new PegParser().Parse("a = &other 'OK'; other <int> = 'OK' { 0 }");
+
+            var compiled = PegCompiler.Compile(grammar);
+            var parser = CodeCompiler.Compile<string>(compiled);
+
+            Assert.That(parser.Parse("OK"), Is.EqualTo("OK"));
+        }
+
         [TestCase("string")]
         [TestCase("foo")]
         [TestCase("bar")]
@@ -96,6 +118,28 @@
             var compiled = PegCompiler.Compile(grammar);

             Assert.That(compiled.ExpressionTypes[grammar.Rules.Single().Expression].ToString(), Is.EqualTo(type));
+        }
+
+        [Test]
+        public void Compile_WhenTheGrammarContainsANotCodeExpression_ExecutesExpression()
+        {
+            var grammar = new PegParser().Parse("a = !{false} 'OK'");
+
+            var compiled = PegCompiler.Compile(grammar);
+            var parser = CodeCompiler.Compile<string>(compiled);
+
+            Assert.That(parser.Parse("OK"), Is.EqualTo("OK"));
+        }
+
+        [Test]
+        public void Compile_WhenTheGrammarContainsANotExpression_ExecutesExpression()
+        {
+            var grammar = new PegParser().Parse("a = !other 'OK'; other <int> = 'NO' { 0 }");
+
+            var compiled = PegCompiler.Compile(grammar);
+            var parser = CodeCompiler.Compile<string>(compiled);
+
+            Assert.That(parser.Parse("OK"), Is.EqualTo("OK"));
         }

         [Test]


Updated help

Updated help

--- source/BCU-console/Program.cs
+++ source/BCU-console/Program.cs
@@ -24,14 +24,16 @@
         {
             Console.WriteLine(@"BCU-console [help | /?] - Show help (this screen)

-BCU-console uninstall path [/Q] [/U] [/V] - Uninstall applications
+BCU-console uninstall [drive:][path]filename [/Q] [/U] [/V] - Uninstall applications

- path - Path to a .bcul file that contains information about applications to uninstall.
- /Q   - Use quiet uninstallers wherever possible (by default only use loud).
- /U   - Unattended mode (do not ask user for confirmation). WARNING: ONLY USE AFTER THOROUGH TESTING.
-        UNINSTALL LISTS SHOULD BE AS SPECIFIC AS POSSIBLE TO AVOID FALSE POSITIVES. THERE ARE NO
-        WARRANTIES, ONLY YOU ARE CONSIDERED RESPONSIBLE FOR THE RESULTS.
- /V   - Verbose logging mode (show more information about what is currently happening).");
+ [drive:][path]	– Specifies drive and directory of the uninstall list.
+ filename       – Specifies filename of the .bcul uninstall list that contains information about
+                  what applications to uninstall.
+ /Q             - Use quiet uninstallers wherever possible (by default only use loud).
+ /U             - Unattended mode (do not ask user for confirmation). WARNING: ONLY USE AFTER
+                  THOROUGH TESTING. UNINSTALL LISTS SHOULD BE AS SPECIFIC AS POSSIBLE TO AVOID
+                  FALSE POSITIVES. THERE ARE NO WARRANTIES, USE WITH CAUTION.
+ /V             - Verbose logging mode (show more information about what is currently happening).");
         }

         private static int Main(string[] args)


Added sanity check

Added sanity check

--- PiCross/Domain/PiCross/InMemoryDatabase.cs
+++ PiCross/Domain/PiCross/InMemoryDatabase.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
 using System.IO.Compression;
 using System.Linq;
@@ -39,7 +40,7 @@
             }
         }

-        public static InMemoryDatabase ReadFromArchive(IGameDataArchive archive)
+        public static InMemoryDatabase ReadFromArchive( IGameDataArchive archive )
         {
             var gameData = CreateEmpty();

@@ -166,7 +167,11 @@

             public PuzzleLibraryEntry Create( Puzzle puzzle, string author )
             {
-                var newEntry = new PuzzleLibraryEntry( nextUID++, puzzle, author );
+                var uid = nextUID++;
+
+                Debug.Assert( !ContainsEntryWithUID( uid ) );
+
+                var newEntry = new PuzzleLibraryEntry( uid, puzzle, author );

                 entries.Add( newEntry );


Use shared command and open in new browser window

--- Plugins/Wox.Plugin.BrowserBookmark/Main.cs
+++ Plugins/Wox.Plugin.BrowserBookmark/Main.cs
@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using Wox.Infrastructure;
+using Wox.Plugin.SharedCommands;

 namespace Wox.Plugin.BrowserBookmark
 {
@@ -54,7 +55,7 @@
                 Action = (e) =>
                 {
                     context.API.HideApp();
-                    System.Diagnostics.Process.Start(c.Url);
+                    c.Url.NewBrowserWindow("");
                     return true;
                 }
             }).ToList();


remove unused stop watcher

remove unused stop watcher

--- Plugins/Wox.Plugin.Program/Programs/UWP.cs
+++ Plugins/Wox.Plugin.Program/Programs/UWP.cs
@@ -147,23 +147,13 @@
             var support = Environment.OSVersion.Version.Major >= windows10.Major;
             if (support)
             {
-                var watch = new System.Diagnostics.Stopwatch();
-                watch.Start();
-
                 var applications = CurrentUserPackages().AsParallel().SelectMany(p => new UWP(p).Apps).ToArray();
-
-                watch.Stop();
-                Log.Info("UWP ALL" + watch.ElapsedMilliseconds);
-
                 return applications;
-
             }
             else
             {
                 return new Application[] { };
             }
-
-
         }

         private static IEnumerable<Package> CurrentUserPackages()


Add test for special case of poetry continuation of dialog quote

Useful for ensuring new parser doesn't break this functionality

--- ProtoScriptTests/Quote/QuoteParserTests.cs
+++ ProtoScriptTests/Quote/QuoteParserTests.cs
@@ -1167,6 +1167,43 @@
 		}

 		[Test]
+		public void Parse_DialogueQuoteWithNoSentenceEndingPunctuationFollowedByCloseAfterPoetry_SentenceEndingWithinPoetry_QuoteRemainsOpenUntilClosed()
+		{
+			var block1 = new Block("p", 2, 5);
+			block1.BlockElements.Add(new ScriptText("—Quote:"));
+			var block2 = new Block("q2", 2, 6);
+			block2.BlockElements.Add(new Verse("6"));
+			block2.BlockElements.Add(new ScriptText("Poetry stuff. "));
+			var block3 = new Block("m", 2, 6);
+			block3.BlockElements.Add(new ScriptText("More poetry stuff —back to narrator."));
+			var input = new List<Block> { block1, block2, block3 };
+			var quoteSystem = QuoteSystem.GetOrCreateQuoteSystem(new QuotationMark("“", "”", "“", 1, QuotationMarkingSystemType.Normal), "—", "—", false);
+			IList<Block> output = new QuoteParser(ControlCharacterVerseData.Singleton, "MAT", input, quoteSystem).Parse().ToList();
+			Assert.AreEqual(4, output.Count);
+
+			Assert.AreEqual("—Quote:", output[0].GetText(true));
+			Assert.AreEqual("Good Priest", output[0].CharacterId);
+			Assert.AreEqual(string.Empty, output[0].Delivery);
+			Assert.AreEqual(2, output[0].ChapterNumber);
+			Assert.AreEqual(5, output[0].InitialStartVerseNumber);
+
+			Assert.AreEqual("[6]\u00A0Poetry stuff. ", output[1].GetText(true));
+			Assert.AreEqual("Good Priest", output[1].CharacterId);
+			Assert.AreEqual(2, output[1].ChapterNumber);
+			Assert.AreEqual(6, output[1].InitialStartVerseNumber);
+
+			Assert.AreEqual("More poetry stuff ", output[2].GetText(true));
+			Assert.AreEqual("Good Priest", output[2].CharacterId);
+			Assert.AreEqual(2, output[2].ChapterNumber);
+			Assert.AreEqual(6, output[2].InitialStartVerseNumber);
+
+			Assert.AreEqual("—back to narrator.", output[3].GetText(true));
+			Assert.IsTrue(output[3].CharacterIs("MAT", CharacterVerseData.StandardCharacter.Narrator));
+			Assert.AreEqual(2, output[3].ChapterNumber);
+			Assert.AreEqual(6, output[3].InitialStartVerseNumber);
+		}
+
+		[Test]
 		public void Parse_DialogueQuoteWithNoExplicitEnd_QuoteClosedByEndOfParagraph()
 		{
 			var block1 = new Block("p", 1, 17);


Add null-check while reading renewals from registry (#532)

--- letsencrypt-win-simple/Settings.cs
+++ letsencrypt-win-simple/Settings.cs
@@ -32,7 +32,9 @@
         {
             get {
                 if (_renewalsCache == null) {
-                    _renewalsCache = _renewalStore.Select(x => ScheduledRenewal.Load(x)).Where(x => x != null).ToList();
+                    if (_renewalStore != null) {
+                        _renewalsCache = _renewalStore.Select(x => ScheduledRenewal.Load(x)).Where(x => x != null).ToList();
+                    }
                 }
                 return _renewalsCache;
             }
@@ -46,12 +48,9 @@
         internal int HostsPerPage()
         {
             int hostsPerPage = 50;
-            try
-            {
+            try {
                 hostsPerPage = Properties.Settings.Default.HostsPerPage;
-            }
-            catch (Exception ex)
-            {
+            } catch (Exception ex) {
                 Program.Log.Error("Error getting HostsPerPage setting, setting to default value. Error: {@ex}", ex);
             }
             return hostsPerPage;


Remove obvious comments

Remove obvious comments

--- R7.Documents.Dnn/SettingsDocuments.ascx.cs
+++ R7.Documents.Dnn/SettingsDocuments.ascx.cs
@@ -21,12 +21,6 @@

 namespace R7.Documents
 {
-    /// <summary>
-    /// Provides the UI for managing Document's module settings
-    /// </summary>
-    /// <history>
-    /// 	[cnurse]	9/22/2004	Moved Documents to a separate Project
-    /// </history>
     public partial class SettingsDocuments : ModuleSettingsBase<DocumentsSettings>
     {
         const string VIEWSTATE_SORTCOLUMNSETTINGS = "SortColumnSettings";
@@ -181,9 +175,6 @@

         #endregion

-        /// <summary>
-        /// LoadSettings loads the settings from the Databas and displays them
-        /// </summary>
         public override void LoadSettings ()
         {
             DocumentsDisplayColumn objColumn = null;
@@ -286,9 +277,6 @@
             }
         }

-        /// <summary>
-        /// UpdateSettings saves the modified settings to the Database
-        /// </summary>
         public override void UpdateSettings ()
         {
             try {
@@ -335,15 +323,6 @@

         }

-        /// -----------------------------------------------------------------------------
-        /// <summary>
-        /// Read settings from the screen into the passed-in DocumentsSettings object
-        /// </summary>
-        /// <remarks>
-        /// </remarks>
-        /// <history>
-        /// </history>
-        /// -----------------------------------------------------------------------------
         void FillSettings ()
         {
             string strDisplayColumns = "";


Consistent syntax layout.

Consistent syntax layout.

--- Sandra.Chess/ChessConstants.cs
+++ Sandra.Chess/ChessConstants.cs
@@ -147,15 +147,14 @@
             {
                 ulong sqVector = sq.ToVector();

-                KnightMoves[sq]
-                    = (sqVector & ~Rank8 & ~Rank7 & ~FileA) << 15  // NNW
-                    | (sqVector & ~Rank8 & ~Rank7 & ~FileH) << 17  // NNE
-                    | (sqVector & ~Rank8 & ~FileG & ~FileH) << 10  // ENE
-                    | (sqVector & ~Rank1 & ~FileG & ~FileH) >> 6   // ESE
-                    | (sqVector & ~Rank1 & ~Rank2 & ~FileH) >> 15  // SSE
-                    | (sqVector & ~Rank1 & ~Rank2 & ~FileA) >> 17  // SSW
-                    | (sqVector & ~Rank1 & ~FileB & ~FileA) >> 10  // WSW
-                    | (sqVector & ~Rank8 & ~FileB & ~FileA) << 6;  // WNW
+                KnightMoves[sq] = (sqVector & ~Rank8 & ~Rank7 & ~FileA) << 15  // NNW
+                                | (sqVector & ~Rank8 & ~Rank7 & ~FileH) << 17  // NNE
+                                | (sqVector & ~Rank8 & ~FileG & ~FileH) << 10  // ENE
+                                | (sqVector & ~Rank1 & ~FileG & ~FileH) >> 6   // ESE
+                                | (sqVector & ~Rank1 & ~Rank2 & ~FileH) >> 15  // SSE
+                                | (sqVector & ~Rank1 & ~Rank2 & ~FileA) >> 17  // SSW
+                                | (sqVector & ~Rank1 & ~FileB & ~FileA) >> 10  // WSW
+                                | (sqVector & ~Rank8 & ~FileB & ~FileA) << 6;  // WNW
             }
         }


Changed documentation.

Changed documentation.

--- SharpQuadTrees/QuadTreeNode.cs
+++ SharpQuadTrees/QuadTreeNode.cs
@@ -95,17 +95,17 @@
         }

         /// <summary>
-        /// Returns whether all of the given items would be inside the node.
+        /// Returns whether all of the given items' coordinates are inside the node.
         /// </summary>
         /// <param name="items">The items to check.</param>
-        /// <returns>Whether all of the items would be inside the node.</returns>
-        public bool AreInsideNode(IEnumerable<TContent> items)
+        /// <returns>Whether all of the items' coordinates are inside the node.</returns>
+        public bool AreInsideNode(params TContent[] items)
         {
             return items.Any(item => !IsInsideNode(item));
         }

         /// <summary>
-        /// Gets an IEnumerable of content items.
+        /// Gets an IEnumerable of the content items.
         /// </summary>
         /// <returns>IEnumerable of the content items.</returns>
         public abstract IEnumerable<TContent> GetContent();
@@ -117,7 +117,7 @@
         public abstract IEnumerable<QuadTreeNode<TContent, TAverage>> GetLeafs();

         /// <summary>
-        /// Returns whether the given point is inside the node.
+        /// Returns whether the given point's coordinates are inside the node.
         /// </summary>
         /// <param name="x">The x coordinate of the point.</param>
         /// <param name="y">The y coordinate of the point.</param>
@@ -129,10 +129,10 @@
         }

         /// <summary>
-        /// Return whether the given item would be inside the node.
+        /// Return whether the given item's coordinates are inside the node.
         /// </summary>
         /// <param name="item">The item to check.</param>
-        /// <returns>Whether the item would be inside the node.</returns>
+        /// <returns>Whether the item's coordinates are inside the node.</returns>
         public bool IsInsideNode(TContent item)
         {
             return IsInsideNode(controller.GetContentX(item), controller.GetContentY(item));


Set IsDisposed to true after disabling the CommandFilter (fixes #33)

--- Shell.Utility/CommandFilter.cs
+++ Shell.Utility/CommandFilter.cs
@@ -131,6 +131,8 @@
             {
                 Enabled = false;
             }
+
+            IsDisposed = true;
         }

         /// <summary>


miMixin public

miMixin public

--- Signum.Entities/MixinEntity.cs
+++ Signum.Entities/MixinEntity.cs
@@ -45,7 +45,7 @@

     public static class MixinDeclarations
     {
-        internal static readonly MethodInfo miMixin = ReflectionTools.GetMethodInfo((IdentifiableEntity i) => i.Mixin<CorruptMixin>()).GetGenericMethodDefinition();
+        public static readonly MethodInfo miMixin = ReflectionTools.GetMethodInfo((IdentifiableEntity i) => i.Mixin<CorruptMixin>()).GetGenericMethodDefinition();

         public static Dictionary<Type, HashSet<Type>> Declarations = new Dictionary<Type, HashSet<Type>>();


setting ReadWriteTimeout for requests

setting ReadWriteTimeout for requests

git-svn-id: d6bffa57a36fe0f3c7d18ef52cc0c4d4ff653ca6@383 66c3f25c-543c-0410-ae2e-6f2ca0bd8c61

--- SolrNet/Impl/SolrConnection.cs
+++ SolrNet/Impl/SolrConnection.cs
@@ -78,8 +78,10 @@
             var request = httpWebRequestFactory.Create(u.Uri);
             request.Method = HttpWebRequestMethod.POST;
             request.KeepAlive = false;
-            if (Timeout > 0)
-                request.Timeout = Timeout;
+            if (Timeout > 0) {
+                request.ReadWriteTimeout = Timeout;
+                request.Timeout = Timeout;
+            }
             request.ContentType = "text/xml; charset=utf-8";
             var bytes = Encoding.UTF8.GetBytes(s);
             request.ContentLength = bytes.Length;


Improved test coverage of Socks4Client

Improved test coverage of Socks4Client

--- UnitTests/Net/Socks4ClientTests.cs
+++ UnitTests/Net/Socks4ClientTests.cs
@@ -88,7 +88,7 @@
 		[Test]
 		public void TestConnectByIPv4 ()
 		{
-			var socks = new Socks4Client ("100.39.36.100", 58288, new NetworkCredential ("", ""));
+			var socks = new Socks4Client ("100.39.36.100", 58288);
 			var host = ResolveIPv4 ("www.google.com");
 			Socket socket = null;

@@ -106,7 +106,7 @@
 		[Test]
 		public async void TestConnectByIPv4Async ()
 		{
-			var socks = new Socks4Client ("100.39.36.100", 58288, new NetworkCredential ("", ""));
+			var socks = new Socks4Client ("100.39.36.100", 58288);
 			var host = ResolveIPv4 ("www.google.com");
 			Socket socket = null;

@@ -124,7 +124,7 @@
 		[Test]
 		public void TestConnectByDomain ()
 		{
-			var socks = new Socks4Client ("100.39.36.100", 58288, new NetworkCredential ("", ""));
+			var socks = new Socks4Client ("100.39.36.100", 58288);

 			Assert.Throws<ProxyProtocolException> (() => socks.Connect ("www.google.com", 80, 10 * 1000));
 		}
@@ -132,7 +132,7 @@
 		[Test]
 		public void TestConnectByDomainAsync ()
 		{
-			var socks = new Socks4Client ("100.39.36.100", 58288, new NetworkCredential ("", ""));
+			var socks = new Socks4Client ("100.39.36.100", 58288);

 			Assert.Throws<ProxyProtocolException> (async () => await socks.ConnectAsync ("www.google.com", 80, 10 * 1000));
 		}


globat_uitil_update20160529

globat_uitil_update20160529

--- Utility/GlobalUtilities_Utility.cs
+++ Utility/GlobalUtilities_Utility.cs
@@ -55,6 +55,19 @@
         public static readonly Color DefaultIndicatorColor = Color.Orange;
         public static readonly Color DefaultIndicatorColor_GreyedOut = Color.Gray;
         public static readonly DashStyle DefaultIndicatorDashStyle = DashStyle.Solid;
+
+        //Fibonacci Retracements
+        public const decimal DefaultFibonacciRetracement23_6 = 23.6m;
+        public const decimal DefaultFibonacciRetracement38_2 = 38.2m;
+        public const decimal DefaultFibonacciRetracement50   = 50;
+        public const decimal DefaultFibonacciRetracement61_8 = 61.8m;
+        public const decimal DefaultFibonacciRetracement100  = 100;
+
+        //Fibonacci Extensions
+        public const decimal DefaultFibonacciExtension161_8  = 161.8m;
+        public const decimal DefaultFibonacciExtension200    = 200;
+        public const decimal DefaultFibonacciExtension261_8  = 261.8m;
+        public const decimal DefaultFibonacciExtension423_6  = 423.6m;

     }

@@ -414,53 +427,6 @@
             return Target;
         }

-        /// <summary>
-        /// Get the absolute size of the candlestick body. Meaning the size of the
-        /// body (from Open to Close) without the wicks
-        /// </summary>
-        /// <param name="Bar"></param>
-        /// <returns></returns>
-        public static double getBodySize(IBar Bar)
-        {
-            return Math.Abs(Bar.Open - Bar.Close);
-        }
-
-        /// <summary>
-        /// Checks, if the close is higher than the open (upgoing candle)
-        /// </summary>
-        /// <param name="Bar"></param>
-        /// <returns></returns>
-        public static bool isGreenCandle(IBar Bar)
-        {
-            if (Bar.Open < Bar.Close)
-            {
-                //green candle
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Checks, if the open is higher than the close (downgoing candle)
-        /// </summary>
-        /// <param name="Bar"></param>
-        /// <returns></returns>
-        public static bool isRedCandle(IBar Bar)
-        {
-            if (Bar.Open > Bar.Close)
-            {
-                //red candle
-                return true;
-            }
-            else
-            {
-                return false;
-            }
-        }
-
         #endregion

         #region Files


Error when received data wasn't fully consumed before requesting a new file

--- RuneScapeCacheTools/Download/Downloader.cs
+++ RuneScapeCacheTools/Download/Downloader.cs
@@ -184,6 +184,13 @@
                 throw new DownloaderException("Can't request file when disconnected.");
             }

+            if (ContentClient.Available > 0)
+            {
+                var untouchedBytes = new BinaryReader(ContentClient.GetStream()).ReadBytes(ContentClient.Available);
+
+                throw new DownloaderException("Network data was received before sending a file request.");
+            }
+
             var writer = new BinaryWriter(ContentClient.GetStream());

             // Send the file request to the content server
@@ -208,6 +215,7 @@
                     $"Obtained file's file id ({fileFileId}) does not match requested ({fileId}).");
             }

+            // TODO: Caching for reference tables
             var referenceTableEntry = indexId != RuneTek5Cache.MetadataIndexId ? DownloadReferenceTable(indexId).Files[fileId] : null;

             return new RuneTek5CacheFile(ContentClient.GetStream(), referenceTableEntry);


Restore order

Restore order

--- WalletWasabi/Services/CcjClient.cs
+++ WalletWasabi/Services/CcjClient.cs
@@ -755,8 +755,8 @@

 		private void RemoveCoin(SmartCoin coinWaitingForMix)
 		{
+			State.RemoveCoinFromWaitingList(coinWaitingForMix);
 			coinWaitingForMix.CoinJoinInProgress = false;
-			State.RemoveCoinFromWaitingList(coinWaitingForMix);
 			coinWaitingForMix.Secret = null;
 			if (coinWaitingForMix.Label == "ZeroLink Change" && coinWaitingForMix.Unspent)
 			{


Retry should be a value object

Retry should be a value object

--- Source/EventFlow/Core/Retry.cs
+++ Source/EventFlow/Core/Retry.cs
@@ -22,10 +22,12 @@
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 using System;
+using System.Collections.Generic;
+using EventFlow.ValueObjects;

 namespace EventFlow.Core
 {
-    public class Retry
+    public class Retry : ValueObject
     {
         public static Retry Yes { get; } = new Retry(true, TimeSpan.Zero);
         public static Retry YesAfter(TimeSpan retryAfter) => new Retry(true, retryAfter);
@@ -44,5 +46,11 @@
             ShouldBeRetried = shouldBeRetried;
             RetryAfter = retryAfter;
         }
+
+        protected override IEnumerable<object> GetEqualityComponents()
+        {
+            yield return ShouldBeRetried;
+            yield return RetryAfter;
+        }
     }
 }


finish ast

finish ast

--- racr-net/Racr.cs
+++ racr-net/Racr.cs
@@ -107,8 +107,25 @@
 		return (o is bool) ? (bool) o : true;
 	}

+	public struct Range {
+		public int min;
+		public int max;
+		public Range(int min, int max) {
+			this.min = min;
+			this.max = max;
+		}
+		public Range(int min) {
+			this.min = min;
+			this.max = 0;
+		}
+		internal Cons ToCons() {
+			return new Cons(min, max > 0 ? max : SymbolTable.StringToObject("*"));
+		}
+	}
+
 	public class AstNode {
 		internal object ast;
+		private bool[] nonTermChilren;		// are children non-terminal?

 		private static AstNode GetNode(object ast) {
 			return (AstNode) astAnnotation.Call(ast, SymbolTable.StringToObject("this"));
@@ -120,15 +137,15 @@
 			var nt = SymbolTable.StringToObject(nonTerminal);
 			var rule = specificationFindAstRule.Call(spec.spec, nt);
 			var symbols = astRuleProduction.Call(rule) as Cons;
+
+			nonTermChilren = new bool[children.Length];

 			Cons list = null;
 			Cons marker = null;
 			for (int i = 0; i < children.Length; i++) {
 				symbols = symbols.cdr as Cons;
-				object child;
-				var isNonTerm = symbolIsNonTerminal.Call(symbols.car);
-				if (IsTrue(isNonTerm)) child = (children[i] as AstNode).ast;
-				else child = children[i];
+				nonTermChilren[i] = IsTrue(symbolIsNonTerminal.Call(symbols.car));
+				var child = nonTermChilren[i] ? (children[i] as AstNode).ast : children[i];
 				var cons = new Cons(child);
 				if (list == null) list = marker = cons;
 				else {
@@ -197,6 +214,50 @@
 		public string NodeType() {
 			return ((SymbolId) astNodeType.Call(ast)).ToString();
 		}
+		public bool IsListNode() {
+			return (bool) astListNodeQ.Call(ast);
+		}
+		public bool IsBudNode() {
+			return (bool) astBudNodeQ.Call(ast);
+		}
+
+
+		public void ForEachChild(Action<int, object> f, params Range[] bounds) {
+			Func<int, object, object> wrap = (i, n) => {
+				f(i, nonTermChilren[i - 1] ? GetNode(n) : n);
+				return Builtins.Unspecified;
+			};
+			object[] l = new object[2 + bounds.Length];
+			l[0] = wrap.ToSchemeProcedure();
+			l[1] = ast;
+			for (int i = 0; i < bounds.Length; i++) l[i + 2] = bounds[i].ToCons();
+			astForEachChild.Call(l);
+		}
+		public object FindChild(Func<int, object, bool> f, params Range[] bounds) {
+			int index = 0;
+			Func<int, object, bool> wrap = (i, n) => {
+				bool found = f(i, nonTermChilren[i - 1] ? GetNode(n) : n);
+				if (found) index = i;
+				return found;
+			};
+			object[] l = new object[2 + bounds.Length];
+			l[0] = wrap.ToSchemeProcedure();
+			l[1] = ast;
+			for (int i = 0; i < bounds.Length; i++) l[i + 2] = bounds[i].ToCons();
+			var ret = astFindChild.Call(l);
+			return (index > 0 && nonTermChilren[index - 1]) ? GetNode(ret) : ret;
+		}
+		public object FindChildA(Func<int, object, object> f, params Range[] bounds) {
+			Func<int, object, object> wrap = (i, n) => {
+				return f(i, nonTermChilren[i - 1] ? GetNode(n) : n);
+			};
+			object[] l = new object[2 + bounds.Length];
+			l[0] = wrap.ToSchemeProcedure();
+			l[1] = ast;
+			for (int i = 0; i < bounds.Length; i++) l[i + 2] = bounds[i].ToCons();
+			return astFindChildA.Call(l);
+		}
+

 		// ast annotations
@@ -215,6 +276,16 @@
 		public void WeaveAnnotations(string type, string name, object v) {
 			astWeaveAnnotations.Call(ast, SymbolTable.StringToObject(type), SymbolTable.StringToObject(name), v);
 		}
+	}
+
+	public static bool IsSubtype(this string t, AstNode n) {
+		return (bool) astSubtypeQ.Call(SymbolTable.StringToObject(t), n.ast);
+	}
+	public static bool IsSubtype(this AstNode n, string t) {
+		return (bool) astSubtypeQ.Call(n.ast, SymbolTable.StringToObject(t));
+	}
+	public static bool IsSubtype(this AstNode n1, AstNode n2) {
+		return (bool) astSubtypeQ.Call(n1.ast, n2.ast);
 	}

@@ -236,14 +307,14 @@
 }

-
 class App {

 	public static void Main() {

+
 		var spec = new Racr.Specification();
-		spec.AstRule("A->B-C");
+		spec.AstRule("A->B-C-w");
 		spec.AstRule("B->t");
 		spec.AstRule("C->");

@@ -257,8 +328,30 @@
 		var root = new Racr.AstNode(spec, "A",
 			new Racr.AstNode(spec, "B",
 				"terminal"),
-			new Racr.AstNode(spec, "C"));
-
+			new Racr.AstNode(spec, "C"),
+			"hiya");
+
+
+		root.ForEachChild((i, o) => {
+			var node = o as Racr.AstNode;
+			if (node != null)
+				Console.WriteLine("{0}: {1}", i, node.NodeType());
+			else
+				Console.WriteLine("{0}: {1}", i, o);
+		}, new Racr.Range(2));
+
+
+		Console.WriteLine("---");
+
+
+		var c = root.FindChild((i, o) => {
+			return i == 2;
+		}) as Racr.AstNode;
+
+		Console.WriteLine("{0}", c.NodeType());
+
+
+		Console.WriteLine("---");

 		Console.WriteLine(root);
 		Console.WriteLine("NodeType: {0}", root.NodeType());


Made whisper command to only be in same vroom

--- commands/Eval.cs
+++ commands/Eval.cs
@@ -1200,7 +1200,7 @@
         public static void Whisper(IUser client, IUser target, String text)
         {
             if (client.Level > ILevel.Regular || Settings.General)
-                if (target != null && !target.IgnoreList.Contains(client.Name))
+                if (target != null && !target.IgnoreList.Contains(client.Name) && target.Vroom == client.Vroom)
                 {
                     client.Print(Template.Text(Category.Messaging, 2).Replace("+n", target.Name).Replace("+t", text));
                     target.Print(Template.Text(Category.Messaging, 3).Replace("+n", client.Name).Replace("+t", text));


Change switch statement in Version task to use ToLower on argument

--- generators/cakeplus/templates/build.cake
+++ generators/cakeplus/templates/build.cake
@@ -50,7 +50,7 @@
 		major = assertedVersions.Major;
 		minor = assertedVersions.Minor;
 		patch = assertedVersions.Patch;
-		switch (versionType)
+		switch (versionType.ToLower())
 		{
 			case "patch":
 				patch += 1; break;


Add test for TransformRenderedHtml

Add test for TransformRenderedHtml

--- tests/React.Tests/Core/ReactComponentTest.cs
+++ tests/React.Tests/Core/ReactComponentTest.cs
@@ -339,7 +339,7 @@
 		{
 			var environment = new Mock<IReactEnvironment>();
 			environment.Setup(x => x.Execute<bool>("typeof Foo !== 'undefined'")).Returns(true);
-			environment.Setup(x => x.Execute<string>(@"ReactDOMServer.renderToString(wrap(React.createElement(Foo, {""hello"":""World""})))"))
+			environment.Setup(x => x.Execute<string>(@"outerWrap(ReactDOMServer.renderToString(wrap(React.createElement(Foo, {""hello"":""World""}))))"))
 				.Returns("[HTML]");

 			environment.Setup(x => x.Execute<string>(@"prerender();"))
@@ -375,8 +375,11 @@
 			Assert.Equal("prerender-result", renderFunctions.PreRenderResult);
 			Assert.Equal("prerender-result", chainedRenderFunctions.PreRenderResult);

-			string transformed = chainedRenderFunctions.WrapComponent("React.createElement('div', null)");
-			Assert.Equal("wrap(wrap(React.createElement('div', null)))", transformed);
+			string wrapComponentResult = chainedRenderFunctions.WrapComponent("React.createElement('div', null)");
+			Assert.Equal("wrap(wrap(React.createElement('div', null)))", wrapComponentResult);
+
+			Assert.Equal("outerWrap(input)", renderFunctions.TransformRenderedHtml("input"));
+			Assert.Equal("outerWrap(outerWrap(input))", chainedRenderFunctions.TransformRenderedHtml("input"));

 			chainedRenderFunctions.PostRender(a => "postrender-result");

@@ -404,6 +407,11 @@
 				return $"wrap({componentToRender})";
 			}

+			protected override string TransformRenderedHtmlCore(string input)
+			{
+				return $"outerWrap({input})";
+			}
+
 			protected override void PostRenderCore(Func<string, string> executeJs)
 			{
 				PostRenderResult = executeJs("postrender();");


Update StructTest for MonoTouch/Xbox/Silverlight

--- tests/ServiceStack.Text.Tests/StructTests.cs
+++ tests/ServiceStack.Text.Tests/StructTests.cs
@@ -205,10 +205,10 @@

             Assert.That(dto.ToJsv(),
                 Is.EqualTo("{Id:1,Name:foo}"));
-
+#if !XBOX && !SILVERLIGHT && !MONOTOUCH
             Assert.That(dto.ToXml(),
                 Is.EqualTo("<?xml version=\"1.0\" encoding=\"utf-8\"?><UserStruct xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/ServiceStack.Text.Tests\"><Id>1</Id><Name>foo</Name></UserStruct>"));
-
+#endif
             JsConfig.Reset();
         }


Added Level class that will hold the information of the game levels (ref #19)

--- WebDev/WebDev/Models/GameModels.cs
+++ WebDev/WebDev/Models/GameModels.cs
@@ -11,4 +11,13 @@
         [Required]
         public string PasswordHash { get; set; }
     }
+
+    public class Level
+    {
+        [Key]
+        public string Name { get; set; }
+
+        [Required]
+        public string Content { get; set; }
+    }
 }


Docstring update.

Docstring update.

--- nml/Matrix4x4.cs
+++ nml/Matrix4x4.cs
@@ -5,7 +5,7 @@
 namespace nml
 {
     /// <summary>
-    /// This is a 4x4 matrix, it is a generic case for working with transformations in 3d space.
+    /// This is a 4x4 matrix, used for working with affine transformations ( rotation, scaling, translation) as well as perspective projections in 3d space.
     /// The data is stored in row-major order, e.g. m12 refers to first row second column.
     /// The mathematical operations on vector transforms are suitable for the order of M*v.
     /// </summary>
@@ -986,9 +986,9 @@
         /// <summary>
         /// Transform a vector by a matrix, M*v
         /// </summary>
-        /// <param name="matrix"></param>
-        /// <param name="vec"></param>
-        /// <returns></returns>
+        /// <param name="matrix">The matrix.</param>
+        /// <param name="vec">The vector to transform.</param>
+        /// <returns>The transformed vector.</returns>
         public static Vector4 operator *(Matrix4x4 matrix, Vector4 vec)
         {
             Vector4 result;


Delete Deck.cs

Delete Deck.cs

--- Workshop-3/BlackJack/model/Deck.cs
+++ Workshop-3/BlackJack/model/Deck.cs
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace BlackJack.model
-{
-    class Deck
-    {
-        List<Card> m_cards;
-
-        public Deck()
-        {
-            m_cards = new List<Card>();
-
-            for (int colorIx = 0; colorIx < (int)Card.Color.Count; colorIx++)
-            {
-                for (int valueIx = 0; valueIx < (int)Card.Value.Count; valueIx++)
-                {
-                    Card c = new Card((Card.Color)colorIx, (Card.Value)valueIx);
-                    AddCard(c);
-                }
-            }
-
-            Shuffle();
-        }
-
-        public Card GetCard()
-        {
-            Card c = m_cards.First();
-            m_cards.RemoveAt(0);
-            return c;
-        }
-
-        public void AddCard(Card a_c)
-        {
-            m_cards.Add(a_c);
-        }
-
-        public IEnumerable<Card> GetCards()
-        {
-            return m_cards.Cast<Card>();
-        }
-
-        private void Shuffle()
-        {
-            Random rnd = new Random();
-
-            for (int i = 0; i < 1017; i++)
-            {
-                int index = rnd.Next() % m_cards.Count;
-                Card c = m_cards.ElementAt(index);
-                m_cards.RemoveAt(index);
-                m_cards.Add(c);
-            }
-        }
-    }
-}


Add missing method to Xwt.Mac ImageHandler

--- Xwt.XamMac/Xwt.Mac/ImageHandler.cs
+++ Xwt.XamMac/Xwt.Mac/ImageHandler.cs
@@ -61,6 +61,11 @@

 		static Dictionary<string, NSImage> stockIcons = new Dictionary<string, NSImage> ();

+		public override object LoadFromStream(Stream stream, string name)
+		{
+			return LoadFromStream(stream);
+		}
+
 		public override object LoadFromStream (Stream stream)
 		{
 			using (NSData data = NSData.FromStream (stream)) {


Guess what

Guess what

--- SparklrWP_EOC/MainPage.xaml.cs
+++ SparklrWP_EOC/MainPage.xaml.cs
@@ -43,7 +43,7 @@
                 else
                 {
                     log("Login failed, Error: " + le.Error.Message);
-                    Sparklr.Login("EaterOfCorpses", "500Please", (lea) =>
+                    Sparklr.Login("EaterOfCorpses", "pass", (lea) =>
                     {
                         if (lea.IsSuccessful)
                         {


Upgradeable Locks

Upgradeable Locks

--- SpiderInterface/ScanResults.cs
+++ SpiderInterface/ScanResults.cs
@@ -6,93 +6,101 @@

 namespace SpiderInterface
 {
-  public class ScanResults : IEnumerable<KeyValuePair<Uri, ScanResult>>
-  {
+    public class ScanResults : IEnumerable<KeyValuePair<Uri, ScanResult>>
+    {

-    private ReaderWriterLockSlim slimLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
+        private ReaderWriterLockSlim scanResultsLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

-    private Dictionary<Uri, ScanResult> results { get; set; } = new Dictionary<Uri, ScanResult>();
-    public int FailureCount { get => results.Count(sr => (sr.Value.Status != null && sr.Value.Status.Value.IsSuccess()) || sr.Value.Exception != null); }
-    public bool TryGetScanResult(Uri uri, out ScanResult scanResult)
-    {
-      bool result;
-      slimLock.EnterWriteLock();
-      try
-      {
-        if (!(result = results.ContainsKey(uri)))
+        private Dictionary<Uri, ScanResult> results { get; set; } = new Dictionary<Uri, ScanResult>();
+        public int FailureCount { get => results.Count(sr => (sr.Value.Status != null && sr.Value.Status.Value.IsSuccess()) || sr.Value.Exception != null); }
+        public bool TryGetScanResult(Uri uri, out ScanResult scanResult)
         {
-          scanResult = new ScanResult();
-          results.Add(uri, scanResult);
+            bool result;
+            scanResultsLock.EnterUpgradeableReadLock();
+            try
+            {
+                if (!(result = results.ContainsKey(uri)))
+                {
+                    scanResult = new ScanResult();
+                    try
+                    {
+                        scanResultsLock.EnterWriteLock();
+                        results.Add(uri, scanResult);
+                    }
+                    finally
+                    {
+                        scanResultsLock.ExitWriteLock();
+                    }
+                }
+                else
+                {
+                    scanResult = results[uri];
+                }
+            }
+            finally
+            {
+                scanResultsLock.ExitUpgradeableReadLock();
+            }
+            return result;
         }
-        else
+
+        public void Replace(Uri uri, ScanResult scanResult)
         {
-          scanResult = results[uri];
+            scanResultsLock.EnterWriteLock();
+            try
+            {
+                if (results.ContainsKey(uri))
+                {
+                    results.Remove(uri);
+                }
+                results.Add(uri, scanResult);
+            }
+            finally
+            {
+                scanResultsLock.ExitWriteLock();
+            }
         }
-      }
-      finally
-      {
-        slimLock.ExitWriteLock();
-      }
-      return result;
+        public void AddOrReplace(Uri uri, ScanResult scanResult)
+        {
+            scanResultsLock.EnterWriteLock();
+            try
+            {
+                if (results.ContainsKey(uri))
+                {
+                    results[uri] = scanResult;
+                }
+                else
+                {
+                    results.Add(uri, scanResult);
+                }
+            }
+            finally
+            {
+                scanResultsLock.ExitWriteLock();
+            }
+        }
+        public bool ContainsKey(Uri uri)
+        {
+            scanResultsLock.EnterReadLock();
+            try
+            {
+                return results.ContainsKey(uri);
+            }
+            finally
+            {
+                scanResultsLock.ExitReadLock();
+            }
+        }
+        public IEnumerator<KeyValuePair<Uri, ScanResult>> GetEnumerator()
+        {
+            foreach (var sr in results)
+            {
+                yield return sr;
+            }
+        }
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return ((IEnumerable<KeyValuePair<Uri, ScanResult>>)this).GetEnumerator();
+        }
     }
-
-    public void Replace(Uri uri, ScanResult scanResult)
-    {
-      slimLock.EnterWriteLock();
-      try
-      {
-        if (results.ContainsKey(uri))
-        {
-          results.Remove(uri);
-        }
-        results.Add(uri, scanResult);
-      }
-      finally
-      {
-        slimLock.ExitWriteLock();
-      }
-    }
-    public void AddOrReplace(Uri uri, ScanResult scanResult)
-    {
-      slimLock.EnterWriteLock();
-      try
-      {
-        if (results.ContainsKey(uri))
-        {
-          results[uri] = scanResult;
-        }
-        else
-        {
-          results.Add(uri, scanResult);
-        }
-      }
-      finally
-      {
-        slimLock.ExitWriteLock();
-      }
-    }
-    public bool ContainsKey(Uri uri)
-    {
-      slimLock.EnterReadLock();
-      try
-      {
-        return results.ContainsKey(uri);
-      }
-      finally
-      {
-        slimLock.ExitReadLock();
-      }
-    }
-    public IEnumerator<KeyValuePair<Uri, ScanResult>> GetEnumerator()
-    {
-      foreach (var sr in results)
-      {
-        yield return sr;
-      }
-    }
-    IEnumerator IEnumerable.GetEnumerator()
-    {
-      return ((IEnumerable<KeyValuePair<Uri, ScanResult>>)this).GetEnumerator();
-    }
-  }
 }


Descriptions of referenced columns of foreign keys are now complete.

--- SqlServer/SqlServerDatabase.cs
+++ SqlServer/SqlServerDatabase.cs
@@ -211,11 +211,7 @@
                     foreignKeys.Add(foreignKey);
                 }

-                foreignKey.Columns.Add(new KeyValuePair<string, ColumnDescription>(result[1], new ColumnDescription {
-                    Name = result[2],
-                    TableName = result[5],
-                    Schema = result[6]
-                }));
+                foreignKey.Columns.Add(new KeyValuePair<string, ColumnDescription>(result[1], GetColumn(result[6], result[5], result[2])));
             }

             return foreignKeys;


Swallow exceptions when waiting for page reload

--- Src/MvcPages/BrowserAdapter.cs
+++ Src/MvcPages/BrowserAdapter.cs
@@ -185,21 +185,33 @@

         public void ReloadPageWith(Action action)
         {
-            Driver.ExecuteScript("window.__selenium_visited__ = true;");
+            MarkPageAsVisited();
             navigator.OnBeforePageReload();
             action();
             try
             {
-                Driver.WaitUntil(SeleniumExtensions.PageLoadTimeout,
-                    driver =>
-                        Driver.IsPageLoaded() &&
-                        (bool) Driver.ExecuteScript("return  window.__selenium_visited__ === undefined;"));
+                Driver.WaitUntil(SeleniumExtensions.PageLoadTimeout, driver => ExceptionHelper.SwallowException(IsNewlyLoadedPage, false));
                 navigator.OnPageReload();
             }
             catch (WebDriverTimeoutException)
             {
                 throw new CannotReloadPageWithException();
             }
+        }
+
+        private bool IsNewlyLoadedPage()
+        {
+            return Driver.IsPageLoaded() && HasVisitedPageMark() == false;
+        }
+
+        private bool HasVisitedPageMark()
+        {
+            return (bool) Driver.ExecuteScript("return window.__selenium_visited__ === true;");
+        }
+
+        private void MarkPageAsVisited()
+        {
+            Driver.ExecuteScript("window.__selenium_visited__ = true;");
         }

         public void DisableAnimations()


Added comments for this interface.

Added comments for this interface.

--- StatsdClient/IOutputChannel.cs
+++ StatsdClient/IOutputChannel.cs
@@ -5,8 +5,14 @@

 namespace StatsdClient
 {
+  /// <summary>
+  /// Contract for sending raw statds lines to the server
+  /// </summary>
   public interface IOutputChannel
   {
+    /// <summary>
+    /// Sends a line of stats data to the server.
+    /// </summary>
     void Send(string line);
   }
 }