Added mapping of "ddex_IsoDate" to DateTime (introduced in DDEX 3.7)

--- src/SevenDigital.Parsing.XsdToObject/TypeUtils.cs
+++ src/SevenDigital.Parsing.XsdToObject/TypeUtils.cs
@@ -16,6 +16,7 @@
 			AddType("decimal", "decimal?", typeof(decimal));
 			AddType("datetime", "DateTime?", typeof(DateTime));
 			AddType("date", "DateTime?", typeof(DateTime));
+			AddType("ddex_IsoDate", "DateTime?", typeof(DateTime));
 		}

 		private static void AddType(string xmlTypeName, string codeTypeName, Type netType)


use Buffer.BlockCopy for performance

use Buffer.BlockCopy for performance

--- src/SharpCompress/Common/Tar/Headers/TarHeader.cs
+++ src/SharpCompress/Common/Tar/Headers/TarHeader.cs
@@ -187,13 +187,9 @@

         private static void WriteStringBytes(byte[] name, byte[] buffer, int offset, int length)
         {
-            int i;
-
-            for (i = 0; i < length && i < name.Length; ++i)
-            {
-                buffer[offset + i] = (byte)name[i];
-            }
-
+            int i = Math.Min(length, name.Length);
+            Buffer.BlockCopy(name, 0, buffer, offset, i);
+            // if Span<byte>.Fill can be used, it is more efficient
             for (; i < length; ++i)
             {
                 buffer[offset + i] = 0;


ToOwinAppFunc

ToOwinAppFunc

--- src/SimpleOwin.Extensions/SimpleOwinExtensions.cs
+++ src/SimpleOwin.Extensions/SimpleOwinExtensions.cs
@@ -3,9 +3,22 @@
     using System;
     using System.Collections.Generic;
     using System.IO;
+    using System.Linq;
+    using System.Threading.Tasks;
+
+    using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>;

     public static class SimpleOwinExtensions
     {
+        public static readonly Task CachedCompletedResultTupleTask;
+
+        static SimpleOwinExtensions()
+        {
+            var tcs = new TaskCompletionSource<int>();
+            tcs.TrySetResult(0);
+            CachedCompletedResultTupleTask = tcs.Task;
+        }
+
         public static IDictionary<string, string[]> GetOwinResponseHeaders(this IDictionary<string, object> env)
         {
             return env.GetOwinEnvironmentValue<IDictionary<string, string[]>>("owin.ResponseHeaders");
@@ -47,5 +60,30 @@
             object value;
             return env.TryGetValue(key, out value) && value is T ? (T)value : defaultValue;
         }
+
+        public static AppFunc ToOwinAppFunc(this IEnumerable<Func<AppFunc, AppFunc>> app)
+        {
+            var apps = app.ToList();
+
+            return
+                env =>
+                {
+                    AppFunc next = null;
+                    int index = 0;
+
+                    next = env2 =>
+                    {
+                        if (index == apps.Count)
+                            return CachedCompletedResultTupleTask; // we are done
+
+                        Func<AppFunc, AppFunc> other = apps[index++];
+                        // ReSharper disable AccessToModifiedClosure
+                        return other(env3 => next(env3))(env2);
+                        // ReSharper restore AccessToModifiedClosure
+                    };
+
+                    return next(env);
+                };
+        }
     }
 }


Write quantity.unit to index instead of code in the case of non-ucum quantity.

--- src/Spark.Engine/Extensions/QuantityExtensions.cs
+++ src/Spark.Engine/Extensions/QuantityExtensions.cs
@@ -51,8 +51,8 @@
             if (quantity.System != null)
                 values.Add(new IndexValue("system", new StringValue(quantity.System)));

-            if (quantity.Code != null)
-                values.Add(new IndexValue("unit", new StringValue(quantity.Code)));
+            if (quantity.Unit != null)
+                values.Add(new IndexValue("unit", new StringValue(quantity.Unit)));

             if (quantity.Value.HasValue)
                 values.Add(new IndexValue("value", new NumberValue(quantity.Value.Value)));


Email normalization fixed

Email normalization fixed

--- src/Squidex.Domain.Users/UserManagerExtensions.cs
+++ src/Squidex.Domain.Users/UserManagerExtensions.cs
@@ -42,9 +42,9 @@

             if (!string.IsNullOrWhiteSpace(email))
             {
-                var upperEmail = email.ToUpperInvariant();
+                var normalizedEmail = userManager.NormalizeKey(email);

-                result = result.Where(x => x.NormalizedEmail.Contains(upperEmail));
+                result = result.Where(x => x.NormalizedEmail.Contains(normalizedEmail));
             }

             return result;


Make DNS response authoritative (#3748)

Make DNS response authoritative (#3748)

--- src/Stratis.Bitcoin.Features.Dns/DnsSeedServer.cs
+++ src/Stratis.Bitcoin.Features.Dns/DnsSeedServer.cs
@@ -350,6 +350,8 @@
                 }
             }

+            response.AuthorativeServer = true;
+
             // Set new start index.
             Interlocked.Increment(ref this.startIndex);


Simplify conditions whne PV success (#2251)

--- src/Stratis.Bitcoin/Consensus/ConsensusManager.cs
+++ src/Stratis.Bitcoin/Consensus/ConsensusManager.cs
@@ -472,20 +472,19 @@
                     }
                 }

-                // Partial validation should continue if:
-                //  1: There are more blocks to validate.
-                //  2: A full validation did not fail (if full validation was needed).
-                bool nextValidationNeeded = chainedHeaderBlocksToValidate != null;
-                bool fullValidationFailed = (connectBlocksResult != null) && !connectBlocksResult.Succeeded;
-                if (nextValidationNeeded && !fullValidationFailed)
-                {
-                    this.logger.LogTrace("Partial validation of {0} block will be started.", chainedHeaderBlocksToValidate.Count);
-
+                // If more blocks are available continue validation.
+                if (chainedHeaderBlocksToValidate != null)
+                {
+                    // Validate the next blocks if validation was not needed, or if needed then it succeeded.
+                    if ((connectBlocksResult == null) || connectBlocksResult.Succeeded)
+                    {
+                        this.logger.LogTrace("Partial validation of {0} block will be started.", chainedHeaderBlocksToValidate.Count);

                         // Start validating all next blocks that come after the current block,
                         // all headers in this list have the blocks present in the header.
                         foreach (ChainedHeaderBlock toValidate in chainedHeaderBlocksToValidate)
                             this.partialValidator.StartPartialValidation(toValidate.ChainedHeader, toValidate.Block, this.OnPartialValidationCompletedCallbackAsync);
+                    }
                 }
             }

@@ -666,6 +665,8 @@
             }

             disconnectedBlocks.Reverse();
+
+            this.logger.LogInformation("Reorg from block '{0}' to '{1}'", oldTip, fork);

             this.logger.LogTrace("(-):*.{0}={1}", nameof(disconnectedBlocks.Count), disconnectedBlocks.Count);
             return disconnectedBlocks;


Removed confirmation for UDT type edit since button editing is already restricted by referenced type count.

--- Source/Applications/openECA/openECAClient/wwwroot/UserDefinedTypes.cshtml
+++ Source/Applications/openECA/openECAClient/wwwroot/UserDefinedTypes.cshtml
@@ -293,11 +293,6 @@

         // Function called when an update button is pressed in the User Defined Types list
         function UpdateItem(data) {
-            const flag = confirm("To edit this defined type you will have to delete all defined types and mappings derived from it. Are you sure?");
-
-            if (!flag)
-                return;
-
             updateArray = [];
             CheckUDTForUpdate(data);


Oracle SubInsert bug

Oracle SubInsert bug

--- Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs
+++ Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs
@@ -96,6 +96,11 @@
                     batchInsetrSql.AppendLine("SELECT 1 FROM DUAL");
                 }
                 var result= batchInsetrSql.ToString();
+                if (result.Contains("{SugarSeq:=}"))
+                {
+                    result = result.Replace("\"{SugarSeq:=}", "");
+                    result = result.Replace("{SugarSeq:=}\"", "");
+                }
                 return result;
             }
         }


Redirect to Index instead of Sample

Redirect to Index instead of Sample

--- TeamMnMGroupingWebApp/TeamMnMGroupingWebApp/Controllers/HomeController.cs
+++ TeamMnMGroupingWebApp/TeamMnMGroupingWebApp/Controllers/HomeController.cs
@@ -22,20 +22,19 @@
     [HandleError(ExceptionType = typeof(HttpRequestException), View = "PermissionError")]
     public class HomeController : BaseController
     {
-        const string MAIN = "/Home/Sample";
+        const string MAIN = "/Home/Index2";

         public void Index()
         {
-            Response.Redirect("/Home/Index2");
-            //if (Session["access_token"] == null)
-            //{
-            //    GetToken(MAIN);
-            //}
-            //else
-            //{
-            //    // We have an access token in session, let's redirect to app main page.
-            //    Response.Redirect(MAIN);
-            //}
+            if (Session["access_token"] == null)
+            {
+                GetToken(MAIN);
+            }
+            else
+            {
+                // We have an access token in session, let's redirect to app main page.
+                Response.Redirect(MAIN);
+            }
         }

         public ActionResult Index2()
@@ -107,6 +106,7 @@

         }

+        [HttpGet]
         public async Task<ActionResult> Group()
         {
             var cs = new CohortService(Session["access_token"].ToString());
@@ -127,7 +127,7 @@
             data.students = students.Result;
             data.filters = FilterHelper.InitializeFilters();

-            return View(data);
+            return Json(data, JsonRequestBehavior.AllowGet);
         }

         //public async Task<string[]> CreateCustom(CohortCustom obj)


[iOS] Change border color of record button to white.

--- XamarinApp/MyTrips/MyTrips.iOS/Screens/Trips/CurrentTripViewController.cs
+++ XamarinApp/MyTrips/MyTrips.iOS/Screens/Trips/CurrentTripViewController.cs
@@ -60,8 +60,8 @@
 			// Setup record button
 			recordButton.Layer.CornerRadius = recordButton.Frame.Width / 2;
 			recordButton.Layer.MasksToBounds = true;
-			recordButton.Layer.BorderColor = "5C5C5C".ToUIColor().CGColor;
-			recordButton.Layer.BorderWidth = 1;
+			recordButton.Layer.BorderColor = UIColor.White.CGColor;
+			recordButton.Layer.BorderWidth = 0;
 			recordButton.TouchUpInside += RecordButton_TouchUpInside;

 			// Hide slider


Add documentation links

Add documentation links

--- source/UninstallTools/Junk/Finders/Registry/ComScanner.cs
+++ source/UninstallTools/Junk/Finders/Registry/ComScanner.cs
@@ -145,6 +145,7 @@
             }

             // Gather com interface info
+            // https://docs.microsoft.com/en-us/windows/desktop/com/interface-key
             foreach (var classesKeyPath in _classesKeys)
             {
                 using (var interfacesKey = RegistryTools.OpenRegistryKey(Path.Combine(classesKeyPath, "Interface"), false, true))
@@ -168,6 +169,7 @@

         private static void GetClsidEntries(ICollection<ComEntry> results, RegistryKey classes)
         {
+            // https://docs.microsoft.com/en-us/windows/desktop/com/clsid-key-hklm
             using (var clsid = classes.OpenSubKey("CLSID"))
             {
                 if (clsid == null) return;
@@ -289,6 +291,7 @@
             public readonly List<string> InterfaceNames = new List<string>();

             public string FullFilename;
+            //https://docs.microsoft.com/en-us/windows/desktop/com/-progid--key
             public string ProgId;
             public string VersionIndependentProgId;


forgot to port some matchesRegex test

forgot to port some matchesRegex test

--- src/tests/net-placeholders/PlaceholderDifferenceEvaluatorTest.cs
+++ src/tests/net-placeholders/PlaceholderDifferenceEvaluatorTest.cs
@@ -349,6 +349,45 @@
         }

         [Test]
+        public void HasMatchesRegexPlaceholder_Attribute_Matches() {
+            string control = "<elem1 attr='${xmlunit.matchesRegex(^\\d+$)}'>qwert</elem1>";
+            string test = "<elem1 attr='023'>qwert</elem1>";
+            var diff = DiffBuilder.Compare(control).WithTest(test)
+                .WithDifferenceEvaluator(new PlaceholderDifferenceEvaluator().Evaluate).Build();
+
+            Assert.IsFalse(diff.HasDifferences());
+        }
+
+        [Test]
+        public void HasMatchesRegexPlaceholder_Attribute_NotMatches() {
+            string control = "<elem1 attr='${xmlunit.matchesRegex(^\\d+$)}'>qwert</elem1>";
+            string test = "<elem1 attr='023asd'>qwert</elem1>";
+            var diff = DiffBuilder.Compare(control).WithTest(test)
+                .WithDifferenceEvaluator(new PlaceholderDifferenceEvaluator().Evaluate).Build();
+
+            Assert.IsTrue(diff.HasDifferences());
+        }
+
+        [Test]
+        public void HasMatchesRegexPlaceholder_Element_Matches() {
+            string control = "<elem1>${xmlunit.matchesRegex(^\\d+$)}</elem1>";
+            string test = "<elem1>023</elem1>";
+            var diff = DiffBuilder.Compare(control).WithTest(test)
+                .WithDifferenceEvaluator(new PlaceholderDifferenceEvaluator().Evaluate).Build();
+            Assert.IsFalse(diff.HasDifferences());
+        }
+
+        [Test]
+        public void HasMatchesRegexPlaceholder_Element_NotMatches() {
+            string control = "<elem1>${xmlunit.matchesRegex(^\\d+$)}</elem1>";
+            string test = "<elem1>23abc</elem1>";
+            var diff = DiffBuilder.Compare(control).WithTest(test)
+                .WithDifferenceEvaluator(new PlaceholderDifferenceEvaluator().Evaluate).Build();
+
+            Assert.IsTrue(diff.HasDifferences());
+        }
+
+        [Test]
         public void HasIsDateTimePlaceholder_Attribute_NotDateTime() {
             string control = "<elem1 attr='${xmlunit.isDateTime}'/>";
             string test = "<elem1 attr='abc'/>";


Improve Utf8JsonWriter code coverage (#36811)

* Added test for expected argument exception when property name or value arguments reach MaxTokenSize

--- src/System.Text.Json/tests/Utf8JsonWriterTests.cs
+++ src/System.Text.Json/tests/Utf8JsonWriterTests.cs
@@ -8,6 +8,7 @@
 using Newtonsoft.Json;
 using System.Globalization;
 using System.Threading.Tasks;
+using System.IO.Pipelines;

 namespace System.Text.Json.Tests
 {
@@ -3403,6 +3404,82 @@
             jsonUtf8.Flush();
         }

+        [ConditionalTheory(nameof(IsX64))]
+        [OuterLoop]
+        [InlineData(true, true)]
+        [InlineData(false, true)]
+        [InlineData(true, false)]
+        [InlineData(false, false)]
+        public void WriteTooLargeArguments(bool formatted, bool skipValidation)
+        {
+            var options = new JsonWriterOptions { Indented = formatted, SkipValidation = skipValidation };
+
+            byte[] bytesTooLarge;
+            char[] charsTooLarge;
+            var bytes = new byte[5];
+            var chars = new char[5];
+
+            try
+            {
+                bytesTooLarge = new byte[400_000_000];
+                charsTooLarge = new char[400_000_000];
+            }
+            catch (OutOfMemoryException)
+            {
+                return;
+            }
+
+            bytesTooLarge.AsSpan().Fill((byte)'a');
+            charsTooLarge.AsSpan().Fill('a');
+            bytes.AsSpan().Fill((byte)'a');
+            chars.AsSpan().Fill('a');
+
+            var pipe = new Pipe();
+            var output = pipe.Writer;
+            using var jsonUtf8 = new Utf8JsonWriter(output, options);
+
+            jsonUtf8.WriteStartArray();
+
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteStartObject(bytesTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytesTooLarge, bytes));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytes, bytesTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytesTooLarge, chars));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(chars, bytesTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytesTooLarge, new DateTime(2015, 11, 9)));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytesTooLarge, new DateTimeOffset(new DateTime(2015, 11, 9))));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytesTooLarge, Guid.NewGuid()));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteStringValue(bytesTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteCommentValue(bytesTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(bytesTooLarge, 10m));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(bytesTooLarge, 10.1));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(bytesTooLarge, 10.1f));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(bytesTooLarge, 12345678901));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(bytesTooLarge, (ulong)12345678901));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteBoolean(bytesTooLarge, true));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNull(bytesTooLarge));
+
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteStartObject(charsTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(charsTooLarge, chars));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(chars, charsTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(charsTooLarge, bytes));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(bytes, charsTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(charsTooLarge, new DateTime(2015, 11, 9)));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(charsTooLarge, new DateTimeOffset(new DateTime(2015, 11, 9))));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteString(charsTooLarge, Guid.NewGuid()));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteStringValue(charsTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteCommentValue(charsTooLarge));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(charsTooLarge, 10m));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(charsTooLarge, 10.1));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(charsTooLarge, 10.1f));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(charsTooLarge, 12345678901));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNumber(charsTooLarge, (ulong)12345678901));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteBoolean(charsTooLarge, true));
+            Assert.Throws<ArgumentException>(() => jsonUtf8.WriteNull(charsTooLarge));
+
+            jsonUtf8.Flush();
+            Assert.Equal(1, jsonUtf8.BytesCommitted);
+        }
+
         private static string GetHelloWorldExpectedString(bool prettyPrint, string propertyName, string value)
         {
             var ms = new MemoryStream();


changes

changes

--- src/TWCore/Diagnostics/Counters/CountersEngine.cs
+++ src/TWCore/Diagnostics/Counters/CountersEngine.cs
@@ -18,6 +18,7 @@
 using System.Collections.Concurrent;
 using System.Collections.ObjectModel;
 using System.Linq;
+using System.Runtime.CompilerServices;
 using TWCore.Diagnostics.Counters.Storages;

 namespace TWCore.Diagnostics.Counters
@@ -61,6 +62,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public IntegerCounter GetIntegerCounter(string category, string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((category, name), _ =>
@@ -80,6 +82,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public IntegerCounter GetIntegerCounter(string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((string.Empty, name), _ =>
@@ -100,6 +103,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public DoubleCounter GetDoubleCounter(string category, string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((category, name), _ =>
@@ -120,6 +124,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public DoubleCounter GetDoubleCounter(string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((string.Empty, name), _ =>
@@ -140,6 +145,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public DecimalCounter GetDecimalCounter(string category, string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((category, name), _ =>
@@ -159,6 +165,7 @@
         /// <param name="name">Counter name</param>
         /// <param name="type">Counter type</param>
         /// <param name="level">Counter level</param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public DecimalCounter GetDecimalCounter(string name, CounterType type = CounterType.Cumulative, CounterLevel level = CounterLevel.User)
         {
             var counter = _counters.GetOrAdd((string.Empty, name), _ =>
@@ -174,6 +181,7 @@
         #endregion

         #region Private Methods
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         private void ProcessCounters()
         {
             var storages = _storages;


Fix for #3321.

Fix for #3321.

Remove containers if number of items is now less than the number of materialized containers.

--- src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs
+++ src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs
@@ -188,8 +188,8 @@
                         break;

                     case NotifyCollectionChangedAction.Remove:
-                        if (e.OldStartingIndex >= FirstIndex &&
-                            e.OldStartingIndex < NextIndex)
+                        if ((e.OldStartingIndex >= FirstIndex && e.OldStartingIndex < NextIndex) ||
+                            panel.Children.Count > ItemCount)
                         {
                             RecycleContainersOnRemove();
                         }


Make BoundsTracker work with deferred renderer.

This needs to be redone: see #1026.

--- src/Avalonia.Visuals/Rendering/SceneGraph/SceneBuilder.cs
+++ src/Avalonia.Visuals/Rendering/SceneGraph/SceneBuilder.cs
@@ -199,6 +199,12 @@
                     }
                     catch { }

+                    if (visual is Visual)
+                    {
+                        var transformed = new TransformedBounds(new Rect(visual.Bounds.Size), clip, node.Transform);
+                        BoundsTracker.SetTransformedBounds((Visual)visual, transformed);
+                    }
+
                     if (forceRecurse)
                     {
                         foreach (var child in visual.VisualChildren.OrderBy(x => x, ZIndexComparer.Instance))
@@ -263,12 +269,16 @@

             scene.Layers[node.LayerRoot].Dirty.Add(node.Bounds);

+            if (node.Visual is Visual v)
+            {
+                BoundsTracker.SetTransformedBounds(v, null);
+            }
+
             foreach (VisualNode child in node.Children)
             {
                 var geometry = child as IDrawOperation;
-                var visual = child as VisualNode;
-
-                if (visual != null)
+
+                if (child is VisualNode visual)
                 {
                     Deindex(scene, visual);
                 }


Fixed casting issues in the MultiValueFacetFilter.

--- src/BoboBrowse.Net/Facets/Filter/MultiValueFacetFilter.cs
+++ src/BoboBrowse.Net/Facets/Filter/MultiValueFacetFilter.cs
@@ -43,10 +43,10 @@
             _val = val;
         }

-        public double GetFacetSelectivity(BoboIndexReader reader)
+        public override double GetFacetSelectivity(BoboIndexReader reader)
         {
             double selectivity = 0;
-            IMultiValueFacetDataCache dataCache = multiDataCacheBuilder.Build(reader);
+            IFacetDataCache dataCache = multiDataCacheBuilder.Build(reader);
             int idx = dataCache.ValArray.IndexOf(_val);
             if (idx < 0)
             {
@@ -87,7 +87,7 @@

         public override RandomAccessDocIdSet GetRandomAccessDocIdSet(BoboIndexReader reader)
         {
-            IMultiValueFacetDataCache dataCache = multiDataCacheBuilder.Build(reader);
+            IMultiValueFacetDataCache dataCache = (IMultiValueFacetDataCache)multiDataCacheBuilder.Build(reader);
             int index = dataCache.ValArray.IndexOf(_val);
             if (index < 0)
             {


Modified comment above DotvvmConfigurtion.Debug property

--- src/DotVVM.Framework/Configuration/DotvvmConfiguration.cs
+++ src/DotVVM.Framework/Configuration/DotvvmConfiguration.cs
@@ -86,7 +86,9 @@
         public bool ClientSideValidation { get; set; } = true;

         /// <summary>
-        /// Gets or sets whether the application should run in debug mode.
+        /// Gets whether the application should run in debug mode.
+        /// To set debug mode use parameter debug at IAppBuilder.UseDotVVM() or set environment variable ASPNETCORE_ENVIRONMENT.
+        /// For ASP.NET Core checkout <see cref="!:https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments" >https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments</see>
         /// </summary>
         [JsonProperty("debug", DefaultValueHandling = DefaultValueHandling.Ignore)]
         public bool Debug { get; internal set; }
@@ -148,11 +150,10 @@
         /// <param name="serviceProvider">The service provider to resolve services from.</param>
         public static DotvvmConfiguration CreateDefault(IServiceProvider serviceProvider)
         {
-            var config = new DotvvmConfiguration
-            {
-                #pragma warning disable
+            var config = new DotvvmConfiguration {
+#pragma warning disable
                 ServiceLocator = new ServiceLocator(serviceProvider),
-                #pragma warning restore
+#pragma warning restore
                 ServiceProvider = serviceProvider
             };

@@ -178,7 +179,7 @@
         }

         private static void ConfigureOptions<T>(T obj, IServiceProvider serviceProvider)
-            where T: class
+            where T : class
         {
             foreach (var conf in serviceProvider.GetServices<IConfigureOptions<T>>())
             {
@@ -199,22 +200,19 @@
             configuration.RouteConstraints.Add("posint", GenericRouteParameterType.Create<int>("[0-9]*?", Invariant.TryParse));
             configuration.RouteConstraints.Add("length", new GenericRouteParameterType(p => "[^/]{" + p + "}"));
             configuration.RouteConstraints.Add("long", GenericRouteParameterType.Create<long>("-?[0-9]*?", Invariant.TryParse));
-            configuration.RouteConstraints.Add("max", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) =>
-            {
+            configuration.RouteConstraints.Add("max", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) => {
                 double value;
                 if (!Invariant.TryParse(valueString, out value)) return ParameterParseResult.Failed;
                 if (double.Parse(parameter, CultureInfo.InvariantCulture) < value) return ParameterParseResult.Failed;
                 return ParameterParseResult.Create(value);
             }));
-            configuration.RouteConstraints.Add("min", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) =>
-            {
+            configuration.RouteConstraints.Add("min", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) => {
                 double value;
                 if (!Invariant.TryParse(valueString, out value)) return ParameterParseResult.Failed;
                 if (double.Parse(parameter, CultureInfo.InvariantCulture) > value) return ParameterParseResult.Failed;
                 return ParameterParseResult.Create(value);
             }));
-            configuration.RouteConstraints.Add("range", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) =>
-            {
+            configuration.RouteConstraints.Add("range", new GenericRouteParameterType(p => "-?[0-9.e]*?", (valueString, parameter) => {
                 double value;
                 if (!Invariant.TryParse(valueString, out value)) return ParameterParseResult.Failed;
                 var split = parameter.Split(',');
@@ -236,8 +234,7 @@
             configuration.Resources.Register(ResourceConstants.DotvvmResourceName + ".internal",
                 new ScriptResource(new EmbeddedResourceLocation(
                     typeof(DotvvmConfiguration).GetTypeInfo().Assembly,
-                    "DotVVM.Framework.Resources.Scripts.DotVVM.min.js"))
-                {
+                    "DotVVM.Framework.Resources.Scripts.DotVVM.min.js")) {
                     Dependencies = new[] { ResourceConstants.KnockoutJSResourceName, ResourceConstants.PolyfillResourceName }
                 });
             configuration.Resources.Register(ResourceConstants.DotvvmResourceName,
@@ -248,8 +245,7 @@
             configuration.Resources.Register(ResourceConstants.DotvvmDebugResourceName,
                 new ScriptResource(new EmbeddedResourceLocation(
                     typeof(DotvvmConfiguration).GetTypeInfo().Assembly,
-                    "DotVVM.Framework.Resources.Scripts.DotVVM.Debug.js"))
-                {
+                    "DotVVM.Framework.Resources.Scripts.DotVVM.Debug.js")) {
                     Dependencies = new[] { ResourceConstants.DotvvmResourceName }
                 });


Trying to fix Complex_ChangedEvent_ChangedEvent UI test

--- src/DotVVM.Samples.Tests.New/Complex/ChangedEventTests.cs
+++ src/DotVVM.Samples.Tests.New/Complex/ChangedEventTests.cs
@@ -42,8 +42,9 @@
                 }, 1000, 100);

                 new Actions(browser.Driver).SendKeys(Keys.Enter).SendKeys(Keys.Tab).Perform();
-                AssertUI.InnerTextEquals(firstTextbox, "Valuetest");
-                browser.Wait();
+                browser.WaitFor(() => {
+                    AssertUI.InnerTextEquals(firstTextbox, "Valuetest");
+                }, 1000, 100);
                 AssertUI.InnerTextEquals(totalChanges, "1");

                 // second textbox
@@ -119,4 +120,4 @@

     }
-}+}


Simplify common CWT pattern

Simplify common CWT pattern

--- src/EditorFeatures/Text/Extensions.TextBufferContainer.cs
+++ src/EditorFeatures/Text/Extensions.TextBufferContainer.cs
@@ -37,8 +37,7 @@
             /// <summary>
             /// A weak map of all Editor ITextBuffers and their associated SourceTextContainer
             /// </summary>
-            private static readonly ConditionalWeakTable<ITextBuffer, TextBufferContainer> s_textContainerMap = new ConditionalWeakTable<ITextBuffer, TextBufferContainer>();
-            private static readonly ConditionalWeakTable<ITextBuffer, TextBufferContainer>.CreateValueCallback s_createContainerCallback = CreateContainer;
+            private static readonly ConditionalWeakTable<ITextBuffer, TextBufferContainer> s_textContainerMap = new();

             public static TextBufferContainer From(ITextBuffer buffer)
             {
@@ -47,11 +46,8 @@
                     throw new ArgumentNullException(nameof(buffer));
                 }

-                return s_textContainerMap.GetValue(buffer, s_createContainerCallback);
+                return s_textContainerMap.GetValue(buffer, static buffer => new TextBufferContainer(buffer));
             }
-
-            private static TextBufferContainer CreateContainer(ITextBuffer editorBuffer)
-                => new TextBufferContainer(editorBuffer);

             public ITextBuffer? TryFindEditorTextBuffer()
                 => _weakEditorBuffer.GetTarget();


Fix agent configured with 0 maxparallelism.

--- src/Agent.Listener/Configuration/ConfigurationManager.cs
+++ src/Agent.Listener/Configuration/ConfigurationManager.cs
@@ -314,6 +314,7 @@
                 {
                     agent = new TaskAgent(agentName)
                     {
+                        MaxParallelism = 1,
                         Version = Constants.Agent.Version
                     };

@@ -438,4 +439,4 @@
             _term.WriteLine();
         }
     }
-}+}


#357 Big improvement of UI components search mechanics: fix FindByScriptStrategy

--- src/Atata/ScopeSearch/Strategies/FindByScriptStrategy.cs
+++ src/Atata/ScopeSearch/Strategies/FindByScriptStrategy.cs
@@ -20,7 +20,7 @@

         public ComponentScopeLocateResult Find(ISearchContext scope, ComponentScopeLocateOptions options, SearchOptions searchOptions)
         {
-            object scriptResult = AtataContext.Current.Driver.ExecuteScript(Script, scope);
+            object scriptResult = ExecuteScript(scope);

             if (scriptResult is ReadOnlyCollection<IWebElement> elements)
             {
@@ -47,6 +47,25 @@
                         SearchOptions = searchOptions,
                         SearchContext = scope
                     });
+            }
+        }
+
+        private object ExecuteScript(ISearchContext scope)
+        {
+            var driver = AtataContext.Current.Driver;
+
+            if (scope is IWebElement element)
+            {
+                return driver.ExecuteScript(Script, element);
+            }
+            else if (Script.Contains("arguments"))
+            {
+                var scopeElement = scope.Get(By.XPath("*").With(SearchOptions.OfAnyVisibility()));
+                return driver.ExecuteScript(Script, scopeElement);
+            }
+            else
+            {
+                return driver.ExecuteScript(Script);
             }
         }


Fixing CodeReifier.

Fixing CodeReifier.

(cherry picked from commit c736a4b9f3b094260841edae7e4b24f2a283c088)

--- src/Boo.Lang.Compiler/TypeSystem/Services/CodeReifier.cs
+++ src/Boo.Lang.Compiler/TypeSystem/Services/CodeReifier.cs
@@ -84,36 +84,50 @@

 		public Statement Reify(Statement node)
 		{
+            node = ReifyNode(node);
+			if (!_recursing)
+			{
+				_recursing = true;
+				try
+				{
+					node = new CodeReifierVisitor(this).Visit(node);
+				}
+                catch (CompilerError e) //preserve old behavior
+                {
+                    if (e.InnerException != null)
+                        throw e.InnerException;
+                    throw;
+                }
+				finally
+				{
+					_recursing = false;
+				}
+			}
+		    return node;
+		}
+
+		public Expression Reify(Expression node)
+		{
+		    node = ReifyNode(node);
 			if (!_recursing)
 			{
 				_recursing = true;
 				try
 				{
-					new CodeReifierVisitor(this).Visit(node);
+					node = new CodeReifierVisitor(this).Visit(node);
 				}
-				finally
+                catch (CompilerError e) //preserve old behavior
+                {
+                    if (e.InnerException != null)
+                        throw e.InnerException;
+                    throw;
+                }
+                finally
 				{
 					_recursing = false;
 				}
 			}
-			return ReifyNode(node);
-		}
-
-		public Expression Reify(Expression node)
-		{
-			if (!_recursing)
-			{
-				_recursing = true;
-				try
-				{
-					new CodeReifierVisitor(this).Visit(node);
-				}
-				finally
-				{
-					_recursing = false;
-				}
-			}
-			return ReifyNode(node);
+			return node;
 		}

 		public void ReifyInto(TypeDefinition parentType, TypeMember member)
@@ -147,19 +161,25 @@

 		private void Reify(TypeReference node)
 		{
-			if (!_recursing)
+            ForEachReifier<ITypeReferenceReifier>(r => r.Reify(node));
+            if (!_recursing)
 			{
 				_recursing = true;
 				try
 				{
 					new CodeReifierVisitor(this).Visit(node);
 				}
-				finally
+                catch (CompilerError e) //preserve old behavior
+                {
+                    if (e.InnerException != null)
+                        throw e.InnerException;
+                    throw;
+                }
+                finally
 				{
 					_recursing = false;
 				}
 			}
-			ForEachReifier<ITypeReferenceReifier>(r => r.Reify(node));
 		}

 		private T ReifyNode<T>(T node) where T : Node
@@ -207,311 +227,311 @@
 			}
 		}

-		private class CodeReifierVisitor : DepthFirstVisitor
+		private class CodeReifierVisitor : DepthFirstTransformer
 		{
-			private CodeReifier _cr;
+			private readonly CodeReifier _cr;

 			public CodeReifierVisitor(CodeReifier cr)
 			{
 				_cr = cr;
 			}

-			void OnStatement(Statement node)
-			{
-				_cr.Reify(node);
-			}
-
-			void OnExpression(Expression node)
-			{
-				_cr.Reify(node);
-			}
-
-			void OnTypeReference(TypeReference node)
-			{
-				_cr.Reify(node);
-			}
-
-			override public void LeaveTypeMemberStatement(TypeMemberStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void OnSimpleTypeReference(SimpleTypeReference node)
+			private void OnStatement(Statement node)
+			{
+                ReplaceCurrentNode(_cr.Reify(node));
+			}
+
+            private void OnExpression(Expression node)
+			{
+                ReplaceCurrentNode(_cr.Reify(node));
+			}
+
+            private void OnTypeReference(TypeReference node)
+			{
+                _cr.Reify(node);
+			}
+
+			public override void LeaveTypeMemberStatement(TypeMemberStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void OnSimpleTypeReference(SimpleTypeReference node)
 			{
 				OnTypeReference(node);
 			}

-			override public void LeaveCallableTypeReference(CallableTypeReference node)
+			public override void LeaveCallableTypeReference(CallableTypeReference node)
 			{
 				OnTypeReference(node);
 			}

-			override public void LeaveGenericTypeReference(GenericTypeReference node)
+			public override void LeaveGenericTypeReference(GenericTypeReference node)
 			{
 				OnTypeReference(node);
 			}

-			override public void OnGenericTypeDefinitionReference(GenericTypeDefinitionReference node)
+			public override void OnGenericTypeDefinitionReference(GenericTypeDefinitionReference node)
 			{
 				OnTypeReference(node);
 			}

-			override public void LeaveBlockExpression(BlockExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveGotoStatement(GotoStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveLabelStatement(LabelStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveBlock(Block node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveDeclarationStatement(DeclarationStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveMacroStatement(MacroStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveTryStatement(TryStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveIfStatement(IfStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveUnlessStatement(UnlessStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveForStatement(ForStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveWhileStatement(WhileStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveBreakStatement(BreakStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveExpressionStatement(ExpressionStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveContinueStatement(ContinueStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveUnpackStatement(UnpackStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveReturnStatement(ReturnStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveYieldStatement(YieldStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveRaiseStatement(RaiseStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveCustomStatement(CustomStatement node)
-			{
-				OnStatement(node);
-			}
-
-			override public void LeaveMethodInvocationExpression(MethodInvocationExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveUnaryExpression(UnaryExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveBinaryExpression(BinaryExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveConditionalExpression(ConditionalExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnReferenceExpression(ReferenceExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveMemberReferenceExpression(MemberReferenceExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveGenericReferenceExpression(GenericReferenceExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnQuasiquoteExpression(QuasiquoteExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnStringLiteralExpression(StringLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnCharLiteralExpression(CharLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnTimeSpanLiteralExpression(TimeSpanLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnIntegerLiteralExpression(IntegerLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnDoubleLiteralExpression(DoubleLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnSelfLiteralExpression(SelfLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnSuperLiteralExpression(SuperLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnRELiteralExpression(RELiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveSpliceExpression(SpliceExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnNullLiteralExpression(NullLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnBoolLiteralExpression(BoolLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveSpliceTypeReference(SpliceTypeReference node)
+			public override void LeaveBlockExpression(BlockExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveGotoStatement(GotoStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveLabelStatement(LabelStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveBlock(Block node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveDeclarationStatement(DeclarationStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveMacroStatement(MacroStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveTryStatement(TryStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveIfStatement(IfStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveUnlessStatement(UnlessStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveForStatement(ForStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveWhileStatement(WhileStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveBreakStatement(BreakStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveExpressionStatement(ExpressionStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveContinueStatement(ContinueStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveUnpackStatement(UnpackStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveReturnStatement(ReturnStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveYieldStatement(YieldStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveRaiseStatement(RaiseStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveCustomStatement(CustomStatement node)
+			{
+				OnStatement(node);
+			}
+
+			public override void LeaveMethodInvocationExpression(MethodInvocationExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveUnaryExpression(UnaryExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveBinaryExpression(BinaryExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveConditionalExpression(ConditionalExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnReferenceExpression(ReferenceExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveMemberReferenceExpression(MemberReferenceExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveGenericReferenceExpression(GenericReferenceExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnQuasiquoteExpression(QuasiquoteExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnStringLiteralExpression(StringLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnCharLiteralExpression(CharLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnTimeSpanLiteralExpression(TimeSpanLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnIntegerLiteralExpression(IntegerLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnDoubleLiteralExpression(DoubleLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnSelfLiteralExpression(SelfLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnSuperLiteralExpression(SuperLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnRELiteralExpression(RELiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveSpliceExpression(SpliceExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnNullLiteralExpression(NullLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnBoolLiteralExpression(BoolLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveSpliceTypeReference(SpliceTypeReference node)
 			{
 				OnTypeReference(node);
 			}

-			override public void LeaveSpliceMemberReferenceExpression(SpliceMemberReferenceExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveExpressionInterpolationExpression(ExpressionInterpolationExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveHashLiteralExpression(HashLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveListLiteralExpression(ListLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveCollectionInitializationExpression(CollectionInitializationExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveArrayLiteralExpression(ArrayLiteralExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveGeneratorExpression(GeneratorExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveExtendedGeneratorExpression(ExtendedGeneratorExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveSlicingExpression(SlicingExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveTryCastExpression(TryCastExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveCastExpression(CastExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void LeaveTypeofExpression(TypeofExpression node)
-			{
-				OnExpression(node);
-			}
-
-			override public void OnCustomExpression(CustomExpression node)
+			public override void LeaveSpliceMemberReferenceExpression(SpliceMemberReferenceExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveExpressionInterpolationExpression(ExpressionInterpolationExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveHashLiteralExpression(HashLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveListLiteralExpression(ListLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveCollectionInitializationExpression(CollectionInitializationExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveArrayLiteralExpression(ArrayLiteralExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveGeneratorExpression(GeneratorExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveExtendedGeneratorExpression(ExtendedGeneratorExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveSlicingExpression(SlicingExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveTryCastExpression(TryCastExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveCastExpression(CastExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void LeaveTypeofExpression(TypeofExpression node)
+			{
+				OnExpression(node);
+			}
+
+			public override void OnCustomExpression(CustomExpression node)
 			{
 				OnExpression(node);
 			}


AsyncResultQueue minor implementation fix (get rid of TryAddCompletionCallback calls)

--- src/UnityFx.Async/Api/Core/AsyncResultQueue{T}.cs
+++ src/UnityFx.Async/Api/Core/AsyncResultQueue{T}.cs
@@ -143,6 +143,11 @@
 				throw new ArgumentNullException(nameof(op));
 			}

+			if (op.IsStarted)
+			{
+				return false;
+			}
+
 			if (_maxOpsSize > 0 && _ops.Count >= _maxOpsSize)
 			{
 				return false;
@@ -153,17 +158,15 @@
 				_completionCallback = OnCompletedCallback;
 			}

-			if (op.TryAddCompletionCallback(_completionCallback, _syncContext))
-			{
-				lock (_ops)
-				{
-					_ops.Add(op);
-					TryStart(op);
-					return true;
-				}
-			}
-
-			return false;
+			op.AddCompletionCallback(_completionCallback, _syncContext);
+
+			lock (_ops)
+			{
+				_ops.Add(op);
+				TryStart(op);
+			}
+
+			return true;
 		}

 		/// <summary>


Fixed broken test (?)

Fixed broken test (?)

--- src/Gallio/Gallio.Tests/Reports/VtlReportFormatterTest.cs
+++ src/Gallio/Gallio.Tests/Reports/VtlReportFormatterTest.cs
@@ -191,7 +191,7 @@
             protected override void SetupVelocityEngine(VelocityEngine engine)
             {
                 engine.SetProperty(RuntimeConstants.RESOURCE_LOADER, "assembly");
-                engine.SetProperty("assembly.resource.loader.class", "NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader, NVelocity");
+                engine.SetProperty("assembly.resource.loader.class", "NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader");
                 engine.SetProperty("assembly.resource.loader.assembly", Assembly.GetExecutingAssembly().GetName().Name);
             }
         }


Delete FileOrganizationService.cs

Delete FileOrganizationService.cs

--- src/Hjerpbakk.DIPSbot/Services/FileOrganizationService.cs
+++ src/Hjerpbakk.DIPSbot/Services/FileOrganizationService.cs
@@ -1,25 +0,0 @@
-using System.CodeDom;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace Hjerpbakk.DIPSbot.Services
-{
-	public class FileOrganizationService : IOrganizationService
-	{
-		public async Task<IEnumerable<string>> GetDevelopers()
-		{
-			using (var reader = File.OpenText("/Users/sankra/Desktop/developerss.txt"))
-			{
-				var fileContent = await reader.ReadToEndAsync();
-				var lines = fileContent.Split(';');
-				return from developer in lines
-					   let mailPosition = developer.IndexOf('@')
-					   select new[] { developer[mailPosition - 3], developer[mailPosition - 2], developer[mailPosition - 1] }
-					   into usernameChars
-					   select new string(usernameChars);
-			}
-		}
-	}
-}


Add option to specify mute time in seconds.

--- src/MitternachtBot/Modules/Administration/MuteCommands.cs
+++ src/MitternachtBot/Modules/Administration/MuteCommands.cs
@@ -62,22 +62,23 @@
 			[RequireUserPermission(GuildPermission.MuteMembers)]
 			[Priority(1)]
 			public async Task Mute(IGuildUser user, string time) {
-				const string timeRegex = "((?<days>\\d+)d)?((?<hours>\\d+)h)?((?<minutes>\\d+)m(in)?)?";
+				const string timeRegex = "((?<days>\\d+)d)?((?<hours>\\d+)h)?((?<minutes>\\d+)m(in)?)?((?<seconds>\\d+)s)?";

 				var match = Regex.Match(time, timeRegex);

 				if(match.Success) {
-					var days    = string.IsNullOrWhiteSpace(match.Groups["days"   ].Value) ? 0 : Convert.ToInt32(match.Groups["days"   ].Value);
-					var hours   = string.IsNullOrWhiteSpace(match.Groups["hours"  ].Value) ? 0 : Convert.ToInt32(match.Groups["hours"  ].Value);
-					var minutes = string.IsNullOrWhiteSpace(match.Groups["minutes"].Value) ? 0 : Convert.ToInt32(match.Groups["minutes"].Value);
+					var days     = string.IsNullOrWhiteSpace(match.Groups["days"   ].Value) ? 0 : Convert.ToInt32(match.Groups["days"   ].Value);
+					var hours    = string.IsNullOrWhiteSpace(match.Groups["hours"  ].Value) ? 0 : Convert.ToInt32(match.Groups["hours"  ].Value);
+					var minutes  = string.IsNullOrWhiteSpace(match.Groups["minutes"].Value) ? 0 : Convert.ToInt32(match.Groups["minutes"].Value);
+					var seconds  = string.IsNullOrWhiteSpace(match.Groups["seconds"].Value) ? 0 : Convert.ToInt32(match.Groups["seconds"].Value);

-					var muteTime = days*24*60 + hours*60 + minutes;
+					var muteTime = days*24*60*60 + hours*60*60 + minutes*60 + seconds;

 					if(muteTime == 0) {
 						await Mute(user).ConfigureAwait(false);
 					} else {
 						try {
-							await Service.TimedMute(user, TimeSpan.FromMinutes(muteTime)).ConfigureAwait(false);
+							await Service.TimedMute(user, TimeSpan.FromSeconds(muteTime)).ConfigureAwait(false);
 							await ConfirmLocalized("user_muted_time", Format.Bold(user.ToString()), muteTime).ConfigureAwait(false);
 						} catch(Exception e) {
 							_log.Warn(e);


Failing test

Failing test

--- src/Nancy.Tests/Unit/ModelBinding/DefaultBinderFixture.cs
+++ src/Nancy.Tests/Unit/ModelBinding/DefaultBinderFixture.cs
@@ -680,7 +680,40 @@
             result.First().IntProperty.ShouldEqual(1);
             result.Last().IntProperty.ShouldEqual(12);
         }
-
+
+
+        [Fact]
+        public void Should_be_able_to_bind_more_than_once_should_ignore_non_list_properties_when_binding_to_a_list()
+        {
+            // Given
+            var typeConverters = new ITypeConverter[] { new CollectionConverter(), new FallbackConverter() };
+            var binder = this.GetBinder(typeConverters);
+
+            var context = CreateContextWithHeader("Content-Type", new[] { "application/x-www-form-urlencoded" });
+
+            context.Request.Form["StringProperty"] = "Test";
+            context.Request.Form["IntProperty"] = "3";
+
+            context.Request.Form["NestedIntProperty[0]"] = "1";
+            context.Request.Form["NestedStringProperty[0]"] = "one";
+
+            context.Request.Form["NestedIntProperty[1]"] = "2";
+            context.Request.Form["NestedStringProperty[1]"] = "two";
+
+            // When
+            var result = (TestModel)binder.Bind(context, typeof(TestModel), null, BindingConfig.Default);
+            var result2 = (List<AnotherTestModel>)binder.Bind(context, typeof(List<AnotherTestModel>), null, BindingConfig.Default);
+
+            // Then
+            result.StringProperty.ShouldEqual("Test");
+            result.IntProperty.ShouldEqual(3);
+
+            result2.First().NestedIntProperty.ShouldEqual(1);
+            result2.First().NestedStringProperty.ShouldEqual("one");
+            result2.Last().NestedIntProperty.ShouldEqual(2);
+            result2.Last().NestedStringProperty.ShouldEqual("two");
+        }
+
         [Fact]
         public void Should_bind_more_than_10_multiple_Form_properties_to_list_starting_with_jagged_ids()
         {
@@ -1329,6 +1362,15 @@
                 get { return 0; }
                 set { }
             }
+
+            public List<AnotherTestModel> Models { get; set; }
+        }
+
+        public class AnotherTestModel
+        {
+            public string NestedStringProperty { get; set; }
+            public int NestedIntProperty { get; set; }
+            public double NestedDoubleProperty { get; set; }
         }
     }


Switched AttemptToActivateActiveSpan event to Informational level. (#881)

Co-authored-by: Cijo Thomas <242191b8c991f635fefc07748c2f69af50b38db4@microsoft.com>

--- src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs
+++ src/OpenTelemetry/Internal/OpenTelemetrySdkEventSource.cs
@@ -129,7 +129,7 @@
             this.WriteEvent(6, spanName);
         }

-        [Event(7, Message = "Attempting to activate active span '{0}'", Level = EventLevel.Warning)]
+        [Event(7, Message = "Attempting to activate span: '{0}'", Level = EventLevel.Informational)]
         public void AttemptToActivateActiveSpan(string spanName)
         {
             this.WriteEvent(7, spanName);


Add null check since GetRWorkingDirectoryAsync may return null

--- src/Package/Impl/Repl/Commands/WorkingDirectoryCommand.cs
+++ src/Package/Impl/Repl/Commands/WorkingDirectoryCommand.cs
@@ -46,11 +46,18 @@
         }

         private async void OnCurrentDirectoryChanged(object sender, EventArgs e) {
-            RToolsSettings.Current.WorkingDirectory = await GetRWorkingDirectoryAsync();
+            await FetchRWorkingDirectoryAsync();
         }

         private async void OnSessionConnected(object sender, EventArgs e) {
-            RToolsSettings.Current.WorkingDirectory = await GetRWorkingDirectoryAsync();
+            await FetchRWorkingDirectoryAsync();
+        }
+
+        private async Task FetchRWorkingDirectoryAsync() {
+            string directory = await GetRWorkingDirectoryAsync();
+            if (!string.IsNullOrEmpty(directory)) {
+                RToolsSettings.Current.WorkingDirectory = directory;
+            }
         }

         public override CommandStatus Status(Guid group, int id) {


Fixed Windows compilation error

Fixed Windows compilation error

--- source/FFImageLoading.Forms.WinRT/CachedImageRenderer.cs
+++ source/FFImageLoading.Forms.WinRT/CachedImageRenderer.cs
@@ -416,10 +416,11 @@
 			{
             	if (element != null && !_isDisposed)
 				{
-					var elCtrl = element as Xamarin.Forms.IVisualElementController;
+					var elCtrl = element as Xamarin.Forms.IVisualElementController;
+					element.SetIsLoading(false);
+
 					if (elCtrl != null)
 					{
-						elCtrl.SetIsLoading(false);
 						//elCtrl.NativeSizeChanged();
 						HackInvalidateMeasure(element);
 					}


fixed bug

fixed bug

--- src/SFGameOfLife/OrchestrationActor/OrchestrationActor.cs
+++ src/SFGameOfLife/OrchestrationActor/OrchestrationActor.cs
@@ -25,7 +25,7 @@
     internal class OrchestrationActor : Actor, IOrchestrationActor
     {

-        private List<Cell> cells;
+        private List<Cell> cells = new List<Cell>;

         public Task BigBang()
         {


Adding engines parameter to call.

Adding engines parameter to call.

Sample was ignoring collection passed in previously. Not good as an
example of a testable app class.

--- src/Samples/AspNetMvc/Internationalization/Application.cs
+++ src/Samples/AspNetMvc/Internationalization/Application.cs
@@ -28,7 +28,7 @@
         {
             var services = SparkEngineStarter.CreateContainer();
             services.AddFilter(LanguageDescriptorFilter.For(GetSessionCulture));
-            SparkEngineStarter.RegisterViewEngine(services);
+            SparkEngineStarter.RegisterViewEngine(engines, services);
         }

         public static string GetSessionCulture(ControllerContext controllerContext)


Fixed edit argument

Fixed edit argument

--- src/TentacleGuitar.Server/Controllers/SystemController.cs
+++ src/TentacleGuitar.Server/Controllers/SystemController.cs
@@ -37,7 +37,7 @@

         [HttpGet]
         [AnyRoles("Root")]
-        public IActionResult Edit()
+        public IActionResult Edit(Guid id)
         {
             var music = DB.Musics.Single(x => x.Id == id);
             return View(music);


Add test for maxRecursion on PutMappingDescriptor

--- src/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs
+++ src/Tests/ClientConcepts/HighLevel/Mapping/AutoMap.doc.cs
@@ -7,7 +7,7 @@
 using static Tests.Framework.RoundTripper;

 namespace Tests.ClientConcepts.HighLevel.Mapping
-{
+{
 	/** # Auto mapping properties
 	 *
 	 * When creating a mapping (either when creating an index or via the put mapping API),
@@ -16,14 +16,14 @@
 	 * you're using attributes to map your properties, then calling AutoMap() is required
 	 * in order for your attributes to be applied.  We'll look at examples of both.
 	 *
-	**/
+	**/
 	public class AutoMap
-	{
+	{
 		/**
 		* For these examples, we'll define two POCOS.  A Company, which has a name
 		* and a collection of Employees.  And Employee, which has various properties of
 		* different types, and itself has a collection of Employees.
-		*/
+		*/
 		public class Company
 		{
 			public string Name { get; set; }
@@ -38,16 +38,16 @@
 			public DateTime Birthday { get; set; }
 			public bool IsManager { get; set; }
 			public List<Employee> Employees { get; set; }
-			public TimeSpan Hours { get; set;}
+			public TimeSpan Hours { get; set; }
 		}

 		[U]
 		public void MappingManually()
-		{
+		{
 			/** ## Manual mapping
 			 * To create a mapping for our Company type, we can use the fluent API
 			 * and map each property explicitly
-			 */
+			 */
 			var descriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<Company>(m => m
@@ -72,13 +72,13 @@
 							)
 						)
 					)
-				);
-
+				);
+
 			/**
 			 * Which is all fine and dandy, and useful for some use cases. However in most cases
 			 * this is becomes too cumbersome of an approach, and you simply just want to map *all*
 			 * the properties of your POCO in a single go.
-			 */
+			 */
 			var expected = new
 			{
 				mappings = new
@@ -115,22 +115,22 @@
 				}
 			};

-			Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
+			Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
 		}

 		[U]
 		public void UsingAutoMap()
-		{
+		{
 			/** ## Simple Automapping
 			* This is exactly where `AutoMap()` becomes useful. Instead of manually mapping each property,
 			* explicitly, we can instead call `.AutoMap()` for each of our mappings and let NEST do all the work
-			*/
+			*/
 			var descriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<Company>(m => m.AutoMap())
 					.Map<Employee>(m => m.AutoMap())
-				);
-
+				);
+
 			/**
 			* Observe that NEST has inferred the Elasticsearch types based on the CLR type of our POCO properties.
 			* In this example,
@@ -140,7 +140,7 @@
 			* - Salary as an integer
 			* - Employees as an object
 			* and the remaining string properties as strings.
-			*/
+			*/
 			var expected = new
 			{
 				mappings = new
@@ -168,7 +168,7 @@
 									},
 									hours = new
 									{
-										type = "long"
+										type = "long"
 									},
 									isManager = new
 									{
@@ -229,21 +229,22 @@
 				}
 			};

-			Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
-		}
-
+			Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
+		}
+
 		/** ## Automapping with overrides
 		* In most cases, you'll want to map more than just the vanilla datatypes and also provide
 		* various options on your properties (analyzer, doc_values, etc...).  In that case, it's
 		* possible to use AutoMap() in conjuction with explicitly mapped properties.
-		*/
-		[U] public void OverridingAutoMappedProperties()
-		{
+		*/
+		[U]
+		public void OverridingAutoMappedProperties()
+		{
 			/**
 			* Here we are using AutoMap() to automatically map our company type, but then we're
 			* overriding our employee property and making it a `nested` type, since by default,
 			* AutoMap() will infer objects as `object`.
-			*/
+			*/
 			var descriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<Company>(m => m
@@ -251,8 +252,8 @@
 						.Properties(ps => ps
 							.Nested<Employee>(n => n
 								.Name(c => c.Employees)
-								.Properties(eps => eps
-									// snip
+								.Properties(eps => eps
+								// snip
 								)
 							)
 						)
@@ -274,21 +275,21 @@
 							employees = new
 							{
 								type = "nested",
-								properties = new {}
+								properties = new { }
 							}
 						}
 					}
 				}
 			};

-			Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
-		}
-
+			Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
+		}
+
 		/** ## Automap with attributes
 		 * It is also possible to define your mappings using attributes on your POCOS.  When you
 		 * use attributes, you MUST use AutoMap() in order for the attributes to be applied.
 		 * Here we define the same two types but this time using attributes.
-		 */
+		 */
 		[ElasticsearchType(Name = "company")]
 		public class CompanyWithAttributes
 		{
@@ -467,13 +468,13 @@
 			};

 			Expect(expected).WhenSerializing(descriptor as ICreateIndexRequest);
-		}
-
+		}
+
 		/**
 		 * Just as we were able to override the inferred properties in our earlier example, explicit (manual)
 		 * mappings also take precedence over attributes.  Therefore we can also override any mappings applied
 		 * via any attributes defined on the POCO
-		 */
+		 */
 		[U]
 		public void OverridingAutoMappedAttributes()
 		{
@@ -492,7 +493,7 @@
 						.TtlField(ttl => ttl
 							.Enable()
 							.Default("10m")
-						)
+						)
 						.Properties(ps => ps
 							.String(s => s
 								.Name(e => e.FirstName)
@@ -633,7 +634,7 @@
 				}
 			};

-			Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
+			Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
 		}

 		[ElasticsearchType(Name = "company")]
@@ -699,7 +700,7 @@
 				)
 			);

-			settings.Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
+			settings.Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
 		}

 		/**
@@ -722,14 +723,14 @@

 		[U]
 		public void ControllingRecursionDepth()
-		{
-			/** By default, AutoMap() only goes as far as depth 1 */
+		{
+			/** By default, AutoMap() only goes as far as depth 1 */
 			var descriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<A>(m => m.AutoMap())
-				);
-
-			/** Thus we do not map properties on the second occurrence of our Child property */
+				);
+
+			/** Thus we do not map properties on the second occurrence of our Child property */
 			var expected = new
 			{
 				mappings = new
@@ -748,15 +749,15 @@
 				}
 			};

-			Expect(expected).WhenSerializing((ICreateIndexRequest) descriptor);
-
-			/** Now lets specify a maxRecursion of 3 */
+			Expect(expected).WhenSerializing((ICreateIndexRequest)descriptor);
+
+			/** Now lets specify a maxRecursion of 3 */
 			var withMaxRecursionDescriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<A>(m => m.AutoMap(3))
-				);
-
-			/** AutoMap() has now mapped three levels of our Child property */
+				);
+
+			/** AutoMap() has now mapped three levels of our Child property */
 			var expectedWithMaxRecursion = new
 			{
 				mappings = new
@@ -796,9 +797,68 @@
 				}
 			};

-			Expect(expectedWithMaxRecursion).WhenSerializing((ICreateIndexRequest) withMaxRecursionDescriptor);
-		}
-
+			Expect(expectedWithMaxRecursion).WhenSerializing((ICreateIndexRequest)withMaxRecursionDescriptor);
+		}
+
+		[U]
+		//hide
+		public void PutMappingAlsoAdheresToMaxRecursion()
+		{
+			var descriptor = new PutMappingDescriptor<A>().AutoMap();
+
+			var expected = new
+			{
+				properties = new
+				{
+					child = new
+					{
+						properties = new { },
+						type = "object"
+					}
+				}
+			};
+
+			Expect(expected).WhenSerializing((IPutMappingRequest)descriptor);
+
+			var withMaxRecursionDescriptor = new PutMappingDescriptor<A>().AutoMap(3);
+
+			var expectedWithMaxRecursion = new
+			{
+				properties = new
+				{
+					child = new
+					{
+						type = "object",
+						properties = new
+						{
+							child = new
+							{
+								type = "object",
+								properties = new
+								{
+									child = new
+									{
+										type = "object",
+										properties = new
+										{
+											child = new
+											{
+												type = "object",
+												properties = new { }
+											}
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+			};
+
+			Expect(expectedWithMaxRecursion).WhenSerializing((IPutMappingRequest)withMaxRecursionDescriptor);
+		}
+		//endhide
+
 		/** # Applying conventions through the Visitor pattern
 		 * It is also possible to apply a transformation on all or specific properties.
 		 *
@@ -807,35 +867,35 @@
 		 *
 		 * For instance, lets create a custom visitor that disables doc values for numeric and boolean types.
 		 * (Not really a good idea in practice, but let's do it anyway for the sake of a clear example.)
-		 */
+		 */
 		public class DisableDocValuesPropertyVisitor : NoopPropertyVisitor
-		{
-			/** Override the Visit method on INumberProperty and set DocValues = false */
+		{
+			/** Override the Visit method on INumberProperty and set DocValues = false */
 			public override void Visit(INumberProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute)
+			{
+				type.DocValues = false;
+			}
+
+			/** Similarily, override the Visit method on IBooleanProperty and set DocValues = false */
+			public override void Visit(IBooleanProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute)
 			{
 				type.DocValues = false;
 			}
-
-			/** Similarily, override the Visit method on IBooleanProperty and set DocValues = false */
-			public override void Visit(IBooleanProperty type, PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute)
-			{
-				type.DocValues = false;
-			}
 		}

 		[U]
 		public void UsingACustomPropertyVisitor()
-		{
-			/** Now we can pass an instance of our custom visitor to AutoMap() */
+		{
+			/** Now we can pass an instance of our custom visitor to AutoMap() */
 			var descriptor = new CreateIndexDescriptor("myindex")
 				.Mappings(ms => ms
 					.Map<Employee>(m => m.AutoMap(new DisableDocValuesPropertyVisitor()))
-				);
-
+				);
+
 			/** and anytime it maps a property as a number (INumberProperty) or boolean (IBooleanProperty)
 			 * it will apply the transformation defined in each Visit() respectively, which in this example
 			 * disables doc values.
-			 */
+			 */
 			var expected = new
 			{
 				mappings = new
@@ -875,12 +935,12 @@
 					}
 				}
 			};
-		}
-
+		}
+
 		/** You can even take the visitor approach a step further, and instead of visiting on IProperty types, visit
 		 * directly on your POCO properties (PropertyInfo).  For example, lets create a visitor that maps all CLR types
 		 * to an Elasticsearch string (IStringProperty).
-		 */
+		 */
 		public class EverythingIsAStringPropertyVisitor : NoopPropertyVisitor
 		{
 			public override IProperty Visit(PropertyInfo propertyInfo, ElasticsearchPropertyAttributeBase attribute) => new StringProperty();


Added stubs for all load raw link functions, put responses in using blocks.

--- src/Threax.AspNetCore.Halcyon.Client/HalEndpointClient.cs
+++ src/Threax.AspNetCore.Halcyon.Client/HalEndpointClient.cs
@@ -135,6 +135,36 @@
             throw new InvalidOperationException($"Cannot find a link named {rel}.");
         }

+        public Task<HttpResponseMessage> LoadRawLink(string rel)
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<HttpResponseMessage> LoadRawLinkWithQuery<QueryType>(string rel, QueryType query)
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<HttpResponseMessage> LoadRawLinkWithBody<BodyType>(string rel, BodyType data)
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<HttpResponseMessage> LoadRawLinkWithQueryAndBody<QueryType, BodyType>(string rel, QueryType query, BodyType data)
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<HttpResponseMessage> LoadRawLinkWithForm<FormType>(string rel, FormType data)
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<HttpResponseMessage> LoadRawLinkWithQueryAndForm<QueryType, FormType>(string rel, QueryType query, FormType data)
+        {
+            throw new NotImplementedException();
+        }
+
         public bool HasEmbed(String name)
         {
             if(embeds == null)
@@ -211,15 +241,12 @@
                         request.Content = new StringContent(JsonConvert.SerializeObject(data));
                     }

-                    var response = await client.SendAsync(request);
-                    await HandleResponse(response);
-                }
-            }
-        }
-
-        public Task<HttpResponseMessage> LoadRawLink(string rel)
-        {
-            throw new NotImplementedException();
+                    using (var response = await client.SendAsync(request))
+                    {
+                        await HandleResponse(response);
+                    }
+                }
+            }
         }

         private async Task LoadWithForm(Object data, Object query)
@@ -246,8 +273,10 @@
                             request.Content = form;
                         }

-                        var response = await client.SendAsync(request);
-                        await HandleResponse(response);
+                        using (var response = await client.SendAsync(request))
+                        {
+                            await HandleResponse(response);
+                        }
                     }
                 }
             }


Fix typo

Fix typo

--- src/Utilities/Compiler/Extensions/IOperationExtensions.cs
+++ src/Utilities/Compiler/Extensions/IOperationExtensions.cs
@@ -464,7 +464,7 @@
                     return null;

                 default:
-                    // Attribute blocks have OperationKind.None (prior to IAttributeOperationSupport) or
+                    // Attribute blocks have OperationKind.None (prior to IAttributeOperation support) or
                     // OperationKind.Attribute, but we do not support flow analysis for attributes.
                     // Gracefully return null for this case and fire an assert for any other OperationKind.
                     Debug.Assert(operation.Kind is OperationKind.None or OperationKindEx.Attribute, $"Unexpected root operation kind: {operation.Kind}");


Gestione Emergenza - Tolto doppione dall'oggetto Emergenza

--- src/backend/SO115App.Models/Classi/Emergenza/Emergenza.cs
+++ src/backend/SO115App.Models/Classi/Emergenza/Emergenza.cs
@@ -26,14 +26,6 @@
         public string PresaInCarico { get; set; }
         public bool Annullata { get; set; }

-        public IReadOnlyList<Evento> Eventi
-        {
-            get
-            {
-                return this._eventi;
-            }
-        }
-
         public void AddEvento(Evento evento)
         {
             this._eventi.Add(evento);


Fix naming bug

Fix naming bug

--- cli/src/MsgPack/Serialization/NLiblet.Reflection/GenericTypeExtensions.cs
+++ cli/src/MsgPack/Serialization/NLiblet.Reflection/GenericTypeExtensions.cs
@@ -281,6 +281,26 @@
 		public static string GetFullName( this Type source )
 		{
 			Contract.Assert( source != null );
+
+			// TODO: NLiblet
+			if ( source.IsArray )
+			{
+				var elementType = source.GetElementType();
+				if ( !elementType.IsGenericType )
+				{
+					return source.FullName;
+				}
+
+				if ( 1 < source.GetArrayRank() )
+				{
+					return elementType.GetFullName() + "[*]";
+				}
+				else
+				{
+					return elementType.GetFullName() + "[]";
+				}
+			}
+
 			if ( !source.IsGenericType )
 			{
 				return source.FullName;


Fix registry path for ETW argument lookup. (#16347)

--- src/mscorlib/shared/System/Diagnostics/Tracing/EventProvider.cs
+++ src/mscorlib/shared/System/Diagnostics/Tracing/EventProvider.cs
@@ -561,7 +561,7 @@
             if (filterData == null)
             {
 #if (!ES_BUILD_PCL && !ES_BUILD_PN && PLATFORM_WINDOWS)
-                string regKey = @"\Microsoft\Windows\CurrentVersion\Winevt\Publishers\{" + m_providerName + "}";
+                string regKey = @"\Microsoft\Windows\CurrentVersion\Winevt\Publishers\{" + m_providerId + "}";
                 if (System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr)) == 8)
                     regKey = @"HKEY_LOCAL_MACHINE\Software" + @"\Wow6432Node" + regKey;
                 else


Rename method

Rename method

--- AudioPlayer.cs
+++ AudioPlayer.cs
@@ -90,7 +90,7 @@

         private void Start() {
             if (PlayOnStart) {
-                PlayRandomSound();
+                PlayRandomClip();
             }
         }

@@ -113,7 +113,7 @@
         #endregion EVENT HANDLERS

         #region METHODS
-        public void PlayRandomSound() {
+        public void PlayRandomClip() {
             // Number of referenced AudioSource components.
             var audioSourceCount = AudioSources.Length;


Fix a build error of UnityPackage

Fix a build error of UnityPackage

--- core/UnityPackage/Assets/Middlewares/EntityNetwork/ClientEntityFactory.cs
+++ core/UnityPackage/Assets/Middlewares/EntityNetwork/ClientEntityFactory.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Concurrent;
 using EntityNetwork;
 using EntityNetwork.Unity3D;
 using UnityEngine;
@@ -14,10 +15,43 @@

     public Transform RootTransform { get; set; }

-    IClientEntity IClientEntityFactory.Create(Type protoTypeType)
+    private readonly ConcurrentDictionary<Type, Type> _clientEntityToProtoTypeMap =
+        new ConcurrentDictionary<Type, Type>();
+
+    Type IClientEntityFactory.GetProtoType(Type entityType)
     {
-        var resource = Resources.Load("Client" + protoTypeType.Name.Substring(1));
+        return _clientEntityToProtoTypeMap.GetOrAdd(entityType, t =>
+        {
+            var type = entityType;
+            while (type != null && type != typeof(object))
+            {
+                if (type.Name.EndsWith("ClientBase"))
+                {
+                    var typePrefix = type.Namespace.Length > 0 ? type.Namespace + "." : "";
+                    var protoType = type.Assembly.GetType(typePrefix + "I" +
+                                                          type.Name.Substring(0, type.Name.Length - 10));
+                    if (protoType != null && typeof(IEntityPrototype).IsAssignableFrom(protoType))
+                    {
+                        return protoType;
+                    }
+                }
+                type = type.BaseType;
+            }
+            return null;
+        });
+    }
+
+    IClientEntity IClientEntityFactory.Create(Type protoType)
+    {
+        var resourceName = "Client" + protoType.Name.Substring(1);
+        var resource = Resources.Load(resourceName);
+        if (resource == null)
+            throw new InvalidOperationException("Failed to load resource(" + resourceName + ")");
+
         var go = (GameObject)GameObject.Instantiate(resource);
+        if (go == null)
+            throw new InvalidOperationException("Failed to instantiate resource(" + resourceName + ")");
+
         if (RootTransform != null)
             go.transform.SetParent(RootTransform, false);


tests to allow empty grant types collection

--- test/IdentityServer.UnitTests/Validation/GrantTypesValidation.cs
+++ test/IdentityServer.UnitTests/Validation/GrantTypesValidation.cs
@@ -6,12 +6,21 @@
 using IdentityServer4.Models;
 using System;
 using Xunit;
+using System.Collections.Generic;

 namespace IdentityServer4.UnitTests.Validation
 {
     public class GrantTypesValidation
     {
         const string Category = "Grant Types Validation";
+
+        [Fact]
+        [Trait("Category", Category)]
+        public void empty_should_be_allowed()
+        {
+            var client = new Client();
+            client.AllowedGrantTypes = new List<string>();
+        }

         [Fact]
         [Trait("Category", Category)]
@@ -76,13 +85,13 @@
         }

         [Fact]
-        public void empty_grant_type_list_should_throw_single()
+        public void null_grant_type_list_should_throw_single()
         {
             var client = new Client();

-            Action act = () => client.AllowedGrantTypes = new string[] { };
+            Action act = () => client.AllowedGrantTypes = null;

-            act.ShouldThrow<InvalidOperationException>();
+            act.ShouldThrow<ArgumentNullException>();
         }

         [Fact]


Reacting to ResponseCookie Delete changes (#1362)

https://github.com/aspnet/HttpAbstractions/commit/594f55947f4c1d0a9d3122e3f39bcfa81199b12a

--- test/Microsoft.AspNetCore.CookiePolicy.Test/CookiePolicyTests.cs
+++ test/Microsoft.AspNetCore.CookiePolicy.Test/CookiePolicyTests.cs
@@ -273,7 +273,7 @@

             Assert.NotNull(transaction.SetCookie);
             Assert.Equal(1, transaction.SetCookie.Count);
-            Assert.Equal("A=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax", transaction.SetCookie[0]);
+            Assert.Equal("A=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure; samesite=lax", transaction.SetCookie[0]);
         }

         [Fact]


Updated testing 'upgrade data' code at TestAny to near final implementation to upgrade offset/timezone information at CalendarEvents start/end/recurrenceId #651

--- web/Tests/TestAny.cshtml
+++ web/Tests/TestAny.cshtml
@@ -10,17 +10,27 @@
     try {

         using (var db = new LcDatabase()) {
-            data = db.Query("SELECT id, startTime, endTime, utcStartTime, utcEndTime FROM CalendarEvents");
-            foreach(var r in data) {
-                var s = new DateTimeOffset((r.startTime as DateTime?).Value).ToLocalTime();
-                var e = new DateTimeOffset((r.endTime as DateTime?).Value).ToLocalTime();
-                    //(r.endTime as DateTime?).Value.ToUniversalTime();
-                db.Query("UPDATE CalendarEvents SET utcStartTime=@0, utcEndTime=@1, timezone='America/Los_Angeles' WHERE Id=@2", s, e, r.id);
+            data = db.Query("SELECT id, startTime, endTime, recurrenceId FROM CalendarEvents");
+            // To update the data AFTER being upgraded from a datetime column type to a datetimeoffset(0),
+            // we read the data (that just get added a zero offset automatically --no conversions done by the server)
+            // and since that data (that looks like UTC because of the auto offset) were actually times in the server
+            // timezone (PST), we read the DateTime value, we use that value to create a new DateTimeOffset without setting
+            // the offset, so will be empty, and we convert that into local, so offset will get added acorded to
+            // machinage time zone and DST rules. Then we use that to update the value on the server
+            // and will get the correct offset.
+            // The process is safe against running this twice (or more) hover the same data, while no actual incoming data
+            // in other time zones is added to database (just protects from problems on the upgrade process, but cannot be used
+            // later to don't replace valid data).
+            foreach (var r in data)
+            {
+                var s = new DateTimeOffset((r.startTime as DateTimeOffset?).Value.DateTime).ToLocalTime();
+                var e = new DateTimeOffset((r.endTime as DateTimeOffset?).Value.DateTime).ToLocalTime();
+                var raw_rid = (r.recurrenceId as DateTimeOffset?);
+                var rid = raw_rid.HasValue ? new DateTimeOffset(raw_rid.Value.DateTime).ToLocalTime() : (DateTimeOffset?)null;
+                db.Query("UPDATE CalendarEvents SET startTime=@0, endTime=@1, recurrenceId=@3, timezone='America/Los_Angeles' WHERE Id=@2", s, e, r.id, rid);
             }
-
             data = null;
         }
-
     }
     catch (Exception ex) {
         data = ex;


Fix StackOverflowException in DotvvmPropertyDictionary.Count

--- src/DotVVM.Framework/Controls/DotvvmControlProperties.cs
+++ src/DotVVM.Framework/Controls/DotvvmControlProperties.cs
@@ -265,7 +265,7 @@
         public ICollection<object?> Values => throw new NotImplementedException();

         public int Count => throw new NotImplementedException("Count cannot be implemented effectively, please use Enumerable.Count method to explicitly express willingness to use O(n) time to get a count.");
-        int ICollection<KeyValuePair<DotvvmProperty, object?>>.Count => this.Count();
+        int ICollection<KeyValuePair<DotvvmProperty, object?>>.Count => control.properties.Count();

         public bool IsReadOnly => false;


Avoid reentrancy in ConditionalWeakTable

Fixes #28256

--- src/EditorFeatures/Text/Extensions.SnapshotSourceText.cs
+++ src/EditorFeatures/Text/Extensions.SnapshotSourceText.cs
@@ -34,11 +34,6 @@
             private readonly Encoding _encodingOpt;
             private readonly TextBufferContainer _containerOpt;

-            private SnapshotSourceText(ITextBufferCloneService textBufferCloneServiceOpt, ITextSnapshot editorSnapshot) :
-                this(textBufferCloneServiceOpt, editorSnapshot, TextBufferContainer.From(editorSnapshot.TextBuffer))
-            {
-            }
-
             private SnapshotSourceText(ITextBufferCloneService textBufferCloneServiceOpt, ITextSnapshot editorSnapshot, TextBufferContainer container)
             {
                 Contract.ThrowIfNull(editorSnapshot);
@@ -79,9 +74,13 @@

                 if (!s_textSnapshotMap.TryGetValue(editorSnapshot, out var snapshot))
                 {
+                    // Explicitly obtain the TextBufferContainer before calling GetValue to avoid reentrancy in
+                    // ConditionalWeakTable. https://github.com/dotnet/roslyn/issues/28256
+                    var container = TextBufferContainer.From(editorSnapshot.TextBuffer);
+
                     // Avoid capturing `textBufferCloneServiceOpt` on the fast path
                     var tempTextBufferCloneServiceOpt = textBufferCloneServiceOpt;
-                    snapshot = s_textSnapshotMap.GetValue(editorSnapshot, s => new SnapshotSourceText(tempTextBufferCloneServiceOpt, s));
+                    snapshot = s_textSnapshotMap.GetValue(editorSnapshot, s => new SnapshotSourceText(tempTextBufferCloneServiceOpt, s, container));
                 }

                 return snapshot;


removing not needed conversions

removing not needed conversions

--- src/FastExpressionCompiler.LightExpression/Expression.cs
+++ src/FastExpressionCompiler.LightExpression/Expression.cs
@@ -962,19 +962,19 @@
             new SimpleBinaryExpression(ExpressionType.NotEqual, left, right, typeof(bool));

         public static BlockExpression Block(params Expression[] expressions) =>
-            new BlockExpression(expressions.AsReadOnlyList());
+            new BlockExpression(expressions);

         public static BlockExpression Block(IReadOnlyList<Expression> expressions) =>
-            new BlockExpression(expressions.AsReadOnlyList());
+            new BlockExpression(expressions);

         public static BlockExpression Block(IEnumerable<ParameterExpression> variables, params Expression[] expressions) =>
-            new ManyVariablesBlockExpression(variables.AsReadOnlyList(), expressions.AsReadOnlyList());
+            new ManyVariablesBlockExpression(variables.AsReadOnlyList(), expressions);

         public static BlockExpression Block(IReadOnlyList<ParameterExpression> variables, IReadOnlyList<Expression> expressions) =>
             new ManyVariablesBlockExpression(variables, expressions);

         public static BlockExpression Block(Type type, IEnumerable<ParameterExpression> variables, params Expression[] expressions) =>
-            new TypedManyVariablesBlockExpression(type, variables.AsReadOnlyList(), expressions.AsReadOnlyList());
+            new TypedManyVariablesBlockExpression(type, variables.AsReadOnlyList(), expressions);

         public static BlockExpression Block(Type type, IEnumerable<ParameterExpression> variables, IEnumerable<Expression> expressions) =>
             new TypedManyVariablesBlockExpression(type, variables.AsReadOnlyList(), expressions.AsReadOnlyList());


fixed arrayaccess index c# output

fixed arrayaccess index c# output

--- src/FastExpressionCompiler.LightExpression/Expression.cs
+++ src/FastExpressionCompiler.LightExpression/Expression.cs
@@ -3338,8 +3338,9 @@
             else
                 sb.Append('.').Append(Indexer.Name).Append('(');

-           for (var i = 0; i < Arguments.Count; i++)
-                (i > 0 ? sb.Append(", ") : sb).NewLineIdentCs(Arguments[i], lineIdent, stripNamespace, printType, identSpaces);
+            for (var i = 0; i < Arguments.Count; i++)
+                Arguments[i].ToCSharpString(i > 0 ? sb.Append(", ") : sb,
+                    lineIdent + identSpaces, stripNamespace, printType, identSpaces);

             if (isStandardIndexer)
                 sb.Append(']');