Removed "Raw" trials.

Removed "Raw" trials.

--- MoviePicker.WebApp/Views/Home/SharePicks.cshtml
+++ MoviePicker.WebApp/Views/Home/SharePicks.cshtml
@@ -42,11 +42,6 @@

Preview Tweet:

-			@*
-				@ViewBag.TwitterTweetText
-				@ViewBag.TwitterTweetText.Replace("%0a", "
")
-				@DisplayTweet(ViewBag.TwitterTweetText).ToHtmlString()
-			*@
 			@Html.Raw(ViewBag.TwitterTweetText.Replace("%0a", "
"))


Filter users by group

Filter users by group

--- redmine-net40-api/RedmineManager.cs
+++ redmine-net40-api/RedmineManager.cs
@@ -191,7 +191,7 @@

             if (!string.IsNullOrWhiteSpace(name)) filters.Add("name", name);

-            if (groupId > 0) filters.Add("groupId", groupId.ToString(CultureInfo.InvariantCulture));
+            if (groupId > 0) filters.Add("group_id", groupId.ToString(CultureInfo.InvariantCulture));

             return GetTotalObjectList<User>(filters);
         }


Adding some getters

Adding some getters

--- relmah/src/RElmah/Models/Cluster.cs
+++ relmah/src/RElmah/Models/Cluster.cs
@@ -91,6 +91,16 @@
         public IEnumerable<Application> Applications { get { return _applications.Values; } }
         public IEnumerable<User> Users { get { return _users.Values; } }

+        public Application GetApplication(string name)
+        {
+            return _applications[name];
+        }
+
+        public User GetUser(string name)
+        {
+            return _users[name];
+        }
+
         public Cluster AddApplication(Application app)
         {
             return new Cluster(Name, _applications.Add(app.Name, app), _users);


Override TestCase ToString method to display user friendly test case name.

--- Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
+++ Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
@@ -189,6 +189,11 @@
                 // Assert
                 Assert.Equal(this.url, url);
             }
+
+            public override string ToString()
+            {
+                return string.Format("{0} {1}", typeof(T).Name, this.expression);
+            }
         }
     }
 }


Reformat with https://github.com/prime31/Nez/blob/master/Nez.VisualStudio.Policy.vssettings

--- Nez.Portable/ECS/Components/Renderables/Mesh.cs
+++ Nez.Portable/ECS/Components/Renderables/Mesh.cs
@@ -204,9 +204,9 @@
 		/// </summary>
 		/// <param name="primitiveType">The ordering of the verticies.</param>
 		/// <returns>The mesh.</returns>
-		public Mesh setPrimitiveType(PrimitiveType primitiveType)
-		{
-			Assert.isTrue(primitiveType == PrimitiveType.TriangleList || primitiveType == PrimitiveType.TriangleStrip, "Only triangles are supported.");
+		public Mesh setPrimitiveType( PrimitiveType primitiveType )
+		{
+			Assert.isTrue( primitiveType == PrimitiveType.TriangleList || primitiveType == PrimitiveType.TriangleStrip, "Only triangles are supported." );
 			_primitiveType = primitiveType;
 			return this;
 		}
@@ -244,13 +244,13 @@
 			_basicEffect.World = entity.transform.localToWorldTransform;
 			_basicEffect.CurrentTechnique.Passes[0].Apply();

-			if (_primitiveType == PrimitiveType.TriangleList)
-			{
-				Core.graphicsDevice.DrawUserIndexedPrimitives(_primitiveType, _verts, 0, _verts.Length, _triangles, 0, _primitiveCount);
-			}
-			else if (_primitiveType == PrimitiveType.TriangleStrip)
-			{
-				Core.graphicsDevice.DrawUserPrimitives(_primitiveType, _verts, 0, _verts.Length - 2);
+			if( _primitiveType == PrimitiveType.TriangleList )
+			{
+				Core.graphicsDevice.DrawUserIndexedPrimitives( _primitiveType, _verts, 0, _verts.Length, _triangles, 0, _primitiveCount );
+			}
+			else if( _primitiveType == PrimitiveType.TriangleStrip )
+			{
+				Core.graphicsDevice.DrawUserPrimitives( _primitiveType, _verts, 0, _verts.Length - 2 );
 			}
 		}


SetAndRemove: New method for testing the remove config key functionality.

--- Nini/Source/Test/Config/IniConfigSourceTests.cs
+++ Nini/Source/Test/Config/IniConfigSourceTests.cs
@@ -320,5 +320,31 @@

 			File.Delete  (fileName);
 		}
+
+		[Test]
+		public void SetAndRemove ()
+		{
+			StringWriter writer = new StringWriter ();
+			writer.WriteLine ("[Pets]");
+			writer.WriteLine (" cat = muffy");
+			writer.WriteLine (" dog = rover");
+			writer.WriteLine (" bird = tweety");
+			IniConfigSource source = new IniConfigSource
+									(new StringReader (writer.ToString ()));
+
+			IConfig config = source.Configs["Pets"];
+			Assert.AreEqual ("Pets", config.Name);
+			Assert.AreEqual (3, config.GetKeys ().Length);
+
+			config.Set ("snake", "cobra");
+			Assert.AreEqual (4, config.GetKeys ().Length);
+
+			// Test removing
+			Assert.IsNotNull (config.Get ("dog"));
+			config.Remove ("dog");
+			Assert.AreEqual (3, config.GetKeys ().Length);
+			Assert.IsNull (config.Get ("dog"));
+			Assert.IsNotNull (config.Get ("snake"));
+		}
 	}
 }


Show remaining chars, not written chars. This fixes #13

--- Ocell.WindowsPhone/Ocell/Pages/NewTweetModel.cs
+++ Ocell.WindowsPhone/Ocell/Pages/NewTweetModel.cs
@@ -243,7 +243,7 @@
                 if (url.Length > ShortUrlLength)
                     txtLen -= url.Length - ShortUrlLength;

-            RemainingChars = txtLen;
+            RemainingChars = 140 - txtLen;

             if (RemainingChars >= 0)
             {


Speculative fix for crash with buffer viewer being closed early.

* I received a few crash reports with a disposed buffer viewer still
  doing work. My theory is that some operation took long enough that the
  user was able to close the viewer (perhaps *because* it was taking a
  long time) and subsequent work then didn't handle the window having
  been closed.

--- renderdocui/Windows/BufferViewer.cs
+++ renderdocui/Windows/BufferViewer.cs
@@ -1553,6 +1553,11 @@
         {
             var state = GetUIState(type);

+            var bufView = state.m_GridView;
+
+            if(bufView.IsDisposed)
+                return;
+
             // only do this once, VSIn is guaranteed to be set (even if it's empty data)
             if(type == MeshDataStage.VSIn)
                 CalcCellFloatWidth();
@@ -1561,8 +1566,6 @@

             if(data.Buffers == null)
                 return;
-
-            var bufView = state.m_GridView;

             bufView.RowCount = 0;
             state.m_Data = data;


First stab at tests for reading Flex private use language tags from ldml

--- Palaso.Tests/WritingSystems/LdmlAdaptorTests.cs
+++ Palaso.Tests/WritingSystems/LdmlAdaptorTests.cs
@@ -5,6 +5,7 @@
 using Palaso.IO;
 using Palaso.TestUtilities;
 using Palaso.WritingSystems;
+using Palaso.WritingSystems.Migration.WritingSystemsLdmlV0To1Migration;
 using Palaso.Xml;

 namespace Palaso.Tests.WritingSystems
@@ -100,15 +101,15 @@
 		[Test]
 		public void RoundtripSimpleCustomSortRules_WS33715()
 		{
-			LdmlAdaptor ldmlAdaptor = new LdmlAdaptor();
-
-			string sortRules = "(A̍ a̍)";
-			WritingSystemDefinition wsWithSimpleCustomSortRules = new WritingSystemDefinition();
+			var ldmlAdaptor = new LdmlAdaptor();
+
+			const string sortRules = "(A̍ a̍)";
+			var wsWithSimpleCustomSortRules = new WritingSystemDefinition();
 			wsWithSimpleCustomSortRules.SortUsing = WritingSystemDefinition.SortRulesType.CustomSimple;
 			wsWithSimpleCustomSortRules.SortRules = sortRules;

-			WritingSystemDefinition wsFromLdml = new WritingSystemDefinition();
-			using (TempFile tempFile = new TempFile())
+			var wsFromLdml = new WritingSystemDefinition();
+			using (var tempFile = new TempFile())
 			{
 				ldmlAdaptor.Write(tempFile.Path, wsWithSimpleCustomSortRules, null);
 				ldmlAdaptor.Read(tempFile.Path, wsFromLdml);
@@ -122,10 +123,8 @@
 		//WS-33992
 		public void Read_LdmlContainsEmptyCollationElement_SortUsingIsSetToSameAsIfNoCollationElementExisted()
 		{
-			string ldmlWithEmptyCollationElement =
-				"<ldml><!--Comment--><identity><version number=\"\" /><generation date=\"0001-01-01T00:00:00\" /><language type=\"qaa\" /></identity><dates /><collations><collation></collation></collations><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";
-			string ldmlwithNoCollationElement =
-				"<ldml><!--Comment--><identity><version number=\"\" /><generation date=\"0001-01-01T00:00:00\" /><language type=\"qaa\" /></identity><dates /><collations/><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";
+			const string ldmlWithEmptyCollationElement = "<ldml><!--Comment--><identity><version number=\"\" /><generation date=\"0001-01-01T00:00:00\" /><language type=\"qaa\" /></identity><dates /><collations><collation></collation></collations><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";
+			const string ldmlwithNoCollationElement = "<ldml><!--Comment--><identity><version number=\"\" /><generation date=\"0001-01-01T00:00:00\" /><language type=\"qaa\" /></identity><dates /><collations/><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";

 			string pathToLdmlWithEmptyCollationElement = Path.GetTempFileName();
 			File.WriteAllText(pathToLdmlWithEmptyCollationElement, ldmlWithEmptyCollationElement);
@@ -146,8 +145,7 @@
 		[Test]
 		public void Read_LdmlContainsOnlyPrivateUse_IsoAndprivateUseSetCorrectly()
 		{
-			string ldmlWithOnlyPrivateUse =
-				"<ldml><identity><version number=\"\" /><language type=\"\" /><variant type=\"x-private-use\" /></identity><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";
+			const string ldmlWithOnlyPrivateUse = "<ldml><identity><version number=\"\" /><language type=\"\" /><variant type=\"x-private-use\" /></identity><special xmlns:palaso=\"urn://palaso.org/ldmlExtensions/v1\" ><palaso:version value=\"1\" /></special></ldml>";

 			string pathToLdmlWithEmptyCollationElement = Path.GetTempFileName();
@@ -156,8 +154,8 @@
 			var adaptor = new LdmlAdaptor();
 			var wsFromLdml = new WritingSystemDefinition();
 			adaptor.Read(pathToLdmlWithEmptyCollationElement, wsFromLdml);
-			var Ldml = new WritingSystemDefinition();
-			adaptor.Read(pathToLdmlWithEmptyCollationElement, Ldml);
+			var ws = new WritingSystemDefinition();
+			adaptor.Read(pathToLdmlWithEmptyCollationElement, ws);
 			Assert.That(wsFromLdml.ISO639, Is.EqualTo(String.Empty));
 			Assert.That(wsFromLdml.Variant, Is.EqualTo("x-private-use"));
 		}
@@ -231,6 +229,303 @@
 			}
 		}

-
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatOnlyLanguageIsPopulated_WritingSystemHasDataInPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "", "", "", "x-en");
+			}
+		}
+
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatLanguageAndScriptArePopulated_PrivateUseLanguageMovedToPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "Zxxx", "", "", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "Zxxx", "", "x-en");
+			}
+		}
+
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatLanguageAndTerritoryArePopulated_PrivateUseLanguageMovedToPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "US", "", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "US", "x-en-audio");
+			}
+		}
+
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatLanguageAndVariantArePopulated_PrivateUseLanguageMovedToPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "fonipa", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "", "fonipa-x-en");
+			}
+		}
+
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatAllFieldsArePopulated_PrivateUseLanguageMovedToPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "Zxxx", "US", "1901-x-audio", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "Zxxx", "US", "1901-x-en-audio");
+			}
+		}
+
+		[Test]
+		public void Read_LdmlIsFlexPrivateUseFormatLanguageAndPrivateUseIsPopulated_LanguageTagIsMovedAndIsFirstInPrivateUse()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "x-private", file);
+				var ws = new WritingSystemDefinition();
+				new LdmlAdaptor().Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "", "x-en-private");
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_LanguageIsPopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "", "", "", "x-en");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_LanguageAndScriptPopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "Zxxx", "", "", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "Zxxx", "", "x-en");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_LanguageAndTerritoryPopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "US", "", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "US", "x-en");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_LanguageAndVariantPopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "fonipa", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "", "fonipa-x-en");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_AllFieldsPopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "Zxxx", "US", "1901-x-audio", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "Zxxx", "US", "1901-x-en-audio");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void RoundTripFlexPrivateUseWritingSystem_LanguageAndPrivateUsePopulated()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "x-private", file);
+				var ws = new WritingSystemDefinition();
+				string originalLdml = File.ReadAllText(file.Path);
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "", "", "", "x-en-private");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				Assert.That(File.ReadAllText(file.Path), Is.EqualTo(originalLdml));
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedLanguage_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "", "", "", "x-en");
+				ws.ISO639 = "de";
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("de", "", "", "x-en", file);
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedScript_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "Zxxx", "", "", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "Zxxx", "", "x-en");
+				ws.Script = "Latn";
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("qaa", "latn", "", "x-en", file);
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedRegion_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "US", "", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "US", "x-en");
+				ws.Region = "UK";
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("qaa", "", "UK", "x-en", file);
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedVariant_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "fonipa", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "qaa", "", "", "fonipa-x-en");
+				ws.Variant = "1901";
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("qaa", "", "", "1901-x-en", file);
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedPrivateUse_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "x-private", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(ws, "", "", "", "x-en-private");
+				ws.Variant = "x-en-private";
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("qaa", "", "", "x-en-private", file);
+			}
+		}
+
+		[Test]
+		public void Write_OriginalWasFlexPrivateUseWritingSystemButNowChangedPrivateUseandDeletedLanguage_IdentityElementChangedToPalasoWay()
+		{
+			using (var file = new TempFile())
+			{
+				WriteFlexLdml("x-en", "", "", "x-private", file);
+				var ws = new WritingSystemDefinition();
+				var adaptor = new LdmlAdaptor();
+				adaptor.Read(file.Path, ws);
+				ws.SetAllRfc5646LanguageTagComponents("", "", "", "x-en-private");
+				adaptor.Write(file.Path, ws, new MemoryStream(File.ReadAllBytes(file.Path)));
+				AssertThatLdmlMatches("", "", "", "x-en-private", file);
+			}
+		}
+
+		private static void AssertThatRfcTagComponentsOnWritingSystemAreEqualTo(WritingSystemDefinition ws, string language, string script, string territory, string variant)
+		{
+			Assert.That(ws.ISO639, Is.EqualTo(language));
+			Assert.That(ws.Script, Is.EqualTo(script));
+			Assert.That(ws.Region, Is.EqualTo(territory));
+			Assert.That(ws.Variant, Is.EqualTo(variant));
+		}
+
+		private static void WriteFlexLdml(string language, string script, string territory, string variant, TempFile file)
+		{
+			//using a writing system V0 here because the real writing system can't cope with the way
+			//flex encodes private-use language and shouldn't. But using a writing system + ldml adaptor
+			//is the quickest way to generate ldml so I'm using it here.
+			var ws = new WritingSystemDefinitionV0
+						 {ISO639 = language, Script = script, Region = territory, Variant = variant};
+			new LdmlAdaptorV0().Write(file.Path, ws, null);
+		}
+
+		private void AssertThatLdmlMatches(string language, string script, string territory, string variant, TempFile file)
+		{
+			AssertthatIdentityElementisCorrectForContent("language", language, file);
+			AssertthatIdentityElementisCorrectForContent("script", script, file);
+			AssertthatIdentityElementisCorrectForContent("territory", territory, file);
+			AssertthatIdentityElementisCorrectForContent("variant", variant, file);
+		}
+
+		private void AssertthatIdentityElementisCorrectForContent(string element, string content, TempFile file)
+		{
+			if (String.IsNullOrEmpty(content))
+			{
+				AssertThatXmlIn.File(file.Path).HasNoMatchForXpath(String.Format("/ldml/identity/{0}", element));
+				return;
+			}
+			AssertThatXmlIn.File(file.Path).HasAtLeastOneMatchForXpath(String.Format("/ldml/identity/{0}[type='{1}'", element, content));
+		}
 	}
 }


Formating Changes + plus delete unused var

--- PalasoUIWindowsForms/Keyboarding/IBusAdaptor.cs
+++ PalasoUIWindowsForms/Keyboarding/IBusAdaptor.cs
@@ -29,7 +29,8 @@
 			// could check $DISPLAY to see if we are running not on display 0 or not.

 			string directory = System.Environment.GetEnvironmentVariable ("XDG_CONFIG_HOME");
-			if (String.IsNullOrEmpty (directory)) {
+			if (String.IsNullOrEmpty (directory))
+			{
 				directory = System.Environment.GetEnvironmentVariable ("HOME");

 				if (String.IsNullOrEmpty (directory))
@@ -50,7 +51,8 @@
 			// so look for first number after :

 			string display = System.Environment.GetEnvironmentVariable ("DISPLAY");
-			if (display != String.Empty) {
+			if (display != String.Empty)
+			{
 				int start = display.IndexOf (':');
 				int end = display.IndexOf ('.');
 				if (start > 0 && end > 0)
@@ -78,10 +80,12 @@

 			StreamReader s = new StreamReader (filename);
 			string line = String.Empty;
-			while (line != null) {
+			while (line != null)
+			{
 				line = s.ReadLine ();

-				if (line.Contains (IBUS_ADDRESS)) {
+				if (line.Contains (IBUS_ADDRESS))
+				{
 					string[] toks = line.Split ("=".ToCharArray (), 2);
 					if (toks.Length != 2 || toks[1] == String.Empty)
 						throw new Exception (String.Format ("IBUS config file : {0} not as expected for line {1}. Expected IBUS_ADDRESS='some socket'", filename, line));
@@ -122,7 +126,8 @@
 		/// <summary>
 		/// Allow Access to the underlying org.freedesktop.IBus.IIBus
 		/// </summary>
-		public org.freedesktop.IBus.IIBus InputBus {
+		public org.freedesktop.IBus.IIBus InputBus
+		{
 			get { return _inputBus; }
 		}
 		/// <summary>
@@ -153,16 +158,14 @@
 		/// <summary>
 		/// Allow Access to the underlying org.freedesktop.IBus.IIBus
 		/// </summary>
-		public org.freedesktop.IBus.InputContext InputContext {
+		public org.freedesktop.IBus.InputContext InputContext
+		{
 			get { return _inputContext; }
 		}
 	}

 	internal class IBusAdaptor
 	{
-		// delme quickest way to get unit tests to work
-		static string _activeKeyboard;
-
 		static NDesk.DBus.Connection _connection = null;

 		/// <summary>
@@ -179,7 +182,8 @@
 		/// </summary>
 		public static void CloseConnection ()
 		{
-			if (_connection != null) {
+			if (_connection != null)
+			{
 				_connection.Close ();
 				_connection = null;
 			}
@@ -189,15 +193,15 @@
 		{
 			EnsureConnection ();

-			IBus ibus = new IBus(_connection);
-			string inputContextPath = ibus.GetFocusedInputContextPath();
-
-			IBusInputContext inputContextBus = new IBusInputContext(_connection, inputContextPath);
-
-			if (!HasKeyboardNamed(name))
+			IBus ibus = new IBus (_connection);
+			string inputContextPath = ibus.GetFocusedInputContextPath ();
+
+			IBusInputContext inputContextBus = new IBusInputContext (_connection, inputContextPath);
+
+			if (!HasKeyboardNamed (name))
 				throw new Palaso.Reporting.ErrorReport.ProblemNotificationSentToUserException ("Keyboard doesn't exist");

-			inputContextBus.InputContext.SetEngine(name);
+			inputContextBus.InputContext.SetEngine (name);
 		}

 		/// <summary>
@@ -209,7 +213,8 @@

 			IBus ibus = new IBus (_connection);
 			object[] engines = ibus.InputBus.ListActiveEngines ();
-			for (int i = 0; i < (engines).Length; ++i) {
+			for (int i = 0; i < (engines).Length; ++i)
+			{
 				IBusEngineDesc engineDesc = (IBusEngineDesc)Convert.ChangeType (engines[i], typeof(IBusEngineDesc));
 				var v = new KeyboardController.KeyboardDescriptor ();
 				v.Id = engineDesc.name;
@@ -221,21 +226,23 @@

 		}

-		public static IEnumerable<KeyboardController.KeyboardDescriptor> KeyboardDescriptors {
+		public static IEnumerable<KeyboardController.KeyboardDescriptor> KeyboardDescriptors
+		{
 			get { return GetKeyboardDescriptors (); }
 		}

-		public static bool EngineAvailable {
-			get {
-					try
-					{
-						EnsureConnection ();
-						return (_connection != null);
-					}
-					catch
-					{
-						return false;
-					}
+		public static bool EngineAvailable
+		{
+			get
+			{
+				try
+				{
+					EnsureConnection ();
+					return (_connection != null);
+				} catch
+				{
+					return false;
+				}
 			}
 		}

@@ -243,18 +250,18 @@
 		{
 			EnsureConnection ();

-			IBus ibus = new IBus(_connection);
-			string inputContextPath = ibus.GetFocusedInputContextPath();
-
-			IBusInputContext inputContextBus = new IBusInputContext(_connection, inputContextPath);
-			inputContextBus.InputContext.Reset();
+			IBus ibus = new IBus (_connection);
+			string inputContextPath = ibus.GetFocusedInputContextPath ();
+
+			IBusInputContext inputContextBus = new IBusInputContext (_connection, inputContextPath);
+			inputContextBus.InputContext.Reset ();
 		}

 		public static bool HasKeyboardNamed (string name)
 		{
-			foreach(KeyboardController.KeyboardDescriptor d in GetKeyboardDescriptors())
-			{
-				if (d.Name.Equals(name))
+			foreach (KeyboardController.KeyboardDescriptor d in GetKeyboardDescriptors ())
+			{
+				if (d.Name.Equals (name))
 					return true;
 			}

@@ -265,22 +272,21 @@
 		{
 			EnsureConnection ();

-			IBus ibus = new IBus(_connection);
+			IBus ibus = new IBus (_connection);
 			try
 			{
-				string inputContextPath = ibus.GetFocusedInputContextPath();
-
-				IBusInputContext inputContextBus = new IBusInputContext(_connection, inputContextPath);
-				object engine = inputContextBus.InputContext.GetEngine();
+				string inputContextPath = ibus.GetFocusedInputContextPath ();
+
+				IBusInputContext inputContextBus = new IBusInputContext (_connection, inputContextPath);
+				object engine = inputContextBus.InputContext.GetEngine ();
 				if (engine == null)
-					throw new Exception("Focused Input Context doesn't have an active Keyboard/Engine");
+					throw new Exception ("Focused Input Context doesn't have an active Keyboard/Engine");

 				IBusEngineDesc engineDesc = (IBusEngineDesc)Convert.ChangeType (engine, typeof(IBusEngineDesc));
 				return engineDesc.longname;
-			}
-			catch(Exception e)
-			{
-				throw new Palaso.Reporting.ErrorReport.ProblemNotificationSentToUserException(e.Message);
+			} catch (Exception e)
+			{
+				throw new Palaso.Reporting.ErrorReport.ProblemNotificationSentToUserException (e.Message);
 			}
 		}
 	}


Added tests for the WrapInner method

Added tests for the WrapInner method

--- AngleSharp.Core.Tests/Library/DOMExtensions.cs
+++ AngleSharp.Core.Tests/Library/DOMExtensions.cs
@@ -179,6 +179,65 @@
         }

         [Test]
+        public void ExtensionWrapInnerWithSimpleElements()
+        {
+            var document = DocumentBuilder.Html(@"

+
Hello

+
Goodbye

+
");
+            var container = document.QuerySelector(".container");
+            Assert.AreEqual(2, container.ChildElementCount);
+            var inner = document.QuerySelectorAll(".inner");
+            inner.WrapInner("

");
+            Assert.AreEqual(2, container.ChildElementCount);
+            Assert.AreEqual("div", container.Children[0].NodeName);
+            Assert.AreEqual("inner", container.Children[0].ClassName);
+            Assert.AreEqual(1, container.Children[0].ChildElementCount);
+            Assert.AreEqual("div", container.Children[0].FirstElementChild.NodeName);
+            Assert.AreEqual("new", container.Children[0].FirstElementChild.ClassName);
+            Assert.AreEqual("Hello", container.Children[0].FirstElementChild.TextContent);
+            Assert.AreEqual("div", container.Children[1].NodeName);
+            Assert.AreEqual("inner", container.Children[1].ClassName);
+            Assert.AreEqual(1, container.Children[1].ChildElementCount);
+            Assert.AreEqual("div", container.Children[1].FirstElementChild.NodeName);
+            Assert.AreEqual("new", container.Children[1].FirstElementChild.ClassName);
+            Assert.AreEqual("Goodbye", container.Children[1].FirstElementChild.TextContent);
+        }
+
+        [Test]
+        public void ExtensionWrapInnerWithSimpleText()
+        {
+            var document = DocumentBuilder.Html(@"
Hello

+
cruel

+
World
");
+            var body = document.Body;
+            Assert.AreEqual(3, body.ChildElementCount);
+            var p = document.QuerySelectorAll("p");
+            Assert.AreEqual("p", body.Children[0].NodeName);
+            Assert.AreEqual("p", body.Children[1].NodeName);
+            Assert.AreEqual("p", body.Children[2].NodeName);
+            p.WrapInner("");
+            Assert.AreEqual(3, body.ChildElementCount);
+
+            Assert.AreEqual("p", body.Children[0].NodeName);
+            Assert.AreEqual(1, body.Children[0].ChildElementCount);
+            Assert.AreEqual("p", body.Children[1].NodeName);
+            Assert.AreEqual(1, body.Children[1].ChildElementCount);
+            Assert.AreEqual("p", body.Children[2].NodeName);
+            Assert.AreEqual(1, body.Children[2].ChildElementCount);
+
+            Assert.AreEqual("b", body.Children[0].FirstElementChild.NodeName);
+            Assert.AreEqual(0, body.Children[0].FirstElementChild.ChildElementCount);
+            Assert.AreEqual("Hello", body.Children[0].FirstElementChild.TextContent);
+            Assert.AreEqual("b", body.Children[1].FirstElementChild.NodeName);
+            Assert.AreEqual(0, body.Children[1].FirstElementChild.ChildElementCount);
+            Assert.AreEqual("cruel", body.Children[1].FirstElementChild.TextContent);
+            Assert.AreEqual("b", body.Children[2].FirstElementChild.NodeName);
+            Assert.AreEqual(0, body.Children[2].FirstElementChild.ChildElementCount);
+            Assert.AreEqual("World", body.Children[2].FirstElementChild.TextContent);
+        }
+
+        [Test]
         public void ExtensionWrapAllWithSimpleElements()
         {
             var document = DocumentBuilder.Html(@"


Adding test of using Raise.Event<Action>() for Raise.Action().

--- Source/NSubstitute.Acceptance.Specs/EventRaising.cs
+++ Source/NSubstitute.Acceptance.Specs/EventRaising.cs
@@ -116,7 +116,7 @@
         }

         [Test]
-        public void Raise_event_declared_as_action()
+        public void Raise_event_declared_as_action_using_shortcut_syntax()
         {
             var wasStarted = false;
             var engine = Substitute.For<IEngine>();
@@ -124,6 +124,18 @@

             Assert.That(wasStarted, Is.False, "Why is this started before event was raised? Something has gone wrong!");
             engine.Started += Raise.Action();
+            Assert.That(wasStarted);
+        }
+
+        [Test]
+        public void Raise_event_declared_as_action()
+        {
+            var wasStarted = false;
+            var engine = Substitute.For<IEngine>();
+            engine.Started += () => wasStarted = true;
+
+            Assert.That(wasStarted, Is.False, "Why is this started before event was raised? Something has gone wrong!");
+            engine.Started += Raise.Event<Action>();
             Assert.That(wasStarted);
         }


Remove `timeout` parameter from `GetNextInput` method in navigable terminal emulator.

--- AntShell/Terminal/NavigableTerminalEmulator.cs
+++ AntShell/Terminal/NavigableTerminalEmulator.cs
@@ -160,11 +160,11 @@
 			}
 		}

-        public object GetNextInput(int timeout = -1)
+		public object GetNextInput()
 		{
 			while (true)
 			{
-                var b = InputOutput.GetNextChar(timeout);
+				var b = InputOutput.GetNextChar();
 				if (b == null)
 				{
 					return null;


Rename a little more.

Rename a little more.

--- Source/Pash.System.Management.Tests/AssemblyInfo.cs
+++ Source/Pash.System.Management.Tests/AssemblyInfo.cs
@@ -5,7 +5,7 @@
 // Information about this assembly is defined by the following attributes.
 // Change them to the values specific to your project.

-[assembly: AssemblyTitle("ParserTest")]
+[assembly: AssemblyTitle("Pash.System.Management.Tests")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Pash Contributors")]


#2 ios renderer for dynamic tabs

#2 ios renderer for dynamic tabs

--- Source/Plugin.Badge.iOS/BadgedTabbedPageRenderer.cs
+++ Source/Plugin.Badge.iOS/BadgedTabbedPageRenderer.cs
@@ -2,6 +2,7 @@
 using Xamarin.Forms;
 using Xamarin.Forms.Platform.iOS;
 using Xamarin.Forms.Internals;
+using System.Threading.Tasks;

 namespace Plugin.Badge.iOS
 {
@@ -26,13 +27,16 @@
             var element = Tabbed.Children[tabIndex];
             element.PropertyChanged += OnTabbedPagePropertyChanged;

-            var tabBarItem = TabBar.Items[tabIndex];
-            tabBarItem.BadgeValue = TabBadge.GetBadgeText(element);
+            if (TabBar.Items.Length > tabIndex)
+            {
+                var tabBarItem = TabBar.Items[tabIndex];
+                tabBarItem.BadgeValue = TabBadge.GetBadgeText(element);

-            var tabColor = TabBadge.GetBadgeColor(element);
-            if (tabColor != Color.Default)
-            {
-                tabBarItem.BadgeColor = tabColor.ToUIColor();
+                var tabColor = TabBadge.GetBadgeColor(element);
+                if (tabColor != Color.Default)
+                {
+                    tabBarItem.BadgeColor = tabColor.ToUIColor();
+                }
             }
         }

@@ -45,19 +49,23 @@
             if (e.PropertyName == TabBadge.BadgeTextProperty.PropertyName)
             {
                 var tabIndex = Tabbed.Children.IndexOf(page);
-                TabBar.Items[tabIndex].BadgeValue = TabBadge.GetBadgeText(page);
+                if(tabIndex < TabBar.Items.Length)
+                    TabBar.Items[tabIndex].BadgeValue = TabBadge.GetBadgeText(page);
                 return;
             }

             if (e.PropertyName == TabBadge.BadgeColorProperty.PropertyName)
             {
                 var tabIndex = Tabbed.Children.IndexOf(page);
-                TabBar.Items[tabIndex].BadgeColor = TabBadge.GetBadgeColor(page).ToUIColor();
+                if (tabIndex < TabBar.Items.Length)
+                    TabBar.Items[tabIndex].BadgeColor = TabBadge.GetBadgeColor(page).ToUIColor();
             }
         }

-        private void OnTabAdded(object sender, ElementEventArgs e)
+        private async void OnTabAdded(object sender, ElementEventArgs e)
         {
+            //workaround for XF, tabbar is not updated at this point and we have no way to know when its updated.
+            await Task.Delay(10);
             var page = e.Element as Page;
             if (page == null)
                 return;
@@ -79,7 +87,13 @@
                 {
                     tab.PropertyChanged -= OnTabbedPagePropertyChanged;
                 }
+
+                Tabbed.ChildAdded -= OnTabAdded;
+                Tabbed.ChildRemoved -= OnTabRemoved;
             }
+
+
+
             base.Dispose(disposing);
         }
     }


Fix world loading

Fix world loading

--- Sources/Hevadea/Game/Loading/Tasks/TaskLoadWorld.cs
+++ Sources/Hevadea/Game/Loading/Tasks/TaskLoadWorld.cs
@@ -27,18 +27,22 @@
                 SetStatus($"Loading level the '{levelName}'...");

                 var level = LoadLevel(levelName, game.GetLevelSavePath(levelName));
-
-                var task = new AsyncTask(() =>
-                {
-                    var fs = new FileStream(game.GetLevelMinimapSavePath(level), FileMode.Open);
-                    level.Map = Texture2D.FromStream(Rise.MonoGame.GraphicsDevice, fs);
-                    fs.Close();
-                });

-                Rise.AsyncTasks.Add(task);
-
-                while (!task.Done) { }
-
+                if (File.Exists(game.GetLevelMinimapSavePath(level)))
+                {
+                    var task = new AsyncTask(() =>
+                    {
+                        var fs = new FileStream(game.GetLevelMinimapSavePath(level), FileMode.Open);
+                        level.Map = Texture2D.FromStream(Rise.MonoGame.GraphicsDevice, fs);
+                        fs.Close();
+                    });
+
+                    Rise.AsyncTasks.Add(task);
+
+                    while (!task.Done) { }
+                }
+
+
                 world.Levels.Add(level);

             }


Use Dictionary for storing storypoints

Use Dictionary for storing storypoints

Much optimized, such wow

--- Assets/Scripts/Controllers/CanvasController.cs
+++ Assets/Scripts/Controllers/CanvasController.cs
@@ -1,11 +1,12 @@
 using UnityEngine;
 using System.Collections;
+using System.Collections.Generic;
 using UnityEngine.SceneManagement;

 public class CanvasController : MonoBehaviour
 {

-    GameObject[] storypoints;
+    Dictionary<string, GameObject> storypoints;
     string activeCanvasID;
     private GameObject player;
     void Awake()
@@ -20,7 +21,6 @@

 	void Init()
 	{
-
 		player = GameObject.FindWithTag("Player");
 	}

@@ -53,11 +53,14 @@
     {
         if(scene.name == "storyline" && mode == LoadSceneMode.Additive)
         {
-            storypoints = GameObject.FindGameObjectsWithTag("StoryPoint");
-            for (int i = 0; i < storypoints.Length; ++i)
+            storypoints = new Dictionary<string, GameObject>();
+            GameObject[] objs = GameObject.FindGameObjectsWithTag("StoryPoint");
+            for (int i = 0; i < objs.Length; ++i)
             {
-                Debug.Log("Setting storypoint" + i + " inactive");
-                storypoints[i].SetActive(false);
+                GameObject o = objs[i];
+                Debug.Log("Setting storypoint" + o.name + " inactive");
+                o.SetActive(false);
+                storypoints.Add(o.name, o);
             }
         }
     }
@@ -65,24 +68,12 @@
     public void ActivateStorypoint(string name)
     {
         Debug.Log("Activating storypoint " + name);
-        for(int i = 0; i < storypoints.Length; ++i)
-        {
-            if(storypoints[i].name == name) {
-                Debug.Log("Found storypoint for activation");
-                storypoints[i].SetActive(true);
-                activeCanvasID = name;
-            }
-        }
+        storypoints[name].SetActive(true);
+        activeCanvasID = name;
     }

     public void DeactivateStorypoint() {
-        for(int i = 0; i < storypoints.Length; ++i)
-        {
-            if(storypoints[i].name == activeCanvasID) {
-                Debug.Log("Found storypoint for deactivation");
-                storypoints[i].SetActive(false);
-                activeCanvasID = "";
-            }
-        }
+        storypoints[activeCanvasID].SetActive(false);
+        activeCanvasID = "";
     }
 }


upgrade price text add "$"

upgrade price text add "$"

--- Assets/Scripts/UI/ShipUpgrade/ShopDetailsUI.cs
+++ Assets/Scripts/UI/ShipUpgrade/ShopDetailsUI.cs
@@ -24,7 +24,7 @@
         header.text = upgrade.title;
         description.text = upgrade.description;
         activeNb.text = "Active: " + upgrade.currentEquipedNb + "/" + upgrade.numberOfUpgrade;
-        price.text = "Price: " + (int)upgrade.currentPrice;
+        price.text = "Price: " + (int)upgrade.currentPrice + "$";
         wheight.text = "Wheight: " + upgrade.wheight;
         totalWeight.text = "Tot Wheight: " + (int)(upgrade.wheight * upgrade.currentEquipedNb);
     }


Modified code following review

Modified code following review

--- Assets/Vive-Teleporter/Scripts/TeleportVive.cs
+++ Assets/Vive-Teleporter/Scripts/TeleportVive.cs
@@ -76,14 +76,16 @@

         Vector3 p0, p1, p2, p3;
         if (GetChaperoneBounds(out p0, out p1, out p2, out p3))
-        {
-            BorderPointSet p = new BorderPointSet(new Vector3[] {
-                // Rotate to match camera rig rotation
-                Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one) * p0,
-                Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one) * p1,
-                Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one) * p2,
-                Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one) * p3,
-                Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one) * p0,
+        {
+            // Rotate to match camera rig rotation
+            var originRotationMatrix = Matrix4x4.TRS(Vector3.zero, OriginTransform.rotation, Vector3.one);
+
+            BorderPointSet p = new BorderPointSet(new Vector3[] {
+                originRotationMatrix * p0,
+                originRotationMatrix * p1,
+                originRotationMatrix * p2,
+                originRotationMatrix * p3,
+                originRotationMatrix * p0,
             });
             RoomBorder.Points = new BorderPointSet[]
             {


Bug fix to controller

Bug fix to controller

--- jVUNDemo/Controllers/DemoController.cs
+++ jVUNDemo/Controllers/DemoController.cs
@@ -41,7 +41,7 @@
         {
             ViewBag.Title = "Range";

-            return View(new RangeModel{ DateTime = DateTime.Today });
+            return View(new RangeModel());
         }

         public ActionResult MaxLengthMinLength()


Adjust invoice pagination behavior

Adjust invoice pagination behavior

fix #1236

--- BTCPayServer/Views/Invoice/ListInvoices.cshtml
+++ BTCPayServer/Views/Invoice/ListInvoices.cshtml
@@ -75,9 +75,9 @@
                                 </button>

                                 @{
-                                    var storeIds = String.Join(
+                                    var storeIds = string.Join(
                                         "",
-                                        Model.StoreIds.Select(storeId => string.Format(",storeid:{0}", storeId))
+                                        Model.StoreIds.Select(storeId => $",storeid:{storeId}")
                                     );
                                 }

@@ -116,7 +116,7 @@

-                            Start Date
+                            Start Date

                                     <input id="dtpStartDate" class="form-control flatdtpicker" type="datetime-local"
@@ -273,7 +273,7 @@

-

+

                                         <partial name="InvoicePaymentsPartial" model="invoice.Details" />

@@ -284,13 +284,13 @@

-                            «
+                            «

-                            @(Model.Skip + 1) to @(Model.Skip + Model.Invoices.Count) of @Model.Total
+                            @Model.Skip to @(Model.Skip + Model.Invoices.Count) of @Model.Total

 (Model.Skip + Model.Invoices.Count) ? null : "disabled")">
-                            »
+                            »

@@ -298,27 +298,31 @@
                             Page Size:

-                            50
+                            50

-                            100
+                            100

-                            250
+                            250

-                            500
+                            500

                 @{
-                    string listInvoices(int prevNext, int count)
+                    string ListInvoices(int prevNext, int count)
                     {
                         var skip = Model.Skip;
                         if (prevNext == -1)
+                        {
                             skip = Math.Max(0, Model.Skip - Model.Count);
+                        }
                         else if (prevNext == 1)
+                        {
                             skip = Model.Skip + count;
+                        }

                         var act = Url.Action("ListInvoices", new
                         {


Rename parameter

Rename parameter

--- BmpListener/Bgp/OptionalParameterCapability.cs
+++ BmpListener/Bgp/OptionalParameterCapability.cs
@@ -1,28 +1,40 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;

 namespace BmpListener.Bgp
 {
     public class OptionalParameterCapability : OptionalParameter
     {
-        public OptionalParameterCapability(ArraySegment<byte> data) : base(data)
+        public OptionalParameterCapability(ArraySegment<byte> data) : base(ref data)
         {
             Decode(data);
         }

-        public Capability[] ParameterValue { get; private set; }
+        public Capability[] Capabilities { get; private set; }

         public void Decode(ArraySegment<byte> data)
         {
             var capabilities = new List<Capability>();
-            var bytes = new byte[ParameterLength];
-            Array.Copy(data.Array, data.Offset + 2, bytes, 0, ParameterLength);
+
+            //var offset = data.Offset + 10;
+            //var length = (int)data.ElementAt(9);
+            //data = new ArraySegment<byte>(data.Array, offset, length);
+            //while (data.Count > 0)
+            //{
+            //    //TODO if OptParamLength <2 return an error
+            //    var optParam = OptionalParameter.GetOptionalParameter(data);
+            //    OptionalParameters.Add(optParam);
+            //    offset = data.Offset + optParam.ParameterLength + 2;
+            //    length = data.Count - optParam.ParameterLength - 2;
+            //    data = new ArraySegment<byte>(data.Array, offset, length);
+            //}

             for (var i = 0; i < ParameterLength;)
             {
-                var type = (Capability.CapabilityCode) bytes[i];
+                var type = (Capability.CapabilityCode) data.First();
                 i++;
-                var length = bytes[i];
+                var length = data.ElementAt(i);
                 i++;
                 data = new ArraySegment<byte>(bytes, i, length);
                 var capability = Capability.GetCapability(type, data);
@@ -30,7 +42,7 @@
                     capabilities.Add(capability);
                 i += length;
             }
-            ParameterValue = capabilities.ToArray();
+            Capabilities = capabilities.ToArray();
         }
     }
 }


Fixed OrbitController

Fixed OrbitController

--- C3DE/Components/Controllers/OrbitController.cs
+++ C3DE/Components/Controllers/OrbitController.cs
@@ -60,7 +60,7 @@
         public OrbitController()
             : base()
         {
-            _angle = new Vector2(0.0f, -MathHelper.Pi / 6.0f);
+            _angle = new Vector2(0.0f, MathHelper.Pi / 6.0f);
             _distance = 35;

             MinAngle = -MathHelper.PiOver2 + 0.1f;
@@ -144,7 +144,7 @@
             if (Input.Mouse.Down(Inputs.MouseButton.Left) && Input.Mouse.Drag())
             {
                 angleVelocity.X -= RotationSpeed * Input.Mouse.Delta.X * MouseSensibility.X * Time.DeltaTime;
-                angleVelocity.Y -= RotationSpeed * Input.Mouse.Delta.Y * MouseSensibility.Y * Time.DeltaTime;
+                angleVelocity.Y += RotationSpeed * Input.Mouse.Delta.Y * MouseSensibility.Y * Time.DeltaTime;
             }

             if (Input.Mouse.Down(Inputs.MouseButton.Right))


Fixed crash when adding new platformer values while game is running.

--- Engines/FlatRedBallXNA/FlatRedBall/IO/Csv/RuntimeCsvRepresentation.cs
+++ Engines/FlatRedBallXNA/FlatRedBall/IO/Csv/RuntimeCsvRepresentation.cs
@@ -800,7 +800,11 @@

                 var newItem = newKvp.Value;

-                var oldItem = dictionaryToUpdate[key];
+                ValueType oldItem = default;
+                if(dictionaryToUpdate.ContainsKey(key))
+                {
+                    oldItem = dictionaryToUpdate[key];
+                }

                 if(oldItem == null)
                 {


Update Devices.cs to fix XML comment

Update Devices.cs to fix XML comment

--- Project-Aurora/Project-Aurora/Devices/Device.cs
+++ Project-Aurora/Project-Aurora/Devices/Device.cs
@@ -1055,6 +1055,7 @@
         [Description("Profile Key 6")]
         Profile_Key6 = 168,

+        /// <summary>
         /// Numpad 00
         /// </summary>
         [Description("Numpad 00")]


version

version

--- AppCompatCacheParser/Properties/AssemblyInfo.cs
+++ AppCompatCacheParser/Properties/AssemblyInfo.cs
@@ -35,5 +35,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]

-[assembly: AssemblyVersion("1.3.0.2")]
-[assembly: AssemblyFileVersion("1.3.0.2")]+[assembly: AssemblyVersion("1.4.0.0")]
+[assembly: AssemblyFileVersion("1.4.0.0")]


added bold and red star to required custom fields

--- Purchasing.Web/Views/Order/_CustomFields.cshtml
+++ Purchasing.Web/Views/Order/_CustomFields.cshtml
@@ -22,7 +22,7 @@
                     var answerIfAvailable = Model.Order.CustomFieldAnswers.Where(x => x.CustomField.Id == customFields[i].Id).Select(x=>x.Answer).FirstOrDefault() ?? string.Empty;
                     var answerElementName = string.Format("customfields[{0}].answer", i);

-
@customFields[i].Name@(fieldRequired ? "*" : string.Empty)

+
@customFields[i].Name@(fieldRequired ? "*" : string.Empty)

                             <input type="hidden" name='@string.Format("customfields[{0}].id", i)' value="@customFields[i].Id" />
                             <input name="@answerElementName" type="text" value="@answerIfAvailable" data-val="@(fieldRequired ? "true" : "false")" data-val-required="This question requires an answer" />


Wrote a few HistoricalDataServer tests.

Wrote a few HistoricalDataServer tests.

--- QDMSTest/QDMSServer/HistoricalDataServerTest.cs
+++ QDMSTest/QDMSServer/HistoricalDataServerTest.cs
@@ -5,6 +5,7 @@
 // -----------------------------------------------------------------------

 using System;
+using System.Collections.Generic;
 using System.Threading;
 using Moq;
 using NUnit.Framework;
@@ -75,5 +76,64 @@
                     r.StartingDate == new DateTime(2012, 1, 1) &&
                     r.EndingDate == new DateTime(2013, 1, 1))), Times.Once);
         }
+
+        [Test]
+        public void StartServerStartsTheServer()
+        {
+            Assert.IsTrue(_hdServer.ServerRunning);
+        }
+
+        [Test]
+        public void StopServerStopsTheServer()
+        {
+            _hdServer.StopServer();
+            Assert.IsFalse(_hdServer.ServerRunning);
+        }
+
+        [Test]
+        public void DataPushRequestIsForwardedToLocalStorage()
+        {
+            var instrument = new Instrument
+            {
+                ID = 1,
+                Symbol = "SPY",
+                Datasource = new Datasource { ID = 1, Name = "MockSource" }
+            };
+
+            var data = new List<OHLCBar>
+            {
+                new OHLCBar {Open = 1, High = 2, Low = 3, Close = 4, DT = new DateTime(2013, 1, 1) }
+            };
+
+            var req = new DataAdditionRequest(BarSize.OneDay, instrument, data, true);
+
+            _client.PushData(req);
+
+            _brokerMock.Verify(x => x.AddData(
+                It.Is<DataAdditionRequest>(y =>
+                    y.Frequency == BarSize.OneDay &&
+                    y.Instrument.ID == 1 &&
+                    y.Data.Count == 1)
+                ), Times.Once);
+        }
+
+        [Test]
+        public void AcceptAvailableDataRequestsAreForwardedToTheHistoricalDataBroker()
+        {
+            var instrument = new Instrument
+            {
+                ID = 1,
+                Symbol = "SPY",
+                Datasource = new Datasource { ID = 1, Name = "MockSource" }
+            };
+
+            _client.GetLocallyAvailableDataInfo(instrument);
+
+            _brokerMock.Verify(x => x.GetAvailableDataInfo(
+                It.Is<Instrument>(y =>
+                    y.ID == 1 &&
+                    y.Symbol == "SPY")
+                    ), Times.Once);
+        }
     }
 }


added legacy compatibilities fixes to patches of default type v1

--- RelhaxModpack/RelhaxModpack/Utils/PatchUtils.cs
+++ RelhaxModpack/RelhaxModpack/Utils/PatchUtils.cs
@@ -530,6 +530,23 @@
             {
                 Logging.Warning("Patch mode \"arrayEdit\" is not a valid mode and will be treated as \"edit\", please update it!");
                 p.Mode = "edit";
+            }
+            //if patch type is v1, run v1 patch changes
+            if(p.Version == 1)
+            {
+                Logging.Warning("patch is V1 type, please update to V2!");
+                //V1 fix 1: if type if json, hard-code the replace to look for xvm reference, and replace it with the new macro used (start macro)
+                if(p.Replace.Contains("[dollar][lbracket][quote]"))
+                {
+                    Logging.Warning("applying v1 fix 1: if json type, update xvm reference macros (start macro)");
+                    p.Replace = p.Replace.Replace("[dollar][lbracket][quote]", "[xvm_dollar][lbracket][quote]");
+                }
+                //V1 fix 2: if type if json, hard-code the replace to look for xvm reference, and replace it with the new macro used (end macro)
+                if (p.Replace.Contains("[quote][rbracket]"))
+                {
+                    Logging.Warning("applying v1 fix 2: if json type, update xvm reference macros (end macro)");
+                    p.Replace = p.Replace.Replace("[quote][rbracket]", "[quote][xvm_rbracket]");
+                }
             }

             //load the file into a string


#7 Jump action using Hydra.

#7 Jump action using Hydra.

--- Assets/Characters/Scripts/FPSInputController.cs
+++ Assets/Characters/Scripts/FPSInputController.cs
@@ -27,6 +27,12 @@
 		if (hydraLeftController != null) {
 			directionVector= new Vector3(hydraLeftController.JoystickX, 0, hydraLeftController.JoystickY);
 		}
+
+		if (hydraRightController != null) {
+			motor.inputJump = hydraRightController.GetButton (SixenseButtons.BUMPER);
+		} else {
+			motor.inputJump = Input.GetButton ("Jump");
+		}

 		if (directionVector != Vector3.zero) {
 			// Get the length of the directon vector and then normalize it
@@ -47,6 +53,5 @@

 		// Apply the direction to the CharacterMotor
 		motor.inputMoveDirection = ovrCamera.transform.rotation * directionVector;
-		motor.inputJump = Input.GetButton("Jump");
 	}
 }


Added missing </summary> tag

Added missing </summary> tag

--- Assets/Code/HexTiles/Editor/HexTileMapEditor.cs
+++ Assets/Code/HexTiles/Editor/HexTileMapEditor.cs
@@ -683,6 +683,7 @@

         /// <summary>
         /// Callback triggered when an undo is performed.
+        /// </summary>
         private void OnUndoPerformed()
         {
             // This must be done in case the undo operation deleted a chunk


Update App.xaml.cs

Update App.xaml.cs

--- AugmentedSzczecin/AugmentedSzczecin/App.xaml.cs
+++ AugmentedSzczecin/AugmentedSzczecin/App.xaml.cs
@@ -24,6 +24,7 @@
             container.RegisterWinRTServices();

             container.PerRequest<MainViewModel>();
+            container.PerRequest<AboutViewModel>();
         }

         protected override void PrepareViewFirst(Frame rootFrame)
@@ -51,4 +52,4 @@
             container.BuildUp(instance);
         }
     }
-}+}


Prevent an object disposed exception that made forms comms unreliable. After starting an asynchronous write, one should not close the channel it will be written to synchrnously, that leads to grief.

--- OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
+++ OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
@@ -85,8 +85,13 @@
                 }
                 finally
                 {
-                    if (requestStream != null)
-                        requestStream.Close();
+                    // If this is closed, it will be disposed internally,
+                    // but the above write is asynchronous and may hit after
+                    // we're through here. So the thread handling that will
+                    // throw and put us back into the catch above. Isn't
+                    // .NET great?
+                    //if (requestStream != null)
+                    //    requestStream.Close();
                     // Let's not close this
                     //buffer.Close();


Fixed crash when reading locked Witcher 3 config file

--- Project-Aurora/Project-Aurora/Profiles/Witcher3/GameEvent_Witcher3.cs
+++ Project-Aurora/Project-Aurora/Profiles/Witcher3/GameEvent_Witcher3.cs
@@ -17,47 +17,44 @@
 {
     public class GameEvent_Witcher3 : LightEvent
     {
-        private bool isInitialized = false;
-        private readonly Regex _configRegex;
         private string configContent;
-        string dataFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\The Witcher 3";
-        string dataPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\The Witcher 3", "user.settings");
+        private static readonly Regex _configRegex = new Regex("\\[Artemis\\](.+?)\\[", RegexOptions.Singleline);
+        private static readonly string dataFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\The Witcher 3";
+        private static readonly string dataPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\The Witcher 3", "user.settings");
         //Most of this code, and the mod was taken from https://github.com/SpoinkyNL/Artemis/, with Spoinky's permission
         public GameEvent_Witcher3() : base()
         {
-            _configRegex = new Regex("\\[Artemis\\](.+?)\\[", RegexOptions.Singleline);
-
             if (Directory.Exists(dataFolder))
             {
-                FileSystemWatcher watcher = new FileSystemWatcher();
-                watcher.Path = dataFolder;
+                FileSystemWatcher watcher = new FileSystemWatcher()
+                {
+                    Path = dataFolder,
+                    EnableRaisingEvents = true
+                };
                 watcher.Changed += dataFile_Changed;
-                watcher.EnableRaisingEvents = true;
+            }

-                ReloadData();
-            }
+            ReadConfigFile();
         }

         private void dataFile_Changed(object sender, FileSystemEventArgs e)
         {
             if (e.Name.Equals("user.settings") && e.ChangeType == WatcherChangeTypes.Changed)
-                ReloadData();
+                ReadConfigFile();
         }

-        private void ReloadData()
+        private void ReadConfigFile()
         {
             if (File.Exists(dataPath))
             {
-                var reader = new StreamReader(File.Open(dataPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
-                configContent = reader.ReadToEnd();
-                reader.Close();
-                reader.Dispose();
-
-                isInitialized = true;
-            }
-            else
-            {
-                isInitialized = false;
+                try
+                {
+                    using (var reader = new StreamReader(File.Open(dataPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
+                    {
+                        configContent = reader.ReadToEnd();
+                    }
+                }
+                catch (IOException){ }//ignore read exception
             }
         }

@@ -66,79 +63,64 @@
             _game_state = new GameState_Witcher3();
         }

-        public new bool IsEnabled
-        {
-            get { return this.Application.Settings.IsEnabled && isInitialized; }
-        }
-
         public override void UpdateLights(EffectFrame frame)
         {
             Queue<EffectLayer> layers = new Queue<EffectLayer>();

             if (File.Exists(dataPath))
             {
-                if(configContent != null)
+                if (configContent != null)
                 {
-                    var signRes = _configRegex.Match(configContent);
-                    var parts = signRes.Value.Split('\n').Skip(1).Select(v => v.Replace("\r", "")).ToList();
-                    if (parts.Count != 0)
+                    try
                     {
-                        parts.RemoveAt(parts.Count - 1);
+                        var signRes = _configRegex.Match(configContent);
+                        var parts = signRes.Value.Split('\n').Skip(1).Select(v => v.Replace("\r", "")).ToList();
+                        if (parts.Count != 0)
+                        {
+                            parts.RemoveAt(parts.Count - 1);

-                        // Update sign
-                        var sign = parts.FirstOrDefault(p => p.Contains("ActiveSign="));
-                        if (sign != null)
-                        {
-                            var signString = sign.Split('=')[1];
-                            switch (signString)
+                            // Update sign
+                            var sign = parts.FirstOrDefault(p => p.Contains("ActiveSign="));
+                            if (sign != null)
                             {
-                                case "ST_Aard":
-                                    (_game_state as GameState_Witcher3).Player.ActiveSign = WitcherSign.Aard;
-                                    break;
-                                case "ST_Yrden":
-                                    (_game_state as GameState_Witcher3).Player.ActiveSign = WitcherSign.Yrden;
-                                    break;
-                                case "ST_Igni":
-                                    (_game_state as GameState_Witcher3).Player.ActiveSign = WitcherSign.Igni;
-                                    break;
-                                case "ST_Quen":
-                                    (_game_state as GameState_Witcher3).Player.ActiveSign = WitcherSign.Quen;
-                                    break;
-                                case "ST_Axii":
-                                    (_game_state as GameState_Witcher3).Player.ActiveSign = WitcherSign.Axii;
-                                    break;
+                                var signString = sign.Split('=')[1].Replace("ST_","");
+                                if (Enum.TryParse(signString, out WitcherSign temp))
+                                    (_game_state as GameState_Witcher3).Player.ActiveSign = temp;
+                            }
+                            // Update max health
+                            var maxHealth = parts.FirstOrDefault(p => p.Contains("MaxHealth="));
+                            if (maxHealth != null)
+                            {
+                                var maxHealthInt = int.Parse(maxHealth.Split('=')[1].Split('.')[0]);
+                                (_game_state as GameState_Witcher3).Player.MaximumHealth = maxHealthInt;
+                            }
+                            // Update health
+                            var health = parts.FirstOrDefault(p => p.Contains("CurrHealth="));
+                            if (health != null)
+                            {
+                                var healthInt = int.Parse(health.Split('=')[1].Split('.')[0]);
+                                (_game_state as GameState_Witcher3).Player.CurrentHealth = healthInt;
+                            }
+                            // Update stamina
+                            var stamina = parts.FirstOrDefault(p => p.Contains("Stamina="));
+                            if (stamina != null)
+                            {
+                                var staminaInt = int.Parse(stamina.Split('=')[1].Split('.')[0]);
+                                (_game_state as GameState_Witcher3).Player.Stamina = staminaInt;
+                            }
+                            // Update Toxicity
+                            var toxicity = parts.FirstOrDefault(p => p.Contains("Toxicity="));
+                            if (toxicity != null)
+                            {
+                                var toxicityInt = int.Parse(toxicity.Split('=')[1].Split('.')[0]);
+                                (_game_state as GameState_Witcher3).Player.Toxicity = toxicityInt;
                             }
                         }
-
-                        // Update max health
-                        var maxHealth = parts.FirstOrDefault(p => p.Contains("MaxHealth="));
-                        if (maxHealth != null)
-                        {
-                            var maxHealthInt = int.Parse(maxHealth.Split('=')[1].Split('.')[0]);
-                            (_game_state as GameState_Witcher3).Player.MaximumHealth = maxHealthInt;
-                        }
-                        // Update health
-                        var health = parts.FirstOrDefault(p => p.Contains("CurrHealth="));
-                        if (health != null)
-                        {
-                            var healthInt = int.Parse(health.Split('=')[1].Split('.')[0]);
-                            (_game_state as GameState_Witcher3).Player.CurrentHealth = healthInt;
-                        }
-                        // Update stamina
-                        var stamina = parts.FirstOrDefault(p => p.Contains("Stamina="));
-                        if (stamina != null)
-                        {
-                            var staminaInt = int.Parse(stamina.Split('=')[1].Split('.')[0]);
-                            (_game_state as GameState_Witcher3).Player.Stamina = staminaInt;
-                        }
-                        // Update Toxicity
-                        var toxicity = parts.FirstOrDefault(p => p.Contains("Toxicity="));
-                        if (toxicity != null)
-                        {
-                            var toxicityInt = int.Parse(toxicity.Split('=')[1].Split('.')[0]);
-                            (_game_state as GameState_Witcher3).Player.Toxicity = toxicityInt;
-                        }
-                    }
+                    }
+                    catch (Exception e)
+                    {
+                        Global.logger.Warn("Error parsing Witcher 3 config data:" + e.Message);
+                    }
                 }
             }
             //Artemis code


Now uses Math.Abs(...)

Now uses Math.Abs(...)

--- CSharpTradeOffers/Community/SteamChatHandler.cs
+++ CSharpTradeOffers/Community/SteamChatHandler.cs
@@ -49,7 +49,7 @@

             var rand = new Random();
             var jQueryId = (long)(((rand.NextDouble() * 2.0 - 1.0) * long.MaxValue) % 99999999999); //might be able to be larger, haven't checked
-            if (jQueryId < 0) jQueryId = -jQueryId;
+            jQueryId = Math.Abs(jQueryId);
             _basejQuery = "jQuery" + jQueryId + _account.SteamId + "_{0}";

             _auth = Logon();


Updated reference of MDS Feature GUID

Updated reference of MDS Feature GUID

--- Commands/Branding/SetMinimalDownloadStrategy.cs
+++ Commands/Branding/SetMinimalDownloadStrategy.cs
@@ -24,11 +24,11 @@
         {
             if (On)
             {
-                SelectedWeb.Features.Add(new Guid(Resources.MDSFeatureGuid), Force, FeatureDefinitionScope.None);
+                SelectedWeb.Features.Add(Core.Constants.MINIMALDOWNLOADSTRATEGYFEATUREID, Force, FeatureDefinitionScope.None);
             }
             else
             {
-                SelectedWeb.Features.Remove(new Guid(Resources.MDSFeatureGuid), Force);
+                SelectedWeb.Features.Remove(Core.Constants.MINIMALDOWNLOADSTRATEGYFEATUREID, Force);
             }
             ClientContext.ExecuteQueryRetry();
         }


correcting guid generation

correcting guid generation

--- CRM_Project_D/src/CRM.HelperLibrary/Parsing.cs
+++ CRM_Project_D/src/CRM.HelperLibrary/Parsing.cs
@@ -48,9 +48,6 @@
                                         contact.Email = xlRange.Cells[i, j].Value2.ToString();
                                         break;
                                     case 6:
-                                        contact.GuID = (Guid)xlRange.Cells[i, j].Value2;
-                                        break;
-                                    case 7:
                                         contact.DateInserted = (DateTime)xlRange.Cells[i, j].Value2.ToString();
                                         break;
                                 }
@@ -59,6 +56,7 @@
                                 break;

                         }
+                        contact.GuID = Guid.NewGuid();
                         contactslist.Add(contact);
                     }
                     else


special character tests

special character tests

--- SizSelCsZzz.Test/BySizzle_can_find_elements_by_Sizzle_css_selector.cs
+++ SizSelCsZzz.Test/BySizzle_can_find_elements_by_Sizzle_css_selector.cs
@@ -27,6 +27,11 @@

""quotes""

+
+                        <input value='Hello world'/>
+                        <input value='Hello, world.'/>
+                        <input id='fee-fi_foe-fum'></input>
+                        phrase with spaces, and commas.

                     "}
             }.Start());
@@ -50,6 +55,14 @@
                 it("can handle special characters", delegate
                 {
                     expect(() => browser.FindElement(BySizzle.CssSelector("li:contains('\"quotes\"')")) != null);
+                    expect(() => browser.FindElements(BySizzle.CssSelector("span:contains('phrase with spaces')")).Count() == 1);
+                    expect(() => browser.FindElements(BySizzle.CssSelector("span:contains('phrase with spaces, and commas.')")).Count() == 1);
+                    expect(() => browser.FindElements(By.CssSelector("input#fee-fi_foe-fum")).Count() == 1);
+                    expect(() => browser.FindElements(BySizzle.CssSelector("input#fee-fi_foe-fum")).Count() == 1);
+                    expect(() => browser.FindElements(By.CssSelector("input[value='Hello world']")).Count() == 1);
+                    expect(() => browser.FindElements(BySizzle.CssSelector("input[value='Hello world']")).Count() == 1);
+                    //expect(() => browser.FindElements(By.CssSelector("input[value='Hello, world.']")).Count() == 1);
+                    expect(() => browser.FindElements(BySizzle.CssSelector("input[value='Hello, world.']")).Count() == 1);
                 });

                 it("reports a useful error if the element is not found", delegate


Add implementation for generating response instances without error handling

--- Source/Lib/TraktApiSharp/Experimental/Requests/TraktRequestHandler.cs
+++ Source/Lib/TraktApiSharp/Experimental/Requests/TraktRequestHandler.cs
@@ -7,6 +7,9 @@
     using Responses;
     using Responses.Interfaces;
     using System;
+    using System.Collections.Generic;
+    using System.Diagnostics;
+    using System.Net;
     using System.Net.Http;
     using System.Net.Http.Headers;
     using System.Text;
@@ -106,29 +109,60 @@

         private async Task<ITraktNoContentResponse> QueryNoContentAsync(HttpRequestMessage requestMessage)
         {
-            var responseContent = await ExecuteRequestAsync(requestMessage);
-            return await Task.FromResult(new TraktNoContentResponse());
+            var response = await ExecuteRequestAsync(requestMessage).ConfigureAwait(false);
+
+            Debug.Assert(response != null && response.StatusCode == HttpStatusCode.NoContent,
+                         "precondition for generating no content response failed");
+
+            return new TraktNoContentResponse { IsSuccess = true };
         }

         private async Task<ITraktResponse<TContentType>> QuerySingleItemAsync<TContentType>(HttpRequestMessage requestMessage)
         {
-            var responseContent = await ExecuteRequestAsync(requestMessage);
-            return await Task.FromResult(new TraktResponse<TContentType>());
+            var response = await ExecuteRequestAsync(requestMessage).ConfigureAwait(false);
+
+            Debug.Assert(response != null && response.StatusCode != HttpStatusCode.NoContent,
+                         "precondition for generating single item response failed");
+
+            var responseContent = await GetResponseContentAsync(response).ConfigureAwait(false);
+            Debug.Assert(!string.IsNullOrEmpty(responseContent), "precondition for deserializing response content failed");
+
+            var contentObject = Json.Deserialize<TContentType>(responseContent);
+            return new TraktResponse<TContentType> { IsSuccess = true, HasValue = contentObject != null, Value = contentObject };
         }

         private async Task<ITraktListResponse<TContentType>> QueryListAsync<TContentType>(HttpRequestMessage requestMessage)
         {
-            var responseContent = await ExecuteRequestAsync(requestMessage);
-            return await Task.FromResult(new TraktListResponse<TContentType>());
+            var response = await ExecuteRequestAsync(requestMessage).ConfigureAwait(false);
+
+            Debug.Assert(response != null && response.StatusCode != HttpStatusCode.NoContent,
+                         "precondition for generating list response failed");
+
+            var responseContent = await GetResponseContentAsync(response).ConfigureAwait(false);
+            Debug.Assert(!string.IsNullOrEmpty(responseContent), "precondition for deserializing response content failed");
+
+            var contentObject = Json.Deserialize<IEnumerable<TContentType>>(responseContent);
+            return new TraktListResponse<TContentType> { IsSuccess = true, HasValue = contentObject != null, Value = contentObject };
         }

         private async Task<ITraktPagedResponse<TContentType>> QueryPagedListAsync<TContentType>(HttpRequestMessage requestMessage)
         {
-            var responseContent = await ExecuteRequestAsync(requestMessage);
-            return await Task.FromResult(new TraktPagedResponse<TContentType>());
-        }
-
-        private async Task<string> ExecuteRequestAsync(HttpRequestMessage requestMessage)
+            var response = await ExecuteRequestAsync(requestMessage).ConfigureAwait(false);
+
+            Debug.Assert(response != null && response.StatusCode != HttpStatusCode.NoContent,
+                         "precondition for generating paged list response failed");
+
+            var responseContent = await GetResponseContentAsync(response).ConfigureAwait(false);
+            Debug.Assert(!string.IsNullOrEmpty(responseContent), "precondition for deserializing response content failed");
+
+            var contentObject = Json.Deserialize<IEnumerable<TContentType>>(responseContent);
+            return new TraktPagedResponse<TContentType> { IsSuccess = true, HasValue = contentObject != null, Value = contentObject };
+        }
+
+        private async Task<string> GetResponseContentAsync(HttpResponseMessage response)
+            => response.Content != null ? await response.Content.ReadAsStringAsync() : string.Empty;
+
+        private async Task<HttpResponseMessage> ExecuteRequestAsync(HttpRequestMessage requestMessage)
         {
             var response = await s_httpClient.SendAsync(requestMessage).ConfigureAwait(false);

@@ -137,9 +171,7 @@
                 // error handling
             }

-            return response.Content != null
-                ? await response.Content.ReadAsStringAsync().ConfigureAwait(false)
-                : string.Empty;
+            return response;
         }

         private void PreExecuteRequest(ITraktRequest request)


Project Folder DragDrop Bugfix #FIX: Fixed a bug where attempting to drop a file inside default content could cause an exception.

--- Source/Plugins/EditorModules/ProjectView/Modules/ProjectFolderView.cs
+++ Source/Plugins/EditorModules/ProjectView/Modules/ProjectFolderView.cs
@@ -594,13 +594,13 @@
 		}
 		protected string GetInsertActionTargetBasePath(NodeBase baseNode)
 		{
-			string baseTargetPath = (baseNode != null) ? baseNode.NodePath : DualityApp.DataDirectory;
-			if (!ContentProvider.IsDefaultContentPath(baseTargetPath))
-			{
-				if (File.Exists(baseTargetPath)) baseTargetPath = Path.GetDirectoryName(baseTargetPath);
-				baseTargetPath = Path.GetFullPath(baseTargetPath);
-			}
-
+			if (baseNode == null || ContentProvider.IsDefaultContentPath(baseNode.NodePath))
+				return DualityApp.DataDirectory;
+
+			string baseTargetPath = baseNode.NodePath;
+			if (File.Exists(baseTargetPath))
+				baseTargetPath = Path.GetDirectoryName(baseTargetPath);
+			baseTargetPath = Path.GetFullPath(baseTargetPath);
 			return baseTargetPath;
 		}


adding function to get transform to re-orient axis

--- DataConverters3D/Object3D/Object3DExtensions.cs
+++ DataConverters3D/Object3D/Object3DExtensions.cs
@@ -151,6 +151,11 @@
 			world.Fit(itemToRender, goalBounds, Matrix4X4.Identity);
 		}

+		public static Matrix4X4 GetXYInViewRotation(this WorldView world)
+		{
+			return Matrix4X4.CreateTranslation(0, 0, 30);
+		}
+
 		public static AxisAlignedBoundingBox GetAxisAlignedBoundingBox(this IEnumerable<IObject3D> items)
 		{
 			var aabb = AxisAlignedBoundingBox.Empty();


Added TODO comment

Added TODO comment

--- Devbridge.AzureMessaging/AzureMessageHandler.cs
+++ Devbridge.AzureMessaging/AzureMessageHandler.cs
@@ -61,10 +61,14 @@
                 result = processMessageFn(body);

                 message.Complete();
+
+                if (result != null && result.GetType().IsClass)
+                {
+                    //TODO: in the future add result to out queue
+                }
             }
             catch (Exception ex)
             {
-
                 Log.Error(string.Format("Unable process message. {0}: {1}", ex.GetType().Name, ex.Message), ex);

                 try


Refactored AuthorizationHandler in Test Web App

--- TestWebApp/Classes/Handlers/AuthorizationHandler.cs
+++ TestWebApp/Classes/Handlers/AuthorizationHandler.cs
@@ -17,7 +17,10 @@
         {
             // Check for a token in the session already, and if found, no action is required
             if (context.Session["access_token"] != null)
+            {
                 context.Response.Redirect("DataView.aspx");
+                return;
+            }

             // Init oAuth
             var oAuth = new OAuth();
@@ -27,27 +30,27 @@
             {
                 string path = oAuth.CallAuthorization(null, null);
                 context.Response.Redirect(path);
+                return;
             }
-            else
+
+            // Otherwise, we have a code, we can run the second leg of OAuth process.
+            string code = context.Request.QueryString["code"];
+            string authorization = oAuth.CallAuthorization(null, code);
+
+            // OAuth successful so get values, store in session and continue
+            if (authorization == "OAuthSuccess")
             {
-                // Now we have a code, we can run the second leg of OAuth process.
-                string code = context.Request.QueryString["code"];
-                string authorization = oAuth.CallAuthorization(null, code);
+                // Ensure that all required values were retrieved from the OAuth login
+                if (oAuth.AccessToken != null && oAuth.UserFullName != null && oAuth.UserSLIRoles != null && oAuth.UserId != null)
+                {
+                    // Authorization successful; set session variables
+                    context.Session.Add("access_token", oAuth.AccessToken);
+                    context.Session.Add("user_FullName", oAuth.UserFullName);
+                    context.Session.Add("user_SLIRoles", oAuth.UserSLIRoles);
+                    context.Session.Add("user_ID", oAuth.UserId);

-                // OAuth successful so get values, store in session and continue
-                if (authorization == "OAuthSuccess")
-                {
-                    if (oAuth.AccessToken != null && oAuth.UserFullName != null && oAuth.UserSLIRoles != null && oAuth.UserId != null)
-                    {
-                        // Authorization successful; set session variables
-                        context.Session.Add("access_token", oAuth.AccessToken);
-                        context.Session.Add("user_FullName", oAuth.UserFullName);
-                        context.Session.Add("user_SLIRoles", oAuth.UserSLIRoles);
-                        context.Session.Add("user_ID", oAuth.UserId);
-
-                        // Redirect to default page
-                        context.Response.Redirect("DataView.aspx");
-                    }
+                    // Redirect to default page
+                    context.Response.Redirect("DataView.aspx");
                 }
             }
         }


Added unit test to make sure #351 stays fixed.

--- Tests/Magick.NET.Tests/Shared/Coders/ThePngCoder.cs
+++ Tests/Magick.NET.Tests/Shared/Coders/ThePngCoder.cs
@@ -109,6 +109,43 @@
             }
         }

+        [TestMethod]
+        public void ShouldWritePng00Correctly()
+        {
+            using (IMagickImage image = new MagickImage(Files.Builtin.Logo))
+            {
+                using (var stream = new MemoryStream())
+                {
+                    image.Write(stream, MagickFormat.Png);
+
+                    stream.Position = 0;
+
+                    image.Read(stream);
+
+                    var setting = new QuantizeSettings
+                    {
+                        ColorSpace = ColorSpace.Gray,
+                        DitherMethod = DitherMethod.Riemersma,
+                        Colors = 2,
+                    };
+
+                    image.Quantize(setting);
+
+                    image.Warning += HandleWarning;
+
+                    image.Write(stream, MagickFormat.Png00);
+
+                    stream.Position = 0;
+
+                    image.Read(stream);
+
+                    Assert.AreEqual(ColorType.Palette, image.ColorType);
+                    ColorAssert.AreEqual(MagickColors.White, image, 0, 0);
+                    ColorAssert.AreEqual(MagickColors.Black, image, 305, 248);
+                }
+            }
+        }
+
         private void HandleWarning(object sender, WarningEventArgs e)
         {
             Assert.Fail("Warning was raised: " + e.Message);


Add Factorial unit tests

Add Factorial unit tests

--- UnitTestUsefullFunctions/UnitTestFunctionsString.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsString.cs
@@ -124,5 +124,47 @@
       long result = MathFunc.Factorial(4);
       Assert.IsTrue(result == 24);
     }
+
+    [TestMethod]
+    public void TestMethod_Factorial_five()
+    {
+      long result = MathFunc.Factorial(5);
+      Assert.IsTrue(result == 120);
+    }
+
+    [TestMethod]
+    public void TestMethod_Factorial_six()
+    {
+      long result = MathFunc.Factorial(6);
+      Assert.IsTrue(result == 720);
+    }
+
+    [TestMethod]
+    public void TestMethod_Factorial_seven()
+    {
+      long result = MathFunc.Factorial(7);
+      Assert.IsTrue(result == 5040);
+    }
+
+    [TestMethod]
+    public void TestMethod_Factorial_eight()
+    {
+      long result = MathFunc.Factorial(8);
+      Assert.IsTrue(result == 40320);
+    }
+
+    [TestMethod]
+    public void TestMethod_Factorial_nine()
+    {
+      long result = MathFunc.Factorial(9);
+      Assert.IsTrue(result == 362880);
+    }
+
+    [TestMethod]
+    public void TestMethod_Factorial_ten()
+    {
+      long result = MathFunc.Factorial(10);
+      Assert.IsTrue(result == 3628800);
+    }
   }
 }


added character ID to information in esi.net

--- ESI.net/ESI.NET/Models/Character/Information.cs
+++ ESI.net/ESI.NET/Models/Character/Information.cs
@@ -5,6 +5,8 @@
 {
     public class Information
     {
+        public long CharacterId { get; set; }
+
         [JsonProperty("alliance_id")]
         public long AllianceId { get; set; }


[VsIntegration] Fixes #851

[VsIntegration] Fixes #851

--- VisualStudio/LanguageService/Lookup/XSharpLookup.cs
+++ VisualStudio/LanguageService/Lookup/XSharpLookup.cs
@@ -569,7 +569,8 @@
                         continue;
                     case XSharpLexer.DOT:
                         state = CompletionState.StaticMembers | CompletionState.Namespaces | CompletionState.Types;
-                        if (location.Project.ParseOptions.AllowDotForInstanceMembers)
+                        if (location.Project.ParseOptions.AllowDotForInstanceMembers ||
+                            (currentType != null && currentType.IsVoStruct() ))
                             state |= CompletionState.InstanceMembers;
                         resetState = false;
                         startOfExpression = false;


fix up rendering of everything except lens flares

lens flares have stopped being interested in rendering at all ever

--- Voxalia/ClientGame/ClientMainSystem/ClientRender.cs
+++ Voxalia/ClientGame/ClientMainSystem/ClientRender.cs
@@ -178,7 +178,7 @@
         public void renderGame()
         {
             RenderTextures = true;
-            GL.ClearBuffer(ClearBuffer.Color, 0, new float[] { 0.1f, 1f, 1f, 1f });
+            GL.ClearBuffer(ClearBuffer.Color, 0, new float[] { 0f, 1f, 1f, 1f });
             GL.ClearBuffer(ClearBuffer.Depth, 0, new float[] { 1.0f });
             GL.Enable(EnableCap.DepthTest);
             if (CVars.g_firstperson.ValueB)
@@ -375,7 +375,7 @@
                 {
                     Render3DWires();
                 }
-                RenderSky(combined);
+                RenderSkyflare(combined);
             }
             else
             {
@@ -408,45 +408,56 @@
                 {
                     Render3DWires();
                 }
-                RenderSky(combined);
+                RenderSkyflare(combined);
             }
             Establish2D();
             Render2D();
         }

-        public void RenderSky(Matrix4 combined)
+        public void RenderSkybox()
+        {
+            Rendering.SetMinimumLight(1);
+            float dist = 300; // TODO: View rad
+            GL.Disable(EnableCap.CullFace);
+            Matrix4 scale = Matrix4.CreateScale(dist, dist, dist) * Matrix4.CreateTranslation(CameraPos.ToOVector());
+            GL.UniformMatrix4(2, false, ref scale);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/bottom").Bind();
+            skybox[0].Render(false);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/top").Bind();
+            skybox[1].Render(false);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/xm").Bind();
+            skybox[2].Render(false);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/xp").Bind();
+            skybox[3].Render(false);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/ym").Bind();
+            skybox[4].Render(false);
+            Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/yp").Bind();
+            skybox[5].Render(false);
+            Textures.GetTexture("skies/sun").Bind(); // TODO: Store var? Make dynamic?
+            Matrix4 rot = Matrix4.CreateTranslation(-50f, -50f, 0f)
+                * Matrix4.CreateRotationY((float)((-SunAngle.Pitch - 90f) * Utilities.PI180))
+                * Matrix4.CreateRotationZ((float)((180f + SunAngle.Yaw) * Utilities.PI180))
+                * Matrix4.CreateTranslation((CameraPos + TheSun.Direction * -dist).ToOVector()); // TODO: adjust based on view rad
+            Rendering.RenderRectangle(0, 0, 100, 100, rot); // TODO: Adjust scale based on view rad
+            Textures.GetTexture("skies/planet").Bind(); // TODO: Store var? Make dynamic?
+            Rendering.SetColor(new Color4(PlanetLight, PlanetLight, PlanetLight, 1));
+            rot = Matrix4.CreateTranslation(-50f, -50f, 0f)
+                * Matrix4.CreateRotationY((float)((-PlanetAngle.Pitch - 90f) * Utilities.PI180))
+                * Matrix4.CreateRotationZ((float)((180f + PlanetAngle.Yaw) * Utilities.PI180))
+                * Matrix4.CreateTranslation((CameraPos + ThePlanet.Direction * -(dist * 0.9f)).ToOVector()); // TODO: adjust based on view rad
+            Rendering.RenderRectangle(0, 0, 100, 100, rot); // TODO: Adjust scale based on view rad
+            GL.BindTexture(TextureTarget.Texture2D, 0);
+            GL.Enable(EnableCap.CullFace);
+            Matrix4 ident = Matrix4.Identity;
+            GL.UniformMatrix4(2, false, ref ident);
+            Rendering.SetMinimumLight(0);
+        }
+
+        public void RenderSkyflare(Matrix4 combined)
         {
             {
                 Rendering.SetColor(Color4.White);
-                float dist = 300; // TODO: View rad
-                GL.Disable(EnableCap.CullFace);
-                Matrix4 scale = Matrix4.CreateScale(dist, dist, dist) * Matrix4.CreateTranslation(CameraPos.ToOVector());
-                GL.UniformMatrix4(2, false, ref scale);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/bottom").Bind();
-                skybox[0].Render(false);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/top").Bind();
-                skybox[1].Render(false);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/xm").Bind();
-                skybox[2].Render(false);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/xp").Bind();
-                skybox[3].Render(false);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/ym").Bind();
-                skybox[4].Render(false);
-                Textures.GetTexture("skies/" + CVars.r_skybox.Value + "/yp").Bind();
-                skybox[5].Render(false);
-                Textures.GetTexture("skies/sun").Bind(); // TODO: Store var? Make dynamic?
-                Matrix4 rot = Matrix4.CreateTranslation(-50f, -50f, 0f)
-                    * Matrix4.CreateRotationY((float)((-SunAngle.Pitch - 90f) * Utilities.PI180))
-                    * Matrix4.CreateRotationZ((float)((180f + SunAngle.Yaw) * Utilities.PI180))
-                    * Matrix4.CreateTranslation((CameraPos + TheSun.Direction * -200f).ToOVector()); // TODO: adjust based on view rad
-                Rendering.RenderRectangle(0, 0, 100, 100, rot); // TODO: Adjust scale based on view rad
-                Textures.GetTexture("skies/planet").Bind(); // TODO: Store var? Make dynamic?
-                Rendering.SetColor(new Color4(PlanetLight, PlanetLight, PlanetLight, 1));
-                rot = Matrix4.CreateTranslation(-50f, -50f, 0f)
-                    * Matrix4.CreateRotationY((float)((-PlanetAngle.Pitch - 90f) * Utilities.PI180))
-                    * Matrix4.CreateRotationZ((float)((180f + PlanetAngle.Yaw) * Utilities.PI180))
-                    * Matrix4.CreateTranslation((CameraPos + ThePlanet.Direction * -180f).ToOVector()); // TODO: adjust based on view rad
-                Rendering.RenderRectangle(0, 0, 100, 100, rot); // TODO: Adjust scale based on view rad
+                float dist = 200; // TODO: View rad * 0.75 or something
                 if (PlanetSunDist > 10)
                 {
                     Location rel = CameraPos + TheSun.Direction * -200f;
@@ -454,10 +465,11 @@
                     vec = Vector4.Transform(vec, combined);
                     Matrix4 ident = Matrix4.Identity;
                     GL.UniformMatrix4(1, false, ref ident);
+                    GL.UniformMatrix4(2, false, ref ident);
                     Location sunpos = new Location(vec.X / vec.W, vec.Y / vec.W, vec.Z / vec.W);
                     if (sunpos.X >= -1 && sunpos.X <= 1 && sunpos.Y >= -1 && sunpos.Y <= 1 && sunpos.Z <= 1 && sunpos.Z >= -1)
                     {
-                        CollisionResult trace = TheWorld.Collision.RayTrace(CameraPos, CameraPos + TheSun.Direction * -200f, Player.IgnoreThis);
+                        CollisionResult trace = TheWorld.Collision.RayTrace(CameraPos, CameraPos + TheSun.Direction * -dist, Player.IgnoreThis);
                         if (!trace.Hit)
                         {
                             Location start = new Location(sunpos.X, sunpos.Y, 0);
@@ -466,16 +478,15 @@
                             Textures.GetTexture("effects/lensflare/01").Bind(); // TODO: Store
                             Location one = (targ - start) / 2 + start;
                             float s1 = 0.1f;
-                            Rendering.RenderRectangle((float)one.X - s1, (float)one.Y - s1, (float)one.X + s1, (float)one.Y + s1, Matrix4.CreateTranslation(0, 0, 0.3f));
+                            Rendering.RenderRectangle((float)one.X - s1, (float)one.Y - s1, (float)one.X + s1, (float)one.Y + s1, Matrix4.CreateTranslation(0, 0, 0.95f));
                             Textures.GetTexture("effects/lensflare/02").Bind(); // TODO: Store
                             Location two = targ;
                             float s2 = 0.2f;
-                            Rendering.RenderRectangle((float)two.X - s2, (float)two.Y - s2, (float)two.X + s2, (float)two.Y + s2, Matrix4.CreateTranslation(0, 0, 0.2f));
+                            Rendering.RenderRectangle((float)two.X - s2, (float)two.Y - s2, (float)two.X + s2, (float)two.Y + s2, Matrix4.CreateTranslation(0, 0, 0.90f));
                             Textures.GetTexture("effects/lensflare/03").Bind(); // TODO: Store
                             Location three = (targ - start) / 2 + targ;
                             float s3 = 0.1f;
-                            Rendering.RenderRectangle((float)three.X - s3, (float)three.Y - s3, (float)three.X + s3, (float)three.Y + s3, Matrix4.CreateTranslation(0, 0, 0.1f));
-                            // Can see sun, probably!
+                            Rendering.RenderRectangle((float)three.X - s3, (float)three.Y - s3, (float)three.X + s3, (float)three.Y + s3, Matrix4.CreateTranslation(0, 0, 0.85f));
                         }
                     }
                 }
@@ -505,6 +516,7 @@
             }
             else
             {
+                RenderSkybox();
                 for (int i = 0; i < TheWorld.Entities.Count; i++)
                 {
                     TheWorld.Entities[i].Render();