Rename UI components

Rename UI components

--- Playground.PushSharp/Playground.PushSharp.WindowsForm/Main.Designer.cs
+++ Playground.PushSharp/Playground.PushSharp.WindowsForm/Main.Designer.cs
@@ -28,137 +28,136 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.button1 = new System.Windows.Forms.Button();
-            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.appleCertificate = new System.Windows.Forms.Label();
+            this.appleCertificateLocation = new System.Windows.Forms.Label();
+            this.tokenLabel = new System.Windows.Forms.Label();
+            this.ChooseAppleCertificate = new System.Windows.Forms.Button();
+            this.appleTokenBox = new System.Windows.Forms.TextBox();
             this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.textBox2 = new System.Windows.Forms.TextBox();
-            this.label5 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
-            this.button2 = new System.Windows.Forms.Button();
+            this.badgeNumericUpDown = new System.Windows.Forms.NumericUpDown();
+            this.alertBodyTextBox = new System.Windows.Forms.TextBox();
+            this.badgeLabel = new System.Windows.Forms.Label();
+            this.labelAlertBody = new System.Windows.Forms.Label();
+            this.pushButton = new System.Windows.Forms.Button();
             this.groupBox1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.badgeNumericUpDown)).BeginInit();
             this.SuspendLayout();
             //
-            // label1
+            // appleCertificate
             //
-            this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(24, 40);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(43, 16);
-            this.label1.TabIndex = 0;
-            this.label1.Text = "label1";
+            this.appleCertificate.AutoSize = true;
+            this.appleCertificate.Location = new System.Drawing.Point(24, 40);
+            this.appleCertificate.Name = "appleCertificate";
+            this.appleCertificate.Size = new System.Drawing.Size(105, 16);
+            this.appleCertificate.TabIndex = 0;
+            this.appleCertificate.Text = "Apple Certificate:";
             //
-            // label2
+            // appleCertificateLocation
             //
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(74, 40);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(43, 16);
-            this.label2.TabIndex = 1;
-            this.label2.Text = "label2";
+            this.appleCertificateLocation.AutoSize = true;
+            this.appleCertificateLocation.Location = new System.Drawing.Point(132, 40);
+            this.appleCertificateLocation.Name = "appleCertificateLocation";
+            this.appleCertificateLocation.Size = new System.Drawing.Size(51, 16);
+            this.appleCertificateLocation.TabIndex = 1;
+            this.appleCertificateLocation.Text = "Not Set";
             //
-            // label3
+            // tokenLabel
             //
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(24, 76);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(43, 16);
-            this.label3.TabIndex = 2;
-            this.label3.Text = "label3";
+            this.tokenLabel.AutoSize = true;
+            this.tokenLabel.Location = new System.Drawing.Point(24, 76);
+            this.tokenLabel.Name = "tokenLabel";
+            this.tokenLabel.Size = new System.Drawing.Size(49, 16);
+            this.tokenLabel.TabIndex = 2;
+            this.tokenLabel.Text = "Token: ";
             //
-            // button1
+            // ChooseAppleCertificate
             //
-            this.button1.Location = new System.Drawing.Point(244, 40);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
-            this.button1.TabIndex = 3;
-            this.button1.Text = "button1";
-            this.button1.UseVisualStyleBackColor = true;
+            this.ChooseAppleCertificate.Location = new System.Drawing.Point(244, 37);
+            this.ChooseAppleCertificate.Name = "ChooseAppleCertificate";
+            this.ChooseAppleCertificate.Size = new System.Drawing.Size(75, 23);
+            this.ChooseAppleCertificate.TabIndex = 3;
+            this.ChooseAppleCertificate.Text = "Choose...";
+            this.ChooseAppleCertificate.UseVisualStyleBackColor = true;
             //
-            // textBox1
+            // appleTokenBox
             //
-            this.textBox1.Location = new System.Drawing.Point(77, 73);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(242, 23);
-            this.textBox1.TabIndex = 4;
+            this.appleTokenBox.Location = new System.Drawing.Point(77, 73);
+            this.appleTokenBox.Name = "appleTokenBox";
+            this.appleTokenBox.Size = new System.Drawing.Size(242, 23);
+            this.appleTokenBox.TabIndex = 4;
             //
             // groupBox1
             //
-            this.groupBox1.Controls.Add(this.numericUpDown1);
-            this.groupBox1.Controls.Add(this.textBox2);
-            this.groupBox1.Controls.Add(this.label5);
-            this.groupBox1.Controls.Add(this.label4);
+            this.groupBox1.Controls.Add(this.badgeNumericUpDown);
+            this.groupBox1.Controls.Add(this.alertBodyTextBox);
+            this.groupBox1.Controls.Add(this.badgeLabel);
+            this.groupBox1.Controls.Add(this.labelAlertBody);
             this.groupBox1.Location = new System.Drawing.Point(27, 117);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Size = new System.Drawing.Size(292, 100);
             this.groupBox1.TabIndex = 5;
             this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "groupBox1";
             //
-            // textBox2
+            // badgeNumericUpDown
             //
-            this.textBox2.Location = new System.Drawing.Point(56, 27);
-            this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(230, 23);
-            this.textBox2.TabIndex = 2;
+            this.badgeNumericUpDown.Location = new System.Drawing.Point(78, 67);
+            this.badgeNumericUpDown.Name = "badgeNumericUpDown";
+            this.badgeNumericUpDown.Size = new System.Drawing.Size(120, 23);
+            this.badgeNumericUpDown.TabIndex = 3;
             //
-            // label5
+            // alertBodyTextBox
             //
-            this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(6, 69);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(43, 16);
-            this.label5.TabIndex = 1;
-            this.label5.Text = "label5";
+            this.alertBodyTextBox.Location = new System.Drawing.Point(78, 31);
+            this.alertBodyTextBox.Name = "alertBodyTextBox";
+            this.alertBodyTextBox.Size = new System.Drawing.Size(208, 23);
+            this.alertBodyTextBox.TabIndex = 2;
             //
-            // label4
+            // badgeLabel
             //
-            this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(6, 34);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(43, 16);
-            this.label4.TabIndex = 0;
-            this.label4.Text = "label4";
+            this.badgeLabel.AutoSize = true;
+            this.badgeLabel.Location = new System.Drawing.Point(6, 69);
+            this.badgeLabel.Name = "badgeLabel";
+            this.badgeLabel.Size = new System.Drawing.Size(48, 16);
+            this.badgeLabel.TabIndex = 1;
+            this.badgeLabel.Text = "Badge:";
             //
-            // numericUpDown1
+            // labelAlertBody
             //
-            this.numericUpDown1.Location = new System.Drawing.Point(55, 67);
-            this.numericUpDown1.Name = "numericUpDown1";
-            this.numericUpDown1.Size = new System.Drawing.Size(120, 23);
-            this.numericUpDown1.TabIndex = 3;
+            this.labelAlertBody.AutoSize = true;
+            this.labelAlertBody.Location = new System.Drawing.Point(6, 34);
+            this.labelAlertBody.Name = "labelAlertBody";
+            this.labelAlertBody.Size = new System.Drawing.Size(69, 16);
+            this.labelAlertBody.TabIndex = 0;
+            this.labelAlertBody.Text = "Alert Body:";
             //
-            // button2
+            // pushButton
             //
-            this.button2.Location = new System.Drawing.Point(244, 265);
-            this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(75, 23);
-            this.button2.TabIndex = 6;
-            this.button2.Text = "button2";
-            this.button2.UseVisualStyleBackColor = true;
+            this.pushButton.Location = new System.Drawing.Point(244, 265);
+            this.pushButton.Name = "pushButton";
+            this.pushButton.Size = new System.Drawing.Size(75, 23);
+            this.pushButton.TabIndex = 6;
+            this.pushButton.Text = "Push";
+            this.pushButton.UseVisualStyleBackColor = true;
             //
             // Main
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(331, 349);
-            this.Controls.Add(this.button2);
+            this.Controls.Add(this.pushButton);
             this.Controls.Add(this.groupBox1);
-            this.Controls.Add(this.textBox1);
-            this.Controls.Add(this.button1);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
+            this.Controls.Add(this.appleTokenBox);
+            this.Controls.Add(this.ChooseAppleCertificate);
+            this.Controls.Add(this.tokenLabel);
+            this.Controls.Add(this.appleCertificateLocation);
+            this.Controls.Add(this.appleCertificate);
             this.Font = new System.Drawing.Font("微軟正黑體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
             this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.Name = "Main";
             this.Text = "PushSharp";
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.badgeNumericUpDown)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();

@@ -166,17 +165,17 @@

         #endregion

-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.Label appleCertificate;
+        private System.Windows.Forms.Label appleCertificateLocation;
+        private System.Windows.Forms.Label tokenLabel;
+        private System.Windows.Forms.Button ChooseAppleCertificate;
+        private System.Windows.Forms.TextBox appleTokenBox;
         private System.Windows.Forms.GroupBox groupBox1;
-        private System.Windows.Forms.TextBox textBox2;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.NumericUpDown numericUpDown1;
-        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.TextBox alertBodyTextBox;
+        private System.Windows.Forms.Label badgeLabel;
+        private System.Windows.Forms.Label labelAlertBody;
+        private System.Windows.Forms.NumericUpDown badgeNumericUpDown;
+        private System.Windows.Forms.Button pushButton;

     }
 }


References to a scene object's prefab parent's prefab parent (at any depth) are now found correctly

--- Plugins/AssetUsageDetector/Editor/AssetUsageDetectorSearchFunctions.cs
+++ Plugins/AssetUsageDetector/Editor/AssetUsageDetectorSearchFunctions.cs
@@ -350,12 +350,16 @@
 			if( searchPrefabConnections )
 			{
 #if UNITY_2018_3_OR_NEWER
-				Object prefab = PrefabUtility.GetCorrespondingObjectFromSource( go );
-#else
-				Object prefab = PrefabUtility.GetPrefabParent( go );
-#endif
-				if( objectsToSearchSet.Contains( prefab ) && assetsToSearchRootPrefabs.ContainsFast( prefab as GameObject ) )
-					referenceNode.AddLinkTo( GetReferenceNode( prefab ), "Prefab object" );
+				Object prefab = go;
+				while( prefab = PrefabUtility.GetCorrespondingObjectFromSource( prefab ) )
+#endif
+				{
+#if !UNITY_2018_3_OR_NEWER
+					Object prefab = PrefabUtility.GetPrefabParent( go );
+#endif
+					if( objectsToSearchSet.Contains( prefab ) && assetsToSearchRootPrefabs.ContainsFast( prefab as GameObject ) )
+						referenceNode.AddLinkTo( GetReferenceNode( prefab ), "Prefab object" );
+				}
 			}

 			// Search through all the components of the object


Providing FxCop satisfaction.

Providing FxCop satisfaction.

--- Python/Product/PythonTools/PythonTools/Intellisense/ProjectAnalyzer.cs
+++ Python/Product/PythonTools/PythonTools/Intellisense/ProjectAnalyzer.cs
@@ -428,6 +428,7 @@
         class AnalysisProcessThreadInfo : AnalysisProcessInfo {
             private readonly Thread _thread;
             private readonly CancellationTokenSource _onKill;
+            private readonly AnonymousPipeClientStream _stdOut, _stdIn;
             private int _exitCode;

             public AnalysisProcessThreadInfo(
@@ -440,8 +441,8 @@
                 VsAnalyzer = vsAnalyzer;
                 _thread = thread;
                 _onKill = onKill;
-                StandardOutput = new AnonymousPipeClientStream(PipeDirection.Out, stdOutClientHandle);
-                StandardInput = new AnonymousPipeClientStream(PipeDirection.In, stdInClientHandle);
+                _stdOut = new AnonymousPipeClientStream(PipeDirection.Out, stdOutClientHandle);
+                _stdIn = new AnonymousPipeClientStream(PipeDirection.In, stdInClientHandle);
             }

             public void SetExitCode(int exitCode) {
@@ -451,8 +452,8 @@
             public CancellationToken CancellationToken => _onKill.Token;

             public VsProjectAnalyzer VsAnalyzer { get; }
-            public Stream StandardOutput { get; }
-            public Stream StandardInput { get; }
+            public Stream StandardOutput => _stdOut;
+            public Stream StandardInput => _stdIn;

             public override bool HasExited => !_thread.IsAlive;

@@ -460,8 +461,8 @@

             public override void Dispose() {
                 Kill();
-                StandardOutput.Dispose();
-                StandardInput.Dispose();
+                _stdOut.Dispose();
+                _stdIn.Dispose();
                 _onKill.Dispose();
             }


continue tests on concept scheme helper

continue tests on concept scheme helper

--- RDFSharp.Semantics.Test/Extensions/SKOS/SKOSConceptSchemeHelperTest.cs
+++ RDFSharp.Semantics.Test/Extensions/SKOS/SKOSConceptSchemeHelperTest.cs
@@ -18,6 +18,7 @@
 using RDFSharp.Model;
 using RDFSharp.Semantics.Extensions.SKOS;
 using System.Collections.Generic;
+using System.Linq;

 namespace RDFSharp.Semantics.Test
 {
@@ -156,6 +157,107 @@
             Assert.IsFalse(conceptSchemeNULL.CheckHasOrderedCollectionWithConcept(new RDFResource("ex:orderedCollection"), new RDFResource("ex:concept1")));
             Assert.IsFalse(conceptSchemeEMPTY.CheckHasOrderedCollectionWithConcept(new RDFResource("ex:orderedCollection"), new RDFResource("ex:concept1")));
         }
+
+        //ANALYZER
+
+        [TestMethod]
+        public void ShouldCheckHasTopConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareTopConcept(new RDFResource("ex:concept1"));
+
+            Assert.IsTrue(conceptScheme.CheckHasTopConcept(new RDFResource("ex:concept1")));
+        }
+
+        [TestMethod]
+        public void ShouldCheckHasNotTopConcept()
+        {
+            SKOSConceptScheme conceptSchemeNULL = null;
+            SKOSConceptScheme conceptSchemeEMPTY = new SKOSConceptScheme("ex:conceptSchemeEmpty");
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareTopConcept(new RDFResource("ex:concept1"));
+
+            Assert.IsFalse(conceptScheme.CheckHasTopConcept(new RDFResource("ex:concept2")));
+            Assert.IsFalse(conceptScheme.CheckHasTopConcept(null));
+            Assert.IsFalse(conceptSchemeNULL.CheckHasTopConcept(new RDFResource("ex:concept1")));
+            Assert.IsFalse(conceptSchemeEMPTY.CheckHasTopConcept(new RDFResource("ex:concept1")));
+        }
+
+        [TestMethod]
+        public void ShouldGetBroaderConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareBroaderConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsTrue(conceptScheme.GetBroaderConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept2"))));
+            Assert.IsTrue(conceptScheme.GetBroaderConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept3"))));
+            Assert.IsTrue(conceptScheme.GetBroaderConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept4")))); //Inference
+        }
+
+        [TestMethod]
+        public void ShouldCheckHasBroaderConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareBroaderConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept2"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsTrue(conceptScheme.CheckHasBroaderConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept2")));
+            Assert.IsTrue(conceptScheme.CheckHasBroaderConcept(new RDFResource("ex:concept2"), new RDFResource("ex:concept3")));
+            Assert.IsTrue(conceptScheme.CheckHasBroaderConcept(new RDFResource("ex:concept2"), new RDFResource("ex:concept4"))); //Inference
+        }
+
+        [TestMethod]
+        public void ShouldCheckHasNotBroaderConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareBroaderConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept2"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareBroaderTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsFalse(conceptScheme.CheckHasBroaderConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept3")));
+            Assert.IsFalse(conceptScheme.CheckHasBroaderConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept4")));
+        }
+
+        [TestMethod]
+        public void ShouldGetNarrowerConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareNarrowerConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsTrue(conceptScheme.GetNarrowerConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept2"))));
+            Assert.IsTrue(conceptScheme.GetNarrowerConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept3"))));
+            Assert.IsTrue(conceptScheme.GetNarrowerConcepts(new RDFResource("ex:concept1")).Any(c => c.Equals(new RDFResource("ex:concept4")))); //Inference
+        }
+
+        [TestMethod]
+        public void ShouldCheckHasNarrowerConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareNarrowerConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept2"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsTrue(conceptScheme.CheckHasNarrowerConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept2")));
+            Assert.IsTrue(conceptScheme.CheckHasNarrowerConcept(new RDFResource("ex:concept2"), new RDFResource("ex:concept3")));
+            Assert.IsTrue(conceptScheme.CheckHasNarrowerConcept(new RDFResource("ex:concept2"), new RDFResource("ex:concept4"))); //Inference
+        }
+
+        [TestMethod]
+        public void ShouldCheckHasNotNarrowerConcept()
+        {
+            SKOSConceptScheme conceptScheme = new SKOSConceptScheme("ex:conceptScheme");
+            conceptScheme.DeclareNarrowerConcepts(new RDFResource("ex:concept1"), new RDFResource("ex:concept2"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept2"), new RDFResource("ex:concept3"));
+            conceptScheme.DeclareNarrowerTransitiveConcepts(new RDFResource("ex:concept3"), new RDFResource("ex:concept4"));
+
+            Assert.IsFalse(conceptScheme.CheckHasNarrowerConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept3")));
+            Assert.IsFalse(conceptScheme.CheckHasNarrowerConcept(new RDFResource("ex:concept1"), new RDFResource("ex:concept4")));
+        }
         #endregion
     }
 }


enable recording tests possibly not all of stream is being saved - problems with zero length files being created

--- Palaso.Media.Tests/AudioRecorderTests.cs
+++ Palaso.Media.Tests/AudioRecorderTests.cs
@@ -38,7 +38,7 @@
 		   Assert.IsFalse(File.Exists(path));
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void StopRecording_NotRecording_Throws()
 	   {
 		   var x = AudioFactory.AudioSession(Path.GetRandomFileName());
@@ -46,7 +46,7 @@
 x.StopRecordingAndSaveAsWav());
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void StopPlaying_WhilePlaying_Ok()
 	   {
 		   using (var session = new RecordingSession(1000))
@@ -57,7 +57,7 @@
 		   }
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void Record_AfterRecordThenStop_Ok()
 	   {
 		   using (var session = new RecordingSession(100))
@@ -68,7 +68,7 @@
 		   }
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void Play_WhileRecording_Throws()
 	   {
 		   using (var session = new RecordingSession())
@@ -78,7 +78,7 @@
 		   }
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void CanRecord_FileDoesNotExist_True()
 	   {
 		   var x = AudioFactory.AudioSession(Path.GetRandomFileName());
@@ -92,7 +92,7 @@
 		   Assert.IsFalse(x.CanStop);
 	   }

-	   [Test, Ignore("recording")]
+	   [Test]
 	   public void CanRecord_ConstructWithEmptyFile_True()
 	   {
 		   using (var f = new TempFile())
@@ -118,6 +118,230 @@
 		   var x = AudioFactory.AudioSession(Path.GetRandomFileName());
 		Assert.Throws<FileNotFoundException>(() =>
 x.Play());
+	   }
+
+	   [Test]
+	   public void CanStop_WhilePlaying_True()
+	   {
+			using (var session = new RecordingSession(1000))
+		   {
+				session.Recorder.Play();
+				Thread.Sleep(100);
+			   Assert.IsTrue(session.Recorder.CanStop);
+		   }
+	   }
+
+
+	   [Test]
+	   public void RecordAndStop_FileAlreadyExists_FileReplaced()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   var old = File.GetLastWriteTimeUtc(f.Path);
+			   var x = AudioFactory.AudioSession(f.Path);
+			   x.StartRecording();
+			   Thread.Sleep(100);
+			   x.StopRecordingAndSaveAsWav();
+			   Assert.Greater(File.GetLastWriteTimeUtc(f.Path), old);
+		   }
+	   }
+
+	   [Test]
+	   public void IsRecording_WhileRecording_True()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   var x = AudioFactory.AudioSession(f.Path);
+			   x.StartRecording();
+			   Thread.Sleep(100);
+			   Assert.IsTrue(x.IsRecording);
+			   x.StopRecordingAndSaveAsWav();
+		   }
+	   }
+
+	   [Test]
+	   public void RecordThenPlay_SmokeTest()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   var w = new BackgroundWorker();
+			   w.DoWork+=new DoWorkEventHandler((o,args)=> SystemSounds.Exclamation.Play());
+
+			   var x = AudioFactory.AudioSession(f.Path);
+			   x.StartRecording();
+			  w.RunWorkerAsync();
+			   Thread.Sleep(1000);
+			   x.StopRecordingAndSaveAsWav();
+			   x.Play();
+			   Thread.Sleep(1000);
+		   }
+	   }
+
+	   [Test]
+	   public void Play_GiveThaiFileName_ShouldHearTwoSounds()
+	   {
+		   using (var d = new TemporaryFolder("palaso media test"))
+		   {
+			   var soundPath = d.Combine("ก.wav");
+			   File.Create(soundPath).Close();
+			   using (var f = TempFile.TrackExisting(soundPath))
+			   {
+				   var w = new BackgroundWorker();
+				   w.DoWork += new DoWorkEventHandler((o, args) => SystemSounds.Exclamation.Play());
+
+				   var x = AudioFactory.AudioSession(f.Path);
+				   x.StartRecording();
+				   w.RunWorkerAsync();
+				   Thread.Sleep(1000);
+				   x.StopRecordingAndSaveAsWav();
+
+				   var y = AudioFactory.AudioSession(f.Path);
+				   y.Play();
+				   Thread.Sleep(1000);
+			   }
+		   }
+	   }
+
+
+	   /// <summary>
+	   /// for testing things while recording is happening
+	   /// </summary>
+	   class RecordingSession:IDisposable
+	   {
+		   private TempFile _tempFile;
+		   private ISimpleAudioSession _recorder;
+
+		   public RecordingSession()
+		   {
+			   _tempFile = new TempFile();
+			   _recorder = AudioFactory.AudioSession(_tempFile.Path);
+			   _recorder.StartRecording();
+			   Thread.Sleep(100);
+		   }
+
+		   public RecordingSession(int millisecondsToRecordBeforeStopping)
+			  : this()
+		   {
+			   Thread.Sleep(1000);//record a second
+			   _recorder.StopRecordingAndSaveAsWav();
+		   }
+
+		   public ISimpleAudioSession Recorder
+		   {
+			   get { return _recorder; }
+		   }
+
+		   public void Stop()
+		   {
+			   _recorder.StopRecordingAndSaveAsWav();
+		   }
+		   public void Dispose()
+		   {
+			   if (_recorder.IsRecording)
+			   {
+				   _recorder.StopRecordingAndSaveAsWav();
+			   }
+			   _tempFile.Dispose();
+		   }
+	   }
+
+	   [Test]
+	   public void CanStop_WhileRecording_True()
+	   {
+		   using (var session = new RecordingSession())
+		   {
+			   Assert.IsTrue(session.Recorder.CanStop);
+		   }
+	   }
+
+	   [Test]
+	   public void CanPlay_WhileRecording_False()
+	   {
+		   using (var session = new RecordingSession())
+		   {
+			   Assert.IsFalse(session.Recorder.CanPlay);
+		   }
+	   }
+
+	   [Test]
+	   public void CanRecord_WhileRecording_False()
+	   {
+		   using (var session = new RecordingSession())
+		   {
+			   Assert.IsFalse(session.Recorder.CanRecord);
+		   }
+	   }
+
+	   [Test]
+	   public void StartRecording_WhileRecording_Throws()
+	   {
+		   using (var session = new RecordingSession())
+		   {
+			Assert.Throws<ApplicationException>(() =>
+session.Recorder.StartRecording());
+		   }
+	   }
+
+	   [Test]
+	   public void CanRecord_WhilePlaying_False()
+	   {
+		   using (var session = new RecordingSession(1000))
+		   {
+			   session.Recorder.Play();
+			   Thread.Sleep(100);
+			   Assert.IsTrue(session.Recorder.IsPlaying);
+			   Assert.IsFalse(session.Recorder.CanRecord);
+		   }
+	   }
+
+	   [Test]
+	   public void CanPlay_WhilePlaying_False()
+	   {
+		   using (var session = new RecordingSession(1000))
+		   {
+			   session.Recorder.Play();
+			   Thread.Sleep(100);
+			   Assert.IsFalse(session.Recorder.CanPlay);
+		   }
+	   }
+
+	   [Test]
+	   public void IsRecording_AfterRecording_False()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   ISimpleAudioSession x = RecordSomething(f);
+			   Assert.IsFalse(x.IsRecording);
+		   }
+	   }
+
+	   [Test]
+	   public void RecordThenStop_CanPlay_IsTrue()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   ISimpleAudioSession x = RecordSomething(f);
+			   Assert.IsTrue(x.CanPlay);
+		   }
+	   }
+
+	   [Test]
+	   public void RecordThenPlay_OK()
+	   {
+		   using (var f = new TempFile())
+		   {
+			   ISimpleAudioSession x = RecordSomething(f);
+			   x.Play();
+		   }
+	   }
+
+	   private ISimpleAudioSession RecordSomething(TempFile f)
+	   {
+		   var x = AudioFactory.AudioSession(f.Path);
+		   x.StartRecording();
+		   Thread.Sleep(100);
+		   x.StopRecordingAndSaveAsWav();
+		   return x;
 	   }

 	   [Test]
@@ -131,228 +355,15 @@
 			}
 	   }

-	   [Test, Ignore("recording")]
-	   public void CanStop_WhilePlaying_True()
-	   {
-			using (var session = new RecordingSession(1000))
-		   {
-				session.Recorder.Play();
-				Thread.Sleep(100);
-			   Assert.IsTrue(session.Recorder.CanStop);
-		   }
-	   }
-
-
-	   [Test, Ignore("recording")]
-	   public void RecordAndStop_FileAlreadyExists_FileReplaced()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   var old = File.GetLastWriteTimeUtc(f.Path);
-			   var x = AudioFactory.AudioSession(f.Path);
-			   x.StartRecording();
-			   Thread.Sleep(100);
-			   x.StopRecordingAndSaveAsWav();
-			   Assert.Greater(File.GetLastWriteTimeUtc(f.Path), old);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void IsRecording_WhileRecording_True()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   var x = AudioFactory.AudioSession(f.Path);
-			   x.StartRecording();
-			   Thread.Sleep(100);
-			   Assert.IsTrue(x.IsRecording);
-			   x.StopRecordingAndSaveAsWav();
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void RecordThenPlay_SmokeTest()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   var w = new BackgroundWorker();
-			   w.DoWork+=new DoWorkEventHandler((o,args)=> SystemSounds.Exclamation.Play());
-
-			   var x = AudioFactory.AudioSession(f.Path);
-			   x.StartRecording();
-			  w.RunWorkerAsync();
-			   Thread.Sleep(1000);
-			   x.StopRecordingAndSaveAsWav();
-			   x.Play();
-			   Thread.Sleep(1000);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void Play_GiveThaiFileName_ShouldHearTwoSounds()
-	   {
-		   using (var d = new TemporaryFolder("palaso media test"))
-		   {
-			   var soundPath = d.Combine("ก.wav");
-			   File.Create(soundPath).Close();
-			   using (var f = TempFile.TrackExisting(soundPath))
-			   {
-				   var w = new BackgroundWorker();
-				   w.DoWork += new DoWorkEventHandler((o, args) => SystemSounds.Exclamation.Play());
-
-				   var x = AudioFactory.AudioSession(f.Path);
-				   x.StartRecording();
-				   w.RunWorkerAsync();
-				   Thread.Sleep(1000);
-				   x.StopRecordingAndSaveAsWav();
-
-				   var y = AudioFactory.AudioSession(f.Path);
-				   y.Play();
-				   Thread.Sleep(1000);
-			   }
-		   }
-	   }
-
-
-	   /// <summary>
-	   /// for testing things while recording is happening
-	   /// </summary>
-	   class RecordingSession:IDisposable
-	   {
-		   private TempFile _tempFile;
-		   private ISimpleAudioSession _recorder;
-
-		   public RecordingSession()
-		   {
-			   _tempFile = new TempFile();
-			   _recorder = AudioFactory.AudioSession(_tempFile.Path);
-			   _recorder.StartRecording();
-			   Thread.Sleep(100);
-		   }
-
-		   public RecordingSession(int millisecondsToRecordBeforeStopping)
-			  : this()
-		   {
-			   Thread.Sleep(1000);//record a second
-			   _recorder.StopRecordingAndSaveAsWav();
-		   }
-
-		   public ISimpleAudioSession Recorder
-		   {
-			   get { return _recorder; }
-		   }
-
-		   public void Stop()
-		   {
-			   _recorder.StopRecordingAndSaveAsWav();
-		   }
-		   public void Dispose()
-		   {
-			   if (_recorder.IsRecording)
-			   {
-				   _recorder.StopRecordingAndSaveAsWav();
-			   }
-			   _tempFile.Dispose();
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void CanStop_WhileRecording_True()
-	   {
-		   using (var session = new RecordingSession())
-		   {
-			   Assert.IsTrue(session.Recorder.CanStop);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void CanPlay_WhileRecording_False()
-	   {
-		   using (var session = new RecordingSession())
-		   {
-			   Assert.IsFalse(session.Recorder.CanPlay);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void CanRecord_WhileRecording_False()
-	   {
-		   using (var session = new RecordingSession())
-		   {
-			   Assert.IsFalse(session.Recorder.CanRecord);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void StartRecording_WhileRecording_Throws()
-	   {
-		   using (var session = new RecordingSession())
-		   {
-			Assert.Throws<ApplicationException>(() =>
-session.Recorder.StartRecording());
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void CanRecord_WhilePlaying_False()
-	   {
-		   using (var session = new RecordingSession(1000))
-		   {
-			   session.Recorder.Play();
-			   Thread.Sleep(100);
-			   Assert.IsTrue(session.Recorder.IsPlaying);
-			   Assert.IsFalse(session.Recorder.CanRecord);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void CanPlay_WhilePlaying_False()
-	   {
-		   using (var session = new RecordingSession(1000))
-		   {
-			   session.Recorder.Play();
-			   Thread.Sleep(100);
-			   Assert.IsFalse(session.Recorder.CanPlay);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void IsRecording_AfterRecording_False()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   ISimpleAudioSession x = RecordSomething(f);
-			   Assert.IsFalse(x.IsRecording);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void RecordThenStop_CanPlay_IsTrue()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   ISimpleAudioSession x = RecordSomething(f);
-			   Assert.IsTrue(x.CanPlay);
-		   }
-	   }
-
-	   [Test, Ignore("recording")]
-	   public void RecordThenPlay_OK()
-	   {
-		   using (var f = new TempFile())
-		   {
-			   ISimpleAudioSession x = RecordSomething(f);
-			   x.Play();
-		   }
-	   }
-
-	   private ISimpleAudioSession RecordSomething(TempFile f)
-	   {
-		   var x = AudioFactory.AudioSession(f.Path);
-		   x.StartRecording();
-		   Thread.Sleep(100);
-		   x.StopRecordingAndSaveAsWav();
-		   return x;
+	   [Test]
+		public void Record_DoesRecord ()
+		{
+
+			string fpath = "/tmp/dump.ogg";
+			var x = AudioFactory.AudioSession (fpath);
+			x.StartRecording();
+			Thread.Sleep(1000);
+			x.StopRecordingAndSaveAsWav();
 	   }
 	}
 }


Tweak double-click handling again!

Tweak double-click handling again!

--- UIExension/MindMapUIExtension/MindMapUIExtensionCore/MindMapControl.cs
+++ UIExension/MindMapUIExtension/MindMapUIExtensionCore/MindMapControl.cs
@@ -349,17 +349,17 @@

 				if (IsRoot(hit))
 				{
-					if (IsAnyNodeCollapsed(RootNode.Nodes))
+					if (IsAnyNodeExpanded(RootNode.Nodes))
+						expand = ExpandNode.CollapseAll;
+					else
 						expand = ExpandNode.ExpandAll;
-					else
-						expand = ExpandNode.CollapseAll;
 				}
 				else if (IsParent(hit))
 				{
-					if (!hit.IsExpanded || IsAnyNodeCollapsed(hit.Nodes))
+					if (IsAnyNodeExpanded(hit.Nodes))
+						expand = ExpandNode.CollapseSelection;
+					else
 						expand = ExpandNode.ExpandSelectionAll;
-					else
-						expand = ExpandNode.CollapseSelection;
 				}

 				if (expand != ExpandNode.ExpandNone)


Allow integer rotation..

Allow integer rotation..

--- PartPreviewWindow/View3DTransfromPart.cs
+++ PartPreviewWindow/View3DTransfromPart.cs
@@ -1569,7 +1569,7 @@
             degreesContainer.AddChild(degreesLabel);
             degreesContainer.AddChild(horizontalSpacer);

-            MHNumberEdit degreesControl = new MHNumberEdit(45, pixelWidth: 40, allowNegatives: true, increment: 5, minValue: -360, maxValue: 360);
+            MHNumberEdit degreesControl = new MHNumberEdit(45, pixelWidth: 40, allowNegatives: true, allowDecimals: true, increment: 5, minValue: -360, maxValue: 360);
             degreesControl.VAnchor = Agg.UI.VAnchor.ParentTop;
             degreesContainer.AddChild(degreesControl);
             rotateControls.Add(degreesControl);


Implement dropping via insertion point

Implement dropping via insertion point

--- UIExension/MindMapUIExtension/MindMapUIExtensionCore/MindMapControl.cs
+++ UIExension/MindMapUIExtension/MindMapUIExtensionCore/MindMapControl.cs
@@ -570,14 +570,18 @@
 		protected override void OnDragDrop(DragEventArgs e)
 		{
 			RedrawNode(m_DropTarget, false);
+            Invalidate(CalculateInsertionMarkerRect(m_DropTarget, m_DropPos));
+
 			m_DropTarget = null;
+            m_DropPos = DropPos.None;

 			TreeNode draggedNode = (TreeNode)e.Data.GetData(typeof(TreeNode));

 			Point dropPt = PointToClient(new Point(e.X, e.Y));
 			TreeNode dropTarget = HitTestPositions(dropPt);
-
-			DoDrop(draggedNode, dropTarget, ((e.KeyState & 8) == 8));
+            DropPos dropPos = GetDropPos(dropTarget, dropPt);
+
+			DoDrop(draggedNode, dropTarget, dropPos, ((e.KeyState & 8) == 8));
 		}

 		protected override void OnQueryContinueDrag(QueryContinueDragEventArgs e)
@@ -723,21 +727,43 @@
 			return rect;
 		}

-		private void DoDrop(TreeNode draggedNode, TreeNode dropTarget, bool copy)
+		private void DoDrop(TreeNode draggedNode, TreeNode dropTarget, DropPos dropPos, bool copy)
 		{
 			if (IsAcceptableDropTarget(draggedNode, dropTarget))
 			{
+                TreeNode parentNode = null, afterSiblingNode = null;
+
+                switch (dropPos)
+                {
+                    case DropPos.On:
+                        parentNode = dropTarget;
+                        afterSiblingNode = null;
+                        break;
+
+                    case DropPos.Above:
+                        parentNode = dropTarget.Parent;
+                        afterSiblingNode = dropTarget.PrevNode;
+                        break;
+
+                    case DropPos.Below:
+                        parentNode = dropTarget.Parent;
+                        afterSiblingNode = dropTarget;
+                        break;
+                }
+
+                var args = new MindMapDragEventArgs();
+
+				args.selectedUniqueID = UniqueID(draggedNode);
+				args.targetParentUniqueID = UniqueID(parentNode);
+				args.afterSiblingUniqueID = UniqueID(afterSiblingNode);
+
+				args.selectedItemData = draggedNode.Tag;
+                args.targetParentItemData = parentNode.Tag;
+
+                if (afterSiblingNode != null)
+				    args.afterSiblingItemData = afterSiblingNode.Tag;
+
 				// Let derived class have first go
-				var args = new MindMapDragEventArgs();
-
-				args.selectedUniqueID = UniqueID(draggedNode);
-				args.targetParentUniqueID = UniqueID(dropTarget);
-				args.afterSiblingUniqueID = 0;
-
-				args.selectedItemData = draggedNode.Tag;
-				args.targetParentItemData = dropTarget.Tag;
-				args.afterSiblingItemData = null;
-
 				if (DoDrop(args))
 				{
 					// they handled it
@@ -747,13 +773,18 @@
 				// Remove the node from its current
 				// location and add it to the node at the drop location.
 				draggedNode.Remove();
-				dropTarget.Nodes.Add(draggedNode);
-
-				// Expand the node at the location
-				// to show the dropped node.
-				dropTarget.Expand();
+
+                int insertionPos = 0;
+
+                if (afterSiblingNode != null)
+                    insertionPos = (parentNode.Nodes.IndexOf(afterSiblingNode) + 1);
+
+				parentNode.Nodes.Insert(insertionPos, draggedNode);
+                parentNode.Expand();

 				SelectedNode = draggedNode;
+
+                RecalculatePositions();
 			}
 		}

@@ -1531,6 +1562,9 @@

         private Rectangle CalculateInsertionMarkerRect(TreeNode node, DropPos dropPos)
         {
+            if (node == null)
+                return Rectangle.Empty;
+
             if ((dropPos == DropPos.On) || (m_DropPos == DropPos.None))
                 return Rectangle.Empty;


Removed redundant test code.

Removed redundant test code.

--- Piccolo/Request/RequestHandlerInvoker.cs
+++ Piccolo/Request/RequestHandlerInvoker.cs
@@ -20,11 +20,6 @@
 		{
 			_jsonDeserialiser = jsonDeserialiser;
 			_parsers = parsers;
-		}
-
-		public HttpResponseMessage Execute(IRequestHandler requestHandler, string verb, string rawPayload, object payloadValidator)
-		{
-			throw new NotImplementedException();
 		}

 		public HttpResponseMessage Execute(IRequestHandler requestHandler, string verb, IDictionary<string, string> routeParameters, IDictionary<string, string> queryParameters, IDictionary<string, object> contextualParameters, string rawPayload, object payloadValidator)
@@ -161,7 +156,6 @@

 	public interface IRequestHandlerInvoker
 	{
-		HttpResponseMessage Execute(IRequestHandler requestHandler, string verb, string rawPayload, object payloadValidator);
 		HttpResponseMessage Execute(IRequestHandler requestHandler, string verb, IDictionary<string, string> routeParameters, IDictionary<string, string> queryParameters, IDictionary<string, object> contextualParameters, string rawPayload, object payloadValidator);
 	}
 }


[VsIntegration] Added "Resources" category on project property page

--- VisualStudio/ProjectPackage/PropertyPages/XSharpGeneralPropertyPage.cs
+++ VisualStudio/ProjectPackage/PropertyPages/XSharpGeneralPropertyPage.cs
@@ -44,6 +44,7 @@
         internal const string descDialect = "Select the compiler dialect to use when compiling this project. Changing the dialect may also change the 'Allow NamedArguments' setting on the Language page.";
         internal const string captWin32Manifest = "Suppress default Win32 manifest";
         internal const string descWin32Manifest = "Suppress default Win32 manifest. You will have to supply your own Win32 manifest if you suppress the default one. (/nowin32manifest)";
+        internal const string catResources = "Resources";
         #endregion

         #region Constructors
@@ -108,7 +109,7 @@
         }

-        [ResourcesCategory(Resources.Application)]
+        [ResourcesCategory(catResources)]
         [DisplayName(captVulcanCompatibleResouces)]
         [Description(descVulcanCompatibleResouces)]
         public bool VulcanCompatibleResources
@@ -117,7 +118,7 @@
             set { this.vulcanCompatibleResources = value; this.IsDirty = true; }
         }

-        [ResourcesCategory(Resources.Application)]
+        [ResourcesCategory(catResources)]
         [DisplayName(captWin32Manifest)]
         [Description(descWin32Manifest)]
         public bool NoWin32Manifest
@@ -153,7 +154,7 @@
             set { this.startupObject = value; this.IsDirty = true; }
         }

-        [ResourcesCategory(Resources.Application)]
+        [ResourcesCategory(catResources)]
         [LocDisplayName(Resources.ApplicationIcon)]
         [ResourcesDescription(Resources.ApplicationIconDescription)]
         /// <summary>


Fix an output file path problem

Fix an output file path problem

--- PlantUmlClassDiagramGenerator/Program.cs
+++ PlantUmlClassDiagramGenerator/Program.cs
@@ -125,7 +125,7 @@
                 Console.WriteLine( $"Processing \"{inputFile}\"..." );
                 try
                 {
-                    var outputDir = Path.GetDirectoryName(inputFile).Replace(inputRoot, outputRoot);
+                    var outputDir = Path.Combine(outputRoot, Path.GetDirectoryName(inputFile).Replace(inputRoot, ""));
                     Directory.CreateDirectory(outputDir);
                     var outputFile = Path.Combine(outputDir,
                         Path.GetFileNameWithoutExtension(inputFile) + ".puml");


Added section for temporarily un-selected order info to reside

--- Purchasing.Web/Views/Home/Landing.cshtml
+++ Purchasing.Web/Views/Home/Landing.cshtml
@@ -61,7 +61,7 @@
                     Current level

-

+

                 @Html.Partial("_OrderRows", urgentOrders)

@@ -72,6 +72,11 @@

+
+

+

+        @Html.Partial("_OrderRows", Model.PendingOrders)
+

         Recent activity


Remove ugly spaces

Remove ugly spaces

--- RDFSharp/Query/Mirella/RDFQueryEngine.cs
+++ RDFSharp/Query/Mirella/RDFQueryEngine.cs
@@ -768,7 +768,7 @@
                     //Apply the query to the SPARQL endpoint / FEDERATION
                     RDFConstructQueryResult constructQueryResults =
                         dataSource.IsSPARQLEndpoint() ? constructQuery.ApplyToSPARQLEndpoint((RDFSPARQLEndpoint)dataSource)
-                                                        : constructQuery.ApplyToFederation((RDFFederation)dataSource);
+                                                      : constructQuery.ApplyToFederation((RDFFederation)dataSource);
                     result.Merge(constructQueryResults.ConstructResults, true, MissingSchemaAction.Add);
                 }
             }


re-use underscore constant - avoid using literal char a second time

--- RavenMigrations/RavenMigrationHelpers.cs
+++ RavenMigrations/RavenMigrationHelpers.cs
@@ -14,7 +14,7 @@
         {
             const char underscore = '_';
             var type = migration.GetType();
-            var idSafeTypeName = Regex.Replace(type.Name, "_{2,}", "_")
+            var idSafeTypeName = Regex.Replace(type.Name, underscore + "{2,}", underscore.ToString())
                 .Trim(underscore);
             var name = idSafeTypeName
                 .Replace(underscore, seperator)


add unit test for xml writer encoding setting

--- Refit.Tests/XmlContentSerializerTests.cs
+++ Refit.Tests/XmlContentSerializerTests.cs
@@ -1,7 +1,9 @@
 using System;
 using System.Net.Http;
+using System.Text;
 using System.Threading.Tasks;
 using System.Xml;
+using System.Xml.Linq;
 using System.Xml.Serialization;
 using Xunit;

@@ -92,6 +94,29 @@
             Assert.Equal("123", dto.Identifier);
         }

+        [Fact]
+        public async Task XmlEncodingShouldMatchWriterSettingAsync()
+        {
+            var encoding = Encoding.UTF7;
+            var serializerSettings = new XmlContentSerializerSettings
+            {
+                XmlReaderWriterSettings = new XmlReaderWriterSettings()
+                {
+                    WriterSettings = new XmlWriterSettings()
+                    {
+                        Encoding = encoding
+                    }
+                }
+            };
+            var sut = new XmlContentSerializer(serializerSettings);
+
+            var dto = BuildDto();
+            var content = await sut.SerializeAsync(dto);
+            var xml = XDocument.Parse(await content.ReadAsStringAsync());
+            var documentEncoding = xml.Declaration.Encoding;
+            Assert.Equal(encoding.WebName, documentEncoding);
+        }
+
         private static Dto BuildDto()
         {
             var dto = new Dto


removed the unused variable.

removed the unused variable.

--- SampleCSharp7/FirstConsoleApp/Program.cs
+++ SampleCSharp7/FirstConsoleApp/Program.cs
@@ -10,9 +10,9 @@
             ForegroundColor = ConsoleColor.Yellow;
             var student = new Student();
             var scores = new[] {17, 46, 39, 62, 81, 79, 52, 24};
-            const int threshold = 51;
+            const int threshold = 40;

-            var (average, studentCount, belowAverage) = student.GetAverageAndCount(scores, threshold);
+            var (average, studentCount, _) = student.GetAverageAndCount(scores, threshold);
             WriteLine($"Average was {average} across {studentCount} students. Below Average: {(average < threshold ? " Class score below average." : " Class score above average.")}");

             WriteLine("\n\nPress any key...");


Apply new GetVar/SetVar to 03_Sprites sample

--- Samples/Samples/InProgress/03_Sprites.cs
+++ Samples/Samples/InProgress/03_Sprites.cs
@@ -3,12 +3,10 @@

 class _03_Sprites : Sample
 {
-    private Scene scene;
-    private bool drawDebug;
-    private List<Sprite> sprites_;
-    private Camera camera;
+    private readonly List<Sprite> sprites = new List<Sprite>();
     // Number of sprites to draw
-    private const uint NUM_SPRITES = 100;
+    private const uint NumSprites = 100;
+    private const string VarVelocity = "Velocity";

     public _03_Sprites(Context ctx) : base(ctx) { }

@@ -36,7 +34,7 @@
         // Get the Urho3D fish texture
         Texture2D decalTex = cache.GetTexture2D("Textures/UrhoDecal.dds");

-        for (uint i = 0; i < NUM_SPRITES; ++i)
+        for (uint i = 0; i < NumSprites; ++i)
         {
             // Create a new sprite, set it to use the texture
             Sprite sprite=new Sprite(Context);
@@ -61,42 +59,42 @@
             ui.Root.AddChild(sprite);

             // Store sprite's velocity as a custom variable
-#warning MISSING_API SetVar
-            //sprite.SetVar(VAR_VELOCITY, new Vector2(NextRandom(200.0f) - 100.0f, NextRandom(200.0f) - 100.0f));
+            sprite.SetVar(VarVelocity, new Vector2(NextRandom(200.0f) - 100.0f, NextRandom(200.0f) - 100.0f));

             // Store sprites to our own container for easy movement update iteration
-            sprites_.Add(sprite);
+            sprites.Add(sprite);
         }
     }

     private void MoveSprites(float timeStep)
     {
         var graphics = Graphics;
-        float width = (float)graphics.Width;
-        float height = (float)graphics.Height;
+        int width = graphics.Width;
+        int height = graphics.Height;

         // Go through all sprites
-        for (int i = 0; i < sprites_.Count; ++i)
+
+        foreach (var sprite in sprites)
         {
-            Sprite sprite = sprites_[i];
-
             // Rotate
             float newRot = sprite.Rotation + timeStep * 30.0f;
             sprite.Rotation=newRot;

-            // Move, wrap around rendering window edges
-#warning MISSING_API GetVar
-            //IntVector2 newPos = spritePosition + sprite.GetVar(VAR_VELOCITY).GetVector2() * timeStep;
-            //if (newPos.X < 0.0f)
-            //    newPos.X += width;
-            //if (newPos.X >= width)
-            //    newPos.X -= width;
-            //if (newPos.Y < 0.0f)
-            //    newPos.Y += height;
-            //if (newPos.Y >= height)
-            //    newPos.Y -= height;
-            //sprite.Position = (newPos);
+            var vector = (Vector2) sprite.GetVar(VarVelocity);
+
+            var x = vector.X * timeStep + sprite.Position.X;
+            var y = vector.Y * timeStep + sprite.Position.Y;
+
+            if (x < 0.0f)
+                x += width;
+            if (x >= width)
+                x -= width;
+            if (y < 0.0f)
+                y += height;
+            if (y >= height)
+                y -= height;
+
+            sprite.Position = new IntVector2((int) x, (int) y);
         }
     }
-
 }


Correct line endings

Correct line endings

--- ScadaData/ScadaData/Common/ScadaUtils.cs
+++ ScadaData/ScadaData/Common/ScadaUtils.cs
@@ -79,7 +79,7 @@
         /// </summary>
         public static string CorrectDirectorySeparator(string path)
         {
-            // Path.AltDirectorySeparatorChar == '/' для Mono, что некорректно
+            // Path.AltDirectorySeparatorChar == '/' для Mono, что некорректно
             return path.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
         }


Remove unnecessary code from integration test.

--- test/DarkSkyCore.Tests/IntegrationTests/DarkSkyServiceIntegrationTests.cs
+++ test/DarkSkyCore.Tests/IntegrationTests/DarkSkyServiceIntegrationTests.cs
@@ -14,33 +14,16 @@
 		readonly string _apiEnvVar = "DarkSkyApiKey";
 		readonly double _latitude = 42.915;
 		readonly double _longitude = -78.741;
-		private DarkSkyService __darkSky;
-		object lockObject = new object();
-
-		private DarkSkyService _darkSky
-		{
-			get
-			{
-				lock (lockObject)
-				{
-					if (__darkSky == null)
-						__darkSky = GetDarkSkyService();
-				}
-				return __darkSky;
-			}
-		}
-
-
-		DarkSkyService GetDarkSkyService()
-		{
-			var configBuilder = new ConfigurationBuilder()
-				.AddEnvironmentVariables();
+		private DarkSkyService _darkSky;
+
+		public DarkSkyServiceIntegrationTests()
+		{
+			var configBuilder = new ConfigurationBuilder().AddEnvironmentVariables();
 			var config = configBuilder.Build();
 			var apiKey = config.GetValue<string>(_apiEnvVar);
 			Assert.False(string.IsNullOrWhiteSpace(apiKey), $"You must set the environment variable {_apiEnvVar}");
-			return new DarkSkyService(apiKey);
-		}
-
+			_darkSky = new DarkSkyService(apiKey);
+		}

 		[Fact]
 		public async Task BuffaloForecastCombineAllOptions()
@@ -212,27 +195,22 @@
 			Assert.Equal(forecast.Response.Longitude, _longitude);
 		}

-
 		[Fact]
 		public async Task HandleInvalidApiKey()
 		{
-			// Arrange
-			var client = new DarkSkyService(_apiEnvVar);
-
-			// Act
+			// Use a different client to create one with an invalid API key.
+			var client = new DarkSkyService("ThisIsAFakeKey");
+
 			var forecast = await client.GetForecast(_latitude, _longitude);

-			// Assert
-			Assert.NotNull(forecast);
-
+			Assert.NotNull(forecast);
 			Assert.False(forecast.IsSuccessful);
 			Assert.NotEmpty(forecast.ResponseReasonPhrase);
-
 		}

 		public void Dispose()
 		{
-			__darkSky = null;
+			_darkSky = null;
 			JsonConvert.DefaultSettings = () => new JsonSerializerSettings
 			{
 				MissingMemberHandling = MissingMemberHandling.Ignore


Setting of father & mother markers in DTTOTAL

--- PART/Source/CprBroker/DBR/Extensions/CprConverterExtensions.PersonTotal.cs
+++ PART/Source/CprBroker/DBR/Extensions/CprConverterExtensions.PersonTotal.cs
@@ -188,11 +188,19 @@
                 }
             };

+            Func<string, char> parentPnrMarkerGetter = (string parentPnr) =>
+            {
+                if (string.IsNullOrEmpty(parentPnr) || parentPnr.Equals("0000000000"))
+                    return '*';
+                else
+                    return ' ';
+            };
+

             pt.MotherPersonalOrBirthDate = parentPnrOrBirthdateGetter(resp.ParentsInformation.MotherPNR, resp.ParentsInformation.MotherBirthDate);
-            pt.MotherMarker = null; //DPR SPECIFIC
+            pt.MotherMarker = parentPnrMarkerGetter(resp.ParentsInformation.MotherPNR);
             pt.FatherPersonalOrBirthdate = parentPnrOrBirthdateGetter(resp.ParentsInformation.FatherPNR, resp.ParentsInformation.FatherBirthDate);
-            pt.FatherMarker = null; //DPR SPECIFIC
+            pt.FatherMarker = parentPnrMarkerGetter(resp.ParentsInformation.FatherPNR);

             if (
                 resp.CurrentDepartureData != null


Fixed episode sorting bug

Fixed episode sorting bug

--- Source/RobertIagar.Podcasts/RobertIagar.Podcasts.Core/Contracts/Podcast.cs
+++ Source/RobertIagar.Podcasts/RobertIagar.Podcasts.Core/Contracts/Podcast.cs
@@ -34,7 +34,7 @@

         public void SetEpisodes(IEnumerable<Episode> episode)
         {
-            this.Episodes = episode.ToList();
+            this.Episodes = episode.OrderByDescending(e => e.Published).ToList();
         }

         public bool Equals(Podcast other)


MySqlCodeFirst BUG

MySqlCodeFirst BUG

--- Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs
+++ Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs
@@ -193,8 +193,8 @@
             }
             string sql = GetCreateTableSql(tableName, columns);
             string primaryKeyInfo = null;
-            if (columns.Any(it => it.IsIdentity)) {
-                primaryKeyInfo =string.Format( ", Primary key({0})",string.Join(",",columns.Where(it=>it.IsIdentity).Select(it=>this.SqlBuilder.GetTranslationColumnName(it.DbColumnName))));
+            if (columns.Any(it => it.IsPrimarykey)) {
+                primaryKeyInfo =string.Format( ", Primary key({0})",string.Join(",",columns.Where(it=>it.IsPrimarykey).Select(it=>this.SqlBuilder.GetTranslationColumnName(it.DbColumnName))));

             }
             sql = sql.Replace("$PrimaryKey", primaryKeyInfo);


WhenNavigatedTo

WhenNavigatedTo

--- WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
+++ WalletWasabi.Fluent/ViewModels/AddWallet/ConnectHardwareWalletViewModel.cs
@@ -3,6 +3,7 @@
 using System.IO;
 using System.Linq;
 using System.Reactive;
+using System.Reactive.Disposables;
 using System.Reactive.Linq;
 using System.Threading;
 using System.Threading.Tasks;
@@ -36,17 +37,6 @@
 			_searchHardwareWalletCts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
 			HardwareWallets = new ObservableCollection<HardwareWalletViewModel>();

-			CancelCommand = ReactiveCommand.Create(() =>
-			{
-				_searchHardwareWalletCts.Cancel();
-				ClearNavigation();
-			});
-			BackCommand = ReactiveCommand.Create(() =>
-			{
-				_searchHardwareWalletCts.Cancel();
-				GoBack();
-			});
-
 			OpenBrowserCommand = ReactiveCommand.CreateFromTask<string>(IoHelpers.OpenBrowserAsync);

 			var connectCommandIsExecute =
@@ -58,6 +48,7 @@
 				.Where(x => x is { } && x.HardwareWalletInfo.Model != HardwareWalletModels.Coldcard && !x.HardwareWalletInfo.IsInitialized())
 				.Subscribe(async x =>
 				{
+					// TODO: Notify the user to check the device
 					using var ctsSetup = new CancellationTokenSource(TimeSpan.FromMinutes(21));

 					// Trezor T doesn't require interactive mode.
@@ -67,7 +58,10 @@
 				});

 			Task.Run(StartHardwareWalletDetection);
+
+			this.WhenNavigatedTo(() => Disposable.Create(_searchHardwareWalletCts.Cancel));
 		}
+

 		public HardwareWalletViewModel? SelectedHardwareWallet
 		{
@@ -93,7 +87,7 @@

 			try
 			{
-				// Stop detecting
+				// Stop Detection
 				_searchHardwareWalletCts.Cancel();

 				using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
@@ -113,7 +107,7 @@
 			}
 		}

-		protected async Task StartHardwareWalletDetection()
+		private async Task StartHardwareWalletDetection()
 		{
 			while (!_searchHardwareWalletCts.IsCancellationRequested)
 			{


add some logging when getting unhandled exception

--- minuet/symphony/Paragon/Program.cs
+++ minuet/symphony/Paragon/Program.cs
@@ -114,8 +114,24 @@
         static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
         {
             Exception ex = e.ExceptionObject as Exception;
+
+            ILogger Logger = ParagonLogManager.GetLogger();
+
+            Logger.Error("--exception info start--");
+            while (ex != null)
+            {
+                Logger.Error("exception: " + ex.Message);
+                Logger.Error("exception stack trace:" + ex.StackTrace);
+                Logger.Error("exception source:" + ex.Source);
+                Logger.Error("exception targetSite:" + ex.TargetSite);
+                Logger.Error("exception type:" + ex.GetType());
+                Logger.Error("exception toString:" + ex.ToString());
+                ex = ex.InnerException;
+            }
+            Logger.Error("--exception info end--");
+
             string errString = "The application will now exit. Please email the following message to your tech support team." + ex.Message + "\n" + ex.StackTrace;
             MessageBox.Show(errString + "\n", "Unhandled Exception", MessageBoxButton.OK);
-        }
+        }
     }
 }


Removed serializer test

Removed serializer test

--- tests/Exceptionless.Tests/SerializerTests.cs
+++ tests/Exceptionless.Tests/SerializerTests.cs
@@ -1,14 +1,9 @@
 using System;
 using System.Collections.Generic;
-using System.Text.Json;
-using Exceptionless.Core.Authorization;
 using Exceptionless.Core.Extensions;
 using Exceptionless.Core.Models;
 using Exceptionless.Core.Models.Data;
-using Exceptionless.Core.Utility;
 using Exceptionless.Serializer;
-using Exceptionless.Web.Models;
-using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Xunit;
@@ -96,20 +91,6 @@
             Assert.Equal("Hello", ev.Message);
             Assert.Equal("SomeVal", ev.Data["Blah"]);
         }
-
-        [Fact]
-        public void CanSerializeSimpleModel() {
-            var token = new NewToken {
-                OrganizationId = SampleDataService.TEST_ORG_ID,
-                ProjectId = SampleDataService.TEST_PROJECT_ID,
-                Scopes = new HashSet<string> { AuthorizationRoles.Client, AuthorizationRoles.User }
-            };
-
-            var settings = Core.Bootstrapper.ConfigureJsonSerializerOptions(new JsonSerializerOptions());
-            string json = System.Text.Json.JsonSerializer.Serialize(token, settings);
-            _logger.LogInformation(json);
-            ViewToken token2 = System.Text.Json.JsonSerializer.Deserialize<ViewToken>(json, settings);
-        }
     }

     public class SomeModel {


Add failing specs: cannot resolve Fake/Dummy constructor arguments

--- tests/FakeItEasy.Specs/DummyCreationSpecs.cs
+++ tests/FakeItEasy.Specs/DummyCreationSpecs.cs
@@ -1,7 +1,8 @@
-namespace FakeItEasy.Specs
+namespace FakeItEasy.Specs
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics.CodeAnalysis;
     using System.IO;
     using System.Linq;
     using FakeItEasy.Tests.TestHelpers;
@@ -83,6 +84,86 @@
                 .x(() => dummies.Should().HaveCount(10));
         }

+        [Scenario]
+        public void ClassWhoseLongerConstructorThrowsCreation(
+            ClassWhoseLongerConstructorThrows dummy)
+        {
+            "Given a type with multiple constructors"
+                .See<ClassWhoseLongerConstructorThrows>();
+
+            "And its longer constructor throws"
+                .See(() => new ClassWhoseLongerConstructorThrows(0, 0));
+
+            "When a dummy of that type is requested"
+                .x(() => dummy = this.CreateDummy<ClassWhoseLongerConstructorThrows>());
+
+            "Then it returns a dummy"
+                .x(() => dummy.Should().NotBeNull());
+
+            "And the dummy is created via the shorter constructor"
+                .x(() => dummy.CalledConstructor.Should().Be("(int)"));
+        }
+
+        [Scenario]
+        public void SealedClassWhoseLongerConstructorThrowsCreation(
+            SealedClassWhoseLongerConstructorThrows dummy)
+        {
+            "Given a sealed type with multiple constructors"
+                .See<SealedClassWhoseLongerConstructorThrows>();
+
+            "And its longer constructor throws"
+                .See(() => new SealedClassWhoseLongerConstructorThrows(0, 0));
+
+            "When a dummy of that type is requested"
+                .x(() => dummy = this.CreateDummy<SealedClassWhoseLongerConstructorThrows>());
+
+            "Then it returns a dummy"
+                .x(() => dummy.Should().NotBeNull());
+
+            "And the dummy is created via the shorter constructor"
+                .x(() => dummy.CalledConstructor.Should().Be("(int)"));
+        }
+
+        [Scenario]
+        public void ClassWithLongConstructorWhoseArgumentsCannotBeResolvedCreation(
+            ClassWithLongConstructorWhoseArgumentsCannotBeResolved dummy)
+        {
+            "Given a type with multiple constructors"
+                .See<ClassWithLongConstructorWhoseArgumentsCannotBeResolved>();
+
+            "And its longer constructor's argument cannot be resolved"
+                .See(() => new ClassWithLongConstructorWhoseArgumentsCannotBeResolved(default(ClassWhoseDummyFactoryThrows), default(int)));
+
+            "When a dummy of that type is requested"
+                .x(() => dummy = this.CreateDummy<ClassWithLongConstructorWhoseArgumentsCannotBeResolved>());
+
+            "Then it returns a dummy"
+                .x(() => dummy.Should().NotBeNull());
+
+            "And the dummy is created via the shorter constructor"
+                .x(() => dummy.CalledConstructor.Should().Be("(int)"));
+        }
+
+        [Scenario]
+        public void SealedClassWithLongConstructorWhoseArgumentsCannotBeResolvedCreation(
+            SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved dummy)
+        {
+            "Given a sealed type with multiple constructors"
+                .See<SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved>();
+
+            "And its longer constructor's argument cannot be resolved"
+                .See(() => new SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved(default(ClassWhoseDummyFactoryThrows), default(int)));
+
+            "When a dummy of that type is requested"
+                .x(() => dummy = this.CreateDummy<SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved>());
+
+            "Then it returns a dummy"
+                .x(() => dummy.Should().NotBeNull());
+
+            "And the dummy is created via the shorter constructor"
+                .x(() => dummy.CalledConstructor.Should().Be("(int)"));
+        }
+
         protected abstract T CreateDummy<T>();

         protected abstract IList<T> CreateCollectionOfDummy<T>(int count);
@@ -97,6 +178,92 @@
             protected override Foo Create()
             {
                 return new Foo { Bar = 42 };
+            }
+        }
+
+        public class ClassWhoseLongerConstructorThrows
+        {
+            public string CalledConstructor { get; }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public ClassWhoseLongerConstructorThrows(int i)
+            {
+                this.CalledConstructor = "(int)";
+            }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "j", Justification = "Required for testing.")]
+            public ClassWhoseLongerConstructorThrows(int i, int j)
+            {
+                this.CalledConstructor = "(int, int)";
+                throw new Exception("(int, int) constructor threw");
+            }
+        }
+
+        public sealed class SealedClassWhoseLongerConstructorThrows
+        {
+            public string CalledConstructor { get; }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public SealedClassWhoseLongerConstructorThrows(int i)
+            {
+                this.CalledConstructor = "(int)";
+            }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "j", Justification = "Required for testing.")]
+            public SealedClassWhoseLongerConstructorThrows(int i, int j)
+            {
+                this.CalledConstructor = "(int, int)";
+                throw new Exception("(int, int) constructor threw");
+            }
+        }
+
+        public class ClassWithLongConstructorWhoseArgumentsCannotBeResolved
+        {
+            public string CalledConstructor { get; }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public ClassWithLongConstructorWhoseArgumentsCannotBeResolved(int i)
+            {
+                this.CalledConstructor = "(int)";
+            }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "c", Justification = "Required for testing.")]
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public ClassWithLongConstructorWhoseArgumentsCannotBeResolved(ClassWhoseDummyFactoryThrows c, int i)
+            {
+                this.CalledConstructor = "(ClassWhoseDummyFactoryThrows, int)";
+            }
+        }
+
+        public sealed class SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved
+        {
+            public string CalledConstructor { get; }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved(int i)
+            {
+                this.CalledConstructor = "(int)";
+            }
+
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "c", Justification = "Required for testing.")]
+            [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "i", Justification = "Required for testing.")]
+            public SealedClassWithLongConstructorWhoseArgumentsCannotBeResolved(ClassWhoseDummyFactoryThrows c, int i)
+            {
+                this.CalledConstructor = "(ClassWhoseDummyFactoryThrows, int)";
+            }
+        }
+
+        public class ClassWhoseDummyFactoryThrows
+        {
+        }
+
+        public class ClassWhoseDummyFactoryThrowsFactory : DummyFactory<ClassWhoseDummyFactoryThrows>
+        {
+            protected override ClassWhoseDummyFactoryThrows Create()
+            {
+                throw new Exception("dummy factory threw");
             }
         }
     }


don't crash if a directory or file wasn't clean up correctly

--- code/AnnoModificationManager4/Misc/DirectoryExtension.cs
+++ code/AnnoModificationManager4/Misc/DirectoryExtension.cs
@@ -48,9 +48,17 @@
             string[] directories = Directory.GetDirectories(dir);
             string[] files = Directory.GetFiles(dir);
             foreach (string path in directories)
-                Directory.Delete(path, true);
+            {
+                try {
+                    Directory.Delete(path, true);
+                } catch { }
+            }
             foreach (string path in files)
-                File.Delete(path);
+            {
+                try {
+                    File.Delete(path);
+                } catch { }
+            }
         }
     }
 }


Stop using client capabilities in console dev app

--- tests/devapps/NetFxConsoleTestApp/Program.cs
+++ tests/devapps/NetFxConsoleTestApp/Program.cs
@@ -115,7 +115,7 @@
                             .Create(s_clientIdForPublicApp)
                             .WithAuthority(GetAuthority())
                             .WithLogging(Log, LogLevel.Verbose, true)
-                            .WithClientCapabilities(new[] { "llt" })
+                            //.WithClientCapabilities(new[] { "llt" })
                             .WithRedirectUri("http://localhost") // required for DefaultOsBrowser
                             .Build();


Getting getting data from table.

Getting getting data from table.


updated copyright date range

updated copyright date range

--- src/tools/Common/CommonAssemblyInfo.cs
+++ src/tools/Common/CommonAssemblyInfo.cs
@@ -5,6 +5,6 @@
 // associated with an assembly.
 [assembly: AssemblyProduct("Kingdom.OrTools")]
 [assembly: AssemblyCompany("Kingdom Software")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyCopyright("Copyright © 2015-2018")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Added capability of SqlServer2008 provider to send MAXDOP hints in queries.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS01]$/SharpMap/Trunk;C100925

--- SharpMap/Data/Providers/SqlServer2008.cs
+++ SharpMap/Data/Providers/SqlServer2008.cs
@@ -253,6 +253,34 @@
         }

+        private int _maxDop = 0;
+        /// <summary>
+        /// If set, sends an Option MaxDop to the SQL-Server to override the Paralell Execution of indexes
+        /// This can be used if Spatial indexes are not used on SQL-Servers with many processors.
+        ///
+        /// MaxDop = 0 // Default behaviour
+        /// MaxDop = 1 // Suppress Paralell execution of Queryplan
+        /// MaxDop = [2..n] // Use X cores in in excution plan
+        /// </summary>
+        public int MaxDop
+        {
+            get { return _maxDop; }
+            set { _maxDop = value; }
+        }
+
+        private string GetExtraOptions()
+        {
+            if (_maxDop != 0)
+            {
+                return "OPTION (MAXDOP " + _maxDop + ")";
+            }
+            else
+            {
+                return null;
+            }
+        }
+
+
         /// <summary>
        /// Returns geometries within the specified bounding box
        /// </summary>
@@ -272,7 +300,11 @@
                if (!String.IsNullOrEmpty(_definitionQuery))
                    strSQL += DefinitionQuery + " AND ";

-               strSQL += strBbox;
+               strSQL += strBbox;
+
+               string extraOptions = GetExtraOptions();
+               if (!string.IsNullOrEmpty(extraOptions))
+                   strSQL += " " + extraOptions;

                using (SqlCommand command = new SqlCommand(strSQL, conn))
                {
@@ -341,7 +373,12 @@
                if (!String.IsNullOrEmpty(_definitionQuery))
                    strSQL += DefinitionQuery + " AND ";

-               strSQL += strBbox;
+               strSQL += strBbox;
+
+               string extraOptions = GetExtraOptions();
+               if (!string.IsNullOrEmpty(extraOptions))
+                   strSQL += " " + extraOptions;
+

                using (var command = new SqlCommand(strSQL, conn))
                {
@@ -398,7 +435,12 @@
                if (!String.IsNullOrEmpty(_definitionQuery))
                    strSQL += DefinitionQuery + " AND ";

-               strSQL += strGeom;
+               strSQL += strGeom;
+
+               string extraOptions = GetExtraOptions();
+               if (!string.IsNullOrEmpty(extraOptions))
+                   strSQL += " " + extraOptions;
+

                using (SqlDataAdapter adapter = new SqlDataAdapter(strSQL, conn))
                {
@@ -641,7 +683,12 @@
                if (!String.IsNullOrEmpty(_definitionQuery))
                    strSQL += DefinitionQuery + " AND ";

-               strSQL += strBbox;
+               strSQL += strBbox;
+
+               string extraOptions = GetExtraOptions();
+               if (!string.IsNullOrEmpty(extraOptions))
+                   strSQL += " " + extraOptions;
+

                using (SqlDataAdapter adapter = new SqlDataAdapter(strSQL, conn))
                {


Updated version

Updated version

--- SimpleCiphers/Properties/AssemblyInfo.cs
+++ SimpleCiphers/Properties/AssemblyInfo.cs
@@ -51,4 +51,4 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.2.0")]
+[assembly: AssemblyVersion("0.2.1")]


Update namespace name

Update namespace name

--- SimpleUDPMessage/SimpleUDPMessageBase.cs
+++ SimpleUDPMessage/SimpleUDPMessageBase.cs
@@ -4,7 +4,7 @@
 using System.Text;
 using System.Threading.Tasks;

-namespace IMS.UDP.Simple.Message
+namespace RegiFraga.Comunication.UDP
 {
     public abstract class SimpleUDPMessageBase : ISimpleUDPMessage
     {


git-svn-id: 75210f800c74dac7ab89a5be233e5d30c702c3e4@331 a0bf3537-8e53-448f-ae4a-0b965e85af5e

--- Sinobyl/Sinobyl.Engine/ChessEvalPawns.cs
+++ Sinobyl/Sinobyl.Engine/ChessEvalPawns.cs
@@ -244,120 +244,25 @@
         }

+
         public PhasedScore EvalPassedPawns(ChessBoard board, ChessEvalInfo evalInfo, ChessBitboard passedPawns)
         {
-
-            ChessPosition myKing, hisKing;
-            ChessBitboard allPieces, myPawnAttacks, myAttacks, hisAttacks;
-            bool attackingTrailer, supportingTrailer;
-
-            int startScore, endScore, bestEndScore;
-
+
             PhasedScore retval = PhasedScoreInfo.Create(0, 0);

             var positions = passedPawns & board[ChessPlayer.White];
             if (positions != ChessBitboard.Empty)
             {
-                bestEndScore = 0;
-
-                myKing = board.KingPosition(ChessPlayer.White);
-                hisKing = board.KingPosition(ChessPlayer.Black);
-                allPieces = board.PieceLocationsAll;
-                myPawnAttacks = evalInfo.Attacks[(int)ChessPlayer.White].PawnEast | evalInfo.Attacks[(int)ChessPlayer.White].PawnWest;
-                myAttacks = evalInfo.Attacks[(int)ChessPlayer.White].All();
-                hisAttacks = evalInfo.Attacks[(int)ChessPlayer.Black].All();
-
-                while(positions != ChessBitboard.Empty)// (ChessPosition passedPos in white.ToPositions())
-                {
-                    ChessPosition passedPos = ChessBitboardInfo.PopFirst(ref positions);
-                    ChessPosition trailerPos = ChessPosition.OUTOFBOUNDS;
-                    ChessPiece trailerPiece = board.PieceInDirection(passedPos, ChessDirection.DirS, ref trailerPos);
-
-                    attackingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == ChessPlayer.Black;
-                    supportingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == ChessPlayer.White;
-
-                    EvalPassedPawnBoth(
-                        p: passedPos,
-                        allPieces: allPieces,
-                        myAttacks: myAttacks,
-                        hisAttacks: hisAttacks,
-                        myKing: myKing,
-                        hisKing: hisKing,
-                        myPawnAttacks: myPawnAttacks,
-                        attackingTrailer: attackingTrailer,
-                        supportingTrailer: supportingTrailer,
-                        mbonus: out startScore,
-                        ebonus: out endScore);
-
-
-                    //scores other than best are halved
-                    endScore = endScore & ~1; //make even number for div /2
-                    if (endScore >= bestEndScore)
-                    {
-                        int reduce = bestEndScore / 2;
-                        bestEndScore = endScore;
-                        endScore -= reduce;
-                    }
-                    else
-                    {
-                        endScore = endScore / 2;
-                    }
-
-                    retval = retval.Add(PhasedScoreInfo.Create(startScore, endScore));
-
-                    ///evalInfo.PawnsPassedStart += mbonus;
-                    //evalInfo.PawnsPassedEnd += ebonus;
-                }
+                var white = EvalPassedPawnsSide(ChessPlayer.White, board, evalInfo, positions);
+                retval = retval.Add(white);
+
             }

             positions = passedPawns & board[ChessPlayer.Black];
             if (positions != ChessBitboard.Empty)
             {
-                bestEndScore = 0;
-                myKing = board.KingPosition(ChessPlayer.Black).Reverse();
-                hisKing = board.KingPosition(ChessPlayer.White).Reverse();
-                allPieces = board.PieceLocationsAll.Reverse();
-                myPawnAttacks = (evalInfo.Attacks[(int)ChessPlayer.Black].PawnEast | evalInfo.Attacks[(int)ChessPlayer.Black].PawnWest).Reverse();
-                myAttacks = evalInfo.Attacks[(int)ChessPlayer.Black].All().Reverse();
-                hisAttacks = evalInfo.Attacks[(int)ChessPlayer.White].All().Reverse();
-
-                while(positions != ChessBitboard.Empty) // (ChessPosition passedPos in black.ToPositions())
-                {
-                    ChessPosition passedPos = ChessBitboardInfo.PopFirst(ref positions);
-                    ChessPosition passesPos2 = passedPos.Reverse();
-                    ChessPosition trailerPos = ChessPosition.OUTOFBOUNDS;
-                    ChessPiece trailerPiece = board.PieceInDirection(passedPos, ChessDirection.DirN, ref trailerPos);
-
-                    attackingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == ChessPlayer.White;
-                    supportingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == ChessPlayer.Black;
-
-                    EvalPassedPawnBoth(
-                        p: passesPos2,
-                        allPieces: allPieces,
-                        myAttacks: myAttacks,
-                        hisAttacks: hisAttacks,
-                        myKing: myKing,
-                        hisKing: hisKing,
-                        myPawnAttacks: myPawnAttacks,
-                        attackingTrailer: attackingTrailer,
-                        supportingTrailer: supportingTrailer,
-                        mbonus: out startScore,
-                        ebonus: out endScore);
-
-                    //scores other than best are halved
-                    endScore = endScore & ~1; //make even number for div /2
-                    if (endScore >= bestEndScore)
-                    {
-                        int reduce = bestEndScore / 2;
-                        bestEndScore = endScore;
-                        endScore -= reduce;
-                    }
-                    else
-                    {
-                        endScore = endScore / 2;
-                    }
-                    retval = retval.Subtract(PhasedScoreInfo.Create(startScore, endScore));
-                }
+                var black = EvalPassedPawnsSide(ChessPlayer.Black, board, evalInfo, positions);
+                retval = retval.Subtract(black);
             }

@@ -365,12 +270,79 @@

         }

-
-        private void EvalPassedPawnBoth(ChessPosition p, ChessPosition myKing, ChessPosition hisKing,
+        public PhasedScore EvalPassedPawnsSide(ChessPlayer me, ChessBoard board, ChessEvalInfo evalInfo, ChessBitboard passedPawns)
+        {
+            PhasedScore retval = PhasedScoreInfo.Create(0, 0);
+
+            int bestEndScore = 0;
+
+            ChessPlayer him = me.PlayerOther();
+
+            ChessPosition myKing = board.KingPosition(me);
+            ChessPosition hisKing = board.KingPosition(me.PlayerOther());
+            ChessBitboard allPieces = board.PieceLocationsAll;
+            ChessBitboard myPawnAttacks = evalInfo.Attacks[(int)me].PawnEast | evalInfo.Attacks[(int)me].PawnWest;
+            ChessBitboard myAttacks = evalInfo.Attacks[(int)me].All();
+            ChessBitboard hisAttacks = evalInfo.Attacks[(int)him].All();
+            ChessBitboard positions = passedPawns;
+
+            ChessDirection mySouth = me == ChessPlayer.White ? ChessDirection.DirS : ChessDirection.DirN;
+
+            while (positions != ChessBitboard.Empty)// (ChessPosition passedPos in white.ToPositions())
+            {
+                ChessPosition passedPos = ChessBitboardInfo.PopFirst(ref positions);
+                ChessPosition trailerPos = ChessPosition.OUTOFBOUNDS;
+
+                ChessPiece trailerPiece = board.PieceInDirection(passedPos, mySouth, ref trailerPos);
+
+                bool attackingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == him;
+                bool supportingTrailer = trailerPiece.PieceIsSliderRook() && trailerPiece.PieceToPlayer() == me;
+
+                int startScore;
+                int endScore;
+
+                EvalPassedPawn(
+                    me: me,
+                    p: passedPos,
+                    allPieces: allPieces,
+                    myAttacks: myAttacks,
+                    hisAttacks: hisAttacks,
+                    myKing: myKing,
+                    hisKing: hisKing,
+                    myPawnAttacks: myPawnAttacks,
+                    attackingTrailer: attackingTrailer,
+                    supportingTrailer: supportingTrailer,
+                    mbonus: out startScore,
+                    ebonus: out endScore);
+
+
+                //scores other than best are halved
+                endScore = endScore & ~1; //make even number for div /2
+                if (endScore >= bestEndScore)
+                {
+                    int reduce = bestEndScore / 2;
+                    bestEndScore = endScore;
+                    endScore -= reduce;
+                }
+                else
+                {
+                    endScore = endScore / 2;
+                }
+
+                retval = retval.Add(PhasedScoreInfo.Create(startScore, endScore));
+
+            }
+
+            return retval;
+        }
+
+        private void EvalPassedPawn(ChessPlayer me, ChessPosition p, ChessPosition myKing, ChessPosition hisKing,
             ChessBitboard allPieces, ChessBitboard myPawnAttacks, ChessBitboard myAttacks, ChessBitboard hisAttacks,
             bool attackingTrailer, bool supportingTrailer, out int mbonus, out int ebonus)
         {
             ChessRank rank = p.GetRank();
+
+            if (me == ChessPlayer.Black) { rank = 7 - rank; }

             //int r = Math.Abs(rank - ChessRank.Rank2);
             //int rr = r * (r - 1);
@@ -380,7 +352,7 @@
             ebonus = endScore[(int)rank];
             int dangerFactor = factors[(int)rank];

-            ChessPosition blockSq = p.PositionInDirection(ChessDirection.DirN);
+            ChessPosition blockSq = p.PositionInDirection(me == ChessPlayer.White ? ChessDirection.DirN: ChessDirection.DirS);

             int k = 0;

@@ -430,6 +402,7 @@
             ebonus += k * dangerFactor;

         }
+

         #endregion


Corrected Prismatic Taper count on some Foci spells. (#3056)

--- Source/ACE.Server/Entity/SpellFormula.cs
+++ Source/ACE.Server/Entity/SpellFormula.cs
@@ -190,6 +190,24 @@
         }

         /// <summary>
+        /// Power is used to determine, among possibly thing things, the number of Prisimatic Tapers in a "Scarab Only Formula" (foci)
+        /// </summary>
+        public uint Power
+        {
+            get
+            {
+                if (Components == null || Components.Count == 0)
+                    return 0;
+
+                var firstComp = Components[0];
+                if (!IsScarab(firstComp))
+                    return 0;
+
+                return ScarabPower[(Scarab)firstComp];
+            }
+        }
+
+        /// <summary>
         /// The spell table from the portal.dat
         /// </summary>
         public static SpellTable SpellTable { get => DatManager.PortalDat.SpellTable; }
@@ -315,23 +333,42 @@
         {
             FociFormula = new List<uint>();

-            // max 4 prismatic tapers, depending on spell level (client formula)
-            var numTapers = Math.Min(Level, 4);
-
-            var curTapers = 0;
+            // Add all the scarabs (remember, some spells have multiple scarabs, like Ring spells)
             for (var i = 0; i < Components.Count; i++)
             {
                 var component = Components[i];
                 if (IsScarab(component))
                     FociFormula.Add(component);
-                else
-                {
-                    FociFormula.Add(188);   // prismatic taper
-                    curTapers++;
-                    if (curTapers == numTapers)
-                        break;
-                }
-            }
+            }
+
+            // Number of Prismatic Tapers is based on the spell "power"
+            // See client CSpellBase::InqScarabOnlyFormula
+            var numTapers = 0;
+            switch (Power)
+            {
+                case 1:
+                    numTapers = 1;
+                    break;
+                case 2:
+                    numTapers = 2;
+                    break;
+                case 3:
+                case 4:
+                case 7:
+                    numTapers = 3;
+                    break;
+                case 5:
+                case 6:
+                case 8:
+                case 9:
+                case 10:
+                    numTapers = 4;
+                    break;
+            }
+
+            for (var i = 0; i < numTapers; i++)
+                FociFormula.Add(188);   // prismatic taper
+
             return FociFormula;
         }


Refactor MacView.SetBackgroundColor.

Refactor MacView.SetBackgroundColor.

--- Source/Eto.Platform.Mac/Forms/MacView.cs
+++ Source/Eto.Platform.Mac/Forms/MacView.cs
@@ -460,24 +460,26 @@
 			get { return backgroundColor ?? Colors.Transparent; }
 			set
 			{
-				if (Widget.Loaded)
-				{
-					if (value.A > 0)
-					{
-						ContainerControl.WantsLayer = true;
-						var layer = ContainerControl.Layer;
-						if (layer != null)
-							layer.BackgroundColor = value.ToCGColor();
-					}
-					else
-					{
-						ContainerControl.WantsLayer = false;
-						var layer = ContainerControl.Layer;
-						if (layer != null)
-							layer.BackgroundColor = null;
-					}
-				}
 				backgroundColor = value;
+				SetBackgroundColor();
+			}
+		}
+
+		private void SetBackgroundColor()
+		{
+			if (backgroundColor != null && Widget.Loaded) {
+				if (backgroundColor.Value.A > 0) {
+					ContainerControl.WantsLayer = true;
+					var layer = ContainerControl.Layer;
+					if (layer != null)
+						layer.BackgroundColor = backgroundColor.Value.ToCGColor();
+				}
+				else {
+					ContainerControl.WantsLayer = false;
+					var layer = ContainerControl.Layer;
+					if (layer != null)
+						layer.BackgroundColor = null;
+				}
 			}
 		}

@@ -538,8 +540,7 @@
 		{
 			if (focus && EventControl.Window != null)
 				EventControl.Window.MakeFirstResponder(Control);
-			if (backgroundColor != null)
-				BackgroundColor = backgroundColor.Value;
+			SetBackgroundColor();
 		}

 		public virtual void OnUnLoad(EventArgs e)


Fixed a bug that caused an error for nested generic type arguments that are anonymous types, sometimes causing queries that contain subqueries to fail during pre-processing on the client.

--- Source/Qactive/LocalEvaluationContext.cs
+++ Source/Qactive/LocalEvaluationContext.cs
@@ -249,6 +249,11 @@
           {
             genericTypeArguments[i] = typeof(CompilerGenerated);
             replacedAny = true;
+          },
+          genericArgumentsUpdated: updatedType =>
+          {
+            genericTypeArguments[i] = updatedType;
+            replacedAny = true;
           });

         if (!replaced && argument.GetIsGenericType() && EnsureGenericTypeArgumentsSerializable(ref argument))


Fix VisualTests compilation issues.

Fix VisualTests compilation issues.

--- osu.Framework.VisualTests/Tests/TestCaseGameMode.cs
+++ osu.Framework.VisualTests/Tests/TestCaseGameMode.cs
@@ -35,7 +35,7 @@

             const int transition_time = 500;

-            protected override double OnEntering(GameMode last)
+            protected override void OnEntering(GameMode last)
             {
                 if (last != null)
                 {
@@ -45,25 +45,21 @@

                 Content.MoveTo(new Vector2(0, -Size.Y));
                 Content.MoveTo(Vector2.Zero, transition_time, EasingTypes.OutQuint);
-                return transition_time;
             }

-            protected override double OnExiting(GameMode next)
+            protected override void OnExiting(GameMode next)
             {
                 Content.MoveTo(new Vector2(0, -Size.Y), transition_time, EasingTypes.OutQuint);
-                return transition_time;
             }

-            protected override double OnSuspending(GameMode next)
+            protected override void OnSuspending(GameMode next)
             {
                 Content.MoveTo(new Vector2(0, Size.Y), transition_time, EasingTypes.OutQuint);
-                return transition_time;
             }

-            protected override double OnResuming(GameMode last)
+            protected override void OnResuming(GameMode last)
             {
                 Content.MoveTo(Vector2.Zero, transition_time, EasingTypes.OutQuint);
-                return transition_time;
             }

             public override void Load()