removed use of DataVar

removed use of DataVar

git-svn-id: 1b52f0a7ed2a8098cb721f3b9b4408691a7bfc16@444 c93b7781-d36b-0e4d-be4f-9d94f2a838be

--- Libraries/DAE.DevicePGSQL/Source/Device.PGSQL/PostgreSQLInstructionNodes.cs
+++ Libraries/DAE.DevicePGSQL/Source/Device.PGSQL/PostgreSQLInstructionNodes.cs
@@ -13,6 +13,7 @@
 using Alphora.Dataphor.DAE.Runtime.Instructions;
 using Alphora.Dataphor.DAE.Schema;
 using Alphora.Dataphor.DAE.Server;
+using Alphora.Dataphor.DAE.Streams;
 using ColumnExpression = Alphora.Dataphor.DAE.Language.SQL.ColumnExpression;
 using DropIndexStatement = Alphora.Dataphor.DAE.Language.PGSQL.DropIndexStatement;
 using SelectStatement = Alphora.Dataphor.DAE.Language.SQL.SelectStatement;
@@ -20,22 +21,20 @@
 namespace Alphora.Dataphor.Device.PGSQL
 {

-    #region Instruction Nodes
-
-    public class PostgreSQLPostgreSQLBinaryCompareNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryCompareNode : BinaryInstructionNode
     {
-        public static int Compare(Scalar ALeftValue, Scalar ARightValue)
+        public static int Compare(ServerProcess AProcess, object ALeftValue, object ARightValue)
         {
-            Stream LLeftStream = ALeftValue.IsNative
-                                     ? new MemoryStream(ALeftValue.AsByteArray, 0, ALeftValue.AsByteArray.Length, false,
-                                                        true)
-                                     : ALeftValue.OpenStream();
+            Stream LLeftStream =
+                ALeftValue is byte[]
+                    ? new MemoryStream((byte[])ALeftValue, 0, ((byte[])ALeftValue).Length, false, true)
+                    : AProcess.StreamManager.Open((StreamID)ALeftValue, LockMode.Exclusive);
             try
             {
-                Stream LRightStream = ARightValue.IsNative
-                                          ? new MemoryStream(ARightValue.AsByteArray, 0, ARightValue.AsByteArray.Length,
-                                                             false, true)
-                                          : ARightValue.OpenStream();
+                Stream LRightStream =
+                    ARightValue is byte[]
+                        ? new MemoryStream((byte[])ARightValue, 0, ((byte[])ARightValue).Length, false, true)
+                        : AProcess.StreamManager.Open((StreamID)ARightValue, LockMode.Exclusive);
                 try
                 {
                     int LLeftByte;
@@ -69,100 +68,80 @@
             }
         }

-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              Compare((Scalar)AArguments[0].Value, (Scalar)AArguments[1].Value)));
+                return Compare(AProcess, AArgument1, AArgument2);
         }
     }

-    public class PostgreSQLPostgreSQLBinaryEqualNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryEqualNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) == 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) == 0;
         }
     }

-    public class PostgreSQLPostgreSQLBinaryNotEqualNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryNotEqualNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) != 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) != 0;
         }
     }

-    public class PostgreSQLPostgreSQLBinaryLessNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryLessNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) < 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) < 0;
         }
     }

-    public class PostgreSQLPostgreSQLBinaryInclusiveLessNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryInclusiveLessNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) <= 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) <= 0;
         }
     }

-    public class PostgreSQLPostgreSQLBinaryGreaterNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryGreaterNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) > 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) > 0;
         }
     }

-    public class PostgreSQLPostgreSQLBinaryInclusiveGreaterNode : InstructionNode
+    public class PostgreSQLPostgreSQLBinaryInclusiveGreaterNode : BinaryInstructionNode
     {
-        public override DataVar InternalExecute(ServerProcess AProcess, DataVar[] AArguments)
+        public override object InternalExecute(ServerProcess AProcess, object AArgument1, object AArgument2)
         {
-            if ((AArguments[0].Value == null) || (AArguments[1].Value == null))
-                return new DataVar(FDataType, null);
+            if ((AArgument1 == null) || (AArgument2 == null))
+                return null;
             else
-                return new DataVar(FDataType,
-                                   new Scalar(AProcess, (ScalarType)FDataType,
-                                              PostgreSQLPostgreSQLBinaryCompareNode.Compare((Scalar)AArguments[0].Value,
-                                                                                (Scalar)AArguments[1].Value) >= 0));
+                return PostgreSQLPostgreSQLBinaryCompareNode.Compare(AProcess, AArgument1, AArgument2) >= 0;
         }
     }

-    #endregion
+
 }


Show leveling solution with new ValueTag control

--- MatterControlLib/PrinterControls/ControlWidgets/PrinterCalibrationWizard.cs
+++ MatterControlLib/PrinterControls/ControlWidgets/PrinterCalibrationWizard.cs
@@ -121,10 +121,18 @@
 							var levelingSolution = printer.Settings.GetValue(SettingsKey.print_leveling_solution);

 							var column = CreateColumn(theme);
-							column.AddChild(new TextWidget(levelingSolution, pointSize: theme.DefaultFontSize, textColor: theme.TextColor)
-							{
-								Margin = new BorderDouble(bottom: 4)
-							});
+
+							column.AddChild(
+								new ValueTag(
+									"Leveling Solution".Localize(),
+									levelingSolution,
+									new BorderDouble(12, 5, 2, 5),
+									5,
+									11)
+								{
+									Margin = new BorderDouble(bottom: 4),
+									MinimumSize = new Vector2(125, 0)
+								});

 							var probeWidget = new ProbePositionsWidget(printer, positions.Select(v => new Vector2(v)).ToList(), theme)
 							{


Finalized property shape tests

Finalized property shape tests

--- RDFSharp.Test/Model/Validation/Abstractions/Shapes/RDFPropertyShapeTests.cs
+++ RDFSharp.Test/Model/Validation/Abstractions/Shapes/RDFPropertyShapeTests.cs
@@ -70,6 +70,10 @@
         }

         [TestMethod]
+        public void ShouldThrowExceptionOnCreatingPropertyShapeBecauseNullPath()
+            => Assert.ThrowsException<RDFModelException>(() => new RDFPropertyShape(null));
+
+        [TestMethod]
         public void ShouldEnumeratePropertyShape()
         {
             RDFPropertyShape propertyShape = new RDFPropertyShape(new RDFResource("ex:propertyShape"), RDFVocabulary.FOAF.NAME);
@@ -95,8 +99,9 @@
         {
             RDFPropertyShape propertyShape = new RDFPropertyShape(new RDFResource("ex:propertyShape"), RDFVocabulary.FOAF.NAME);
             propertyShape.AddName(new RDFPlainLiteral("hello"));
-
-            Assert.IsTrue(propertyShape.Names.Count == 1);
+            propertyShape.AddName(new RDFTypedLiteral("hello", RDFModelEnums.RDFDatatypes.XSD_STRING));
+
+            Assert.IsTrue(propertyShape.Names.Count == 2);
         }

         [TestMethod]
@@ -105,8 +110,9 @@
         {
             RDFPropertyShape propertyShape = new RDFPropertyShape(new RDFResource("ex:propertyShape"), RDFVocabulary.FOAF.NAME);
             propertyShape.AddDescription(new RDFPlainLiteral("hello"));
+            propertyShape.AddDescription(new RDFTypedLiteral("hello", RDFModelEnums.RDFDatatypes.XSD_STRING));

-            Assert.IsTrue(propertyShape.Descriptions.Count == 1);
+            Assert.IsTrue(propertyShape.Descriptions.Count == 2);
         }

         [TestMethod]


PhasorProtocolAdapters: Updated PhasorMeasurementMapper to pick-up current ServerIndex from frame parser and cached connection info before possible failures in case communications client switches to another target

--- Source/Libraries/Adapters/PhasorProtocolAdapters/PhasorMeasurementMapper.cs
+++ Source/Libraries/Adapters/PhasorProtocolAdapters/PhasorMeasurementMapper.cs
@@ -146,9 +146,7 @@
         private ConcurrentDictionary<string, DeviceStatisticsHelper<ConfigurationCell>> m_labelDefinedDevices;
         private readonly ConcurrentDictionary<string, long> m_undefinedDevices;
         private readonly ConcurrentDictionary<SignalKind, string[]> m_generatedSignalReferenceCache;
-        private string[] m_serverList;
         private ushort[] m_accessIDList;
-        private int m_serverIndex;
         private MissingDataMonitor m_missingDataMonitor;
         private SharedTimer m_dataStreamMonitor;
         private SharedTimer m_measurementCounter;
@@ -156,6 +154,7 @@
         private readonly object m_configurationOperationLock;
         private readonly ConcurrentDictionary<Guid, string> m_connectionIDCache;
         private volatile IConfigurationFrame m_configurationFrame;
+        private string m_connectionInfo;
         private int m_lastConfigurationPublishMinute;
         private bool m_configurationFramePublished;
         private long m_receivedConfigurationFrames;
@@ -234,15 +233,14 @@
         {
             get
             {
-                if (m_serverIndex >= 0 && m_serverIndex < m_accessIDList?.Length)
-                    return m_accessIDList[m_serverIndex];
-
-                if (m_accessIDList?.Length > 0)
-                    return m_accessIDList[0];
-
-                return (ushort)1;
-            }
-        }
+                if (ServerIndex >= 0 && ServerIndex < m_accessIDList?.Length)
+                    return m_accessIDList[ServerIndex];
+
+                return m_accessIDList?.Length > 0 ? m_accessIDList[0] : (ushort)1;
+            }
+        }
+
+        private int ServerIndex => m_frameParser?.ServerIndex ?? 0;

         private IEnumerable<DeviceStatisticsHelper<ConfigurationCell>> StatisticsHelpers => m_labelDefinedDevices != null ? m_definedDevices.Values.Concat(m_labelDefinedDevices.Values) : m_definedDevices.Values;

@@ -714,7 +712,7 @@
                     status.AppendLine();
                 }

-                status.AppendFormat(" Source connection ID code: {0:N0} (index = {1:N0})", AccessID, m_serverIndex);
+                status.AppendFormat(" Source connection ID code: {0:N0} (index = {1:N0})", AccessID, ServerIndex);
                 status.AppendLine();
                 status.AppendFormat("     Forcing label mapping: {0}", m_forceLabelMapping);
                 status.AppendLine();
@@ -956,13 +954,10 @@

                 settings["server"] = string.Join(",", serverList);
                 ConnectionString = settings.JoinKeyValuePairs();
-
-                m_serverList = serverList.Select(server => $"tcp://{server}".ToLower()).ToArray();
                 m_accessIDList = accessIDList.Count == 0 ? new[] { defaultAccessID } : accessIDList.ToArray();
             }
             else
             {
-                m_serverList = Array.Empty<string>();
                 m_accessIDList = new[] { defaultAccessID };
             }

@@ -2566,32 +2561,7 @@
             Exception ex = e.Argument1;

             if (EnableConnectionErrors)
-                OnProcessException(MessageLevel.Info, new ConnectionException($"Connection attempt failed for {ConnectionInfo}: {ex.Message}", ex));
-
-            // Check for multiple access IDs
-            if (m_accessIDList.Length > 1 && m_frameParser.TransportProtocol == TransportProtocol.Tcp)
-            {
-                // Next server URI is selected by TCP client when a connection exception occurs
-                string serverUri = m_frameParser.CommandChannelServerUri;
-
-                if (!string.IsNullOrWhiteSpace(serverUri))
-                {
-                    m_serverIndex = 0;
-
-                    // Lookup matching server URI
-                    for (int i = 0; i < m_serverList.Length; i++)
-                    {
-                        if (m_serverList[i].Equals(serverUri, StringComparison.Ordinal))
-                        {
-                            m_serverIndex = i;
-                            break;
-                        }
-                    }
-
-                    // Set new access ID for frame parser
-                    m_frameParser.DeviceID = AccessID;
-                }
-            }
+                OnProcessException(MessageLevel.Info, new ConnectionException($"Connection attempt failed for {m_connectionInfo}: {ex.Message}", ex));

             // So long as user hasn't requested to stop, keep trying connection
             if (Enabled)
@@ -2620,7 +2590,10 @@

         private void m_frameParser_ConnectionAttempt(object sender, EventArgs e)
         {
-            OnStatusMessage(MessageLevel.Info, $"Initiating {m_frameParser.PhasorProtocol.GetFormattedProtocolName()} protocol connection...");
+            // Cache connection info before possible failure in case connection switches to another target
+            m_connectionInfo = ConnectionInfo;
+
+            OnStatusMessage(MessageLevel.Info, $"Initiating {m_frameParser.PhasorProtocol.GetFormattedProtocolName()} protocol connection to {m_connectionInfo}...");
             ConnectionAttempts++;
         }


Fixed issues where not working

Fixed issues where not working

--- Source/Libraries/Adapters/openHistorian.Adapters/GrafanaPhasorController.cs
+++ Source/Libraries/Adapters/openHistorian.Adapters/GrafanaPhasorController.cs
@@ -147,7 +147,7 @@
         {
             // TODO: Make Grafana data source metric query more interactive, adding drop-downs and/or query builders
             // For now, just return a truncated list of tag names
-            string target = (request.target == "select metric" ? "" : request.target);
+            string target = (string.IsNullOrEmpty(request.target) ? string.Empty : request.target);
             return Task.Factory.StartNew(() =>
             {
                 return DataSource?.Metadata.Tables["ActivePhasors"].Select($"Instance LIKE '{DataSource?.InstanceName}' AND PhasorTag LIKE '%{target}%'").Take(DataSource?.MaximumSearchTargetsPerRequest ?? 200).Select(row => $"{row["PhasorTag"]}").ToArray();
@@ -215,14 +215,21 @@
         {
             if (DataSource == null) return Task.FromResult(new List<TimeSeriesPhasorValues>());

+
             return Task.Factory.StartNew(() =>
             {
+                if (!request.targets.Any())
+                    return new List<TimeSeriesPhasorValues>();
+
                 List<DataSourcePhasorValueGroup> valueGroups = new List<DataSourcePhasorValueGroup>();
                 // Query any remaining targets
                 foreach (PhasorTarget phasorTarget in request.targets)
                 {
                     // Split remaining targets on semi-colon, this way even multiple filter expressions can be used as inputs to functions
                     string[] allTargets = phasorTarget.target.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
+
+                    if (!allTargets.Any())
+                        continue;

                     // Target set now contains both original expressions and newly parsed individual point tags - to create final point list we
                     // are only interested in the point tags, provided either by direct user entry or derived by parsing filter expressions


Fix build and test failure because of SA1000 CF

--- StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1000CodeFixProvider.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1000CodeFixProvider.cs
@@ -45,7 +45,7 @@
                 if (token.IsMissing)
                     continue;

-                context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocument(context.Document, root, token, isAddingSpace)), diagnostic);
+                context.RegisterCodeFix(CodeAction.Create("Fix spacing", t => GetTransformedDocument(context.Document, root, token)), diagnostic);
             }
         }

@@ -95,7 +95,7 @@
                 break;
             }

-            if (isAddingSpace == !token.HasTrailingTrivia)
+            if (isAddingSpace == token.HasTrailingTrivia)
             {
                 return Task.FromResult(document);
             }


Fix removing trivia in SA1001CodeFixProvider

--- StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1001CodeFixProvider.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1001CodeFixProvider.cs
@@ -76,7 +76,7 @@
                     SyntaxToken precedingToken = token.GetPreviousToken();
                     if (precedingToken.TrailingTrivia.Any(SyntaxKind.WhitespaceTrivia))
                     {
-                        SyntaxToken corrected = precedingToken.WithoutLeadingWhitespace().WithoutFormatting();
+                        SyntaxToken corrected = precedingToken.WithoutTrailingWhitespace().WithoutFormatting();
                         replacements[precedingToken] = corrected;
                     }
                 }


Fix flaky test. (#911)

Fix flaky test. (#911)

--- Tests/SonarScanner.MSBuild.PostProcessor.Tests/MSBuildPostProcessorTests.cs
+++ Tests/SonarScanner.MSBuild.PostProcessor.Tests/MSBuildPostProcessorTests.cs
@@ -373,7 +373,7 @@

             var proc = new MSBuildPostProcessor(context.Scanner, context.Logger, context.TargetsUninstaller.Object, context.TfsProcessor, sonarProjectPropertiesValidator.Object);

-            var testDir = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext);
+            var testDir = TestUtils.CreateTestSpecificFolderWithSubPaths(TestContext, Guid.NewGuid().ToString());

             var projectInfo = TestUtils.CreateProjectWithFiles(TestContext, "withFiles1", testDir);


Simplify tagToCreate query

Simplify tagToCreate query

--- FTF.Core/Services/TaggingsDiffService.cs
+++ FTF.Core/Services/TaggingsDiffService.cs
@@ -41,9 +41,7 @@
                 .Where(NotIn(noteTaggings))
                 .ToList();

-            var tagsToCreate = addedTags.Except(_db.Tags
-                .Where(tag => addedTags.Any(tagName => tag.Name == tagName))
-                .ToList().Select(t => t.Name));
+            var tagsToCreate = addedTags.Where(name => _db.Tags.All(tag => tag.Name != name));

             var newTags = tagsToCreate.Select(tagName => new Tag
             {
@@ -56,12 +54,15 @@

             var taggingsToDelete = note.Taggings.Where(t => !tagsInText.Contains(t.Tag.Name));

-            var taggingsToAdd = taggingsOfNewTags.Concat(ExistingTags(note, tagsInText));
+            var existingTaggings = ExistingTags(note, tagsInText)
+                .Select(tag => _taggingsFactory.Make(note, tag));
+
+            var taggingsToAdd = taggingsOfNewTags.Concat(existingTaggings);

             return new Result(taggingsToAdd, taggingsToDelete);
         }

-        private IEnumerable<Tagging> ExistingTags(Note note, IEnumerable<string> tagsInText)
+        private IEnumerable<Tag> ExistingTags(Note note, IEnumerable<string> tagsInText)
         {
             var noteTaggings = _db.Taggings
                 .Where(tagging => tagging.Note.Id == note.Id)
@@ -73,8 +74,7 @@

             return _db.Tags
                 .Where(tag => addedTags.Any(tagName => tag.Name == tagName))
-                .ToList()
-                .Select(tag => _taggingsFactory.Make(note, tag));
+                .ToList();
         }

         public class Result


use NET45 instead of NET45PLUS

use NET45 instead of NET45PLUS

--- FluentFTP/Client/FtpClient_Properties.cs
+++ FluentFTP/Client/FtpClient_Properties.cs
@@ -602,7 +602,7 @@
 		}
 #endif

-#if CORE || NET45PLUS
+#if CORE || NET45
 		private SslProtocols m_SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
 #else
 		private SslProtocols m_SslProtocols = SslProtocols.Default;


update to match ThaiBahtText parameter ordering

--- GFDN.ThaiBahtText/ThaiBahtTextOptions.cs
+++ GFDN.ThaiBahtText/ThaiBahtTextOptions.cs
@@ -14,15 +14,15 @@
     public ThaiBahtTextOptions()
       : this(mode: UsesEt.TensOnly,
              unit: ThaiBahtText.Unit.Baht,
-             appendBahtOnly: true,
-             decimalPlaces: 2) {
+             decimalPlaces: 2,
+             appendBahtOnly: true) {
       //
     }

     public ThaiBahtTextOptions(UsesEt mode = UsesEt.TensOnly,
                                Unit unit = Unit.Baht,
-                               bool appendBahtOnly = true,
-                               int decimalPlaces = 2) {
+                               int decimalPlaces = 2,
+                               bool appendBahtOnly = true) {
       this.Mode = mode;
       this.Unit = unit;
       this.AppendBahtOnly = appendBahtOnly;


Fixed RefAdvertiser..cs line endings and formatting.

--- GitSharp.Core/Transport/RefAdvertiser.cs
+++ GitSharp.Core/Transport/RefAdvertiser.cs
@@ -1,224 +1,224 @@
-/*
- * Copyright (C) 2008, 2009, Google Inc.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using GitSharp.Core.RevWalk;
-
-namespace GitSharp.Core.Transport
-{
-	public class RefAdvertiser : IDisposable
-	{
-		private readonly PacketLineOut _pckOut;
-		private readonly RevWalk.RevWalk _walk;
-		private readonly RevFlag ADVERTISED;
-		private readonly StringBuilder _tmpLine;
-		private readonly char[] _tmpId;
-		private readonly List<string> _capabilities;
-		private bool _derefTags;
-		private bool _first;
-
-		public RefAdvertiser(PacketLineOut o, RevWalk.RevWalk protoWalk, RevFlag advertisedFlag)
-		{
-			_tmpLine = new StringBuilder(100);
-            _tmpId = new char[Constants.OBJECT_ID_STRING_LENGTH];
-			_capabilities = new List<string>();
-			_first = true;
-
-			_pckOut = o;
-			_walk = protoWalk;
-			ADVERTISED = advertisedFlag;
-		}
-
-		public void setDerefTags(bool deref)
-		{
-			_derefTags = deref;
-		}
-
-		public void advertiseCapability(string name)
-		{
-			_capabilities.Add(name);
-		}
-
-		public void send(IEnumerable<Ref> refs)
-		{
-			foreach (Ref r in RefComparator.Sort(refs))
-			{
-				RevObject obj = parseAnyOrNull(r.ObjectId);
-				if (obj != null)
-				{
-					advertiseAny(obj, r.OriginalName);
-					RevTag rt = (obj as RevTag);
-					if (_derefTags && rt != null)
-					{
-						advertiseTag(rt, r.OriginalName + "^{}");
-					}
-				}
-			}
-		}
-
-		public void advertiseHave(AnyObjectId id)
-		{
-			RevObject obj = parseAnyOrNull(id);
-			if (obj != null)
-			{
-				advertiseAnyOnce(obj, ".have");
-			}
-
-			RevTag rt = (obj as RevTag);
-			if (rt != null)
-			{
-				advertiseAnyOnce(rt.getObject(), ".have");
-			}
-		}
-
-		public void includeAdditionalHaves()
-		{
-			additionalHaves(_walk.Repository.ObjectDatabase);
-		}
-
-		private void additionalHaves(ObjectDatabase db)
-		{
-			AlternateRepositoryDatabase b = (db as AlternateRepositoryDatabase);
-			if (b != null)
-			{
-				additionalHaves(b.getRepository());
-			}
-
-			foreach (ObjectDatabase alt in db.getAlternates())
-			{
-				additionalHaves(alt);
-			}
-		}
-
-		private void additionalHaves(Repository alt)
-		{
-			foreach (Ref r in alt.getAllRefs().Values)
-			{
-				advertiseHave(r.ObjectId);
-			}
-		}
-
-		public bool isEmpty()
-		{
-			return _first;
-		}
-
-		private RevObject parseAnyOrNull(AnyObjectId id)
-		{
-			if (id == null) return null;
-
-			try
-			{
-				return _walk.parseAny(id);
-			}
-			catch (IOException)
-			{
-				return null;
-			}
-		}
-
-		private void advertiseAnyOnce(RevObject obj, string refName)
-		{
-			if (!obj.has(ADVERTISED))
-			{
-				advertiseAny(obj, refName);
-			}
-		}
-
-		private void advertiseAny(RevObject obj, string refName)
-		{
-			obj.add(ADVERTISED);
-			advertiseId(obj, refName);
-		}
-
-		private void advertiseTag(RevTag tag, string refName)
-		{
-			RevTag o = (tag as RevTag);
-			do
-			{
-				RevTag target = (o.getObject() as RevTag);
-				try
-				{
-					_walk.parseHeaders(target);
-				}
-				catch (IOException)
-				{
-					return;
-				}
-				target.add(ADVERTISED);
-				o = target;
-			} while (o != null);
-			advertiseAny(tag.getObject(), refName);
-		}
-
-		private void advertiseId(AnyObjectId id, string refName)
-		{
-			_tmpLine.Length = 0;
-			id.CopyTo(_tmpId, _tmpLine);
-			_tmpLine.Append(' ');
-			_tmpLine.Append(refName);
-
-			if (_first)
-			{
-				_first = false;
-				if (_capabilities.Count > 0)
-				{
-					_tmpLine.Append('\0');
-					foreach (string capName in _capabilities)
-					{
-						_tmpLine.Append(' ');
-						_tmpLine.Append(capName);
-					}
-					_tmpLine.Append(' ');
-				}
-			}
-
-			_tmpLine.Append('\n');
-			_pckOut.WriteString(_tmpLine.ToString());
-		}
-
-		public void Dispose ()
-		{
-			_walk.Dispose();
-			ADVERTISED.Dispose();
-		}
-
-	}
+/*
+ * Copyright (C) 2008, 2009, Google Inc.
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using GitSharp.Core.RevWalk;
+
+namespace GitSharp.Core.Transport
+{
+    public class RefAdvertiser : IDisposable
+    {
+        private readonly PacketLineOut _pckOut;
+        private readonly RevWalk.RevWalk _walk;
+        private readonly RevFlag ADVERTISED;
+        private readonly StringBuilder _tmpLine;
+        private readonly char[] _tmpId;
+        private readonly List<string> _capabilities;
+        private bool _derefTags;
+        private bool _first;
+
+        public RefAdvertiser(PacketLineOut o, RevWalk.RevWalk protoWalk, RevFlag advertisedFlag)
+        {
+            _tmpLine = new StringBuilder(100);
+            _tmpId = new char[Constants.OBJECT_ID_STRING_LENGTH];
+            _capabilities = new List<string>();
+            _first = true;
+
+            _pckOut = o;
+            _walk = protoWalk;
+            ADVERTISED = advertisedFlag;
+        }
+
+        public void setDerefTags(bool deref)
+        {
+            _derefTags = deref;
+        }
+
+        public void advertiseCapability(string name)
+        {
+            _capabilities.Add(name);
+        }
+
+        public void send(IEnumerable<Ref> refs)
+        {
+            foreach (Ref r in RefComparator.Sort(refs))
+            {
+                RevObject obj = parseAnyOrNull(r.ObjectId);
+                if (obj != null)
+                {
+                    advertiseAny(obj, r.OriginalName);
+                    RevTag rt = (obj as RevTag);
+                    if (_derefTags && rt != null)
+                    {
+                        advertiseTag(rt, r.OriginalName + "^{}");
+                    }
+                }
+            }
+        }
+
+        public void advertiseHave(AnyObjectId id)
+        {
+            RevObject obj = parseAnyOrNull(id);
+            if (obj != null)
+            {
+                advertiseAnyOnce(obj, ".have");
+            }
+
+            RevTag rt = (obj as RevTag);
+            if (rt != null)
+            {
+                advertiseAnyOnce(rt.getObject(), ".have");
+            }
+        }
+
+        public void includeAdditionalHaves()
+        {
+            additionalHaves(_walk.Repository.ObjectDatabase);
+        }
+
+        private void additionalHaves(ObjectDatabase db)
+        {
+            AlternateRepositoryDatabase b = (db as AlternateRepositoryDatabase);
+            if (b != null)
+            {
+                additionalHaves(b.getRepository());
+            }
+
+            foreach (ObjectDatabase alt in db.getAlternates())
+            {
+                additionalHaves(alt);
+            }
+        }
+
+        private void additionalHaves(Repository alt)
+        {
+            foreach (Ref r in alt.getAllRefs().Values)
+            {
+                advertiseHave(r.ObjectId);
+            }
+        }
+
+        public bool isEmpty()
+        {
+            return _first;
+        }
+
+        private RevObject parseAnyOrNull(AnyObjectId id)
+        {
+            if (id == null) return null;
+
+            try
+            {
+                return _walk.parseAny(id);
+            }
+            catch (IOException)
+            {
+                return null;
+            }
+        }
+
+        private void advertiseAnyOnce(RevObject obj, string refName)
+        {
+            if (!obj.has(ADVERTISED))
+            {
+                advertiseAny(obj, refName);
+            }
+        }
+
+        private void advertiseAny(RevObject obj, string refName)
+        {
+            obj.add(ADVERTISED);
+            advertiseId(obj, refName);
+        }
+
+        private void advertiseTag(RevTag tag, string refName)
+        {
+            RevTag o = (tag as RevTag);
+            do
+            {
+                RevTag target = (o.getObject() as RevTag);
+                try
+                {
+                    _walk.parseHeaders(target);
+                }
+                catch (IOException)
+                {
+                    return;
+                }
+                target.add(ADVERTISED);
+                o = target;
+            } while (o != null);
+            advertiseAny(tag.getObject(), refName);
+        }
+
+        private void advertiseId(AnyObjectId id, string refName)
+        {
+            _tmpLine.Length = 0;
+            id.CopyTo(_tmpId, _tmpLine);
+            _tmpLine.Append(' ');
+            _tmpLine.Append(refName);
+
+            if (_first)
+            {
+                _first = false;
+                if (_capabilities.Count > 0)
+                {
+                    _tmpLine.Append('\0');
+                    foreach (string capName in _capabilities)
+                    {
+                        _tmpLine.Append(' ');
+                        _tmpLine.Append(capName);
+                    }
+                    _tmpLine.Append(' ');
+                }
+            }
+
+            _tmpLine.Append('\n');
+            _pckOut.WriteString(_tmpLine.ToString());
+        }
+
+        public void Dispose()
+        {
+            _walk.Dispose();
+            ADVERTISED.Dispose();
+        }
+
+    }
 }


PG-63: Renamed IsInactive to IsInactiveParatextProject

--- Glyssen/Controls/ExistingProjectsList.cs
+++ Glyssen/Controls/ExistingProjectsList.cs
@@ -93,7 +93,7 @@
 			if (!String.IsNullOrEmpty(recordingProjName))
 				return recordingProjName;
 			if (!m_unstartedParatextProjectStates.ContainsKey(project.Item1))
-				m_unstartedParatextProjectStates[project.Item1] = IsInactive(project.Item1);
+				m_unstartedParatextProjectStates[project.Item1] = IsInactiveParatextProject(project.Item1);
 			return LocalizationManager.GetString("DialogBoxes.OpenProjectDlg.NoRecordingProject",
 				"(recording project not started)");
 		}
@@ -125,10 +125,10 @@

 		protected override bool IsInactive(IProjectInfo project)
 		{
-			return (project as GlyssenDblTextMetadata)?.Inactive ?? IsInactive(project.Name);
+			return (project as GlyssenDblTextMetadata)?.Inactive ?? IsInactiveParatextProject(project.Name);
 		}

-		private bool IsInactive(string paratextProjectName)
+		private bool IsInactiveParatextProject(string paratextProjectName)
 		{
 			return GlyssenMetadata.InactiveUnstartedParatextProjects != null &&
 				GlyssenMetadata.InactiveUnstartedParatextProjects.Contains(paratextProjectName, StringComparison.Ordinal);


Update comment about dynamic parameters

Update comment about dynamic parameters

--- Google.PowerShell/Logging/GcLogCmdlet.cs
+++ Google.PowerShell/Logging/GcLogCmdlet.cs
@@ -258,6 +258,10 @@
         /// <summary>
         /// This function is part of the IDynamicParameters interface.
         /// PowerShell uses it to generate parameters dynamically.
+        /// We have to generate -ResourceType parameter dynamically because the array
+        /// of resources that we used to validate against are not generated before compile time,
+        /// i.e. [ValidateSet(ArrayGeneratedAtRunTime)] will throw an error for parameters
+        /// that are not generated dynamically.
         /// </summary>
         public object GetDynamicParameters()
         {
@@ -393,6 +397,10 @@
         /// <summary>
         /// This function is part of the IDynamicParameters interface.
         /// PowerShell uses it to generate parameters dynamically.
+        /// We have to generate -ResourceType parameter dynamically because the array
+        /// of resources that we used to validate against are not generated before compile time,
+        /// i.e. [ValidateSet(ArrayGeneratedAtRunTime)] will throw an error for parameters
+        /// that are not generated dynamically.
         /// </summary>
         public object GetDynamicParameters()
         {


Fix warnings.

Fix warnings.

--- Gu.Persist.Core/Repository/Repository.cs
+++ Gu.Persist.Core/Repository/Repository.cs
@@ -837,7 +837,12 @@
         /// <inheritdoc/>
         public void ClearTrackerCache()
         {
-            this.Tracker.ClearCache();
+            if (this.Tracker is { } tracker)
+            {
+                tracker.ClearCache();
+            }
+
+            throw new InvalidOperationException("This repository has no dirty tracker.");
         }

         /// <inheritdoc/>
@@ -913,9 +918,9 @@
             if (migration is null)
             {
                 var value = file.Read<T, TSetting>(this.Settings, this.serialize);
-                if (this.Settings.IsTrackingDirty)
+                if (this.Tracker is { } tracker)
                 {
-                    this.Tracker.Track(file.FullName, value);
+                    tracker.Track(file.FullName, value);
                 }

                 return value;
@@ -1139,9 +1144,9 @@
                 throw new ArgumentNullException(nameof(file));
             }

-            if (this.Settings.IsTrackingDirty)
-            {
-                this.Tracker.Track(file.FullName, item);
+            if (this.Tracker is { } tracker)
+            {
+                tracker.Track(file.FullName, item);
             }
         }


HedgeArchiveEditor Added Duble Click to Open File and Refreash Tab Page after saving

--- HedgeTools/HedgeArchiveEditor/MainFrm.cs
+++ HedgeTools/HedgeArchiveEditor/MainFrm.cs
@@ -125,6 +125,7 @@
                         throw new NotImplementedException("Unknown Archive Type");
                 }
             }
+            RefreshTabPage(index, false);
         }

         public void CloseArchive(int index)
@@ -179,18 +180,20 @@
             ListView lv = tp.Controls[0] as ListView;
             Archive arc = Archives[index];

+            //Update TabPage Text
+            tp.Text = (tp.Tag as string) + ((arc.Saved) ? "" : "*");
+
+            //Update File List
+            if (!refreshFileList || lv == null) return;
+
             lv.SmallImageList = new ImageList();
             Directory.CreateDirectory(Path.Combine(tempPath, "File_Extensions"));

-            //Update TabPage Text
-            tp.Text = (tp.Tag as string) + ((arc.Saved) ? "" : "*");
-
-            //Update File List
-            if (!refreshFileList || lv == null) return;
             lv.Items.Clear();

             lv.MouseMove += Lv_MouseMove;
             lv.MouseUp += Lv_MouseUp;
+            lv.MouseDoubleClick += Lv_MouseDoubleClick;

             int longestNameLength = 0, longestExtensionLength = 0, longestSizeLength = 0;
             foreach (var file in arc.Files)
@@ -778,6 +781,27 @@
             }
         }

+        private void Lv_MouseDoubleClick(object sender, MouseEventArgs e)
+        {
+            var lv = sender as ListView;
+            var ar = CurrentArchive;
+            if (lv.SelectedItems.Count == 1)
+            {
+                for (int i = 0; i < ar.Files.Count; ++i)
+                {
+                    if (ar.Files[i].Name == lv.SelectedItems[0].SubItems[0].Text)
+                    {
+                        var path = Path.Combine(tempPath, "Extracted_Files\\");
+                        var filePath = Path.Combine(path, ar.Files[i].Name);
+                        Directory.CreateDirectory(path);
+                        ar.Files[i].Extract(filePath);
+                        System.Diagnostics.Process.Start(filePath);
+                        break;
+                    }
+                }
+            }
+        }
+
         // NOTE: Lv_MouseMove needs a lot of work
         private void Lv_MouseUp(object sender, MouseEventArgs e)
         {
@@ -787,7 +811,7 @@
         private void Lv_MouseMove(object sender, MouseEventArgs e)
         {
             ListView lv = sender as ListView;
-            if (e.Button == MouseButtons.Left && lv.SelectedItems.Count > 0)
+            if (e.Button == MouseButtons.Left && lv.SelectedItems.Count > 0 && !lv.FocusedItem.Bounds.Contains(lv.PointToClient(MousePosition)))
             {
                 List<string> fileList = new List<string>();
                 try


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -646,8 +646,8 @@
     }

     /// <summary>
-    /// Gets or sets the delegate used to find the credentials
-    /// for an identity.
+    /// Gets or sets the delegate used to find the credentials for
+    /// an identity.
     /// </summary>
     /// <remarks>
     ///   <para>


Correct namespace to fix failure

Correct namespace to fix failure

--- samples/IdentitySample.Mvc/Views/Shared/_LoginPartial.cshtml
+++ samples/IdentitySample.Mvc/Views/Shared/_LoginPartial.cshtml
@@ -1,4 +1,4 @@
-@using System.Security.Principal
+@using System.Security.Claims

 @if (User.IsSignedIn())
 {


v5.0.0 * Renamed ProjectileHelpers.GetProjectileDimensions(...) to GetVanillaProjectileDimensions, VanillaProjectileRespectsPlatforms(...) to DoesVanillaProjectileHitPlatforms(...) (and added docs)

--- Helpers/Projectiles/ProjectileHelpers.cs
+++ Helpers/Projectiles/ProjectileHelpers.cs
@@ -1,4 +1,5 @@
-using Terraria;
+using Microsoft.Xna.Framework;
+using Terraria;

 namespace HamstarHelpers.Helpers.Projectiles {
@@ -9,26 +10,31 @@
 		/// <summary>
 		/// Applies projectile "hits", as if to make the effect of impacting something (including consuming penetrations).
 		/// </summary>
-		/// <param name="proj"></param>
-		public static void Hit( Projectile proj ) {
-			if( proj.penetrate <= 0 ) {
-				proj.Kill();
+		/// <param name="projectile"></param>
+		public static void Hit( Projectile projectile ) {
+			if( projectile.penetrate <= 0 ) {
+				projectile.Kill();
 			} else {
-				proj.penetrate--;
-				proj.netUpdate = true;
+				projectile.penetrate--;
+				projectile.netUpdate = true;
 			}
 		}

-		public static Rectangle GetProjectileDimensions( Projectile proj ) {
+		/// <summary>
+		/// Gets the (vanilla) dimensions of a projectile, adjusted by specific projectile idiosyncracies or AIs.
+		/// </summary>
+		/// <param name="projectile"></param>
+		/// <returns></returns>
+		public static Rectangle GetVanillaProjectileDimensions( Projectile projectile ) {
 			Vector2? dimScale = null;
-			int width = proj.width, height = proj.height;
-
-			switch( proj.type ) {
+			int width = projectile.width, height = projectile.height;
+
+			switch( projectile.type ) {
 			case 28:
-				if( proj.aiStyle == 29 || proj.aiStyle == 49 ) {
-					width = proj.width - 8;
-					height = proj.height - 8;
+				if( projectile.aiStyle == 29 || projectile.aiStyle == 49 ) {
+					width = projectile.width - 8;
+					height = projectile.height - 8;
 				}
 				break;
 			case 3:
@@ -42,7 +48,7 @@
 				break;
 			case 308:
 				width = 26;
-				height = proj.height;
+				height = projectile.height;
 				break;
 			case 663:
 			case 665:
@@ -54,13 +60,13 @@
 			case 692:
 			case 693:
 				width = 16;
-				height = proj.height;
+				height = projectile.height;
 				break;
 			case 688:
 			case 689:
 			case 690:
 				width = 16;
-				height = proj.height;
+				height = projectile.height;
 				dimScale = new Vector2?( new Vector2( 0.5f, 1f ) );
 				break;
 			case 669:
@@ -123,13 +129,13 @@
 			case 229:
 			case 237:
 			case 243:
-				width = proj.width - 20;
-				height = proj.height - 20;
+				width = projectile.width - 20;
+				height = projectile.height - 20;
 				break;
 			case 533:
-				if( proj.ai[0] >= 6f ) {
-					width = proj.width + 6;
-					height = proj.height + 6;
+				if( projectile.ai[0] >= 6f ) {
+					width = projectile.width + 6;
+					height = projectile.height + 6;
 				}
 				break;
 			case 582:
@@ -139,44 +145,50 @@
 				height = 8;
 				break;
 			case 617:
-				width = (int)(20f * proj.scale);
-				height = (int)(20f * proj.scale);
+				width = (int)(20f * projectile.scale);
+				height = (int)(20f * projectile.scale);
 				break;
 			default:
-				if( proj.aiStyle == 29 || proj.type == 28 || proj.aiStyle == 49 ) {
-					width = proj.width - 8;
-					height = proj.height - 8;
-				} else if( proj.aiStyle == 18 || proj.type == 254 ) {
-					width = proj.width - 36;
-					height = proj.height - 36;
-				} else if( proj.aiStyle == 27 ) {
-					width = proj.width - 12;
-					height = proj.height - 12;
+				if( projectile.aiStyle == 29 || projectile.type == 28 || projectile.aiStyle == 49 ) {
+					width = projectile.width - 8;
+					height = projectile.height - 8;
+				} else if( projectile.aiStyle == 18 || projectile.type == 254 ) {
+					width = projectile.width - 36;
+					height = projectile.height - 36;
+				} else if( projectile.aiStyle == 27 ) {
+					width = projectile.width - 12;
+					height = projectile.height - 12;
 				}
 				break;
 			}

 			int x, y;

-			if( height != proj.height || width != proj.width ) {
+			if( height != projectile.height || width != projectile.width ) {
 				if( dimScale.HasValue ) {
-					Vector2 position = proj.Center - new Vector2( (float)width, (float)height ) * dimScale.Value;
+					Vector2 position = projectile.Center - new Vector2( (float)width, (float)height ) * dimScale.Value;
 					x = (int)position.X;
 					y = (int)position.Y;
 				} else {
-					x = (int)(proj.position.X + (proj.width >> 1) - (width >> 1));
-					y = (int)(proj.position.Y + (proj.height >> 1) - (height >> 1));
+					x = (int)(projectile.position.X + (projectile.width >> 1) - (width >> 1));
+					y = (int)(projectile.position.Y + (projectile.height >> 1) - (height >> 1));
 				}
 			} else {
-				x = (int)proj.position.X;
-				y = (int)proj.position.Y;
+				x = (int)projectile.position.X;
+				y = (int)projectile.position.Y;
 			}

 			return new Rectangle( x, y, width, height );
 		}

-		public static bool VanillaProjectileRespectsPlatforms( Projectile projectile, out bool onlySometimes ) {
+		/// <summary>
+		/// Indicates if a given vanilla projectile collides with a platform.
+		/// </summary>
+		/// <param name="projectile"></param>
+		/// <param name="onlySometimes">Indicates if AI behavior can override collisions occasionally.</param>
+		/// <returns></returns>
+		public static bool DoesVanillaProjectileHitPlatforms( Projectile projectile, out bool onlySometimes ) {
 			if( Main.projPet[projectile.type] ) {
 				onlySometimes = true;
 				return true;


Updated version to 0.2.0

Updated version to 0.2.0

--- IdmNet/IdmNet/Properties/AssemblyInfo.cs
+++ IdmNet/IdmNet/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.7.0")]
-[assembly: AssemblyFileVersion("0.1.7.0")]
+[assembly: AssemblyVersion("0.2.0.0")]
+[assembly: AssemblyFileVersion("0.2.0.0")]


Updated the Bing API endpoints.

Updated the Bing API endpoints.

--- Kiosk/ServiceHelpers/BingSearchHelper.cs
+++ Kiosk/ServiceHelpers/BingSearchHelper.cs
@@ -45,9 +45,9 @@
 {
     public class BingSearchHelper
     {
-        private static string ImageSearchEndPoint = "https://bingapis.azure-api.net/api/v5/images/search";
-        private static string AutoSuggestionEndPoint = "https://bingapis.azure-api.net/api/v5/Suggestions";
-        private static string NewsSearchEndPoint = "https://bingapis.azure-api.net/api/v5/news/search";
+        private static string ImageSearchEndPoint = "https://api.cognitive.microsoft.com/bing/v5.0/images/search";
+        private static string AutoSuggestionEndPoint = "https://api.cognitive.microsoft.com/bing/v5.0/suggestions";
+        private static string NewsSearchEndPoint = "https://api.cognitive.microsoft.com/bing/v5.0/news/search";

         private static HttpClient autoSuggestionClient { get; set; }
         private static HttpClient searchClient { get; set; }


Remove unused locals

Remove unused locals

--- osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
+++ osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
@@ -39,10 +39,8 @@

         protected void ApplyTraceableState(DrawableHitObject drawable, ArmedState state)
         {
-            if (!(drawable is DrawableOsuHitObject drawableOsu))
+            if (!(drawable is DrawableOsuHitObject))
                 return;
-
-            var h = drawableOsu.HitObject;

             //todo: expose and hide spinner background somehow


Set setup screen as default when opening

--- osu.Game.Tournament/TournamentSceneManager.cs
+++ osu.Game.Tournament/TournamentSceneManager.cs
@@ -130,7 +130,7 @@
                 },
             };

-            SetScreen(typeof(ScheduleScreen));
+            SetScreen(typeof(SetupScreen));
         }

         public void SetScreen(Type screenType)


Make report button a separate component

Make report button a separate component

--- osu.Game/Overlays/Comments/DrawableComment.cs
+++ osu.Game/Overlays/Comments/DrawableComment.cs
@@ -34,7 +34,8 @@

 namespace osu.Game.Overlays.Comments
 {
-    public class DrawableComment : CompositeDrawable, IHasPopover
+    [Cached]
+    public class DrawableComment : CompositeDrawable
     {
         private const int avatar_size = 40;

@@ -64,6 +65,7 @@
         private ShowRepliesButton showRepliesButton = null!;
         private ChevronButton chevronButton = null!;
         private LinkFlowContainer actionsContainer = null!;
+        private ReportButton? reportButton;
         private LoadingSpinner actionsLoading = null!;
         private DeletedCommentsCounter deletedCommentsCounter = null!;
         private OsuSpriteText deletedLabel = null!;
@@ -334,12 +336,12 @@
                 makeDeleted();

             actionsContainer.AddLink("Copy link", copyUrl);
-            actionsContainer.AddArbitraryDrawable(new Container { Width = 10 });
+            actionsContainer.AddArbitraryDrawable(Empty().With(d => d.Width = 10));

             if (Comment.UserId.HasValue && Comment.UserId.Value == api.LocalUser.Value.Id)
                 actionsContainer.AddLink("Delete", deleteComment);
             else
-                actionsContainer.AddLink(UsersStrings.ReportButtonText, this.ShowPopover);
+                actionsContainer.AddArbitraryDrawable(reportButton = new ReportButton());

             if (Comment.IsTopLevel)
             {
@@ -424,6 +426,8 @@
             request.Success += () => Schedule(() =>
             {
                 actionsLoading.Hide();
+                reportButton?.Expire();
+                actionsContainer.Show();
                 onScreenDisplay?.Display(new ReportToast());
             });
             request.Failure += _ => Schedule(() =>
@@ -582,8 +586,6 @@
             }
         }

-        public Popover GetPopover() => new ReportCommentPopover(this);
-
         private class ReportToast : Toast
         {
             public ReportToast()
@@ -591,5 +593,25 @@
             {
             }
         }
+
+        private class ReportButton : LinkFlowContainer, IHasPopover
+        {
+            public ReportButton()
+                : base(s => s.Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold))
+            {
+            }
+
+            [Resolved]
+            private DrawableComment comment { get; set; } = null!;
+
+            [BackgroundDependencyLoader]
+            private void load()
+            {
+                AutoSizeAxes = Axes.Both;
+                AddLink(UsersStrings.ReportButtonText, this.ShowPopover);
+            }
+
+            public Popover GetPopover() => new ReportCommentPopover(comment);
+        }
     }
 }


Remove using.

Remove using.

--- osu.Game/Rulesets/UI/StandardHealthDisplay.cs
+++ osu.Game/Rulesets/UI/StandardHealthDisplay.cs
@@ -10,7 +10,6 @@
 using osu.Game.Graphics;
 using osu.Game.Rulesets.Judgements;
 using osu.Game.Rulesets.Objects.Drawables;
-using osu.Game.Rulesets.Scoring;
 using System;

 namespace osu.Game.Rulesets.UI


Remove unused Hotkey assignment

Remove unused Hotkey assignment

--- osu.Game/Screens/Select/FooterButtonRandom.cs
+++ osu.Game/Screens/Select/FooterButtonRandom.cs
@@ -40,7 +40,6 @@
             SelectedColour = colours.Green;
             DeselectedColour = SelectedColour.Opacity(0.5f);
             Text = @"random";
-            Hotkey = GlobalAction.SelectNextRandom;
         }

         private void updateText()


Group assertions together

Group assertions together

--- tests/HttpConfigTests.cs
+++ tests/HttpConfigTests.cs
@@ -86,8 +86,8 @@
         public void WithTimeout()
         {
             var config = HttpConfig.Default.WithTimeout(new TimeSpan(0, 1, 0));
+
             Assert.That(config.Timeout, Is.EqualTo(new TimeSpan(0, 1, 0)));
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.Timeout);
         }

@@ -95,8 +95,8 @@
         public void WithUserAgent()
         {
             var config = HttpConfig.Default.WithUserAgent("Spider/1.0");
+
             Assert.That(config.UserAgent, Is.EqualTo("Spider/1.0"));
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.UserAgent);
         }

@@ -105,8 +105,8 @@
         {
             var credentials = new NetworkCredential("admin", "admin");
             var config = HttpConfig.Default.WithCredentials(credentials);
+
             Assert.That(config.Credentials, Is.SameAs(credentials));
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.Credentials);
         }

@@ -114,9 +114,9 @@
         public void WithUseDefaultCredentials()
         {
             var config = HttpConfig.Default.WithUseDefaultCredentials(true);
+
             Assert.That(config.UseDefaultCredentials, Is.True);
             Assert.That(config.Credentials, Is.EqualTo(HttpConfig.Default.Credentials));
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.UseDefaultCredentials);
         }

@@ -124,8 +124,8 @@
         public void WithCookies()
         {
             var config = HttpConfig.Default.WithCookies(new[] { new Cookie("name", "value") });
+
             Assert.That(config.Cookies, Is.EquivalentTo(new[] { new Cookie("name", "value") }));
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.Cookies);
         }

@@ -133,8 +133,8 @@
         public void WithIgnoreInvalidServerCertificate()
         {
             var config = HttpConfig.Default.WithIgnoreInvalidServerCertificate(true);
+
             Assert.That(config.IgnoreInvalidServerCertificate, Is.True);
-
             AssertConfigurationsEqual(config, HttpConfig.Default, ExceptMember.IgnoreInvalidServerCertificate);
         }


HW-1-1-C: Lanterns (buggy on CF: Test 3)

Add few more test cases


Adjusted EqualityUsageAnalyzer syntax

Adjusted EqualityUsageAnalyzer syntax

--- src/Amadevus.RecordGenerator.Generators/EqualityUsageAnalyzer.cs
+++ src/Amadevus.RecordGenerator.Generators/EqualityUsageAnalyzer.cs
@@ -10,19 +10,16 @@
     {
         public static IEnumerable<Diagnostic> GenerateDiagnostics(RecordDescriptor descriptor)
         {
-            if (!descriptor.Features.HasFlag(Features.EquatableEquals)
-             && !descriptor.Features.HasFlag(Features.ObjectEquals)
-             && !descriptor.Features.HasFlag(Features.OperatorEquals)
-             || descriptor.TypeDeclaration.Modifiers.Any(t => t.IsKind(SyntaxKind.SealedKeyword)))
+            if ((descriptor.Features.HasFlag(Features.EquatableEquals)
+                 || descriptor.Features.HasFlag(Features.ObjectEquals)
+                 || descriptor.Features.HasFlag(Features.OperatorEquals))
+                && !descriptor.TypeDeclaration.Modifiers.Any(t => t.IsKind(SyntaxKind.SealedKeyword)))
             {
-                yield break;
+                yield return Diagnostic.Create(
+                    Descriptors.X1001_RecordMustBeSealedIfEqualityIsEnabled,
+                    descriptor.TypeDeclarationLocation,
+                    descriptor.TypeIdentifier.Text);
             }
-
-            yield return Diagnostic.Create(
-                Descriptors.X1001_RecordMustBeSealedIfEqualityIsEnabled,
-                descriptor.TypeDeclarationLocation,
-                descriptor.TypeIdentifier.Text);
         }
-
     }
 }


Comment out potential workaround that wasn't working.

--- src/Cedar.EventStore.GetEventStore.Tests/GesEventStoreFixture.cs
+++ src/Cedar.EventStore.GetEventStore.Tests/GesEventStoreFixture.cs
@@ -4,7 +4,6 @@
     using System.Net;
     using System.Threading;
     using System.Threading.Tasks;
-    using global::EventStore.ClientAPI;
     using global::EventStore.ClientAPI.Embedded;
     using global::EventStore.ClientAPI.SystemData;
     using global::EventStore.Core;
@@ -16,14 +15,14 @@
         {
             var node = await CreateClusterVNode();

-            using(var eventStoreConnection = EmbeddedEventStoreConnection.Create(node))
+            /*using(var eventStoreConnection = EmbeddedEventStoreConnection.Create(node))
             {
                 await eventStoreConnection.SetStreamMetadataAsync(
                     "$all",
                     ExpectedVersion.Any,
                     global::EventStore.ClientAPI.StreamMetadata.Build().SetReadRole("$all"),
                     new UserCredentials("admin", "changeit"));
-            }
+            }*/

             var gesEventStore = new GesEventStore(
                 () => EmbeddedEventStoreConnection.Create(node));


Ignore child actions

Ignore child actions

--- src/Endzone.uSplit/Pipeline/VariationReportingFilterAttribute.cs
+++ src/Endzone.uSplit/Pipeline/VariationReportingFilterAttribute.cs
@@ -2,6 +2,7 @@
 using System.Web.Mvc;
 using Endzone.uSplit.Models;
 using Umbraco.Web;
+using Umbraco.Web.Routing;

 namespace Endzone.uSplit.Pipeline
 {
@@ -9,11 +10,16 @@
     {
         public override void OnActionExecuted(ActionExecutedContext filterContext)
         {
+            //ignore child actions, cannot use filter with them
+            if (filterContext.IsChildAction)
+                return;
+
             //are we running an experiment?
             if (!HttpContext.Current.Items.Contains(Constants.HttpContextExperimentKey))
                 return;

-            var request = filterContext.RequestContext.HttpContext.GetUmbracoContext().PublishedContentRequest;
+            var umbracoContext = filterContext.HttpContext.GetUmbracoContext();
+            var request = umbracoContext.PublishedContentRequest;
             var response = filterContext.HttpContext.Response;

             //check the license


Handle badly-formed XML comments.

Handle badly-formed XML comments.

--- src/IntelliTect.Coalesce/TypeDefinition/Wrappers/SymbolHelper.cs
+++ src/IntelliTect.Coalesce/TypeDefinition/Wrappers/SymbolHelper.cs
@@ -74,8 +74,20 @@
             string xmlDocs = symbol.GetDocumentationCommentXml();
             if (xmlDocs.Length > 0)
             {
-                xmlDocumentation.LoadXml(xmlDocs);
-                returnValue = xmlDocumentation.SelectSingleNode("/member/summary").InnerText.Trim();
+                try
+                {
+                    xmlDocumentation.LoadXml(xmlDocs);
+                    returnValue = xmlDocumentation.SelectSingleNode("/member/summary").InnerText.Trim();
+                }
+                catch (Exception ex)
+                {
+                    // Non-critical error. Write it out and ignore.
+                    // Usually this is because of a badly-formed XML comment in the source code.
+                    Console.Error.WriteLine($"Error trying to parse XML Comments for symbol {symbol.ToDisplayString()}:");
+                    Console.Error.WriteLine(xmlDocs);
+                    // The full exception isn't really important. Usually the error will be an XML comment inside of xmlDocs.
+                    //Console.Error.WriteLine(ex);
+                }
             }

             return returnValue;


Mark properties tracked by all of our XAML property types as not unkown.

--- src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlType.cs
+++ src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlType.cs
@@ -135,6 +135,8 @@
             };
         }

+        protected override bool LookupIsUnknown() => false;
+
         protected override XamlType LookupType()
         {
             var propType = GetPropertyType();
@@ -293,8 +295,6 @@
         {
             return Property.IsReadOnly;
         }
-
-        protected override bool LookupIsUnknown() => false;

         protected override Type GetPropertyType()
         {


Forcing version upgrade

Forcing version upgrade

--- src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs
+++ src/Orchard.Web/Modules/Upgrade/Controllers/InfosetController.cs
@@ -595,9 +595,11 @@
                                 }

                                 var versionElement = versionData.Element(element.Name);
-                                if (versionElement == null) {
-                                    versionData.Add(element);
+                                if (versionElement != null) {
+                                    versionElement.Remove();
                                 }
+
+                                versionData.Add(element);
                             }

                             contentItemVersionRecord.Data = versionData.ToString(SaveOptions.DisableFormatting);


Fixes #196 - reorder messages to prevent dbgr fail to start

This commit sends the initialized event *after* the initializeRequest response (that sends capabilities info).  This was recommended by @isidorn in issue http://github.com/Microsoft/vscode/issues/4567.

--- src/PowerShellEditorServices.Protocol/Server/DebugAdapterBase.cs
+++ src/PowerShellEditorServices.Protocol/Server/DebugAdapterBase.cs
@@ -54,19 +54,18 @@
             object shutdownParams,
             RequestContext<InitializeResponseBody> requestContext)
         {
+            // Now send the Initialize response to continue setup
+            await requestContext.SendResult(
+                new InitializeResponseBody {
+                    SupportsConfigurationDoneRequest = true,
+                    SupportsConditionalBreakpoints = true,
+                    SupportsFunctionBreakpoints = true
+                });
+
             // Send the Initialized event first so that we get breakpoints
             await requestContext.SendEvent(
                 InitializedEvent.Type,
                 null);
-
-            // Now send the Initialize response to continue setup
-            await requestContext.SendResult(
-                new InitializeResponseBody
-                {
-                    SupportsConfigurationDoneRequest = true,
-                    SupportsConditionalBreakpoints = true,
-                    SupportsFunctionBreakpoints = true
-                });
         }
     }
 }


documentation fixes

documentation fixes

--- src/Selenium.WebDriver.Extensions/Extensions/StringExtensions.cs
+++ src/Selenium.WebDriver.Extensions/Extensions/StringExtensions.cs
@@ -1,20 +1,20 @@
 namespace OpenQA.Selenium.Extensions
 {
     /// <summary>
-    /// The string extensions.
+    /// The class containing the extension methods for the <see cref="string"> class.
     /// </summary>
     public static class StringExtensions
     {
         /// <summary>
-        /// Indicates whether the specified string is <see langword="null"/> or an empty string.
+        /// Indicates whether the specified <paramref name="value"/> is <see langword="null"/> or an empty string.
         /// </summary>
-        /// <param name="value">The string to test. </param>
+        /// <param name="value">The string to test.</param>
         /// <returns>
         /// <see langword="true"/> if the value parameter is <see langword="null"/> or an empty string (<c>""</c>);
         /// otherwise, <see langword="false"/>.
         /// </returns>
         /// <remarks>
-        /// This method is a implementation for <see cref="IsNullOrWhiteSpace"/> for <see cref="string"/> for .NET 3.5.
+        /// This method is the implementation of <see cref="IsNullOrWhiteSpace"/> compatible with .NET 3.5.
         /// </remarks>
         public static bool IsNullOrWhiteSpace(this string value) => string.IsNullOrEmpty(value?.Trim());
     }


Fix Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException #26156 (#26203)

--- src/Servers/HttpSys/test/FunctionalTests/Listener/ServerTests.cs
+++ src/Servers/HttpSys/test/FunctionalTests/Listener/ServerTests.cs
@@ -126,17 +126,18 @@
         }

         [ConditionalFact]
-        [QuarantinedTest("https://github.com/dotnet/aspnetcore/pull/20718#issuecomment-618758634")]
         public void Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException()
         {
+            using var server1 = Utilities.CreateHttpServer(out var address1);
+
             var options = new HttpSysOptions();
-            options.UrlPrefixes.Add(UrlPrefix.Create("http", "example.org", "8080", ""));
-            var listener = new HttpSysListener(options, new LoggerFactory());
+            options.UrlPrefixes.Add(address1);
+            using var listener = new HttpSysListener(options, new LoggerFactory());

             var exception = Assert.Throws<HttpSysException>(() => listener.Start());

-            Assert.Equal((int)UnsafeNclNativeMethods.ErrorCodes.ERROR_ACCESS_DENIED, exception.ErrorCode);
-            Assert.Contains($@"netsh http add urlacl url=http://example.org:8080/ user={Environment.UserDomainName}\{Environment.UserName}", exception.Message);
+            Assert.Equal((int)UnsafeNclNativeMethods.ErrorCodes.ERROR_ALREADY_EXISTS, exception.ErrorCode);
+            Assert.Contains($"The prefix '{address1}' is already registered.", exception.Message);
         }

         [ConditionalFact]


Add comment about BuildManager.CancelAllSubmissions()

--- src/Workspaces/Core/MSBuild/MSBuild/Build/ProjectBuildManager.cs
+++ src/Workspaces/Core/MSBuild/MSBuild/Build/ProjectBuildManager.cs
@@ -240,6 +240,10 @@
             {
                 registration = cancellationToken.Register(() =>
                 {
+                    // Note: We only ever expect that a single submission is being built,
+                    // even though we're calling CancelAllSubmissions(). If MSBuildWorkspace is
+                    // ever updated to support parallel builds, we'll likely need to update this code.
+
                     taskSource.TrySetCanceled();
                     buildManager.CancelAllSubmissions();
                     registration.Dispose();


[trunk] Removing unused variable

[trunk] Removing unused variable

--- packages/QtCommon/dev/XcodeBuilder/MocFile.cs
+++ packages/QtCommon/dev/XcodeBuilder/MocFile.cs
@@ -13,7 +13,6 @@
             out System.Boolean success)
         {
             var node = moduleToBuild.OwningNode;
-            var moduleName = node.ModuleName;

             var parentNode = node.Parent;
             Opus.Core.DependencyNode targetNode;


Show Other Costs if any

Show Other Costs if any

If a non public test has an amount, we don't show to the user, but we need an indication. Otherwise the total amount will not match what we display

--- Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
+++ Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
@@ -173,11 +173,14 @@

+    @{ var hiddenCosts = 0M; }
     @foreach (var test in @Model.OrderDetails.SelectedTests)
     {
+
         var temp = Model.Order.GetTestDetails().Where(a => a.Id == test.Id).FirstOrDefault();
         if (Model.HideLabDetails && !temp.Public)
         {
+            hiddenCosts += test.Total;
             continue;
         }

@@ -219,6 +222,14 @@
                 @(String.Format("{0:C}", Model.OrderDetails.ExternalProcessingFee))
             }

+        @if (hiddenCosts > 0M)
+        {
+

+                Other Costs
+
+                @(String.Format("{0:C}", hiddenCosts))
+

+        }
         @if (Model.OrderDetails.AdjustmentAmount != 0)
         {


Ensure locked access to ebo cache

Ensure locked access to ebo cache

Also remove redundant material cache

--- Assets/Pyrite/Scripts/PyriteOctreeLoader.cs
+++ Assets/Pyrite/Scripts/PyriteOctreeLoader.cs
@@ -80,7 +80,6 @@
         private readonly Queue<KeyValuePair<string, byte[]>> _texturesReadyForMaterialDataConstruction = new Queue<KeyValuePair<string, byte[]>>(5);
         private readonly Queue<LoadCubeRequest> _buildCubeRequests = new Queue<LoadCubeRequest>(10);
         private readonly DictionaryCache<string, GeometryBuffer> _eboCache = new DictionaryCache<string, GeometryBuffer>(EboCacheSize);
-        private readonly DictionaryCache<string, Material> _materialCache = new DictionaryCache<string, Material>(MaterialCacheSize);

         void Start()
         {
@@ -759,7 +758,10 @@
         {
             //var modelPath = loadRequest.Query.GetModelPath(loadRequest.LodIndex, loadRequest.X, loadRequest.Y, loadRequest.Z);
             var modelPath = pyriteQuery.GetModelPath(loadRequest.LodIndex, loadRequest.X, loadRequest.Y, loadRequest.Z);
-
+            while (!Monitor.TryEnter(_eboCache))
+            {
+                yield return null;
+            }
             // If the geometry data is being loaded or this is the first request to load it add the request the dependency list
             if (!_eboCache.ContainsKey(modelPath) || _eboCache[modelPath] == null)
             {
@@ -789,43 +791,51 @@
                             CacheWebRequest.AddToCache(cachePath, modelWww.bytes);
                         }

-                        _eboCache[modelPath] =
+                        GeometryBuffer buffer =
                             new GeometryBuffer(_geometryBufferAltitudeTransform, true)
                             {
                                 Buffer = modelWww.bytes
                             };
-                        _eboCache[modelPath].Process();
-                        yield return StartCoroutine(SucceedGetGeometryBufferRequest(modelPath));
+                        buffer.Process();
+                        _eboCache[modelPath] = buffer;
+                        yield return StartCoroutine(SucceedGetGeometryBufferRequest(modelPath,buffer));
                     }
                     else
                     {
                         CacheWebRequest.GetBytes(modelPath, modelResponse =>
                         {
-                            if (modelResponse.Status == CacheWebRequest.CacheWebResponseStatus.Error)
+                            lock (_eboCache)
                             {
-                                Debug.LogError("Error getting model [" + modelPath + "] " + modelResponse.ErrorMessage);
-                                FailGetGeometryBufferRequest(loadRequest, modelPath);
-                            }
-                            else if (modelResponse.Status == CacheWebRequest.CacheWebResponseStatus.Cancelled)
-                            {
-                                _eboCache.Remove(modelPath);
-                            }
-                            else
-                            {
-                                if (modelResponse.IsCacheHit)
+                                if (modelResponse.Status == CacheWebRequest.CacheWebResponseStatus.Error)
                                 {
-                                    //FileCacheHits++;
+                                    Debug.LogError("Error getting model [" + modelPath + "] " +
+                                                   modelResponse.ErrorMessage);
+                                    FailGetGeometryBufferRequest(loadRequest, modelPath);
+                                }
+                                else if (modelResponse.Status == CacheWebRequest.CacheWebResponseStatus.Cancelled)
+                                {
+                                    _eboCache.Remove(modelPath);
                                 }
                                 else
                                 {
-                                    //FileCacheMisses++;
+                                    if (modelResponse.IsCacheHit)
+                                    {
+                                        //FileCacheHits++;
+                                    }
+                                    else
+                                    {
+                                        //FileCacheMisses++;
+                                    }
+
+                                    GeometryBuffer buffer =
+                                        new GeometryBuffer(_geometryBufferAltitudeTransform, true)
+                                        {
+                                            Buffer = modelResponse.Content
+                                        };
+                                    buffer.Process();
+                                    _eboCache[modelPath] = buffer;
+                                    SucceedGetGeometryBufferRequest(modelPath, buffer).Wait();
                                 }
-                                _eboCache[modelPath] = new GeometryBuffer(_geometryBufferAltitudeTransform, true)
-                                {
-                                    Buffer = modelResponse.Content
-                                };
-                                _eboCache[modelPath].Process();
-                                SucceedGetGeometryBufferRequest(modelPath).Wait();
                             }
                         }, DependentRequestsExistBlocking);
                     }
@@ -838,9 +848,10 @@
                 loadRequest.GeometryBuffer = _eboCache[modelPath];
                 MoveRequestForward(loadRequest);
             }
-        }
-
-        private IEnumerator SucceedGetGeometryBufferRequest(string modelPath)
+            Monitor.Exit(_eboCache);
+        }
+
+        private IEnumerator SucceedGetGeometryBufferRequest(string modelPath, GeometryBuffer buffer)
         {
             // Check to see if any other requests were waiting on this model
             LinkedList<LoadCubeRequest> dependentRequests;
@@ -859,7 +870,7 @@
             {
                 foreach (var request in dependentRequests)
                 {
-                    request.GeometryBuffer = _eboCache[modelPath];
+                    request.GeometryBuffer = buffer;
                     MoveRequestForward(request);
                 }
             }
@@ -914,11 +925,6 @@

         private void Build(GeometryBuffer buffer, MaterialData materialData, int x, int y, int z, int lod, GameObject obj)
         {
-            if (!_materialCache.ContainsKey(materialData.Name))
-            {
-                _materialCache[materialData.Name] = CubeBuilderHelpers.GetMaterial(UseUnlitShader, materialData);
-            }
-
             if (CacheFill)
             {
                 return;
@@ -934,7 +940,7 @@
             cubeName.Append(z);

             obj.name = cubeName.ToString();
-            buffer.PopulateMeshes(obj, _materialCache[materialData.Name]);
+            buffer.PopulateMeshes(obj, materialData.Material);
             obj.SetActive(true);
         }


Make header of header middleware publicly accessible

--- Azuria/Middleware/StaticHeaderMiddleware.cs
+++ Azuria/Middleware/StaticHeaderMiddleware.cs
@@ -11,29 +11,33 @@
     /// </summary>
     public class StaticHeaderMiddleware : IMiddleware
     {
-        private readonly IDictionary<string, string> _staticHeaders;
-
         /// <summary>
         ///
         /// </summary>
         /// <param name="staticHeaders"></param>
         public StaticHeaderMiddleware(IDictionary<string, string> staticHeaders)
         {
-            this._staticHeaders = staticHeaders;
+            this.Header = staticHeaders;
         }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <value></value>
+        public IDictionary<string, string> Header { get; }

         /// <inheritdoc />
         public Task<IProxerResult> Invoke(IRequestBuilder request, MiddlewareAction next,
             CancellationToken cancellationToken = default)
         {
-            return next(request.WithHeader(this._staticHeaders), cancellationToken);
+            return next(request.WithHeader(this.Header), cancellationToken);
         }

         /// <inheritdoc />
         public Task<IProxerResult<T>> InvokeWithResult<T>(IRequestBuilderWithResult<T> request,
             MiddlewareAction<T> next, CancellationToken cancellationToken = default)
         {
-            return next(request.WithHeader(this._staticHeaders), cancellationToken);
+            return next(request.WithHeader(this.Header), cancellationToken);
         }
     }
 }


Fix diskcache

Fix diskcache

--- FFImageLoading.Shared/Cache/DiskCache.cs
+++ FFImageLoading.Shared/Cache/DiskCache.cs
@@ -228,13 +228,14 @@
 		public Stream TryGetStream (string key)
 		{
 			key = SanitizeKey(key);
-			byte[] data = null;
 			if (!entries.ContainsKey(key))
 				return null;

 			try {
-				return FileStore.GetInputStream(key);
-			} catch {
+                string filepath = Path.Combine(basePath, key);
+                return FileStore.GetInputStream(filepath);
+            }
+            catch {
 				return null;
 			}
 		}


improved page/edit

improved page/edit

--- Blog.Web/Areas/Admin/Views/Page/Edit.cshtml
+++ Blog.Web/Areas/Admin/Views/Page/Edit.cshtml
@@ -15,26 +15,30 @@

         #Body, #preview {
             height: 100%;
-            overflow: scroll;
+            /*overflow: scroll;*/
         }
         .CodeMirror {
             height: 100%;
             width: 99%;
             border: 1px solid #ccc;
-            overflow: scroll;
+            /*overflow: scroll;*/
         }

     </style>
 }

-@using (Html.BeginForm())
+@section navbar {
+    <button type="button" class="pull-right btn btn-small btn-primary" id="submitBtn"> Update Page</button>
+}
+
+@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "updateForm" }))
 {

-                @Html.TextBoxFor(x => x.Title, new { placeholder = "Title" }) @Html.EditorFor(x => x.Slug, new {})
-            <button type="submit" class="btn btn-primary btn-large"> Update Page</button>
-             Cancel
-
+                @Html.TextBoxFor(x => x.Title, new { placeholder = "Title" })
+            @Html.TextBoxFor(x => x.Slug, new {})
+            <button type="submit" class="hide btn btn-primary btn-large"> Update Page</button>
+             Cancel

@@ -89,6 +93,10 @@

             setTimeout(updatePreview, 300);

+            $('#submitBtn').click(function () {
+                $('#updateForm').submit();
+            });
+
         });
     </script>
 }


bug fix

bug fix

--- Box.V2.Samples.TransactionalAuth/Program.cs
+++ Box.V2.Samples.TransactionalAuth/Program.cs
@@ -35,8 +35,7 @@
             Console.ReadLine();
         }

-        }
-        private static async Task MainAsync(string fileId, bool usePrimaryToken)
+        private static async Task MainAsync(string token, string fileId, string folderId)
         {
             var auth = new OAuthSession(token, "YOUR_REFRESH_TOKEN", 3600, "bearer");


Remaining file formatting fix

Remaining file formatting fix

--- GnuPG_Buildkit_Package_Lister/Program.cs
+++ GnuPG_Buildkit_Package_Lister/Program.cs
@@ -144,7 +144,7 @@
             // Write it out.
             using (var sw = new StreamWriter(new FileStream(GetOutputName(), FileMode.Create), new UTF8Encoding(false)))
             {
-                sw.Write(template + "\r\n");
+                sw.Write(template);
                 sw.Flush();
             }
         }


Small change to order of registering to autogerenate columns event

--- Gu.Wpf.DataGrid2D/ItemsSource.Array2D.cs
+++ Gu.Wpf.DataGrid2D/ItemsSource.Array2D.cs
@@ -39,9 +39,9 @@
             }

             var array2DView = Array2DView.Create(array);
-            dataGrid.AutoGeneratingColumn += DataGrid_AutoGeneratingColumn;
             dataGrid.Bind(ItemsControl.ItemsSourceProperty)
                     .OneWayTo(array2DView);
+            dataGrid.AutoGeneratingColumn += DataGrid_AutoGeneratingColumn;
             dataGrid.RaiseEvent(new RoutedEventArgs(Events.ColumnsChanged));
         }


Typo fixes.

Typo fixes.

--- src/vs15/CoCo/FormattingService.cs
+++ src/vs15/CoCo/FormattingService.cs
@@ -128,9 +128,9 @@
         }

         /// <summary>
-        /// Converts an existing <paramref name="classificationsSettings"/> to <see cref="Classification"/> and appen them to <paramref name="classifications"/>,
-        /// also create <see cref="Classification"/> from non existing classifications in <paramref name="classificationsSettings"/>
-        /// set the default values of fields using <paramref name="defaultFormatting"/>
+        /// Converts an existing <paramref name="classificationsSettings"/> to <see cref="Classification"/> and appends them to
+        /// <paramref name="classifications"/>, also create <see cref="Classification"/> from non existing classifications in
+        /// <paramref name="classificationsSettings"/> set the default values of fields using <paramref name="defaultFormatting"/>
         /// </summary>
         private static void FillClassifications(
             IEnumerable<string> classificationNames,
@@ -154,13 +154,13 @@

                 /// NOTE: Don't set classifications settings field that can be reset,
                 /// because they will be handled correctly in the <see cref="ToClassification"/>
-                var classificationFromDefault = ToClassification(defaultFormatting.ToDefaultSettings(name), defaultFormatting);
-                classifications.Add(classificationFromDefault);
+                var settings = defaultFormatting.ToDefaultSettings(name);
+                classifications.Add(ToClassification(settings, defaultFormatting));
             }
         }

         /// <summary>
-        /// Conver <paramref name="classificationSettings"/> to <see cref="Classification"/> setting the default values
+        /// Converts <paramref name="classificationSettings"/> to <see cref="Classification"/> setting the default values
         /// of non exist classifications fields using <paramref name="defaultFormatting"/>
         /// </summary>
         private static Classification ToClassification(
@@ -227,8 +227,8 @@

             if (classification.FontRenderingSizeWasReset)
             {
-                /// NOTE: we should not try to set a some of value from <param name="defaultFormatting" /> if it's marked as empty
-                /// to avoid set that will mark value from <param name="formatting" /> as non empty
+                /// NOTE: we should not try to set property of <param name="defaultFormatting" /> if it's marked as empty
+                /// to avoid set which will mark property of <param name="formatting" /> as non empty
                 formatting = defaultFormatting.FontRenderingEmSizeEmpty
                     ? formatting.ClearFontRenderingEmSize()
                     : formatting.SetFontHintingEmSize(defaultFormatting.FontRenderingEmSize);


Fixed unstable frequency estimation for 44.1 kHz

--- LiveSPICE/Controls/Scope/Oscilloscope.cs
+++ LiveSPICE/Controls/Scope/Oscilloscope.cs
@@ -129,7 +129,7 @@

             lock (stabilize.Lock)
             {
-                int Decimate = 1 << (int)Math.Floor(Math.Log(sampleRate / 24000, 2));
+                int Decimate = 1 << (int)Math.Floor(Math.Log(sampleRate / 22000, 2));
                 int BlockSize = 8192;
                 if (stabilize.Count >= BlockSize)
                 {


analytics added to game

analytics added to game

--- MIMWebClient/Views/Shared/_Layout.cshtml
+++ MIMWebClient/Views/Shared/_Layout.cshtml
@@ -3,7 +3,7 @@
 <head>
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
+
     <title>@ViewBag.Title</title>
     <link href='https://fonts.googleapis.com/css?family=Slabo+27px' rel='stylesheet' type='text/css'>
     @Styles.Render("~/bundles/UI")
@@ -18,5 +18,14 @@
     @Scripts.Render("~/bundles/jqueryval")
     @Scripts.Render("~/bundles/bootstrap")
     @RenderSection("scripts", required: false)
+    <!-- Global Site Tag (gtag.js) - Google Analytics -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-98045003-1"></script>
+    <script>
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
+
+  gtag('config', 'UA-98045003-1');
+    </script>
 </body>
 </html>


Jump to 2.1

Jump to 2.1

--- source/NHibernate.AspNet.Identity/Properties/AssemblyInfo.cs
+++ source/NHibernate.AspNet.Identity/Properties/AssemblyInfo.cs
@@ -32,6 +32,6 @@
 // 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: AssemblyFileVersion("1.1.4000")]
-[assembly: AssemblyInformationalVersion("1.1.4000")]
-[assembly: AssemblyVersion("1.1")]
+[assembly: AssemblyFileVersion("2.1")]
+[assembly: AssemblyInformationalVersion("2.1")]
+[assembly: AssemblyVersion("2.1")]


Fix out of range exception when zero features are fetched for #1273

--- Mapsui/Fetcher/FeatureFetchDispatcher.cs
+++ Mapsui/Fetcher/FeatureFetchDispatcher.cs
@@ -58,7 +58,10 @@
                 if (exception == null)
                 {
                     _cache.Clear();
-                    _cache.PushRange(features.ToArray());
+                    if (features.Any())
+                    {
+                        _cache.PushRange(features.ToArray());
+                    }
                 }

                 Busy = _modified;