Moves around the tests to better match the order that they appear in the grammar file. Also updates the tests to check for variable indices rather than a constant 0.

--- ProjectHekate.Grammar.Tests/THekateScriptVisitor.cs
+++ ProjectHekate.Grammar.Tests/THekateScriptVisitor.cs
@@ -63,7 +63,43 @@
                 result.Code[3].Should().Be(0);
             }
         }
-
+
+        [TestClass]
+        public class VisitLiteralExpression : THekateScriptVisitor
+        {
+            [TestMethod]
+            public void ShouldGenerateCodeForIntegerLiteral()
+            {
+                // Setup
+                const int literal = 3;
+                string literalExpression = literal.ToString();
+
+                // Act
+                var result = Subject.VisitLiteralExpression(GenerateContext<HekateParser.LiteralExpressionContext>(literalExpression));
+
+                // Verify
+                result.Code.Should().HaveCount(2);
+                result.Code[0].Should().Be((byte)Instruction.Push);
+                result.Code[1].Should().Be(literal);
+            }
+
+            [TestMethod]
+            public void ShouldGenerateCodeForFloatLiteral()
+            {
+                // Setup
+                const float literal = 3.455f;
+                string literalExpression = literal.ToString();
+
+                // Act
+                var result = Subject.VisitLiteralExpression(GenerateContext<HekateParser.LiteralExpressionContext>(literalExpression));
+
+                // Verify
+                result.Code.Should().HaveCount(2);
+                result.Code[0].Should().Be((byte)Instruction.Push);
+                result.Code[1].Should().Be(literal);
+            }
+        }
+
         [TestClass]
         public class VisitAssignmentExpression : THekateScriptVisitor
         {
@@ -74,7 +110,7 @@
                 const string variableName = "someNumericalVariable";
                 var expression = String.Format("{0} = 3.5", variableName);
                 var codeBlock = new CodeBlock();
-                codeBlock.AddNumericalVariable(variableName);
+                var idx = codeBlock.AddNumericalVariable(variableName);
                 SetUpGetCurrentScope(codeBlock);

                 // Act
@@ -85,7 +121,7 @@
                 result.Code[0].Should().Be((byte)Instruction.Push);
                 result.Code[1].Should().Be(3.5f);
                 result.Code[2].Should().Be((byte)Instruction.SetVariable);
-                result.Code[3].Should().Be(0);
+                result.Code[3].Should().Be(idx);
             }

             [TestMethod]
@@ -107,7 +143,7 @@
                 result.Code[0].Should().Be((byte)Instruction.Push);
                 result.Code[1].Should().Be(3.5f);
                 result.Code[2].Should().Be((byte)Instruction.SetProperty);
-                result.Code[3].Should().Be(0);
+                result.Code[3].Should().Be(dummyRecord.Index);
             }

             [TestMethod]
@@ -169,7 +205,7 @@
                 const string variableName = "someNumericalVariable";
                 var expression = String.Format("{0} {1}= 3.5", variableName, opStr);
                 var codeBlock = new CodeBlock();
-                codeBlock.AddNumericalVariable(variableName);
+                var idx = codeBlock.AddNumericalVariable(variableName);
                 SetUpGetCurrentScope(codeBlock);

                 // Act
@@ -178,12 +214,12 @@
                 // Verify
                 result.Code.Should().HaveCount(7);
                 result.Code[0].Should().Be((byte)Instruction.GetVariable);
-                result.Code[1].Should().Be(0);
+                result.Code[1].Should().Be(idx);
                 result.Code[2].Should().Be((byte)Instruction.Push);
                 result.Code[3].Should().Be(3.5f);
                 result.Code[4].Should().Be((byte)op);
                 result.Code[5].Should().Be((byte)Instruction.SetVariable);
-                result.Code[6].Should().Be(0);
+                result.Code[6].Should().Be(idx);
             }

             [TestMethod]
@@ -343,41 +379,5 @@
                 TestCodeGenerationForOperator("||", Instruction.OperatorOr);
             }
         }
-
-        [TestClass]
-        public class VisitLiteralExpression : THekateScriptVisitor
-        {
-            [TestMethod]
-            public void ShouldGenerateCodeForIntegerLiteral()
-            {
-                // Setup
-                const int literal = 3;
-                string literalExpression = literal.ToString();
-
-                // Act
-                var result = Subject.VisitLiteralExpression(GenerateContext<HekateParser.LiteralExpressionContext>(literalExpression));
-
-                // Verify
-                result.Code.Should().HaveCount(2);
-                result.Code[0].Should().Be((byte)Instruction.Push);
-                result.Code[1].Should().Be(literal);
-            }
-
-            [TestMethod]
-            public void ShouldGenerateCodeForFloatLiteral()
-            {
-                // Setup
-                const float literal = 3.455f;
-                string literalExpression = literal.ToString();
-
-                // Act
-                var result = Subject.VisitLiteralExpression(GenerateContext<HekateParser.LiteralExpressionContext>(literalExpression));
-
-                // Verify
-                result.Code.Should().HaveCount(2);
-                result.Code[0].Should().Be((byte)Instruction.Push);
-                result.Code[1].Should().Be(literal);
-            }
-        }
     }
 }


DynamicTextures
- Corrected Fish material

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@1745 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Projects/AxiomDemos/Source/Demos/DynamicTextures.cs
+++ Projects/AxiomDemos/Source/Demos/DynamicTextures.cs
@@ -134,7 +134,7 @@

 			// Cloaked fish
 			ent2 = scene.CreateEntity( "knot3", "fish.mesh" );
-			ent2.MaterialName = "Examples/DynaTest";
+			ent2.MaterialName = "Examples/DynaTest3";
 			swim = ent2.GetAnimationState( "swim" );
 			swim.IsEnabled = true;
 			blaNode.AttachObject( ent2 );


some work on implementation

some work on implementation

--- GeoFusedLocationProvider/FusedLocationGeolocator.cs
+++ GeoFusedLocationProvider/FusedLocationGeolocator.cs
@@ -1,14 +1,17 @@
 using System;
 using System.Threading;
 using System.Threading.Tasks;
+using Android.App;
 using Android.Gms.Common;
+using Android.Gms.Common.Apis;
+using Android.Gms.Location;
 using Android.Locations;
 using Android.OS;
 using Plugin.Geolocator.Abstractions;

 namespace GeoFusedLocationProvider
 {
-    public class FusedLocationGeolocator : IGeolocator
+    public class FusedLocationGeolocator : IGeolocator, IDisposable
     {
         public double DesiredAccuracy { get; set; }
         public bool IsListening { get; }
@@ -21,34 +24,49 @@
         public event EventHandler<PositionEventArgs> PositionChanged;

         private GoogleCallbacks callbacks;
+        private GoogleApiClient client;

         public FusedLocationGeolocator()
         {
+            DesiredAccuracy = 100;
+
             callbacks = new GoogleCallbacks();
             callbacks.Connected += Connected;
             callbacks.ConnectionFailed += ConnectionFailed;
             callbacks.ConnectionSuspended += ConnectionSuspended;
             callbacks.LocationChanged += LocationChanged;
+
+            client =
+                new GoogleApiClient.Builder(Application.Context, callbacks, callbacks)
+                .AddApi(LocationServices.API)
+                .Build();
         }

         private void LocationChanged(object sender, Location location)
         {
-            throw new NotImplementedException();
+            var position = new Position();
+            position.Latitude = location.Latitude;
+            position.Longitude = location.Longitude;
+            position.Accuracy = location.Accuracy;
+            position.AltitudeAccuracy = location.Accuracy;
+            position.Altitude = location.Altitude;
+            position.Heading = location.Bearing;
+            position.Speed = location.Speed;
+            position.Timestamp = DateTimeOffset.FromUnixTimeMilliseconds(location.Time);
+
+            PositionChanged?.Invoke(this, new PositionEventArgs(position));
         }

         private void ConnectionSuspended(object sender, int i)
         {
-            throw new NotImplementedException();
         }

         private void ConnectionFailed(object sender, ConnectionResult connectionResult)
         {
-            throw new NotImplementedException();
         }

         private void Connected(object sender, Bundle bundle)
         {
-            throw new NotImplementedException();
         }

         public Task<Position> GetPositionAsync(int timeoutMilliseconds = -1, CancellationToken? token = null, bool includeHeading = false)
@@ -56,14 +74,54 @@
             throw new NotImplementedException();
         }

-        public Task<bool> StartListeningAsync(int minTime, double minDistance, bool includeHeading = false)
+        public async Task<bool> StartListeningAsync(int minTime, double minDistance, bool includeHeading = false)
         {
-            throw new NotImplementedException();
+            if (!client.IsConnected)
+                client.Connect();
+
+            if (!client.IsConnected)
+                return await Task.FromResult(false);
+
+            var locationRequest = new LocationRequest();
+            locationRequest.SetSmallestDisplacement(Convert.ToInt64(minDistance))
+                .SetFastestInterval(minTime)
+                .SetInterval(minTime * 3)
+                .SetMaxWaitTime(minTime * 6)
+                .SetPriority(GetPriority());
+
+            var result = await LocationServices.FusedLocationApi
+                .RequestLocationUpdatesAsync(client, locationRequest, callbacks);
+
+            return result.IsSuccess;
         }

-        public Task<bool> StopListeningAsync()
+        public async Task<bool> StopListeningAsync()
         {
-            throw new NotImplementedException();
+            var result = await LocationServices.FusedLocationApi.RemoveLocationUpdatesAsync(client, callbacks);
+            return result.IsSuccess;
+        }
+
+        private int GetPriority()
+        {
+            if (DesiredAccuracy < 50)
+                return LocationRequest.PriorityHighAccuracy;
+
+            if (DesiredAccuracy < 100)
+                return LocationRequest.PriorityBalancedPowerAccuracy;
+
+            if (DesiredAccuracy < 200)
+                return LocationRequest.PriorityLowPower;
+
+            return LocationRequest.PriorityNoPower;
+        }
+
+        public void Dispose()
+        {
+            if (client.IsConnected)
+                client.Disconnect();
+
+            callbacks?.Dispose();
+            client?.Dispose();
         }
     }
 }


Fix broken test

Fix broken test

--- src/NUnitEngine/nunit.engine.tests/Services/DomainManagerTests.cs
+++ src/NUnitEngine/nunit.engine.tests/Services/DomainManagerTests.cs
@@ -70,7 +70,10 @@
         [Test, Platform("Linux,Net", Reason = "get_SetupInformation() fails on Windows+Mono")]
         public void CanCreateDomainWithApplicationBaseSpecified()
         {
-            string basePath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(_package.FullName)));
+            string assemblyDir = Path.GetDirectoryName(_package.FullName);
+            string basePath = Path.GetDirectoryName(Path.GetDirectoryName(assemblyDir));
+            string relPath = assemblyDir.Substring(basePath.Length + 1);
+
             _package.Settings["BasePath"] = basePath;
             var domain = _domainManager.CreateDomain(_package);

@@ -83,11 +86,7 @@
                 Path.GetFileName(setup.ConfigurationFile),
                 Is.EqualTo("mock-nunit-assembly.exe.config").IgnoreCase,
                 "ConfigurationFile");
-#if DEBUG
-            Assert.That(setup.PrivateBinPath, Is.SamePath(@"bin\Debug"), "PrivateBinPath");
-#else
-            Assert.That(setup.PrivateBinPath, Is.SamePath(@"bin\Release"), "PrivateBinPath");
-#endif
+            Assert.That(setup.PrivateBinPath, Is.SamePath(relPath), "PrivateBinPath");
             Assert.That(setup.ShadowCopyFiles, Is.Null.Or.EqualTo("false"));
         }


refs #43 Activate tests for normal cases of the SearchTransition method :white_check_mark:

--- GeroMachine/GeroMachineTest/TransitionMatrixTest.cs
+++ GeroMachine/GeroMachineTest/TransitionMatrixTest.cs
@@ -187,7 +187,7 @@
 				TransitionMatrixInstance = new TransitionMatrix(setting_MatrixData);
 			}

-			[Fact(DisplayName = "TransitionMatrix:RegularInstance:SearchTransition:正常ケース", Skip = "NotImplemented")]
+			[Fact(DisplayName = "TransitionMatrix:RegularInstance:SearchTransition:正常ケース")]
 			public void TestSearchTransition()
 			{
 				// Prepare datas
@@ -204,7 +204,7 @@
 				Assert.Same(expected_Result, actual_Result);
 			}

-			[Fact(DisplayName = "TransitionMatrix:RegularInstance:SearchTransition:正常ケース(該当する遷移がない場合)", Skip = "NotImplemented")]
+			[Fact(DisplayName = "TransitionMatrix:RegularInstance:SearchTransition:正常ケース(該当する遷移がない場合)")]
 			public void TestSearchTransitionNoTransition()
 			{
 				// Prepare datas


Write DateFormat attribute to json

Write DateFormat attribute to json

--- src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs
+++ src/Nest/Resolvers/Writers/WritePropertiesFromAttributeVisitor.cs
@@ -67,6 +67,11 @@
             {
                 this._jsonWriter.WritePropertyName("search_analyzer");
                 this._jsonWriter.WriteValue(att.SearchAnalyzer);
+            }
+            if (!att.DateFormat.IsNullOrEmpty())
+            {
+                this._jsonWriter.WritePropertyName("format");
+                this._jsonWriter.WriteValue(att.DateFormat);
             }
             if (att.Index != FieldIndexOption.analyzed)
             {


Fix closing branch with no parent branch

--- GitMind/RepositoryViews/Private/ViewModelService.cs
+++ GitMind/RepositoryViews/Private/ViewModelService.cs
@@ -211,12 +211,22 @@
 						stableCommit = commit.SecondParent;
 					}
 				}
-				else if (!commit.HasFirstChild ||
+				else if (!commit.HasFirstChild ||
 					commit.Branch.TipCommit == commit)
 				{
 					// A branch tip, closing the clicked branch
 					otherBranch = clickedBranch;
-					stableCommit = commit.Branch.ParentCommit;
+					if (commit.Branch.HasParentBranch)
+					{
+						stableCommit = commit.Branch.ParentCommit;
+					}
+					else
+					{
+						Branch repositoryBranch = commit.Repository.Branches.First(b => b.Name == BranchName.Master && b.IsActive);
+
+						stableCommit = repositoryBranch.TipCommit;
+					}
+
 					if (clickedBranch.Branch.IsLocalPart)
 					{
 						otherBranch = repositoryViewModel
@@ -305,7 +315,7 @@
 			{
 				message.ShowError($"Failed to show branch {branch}");
 				Log.Exception(e, $"Failed to show branch {branch}");
-			}
+			}
 		}

 		public void HideBranch(RepositoryViewModel repositoryViewModel, Branch branch)
@@ -343,7 +353,7 @@
 			{
 				List<Branch> preFilterBranches =
 					repositoryViewModel.PreFilterBranches?.ToList() ?? new List<Branch>();
-				 CommitViewModel preFilterSelectedItem = repositoryViewModel.PreFilterSelectedItem;
+				CommitViewModel preFilterSelectedItem = repositoryViewModel.PreFilterSelectedItem;
 				repositoryViewModel.PreFilterBranches = null;
 				repositoryViewModel.PreFilterSelectedItem = null;

@@ -555,7 +565,7 @@
 				return 0;
 			}
 		}
-
+

 		private void UpdateCommits(
 			IReadOnlyList<Commit> sourceCommits,
@@ -565,7 +575,7 @@
 			var commitsById = repositoryViewModel.CommitsById;

 			SetNumberOfItems(
-				commits,
+				commits,
 				sourceCommits.Count,
 				i => new CommitViewModel(
 					branchService, diffService, themeService, repositoryCommands, commitsService, tagService));
@@ -644,8 +654,8 @@
 				branch.X = branch.Branch.IsLocalPart && branch.Branch.MainbBranch.Commits.Any()
 					? Converters.ToX(branch.BranchColumn) - 10
 					: Converters.ToX(branch.BranchColumn);
-
-
+
+
 				branch.HoverBrush = Brushes.Transparent;
 				branch.Dashes = sourceBranch.IsLocalPart ? "1" : "";

@@ -664,7 +674,7 @@
 				}

 				branch.SetColor(themeService.GetBranchBrush(sourceBranch));
-
+

 				branch.BranchToolTip = GetBranchToolTip(sourceBranch);
 				branch.CurrentBranchName = repositoryMgr.Repository.CurrentBranch.Name;


Add a bunch of benchmarks which were missing from OffsetDateTimeBenchmarks for some reason. (This is basically a copy of the LocalDateTimeBenchmarks tests.)

--- src/NodaTime.Benchmarks/NodaTimeTests/OffsetDateTimeBenchmarks.cs
+++ src/NodaTime.Benchmarks/NodaTimeTests/OffsetDateTimeBenchmarks.cs
@@ -24,6 +24,72 @@
         public void Construction()
         {
             new OffsetDateTime(SampleLocal, OneHourOffset).Consume();
+        }
+
+        [Benchmark]
+        public void Year()
+        {
+            Sample.Year.Consume();
+        }
+
+        [Benchmark]
+        public void Month()
+        {
+            Sample.Month.Consume();
+        }
+
+        [Benchmark]
+        public void DayOfMonth()
+        {
+            Sample.Day.Consume();
+        }
+
+        [Benchmark]
+        public void IsoDayOfWeek()
+        {
+            Sample.IsoDayOfWeek.Consume();
+        }
+
+        [Benchmark]
+        public void DayOfYear()
+        {
+            Sample.DayOfYear.Consume();
+        }
+
+        [Benchmark]
+        public void Hour()
+        {
+            Sample.Hour.Consume();
+        }
+
+        [Benchmark]
+        public void Minute()
+        {
+            Sample.Minute.Consume();
+        }
+
+        [Benchmark]
+        public void Second()
+        {
+            Sample.Second.Consume();
+        }
+
+        [Benchmark]
+        public void Millisecond()
+        {
+            Sample.Millisecond.Consume();
+        }
+
+        [Benchmark]
+        public void Date()
+        {
+            Sample.Date.Consume();
+        }
+
+        [Benchmark]
+        public void TimeOfDay()
+        {
+            Sample.TimeOfDay.Consume();
         }

         [Benchmark]


Re-fixed designer's "corrections" to VA Assign again

--- Glyssen/Dialogs/VoiceActorAssignmentDlg.Designer.cs
+++ Glyssen/Dialogs/VoiceActorAssignmentDlg.Designer.cs
@@ -45,10 +45,10 @@
 			this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
 			this.l10NSharpExtender1 = new L10NSharp.UI.L10NSharpExtender(this.components);
 			this.m_btnUpdateGroup = new System.Windows.Forms.Button();
+			this.m_voiceActorGrid = new Glyssen.Controls.VoiceActorInformationGrid();
 			this.splitContainer1 = new System.Windows.Forms.SplitContainer();
 			this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
 			this.m_tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
-			this.m_voiceActorGrid = new Glyssen.Controls.VoiceActorInformationGrid();
 			((System.ComponentModel.ISupportInitialize)(this.m_characterGroupGrid)).BeginInit();
 			((System.ComponentModel.ISupportInitialize)(this.l10NSharpExtender1)).BeginInit();
 			((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@@ -80,7 +80,7 @@
 			this.l10NSharpExtender1.SetLocalizableToolTip(this.m_btnExport, null);
 			this.l10NSharpExtender1.SetLocalizationComment(this.m_btnExport, null);
 			this.l10NSharpExtender1.SetLocalizingId(this.m_btnExport, "DialogBoxes.VoiceActorAssignmentDlg.Export");
-			this.m_btnExport.Location = new System.Drawing.Point(221, 438);
+			this.m_btnExport.Location = new System.Drawing.Point(215, 438);
 			this.m_btnExport.Name = "m_btnExport";
 			this.m_btnExport.Size = new System.Drawing.Size(75, 23);
 			this.m_btnExport.TabIndex = 5;
@@ -237,6 +237,23 @@
 			this.m_btnUpdateGroup.Text = "Update/Edit the Character Group(s)";
 			this.m_btnUpdateGroup.UseVisualStyleBackColor = true;
 			//
+			// m_voiceActorGrid
+			//
+			this.m_voiceActorGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+			this.m_voiceActorGrid.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(73)))), ((int)(((byte)(108)))));
+			this.m_voiceActorGrid.BackgroundColor = System.Drawing.SystemColors.Window;
+			this.l10NSharpExtender1.SetLocalizableToolTip(this.m_voiceActorGrid, null);
+			this.l10NSharpExtender1.SetLocalizationComment(this.m_voiceActorGrid, null);
+			this.l10NSharpExtender1.SetLocalizationPriority(this.m_voiceActorGrid, L10NSharp.LocalizationPriority.NotLocalizable);
+			this.l10NSharpExtender1.SetLocalizingId(this.m_voiceActorGrid, "DialogBoxes.VoiceActorAssignmentDlg.VoiceActorInformationGrid");
+			this.m_voiceActorGrid.Location = new System.Drawing.Point(0, 0);
+			this.m_voiceActorGrid.Margin = new System.Windows.Forms.Padding(0);
+			this.m_voiceActorGrid.Name = "m_voiceActorGrid";
+			this.m_voiceActorGrid.Size = new System.Drawing.Size(305, 403);
+			this.m_voiceActorGrid.TabIndex = 2;
+			//
 			// splitContainer1
 			//
 			this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -291,25 +308,8 @@
 			this.m_tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
 			this.m_tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
 			this.m_tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
-			this.m_tableLayoutPanel.Size = new System.Drawing.Size(299, 432);
+			this.m_tableLayoutPanel.Size = new System.Drawing.Size(305, 432);
 			this.m_tableLayoutPanel.TabIndex = 2;
-			//
-			// m_voiceActorGrid
-			//
-			this.m_voiceActorGrid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-			this.m_voiceActorGrid.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(73)))), ((int)(((byte)(108)))));
-			this.m_voiceActorGrid.BackgroundColor = System.Drawing.SystemColors.Window;
-			this.l10NSharpExtender1.SetLocalizableToolTip(this.m_voiceActorGrid, null);
-			this.l10NSharpExtender1.SetLocalizationComment(this.m_voiceActorGrid, null);
-			this.l10NSharpExtender1.SetLocalizationPriority(this.m_voiceActorGrid, L10NSharp.LocalizationPriority.NotLocalizable);
-			this.l10NSharpExtender1.SetLocalizingId(this.m_voiceActorGrid, "DialogBoxes.VoiceActorAssignmentDlg.VoiceActorInformationGrid");
-			this.m_voiceActorGrid.Location = new System.Drawing.Point(0, 0);
-			this.m_voiceActorGrid.Margin = new System.Windows.Forms.Padding(0);
-			this.m_voiceActorGrid.Name = "m_voiceActorGrid";
-			this.m_voiceActorGrid.Size = new System.Drawing.Size(299, 403);
-			this.m_voiceActorGrid.TabIndex = 2;
 			//
 			// VoiceActorAssignmentDlg
 			//


Fix ResourceManager dependency resolution (#4293)

--- src/OrchardCore/OrchardCore.ResourceManagement/ResourceManager.cs
+++ src/OrchardCore/OrchardCore.ResourceManagement/ResourceManager.cs
@@ -434,7 +434,7 @@
                         continue;
                     }

-                    ExpandDependencies(dependency, tempSettings, allResources);
+                    ExpandDependencies(dependency, settings, allResources);
                 }
             }
             allResources[resource] = settings;


+ More ZoomControl fixes (hopefuly final)

--- GraphX.Controls/Controls/ZoomControl/ZoomControl.cs
+++ GraphX.Controls/Controls/ZoomControl/ZoomControl.cs
@@ -204,6 +204,18 @@
                 _viewFinderDisplay.MouseMove += ViewFinderDisplayMouseMove;
                 _viewFinderDisplay.MouseLeftButtonDown += ViewFinderDisplayBeginCapture;
                 _viewFinderDisplay.MouseLeftButtonUp += ViewFinderDisplayEndCapture;
+                _viewFinderDisplay.IsVisibleChanged += _viewFinderDisplay_IsVisibleChanged;
+            }
+        }
+
+        void _viewFinderDisplay_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+        {
+            //needed to overcome the case when viewbox was hidden by default so no size were calculated
+            if (_viewFinderDisplay.Visibility != Visibility.Collapsed)
+            {
+                _viewFinderDisplay.InvalidateMeasure();
+                _viewFinderDisplay.UpdateLayout();
+                UpdateViewFinderDisplayContentBounds();
             }
         }

@@ -588,7 +600,7 @@

         private void UpdateViewFinderDisplayContentBounds()
         {
-            if (ContentVisual == null || _viewFinderDisplay == null)
+            if (ContentVisual == null || _viewFinderDisplay == null || _viewFinderDisplay.Visibility == Visibility.Collapsed)
                 return;

             /*if (DesignerProperties.GetIsInDesignMode(this))
@@ -1136,11 +1148,8 @@
         {
             if (DesignerProperties.GetIsInDesignMode(this)) return;

-            if (oldContent != null)
-            {
-                var old = oldContent as ITrackableContent;
-                if (old != null) old.ContentSizeChanged -= Content_ContentSizeChanged;
-            }
+            var old = oldContent as ITrackableContent;
+            if (old != null) old.ContentSizeChanged -= Content_ContentSizeChanged;
             if (newContent != null)
             {
                 UpdateViewFinderDisplayContentBounds();


comment fixes signin-Tumblr to signin-tumblr

--- src/Owin.Security.Providers.Tumblr/TumblrAuthenticationOptions.cs
+++ src/Owin.Security.Providers.Tumblr/TumblrAuthenticationOptions.cs
@@ -40,7 +40,7 @@
         /// <summary>
         ///     The request path within the application's base path where the user-agent will be returned.
         ///     The middleware will process this request when it arrives.
-        ///     Default value is "/signin-Tumblr".
+        ///     Default value is "/signin-tumblr".
         /// </summary>
         public PathString CallbackPath { get; set; }


Process collections

Process collections

--- src/Pustota.Maven.Base/Serialization/UpdatingProjectSerializer.cs
+++ src/Pustota.Maven.Base/Serialization/UpdatingProjectSerializer.cs
@@ -81,8 +81,7 @@
 				}
 				else if (typeof(IXmlSerializable).IsAssignableFrom(propertyType))
 				{
-					throw new NotImplementedException("IXmlSerializable");
-					//element = CreatePrimitiveElement(data, propertyInfo);
+					element = ProcessXmlSerializable(data, propertyInfo);
 				}
 				else if (typeof(ICollection).IsAssignableFrom(propertyType))
 				{
@@ -108,9 +107,6 @@
 				//	element = CreatePrimitiveElement(data, propertyInfo);
 				//}
 			}
-
-			// process simple and collections
-			// (run recursively for complex)
 		}

 		private XElement CreatePrimitiveElement(object data, PropertyInfo propertyInfo)
@@ -149,9 +145,7 @@
 			}

 			var element = new XElement(name);
-
-			throw new NotImplementedException("CreateComplexElement");
-
+			ApplyToElement(content, element);
 			return element;
 		}

@@ -169,11 +163,64 @@
 			{
 				return null;
 			}
+			ICollection collection = content as ICollection;
+			if (collection == null)
+			{
+				return null;
+			}
+
+			bool serializeNull = true;
+			string itemName = "Item";
+			XmlArrayItemAttribute attribute = propertyInfo.GetCustomAttribute<XmlArrayItemAttribute>();
+			if (attribute != null)
+			{
+				serializeNull = attribute.IsNullable;
+				itemName = attribute.ElementName;
+			}

 			var element = new XElement(name);

-			throw new NotImplementedException("CreateCollection");
-
+			foreach (var item in collection)
+			{
+				if (item == null)
+				{
+					if (serializeNull == true)
+					{
+						throw new NotImplementedException("IsNullable");
+					}
+				}
+				else
+				{
+					var childElement = new XElement(_ns + itemName);
+					ApplyToElement(item, childElement);
+					element.Add(childElement);
+				}
+			}
+
+			return element;
+		}
+
+
+		private XElement ProcessXmlSerializable(object data, PropertyInfo propertyInfo)
+		{
+			if (!CheckShouldSerialize(data, propertyInfo.Name))
+			{
+				return null;
+			}
+
+			XName name = GetElementName(propertyInfo);
+
+			object content = propertyInfo.GetGetMethod().Invoke(data, null);
+			object defaultValue = GetElementDefaultValue(propertyInfo);
+			if (Equals(content, defaultValue))
+			{
+				return null;
+			}
+
+			var element = new XElement(name);
+
+			throw new NotImplementedException("ProcessXmlSerializable");
+
 			return element;
 		}


AML-3634: remove redundant using statement.

--- src/SFA.DAS.EmployerAccounts/DependencyResolution/DataRegistry.cs
+++ src/SFA.DAS.EmployerAccounts/DependencyResolution/DataRegistry.cs
@@ -5,7 +5,6 @@
 using SFA.DAS.EmployerAccounts.Configuration;
 using SFA.DAS.EmployerAccounts.Data;
 using SFA.DAS.EmployerAccounts.ReadStore.Data;
-using SFA.DAS.EmployerAccounts.ReadStore.DependencyResolution;
 using SFA.DAS.NServiceBus.ClientOutbox;
 using SFA.DAS.NServiceBus.SqlServer.ClientOutbox;
 using SFA.DAS.UnitOfWork;


Changed the markup on the back link

Changed the markup on the back link

--- src/SFA.DAS.EmployerUsers.Web/Views/Account/ChangePassword.cshtml
+++ src/SFA.DAS.EmployerUsers.Web/Views/Account/ChangePassword.cshtml
@@ -3,8 +3,6 @@
     ViewBag.PageID = "page-change-password";
     ViewBag.Title = "Change your password";
 }
-
-Back

 @if (!Model.Data.Valid)
 {
@@ -37,10 +35,10 @@

 }
+

Change your password

 <form method="post">
     @Html.AntiForgeryToken()
-
     <fieldset>
         <legend class="visuallyhidden">New password</legend>

@@ -71,6 +69,15 @@
     </fieldset>
     <button type="submit" class="button">Continue</button>
 </form>
+
 @section scripts {
     @Scripts.Render("~/bundles/password")
-}+}
+
+@section breadcrumb {
+

+

+
Back

+

+

+}


Update Player.cs

Update Player.cs

--- src/TestMode.DotNetCore/Player.cs
+++ src/TestMode.DotNetCore/Player.cs
@@ -4,8 +4,8 @@
 namespace TestMode
 {
     [PooledType]
-    internal class Player : BasePlayer
+    public class Player : BasePlayer
     {

     }
-}+}


Avoid doubling up on child key references.

When querying for child keys for a table, only self-referencing foreign keys should be included from its parent key set.

--- src/SJP.Schematic.Sqlite/SqliteRelationalDatabaseTableProvider.cs
+++ src/SJP.Schematic.Sqlite/SqliteRelationalDatabaseTableProvider.cs
@@ -459,11 +459,28 @@
                     foreignKeysCache[tableName] = childTableParentKeys;
                 }

-                var matchingParentKeys = childTableParentKeys
-                    .Where(fk => string.Equals(tableName.Schema, fk.ParentTable.Schema, StringComparison.OrdinalIgnoreCase)
-                        && string.Equals(tableName.LocalName, fk.ParentTable.LocalName, StringComparison.OrdinalIgnoreCase))
-                    .ToList();
-                result.AddRange(matchingParentKeys);
+                // if this is the current table, only get self-referencing keys, otherwise get all keys
+                var isCurrentTable = string.Equals(tableName.Schema, childTableName.Schema, StringComparison.OrdinalIgnoreCase)
+                    && string.Equals(tableName.LocalName, childTableName.LocalName, StringComparison.OrdinalIgnoreCase);
+                if (isCurrentTable)
+                {
+                    var matchingParentKeys = childTableParentKeys
+                        .Where(fk => string.Equals(tableName.Schema, fk.ChildTable.Schema, StringComparison.OrdinalIgnoreCase)
+                            && string.Equals(tableName.LocalName, fk.ChildTable.LocalName, StringComparison.OrdinalIgnoreCase)
+                            && string.Equals(tableName.Schema, fk.ParentTable.Schema, StringComparison.OrdinalIgnoreCase)
+                            && string.Equals(tableName.LocalName, fk.ParentTable.LocalName, StringComparison.OrdinalIgnoreCase))
+                        .ToList();
+                    result.AddRange(matchingParentKeys);
+                }
+                else
+                {
+                    var matchingParentKeys = childTableParentKeys
+                        .Where(fk => string.Equals(tableName.Schema, fk.ParentTable.Schema, StringComparison.OrdinalIgnoreCase)
+                            && string.Equals(tableName.LocalName, fk.ParentTable.LocalName, StringComparison.OrdinalIgnoreCase))
+                        .ToList();
+                    result.AddRange(matchingParentKeys);
+                }
+
             }

             return result;


reverting code back to old and fast code

--- src/Scribble.CodeSnippets/Scribble.CodeSnippets/CodeFileParser.cs
+++ src/Scribble.CodeSnippets/Scribble.CodeSnippets/CodeFileParser.cs
@@ -67,74 +67,6 @@
             return innerList;
         }

-        //static IEnumerable<CodeSnippet> GetCodeSnippetsUsingRegex(string file, string[] lines)
-        //{
-        //    var overall = new Stopwatch();
-        //    overall.Start();
-
-        //    var innerList2 = new List<CodeSnippet>();
-        //    var text = File.ReadAllText(file);
-
-        //    var stopwatch = new Stopwatch();
-        //    stopwatch.Restart();
-        //    var inner = new Stopwatch();
-        //    foreach (Match tag in Regex.Matches(text, StartRegex, Options))
-        //    {
-        //        inner.Restart();
-        //        var key = tag.Groups["key"];
-        //        var value = key.Value;
-        //        var startRow = text.Substring(0, key.Index)
-        //                           .Count(c => c == '\n') + 1;
-        //        var language = tag.Groups["language"].Value;
-
-        //        innerList2.Add(new CodeSnippet
-        //        {
-        //            File = file,
-        //            Key = value,
-        //            StartRow = startRow,
-        //            Language = language
-        //        });
-        //        inner.Stop();
-        //        Console.WriteLine("StartRegex inner loop {0} took {1}ms", value, inner.ElapsedMilliseconds);
-        //    }
-
-        //    stopwatch.Stop();
-        //    Console.WriteLine("StartRegex loop took {0}ms", stopwatch.ElapsedMilliseconds);
-
-        //    stopwatch.Restart();
-        //    foreach (Match tag in Regex.Matches(text, EndRegex, Options))
-        //    {
-
-        //        var key = tag.Groups["key"];
-        //        var value = key.Value;
-        //        var rowNumber = text.Substring(0, key.Index)
-        //                            .Count(c => c == '\n') + 1;
-
-        //        var existing = innerList2.FirstOrDefault(c => c.Key == value);
-        //        if (existing == null)
-        //        {
-        //            // TODO: message about failure
-        //        }
-        //        else
-        //        {
-        //            existing.EndRow = rowNumber;
-        //            var count = existing.EndRow - existing.StartRow;
-        //            existing.Value = string.Join(LineEnding, lines.Skip(existing.StartRow)
-        //                                                          .Take(count)
-        //                                                          .Where(IsNotCodeSnippetTag));
-        //        }
-        //    }
-
-        //    stopwatch.Stop();
-        //    Console.WriteLine("EndRegex loop took {0}ms", stopwatch.ElapsedMilliseconds);
-
-        //    overall.Stop();
-        //    Console.WriteLine("Overall took {0}ms", overall.ElapsedMilliseconds);
-
-        //    return innerList2;
-        //}
-
-        [Obsolete]
         static IEnumerable<CodeSnippet> GetCodeSnippetsFromFile(IList<string> lines)
         {
             var innerList = new List<CodeSnippet>();


Automatically add expiration claim to identity

--- src/Sentinel.OAuth/Providers/OAuth/SentinelAccessTokenProvider.cs
+++ src/Sentinel.OAuth/Providers/OAuth/SentinelAccessTokenProvider.cs
@@ -116,6 +116,7 @@
             }

             context.Ticket.Identity.AddClaim(new Claim(ClaimType.AccessToken, accessToken));
+            context.Ticket.Identity.AddClaim(new Claim(ClaimTypes.Expiration, DateTime.UtcNow.Add(this.options.AccessTokenLifetime).ToString("O")));

             context.SetToken(accessToken);


Fix SftpFileStream corrupting data on upload

--- Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs
+++ Renci.SshClient/Renci.SshNet/Sftp/SftpFileStream.cs
@@ -31,6 +31,7 @@
         private long _position;
         private bool _bufferOwnedByWrite;
         private bool _canSeek;
+        private ulong _serverFilePosition;

         private SftpFileAttributes _attributes;

@@ -241,6 +242,7 @@
             this._bufferOwnedByWrite = false;
             this._canSeek = true;
             this._position = 0;
+            this._serverFilePosition = 0;
             this._session.Disconnected += Session_Disconnected;

             var flags = Flags.None;
@@ -300,6 +302,7 @@
             if (mode == FileMode.Append)
             {
                 this._position = this._attributes.Size;
+                this._serverFilePosition = (ulong)this._attributes.Size;
             }
         }

@@ -488,11 +491,12 @@
                     {
                         this._bufferPosn = 0;

-                        var data = this._session.RequestRead(this._handle, (ulong)this.Position, (uint)this._bufferSize);
+                        var data = this._session.RequestRead(this._handle, (ulong)this._position, (uint)this._bufferSize);

                         this._bufferLen = data.Length;

                         Buffer.BlockCopy(data, 0, this._buffer, 0, this._bufferLen);
+                        this._serverFilePosition = (ulong)this._position;

                         if (this._bufferLen < 0)
                         {
@@ -555,10 +559,11 @@
                 {
                     this._bufferPosn = 0;

-                    var data = this._session.RequestRead(this._handle, (ulong)this.Position, (uint)this._bufferSize);
+                    var data = this._session.RequestRead(this._handle, (ulong)this._position, (uint)this._bufferSize);

                     this._bufferLen = data.Length;
                     Buffer.BlockCopy(data, 0, this._buffer, 0, this._bufferSize);
+                    this._serverFilePosition = (ulong)this._position;

                     if (this._bufferLen < 0)
                     {
@@ -649,6 +654,7 @@
                         throw new EndOfStreamException("End of stream.");
                     }
                     this._position = newPosn;
+                    this._serverFilePosition = (ulong)newPosn;
                 }
                 else
                 {
@@ -803,7 +809,8 @@

                         using (var wait = new AutoResetEvent(false))
                         {
-                            this._session.RequestWrite(this._handle, (ulong)this.Position, data, wait);
+                            this._session.RequestWrite(this._handle, this._serverFilePosition, data, wait);
+                            this._serverFilePosition += (ulong)data.Length;
                         }

                         this._bufferPosn = 0;
@@ -824,7 +831,8 @@

                         using (var wait = new AutoResetEvent(false))
                         {
-                            this._session.RequestWrite(this._handle, (ulong)this.Position, data, wait);
+                            this._session.RequestWrite(this._handle, this._serverFilePosition, data, wait);
+                            this._serverFilePosition += (ulong)data.Length;
                         }
                     }
                     else
@@ -850,7 +858,8 @@

                     using (var wait = new AutoResetEvent(false))
                     {
-                        this._session.RequestWrite(this._handle, (ulong)this.Position, data, wait);
+                        this._session.RequestWrite(this._handle, this._serverFilePosition, data, wait);
+                        this._serverFilePosition += (ulong)data.Length;
                     }

                     this._bufferPosn = 0;
@@ -884,7 +893,8 @@

                     using (var wait = new AutoResetEvent(false))
                     {
-                        this._session.RequestWrite(this._handle, (ulong)this.Position, data, wait);
+                        this._session.RequestWrite(this._handle, this._serverFilePosition, data, wait);
+                        this._serverFilePosition += (ulong)data.Length;
                     }

                     this._bufferPosn = 0;
@@ -961,7 +971,8 @@

                 using (var wait = new AutoResetEvent(false))
                 {
-                    this._session.RequestWrite(this._handle, (ulong)(this.Position - this._bufferPosn), data, wait);
+                    this._session.RequestWrite(this._handle, this._serverFilePosition, data, wait);
+                    this._serverFilePosition += (ulong)data.Length;
                 }

                 this._bufferPosn = 0;


Fixed build statistics parsing

Fixed build statistics parsing

--- src/Sentinel.Tests/Integration/TokenManagers/TokenManagerTests.cs
+++ src/Sentinel.Tests/Integration/TokenManagers/TokenManagerTests.cs
@@ -7,6 +7,7 @@
     using Sentinel.Tests.Constants;
     using System;
     using System.Diagnostics;
+    using System.Globalization;
     using System.Security.Claims;

     public abstract class TokenManagerTests
@@ -90,7 +91,7 @@

             Console.WriteLine();
             Console.WriteLine($"Authenticating authorization code took {this.testStopwatch.Elapsed - createAccessTokenElapsed} seconds");
-            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateAuthorizationCodeAsync' value='{(this.testStopwatch.Elapsed - createAccessTokenElapsed).TotalMilliseconds}']");
+            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateAuthorizationCodeAsync' value='{(this.testStopwatch.Elapsed - createAccessTokenElapsed).TotalMilliseconds.ToString(CultureInfo.InvariantCulture)}']");

             Assert.IsTrue(user.Identity.IsAuthenticated);
         }
@@ -176,7 +177,7 @@

             Console.WriteLine();
             Console.WriteLine($"Authenticating access token took {this.testStopwatch.Elapsed - createAccessTokenElapsed} seconds");
-            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateAccessTokenAsync' value='{(this.testStopwatch.Elapsed - createAccessTokenElapsed).TotalMilliseconds}']");
+            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateAccessTokenAsync' value='{(this.testStopwatch.Elapsed - createAccessTokenElapsed).TotalMilliseconds.ToString(CultureInfo.InvariantCulture)}']");

             Assert.IsTrue(user.Identity.IsAuthenticated);
         }
@@ -253,7 +254,7 @@

             Console.WriteLine();
             Console.WriteLine($"Authenticating refresh token took {this.testStopwatch.Elapsed - createRefreshTokenElapsed} seconds");
-            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateRefreshTokenAsync' value='{(this.testStopwatch.Elapsed - createRefreshTokenElapsed).TotalMilliseconds}']");
+            Console.WriteLine($"##teamcity[buildStatisticValue key='{this.GetType().Name}.AuthenticateRefreshTokenAsync' value='{(this.testStopwatch.Elapsed - createRefreshTokenElapsed).TotalMilliseconds.ToString(CultureInfo.InvariantCulture)}']");

             Assert.IsTrue(user.Identity.IsAuthenticated);
         }


Fixed Location header in HTTP 201 Created responses.

--- src/Server/DeviceHive.API/Filters/HttpCreatedResponseAttribute.cs
+++ src/Server/DeviceHive.API/Filters/HttpCreatedResponseAttribute.cs
@@ -1,31 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
 using System.Web.Http.Filters;
-using System.Web.Http.Routing;
-using Newtonsoft.Json.Linq;

 namespace DeviceHive.API.Filters
 {
     public class HttpCreatedResponseAttribute : ActionFilterAttribute
     {
-        public override void OnActionExecuted(HttpActionExecutedContext context)
-        {
-            if (context.Response != null && context.Response.IsSuccessStatusCode)
-            {
-                context.Response.StatusCode = HttpStatusCode.Created;
-                context.Response.Content.ReadAsStringAsync().ContinueWith(task =>
-                    {
-                        var result = JObject.Parse(task.Result);
-                        if (result["id"] != null)
-                        {
-                            var controller = context.ActionContext.ControllerContext.ControllerDescriptor.ControllerName;
-                            var route = new UrlHelper(context.Request).Route(null, new { controller = controller, id = result["id"] });
-                            context.Response.Headers.Location = new Uri(context.Request.RequestUri, route);
-                        }
-                    }).Wait();
+        public override async Task OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)
+        {
+            if (actionExecutedContext.Response != null && actionExecutedContext.Response.IsSuccessStatusCode)
+            {
+                // set HTTP 201 status
+                actionExecutedContext.Response.StatusCode = HttpStatusCode.Created;
+
+                // set Location header
+                var result = JObject.Parse(await actionExecutedContext.Response.Content.ReadAsStringAsync());
+                if (result["id"] != null)
+                    actionExecutedContext.Response.Headers.Location = new Uri(actionExecutedContext.Request.RequestUri.AbsoluteUri + "/" + result["id"]);
             }
-        }
+        }
     }
 }


feature(SignUpAlert): Add button-primary-white class to button

--- src/StockportWebapp/Views/stockportgov/Shared/SignUpAlerts.cshtml
+++ src/StockportWebapp/Views/stockportgov/Shared/SignUpAlerts.cshtml
@@ -2,6 +2,6 @@
     <form action="/subscribe?EmailAlertsTopicId=@ViewData["SignUpAlertsTopicIdTopicId"]" method="POST">
         <label for="emailAddress">Sign up to receive our news and email alerts in your inbox</label>
         <input type="email" name="emailAddress" id="emailAddress" placeholder="Enter your email address">
-        <button type="submit">Subscribe</button>
+        <button class="button-primary-white" type="submit">Subscribe</button>
     </form>
 </section>


fix: null checking reply (one way call)

fix: null checking reply (one way call)

--- SMLogging/RequestLoggingDispatchMessageInspector.cs
+++ SMLogging/RequestLoggingDispatchMessageInspector.cs
@@ -66,14 +66,26 @@
             var now = DateTimeOffset.UtcNow;
             var requestTraceData = (RequestTraceData)correlationState;

-            var requestMessage = OperationContext.Current.RequestContext.RequestMessage.ToString();
-            var requestSize = Encoding.UTF8.GetByteCount(requestMessage);
+            var requestSize = 0;
+            var requestMessage = OperationContext.Current?.RequestContext?.RequestMessage?.ToString();
+            if (requestMessage != null)
+            {
+                requestSize = Encoding.UTF8.GetByteCount(requestMessage);
+            }

-            var bufferedCopy = reply.CreateBufferedCopy(int.MaxValue);
-            reply = bufferedCopy.CreateMessage();
-
-            var responseMessage = bufferedCopy.CreateMessage().ToString();
-            var responseSize = Encoding.UTF8.GetByteCount(responseMessage);
+            var responseSize = 0;
+            var faultCode = "Success";
+            if (reply != null)
+            {
+                var bufferedCopy = reply.CreateBufferedCopy(int.MaxValue);
+                reply = bufferedCopy.CreateMessage();
+                var responseMessage = bufferedCopy.CreateMessage().ToString();
+                responseSize = Encoding.UTF8.GetByteCount(responseMessage);
+                if (reply.IsFault)
+                {
+                    faultCode = GetFaultCode(responseMessage);
+                }
+            }

             _traceSource.TraceData(TraceEventType.Information, 0,
                 requestTraceData.StartDateTime.ToString("yyyy-MM-dd"),
@@ -87,7 +99,7 @@
                 requestTraceData.Target?.Port ?? 0,
                 requestTraceData.Target?.ToString() ?? "null",
                 requestTraceData.Action ?? "null",
-                reply.IsFault ? GetFaultCode(responseMessage) : "Success",
+                faultCode,
                 responseSize,
                 requestSize,
                 (now - requestTraceData.StartDateTime).TotalMilliseconds
@@ -97,7 +109,7 @@
         private static string GetFaultCode(string message)
         {
             var faultCode = "UnknownFault";
-
+
             try
             {
                 var document = XDocument.Parse(message);


Remove dead code in ZLibNative

Remove dead code in ZLibNative

--- src/System.IO.Compression/src/System/IO/Compression/ZLibNative.cs
+++ src/System.IO.Compression/src/System/IO/Compression/ZLibNative.cs
@@ -1,10 +1,10 @@
 // Copyright (c) Microsoft. All rights reserved.
 // Licensed under the MIT license. See LICENSE file in the project root for full license information.

+using System.Diagnostics;
 using System.Diagnostics.Contracts;
 using System.Runtime.InteropServices;
 using System.Security;
-using System.Text;

 namespace System.IO.Compression
 {
@@ -221,7 +221,6 @@

             public ZLibStreamHandle()
-
                 : base(new IntPtr(-1), true)
             {
                 _zStream = new ZStream();
@@ -236,7 +235,7 @@
             public override bool IsInvalid
             {
                 [SecurityCritical]
-                get { return DangerousGetHandle() == new IntPtr(-1); }
+                get { return handle == new IntPtr(-1); }
             }

             public State InitializationState
@@ -250,9 +249,6 @@
             [SecurityCritical]
             protected override bool ReleaseHandle()
             {
-                // We are in a finalizer thread at the end of the App and the finalization of the dynamically loaded ZLib happend
-                // to be scheduled first. In such case we have no hope of properly freeing zStream. If the process is dying - we
-                // do not care. In other cases somethign went badly wrong anyway:
                 switch (InitializationState)
                 {
                     case State.NotInitialized: return true;
@@ -412,48 +408,17 @@
             public string GetErrorMessage()
             {
                 // This can work even after XxflateEnd().
-
-                if (ZNullPtr.Equals(_zStream.msg))
-                    return String.Empty;
-
-                unsafe
-                {
-                    StringBuilder sb = new StringBuilder();
-                    SByte* pMessage = (SByte*)_zStream.msg;
-                    char c;
-                    do
-                    {
-                        c = (char)*pMessage;
-                        pMessage++;
-                        sb.Append(c);
-                    } while ((sbyte)c != 0);
-
-                    return sb.ToString();
-                }
+                return _zStream.msg != ZNullPtr ? Marshal.PtrToStringAnsi(_zStream.msg) : string.Empty;
             }

             #endregion  // Expose ZLib functions for use by user / Fx code (add more as required)

-            [SecurityCritical]
-            internal static Int32 ZLibCompileFlags()
-            {
-                return Interop.zlib.zlibCompileFlags();
-            }
         }  // class ZLibStreamHandle

         #endregion  // ZLib Stream Handle type

         #region public factory methods for ZLibStreamHandle
-
-
-        [SecurityCritical]
-        public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle)
-        {
-            return CreateZLibStreamForDeflate(out zLibStreamHandle,
-                                              CompressionLevel.DefaultCompression, Deflate_DefaultWindowBits,
-                                              Deflate_DefaultMemLevel, CompressionStrategy.DefaultStrategy);
-        }

         [SecurityCritical]
@@ -466,13 +431,6 @@

         [SecurityCritical]
-        public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle)
-        {
-            return CreateZLibStreamForInflate(out zLibStreamHandle, Deflate_DefaultWindowBits);
-        }
-
-
-        [SecurityCritical]
         public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle, int windowBits)
         {
             zLibStreamHandle = new ZLibStreamHandle();
@@ -481,15 +439,5 @@

         #endregion  // public factory methods for ZLibStreamHandle

-
-        #region public utility APIs
-
-        [SecurityCritical]
-        public static Int32 ZLibCompileFlags()
-        {
-            return ZLibStreamHandle.ZLibCompileFlags();
-        }
-        #endregion  // public utility APIs
-
     }  // internal class ZLibNative
 }  // namespace System.IO.Compression


Bumped the version.

Bumped the version.

--- JexusManager/Properties/AssemblyInfo.cs
+++ JexusManager/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 + "190a69a439dbfb969ebad72a6f7e2e047907da4a7b9c08c6e98d5f1be8b8cafaf3eb978914059a"
 + "245d4bc1")]

-[assembly: AssemblyVersion("12.0.3.0")]
-[assembly: AssemblyFileVersion("12.0.3.0")]
+[assembly: AssemblyVersion("12.0.4.0")]
+[assembly: AssemblyFileVersion("12.0.4.0")]


add test ShouldTargetSitecoreVersion()

add test ShouldTargetSitecoreVersion()

--- Score.ContentSearch.Algolia.Tests/FrameworkTests.cs
+++ Score.ContentSearch.Algolia.Tests/FrameworkTests.cs
@@ -7,6 +7,7 @@
 using System.Threading.Tasks;
 using FluentAssertions;
 using NUnit.Framework;
+using Sitecore.Data.Items;

 namespace Score.ContentSearch.Algolia.Tests
 {
@@ -33,5 +34,26 @@
 #endif
             attribute.FrameworkName.Should().Be($".NETFramework,Version=v{expected}");
         }
+
+        [Test]
+        public void ShouldTargetSitecoreVersion()
+        {
+            //Arrange
+            var assembly = Assembly.GetAssembly(typeof (Item));
+
+            //Act
+            var version = assembly.GetName().Version.Major;
+
+            //Assert
+
+            var expected = 7;
+#if (SITECORE8)
+            expected = 8;
+#endif
+#if (SITECORE82)
+            expected = 10;
+#endif
+            version.Should().Be(expected);
+        }
     }
 }


An IsAlive fix. Replicated from Bugfix.

An IsAlive fix. Replicated from Bugfix.

--- ServiceLykkeWallet/Controllers/GeneralController.cs
+++ ServiceLykkeWallet/Controllers/GeneralController.cs
@@ -33,7 +33,7 @@
                     // Checking if Blockchain explorer is accessable
                     // The address is a random one taken from blockchain, does not have a special meaning
                     var testAddress = (WebSettings.ConnectionParams.BitcoinNetwork == Network.Main ?
-                        "1F1hsoSN9rGPZdwk3SJHin2q7jQsftSteU" : " mt4BFpmdbGft3Q8eQDo5ehUVNq99uzBugy ");
+                        "1F1hsoSN9rGPZdwk3SJHin2q7jQsftSteU" : "mt4BFpmdbGft3Q8eQDo5ehUVNq99uzBugy");
                     var walletOutputs = await OpenAssetsHelper.GetWalletOutputs
                         (testAddress, WebSettings.ConnectionParams.BitcoinNetwork, entities);


Modify default InformationUs.cshtml template

--- SharpCLABot/Views/Home/Default.InformationUs.cshtml
+++ SharpCLABot/Views/Home/Default.InformationUs.cshtml
@@ -1,11 +1,11 @@

-    Company Name
Silicon Studio Corp.

+    Company Name
Enter Your Company Name.

     Office

Head Office

-      1-21-3 Ebisu Shibuya-ku,

-      Tokyo 150-0013 Japan

-      Phone +81-3-5488-7070 Fax +81-3-5488-7433

+      Enter your Address,

+      Enter your City/ZipCode

+      Enter your Phone


Add Snackbar

Add Snackbar

--- Sigma.Core.Monitors.WPF/View/Windows/SigmaWindow.cs
+++ Sigma.Core.Monitors.WPF/View/Windows/SigmaWindow.cs
@@ -165,6 +165,11 @@
 		/// </summary>
 		public DialogHost DialogHost { get; private set; }

+		/// <summary>
+		/// The snackbar that is in the rootelement of every window and can be used to send notifications.
+		/// </summary>
+		public Snackbar Snackbar { get; private set; }
+
 		#endregion UIElements

 		/// <summary>
@@ -326,11 +331,15 @@

 			DialogHostIdentifier = BaseDialogHostIdentifier + WindowIndex;
 			DialogHost = new DialogHost { Identifier = DialogHostIdentifier };
+			// TODO: factory
+			// TODO: style
+			Snackbar = new Snackbar { MessageQueue = new SnackbarMessageQueue(TimeSpan.FromSeconds(2)), HorizontalAlignment = HorizontalAlignment.Stretch };
 			LoadingIndicatorElement = CreateObjectByFactory<UIElement>(LoadingIndicatorFactoryIdentifier);
 			RootContentElement = CreateContent(monitor, other, out _titleBar);

 			RootElement.Children.Add(RootContentElement);
 			RootElement.Children.Add(DialogHost);
+			RootElement.Children.Add(Snackbar);
 			RootElement.Children.Add(LoadingIndicatorElement);

 			if (other == null)


bugfix auth

bugfix auth

--- Signum.React.Extensions/Authorization/AuthServer.cs
+++ Signum.React.Extensions/Authorization/AuthServer.cs
@@ -87,8 +87,7 @@
                         var container = fi.GetValue(null) as IOperationSymbolContainer;
                         if (container != null)
                             mi.Extension.Add("operationAllowed",
-                                UserEntity.Current == null
-                                    ? false
+                                UserEntity.Current == null ? false
                                     : OperationAuthLogic.GetOperationAllowed(container.Symbol, inUserInterface: true));
                     }
                 };


pochvame da majem po master detail

pochvame da majem po master detail

--- MassiveDynamic/MassiveDynamic/DeleteCustomesForm.cs
+++ MassiveDynamic/MassiveDynamic/DeleteCustomesForm.cs
@@ -1,17 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Configuration;
-using System.Data;
-using System.Data.SqlClient;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
+namespace MassiveDynamic
+{
+    using System;
+    using System.Configuration;
+    using System.Data.SqlClient;
+    using System.Windows.Forms;

-namespace MassiveDynamic
-{
     public partial class DeleteCustomesForm : Form
     {
         public DeleteCustomesForm()
@@ -40,7 +33,7 @@
             {
                 con.Open();
                 com.ExecuteNonQuery();
-                MessageBox.Show("Данните са изтрити успешно!","Message/Съобщение");
+                MessageBox.Show("Данните са изтрити успешно!", "Message/Съобщение");
             }
             catch (Exception)
             {


make LambdaToJavascriptConverter throw for LiteModels

--- Signum.React/Facades/LambdaToJavascriptConverter.cs
+++ Signum.React/Facades/LambdaToJavascriptConverter.cs
@@ -7,7 +7,7 @@

 internal class LambdaToJavascriptConverter
 {
-    public static string? ToJavascript(LambdaExpression lambdaExpression)
+    public static string? ToJavascript(LambdaExpression lambdaExpression, bool assert)
     {
         if (lambdaExpression == null)
             return null;
@@ -17,7 +17,12 @@
         var body = ToJavascript(newLambda.Parameters.Single(), newLambda.Body);

         if (body == null)
+        {
+            if (assert)
+                throw new InvalidOperationException("Unable to convert to Javascript:" + lambdaExpression.ToString());
+
             return null;
+        }

         return "return " + body;
     }
@@ -137,6 +142,17 @@
                     return "fd.toLite(" + obj + ")";
             }

+            if (mc.Method.Name == nameof(Entity.Mixin))
+            {
+                var obj = ToJavascript(param, mc.Object!);
+                if (obj != null)
+                {
+                    var mixinType = mc.Method.GetGenericArguments().SingleEx();
+                    return $"{obj}.mixins['{ Reflector.CleanTypeName(mixinType)}']";
+
+                }
+            }
+
             if (mc.Method.Name == nameof(string.Format) && mc.Method.DeclaringType == typeof(string) ||
                 mc.Method.Name == nameof(StringExtensions.FormatWith) && mc.Method.DeclaringType == typeof(StringExtensions))
             {
@@ -148,8 +164,7 @@
                 var strFormat = ToJavascriptToString(param, format);
                 var arguments = args.Select(a => ToJavascriptToString(param, a)).ToList();

-                if (strFormat != null && !arguments.Contains(null))
-                    return $"{strFormat}.formatWith(" + arguments.ToString(", ") + ")";
+                return $"{strFormat}.formatWith(" + arguments.ToString(", ") + ")";
             }

             if (mc.Method.IsExtensionMethod() && mc.Arguments.Only()?.Type == typeof(Type))


quizzes are now done

 quizzes are now done

Former-commit-id: 65f02dca4b2a83664eb84f19cbd045bd64feb5a6

--- MeTLMeeting/SandRibbon/Quizzing/AssessAQuiz.xaml.cs
+++ MeTLMeeting/SandRibbon/Quizzing/AssessAQuiz.xaml.cs
@@ -43,7 +43,7 @@
                 responseCount.Content = string.Format("({0} responses)", answers.Count());
                 resultDisplay.ItemsSource = question.options.Select(o =>
                 {
-                    if (answers != null && answers.Count() > 0)
+                    if (answers != null)
                     {
                         var relevant = answers.Where(a => a.answer == o.name);
                         return new DisplayableResultSet


--- Signum.Web.Extensions.Selenium/SeleniumTestClass.cs
+++ Signum.Web.Extensions.Selenium/SeleniumTestClass.cs
@@ -147,9 +147,9 @@
         public virtual string GetCurrentUser()
         {
             if (selenium.IsElementPresent("jq=.sf-login:visible"))
-                return null;
-
-            if (!selenium.IsElementPresent("jq=.sf-logout:visible"))
+                return null;
+
+            if (!selenium.IsElementPresent("jq=a[href$='Auth/Logout']"))
                 throw new InvalidOperationException("No login or logout button found");

             var result = selenium.GetEval("window.$('.sf-logout').attr('data-user')");
@@ -158,8 +158,8 @@
         }

         public virtual void Logout()
-        {
-            selenium.Click("jq=.sf-logout:visible");
+        {
+            selenium.Click("jq=a[href$='Auth/Logout']");
             selenium.WaitForPageToLoad();
             selenium.Open(Url("Auth/Login"));
             selenium.WaitForPageToLoad();


Add `PropertyManagerPageBase.CreateButton`; Clean up

--- SolidworksAddinFramework/PropertyManagerPageBase.cs
+++ SolidworksAddinFramework/PropertyManagerPageBase.cs
@@ -40,7 +40,6 @@
                 MacroFeature.Cancel();
             }
         }
-
     }

     /// <summary>
@@ -198,8 +197,11 @@

         public IObservable<int> OptionCheckedObservable(int id) => _OptionChecked.Where(i => i == id);

+        private readonly Subject<int> _ButtonPressed = new Subject<int>();
+        public IObservable<int> ButtonPressedObservable(int id) => _ButtonPressed.Where(i => i == id);
         public virtual void OnButtonPress(int id)
         {
+            _ButtonPressed.OnNext(id);
         }

         #region textbox
@@ -263,8 +265,11 @@
         }
         #endregion

-        public virtual void OnSelectionboxFocusChanged(int id)
-        {
+        private readonly Subject<int> _SelectionBoxFocusChangedSubject = new Subject<int>();
+        public IObservable<Unit> SelectionBoxFocusChangedObservable(int id) => _SelectionBoxFocusChangedSubject.Where(i => id == i).Select(_=>Unit.Default);
+        public void OnSelectionboxFocusChanged(int id)
+        {
+            _SelectionBoxFocusChangedSubject.OnNext(id);
         }

         #region selection changed observables
@@ -479,7 +484,7 @@
         {
             var id = NextId();
             var box = PropertyManagerGroupExtensions.CreateLabel(@group, id, caption, tip);
-            return WrapControl(box);
+            return WrapControlAndDisposable(box);
         }

         protected IDisposable CreateOption<T>(IPropertyManagerPageGroup @group, string tip, string caption, Func<T> get, Action<T> set, T match)
@@ -515,32 +520,34 @@
         }

         protected IDisposable CreateSelectionBox(IPropertyManagerPageGroup @group, string tip, string caption,
-            Func<IPropertyManagerPageSelectionbox, IDisposable> config)
+            Action<IPropertyManagerPageSelectionbox> config)
+        {
+            return CreateSelectionBox(@group, tip, caption, config, () => { });
+        }
+
+        protected IDisposable CreateSelectionBox(IPropertyManagerPageGroup @group, string tip, string caption, Action<IPropertyManagerPageSelectionbox> config,
+            Action onFocus)
         {
             var id = NextId();
             var box = PropertyManagerGroupExtensions.CreateSelectionBox(@group, id, caption, tip);
             config(box);
-            return WrapControl(box);
-        }
-
-        protected IDisposable CreateSelectionBox(IPropertyManagerPageGroup @group, string tip, string caption,
-            Action<IPropertyManagerPageSelectionbox> config)
-        {
-            var id = NextId();
-            var box = PropertyManagerGroupExtensions.CreateSelectionBox(@group, id, caption, tip);
-            config(box);
-            // For the moment we don't have any callbacks / rx stuff to register.
-            return WrapControl(box);
+            var d0 = SelectionBoxFocusChangedObservable(id).Subscribe(_ => onFocus());
+            return WrapControlAndDisposable(box, d0);
+        }
+
+        protected IDisposable CreateButton(IPropertyManagerPageGroup @group, string tip, string caption, Action onClick)
+        {
+            var id = NextId();
+            var box = PropertyManagerGroupExtensions.CreateButton(@group, id, caption, tip);
+            var d0 = ButtonPressedObservable(id).Subscribe(_ => onClick());
+            return WrapControlAndDisposable(box, d0);
         }

         #region control reference holding
-        private IDisposable WrapControlAndDisposable(object control, IDisposable d)
-        {
-            return new  ControlHolder(control, d);
-        }
-        private IDisposable WrapControl(object control)
-        {
-            return new  ControlHolder(control, Disposable.Empty);
+
+        private IDisposable WrapControlAndDisposable(object control, params IDisposable[] d)
+        {
+            return new ControlHolder(control, d.ToCompositeDisposable());
         }

         /// <summary>
@@ -567,9 +574,8 @@
                 Disposable.Dispose();
             }
         }
-        #endregion
-
-
+
+        #endregion

         private int NextId()
         {


Adjust IsDecayable to exclude WorldObjects with Lifespan (#3129)

--- Source/ACE.Server/WorldObjects/WorldObject_Decay.cs
+++ Source/ACE.Server/WorldObjects/WorldObject_Decay.cs
@@ -32,6 +32,10 @@
             // Don't rot generators, and items that were generated by a generator
             // If the item was generated by a generator and then picked up by a player, the wo.Generator property would be set to null.
             if (IsGenerator || Generator != null)
+                return false;
+
+            // Don't rot items with lifespan, they'll handle their own version of decay.
+            if (Lifespan.HasValue)
                 return false;

             if (TimeToRot.HasValue)


fixing burning coal (#2815)

fixing burning coal (#2815)

--- Source/ACE.Server/WorldObjects/WorldObject_Magic.cs
+++ Source/ACE.Server/WorldObjects/WorldObject_Magic.cs
@@ -348,6 +348,9 @@

             var spellTarget = !spell.IsSelfTargeted ? target as Creature : creature;

+            if (this is Gem || this is Hook)
+                spellTarget = target as Creature;
+
             var targetPlayer = spellTarget as Player;

             // NonComponentTargetType should be 0 for untargeted spells.


Removed erroneous using directive

Removed erroneous using directive

--- KodiInterop/KodiInterop/RouteManager.cs
+++ KodiInterop/KodiInterop/RouteManager.cs
@@ -3,7 +3,6 @@
 using System.Collections.Specialized;
 using System.Linq;
 using System.Web;
-using TestPlugin;

 namespace Smx.KodiInterop
 {


TreeListBox: do not change IsExpanded state when source is changed (e.g. when unloading a view)

--- Source/PropertyTools.Wpf/TreeListBox/TreeListBox.cs
+++ Source/PropertyTools.Wpf/TreeListBox/TreeListBox.cs
@@ -632,11 +632,6 @@
                         continue;
                     }

-                    if (container.IsExpanded)
-                    {
-                        container.IsExpanded = false;
-                    }
-
                     if (container.IsSelected)
                     {
                         this.SelectedItems.Remove(item);


Refactoring some codes

Refactoring some codes

--- Source/Shared/System/Kinugasa.Map/PropertyMapper.cs
+++ Source/Shared/System/Kinugasa.Map/PropertyMapper.cs
@@ -1,4 +1,5 @@
-using System.Reflection;
+using System.Collections.Generic;
+using System.Reflection;
 using Kinugasa.Map.Attributes;

 /// <summary>
@@ -21,12 +22,12 @@
             where TDestination : class
             where TSource : class
         {
-            var destinationTypeInfo = destination.GetType().GetTypeInfo();
-            var sourceTypeInfo = source.GetType().GetTypeInfo();
+            var destinationProperties = destination.GetType().GetTypeInfo().DeclaredProperties;
+            var sourceProperties = source.GetType().GetTypeInfo().DeclaredProperties;

-            foreach (PropertyInfo destinationPropertyInfo in destinationTypeInfo.DeclaredProperties)
+            foreach (PropertyInfo destinationPropertyInfo in destinationProperties)
             {
-                foreach (PropertyInfo sourcePropertyInfo in sourceTypeInfo.DeclaredProperties)
+                foreach (PropertyInfo sourcePropertyInfo in sourceProperties)
                 {
                     if (destinationPropertyInfo.Name == sourcePropertyInfo.Name)
                     {
@@ -48,10 +49,10 @@
             where TDestination : class
             where TSource : class
         {
-            var destinationTypeInfo = destination.GetType().GetTypeInfo();
-            var sourceTypeInfo = source.GetType().GetTypeInfo();
+            var destinationProperties = destination.GetType().GetTypeInfo().DeclaredProperties;
+            var sourceProperties = source.GetType().GetTypeInfo().DeclaredProperties;

-            foreach (PropertyInfo destinationPropertyInfo in destinationTypeInfo.DeclaredProperties)
+            foreach (PropertyInfo destinationPropertyInfo in destinationProperties)
             {
                 var attribute = destinationPropertyInfo.GetCustomAttribute(typeof(MapAttribute));
                 if (attribute == null)
@@ -60,7 +61,7 @@
                 }

                 string attributeName = ((MapAttribute)attribute).AttributeName;
-                foreach (PropertyInfo sourcePropertyInfo in sourceTypeInfo.DeclaredProperties)
+                foreach (PropertyInfo sourcePropertyInfo in sourceProperties)
                 {
                     if (attributeName == sourcePropertyInfo.Name)
                     {


REMOVED: Slash.ECS - Duplicate lookup when removing compound entities.

--- Source/Slash.ECS/Source/Systems/CompoundEntities.cs
+++ Source/Slash.ECS/Source/Systems/CompoundEntities.cs
@@ -178,15 +178,10 @@

         private void OnEntityRemoved(int entityId)
         {
-            var entity = this.GetEntity(entityId);
-
-            if (entity == null)
-            {
-                return;
-            }
-
-            this.entities.Remove(entityId);
-            this.OnEntityRemoved(entityId, entity);
+            if (this.entities.Remove(entityId))
+            {
+                this.OnEntityRemoved(entityId, entity);
+            }
         }

         private void OnEntityRemoved(int entityid, T entity)


Fixes bug in Slice.TryGetValue

Fixes bug in Slice.TryGetValue

--- Common/Data/Slice.cs
+++ Common/Data/Slice.cs
@@ -225,7 +225,7 @@
             if (_data.Value.TryGetValue(symbol, out symbolData))
             {
                 data = symbolData.GetData();
-                return true;
+                return data != null;
             }
             return false;
         }


Add metadata field to OrderLineRequest (#180)

Co-authored-by: Keven van Zuijlen <ef77cee2a517b3dc39365a08e3d5391e7d5e78e4@thesio.eu>

--- Mollie.Api/Models/Order/Request/OrderLineRequest.cs
+++ Mollie.Api/Models/Order/Request/OrderLineRequest.cs
@@ -1,4 +1,7 @@
-namespace Mollie.Api.Models.Order {
+using Mollie.Api.JsonConverters;
+using Newtonsoft.Json;
+
+namespace Mollie.Api.Models.Order {
     public class OrderLineRequest {
         /// <summary>
         /// The type of product bought, for example, a physical or a digital product. Must be one of the following values:
@@ -60,5 +63,11 @@
         /// A link pointing to the product page in your web shop of the product sold.
         /// </summary>
         public string ProductUrl { get; set; }
+
+        /// <summary>
+        /// The optional metadata you provided upon line creation.
+        /// </summary>
+        [JsonConverter(typeof(RawJsonConverter))]
+        public string Metadata { get; set; }
     }
 }


Add obsolete constructor back

Add obsolete constructor back

--- Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -1143,6 +1143,9 @@

 		internal event EventHandler<ErrorHandlerEventArgs> ErrorHandler;

+		[Obsolete ("This constructor will be removed in next version")]
+		protected Connection (TextWriter logWriter) : this () { }
+
 		protected Connection () {
 			closed = false;
 			reply_packets = new Dictionary<int, byte[]> ();
@@ -1163,7 +1166,7 @@
 				}
 			}
 		}
-
+
 		protected abstract int TransportReceive (byte[] buf, int buf_offset, int len);
 		protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
 		protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);


Update CachedImage.cs

Update CachedImage.cs

--- source/FFImageLoading.Forms/CachedImage.cs
+++ source/FFImageLoading.Forms/CachedImage.cs
@@ -528,7 +528,7 @@
 					height = desiredHeight * (width / desiredWidth);
 				}

-				return new SizeRequest(new Size(width, height));
+				return new SizeRequest(new Size(double.IsNaN(width) ? 0 : width, double.IsNaN(height) ? 0 : height));
 			}

 			if (double.IsPositiveInfinity(widthConstraint) && double.IsPositiveInfinity(heightConstraint))


Fix wording.

Fix wording.

--- source/Nuke.Core/Tooling/ProcessManager.cs
+++ source/Nuke.Core/Tooling/ProcessManager.cs
@@ -104,7 +104,7 @@

             ApplyEnvironmentVariables(environmentVariables, startInfo);
             PrintEnvironmentVariables(startInfo);
-            CheckPathVariables(startInfo);
+            CheckPathEnvironmentVariable(startInfo);

             var process = Process.Start(startInfo);
             if (process == null)
@@ -169,13 +169,13 @@
             }
         }

-        private static void CheckPathVariables (ProcessStartInfo startInfo)
+        private static void CheckPathEnvironmentVariable (ProcessStartInfo startInfo)
         {
             startInfo.Environment
                     .SingleOrDefault(x => x.Key.Equals("path", StringComparison.OrdinalIgnoreCase))
                     .Value.Split(';')
                     .Where(x => !Directory.Exists(x))
-                    .ForEach(x => Logger.Warn($"Path variable contains invalid path '{x}'."));
+                    .ForEach(x => Logger.Warn($"Path environment variable contains invalid or inaccessible path '{x}'."));
         }
     }
 }


8.9 version bump

8.9 version bump

--- source/Playnite/Properties/AssemblyInfo.cs
+++ source/Playnite/Properties/AssemblyInfo.cs
@@ -35,7 +35,7 @@
 // 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("8.8.0.*")]
+[assembly: AssemblyVersion("8.9.0.*")]
 [assembly: InternalsVisibleTo("Playnite.Tests")]
 [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Playnite")]
 [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Playnite.Controls")]


new position for level 3

new position for level 3

--- MemoryGames/MemoryGames/CardPosition.cs
+++ MemoryGames/MemoryGames/CardPosition.cs
@@ -6,6 +6,11 @@
     {
         public int X { get; set; }
         public int Y { get; set; }
+        public CardPosition()
+        {
+
+        }
+
         public CardPosition(int x, int y)
         {
             this.X = x;
@@ -17,7 +22,9 @@
                 { new CardPosition(2,15), new CardPosition(15,15), new CardPosition(28,15),
                   new CardPosition(41,15), new CardPosition(54,15), new CardPosition(67,15),},
                 { new CardPosition(2,26), new CardPosition(15,26), new CardPosition(28,26),
-                  new CardPosition(41,26), new CardPosition(54,26), new CardPosition(67,26),}
+                  new CardPosition(41,26), new CardPosition(54,26), new CardPosition(67,26),},
+                { new CardPosition(2,37), new CardPosition(15,37), new CardPosition(28,37),
+                  new CardPosition(41,37), new CardPosition(54,37), new CardPosition(67,37),}
                 };
             return Positions[row, col];
         }


Checking 'self' params

Checking 'self' params

--- MoaiUtils/MoaiParsing/MoaiCodeParser.cs
+++ MoaiUtils/MoaiParsing/MoaiCodeParser.cs
@@ -467,6 +467,22 @@
                 }
             }

+            // Check 'self' params
+            foreach (var overload in method.Overloads) {
+                if (overload.InParameters.Skip(1).Any(param => param.Name == "self")) {
+                    Warnings.Add(methodPosition, WarningType.UnexpectedValue,
+                        "'self' param must be at index 1.");
+                }
+                var firstInParam = overload.InParameters.FirstOrDefault();
+                if (firstInParam != null && firstInParam.Name == "self") {
+                    if (firstInParam.Type != method.OwningType) {
+                        Warnings.Add(methodPosition, WarningType.UnexpectedValue,
+                            "'self' param is of type {0}. Expected {1}.",
+                            firstInParam.Type != null ? firstInParam.Type.Name : "unknown", method.OwningType.Name);
+                    }
+                }
+            }
+
             // Analyze body to find undocumented overloads
             var matches = paramAccessRegex.Matches(methodBody);
             foreach (Match match in matches) {


suggestion to remove the class from code base

--- Stratis.Bitcoin/Utilities/DBreezeNoSqlRepository.cs
+++ Stratis.Bitcoin/Utilities/DBreezeNoSqlRepository.cs
@@ -5,60 +5,73 @@

 namespace Stratis.Bitcoin.Utilities
 {
-	public class DBreezeNoSqlRepository : NoSqlRepository, IDisposable
-	{
-		DBreezeSingleThreadSession _Session;
-		string _Name;
-		public DBreezeNoSqlRepository(string name, string folder)
-		{
+    /// <summary>
+    /// TODO: This code does not seem to be used anywhere in the code base (except for its tests), it does not seem useful to document it,
+    /// I suggest to remove it from the codebase completely together with the tests.
+    /// </summary>
+    public class DBreezeNoSqlRepository : NoSqlRepository, IDisposable
+    {
+        private DBreezeSingleThreadSession session;
+        private string name;
+        public DBreezeNoSqlRepository(string name, string folder)
+        {
             Guard.NotEmpty(name, nameof(name));
             Guard.NotEmpty(folder, nameof(folder));

-            this._Name = name;
-			this._Session = new DBreezeSingleThreadSession(name, folder);
-            this._Session.Do(() =>
-			{
-                this._Session.Transaction.ValuesLazyLoadingIsOn = false;
-			});
-		}
+            this.name = name;
+            this.session = new DBreezeSingleThreadSession(name, folder);
+            this.session.Do(() =>
+            {
+                this.session.Transaction.ValuesLazyLoadingIsOn = false;
+            });
+        }

-		public void Dispose()
-		{
-            this._Session.Dispose();
-		}

-		protected override Task<byte[]> GetBytes(string key)
-		{
+        protected override Task<byte[]> GetBytes(string key)
+        {
             Guard.NotEmpty(key, nameof(key));

-			return this._Session.Do(() =>
-			{
-				var row = this._Session.Transaction.Select<string, byte[]>(this._Name, key);
-				if(row == null || !row.Exists)
-					return null;
-				return row.Value;
-			});
-		}
-		protected override Task PutBytes(string key, byte[] data)
-		{
+            return this.session.Do(() =>
+            {
+                var row = this.session.Transaction.Select<string, byte[]>(this.name, key);
+                if (row == null || !row.Exists)
+                    return null;
+                return row.Value;
+            });
+        }
+        protected override Task PutBytes(string key, byte[] data)
+        {
             Guard.NotEmpty(key, nameof(key));
             Guard.NotNull(data, nameof(data));

-            return this._Session.Do(() =>
-			{
-				this._Session.Transaction.Insert(this._Name, key, data);
-                this._Session.Transaction.Commit();
-			});
-		}
+            return this.session.Do(() =>
+            {
+                this.session.Transaction.Insert(this.name, key, data);
+                this.session.Transaction.Commit();
+            });
+        }

-		protected override async Task PutBytesBatch(IEnumerable<Tuple<string, byte[]>> enumerable)
-		{
+        protected override async Task PutBytesBatch(IEnumerable<Tuple<string, byte[]>> enumerable)
+        {
             Guard.NotNull(enumerable, nameof(enumerable));

             foreach (var kv in enumerable)
-			{
-				await this.PutBytes(kv.Item1, kv.Item2).ConfigureAwait(false);
-			}
-		}
-	}
+            {
+                await this.PutBytes(kv.Item1, kv.Item2).ConfigureAwait(false);
+            }
+        }
+
+        #region IDisposable Members
+
+        /// <summary>
+        /// Disposes the object by disposing the underlaying session.
+        /// </summary>
+        public void Dispose()
+        {
+            this.session.Dispose();
+        }
+
+        #endregion
+
+    }
 }


Implement TestPhoneNumbers method

Implement TestPhoneNumbers method

--- StressMeasurementSystem.Tests/Models/ContactTest.cs
+++ StressMeasurementSystem.Tests/Models/ContactTest.cs
@@ -104,6 +104,20 @@
             Assert.AreEqual(org.JobTitle, "CEO");
         }

+        [Test]
+        public void TestPhoneNumbers()
+        {
+            Assert.Equals(_contact.PhoneNumbers.Count, 2);
+
+            var pnWork = _contact.PhoneNumbers[0];
+            Assert.AreEqual(pnWork.Number, "(800) 123-4567");
+            Assert.AreSame(pnWork.T, PhoneInfo.Type.Work);
+
+            var pnMobile = _contact.PhoneNumbers[1];
+            Assert.AreEqual(pnMobile.Number, "(123) 456-7890");
+            Assert.AreSame(pnMobile.T, PhoneInfo.Type.Mobile);
+        }
+
         #endregion


Fixed namespace

Fixed namespace

--- ModernDesignTemplate/DelegateCommand.cs
+++ ModernDesignTemplate/DelegateCommand.cs
@@ -1,7 +1,7 @@
 using System;
 using System.Windows.Input;

-namespace TedTechVpn.UserInterface
+namespace ModernDesignTemplate
 {
     public delegate bool CommandCanExecute();


Finalized the PlatformDirectories class and tests.

--- Symbiote.Core.Tests/Platform/PlatformDirectories.cs
+++ Symbiote.Core.Tests/Platform/PlatformDirectories.cs
@@ -49,9 +49,9 @@
                                                                                ▀▀                            */

 using System;
-using Xunit;
 using System.Collections.Generic;
 using Symbiote.SDK.Platform;
+using Xunit;

 namespace Symbiote.Core.Tests
 {
@@ -61,13 +61,65 @@
     [Collection("PlatformDirectories")]
     public class PlatformDirectories
     {
+        #region Private Fields
+
+        /// <summary>
+        ///     The shared dictionary containing a "bad" set of directories.
+        /// </summary>
+        private Dictionary<string, string> badDirs;
+
+        /// <summary>
+        ///     The shared dictionary containing a "good" set of directories.
+        /// </summary>
+        private Dictionary<string, string> goodDirs;
+
+        #endregion Private Fields
+
+        #region Public Constructors
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="PlatformDirectories"/> class.
+        /// </summary>
+        public PlatformDirectories()
+        {
+            goodDirs = new Dictionary<string, string>();
+
+            goodDirs.Add("Data", "Data");
+            goodDirs.Add("Archives", "Archives");
+            goodDirs.Add("Plugins", "Plugins");
+            goodDirs.Add("Temp", "Temp");
+            goodDirs.Add("Persistence", "Persistence");
+            goodDirs.Add("Web", "Web");
+            goodDirs.Add("Logs", "Logs");
+
+            badDirs = new Dictionary<string, string>(goodDirs);
+
+            badDirs.Remove("Data");
+        }
+
+        #endregion Public Constructors
+
+        #region Public Methods
+
         /// <summary>
         ///     Tests all constructor overloads.
         /// </summary>
         [Fact]
         public void Constructor()
         {
-            Platform.PlatformDirectories test = new Platform.PlatformDirectories(GetTestDirs());
+            Platform.PlatformDirectories test = new Platform.PlatformDirectories(goodDirs);
+            Assert.IsType<Platform.PlatformDirectories>(test);
+
+            Assert.Throws<DirectoryConfigurationException>(() => new Platform.PlatformDirectories(badDirs));
+        }
+
+        /// <summary>
+        ///     Tests all properties.
+        /// </summary>
+        [Fact]
+        public void Properties()
+        {
+            Platform.PlatformDirectories test = new Platform.PlatformDirectories(goodDirs);

             Assert.Equal(FullDir("Data"), test.Data);
             Assert.Equal(FullDir("Archives"), test.Archives);
@@ -78,19 +130,13 @@
             Assert.Equal(FullDir("Logs"), test.Logs);
         }

-        [Fact]
-        public void BadConstructor()
-        {
-            Assert.Throws<DirectoryConfigurationException>(() => new PlatformDirectories(GetBadTestDirs()));
-        }
-
         /// <summary>
         ///     Tests <see cref="ToDictionary"/> and spot-checks the outcome.
         /// </summary>
         [Fact]
         public void ToDictionary()
         {
-            PlatformDirectories test = new PlatformDirectories(GetTestDirs());
+            Platform.PlatformDirectories test = new Platform.PlatformDirectories(goodDirs);

             Assert.Equal(FullDir("Data"), test.Data);
             Assert.Equal(FullDir("Archives"), test.Archives);
@@ -104,6 +150,10 @@
             Assert.Equal(FullDir("Temp"), dict["Temp"]);
         }

+        #endregion Public Methods
+
+        #region Private Methods
+
         /// <summary>
         ///     Returns the fully qualified path for the specified directory, relative to the application root.
         /// </summary>
@@ -115,34 +165,6 @@
             return System.IO.Path.Combine(root, dir);
         }

-        /// <summary>
-        ///     Returns a dictionary containing the necessary directory key-value pairs.
-        /// </summary>
-        /// <returns>A dictionary containing the necessary directory key-value pairs.</returns>
-        private Dictionary<string, string> GetTestDirs()
-        {
-            Dictionary<string, string> retVal = new Dictionary<string, string>();
-
-            retVal.Add("Data", "Data");
-            retVal.Add("Archives", "Archives");
-            retVal.Add("Plugins", "Plugins");
-            retVal.Add("Temp", "Temp");
-            retVal.Add("Persistence", "Persistence");
-            retVal.Add("Web", "Web");
-            retVal.Add("Logs", "Logs");
-
-            return retVal;
-        }
-
-        /// <summary>
-        ///     Returns a dictionary containing an invalid number of directory key-value pairs.
-        /// </summary>
-        /// <returns>A dictionary containing an invalid number of directory key-value pairs.</returns>
-        private Dictionary<string, string> GetBadTestDirs()
-        {
-            Dictionary<string, string> retVal = GetTestDirs();
-            retVal.Remove("Data");
-            return retVal;
-        }
+        #endregion Private Methods
     }
 }


adding one lost file

adding one lost file

--- TddToolkit/Subgenerators/GenericMethodProxyCalls.cs
+++ TddToolkit/Subgenerators/GenericMethodProxyCalls.cs
@@ -6,14 +6,10 @@
 {
   public class GenericMethodProxyCalls
   {
-    public GenericMethodProxyCalls()
-    {
-    }
-
-    public object ResultOfGenericVersionOfMethod<T>(Type type, string name)
+    public object ResultOfGenericVersionOfMethod<T>(T instance, Type genericArgumentType, string name)
     {
       return typeof(T).GetMethods().Where(NameIs(name))
-        .First(ParameterlessGenericVersion()).MakeGenericMethod(type).Invoke(null, null);
+        .First(ParameterlessGenericVersion()).MakeGenericMethod(genericArgumentType).Invoke(instance, null);
     }

     public static Func<MethodInfo, bool> ParameterlessGenericVersion()
@@ -26,38 +22,23 @@
       return m => m.Name == name;
     }

-    public object ResultOfGenericVersionOfMethod<T>(Type type, string name, object[] args)
+    public object ResultOfGenericVersionOfMethod<T>(T instance, Type type1, Type type2, string name)
     {
-      var method = FindEmptyGenericsMethod<T>(name);
-
-      var genericMethod = method.MakeGenericMethod(type);
-
-      return genericMethod.Invoke(null, args);
-    }
-
-    public object ResultOfGenericVersionOfMethod<T>(Type type1, Type type2, string name)
-    {
-      var method = FindEmptyGenericsMethod<T>(name);
+      var method = FindEmptyGenericsInstanceMethod<T>(name);

       var genericMethod = method.MakeGenericMethod(type1, type2);

-      return genericMethod.Invoke(null, null);
+      return genericMethod.Invoke(instance, null);
     }

-    public object ResultOfGenericVersionOfMethod(Type type, string name)
-    {
-      return ResultOfGenericVersionOfMethod<Any>(type, name);
-    }
-
-    public MethodInfo FindEmptyGenericsMethod<T>(string name)
+    public MethodInfo FindEmptyGenericsInstanceMethod<T>(string name)
     {
       var methods = typeof(T).GetMethods(
-          BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static)
+          BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
         .Where(m => m.IsGenericMethodDefinition)
         .Where(m => !m.GetParameters().Any());
       var method = methods.First(m => m.Name == name);
       return method;
     }
-
   }
 }


Add a specific user-agent to CoinChoose.com requests

--- MultiMiner.Coinchoose.Api/ApiContext.cs
+++ MultiMiner.Coinchoose.Api/ApiContext.cs
@@ -10,6 +10,9 @@
         public static List<CoinInformation> GetCoinInformation()
         {
             WebClient client = new WebClient();
+            const string userAgent = "MultiMiner/V1";
+            client.Headers.Add("user-agent", userAgent);
+
             string jsonString = client.DownloadString("http://www.coinchoose.com/api.php");
             JArray jsonArray = JArray.Parse(jsonString);

@@ -18,9 +21,7 @@
             foreach (JToken jToken in jsonArray)
             {
                 CoinInformation coinInformation = new CoinInformation();
-
                 coinInformation.PopulateFromJson(jToken);
-
                 result.Add(coinInformation);
             }


Added ability to re-initialize the target after it has been previously initialized and the form was destroyed later

--- NLog.Windows.Forms/RichTextBoxTarget.cs
+++ NLog.Windows.Forms/RichTextBoxTarget.cs
@@ -96,7 +96,10 @@
             foreach (Target target in LogManager.Configuration.AllTargets)
             {
                 RichTextBoxTarget textboxTarget = target as RichTextBoxTarget;
-                if (textboxTarget != null && textboxTarget.FormName == form.Name && textboxTarget.TargetRichTextBox == null)
+                if (textboxTarget != null
+                        && textboxTarget.FormName == form.Name
+                        && (textboxTarget.TargetRichTextBox == null || textboxTarget.TargetRichTextBox.IsDisposed)
+                    )
                 {
                     //can't use InitializeTarget here as the Application.OpenForms would not work from Form's constructor
                     RichTextBox textboxControl = FormHelper.FindControl<RichTextBox>(textboxTarget.ControlName, form);


Removes doc comment typos.

Removes doc comment typos.

Not sure how those 's' characters got there, but they would show up in the VS tooltip.

--- Octokit/Models/Request/NewRepository.cs
+++ Octokit/Models/Request/NewRepository.cs
@@ -21,17 +21,17 @@
         /// </summary>
         public string Description { get; set; }

-        /// <summary>s
+        /// <summary>
         /// Optional. Gets or sets whether to enable downloads for the new repository. The default is true.
         /// </summary>
         public bool? HasDownloads { get; set; }

-        /// <summary>s
+        /// <summary>
         /// Optional. Gets or sets whether to enable issues for the new repository. The default is true.
         /// </summary>
         public bool? HasIssues { get; set; }

-        /// <summary>s
+        /// <summary>
         /// Optional. Gets or sets whether to enable the wiki for the new repository. The default is true.
         /// </summary>
         public bool? HasWiki { get; set; }


* One more item for CSharpSqlite * Hopefully this will enable mac people to use SQLite again * Someone cooler then me will need to figure out how to define CSharpSqlite with Mono so the conditional will pick up. * There's also an error that occurs when you first load OpenSimulator under CSharpSQLite that goes away after. * The databases are not byte for byte compatible.  Mono.Data.Sqlite is able to read CSharpSqlite made databases but not the reverse way.

--- OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -116,10 +116,17 @@
         {
             EstateSettings es = new EstateSettings();
             es.OnSave += StoreEstateSettings;
-
-            IDataReader r = cmd.ExecuteReader();
-
-            if (r.Read())
+            IDataReader r = null;
+            try
+            {
+                 r = cmd.ExecuteReader();
+            }
+            catch (SqliteException)
+            {
+                m_log.Error("[SQLITE]: There was an issue loading the estate settings.  This can happen the first time running OpenSimulator with CSharpSqlite the first time.  OpenSimulator will probably crash, restart it and it should be good to go.");
+            }
+
+            if (r != null && r.Read())
             {
                 foreach (string name in FieldList)
                 {


* And, so did the UDPServer Verboseness

* And, so did the UDPServer Verboseness

--- OpenSim/Region/ClientStack/UDPServer.cs
+++ OpenSim/Region/ClientStack/UDPServer.cs
@@ -112,7 +112,7 @@
             {
                 // TODO : Actually only handle those states that we have control over, re-throw everything else,
                 // TODO: implement cases as we encounter them.
-                m_log.Error("UDPSERVER", "Connection Error! - " + e.ToString());
+                //m_log.Error("UDPSERVER", "Connection Error! - " + e.ToString());
                 switch (e.SocketErrorCode)
                 {
                     case SocketError.AlreadyInProgress:
@@ -156,7 +156,7 @@
                         {
                             Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender,
                                                     ReceivedData, null);
-
+
                             // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
                             // so therefore..  we've got to tell the server to BeginReceiveFrom again.
                             // This will happen over and over until we've gone through all packets
@@ -180,9 +180,9 @@

                 return;
             }
-            catch (ObjectDisposedException e)
-            {
-                m_log.Warn("UDPSERVER", "Connection Error! - " + e.ToString());
+            catch (ObjectDisposedException)
+            {
+
                 //MainLog.Instance.Debug("UDPSERVER", e.ToString());
                 return;
             }
@@ -193,18 +193,9 @@
             {
                 packet = PacketPool.Instance.GetPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
             }
-            catch (Exception e)
-            {
-                MainLog.Instance.Warn("UDPSERVER","Packet Error! - " + e.ToString());
-                try
-                {
-                    packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
-                    MainLog.Instance.Warn("UDPSERVER", "Recovered from Packet Error - " + e.ToString());
-                }
-                catch (Exception e2)
-                {
-                    MainLog.Instance.Warn("UDPSERVER", "2nd Packet Error! - " + e.ToString());
-                }
+            catch (Exception)
+            {
+
             }

             if (packet != null)
@@ -227,7 +218,7 @@
                 {
                     // invalid client
                     //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
-                    m_log.Warn("UDPSERVER", "Got a packet from an invalid client - " + packet.ToString());
+                    //m_log.Warn("UDPSERVER", "Got a packet from an invalid client - " + packet.ToString());

                 }
             }


optimizing U+7FF(wip)

optimizing U+7FF(wip)


Adding even if it is just one vessel

Adding even if it is just one vessel

--- PhysicsRangeExtender/TerrainExtender.cs
+++ PhysicsRangeExtender/TerrainExtender.cs
@@ -144,7 +144,7 @@

         private void InitialFetch()
         {
-            if (initialLoading && FlightGlobals.VesselsLoaded.Count > 1)
+            if (initialLoading && FlightGlobals.VesselsLoaded.Count >= 1)
             {
                 foreach (var vessel in FlightGlobals.VesselsLoaded)
                 {