Dispose response object as soon as possible

--- src/DropboxRestAPI/Services/Core/Metadata.cs
+++ src/DropboxRestAPI/Services/Core/Metadata.cs
@@ -52,14 +52,17 @@

         #region Implementation of IMetadata

-        public async Task<MetaData> FilesAsync(string path, Stream targetStream, string rev = null, string asTeamMember = null, CancellationToken cancellationToken = default(CancellationToken))
+        public async Task<MetaData> FilesAsync(string path, Stream targetStream, string rev = null,
+            string asTeamMember = null, CancellationToken cancellationToken = default(CancellationToken))
         {
             MetaData fileMetadata = null;
+            string etag = "";
+            long? length;
             using (var restResponse = await _requestExecuter.Execute(() => _requestGenerator.Files(_options.Root, path, rev, asTeamMember), cancellationToken: cancellationToken).ConfigureAwait(false))
             {
                 await _requestExecuter.CheckForError(restResponse, false).ConfigureAwait(false);

-                long? length = restResponse.Content.Headers.ContentLength;
+                length = restResponse.Content.Headers.ContentLength;
                 if (length == null)
                 {
                     IEnumerable<string> metadatas;
@@ -73,32 +76,31 @@
                         }
                     }
                 }
-                string etag = "";
                 IEnumerable<string> etags;
                 if (restResponse.Headers.TryGetValues("etag", out etags))
                     etag = etags.FirstOrDefault();
+            }
+
+            long read = 0;
+            bool hasMore = true;
+            do
+            {
+                long from = read;
+                long to = read + _options.ChunkSize;
+
+                using (var restResponse2 = await _requestExecuter.Execute(() => _requestGenerator.FilesRange(_options.Root, path, from, to - 1, etag, rev, asTeamMember), cancellationToken: cancellationToken).ConfigureAwait(false))
+                {
+                    await restResponse2.Content.CopyToAsync(targetStream).ConfigureAwait(false);
+
+                    read += (restResponse2.Content.Headers.ContentLength ?? 0);
+                    if (length.HasValue && read >= length.Value)
+                        hasMore = false;
+                    else if (restResponse2.StatusCode == HttpStatusCode.OK)
+                        hasMore = false;
+                }
+            } while (hasMore);

-                long read = 0;
-                bool hasMore = true;
-                do
-                {
-                    long from = read;
-                    long to = read + _options.ChunkSize;
-
-                    using (var restResponse2 = await  _requestExecuter.Execute(() => _requestGenerator.FilesRange(_options.Root, path, from, to - 1, etag, rev, asTeamMember), cancellationToken: cancellationToken).ConfigureAwait(false))
-                    {
-                        await restResponse2.Content.CopyToAsync(targetStream).ConfigureAwait(false);
-
-                        read += (restResponse2.Content.Headers.ContentLength ?? 0);
-                        if (length.HasValue && read >= length.Value)
-                            hasMore = false;
-                        else if (restResponse2.StatusCode == HttpStatusCode.OK)
-                            hasMore = false;
-                    }
-                } while (hasMore);
-
-            }
             return fileMetadata;
         }


Update ColumnInfo.cs

Update ColumnInfo.cs

--- src/EfCore.Shaman/ModelScanner/ColumnInfo.cs
+++ src/EfCore.Shaman/ModelScanner/ColumnInfo.cs
@@ -65,8 +65,6 @@
         public int? MaxLength { get; set; }
         public int? DecimalPlaces { get; set; }
         public bool IsInPrimaryKey { get; set; }
-        public object DefaultValue { get; set; }
-        public string DefaultValueSql { get; set; }
         /// <summary>
         /// Decorated with ForeignKeyAttribute or InversePropertyAttribute
         /// </summary>
@@ -80,4 +78,4 @@

         #endregion
     }
-}+}


Remove unused nested class.

Remove unused nested class.

--- src/Facility.Core/Http/HttpServiceUtility.cs
+++ src/Facility.Core/Http/HttpServiceUtility.cs
@@ -1,12 +1,9 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
-using System.Net;
 using System.Net.Http;
 using System.Net.Http.Headers;
-using System.Threading.Tasks;

 namespace Facility.Core.Http
 {
@@ -58,29 +55,6 @@
 			}

 			return ServiceResult.Success();
-		}
-
-		private sealed class DelegateHttpContent : HttpContent
-		{
-			public DelegateHttpContent(string mediaType, Action<Stream> writeToStream)
-			{
-				m_writeToStream = writeToStream;
-				Headers.ContentType = MediaTypeHeaderValue.Parse(mediaType);
-			}
-
-			protected override Task SerializeToStreamAsync(Stream stream, TransportContext context)
-			{
-				m_writeToStream(stream);
-				return Task.FromResult<object>(null);
-			}
-
-			protected override bool TryComputeLength(out long length)
-			{
-				length = -1L;
-				return false;
-			}
-
-			readonly Action<Stream> m_writeToStream;
 		}

 		private sealed class DictionaryFromHeaders : IReadOnlyDictionary<string, string>


Added flat mapping to abstract identity classes

--- Jarvis.Framework.Shared/IdentitySupport/MongoFlatMapper.cs
+++ Jarvis.Framework.Shared/IdentitySupport/MongoFlatMapper.cs
@@ -55,9 +55,7 @@
             var asmName = assembly.FullName;
             _logger.InfoFormat("Scanning assembly {0} for Mongo flat mapping", asmName);
             foreach (var type in assembly.GetTypes()
-                .Where(t => typeof(IIdentity).IsAssignableFrom(t)  &&
-                            t.IsAbstract == false
-                      ))
+                .Where(t => typeof(IIdentity).IsAssignableFrom(t)))
             {
                 var fullName = type.FullName;
                 _logger.DebugFormat("Registered IIdentity type {0}", type.FullName);
@@ -66,9 +64,7 @@
             }

             foreach (var type in assembly.GetTypes()
-              .Where(t => typeof(LowercaseStringValue).IsAssignableFrom(t) &&
-                          t.IsAbstract == false
-                    ))
+              .Where(t => typeof(LowercaseStringValue).IsAssignableFrom(t)))
             {
                 _logger.DebugFormat("Registered LowercaseStringValue type {0}", type.FullName);
                 BsonSerializer.RegisterSerializer(type, new StringValueBsonSerializer());


fix(*): fixes expected / actual in tests

--- src/GitIgnorer.Tests/GitIgnoreParserTests.cs
+++ src/GitIgnorer.Tests/GitIgnoreParserTests.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
 using Xunit;

 namespace GitIgnorer.Tests
@@ -55,7 +56,7 @@
             var result = parser.Parse(" foo ");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo");
+            Assert.Equal("foo", result.Patterns.Single().Pattern);
         }

         [Fact]
@@ -68,7 +69,7 @@
             var result = parser.Parse("foo\\ ");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo ");
+            Assert.Equal("foo ", result.Patterns.Single().Pattern);
         }

         [Fact]
@@ -95,7 +96,7 @@
             var result = parser.Parse("\\!important!.txt");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "!important!.txt");
+            Assert.Equal("!important!.txt", result.Patterns.Single().Pattern);
         }

         [Fact]
@@ -108,7 +109,7 @@
             var result = parser.Parse("foo/");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo");
+            Assert.Equal("foo", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchDirectory));
             Assert.False(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchFile));
         }
@@ -123,7 +124,7 @@
             var result = parser.Parse("foo");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo");
+            Assert.Equal("foo", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchPathNameRelative));
         }

@@ -137,7 +138,7 @@
             var result = parser.Parse("foo/*bar");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo/*bar");
+            Assert.Equal("foo/*bar", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.WildcardsDoNotMatchSlashes));
         }

@@ -151,7 +152,7 @@
             var result = parser.Parse("/*.c");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "*.c");
+            Assert.Equal("*.c", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.Rooted));
         }

@@ -165,7 +166,7 @@
             var result = parser.Parse("**/foo");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "foo");
+            Assert.Equal("foo", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchInAllDirectories));
         }

@@ -179,7 +180,7 @@
             var result = parser.Parse("abc/**");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "abc");
+            Assert.Equal("abc", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchInsideDirectory));
         }

@@ -193,7 +194,7 @@
             var result = parser.Parse("a/**/b");

             // Assert
-            Assert.Equal(result.Patterns.Single().Pattern, "a/**/b");
+            Assert.Equal("a/**/b", result.Patterns.Single().Pattern);
             Assert.True(result.Patterns.Single().Flags.HasFlag(PatternFlags.MatchZeroOrMoreDirectories));
         }
     }


simple reorder of params

simple reorder of params

--- src/Google.Maps/Places/RadarSearchRequest.cs
+++ src/Google.Maps/Places/RadarSearchRequest.cs
@@ -65,16 +65,6 @@
                 qsb.Append("keyword", Keyword.ToString().ToLowerInvariant());
             }

-            if (!string.IsNullOrEmpty(Name))
-            {
-                qsb.Append("name", Name.ToString().ToLowerInvariant());
-            }
-
-            if ((Types != null && Types.Any()))
-            {
-                qsb.Append("types", TypesToUri());
-            }
-
             if (Minprice.HasValue)
             {
                 qsb.Append("minprice", Minprice.Value.ToString());
@@ -85,9 +75,19 @@
                 qsb.Append("maxprice", Maxprice.Value.ToString());
             }

+            if (!string.IsNullOrEmpty(Name))
+            {
+                qsb.Append("name", Name.ToString().ToLowerInvariant());
+            }
+
             if (OpenNow.HasValue)
             {
                 qsb.Append("opennow", OpenNow.Value.ToString().ToLowerInvariant());
+            }
+
+            if ((Types != null && Types.Any()))
+            {
+                qsb.Append("types", TypesToUri());
             }

             if (ZagatSelected)


Add test for lists of enums (#3092)

Add test for lists of enums (#3092)

--- src/GraphQL.Tests/Bugs/Bug1699InvalidEnum.cs
+++ src/GraphQL.Tests/Bugs/Bug1699InvalidEnum.cs
@@ -53,6 +53,15 @@
     public void Invalid_Enum_Within_NonNullList() => AssertQueryWithError("{ invalidEnumWithinNonNullList }", @"{ ""invalidEnumWithinNonNullList"": null }", "Error trying to resolve field 'invalidEnumWithinNonNullList'.", 1, 3, new object[] { "invalidEnumWithinNonNullList", 2 }, exception: new InvalidOperationException());

     [Fact]
+    public void Input_EnumList() => AssertQuerySuccess("{ inputList(arg: [SLEEPY]) }", @"{ ""inputList"": ""Sleepy"" }");
+
+    [Fact]
+    public void Input_EnumList_Variable() => AssertQuerySuccess("query($arg: [Bug1699Enum]) { inputList(arg: $arg) }", @"{ ""inputList"": ""Sleepy"" }", @"{""arg"":[""SLEEPY""]}".ToInputs());
+
+    [Fact]
+    public void Input_CustomEnumList() => AssertQuerySuccess("query($arg: [Bug1699CustomEnum]) { inputListCustom(arg: $arg) }", @"{ ""inputListCustom"": ""ISDOPEY"" }", @"{""arg"":[""ISDOPEY""]}".ToInputs());
+
+    [Fact]
     public void Input_Enum_Valid() => AssertQuerySuccess("{ inputEnum(arg: SLEEPY) }", @"{ ""inputEnum"": ""SLEEPY"" }");

     [Fact]
@@ -187,6 +196,14 @@
         Field<Bug1699CustomEnumGraphType>(
             "customEnumSleepy",
             resolve: context => Bug1699Enum.Sleepy);
+        Field<StringGraphType>(
+            "inputList",
+            arguments: new QueryArguments(new QueryArgument<ListGraphType<EnumerationGraphType<Bug1699Enum>>> { Name = "arg" }),
+            resolve: ctx => string.Join(",", ctx.GetArgument<List<Bug1699Enum>>("arg").Select(x => x.ToString())));
+        Field<StringGraphType>(
+            "inputListCustom",
+            arguments: new QueryArguments(new QueryArgument<ListGraphType<Bug1699CustomEnumGraphType>> { Name = "arg" }),
+            resolve: ctx => string.Join(",", ctx.GetArgument<List<object>>("arg").Select(x => x.ToString())));
     }
 }

@@ -204,5 +221,6 @@
         Add(new EnumValueDefinition("ISGRUMPY", Bug1699Enum.Grumpy));
         Add(new EnumValueDefinition("ISHAPPY", Bug1699Enum.Happy));
         Add(new EnumValueDefinition("ISSLEEPY", 2));
-    }
-}
+        Add(name: "ISDOPEY", value: "ISDOPEY", description: "testing description");
+    }
+}


dispose XmlDictionaryReader

dispose XmlDictionaryReader

--- lib/JWTSecurityTokenHandler.cs
+++ lib/JWTSecurityTokenHandler.cs
@@ -715,15 +715,17 @@
                             JwtConstants.TokenType));
             }

-            XmlDictionaryReader dictionaryReader = XmlDictionaryReader.CreateDictionaryReader(reader);
-            string wsuId = dictionaryReader.GetAttribute(WSSecurityUtilityConstants.Attributes.Id, WSSecurityUtilityConstants.Namespace);
-            JwtSecurityToken jwt = this.ReadToken(Encoding.UTF8.GetString(dictionaryReader.ReadElementContentAsBase64())) as JwtSecurityToken;
-            if (wsuId != null && jwt != null)
-            {
-                jwt.SetId(wsuId);
-            }
-
-            return jwt;
+            using (XmlDictionaryReader dictionaryReader = XmlDictionaryReader.CreateDictionaryReader(reader))
+            {
+                string wsuId = dictionaryReader.GetAttribute(WSSecurityUtilityConstants.Attributes.Id, WSSecurityUtilityConstants.Namespace);
+                JwtSecurityToken jwt = this.ReadToken(Encoding.UTF8.GetString(dictionaryReader.ReadElementContentAsBase64())) as JwtSecurityToken;
+                if (wsuId != null && jwt != null)
+                {
+                    jwt.SetId(wsuId);
+                }
+
+                return jwt;
+            }
         }

         /// <summary>
@@ -1367,6 +1369,7 @@
                 return securityKey.ToString();
             }
         }
+
         /// <summary>
         /// Creates a <see cref="ClaimsIdentity"/> from a <see cref="JwtSecurityToken"/>.
         /// </summary>


fixing the ci

fixing the ci

--- playground/ImTools.Benchmarks/ImHashMapBenchmarks.cs
+++ playground/ImTools.Benchmarks/ImHashMapBenchmarks.cs
@@ -648,7 +648,7 @@
         {
             // ReSharper disable once StaticMemberInGenericType
             private static int typeIndex;
-            private readonly object _lockObject = new();
+            private readonly object _lockObject = new object();

             private TValue[] _values = new TValue[100];

@@ -657,13 +657,13 @@
                 lock (_lockObject)
                 {
                     var id = TypeKey<TKey>.Id;
-                    if (id >= _values.Length) Array.Resize(ref _values, id * 2);
-
+                    if (id >= _values.Length)
+                        Array.Resize(ref _values, id * 2);
                     _values[id] = value;
                 }
             }

-            public TValue? Get<TKey>()
+            public TValue Get<TKey>()
             {
                 var id = TypeKey<TKey>.Id;
                 return id >= _values.Length ? default : _values[id];


warning if periodicity is wrong

warning if periodicity is wrong

--- Indicator/Seasonal_Indicator.cs
+++ Indicator/Seasonal_Indicator.cs
@@ -14,14 +14,15 @@

 /// <summary>
-/// Version: 1.0
+/// Version: 1.1
 /// -------------------------------------------------------------------------
 /// Simon Pucher 2016
 /// Christian Kovar 2016
 /// -------------------------------------------------------------------------
 /// The initial version was inspired by this link: http://emini-watch.com/stock-market-seasonal-trades/5701/
 /// -------------------------------------------------------------------------
-/// todo tax time, 4th of july, september effect, Thanksgiving
+/// todo
+/// tax time, 4th of july, september effect, Thanksgiving
 /// -------------------------------------------------------------------------
 /// ****** Important ******
 /// To compile this indicator without any error you also need access to the utility indicator to use these global source code elements.
@@ -103,10 +104,19 @@
                 default:
                     break;
             }
+
+            CalculateOnBarClose = true;
+            Overlay = true;
         }

 		protected override void OnBarUpdate()
 		{
+            //Check if peridocity is valid for this script
+            if (this.IsCurrentBarLast && !DatafeedPeriodicityIsValid(Bars.TimeFrame))
+            {
+                GlobalUtilities.DrawWarningTextOnChart(this, Const.DefaultStringDatafeedPeriodicity);
+            }
+
             switch (SeasonalType)
             {
                 case SeasonalType.SellInMay:
@@ -135,11 +145,11 @@
             //We need to get ensure that each name is unique.
             name = name + list.First().Time.Ticks;

-            DrawRectangle("rect" + name, true, list.First().Time, high, list.Last().Time, low, color, color, 70);
-            DrawText("text" + name, true, Math.Round((difference), 2).ToString(), list.First().Time, high, 7, Color.Black, new Font("Arial", 9), StringAlignment.Center, Color.Gray, color, 100);
-        }
-
-        #region calculation
+            DrawRectangle("Seasonal_rect" + name, true, list.First().Time, high, list.Last().Time, low, color, color, 70);
+            DrawText("Seasonal_text" + name, true, Math.Round((difference), 2).ToString(), list.First().Time, high, 7, Color.Black, new Font("Arial", 9), StringAlignment.Center, Color.Gray, color, 100);
+        }
+
+

         /// <summary>
         /// Calculate the seasonal indicator for "Santa Claus Rally".
@@ -201,8 +211,7 @@
             }
         }

-        #endregion
-
+

         public override string ToString()
@@ -215,6 +224,24 @@
             get
             {
                 return "Seasonal";
+            }
+        }
+
+
+        /// <summary>
+        /// True if the periodicity of the data feed is correct for this indicator.
+        /// </summary>
+        /// <returns></returns>
+        public bool DatafeedPeriodicityIsValid(ITimeFrame timeframe)
+        {
+            TimeFrame tf = (TimeFrame)timeframe;
+            if (tf.Periodicity == DatafeedHistoryPeriodicity.Day && tf.PeriodicityValue == 1)
+            {
+                return true;
+            }
+            else
+            {
+                return false;
             }
         }


no longer adds duplicates, or tags to device names

--- Infrastructure/StatusManager.cs
+++ Infrastructure/StatusManager.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
@@ -51,7 +50,7 @@

         public static DeviceStatusModel GetNewDeviceStatus(string device)
         {
-            var devList = new List<string>(device.Split(new string[] { ",",";","-","_","/" }, StringSplitOptions.RemoveEmptyEntries));
+            var devList = new List<string>(device.Split(new string[] { ",",";" }, StringSplitOptions.RemoveEmptyEntries));
             var model = new DeviceStatusModel();

             model.Device = devList[0];
@@ -127,10 +126,15 @@
         private void UpdateDeviceCollection(List<string> modifiedDeviceList)
         {
             if (modifiedDeviceList == null) { return; }
+            var devList = new List<string>();
+            foreach (var listval in modifiedDeviceList)
+            {
+                devList.Add(listval.Split(new string[] { ",", ";" }, StringSplitOptions.RemoveEmptyEntries)[0]);
+            }

             var devNameList = DeviceList.Select(model => model.Device).ToList();

-            var updateList = modifiedDeviceList;
+            var updateList = devList;

             var listToRemove = devNameList.Where(p => !updateList.Contains(p));
             var listToAdd = updateList.Where(x => !devNameList.Contains(x));
@@ -143,6 +147,11 @@

             foreach (var dev in listToAdd)
             {
+                if (DeviceList.FirstOrDefault(x => x.Device == dev) != null)
+                {
+                    continue;
+                }
+
                 DeviceList.Add(GetNewDeviceStatus(dev));
             }
         }


completed tag and help attributes for kinect nodes (2nd try)

--- Nodes/VVVV.DX11.Nodes.MSKinect/Nodes/KinectSkeletonNode.cs
+++ Nodes/VVVV.DX11.Nodes.MSKinect/Nodes/KinectSkeletonNode.cs
@@ -17,7 +17,7 @@
 	            Version = "Microsoft",
 	            Author = "vux",
 	            Tags = "DX11",
-	            Help = "Returns skeleton data for each tracked user"]
+	            Help = "Returns skeleton data for each tracked user")]
     public class KinectSkeletonNode : IPluginEvaluate, IPluginConnections
     {
         [Input("Kinect Runtime")]


Use descriptionAbout if responseInfoAbout is null

--- OSLC4Net_SDK/OSLC4Net.DotNetRdfProvider/DotNetRdfHelper.cs
+++ OSLC4Net_SDK/OSLC4Net.DotNetRdfProvider/DotNetRdfHelper.cs
@@ -107,22 +107,27 @@
             {
                 descriptionResource = graph.CreateUriNode(new Uri(descriptionAbout));

-                if (responseInfoAbout != null)
-                {
-                    IUriNode responseInfoResource = graph.CreateUriNode(new Uri(responseInfoAbout));
-
-                    graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(RdfSpecsHelper.RdfType)),
-                                            graph.CreateUriNode(new Uri(OslcConstants.TYPE_RESPONSE_INFO))));
-
-                    graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(OslcConstants.OSLC_CORE_NAMESPACE + PROPERTY_TOTAL_COUNT)),
-                                            new StringNode(graph, (totalCount == null ? objects.Count() : totalCount).ToString())));
+                IUriNode responseInfoResource = null;
+
+                if ((responseInfoAbout != null) && (!responseInfoAbout.Equals(descriptionAbout)))
+                {
+                    responseInfoResource = graph.CreateUriNode(new Uri(responseInfoAbout));
+                } else {
+                    responseInfoResource = descriptionResource;
+                }
+
+                graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(RdfSpecsHelper.RdfType)),
+                                        graph.CreateUriNode(new Uri(OslcConstants.TYPE_RESPONSE_INFO))));
+
+                graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(OslcConstants.OSLC_CORE_NAMESPACE + PROPERTY_TOTAL_COUNT)),
+                                        new StringNode(graph, (totalCount == null ? objects.Count() : totalCount).ToString())));

-                    if (nextPageAbout != null)
-                    {
-                        graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(OslcConstants.OSLC_CORE_NAMESPACE + PROPERTY_NEXT_PAGE)),
-                                                graph.CreateUriNode(new Uri(nextPageAbout))));
-                    }
-                }
+                if (nextPageAbout != null)
+                {
+                    graph.Assert(new Triple(responseInfoResource, graph.CreateUriNode(new Uri(OslcConstants.OSLC_CORE_NAMESPACE + PROPERTY_NEXT_PAGE)),
+                                            graph.CreateUriNode(new Uri(nextPageAbout))));
+                }
+
             }

             foreach (object obj in objects)


Update IdentifierTokenScanner.cs

Update IdentifierTokenScanner.cs

--- PapyrusScriptEditorVSIX/Language/IdentifierTokenScanner.cs
+++ PapyrusScriptEditorVSIX/Language/IdentifierTokenScanner.cs
@@ -11,11 +11,13 @@
 namespace Papyrus.Language {
     public class IdentifierTokenScanner : TokenScannerModule {
         public override bool Scan(SnapshotSpan sourceSnapshotSpan, int offset, ref TokenScannerState state, out Token token) {
-            string text = sourceSnapshotSpan.GetText();
-            int length = Delimiter.FindNext(text, offset) - offset;
-            if (Identifier.IsValid(text.Substring(offset, length))) {
-                token = new Token(new Identifier(text.Substring(offset, length)), sourceSnapshotSpan.Subspan(offset, length));
-                return true;
+            if (state == TokenScannerState.Text) {
+                string text = sourceSnapshotSpan.GetText();
+                int length = Delimiter.FindNext(text, offset) - offset;
+                if (Identifier.IsValid(text.Substring(offset, length))) {
+                    token = new Token(new Identifier(text.Substring(offset, length)), sourceSnapshotSpan.Subspan(offset, length));
+                    return true;
+                }
             }

             token = null;


Remove CSGO prefix from layer names

Remove CSGO prefix from layer names

--- Project-Aurora/Project-Aurora/Profiles/CSGO/CSGOProfile.cs
+++ Project-Aurora/Project-Aurora/Profiles/CSGO/CSGOProfile.cs
@@ -25,11 +25,11 @@
             Layers = new System.Collections.ObjectModel.ObservableCollection<Layer>()
             {

-                new Layer("CSGO Death Effect", new Layers.CSGODeathLayerHandler()),
-                new Layer("CSGO Kills Indicator", new Layers.CSGOKillIndicatorLayerHandler()),
-                new Layer("CSGO Winning Team Effect", new Layers.CSGOWinningTeamLayerHandler()),
-                new Layer("CSGO Typing Indicator", new Layers.CSGOTypingIndicatorLayerHandler()),
-                new Layer("CSGO Flashbang Effect", new Layers.CSGOFlashbangLayerHandler()),
+                new Layer("Death Effect", new Layers.CSGODeathLayerHandler()),
+                new Layer("Kills Indicator", new Layers.CSGOKillIndicatorLayerHandler()),
+                new Layer("Winning Team Effect", new Layers.CSGOWinningTeamLayerHandler()),
+                new Layer("Typing Indicator", new Layers.CSGOTypingIndicatorLayerHandler()),
+                new Layer("Flashbang Effect", new Layers.CSGOFlashbangLayerHandler()),
                 new Layer("Health Indicator", new PercentLayerHandler()
                 {
                     Properties = new PercentLayerHandlerProperties()
@@ -71,9 +71,9 @@
                 }, new OverrideLogicBuilder()
                     .SetDynamicBoolean("_Enabled", new BooleanGSIEnum("Round/Phase", RoundPhase.Live))
                 ),
-                new Layer("CSGO Bomb Effect", new Layers.CSGOBombLayerHandler()),
-                new Layer("CSGO Burning Effect", new Layers.CSGOBurningLayerHandler()),
-                new Layer("CSGO Background", new Layers.CSGOBackgroundLayerHandler())
+                new Layer("Bomb Effect", new Layers.CSGOBombLayerHandler()),
+                new Layer("Burning Effect", new Layers.CSGOBurningLayerHandler()),
+                new Layer("Background", new Layers.CSGOBackgroundLayerHandler())
             };
         }
     }


Fixed rule violation for UserFile.FilesSaved

--- RelhaxModpack/RelhaxModpack/DatabaseComponents/UserFile.cs
+++ RelhaxModpack/RelhaxModpack/DatabaseComponents/UserFile.cs
@@ -30,7 +30,7 @@
         /// <summary>
         /// The list of actual files saved to the temporary backup directory. Contains the full path and file name
         /// </summary>
-        public List<string> FilesSaved { get; set; } = new List<string>();
+        public List<string> FilesSaved { get; } = new List<string>();

         /// <summary>
         /// The string representation of the UserFile object
@@ -53,8 +53,7 @@
                 Pattern = userFileToCopy.Pattern,
 #pragma warning disable CS0618 // Type or member is obsolete
                 PlaceBeforeExtraction = userFileToCopy.PlaceBeforeExtraction,
-                SystemInitiated = userFileToCopy.SystemInitiated,
-                FilesSaved = new List<string>()
+                SystemInitiated = userFileToCopy.SystemInitiated
             };

             return file;
@@ -73,11 +72,9 @@
                 PlaceBeforeExtraction = userFileToCopy.PlaceBeforeExtraction,
                 SystemInitiated = userFileToCopy.SystemInitiated,
 #pragma warning restore CS0618 // Type or member is obsolete
-                FilesSaved = new List<string>()
             };

-            foreach (string s in userFileToCopy.FilesSaved)
-                file.FilesSaved.Add(s);
+            file.FilesSaved.AddRange(userFileToCopy.FilesSaved);

             return file;
         }


fixed bug to completely reset UI and internals when a load database button is pressed.

--- RelhaxModpack/RelhaxModpack/Windows/DatabaseEditor.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/DatabaseEditor.xaml.cs
@@ -237,6 +237,17 @@

         private void LoadUI(List<DatabasePackage> globalDependencies, List<Dependency> dependnecies, List<Category> parsedCategoryList, int numToAddEnd = 5)
         {
+            //reset the UI first
+            ResetRightPanels(null);
+
+            //also make the selected item null just in case
+            if(SelectedItem != null)
+            {
+                Logging.Debug("from LoadUI(), selectedItem is not null, setting to null (user pressed a load database function) previous={0}", SelectedItem.ToString());
+                SelectedItem = null;
+            }
+
+            //load database views
             LoadDatabaseView(GlobalDependencies, Dependencies, ParsedCategoryList);
             LoadInstallView(GlobalDependencies, Dependencies, ParsedCategoryList);
             LoadPatchView(GlobalDependencies, Dependencies, ParsedCategoryList);
@@ -1388,6 +1399,7 @@
                 //from auto load function
                 fileToLoad = CommandLineSettings.EditorAutoLoadFileName;
             }
+
             //the file exists, load it
             XmlDocument doc = XMLUtils.LoadXmlDocument(fileToLoad, XmlLoadType.FromFile);
             if (doc == null)
@@ -1401,9 +1413,11 @@
                 MessageBox.Show("Failed to load the database, check the logfile");
                 return;
             }
+
             //build internal database links
             Utils.BuildLinksRefrence(ParsedCategoryList, true);
             Utils.BuildLevelPerPackage(ParsedCategoryList);
+
             //set the onlineFolder and version
             //for the onlineFolder version: //modInfoAlpha.xml/@onlineFolder
             //for the folder version: //modInfoAlpha.xml/@version
@@ -1425,6 +1439,7 @@
                 MessageBox.Show(string.Format("The file\n{0}\ndoes not exist", DefaultSaveLocationSetting.Text));
                 return;
             }
+
             //actually load
             //the file exists, load it
             XmlDocument doc = XMLUtils.LoadXmlDocument(DefaultSaveLocationSetting.Text, XmlLoadType.FromFile);
@@ -1439,9 +1454,11 @@
                 MessageBox.Show("Failed to load the database, check the logfile");
                 return;
             }
+
             //build internal database links
             Utils.BuildLinksRefrence(ParsedCategoryList, true);
             Utils.BuildLevelPerPackage(ParsedCategoryList);
+
             //set the onlineFolder and version
             //for the onlineFolder version: //modInfoAlpha.xml/@onlineFolder
             //for the folder version: //modInfoAlpha.xml/@version


fix for if editor database is not loaded, don't load the UI

--- RelhaxModpack/RelhaxModpack/Windows/DatabaseEditor.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/DatabaseEditor.xaml.cs
@@ -430,6 +430,11 @@
             }
         }

+        private void SelectDatabaseTreeViewItem()
+        {
+
+        }
+
         private void LeftTabView_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             if (Init)
@@ -443,7 +448,16 @@
                     RemoveDatabaseObjectButton.IsEnabled = true;
                     MoveDatabaseObjectButton.IsEnabled = true;
                     AddDatabaseObjectButton.IsEnabled = true;
-                    LoadDatabaseView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    //check if the database is actually loaded before Loading the database view
+                    if(GlobalDependencies.Count == 0)
+                    {
+                        Logging.Info("Database is not yet loaded, skipping UI loading");
+                    }
+                    else
+                    {
+                        Logging.Info("Database is loaded, UI loading()");
+                        LoadDatabaseView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    }
                 }
                 else if (selectedTab.Equals(InstallGroupsTab))
                 {
@@ -452,7 +466,15 @@
                     RemoveDatabaseObjectButton.IsEnabled = false;
                     MoveDatabaseObjectButton.IsEnabled = false;
                     AddDatabaseObjectButton.IsEnabled = false;
-                    LoadInstallView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    if (GlobalDependencies.Count == 0)
+                    {
+                        Logging.Info("Database is not yet loaded, skipping UI loading");
+                    }
+                    else
+                    {
+                        Logging.Info("Database is loaded, UI loading()");
+                        LoadInstallView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    }
                 }
                 else if (selectedTab.Equals(PatchGroupsTab))
                 {
@@ -461,7 +483,15 @@
                     RemoveDatabaseObjectButton.IsEnabled = false;
                     MoveDatabaseObjectButton.IsEnabled = false;
                     AddDatabaseObjectButton.IsEnabled = false;
-                    LoadPatchView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    if (GlobalDependencies.Count == 0)
+                    {
+                        Logging.Info("Database is not yet loaded, skipping UI loading");
+                    }
+                    else
+                    {
+                        Logging.Info("Database is loaded, UI loading()");
+                        LoadPatchView(GlobalDependencies, Dependencies, ParsedCategoryList);
+                    }
                 }
                 else if (selectedTab.Equals(SettingsTab))
                 {


Mark some ClrField methods obsolete

Mark some ClrField methods obsolete

There are a few functions on ClrField that should have been properties
(IsPrimitive, IsValueClass, IsObjectReference).  These should be
properties.

--- src/Microsoft.Diagnostics.Runtime/ClrType.cs
+++ src/Microsoft.Diagnostics.Runtime/ClrType.cs
@@ -653,18 +653,21 @@
         /// Returns true if this field is a primitive (int, float, etc), false otherwise.
         /// </summary>
         /// <returns>True if this field is a primitive (int, float, etc), false otherwise.</returns>
+        [Obsolete("This will be replaced with a property.  To implement yourself, check if ElementType is not a Struct, String, Class, Array, SZArray, or Object.")]
         virtual public bool IsPrimitive() { return ClrRuntime.IsPrimitive(ElementType); }

         /// <summary>
         /// Returns true if this field is a ValueClass (struct), false otherwise.
         /// </summary>
         /// <returns>True if this field is a ValueClass (struct), false otherwise.</returns>
+        [Obsolete("This will be replaced with a property.  To implement yourself, check if ElementType is Struct.")]
         virtual public bool IsValueClass() { return ClrRuntime.IsValueClass(ElementType); }

         /// <summary>
         /// Returns true if this field is an object reference, false otherwise.
         /// </summary>
         /// <returns>True if this field is an object reference, false otherwise.</returns>
+        [Obsolete("This will be replaced with a property.  To implement yourself, check if ElementType is String, Class, Array, SZArray, or Object.")]
         virtual public bool IsObjectReference() { return ClrRuntime.IsObjectReference(ElementType); }

         /// <summary>


add docs

add docs

--- src/Microsoft.Identity.Client/ITokenCache.cs
+++ src/Microsoft.Identity.Client/ITokenCache.cs
@@ -73,7 +73,11 @@
         /// otherwise just use <see cref="SerializeMsalV3"/>/<see cref="DeserializeMsalV3"/>.
         /// </summary>
         /// <param name="msalV3State">Byte stream representation of the cache</param>
-        /// <param name="shouldClearExistingCache">Set to true to clear MSAL cache contents.  Defaults to false.</param>
+        /// <param name="shouldClearExistingCache">
+        /// Set to true to clear MSAL cache contents.  Defaults to false.
+        /// You would want to set this to true if you want the cache contents in memory to be exactly what's on disk.
+        /// You would want to set this to false if you want to merge the contents of what's on disk with your current in memory state.
+        /// </param>
         /// <remarks>
         /// This is the recommended format for maintaining SSO state between applications.
         /// <see cref="SerializeMsalV3"/>/<see cref="DeserializeMsalV3"/> is compatible with other MSAL libraries such as MSAL for Python and MSAL for Java.


CodeAnalysis.

CodeAnalysis.

--- src/Microsoft.Owin.Testing/RequestBuilder.cs
+++ src/Microsoft.Owin.Testing/RequestBuilder.cs
@@ -20,7 +20,7 @@

 namespace Microsoft.Owin.Testing
 {
-    public class RequestBuilder
+    public class RequestBuilder : IDisposable
     {
         private readonly TestServer _server;
         private readonly HttpRequestMessage _req;
@@ -51,5 +51,18 @@
             _req.Method = new HttpMethod(method);
             return _server.HttpClient.SendAsync(_req);
         }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                _req.Dispose();
+            }
+        }
     }
 }


More updates to AdoTransaction

More updates to AdoTransaction

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@1725

--- src/NHibernate/Transaction/AdoTransaction.cs
+++ src/NHibernate/Transaction/AdoTransaction.cs
@@ -17,6 +17,7 @@
 		private bool begun;
 		private bool committed;
 		private bool rolledBack;
+		private bool commitFailed;

 		/// <summary>
 		/// Initializes a new instance of the <see cref="AdoTransaction"/> class.
@@ -126,7 +127,7 @@
 		public void Commit()
 		{
 			CheckNotDisposed();
-			CheckRunning();
+			CheckBegun();

 			log.Debug( "commit" );

@@ -144,6 +145,8 @@
 			catch( Exception e )
 			{
 				log.Error( "Commit failed", e );
+				AfterTransactionCompletion( false );
+				commitFailed = true;
 				throw new TransactionException( "Commit failed with SQL exception", e );
 			}
 		}
@@ -159,23 +162,27 @@
 		public void Rollback()
 		{
 			CheckNotDisposed();
-			CheckRunning();
+			CheckBegun();

 			log.Debug( "rollback" );
-			try
-			{
-				trans.Rollback();
-				rolledBack = true;
-				Dispose();
-			}
-			catch( Exception e )
-			{
-				log.Error( "Rollback failed", e );
-				throw new TransactionException( "Rollback failed with SQL Exception", e );
-			}
-			finally
-			{
-				AfterTransactionCompletion( false );
+
+			if( !commitFailed )
+			{
+				try
+				{
+					trans.Rollback();
+					rolledBack = true;
+					Dispose();
+				}
+				catch( Exception e )
+				{
+					log.Error( "Rollback failed", e );
+					throw new TransactionException( "Rollback failed with SQL Exception", e );
+				}
+				finally
+				{
+					AfterTransactionCompletion( false );
+				}
 			}
 		}

@@ -283,16 +290,11 @@
 			}
 		}

-		private void CheckRunning()
+		private void CheckBegun()
 		{
 			if( !begun )
 			{
 				throw new TransactionException( "Transaction not successfully started" );
-			}
-
-			if( rolledBack || committed )
-			{
-				throw new TransactionException( "Transaction already finished" );
 			}
 		}
 	}


Include a filename in exceptions for invalid Markdown content.

If a Markdown file is invalid, we'll fail to load it at startup.
However, previously we didn't include any indication of which file was
at fault; now we do.

--- src/NodaTime.Web/Providers/MarkdownLoader.cs
+++ src/NodaTime.Web/Providers/MarkdownLoader.cs
@@ -85,10 +85,18 @@

         private MarkdownPage LoadPage(string directory, string id, MarkdownBundle bundle)
         {
-            var file = fileProvider.GetFileInfo($"{directory}/{id}.md");
-            using (var reader = file.CreateReader())
+            var filename = $"{directory}/{id}.md";
+            try
             {
-                return MarkdownPage.Load(id, bundle, reader, commonMarkSettings);
+                var file = fileProvider.GetFileInfo(filename);
+                using (var reader = file.CreateReader())
+                {
+                    return MarkdownPage.Load(id, bundle, reader, commonMarkSettings);
+                }
+            }
+            catch (Exception e)
+            {
+                throw new Exception($"Unable to parse markdown content from {filename}", e);
             }
         }


Remove unnecessary bit masking in ReadInt16 - byte is already unsigned.

--- src/NodaTime/TimeZones/DateTimeZoneReader.cs
+++ src/NodaTime/TimeZones/DateTimeZoneReader.cs
@@ -189,8 +189,8 @@
         {
             unchecked
             {
-                int high = ReadByte() & 0xff;
-                int low = ReadByte() & 0xff;
+                int high = ReadByte();
+                int low = ReadByte();
                 return (high << 8) | low;
             }
         }


#17906: Fixing shell resolution when no header is sent

Work Item:17906

--HG--
branch : 1.x

--- src/Orchard/Environment/RunningShellTable.cs
+++ src/Orchard/Environment/RunningShellTable.cs
@@ -51,14 +51,15 @@
             var qualified =
                 _shells.Where(x => !string.IsNullOrEmpty(x.RequestUrlHost) || !string.IsNullOrEmpty(x.RequestUrlPrefix));

-            var unqualified =
-                _shells.Where(x => string.IsNullOrEmpty(x.RequestUrlHost) && string.IsNullOrEmpty(x.RequestUrlPrefix));
+            var unqualified = _shells
+                .Where(x => string.IsNullOrEmpty(x.RequestUrlHost) && string.IsNullOrEmpty(x.RequestUrlPrefix))
+                .ToList();

             _shellsByHost = qualified
                 .SelectMany(s => s.RequestUrlHost == null || s.RequestUrlHost.IndexOf(',') == -1 ? new[] {s} :
                     s.RequestUrlHost.Split(new [] {','}, StringSplitOptions.RemoveEmptyEntries)
                      .Select(h => new ShellSettings(s) {RequestUrlHost = h}))
-                .GroupBy(s => s.RequestUrlHost ?? "")
+                .GroupBy(s => s.RequestUrlHost ?? string.Empty)
                 .OrderByDescending(g => g.Key.Length);

             if (unqualified.Count() == 1) {
@@ -79,11 +80,11 @@
         }

         public ShellSettings Match(HttpContextBase httpContext) {
-            return Match(httpContext.Request.Headers["Host"], httpContext.Request.AppRelativeCurrentExecutionFilePath);
+            // use Host header to prevent proxy alteration of the orignal request
+            return Match(httpContext.Request.Headers["Host"] ?? string.Empty, httpContext.Request.AppRelativeCurrentExecutionFilePath);
         }

         public ShellSettings Match(string host, string appRelativePath) {
-            // use Host header to prevent proxy alteration of the orignal request
             var hostLength = host.IndexOf(':');
             if (hostLength != -1)
                 host = host.Substring(0, hostLength);
@@ -91,9 +92,8 @@
             var mostQualifiedMatch = _shellsByHost
                 .Where(group => host.EndsWith(group.Key, StringComparison.OrdinalIgnoreCase))
                 .SelectMany(group => group
-                    .OrderByDescending(settings => (settings.RequestUrlPrefix ?? "").Length))
-                    .Where(settings => settings.State.CurrentState != TenantState.State.Disabled && appRelativePath.StartsWith(settings.RequestUrlPrefix ?? "", StringComparison.OrdinalIgnoreCase))
-                    .FirstOrDefault();
+                    .OrderByDescending(settings => (settings.RequestUrlPrefix ?? string.Empty).Length))
+                    .FirstOrDefault(settings => settings.State.CurrentState != TenantState.State.Disabled && appRelativePath.StartsWith(settings.RequestUrlPrefix ?? string.Empty, StringComparison.OrdinalIgnoreCase));

             return mostQualifiedMatch ?? _fallback;
         }


Support for CONTINUATION_OP

Support for CONTINUATION_OP

--- src/Owin.WebSocket/Handlers/OwinWebSocket.cs
+++ src/Owin.WebSocket/Handlers/OwinWebSocket.cs
@@ -44,6 +44,7 @@

     internal class OwinWebSocket : IWebSocket
     {
+        internal const int CONTINUATION_OP = 0x0;
         internal const int TEXT_OP = 0x1;
         internal const int BINARY_OP = 0x2;
         internal const int CLOSE_OP = 0x8;
@@ -114,7 +115,9 @@
         private static WebSocketMessageType MessageTypeOpCodeToEnum(int messageType)
         {
             switch (messageType)
-            {
+            {
+                case CONTINUATION_OP:
+                    return WebSocketMessageType.Binary;
                 case TEXT_OP:
                     return WebSocketMessageType.Text;
                 case BINARY_OP:


PDOException - code, errorInfo

PDOException - code, errorInfo

fixes https://github.com/peachpiecompiler/peachpie/issues/746
- $code = SQLSTATE
- $errorInfo can be set
- hides internal fields

--- src/PDO/Peachpie.Library.PDO/PDOException.cs
+++ src/PDO/Peachpie.Library.PDO/PDOException.cs
@@ -1,4 +1,6 @@
-using Pchp.Library.Spl;
+#nullable enable
+
+using Pchp.Library.Spl;
 using System;
 using Pchp.Core;

@@ -14,10 +16,24 @@
     {
         /// <summary>
         /// Corresponds to <see cref="PDO.errorInfo"/> or <see cref="PDOStatement.errorInfo"/>.
+        /// Can be changed.
         /// </summary>
-        public PhpArray errorInfo => _error.ToPhpErrorInfo();
+        public PhpArray errorInfo
+        {
+            get => _errorInfo ?? _error.ToPhpErrorInfo();
+            /*protected*/set => _errorInfo = value;
+        }

+        [PhpHidden]
+        private PhpArray? _errorInfo;
+
+        [PhpHidden]
         readonly PDO.ErrorInfo _error;
+
+        /// <summary>
+        /// SQLSTATE error code.
+        /// </summary>
+        public virtual new string getCode() => this.code.ToString(); // _error.SqlState

         /// <summary>
         /// Empty constructor used when overriding class in PHP.
@@ -25,10 +41,11 @@
         [PhpFieldsOnlyCtor]
         protected PDOException() { }

-        internal PDOException(PDO.ErrorInfo error, Throwable previous = null)
-            : base(error.Message, error.CodeOrZero(), previous)
+        internal PDOException(PDO.ErrorInfo error, Throwable? previous = null)
+            : base(error.Message, 0, previous)
         {
             _error = error;
+            this.code = error.SqlState;
         }

         /// <summary>
@@ -37,9 +54,10 @@
         /// <param name="message">The message.</param>
         /// <param name="code">The code.</param>
         /// <param name="previous">The previous.</param>
-        public PDOException(string message = "", long code = 0, Throwable previous = null)
-            : this(PDO.ErrorInfo.Create(string.Empty, code.ToString(), message), previous)
+        public PDOException(string message = "", long code = 0, Throwable? previous = null)
+            : this(PDO.ErrorInfo.Create(string.Empty, string.Empty, message), previous)
         {
+            this.code = code;
         }
     }
 }


Butt to omnisharp

Butt to omnisharp

--- src/Pomelo.NetCore.Node/Hubs/OmniSharpHub.cs
+++ src/Pomelo.NetCore.Node/Hubs/OmniSharpHub.cs
@@ -14,7 +14,7 @@
             {
                 var solutionPath = Path.Combine(Config.RootPath, projectName);
                 var result = OmniSharp.CreateOmnisharpServerSubprocess(solutionPath);
-                return new {isSucceeded = true, msg = result ? "启动成功" : "启动失败" };
+                return new { isSucceeded = true, msg = result ? "启动成功" : "启动失败" };
             }
             catch (Exception ex)
             {


Complete support for EAP.

Complete support for EAP.

--- src/Renci.SshNet/ForwardedPortDynamic.NET.cs
+++ src/Renci.SshNet/ForwardedPortDynamic.NET.cs
@@ -17,6 +17,10 @@
         private Socket _listener;
         private int _pendingRequests;

+#if FEATURE_SOCKET_EAP
+        private ManualResetEvent _stoppingListener;
+#endif // FEATURE_SOCKET_EAP
+
         partial void InternalStart()
         {
             var ip = IPAddress.Any;
@@ -42,19 +46,25 @@
                 {
                     try
                     {
+#if FEATURE_SOCKET_EAP
+                        _stoppingListener = new ManualResetEvent(false);
+
+                        StartAccept();
+
+                        _stoppingListener.WaitOne();
+#elif FEATURE_SOCKET_APM
                         while (true)
                         {
-#if FEATURE_SOCKET_EAP
-                            StartAccept();
-
-                            // TODO: wait for signal to stop
-#else
                             // accept new inbound connection
                             var asyncResult = _listener.BeginAccept(AcceptCallback, _listener);
                             // wait for the connection to be established
                             asyncResult.AsyncWaitHandle.WaitOne();
-#endif // FEATURE_SOCKET_EAP
-                        }
+                        }
+#elif FEATURE_SOCKET_TAP
+#error Accepting new socket connections is not implemented.
+#else
+#error Accepting new socket connections is not implemented.
+#endif
                     }
                     catch (ObjectDisposedException)
                     {
@@ -114,7 +124,7 @@

             ProcessAccept(acceptAsyncEventArgs.AcceptSocket);
         }
-#else
+#elif FEATURE_SOCKET_APM
         private void AcceptCallback(IAsyncResult ar)
         {
             // Get the socket that handles the client request
@@ -135,7 +145,7 @@

             ProcessAccept(clientSocket);
         }
-#endif // FEATURE_SOCKET_EAP
+#endif

         private void ProcessAccept(Socket remoteSocket)
         {
@@ -229,6 +239,10 @@
             //  if the port is not started then there's nothing to stop
             if (!IsStarted)
                 return;
+
+#if FEATURE_SOCKET_EAP
+            _stoppingListener.Set();
+#endif // FEATURE_SOCKET_EAP

             // close listener socket
             _listener.Dispose();
@@ -276,6 +290,14 @@
                     _listener.Dispose();
                     _listener = null;
                 }
+
+#if FEATURE_SOCKET_EAP
+                if (_stoppingListener != null)
+                {
+                    _stoppingListener.Dispose();
+                    _stoppingListener = null;
+                }
+#endif // FEATURE_SOCKET_EAP
             }
         }


resolved #180

resolved #180

--- src/Abp.Zero/Authorization/Users/UserLoginAttempt.cs
+++ src/Abp.Zero/Authorization/Users/UserLoginAttempt.cs
@@ -21,7 +21,7 @@
         /// <summary>
         /// Max length of the <see cref="TenancyName"/> property.
         /// </summary>
-        public const int MaxUserNameOrEmailAddressLength = 256;
+        public const int MaxUserNameOrEmailAddressLength = 255;

         /// <summary>
         /// Maximum length of <see cref="ClientIpAddress"/> property.


Added constructor to AbpValidationException and typo fixes.

--- src/Abp/Runtime/Validation/AbpValidationException.cs
+++ src/Abp/Runtime/Validation/AbpValidationException.cs
@@ -17,41 +17,53 @@
         public List<ValidationResult> ValidationErrors { get; set; }

         /// <summary>
-        /// Contstructor.
+        /// Constructor.
         /// </summary>
         public AbpValidationException()
         {
-
+            ValidationErrors = new List<ValidationResult>();
         }

         /// <summary>
-        /// Contstructor for serializing.
+        /// Constructor for serializing.
         /// </summary>
         public AbpValidationException(SerializationInfo serializationInfo, StreamingContext context)
             : base(serializationInfo, context)
         {
-
+            ValidationErrors = new List<ValidationResult>();
         }

         /// <summary>
-        /// Contstructor.
+        /// Constructor.
         /// </summary>
         /// <param name="message">Exception message</param>
         public AbpValidationException(string message)
             : base(message)
         {
+            ValidationErrors = new List<ValidationResult>();
+        }

+
+        /// <summary>
+        /// Constructor.
+        /// </summary>
+        /// <param name="message">Exception message</param>
+        /// <param name="validationErrors">Validation errors</param>
+        public AbpValidationException(string message, List<ValidationResult> validationErrors)
+            : base(message)
+        {
+            ValidationErrors = validationErrors;
         }

         /// <summary>
-        /// Contstructor.
+        /// Constructor.
         /// </summary>
         /// <param name="message">Exception message</param>
         /// <param name="innerException">Inner exception</param>
         public AbpValidationException(string message, Exception innerException)
             : base(message, innerException)
         {
-
+            ValidationErrors = new List<ValidationResult>();
         }
     }
 }


internal: test for the filters JsonReaders

--- src/Algolia.Search.Test/Serializer/SerializerTest.cs
+++ src/Algolia.Search.Test/Serializer/SerializerTest.cs
@@ -157,6 +157,97 @@

         [Test]
         [Parallelizable]
+        public void TestLegacyFilterFormats()
+        {
+            // Testing "one string" legacy filters => should be converted to "ORED" nested filters
+            // [["color:green","color:yellow"]]
+            string stringFilters = "\"color:green,color:yellow\"";
+
+            var serializedStringFilters =
+                JsonConvert.DeserializeObject<List<List<string>>>(stringFilters, new FiltersConverter());
+
+            AssertOredResult(serializedStringFilters);
+
+            // Testing "one array" legacy filters => should be converted to "ORED" nested filters
+            // [["color:green","color:yellow"]]
+            string arrayFilters = "[\"color:green\",\"color:yellow\"]";
+
+            var serializedArrayFilter =
+                JsonConvert.DeserializeObject<List<List<string>>>(arrayFilters, new FiltersConverter());
+
+            AssertOredResult(serializedArrayFilter);
+
+            string nestedArrayFilters = "[[\"color:green\",\"color:yellow\"]]";
+
+            var serializedNestedArrayFilter =
+                JsonConvert.DeserializeObject<List<List<string>>>(nestedArrayFilters, new FiltersConverter());
+
+            AssertOredResult(serializedNestedArrayFilter);
+
+            // Testing the latest format of filters i.e nested arrays
+            string nestedAndedArrayFilters = "[[\"color:green\",\"color:yellow\"],[\"color:blue\"]]";
+
+            var serializedAdedNestedArrayFilter =
+                JsonConvert.DeserializeObject<List<List<string>>>(nestedAndedArrayFilters, new FiltersConverter());
+
+            Assert.That(serializedAdedNestedArrayFilter, Has.Count.EqualTo(2));
+            Assert.That(serializedAdedNestedArrayFilter.ElementAt(0), Has.Count.EqualTo(2));
+            Assert.That(serializedAdedNestedArrayFilter.ElementAt(0).ElementAt(0), Contains.Substring("color:green"));
+            Assert.That(serializedAdedNestedArrayFilter.ElementAt(0).ElementAt(1), Contains.Substring("color:yellow"));
+            Assert.That(serializedAdedNestedArrayFilter.ElementAt(1), Has.Count.EqualTo(1));
+            Assert.That(serializedAdedNestedArrayFilter.ElementAt(1).ElementAt(0), Contains.Substring("color:blue"));
+
+            // Finally, testing that the custom reader is not breaking current implementation
+            Rule ruleWithFilters = new Rule
+            {
+                Consequence = new Consequence
+                {
+                    Params = new ConsequenceParams
+                    {
+                        OptionalFilters = new List<List<string>> { new List<string> { "a:b" } },
+                        TagFilters = new List<List<string>> { new List<string> { "a:b", "c:d" }, new List<string> { "d:e" } },
+                        FacetFilters = new List<List<string>> { new List<string> { "a:b" }, new List<string> { "c:d" } },
+                        NumericFilters = new List<List<string>> { new List<string> { "a=100" } }
+                    }
+                },
+            };
+
+            // Json "sent" to the API
+            string json = JsonConvert.SerializeObject(ruleWithFilters, JsonConfig.AlgoliaJsonSerializerSettings);
+
+            // Json "retrieved" from the API
+            var newRule = JsonConvert.DeserializeObject<Rule>(json);
+
+            Assert.That(newRule.Consequence.Params.OptionalFilters, Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.OptionalFilters.ElementAt(0), Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.OptionalFilters.ElementAt(0).ElementAt(0), Contains.Substring("a:b"));
+
+            Assert.That(newRule.Consequence.Params.TagFilters, Has.Count.EqualTo(2));
+            Assert.That(newRule.Consequence.Params.TagFilters.ElementAt(0), Has.Count.EqualTo(2));
+            Assert.That(newRule.Consequence.Params.TagFilters.ElementAt(0).ElementAt(0), Contains.Substring("a:b"));
+            Assert.That(newRule.Consequence.Params.TagFilters.ElementAt(0).ElementAt(1), Contains.Substring("c:d"));
+            Assert.That(newRule.Consequence.Params.TagFilters.ElementAt(1), Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.TagFilters.ElementAt(1).ElementAt(0), Contains.Substring("d:e"));
+
+            Assert.That(newRule.Consequence.Params.FacetFilters, Has.Count.EqualTo(2));
+            Assert.That(newRule.Consequence.Params.FacetFilters.ElementAt(0), Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.FacetFilters.ElementAt(1), Has.Count.EqualTo(1));
+
+            Assert.That(newRule.Consequence.Params.NumericFilters, Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.NumericFilters.ElementAt(0), Has.Count.EqualTo(1));
+            Assert.That(newRule.Consequence.Params.NumericFilters.ElementAt(0).ElementAt(0), Contains.Substring("a=100"));
+
+            void AssertOredResult(List<List<string>> result)
+            {
+                Assert.That(result, Has.Count.EqualTo(1));
+                Assert.That(result.ElementAt(0), Has.Count.EqualTo(2));
+                Assert.That(result.ElementAt(0).ElementAt(0), Contains.Substring("color:green"));
+                Assert.That(result.ElementAt(0).ElementAt(1), Contains.Substring("color:yellow"));
+            }
+        }
+
+        [Test]
+        [Parallelizable]
         public void TestEditConverter()
         {
             string json = "[\"lastname\",\"firstname\"]";


Update src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs

Co-authored-by: CyrusNajmabadi <726e0bc5de2519d72823786c7b6950f817ce3249@gmail.com>

--- src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs
+++ src/Analyzers/Core/Analyzers/EnforceOnBuildValues.cs
@@ -87,7 +87,7 @@
         public const EnforceOnBuild MakeStructFieldsWritable = /*IDE0064*/ EnforceOnBuild.WhenExplicitlyEnabled;
         public const EnforceOnBuild ConvertSwitchStatementToExpression = /*IDE0066*/ EnforceOnBuild.WhenExplicitlyEnabled;
         public const EnforceOnBuild PopulateSwitchExpression = /*IDE0072*/ EnforceOnBuild.WhenExplicitlyEnabled;
-        public const EnforceOnBuild SimplifyLinq = /*IDE0120*/ EnforceOnBuild.WhenExplicitlyEnabled;
+        public const EnforceOnBuild SimplifyLinqExpression = /*IDE0120*/ EnforceOnBuild.WhenExplicitlyEnabled;
         public const EnforceOnBuild Regex = /*RE0001*/ EnforceOnBuild.WhenExplicitlyEnabled;

         /* EnforceOnBuild.Never */


fixes: nit

fixes: nit

--- src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
+++ src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
@@ -42,9 +42,7 @@
             string output, bool verifyIl, MessageImportance logImportance, string strongNameKey, bool patchCom,
             bool skipXamlCompilation)
         {
-            return Compile(engine, input, references, projectDirectory, output, verifyIl, logImportance, strongNameKey, patchCom
-                , skipXamlCompilation,
-                debuggerLaunch:false);
+            return Compile(engine, input, references, projectDirectory, output, verifyIl, logImportance, strongNameKey, patchCom, skipXamlCompilation, debuggerLaunch:false);
         }

         internal static CompileResult Compile(IBuildEngine engine, string input, string[] references,


Added interface to DefinitionDictionary

Added interface to DefinitionDictionary

--- src/SixtenLabs.Spawn/DefinitionDictionary.cs
+++ src/SixtenLabs.Spawn/DefinitionDictionary.cs
@@ -6,7 +6,7 @@

 namespace SixtenLabs.Spawn
 {
-  public class DefinitionDictionary
+  public class DefinitionDictionary : IDefinitionDictionary
   {
     public string GetTranslatedName(string specName)
     {


Make SharedSpinLock methods static so that we do not always need to store the locker pointer but could calculate it with offset from some already stored pointer.

--- src/Spreads.Core/Threading/SharedSpinLock.cs
+++ src/Spreads.Core/Threading/SharedSpinLock.cs
@@ -258,7 +258,13 @@
             Pointer = pointer;
         }

-        internal unsafe Wpid LockHolder
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static unsafe Wpid GetLockHolder(long* pointer)
+        {
+            return (Wpid)Volatile.Read(ref *pointer);
+        }
+
+        public unsafe Wpid LockHolder
         {
             [DebuggerStepThrough]
             [MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -266,7 +272,7 @@
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        private long WpidToLockValue(Wpid wpid)
+        private static long WpidToLockValue(Wpid wpid)
         {
             // Effectively we assume Pid is always smaller that 2 ^ 24. It is on Linux and should be on Windows.
             // Could have used InstanceId high bits instead, but we could find Pid by instance id and instance id is mor important in general
@@ -275,27 +281,33 @@
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        private Wpid LockValueToWpid(long lockValue)
+        private static Wpid LockValueToWpid(long lockValue)
         {
             return (Wpid)(lockValue & ~WpidTagsMask);
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public unsafe Wpid TryAcquireExclusiveLock(Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
+        public static unsafe Wpid TryAcquireExclusiveLock(long* pointer, Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
         {
             // Priority so that others back off instantly without spinning
             var lockValue = WpidToLockValue(wpid) | PriorityTagMask;

             // TTAS significantly slower for uncontended case, which is often the case, do not check: 0 == *(long*)Pointer &&
-            if (0 == Interlocked.CompareExchange(ref *(long*)Pointer, lockValue, 0))
+            if (0 == Interlocked.CompareExchange(ref *pointer, lockValue, 0))
             {
                 return default;
             }
-            return TryAcquireLockContended(lockValue, spinLimit, wpidHelper);
-        }
-
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public unsafe Wpid TryReEnterExclusiveLock(Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
+            return TryAcquireLockContended(pointer, lockValue, spinLimit, wpidHelper);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public unsafe Wpid TryAcquireExclusiveLock(Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
+        {
+            return TryAcquireExclusiveLock((long*)Pointer, wpid, spinLimit, wpidHelper);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static unsafe Wpid TryReEnterExclusiveLock(long* pointer, Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
         {
             // Priority so that others back off instantly without spinning
             var expectedLockValue = WpidToLockValue(wpid) | PriorityTagMask;
@@ -303,7 +315,7 @@
             var sw = new SpinWait();
             while (true)
             {
-                var existing = Interlocked.CompareExchange(ref *(long*)Pointer, reenteredLockValue, expectedLockValue);
+                var existing = Interlocked.CompareExchange(ref *pointer, reenteredLockValue, expectedLockValue);
                 if (expectedLockValue == existing)
                 {
                     return default;
@@ -324,17 +336,29 @@
         }

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        internal unsafe Wpid TryExitExclusiveLock(Wpid wpid)
+        public unsafe Wpid TryReEnterExclusiveLock(Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
+        {
+            return TryReEnterExclusiveLock((long*)Pointer, wpid, spinLimit, wpidHelper);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static unsafe Wpid TryExitExclusiveLock(long* pointer, Wpid wpid)
         {
             var expectedLockValue = WpidToLockValue(wpid) | PriorityTagMask | ExclusiveTagMask;
             var lockValue = expectedLockValue & ~ExclusiveTagMask;
-            if (expectedLockValue == Interlocked.CompareExchange(ref *(long*)(Pointer), lockValue, expectedLockValue))
+            if (expectedLockValue == Interlocked.CompareExchange(ref *pointer, lockValue, expectedLockValue))
             {
                 return default;
             }

             ThrowNotInExclusiveLock();
             return default;
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public unsafe Wpid TryExitExclusiveLock(Wpid wpid)
+        {
+            return TryExitExclusiveLock((long*)Pointer, wpid);
         }

         [MethodImpl(MethodImplOptions.NoInlining)]
@@ -354,16 +378,22 @@
         /// Returns zero if acquired lock or Wpid of existing lock holder.
         /// </summary>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static unsafe Wpid TryAcquireLock(long* pointer, Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
+        {
+            var lockValue = WpidToLockValue(wpid);
+
+            // TTAS significantly slower for uncontended case, which is often the case, do not check: 0 == *(long*)Pointer &&
+            if (0 == Interlocked.CompareExchange(ref *pointer, lockValue, 0))
+            {
+                return default;
+            }
+            return TryAcquireLockContended(pointer, lockValue, spinLimit, wpidHelper);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public unsafe Wpid TryAcquireLock(Wpid wpid, int spinLimit = 0, IWpidHelper wpidHelper = null)
         {
-            var lockValue = WpidToLockValue(wpid);
-
-            // TTAS significantly slower for uncontended case, which is often the case, do not check: 0 == *(long*)Pointer &&
-            if (0 == Interlocked.CompareExchange(ref *(long*)Pointer, lockValue, 0))
-            {
-                return default;
-            }
-            return TryAcquireLockContended(lockValue, spinLimit, wpidHelper);
+            return TryAcquireLock((long*)Pointer, wpid, spinLimit, wpidHelper);
         }

         [MethodImpl(MethodImplOptions.NoInlining
@@ -371,7 +401,7 @@
             | MethodImplOptions.AggressiveOptimization // first call could be problematic with the loop if tiered compilation is on
 #endif
         )]
-        private unsafe Wpid TryAcquireLockContended(long lockValue, int spinLimit, IWpidHelper wpidHelper)
+        private static unsafe Wpid TryAcquireLockContended(long* pointer, long lockValue, int spinLimit, IWpidHelper wpidHelper)
         {
             DateTime backOffStarted = default;
             SemaphoreSlim sem = null;
@@ -392,7 +422,7 @@
                 long existing;
                 // if (0 == (existing = *(long*)(Pointer))) // TTAS doesn't help here either
                 {
-                    existing = Interlocked.CompareExchange(ref *(long*)(Pointer), lockValue, 0);
+                    existing = Interlocked.CompareExchange(ref *pointer, lockValue, 0);
                 }

                 if (existing == 0)
@@ -448,7 +478,7 @@
                     {
                         // first waiter that reached here is the first that started, no yields before PriorityThreshold,
                         // only preemption could have kicked it out before trying to acquire priority.
-                        var replaced = Interlocked.CompareExchange(ref *(long*)(Pointer), (existing | PriorityTagMask), existing);
+                        var replaced = Interlocked.CompareExchange(ref *pointer, (existing | PriorityTagMask), existing);
                         if (replaced == existing)
                         {
                             priority = true;
@@ -467,7 +497,7 @@
                     {
                         if (wpidHelper != null && !wpidHelper.IsWpidAlive(LockValueToWpid(existing)))
                         {
-                            var replaced = Interlocked.CompareExchange(ref *(long*)(Pointer), lockValue, existing);
+                            var replaced = Interlocked.CompareExchange(ref *pointer, lockValue, existing);
                             if (replaced == existing)
                             {
                                 wpidHelper.OnForceUnlock(LockValueToWpid(existing));
@@ -494,7 +524,7 @@
                     sem = sem ?? GetSemaphore(existing & ~(PriorityTagMask | ExclusiveTagMask));

                     // retry before wait
-                    existing = Interlocked.CompareExchange(ref *(long*)(Pointer), lockValue, 0);
+                    existing = Interlocked.CompareExchange(ref *pointer, lockValue, 0);
                     if (existing == 0)
                     {
                         return default;
@@ -712,23 +742,29 @@
         /// Returns zero if released lock.
         /// </summary>
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        internal unsafe Wpid TryReleaseLock(Wpid wpid)
+        public static unsafe Wpid TryReleaseLock(long* pointer, Wpid wpid)
         {
             var lockValue = WpidToLockValue(wpid);

-            if (lockValue == Interlocked.CompareExchange(ref *(long*)(Pointer), 0, lockValue))
+            if (lockValue == Interlocked.CompareExchange(ref *(long*)(pointer), 0, lockValue))
             {
                 return default;
             }

-            return TryReleaseLockContended(wpid);
+            return TryReleaseLockContended(pointer, wpid);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public unsafe Wpid TryReleaseLock(Wpid wpid)
+        {
+            return TryReleaseLock((long*)Pointer, wpid);
         }

         [MethodImpl(MethodImplOptions.NoInlining)]
-        private unsafe Wpid TryReleaseLockContended(Wpid wpid)
+        private static unsafe Wpid TryReleaseLockContended(long* pointer, Wpid wpid)
         {
             var lockValue = WpidToLockValue(wpid);
-            long existing = *(long*)(Pointer);
+            long existing = *pointer;

             if ((existing & ExclusiveTagMask) != 0)
             {
@@ -736,7 +772,7 @@
             }

             if (LockValueToWpid(existing) == wpid &&
-                Interlocked.CompareExchange(ref *(long*)(Pointer), 0, existing) == existing)
+                Interlocked.CompareExchange(ref *pointer, 0, existing) == existing)
             {
                 _multicast?.Send(lockValue);
                 return default;


Dont throw System.Exception

Dont throw System.Exception

System.Exception is too vague to have to catch.

Proposed change updates it to ArgumentOutOfRangeException, which fits better. If its not a base64 encoding, its out of the acceptable range the string is allowed to have.

--- jose-jwt/util/Base64Url.cs
+++ jose-jwt/util/Base64Url.cs
@@ -23,10 +23,10 @@
                 case 0: break; // No pad chars in this case
                 case 2: output += "=="; break; // Two pad chars
                 case 3: output += "="; break; // One pad char
-                default: throw new System.Exception("Illegal base64url string!");
+                default: throw new System.ArgumentOutOfRangeException("input","Illegal base64url string!");
             }
             var converted = Convert.FromBase64String(output); // Standard base64 decoder
             return converted;
         }
     }
-}+}


get rid of splatteredXsltArguments in XlangTransformHelper

--- src/BizTalk.Common/Transform/XlangTransformHelper.cs
+++ src/BizTalk.Common/Transform/XlangTransformHelper.cs
@@ -75,37 +75,6 @@
 		}

 		/// <summary>
-		/// Applies the XSL transformation specified by <paramref name="map"/> to the specified <paramref name="message"/>
-		/// and propagates the <paramref name="trackingContext"/> to the resulting message.
-		/// </summary>
-		/// <remarks>
-		/// This method assumes only the first part of a multi-part <paramref name="message"/> message has to be
-		/// transformed and creates an output message with a single part named "Main".
-		/// </remarks>
-		/// <param name="message">
-		/// The <see cref="XLANGMessage"/> to be transformed.
-		/// </param>
-		/// <param name="map">
-		/// The type of the BizTalk map class containing the transform to apply.
-		/// </param>
-		/// <param name="trackingContext">
-		/// The <see cref="TrackingContext"/> to be copied in the context of the output message.
-		/// </param>
-		/// <param name="splatteredXsltArguments">
-		/// The arguments to pass to the XSL transformation. The array must contain a number of items that is a multiple
-		/// of 3. Each series of 3 items contains, in that order, an XSL parameter name, the namespace URI of the
-		/// parameter, and its value.
-		/// </param>
-		/// <returns>
-		/// The transformed message with the result in the first part (at index 0).
-		/// </returns>
-		public static XLANGMessage Transform(XLANGMessage message, Type map, TrackingContext trackingContext, params object[] splatteredXsltArguments)
-		{
-			if (message == null) throw new ArgumentNullException("message");
-			return Transform(new XlangMessageCollection { message }, map, trackingContext, splatteredXsltArguments);
-		}
-
-		/// <summary>
 		/// Applies the XSL transformation specified by <paramref name="map"/> to the specified <paramref name="message"/> and
 		/// propagates the <paramref name="trackingContext"/> to the resulting message.
 		/// </summary>
@@ -157,32 +126,6 @@
 		public static XLANGMessage Transform(XlangMessageCollection messages, Type map, TrackingContext trackingContext)
 		{
 			return Transform(messages, map, trackingContext, new XsltArgumentList());
-		}
-
-		/// <summary>
-		/// Applies the XSL transformation specified by <paramref name="map"/> to the specified <paramref
-		/// name="messages"/> collection and propagates the <paramref name="trackingContext"/> to the resulting message.
-		/// </summary>
-		/// <param name="messages">
-		/// The <see cref="XlangMessageCollection"/> to be transformed.
-		/// </param>
-		/// <param name="map">
-		/// The type of the BizTalk map class containing the transform to apply.
-		/// </param>
-		/// <param name="trackingContext">
-		/// The <see cref="TrackingContext"/> to be copied in the context of the output message.
-		/// </param>
-		/// <param name="splatteredXsltArguments">
-		/// The arguments to pass to the XSL transformation. The array must contain a number of items that is a multiple
-		/// of 3. Each series of 3 items contains, in that order, an XSL parameter name, the namespace URI of the
-		/// parameter, and its value.
-		/// </param>
-		/// <returns>
-		/// The transformed message with the result in the first part (at index 0).
-		/// </returns>
-		public static XLANGMessage Transform(XlangMessageCollection messages, Type map, TrackingContext trackingContext, params object[] splatteredXsltArguments)
-		{
-			return Transform(messages, map, trackingContext, new XsltArgumentList(splatteredXsltArguments));
 		}

 		/// <summary>


Fixed the "Overwrite createdbyid" when editing

Fixed the "Overwrite createdbyid" when editing issue.

--- src/TeamBins/Controllers/IssuesController.cs
+++ src/TeamBins/Controllers/IssuesController.cs
@@ -97,7 +97,7 @@
             {
                 if (ModelState.IsValid)
                 {
-                    Issue bug = new Issue { ID = model.ID };
+                    Issue bug = new Issue { ID = model.ID ,  CreatedByID = UserID,  TeamID = TeamID};
                     if (model.ID != 0)
                     {
                         bug = repo.GetIssue(model.ID);
@@ -106,7 +106,7 @@
                     bug.Title = model.Title;
                     bug.Description = model.Description;
                     bug.TeamID = TeamID;
-                    bug.CreatedByID = UserID;
+
                     LoadDefaultIssueValues(bug, model);

                     OperationStatus result = repo.SaveIssue(bug);


fix for other common names

fix for other common names

- fixed other common names display so they are now separated by a comma

--- src/CollectionsOnline.WebSite/Views/Specimens.cshtml
+++ src/CollectionsOnline.WebSite/Views/Specimens.cshtml
@@ -109,9 +109,9 @@

Other Common Names

-                                    @foreach (var otherCommonNames in Model.Specimen.Taxonomy.OtherCommonNames)
+                                    @for (int i = 0; i < Model.Specimen.Taxonomy.OtherCommonNames.Count; i++)
                                     {
-                                        @otherCommonNames
+                                        @Model.Specimen.Taxonomy.OtherCommonNames[i]@(i != Model.Specimen.Taxonomy.OtherCommonNames.Count - 1 ? ", " : "")
                                     }


Fixing Test project name

Fixing Test project name


7867: Fix typo ("the the")

7867: Fix typo ("the the")

--- src/Compilers/Core/Portable/Diagnostic/Diagnostic.cs
+++ src/Compilers/Core/Portable/Diagnostic/Diagnostic.cs
@@ -45,7 +45,7 @@
         /// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param>
         /// <param name="location">An optional primary location of the diagnostic. If null, <see cref="Location"/> will return <see cref="Location.None"/>.</param>
         /// <param name="properties">
-        /// An optional set of name-value pairs by means of which the the analyzer that creates the diagnostic
+        /// An optional set of name-value pairs by means of which the analyzer that creates the diagnostic
         /// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return
         /// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
         /// </param>
@@ -92,7 +92,7 @@
         /// If null, <see cref="AdditionalLocations"/> will return an empty list.
         /// </param>
         /// <param name="properties">
-        /// An optional set of name-value pairs by means of which the the analyzer that creates the diagnostic
+        /// An optional set of name-value pairs by means of which the analyzer that creates the diagnostic
         /// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return
         /// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
         /// </param>
@@ -145,7 +145,7 @@
         /// If null, <see cref="CustomTags"/> will return an empty list.
         /// </param>
         /// <param name="properties">
-        /// An optional set of name-value pairs by means of which the the analyzer that creates the diagnostic
+        /// An optional set of name-value pairs by means of which the analyzer that creates the diagnostic
         /// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return
         /// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
         /// </param>
@@ -195,7 +195,7 @@
         /// If null, <see cref="CustomTags"/> will return an empty list.
         /// </param>
         /// <param name="properties">
-        /// An optional set of name-value pairs by means of which the the analyzer that creates the diagnostic
+        /// An optional set of name-value pairs by means of which the analyzer that creates the diagnostic
         /// can convey more detailed information to the fixer. If null, <see cref="Properties"/> will return
         /// <see cref="ImmutableDictionary{TKey, TValue}.Empty"/>.
         /// </param>


handle unhandled exceptions

handle unhandled exceptions

--- LatencyCollectorCore/Program.cs
+++ LatencyCollectorCore/Program.cs
@@ -69,6 +69,7 @@
 		{
 			try
 			{
+				AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;

 				var curAssembly = typeof(Data).Assembly;
 				Data.Tracker.Log("Info_LatencyCollectorVersion", curAssembly.FullName);
@@ -108,6 +109,13 @@
 			{
 				Report(exc);
 			}
+		}
+
+		static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
+		{
+			var exception = e.ExceptionObject as Exception;
+			if (exception != null)
+				Report(exception);
 		}

 		private static void PerformPolling()


Added create method

Added create method

--- src/Core2D.Avalonia/Dock/Handlers/DockDropHandler.cs
+++ src/Core2D.Avalonia/Dock/Handlers/DockDropHandler.cs
@@ -14,6 +14,51 @@
     {
         public static IDropHandler Instance = new DockDropHandler();

+        private void CreateDockWindow(IDockLayout layout, object context, IDockContainer container, int viewIndex, double x, double y)
+        {
+            var view = container.Views[viewIndex];
+
+            layout.RemoveView(container, viewIndex);
+
+            var dockLayout = new DockLayout
+            {
+                Row = 0,
+                Column = 0,
+                Views = new ObservableCollection<IDockView>(),
+                CurrentView = view,
+                Children = new ObservableCollection<IDockBase>
+                {
+                    new DockContainer
+                    {
+                        Row = 0,
+                        Column = 0,
+                        Views = new ObservableCollection<IDockView> { view },
+                        CurrentView = view
+                    }
+                }
+            };
+
+            var dockWindow = new DockWindow()
+            {
+                X = x,
+                Y = y,
+                Width = 300,
+                Height = 400,
+                Title = "Dock",
+                Context = context,
+                Layout = dockLayout,
+                Host = new HostWindow()
+            };
+
+            if (layout.CurrentView.Windows == null)
+            {
+                layout.CurrentView.Windows = new ObservableCollection<IDockWindow>();
+            }
+            layout.CurrentView.AddWindow(dockWindow);
+
+            dockWindow.Present();
+        }
+
         private bool ValidateTabStrip(IDockLayout layout, DragEventArgs e, bool bExecute, TabStrip strip)
         {
             var sourceItem = e.Data.Get(DragDataFormats.Parent);
@@ -26,7 +71,7 @@
                     int sourceIndex = strip.ItemContainerGenerator.IndexFromContainer(source);
                     int targetIndex = strip.ItemContainerGenerator.IndexFromContainer(target);

-                    if (strip.DataContext is DockContainer container)
+                    if (strip.DataContext is IDockContainer container)
                     {
                         if (e.DragEffects == DragDropEffects.Copy)
                         {
@@ -59,8 +104,8 @@
                 }
                 else if (source.Parent is TabStrip sourceStrip
                     && target.Parent is TabStrip targetStrip
-                    && sourceStrip.DataContext is DockContainer sourcePanel
-                    && targetStrip.DataContext is DockContainer targetPanel)
+                    && sourceStrip.DataContext is IDockContainer sourcePanel
+                    && targetStrip.DataContext is IDockContainer targetPanel)
                 {
                     int sourceIndex = sourceStrip.ItemContainerGenerator.IndexFromContainer(source);
                     int targetIndex = targetStrip.ItemContainerGenerator.IndexFromContainer(target);
@@ -109,8 +154,8 @@

             if (sourceItem is TabStripItem source
                 && source.Parent is TabStrip sourceStrip
-                && sourceStrip.DataContext is DockContainer sourceContainer
-                && panel.DataContext is DockContainer targetContainer
+                && sourceStrip.DataContext is IDockContainer sourceContainer
+                && panel.DataContext is IDockContainer targetContainer
                 && sourceContainer != targetContainer)
             {
                 int sourceIndex = sourceStrip.ItemContainerGenerator.IndexFromContainer(source);
@@ -147,68 +192,30 @@
             return false;
         }

-        private bool Validate(ProjectEditor editor, object sender, DragEventArgs e, bool bExecute)
+        private bool Validate(IDockLayout layout, object context, object sender, DragEventArgs e, bool bExecute)
         {
             var point = DropHelper.GetPosition(sender, e);

             switch (sender)
             {
                 case TabStrip strip:
-                    return ValidateTabStrip(editor?.Layout, e, bExecute, strip);
+                    return ValidateTabStrip(layout, e, bExecute, strip);
                 case DockPanel panel:
-                    return ValidateDockPanel(editor?.Layout, e, bExecute, panel);
+                    return ValidateDockPanel(layout, e, bExecute, panel);
             }

             if (e.Data.Get(DragDataFormats.Parent) is TabStripItem item)
             {
                 var strip = item.Parent as TabStrip;
-                if (strip.DataContext is DockContainer container)
+                if (strip.DataContext is IDockContainer container)
                 {
                     if (bExecute)
                     {
                         int itemIndex = strip.ItemContainerGenerator.IndexFromContainer(item);
-
-                        var view = container.Views[itemIndex];
-
-                        editor?.Layout.RemoveView(container, itemIndex);
-
-                        var position = DropHelper.GetPositionScreen(sender, e);
-
-                        var window = new DockWindow()
-                        {
-                            X = position.X,
-                            Y = position.Y,
-                            Width = 300,
-                            Height = 400,
-                            Title = "Dock",
-                            Context = editor,
-                            Layout = new DockLayout
-                            {
-                                Row = 0,
-                                Column = 0,
-                                Views = new ObservableCollection<IDockView>(),
-                                CurrentView = view,
-                                Children = new ObservableCollection<IDockBase>
-                                {
-                                    new DockContainer
-                                    {
-                                        Row = 0,
-                                        Column = 0,
-                                        Views = new ObservableCollection<IDockView> { view },
-                                        CurrentView = view
-                                    }
-                                }
-                            },
-                            Host = new HostWindow()
-                        };
-
-                        if (editor?.Layout.CurrentView.Windows == null)
-                        {
-                            editor.Layout.CurrentView.Windows = new ObservableCollection<IDockWindow>();
-                        }
-                        editor?.Layout.CurrentView.AddWindow(window);
-
-                        window.Present();
+                        Point position = DropHelper.GetPositionScreen(sender, e);
+
+                        CreateDockWindow(layout, context, container, itemIndex, position.X, position.Y);
+
                         return true;
                     }
                     return true;
@@ -222,7 +229,7 @@
         {
             if (context is ProjectEditor editor)
             {
-                return Validate(editor, sender, e, false);
+                return Validate(editor?.Layout, context, sender, e, false);
             }
             return false;
         }
@@ -231,7 +238,7 @@
         {
             if (context is ProjectEditor editor)
             {
-                return Validate(editor, sender, e, true);
+                return Validate(editor?.Layout, context, sender, e, true);
             }
             return false;
         }


thanks, but it was not really usefull xD

--- LegendaryClient/Logic/Client.cs
+++ LegendaryClient/Logic/Client.cs
@@ -299,11 +299,6 @@
         /// </summary>
         internal static List<keybindingEvents> Keybinds;

-        /// <summary>
-        ///     For allowing to give warning message
-        /// </summary>
-        internal static bool ShouldExit = false;
-
         internal static ChampionDTO[] PlayerChampions;

         internal static ReplayRecorder Autorecorder;
@@ -1356,16 +1351,6 @@

             return new BitmapImage(UriSource);
         }
-
-        internal static void CancelExit()
-        {
-            Warning warn = new Warning();
-            warn.Title.Content = "Quit";
-            warn.MessageText.Content = "Are You Sure You Want To Quit?";
-            Client.OverlayContainer.Content = warn.Content;
-            Client.OverlayContainer.Visibility = Visibility.Visible;
-        }
-
         #endregion Public Helper Methods

         public static Accent CurrentAccent { get; set; }


WWTMVC5: add some logging to the DefaultController too

--- src/WWTMVC5/Controllers/DefaultController.cs
+++ src/WWTMVC5/Controllers/DefaultController.cs
@@ -50,6 +50,7 @@

         public async Task<ActionResult> Index()
         {
+            _logger.LogInformation("DefaultController Index handler");
             return await GetViewOrRedirect(string.Empty,"index", _baseModel);
         }

@@ -88,8 +89,11 @@
         [Route("LiveId/AuthenticateFromCode/{code}")]
         public async Task<ActionResult> AuthenticateFromCode(string code)
         {
+            _logger.LogInformation("Handler AuthFromCode: code = {code}", code);
+
             if (Request.Headers.Get("host").Contains("localhost"))
             {
+                _logger.LogInformation("... localhost branch");
                 SessionWrapper.Clear();
                 var refreshTokenCookie = Response.Cookies["refresh_token"];
                 var accessTokenCookie = Response.Cookies["access_token"];
@@ -106,9 +110,12 @@

                 return Redirect("/home");
             }
+            _logger.LogInformation("AuthFromCode: trying to get user");
             var user = await TryAuthenticateFromAuthCode(code);
+            _logger.LogInformation("AuthFromCode: got user with email {email}", user.Email);
             _baseModel.User = user;
             string url = Uri.UnescapeDataString(Request.QueryString["returnUrl"]).ToLower();
+            _logger.LogInformation("AuthFromCode: redirecting with URL {url}", url);
             if (url.IndexOf("/community") != -1)
             {
                 return Redirect("/Community");
@@ -147,10 +154,13 @@
         [Route("{group}/{page=Index}")]
         public async Task<ActionResult> ViewResult(string group, string page)
         {
+            _logger.LogInformation("Handler ViewResult: group = {g}, page = {p}", group, page);
+
             try
             {
                 if (!ViewGroups.Contains(group.ToLower()))
                 {
+                    _logger.LogInformation("ViewResult: early error");
                     return View("~/Views/Support/Error.cshtml", _baseModel);
                 }
                 if (group.ToLower() == "wwtstories")
@@ -159,10 +169,12 @@
                 }
                 if (page.Contains(".msi") || (page.ToLower() == "error" && Request.RawUrl.Contains(".msi")))
                 {
+                    _logger.LogInformation("ViewResult: MSI");
                     return await GetViewOrRedirect("download","index", _baseModel);
                 }
                 if (group.ToLower() == "community" && page.ToLower() == "profile" && _baseModel.User == null)
                 {
+                    _logger.LogInformation("ViewResult: community branch");
                     await TryAuthenticateFromHttpContext();
                     if (CurrentUserId != 0)
                     {
@@ -172,14 +184,16 @@

                     return Redirect("/Community");
                 }
+                _logger.LogInformation("ViewResult: default branch");
                 ViewBag.page = page = GetQsPage(page);
                 ViewBag.group = group;
                 ViewBag.CurrentUserId = CurrentUserId;

                 return await GetViewOrRedirect(group, page, _baseModel);
             }
-            catch (Exception)
-            {
+            catch (Exception e)
+            {
+                _logger.LogError(e, "ViewResult: error in dispatch");
                 return View("~/Views/Support/Error.cshtml", _baseModel);
             }
         }
@@ -193,9 +207,8 @@
         /// <returns></returns>
         private async Task<ActionResult> GetViewOrRedirect(string group, string page, BaseModel model)
         {
+            _logger.LogInformation("GetViewOrRedirect: group = {g}, page = {p}", group, page);
             model.IsOpenWwtKiosk = Request.Headers.Get("host").ToLower().Contains("openwwt.org");
-
-

             if (model.IsOpenWwtKiosk && group.ToLower() != "openwwt")
             {
@@ -204,8 +217,10 @@
             }
             if (model.User == null)
             {
+                _logger.LogInformation("GetViewOrRedirect: null user");
                 if (Request.QueryString["code"] != null)
                 {
+                    _logger.LogInformation("GetViewOrRedirect: trying code auth with code = {c}", Request.QueryString["code"]);
                     model.User = await TryAuthenticateFromAuthCode(Request.QueryString["code"]);
                     if (page == "index")
                     {
@@ -216,18 +231,22 @@
                         strippedUrl = "/home";
                     }
                     //redirect strips gnarly looking code from qs
+                    _logger.LogInformation("GetViewOrRedirect: auth OK; redirect: {u}", strippedUrl);
                     return Redirect(strippedUrl);
                 }
                 if (Request.Cookies["refresh_token"] != null)
                 {
+                    _logger.LogInformation("GetViewOrRedirect: refresh_token present; trying blank code");
                     model.User = await TryAuthenticateFromAuthCode("");
                 }
             }
             if (group == string.Empty) {
+                _logger.LogInformation("GetViewOrRedirect: empty group redirect");
                 var homeCookie = Request.Cookies["homepage"];
                 var rootDir = homeCookie == null || string.IsNullOrEmpty(homeCookie.Value) ? "webclient" : homeCookie.Value;
                 return Redirect(rootDir);
             }
+            _logger.LogInformation("GetViewOrRedirect: default redirect");
             return group.ToLower() == "home" ? View("~/Views/index.cshtml", model) : View("~/Views/" + group + "/" + page + ".cshtml", model);
         }


Fixed serialization of enum in MarkupControl property

--- src/DotVVM.Framework/Controls/DotvvmMarkupControl.cs
+++ src/DotVVM.Framework/Controls/DotvvmMarkupControl.cs
@@ -8,6 +8,7 @@
 using DotVVM.Framework.Binding.Expressions;
 using DotVVM.Framework.Compilation.Parser;
 using System.Reflection;
+using DotVVM.Framework.ViewModel.Serialization;

 namespace DotVVM.Framework.Controls
 {
@@ -80,7 +81,7 @@
                 return new PropertySerializeInfo
                 {
                     Property = property,
-                    Js = JsonConvert.SerializeObject(GetValue(property), Formatting.None),
+                    Js = JsonConvert.SerializeObject(GetValue(property), Formatting.None, DefaultViewModelSerializer.CreateDefaultSettings()),
                     IsSerializable = true
                 };
             }


more replacing DeclareLocal with GetNextLocalVarIndex

--- src/FastExpressionCompiler/FastExpressionCompiler.cs
+++ src/FastExpressionCompiler/FastExpressionCompiler.cs
@@ -2544,7 +2544,7 @@
                 if (elemType == null)
                     return false;

-                var arrVar = il.DeclareLocal(arrayType);
+                var arrVarIndex = il.GetNextLocalVarIndex(arrayType);

                 var rank = arrayType.GetArrayRank();
                 if (rank == 1) // one dimensional
@@ -2562,14 +2562,14 @@
                 }

                 il.Emit(OpCodes.Newarr, elemType);
-                il.Emit(OpCodes.Stloc, arrVar);
+                EmitStoreLocalVariable(il, arrVarIndex);

                 var isElemOfValueType = elemType.IsValueType();

                 for (int i = 0, n = elems.Count; i < n; i++)
                 {
-                    il.Emit(OpCodes.Ldloc, arrVar);
-                    EmitLoadConstantInt(il, i);
+                    EmitLoadLocalVariable(il, arrVarIndex);
+                    EmitLoadArrayIndex(il, i);

                     // loading element address for later copying of value into it.
                     if (isElemOfValueType)
@@ -2584,7 +2584,7 @@
                         il.Emit(OpCodes.Stelem_Ref);
                 }

-                il.Emit(OpCodes.Ldloc, arrVar);
+                EmitLoadLocalVariable(il, arrVarIndex);
                 return true;
             }