Hide voting deadline datepicker when disabling voting on edit.

--- src/CompetitionPlatform/Views/Project/EditProject.cshtml
+++ src/CompetitionPlatform/Views/Project/EditProject.cshtml
@@ -179,14 +179,14 @@

-                                            <input asp-for="VotingDeadline" class="form-control datetimepicker" />
+                                            <input id="votingDeadlineDatepicker" asp-for="VotingDeadline" class="form-control datetimepicker" />

                                     Project Creator should select the best quality project solutions by his own or organize voting process.

-
+


Use ArrayBuilder instead of Stack.

Use ArrayBuilder instead of Stack.

--- src/Compilers/CSharp/Portable/Syntax/SyntaxExtensions.cs
+++ src/Compilers/CSharp/Portable/Syntax/SyntaxExtensions.cs
@@ -9,6 +9,7 @@
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
 using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Microsoft.CodeAnalysis.PooledObjects;
 using Roslyn.Utilities;

 namespace Microsoft.CodeAnalysis.CSharp
@@ -401,7 +402,7 @@
         internal static void VisitRankSpecifiers<TArg>(this TypeSyntax type, Action<ArrayRankSpecifierSyntax, TArg> action, in TArg argument)
         {
             // Use a manual stack here to avoid deeply nested recursion which can blow the real stack
-            var stack = new Stack<ArrayRankSpecifierOrTypeSyntax>();
+            var stack = ArrayBuilder<ArrayRankSpecifierOrTypeSyntax>.GetInstance();
             stack.Push(new ArrayRankSpecifierOrTypeSyntax(type));

             while (stack.Count > 0)
@@ -479,6 +480,7 @@
                 }
             }

+            stack.Free();
         }

         private struct ArrayRankSpecifierOrTypeSyntax


Add comments explaining pathToTool and logging

--- src/Compilers/Core/MSBuildTask/Shared/ManagedCompiler.cs
+++ src/Compilers/Core/MSBuildTask/Shared/ManagedCompiler.cs
@@ -372,9 +372,15 @@
                     CompilerServerLogger.Log($"CommandLine = '{commandLineCommands}'");
                     CompilerServerLogger.Log($"BuildResponseFile = '{responseFileCommands}'");

+                    // Try to get the location of the user-provided build client and server,
+                    // which should be located next to the build task. If not, fall back to
+                    // "pathToTool", which is the compiler in the MSBuild default bin directory.
                     var clientDir = TryGetClientDir() ?? Path.GetDirectoryName(pathToTool);
                     pathToTool = Path.Combine(clientDir, ToolExe);

+                    // Note: we can't change the "tool path" printed to the console when we run
+                    // the Csc/Vbc task since MSBuild logs it for us before we get here. Instead,
+                    // we'll just print our own message that contains the real client location
                     Log.LogMessage(ErrorString.UsingSharedCompilation, clientDir);

                     var buildPaths = new BuildPaths(


revise user

revise user

--- src/Core/Services/Implementations/OrganizationService.cs
+++ src/Core/Services/Implementations/OrganizationService.cs
@@ -949,6 +949,7 @@
             {
                 user.Premium = true;
                 user.MaxStorageGb = 10240; // 10 TB
+                user.RevisionDate = DateTime.UtcNow;
                 await _userRepository.ReplaceAsync(user);
             }


Update PdfSharpRenderer.cs

Update PdfSharpRenderer.cs

--- src/Core2D/Modules/Renderer/PdfSharp/PdfSharpRenderer.cs
+++ src/Core2D/Modules/Renderer/PdfSharp/PdfSharpRenderer.cs
@@ -15,17 +15,17 @@

 public partial class PdfSharpRenderer : ViewModelBase, IShapeRenderer
 {
-    private ICache<string, XImage> _biCache;
+    private readonly ICache<string, XImage>? _biCache;
     private Func<double, double> _scaleToPage;
-    private double _sourceDpi = 96.0;
-    private double _targetDpi = 72.0;
-
-    [AutoNotify] private ShapeRendererStateViewModel _state;
+    private readonly double _sourceDpi = 96.0;
+    private readonly double _targetDpi = 72.0;
+
+    [AutoNotify] private ShapeRendererStateViewModel? _state;

     public PdfSharpRenderer(IServiceProvider? serviceProvider) : base(serviceProvider)
     {
-        _state = serviceProvider.GetService<IViewModelFactory>().CreateShapeRendererState();
-        _biCache = serviceProvider.GetService<IViewModelFactory>().CreateCache<string, XImage>(bi => bi.Dispose());
+        _state = serviceProvider.GetService<IViewModelFactory>()?.CreateShapeRendererState();
+        _biCache = serviceProvider.GetService<IViewModelFactory>()?.CreateCache<string, XImage>(bi => bi.Dispose());
         _scaleToPage = (value) => (float)(value * 1.0);
     }

@@ -223,14 +223,14 @@

     private void DrawGridInternal(XGraphics gfx, IGrid grid, XPen stroke, ref Spatial.Rect2 rect)
     {
-        double ox = rect.X;
-        double ex = rect.X + rect.Width;
-        double oy = rect.Y;
-        double ey = rect.Y + rect.Height;
-        double cw = grid.GridCellWidth;
-        double ch = grid.GridCellHeight;
-
-        for (double x = ox + cw; x < ex; x += cw)
+        var ox = rect.X;
+        var ex = rect.X + rect.Width;
+        var oy = rect.Y;
+        var ey = rect.Y + rect.Height;
+        var cw = grid.GridCellWidth;
+        var ch = grid.GridCellHeight;
+
+        for (var x = ox + cw; x < ex; x += cw)
         {
             var p0 = new XPoint(
                 _scaleToPage(x),
@@ -241,7 +241,7 @@
             DrawLineInternal(gfx, stroke, true, ref p0, ref p1);
         }

-        for (double y = oy + ch; y < ey; y += ch)
+        for (var y = oy + ch; y < ey; y += ch)
         {
             var p0 = new XPoint(
                 _scaleToPage(ox),
@@ -258,10 +258,14 @@
         _biCache.Reset();
     }

-    public void Fill(object dc, double x, double y, double width, double height, BaseColorViewModel colorViewModel)
-    {
-        var _gfx = dc as XGraphics;
-        _gfx.DrawRectangle(
+    public void Fill(object? dc, double x, double y, double width, double height, BaseColorViewModel? colorViewModel)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }
+
+        gfx.DrawRectangle(
             ToXBrush(colorViewModel),
             _scaleToPage(x),
             _scaleToPage(y),
@@ -269,9 +273,12 @@
             _scaleToPage(height));
     }

-    public void Grid(object dc, IGrid grid, double x, double y, double width, double height)
-    {
-        var _gfx = dc as XGraphics;
+    public void Grid(object? dc, IGrid grid, double x, double y, double width, double height)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var strokeLine = ToXPen(grid.GridStrokeColor, grid.GridStrokeThickness, _scaleToPage, _sourceDpi, _targetDpi);

@@ -285,7 +292,7 @@
         if (grid.IsGridEnabled)
         {
             DrawGridInternal(
-                _gfx,
+                gfx,
                 grid,
                 ToXPen(grid.GridStrokeColor, grid.GridStrokeThickness, _scaleToPage, _sourceDpi, _targetDpi),
                 ref rect);
@@ -293,7 +300,7 @@

         if (grid.IsBorderEnabled)
         {
-            _gfx.DrawRectangle(
+            gfx.DrawRectangle(
                 ToXPen(grid.GridStrokeColor, grid.GridStrokeThickness, _scaleToPage, _sourceDpi, _targetDpi),
                 _scaleToPage(rect.X),
                 _scaleToPage(rect.Y),
@@ -302,28 +309,34 @@
         }
     }

-    public void DrawPoint(object dc, PointShapeViewModel point, ShapeStyleViewModel style)
+    public void DrawPoint(object? dc, PointShapeViewModel point, ShapeStyleViewModel? style)
     {
         // TODO:
     }

-    public void DrawLine(object dc, LineShapeViewModel line, ShapeStyleViewModel style)
-    {
+    public void DrawLine(object? dc, LineShapeViewModel line, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }
+
         if (!line.IsStroked)
         {
             return;
         }

-        var _gfx = dc as XGraphics;
-
         var strokeLine = ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi);
-        DrawLineArrowsInternal(_gfx, line, style, out var pt1, out var pt2);
-        DrawLineInternal(_gfx, strokeLine, line.IsStroked, ref pt1, ref pt2);
-    }
-
-    public void DrawRectangle(object dc, RectangleShapeViewModel rectangle, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+        DrawLineArrowsInternal(gfx, line, style, out var pt1, out var pt2);
+        DrawLineInternal(gfx, strokeLine, line.IsStroked, ref pt1, ref pt2);
+    }
+
+    public void DrawRectangle(object? dc, RectangleShapeViewModel rectangle, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var rect = Spatial.Rect2.FromPoints(
             rectangle.TopLeft.X,
@@ -334,7 +347,7 @@

         if (rectangle.IsStroked && rectangle.IsFilled)
         {
-            _gfx.DrawRectangle(
+            gfx.DrawRectangle(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 ToXBrush(style.Fill.Color),
                 _scaleToPage(rect.X),
@@ -344,7 +357,7 @@
         }
         else if (rectangle.IsStroked && !rectangle.IsFilled)
         {
-            _gfx.DrawRectangle(
+            gfx.DrawRectangle(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 _scaleToPage(rect.X),
                 _scaleToPage(rect.Y),
@@ -353,7 +366,7 @@
         }
         else if (!rectangle.IsStroked && rectangle.IsFilled)
         {
-            _gfx.DrawRectangle(
+            gfx.DrawRectangle(
                 ToXBrush(style.Fill.Color),
                 _scaleToPage(rect.X),
                 _scaleToPage(rect.Y),
@@ -362,9 +375,12 @@
         }
     }

-    public void DrawEllipse(object dc, EllipseShapeViewModel ellipse, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawEllipse(object? dc, EllipseShapeViewModel ellipse, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var rect = Spatial.Rect2.FromPoints(
             ellipse.TopLeft.X,
@@ -375,7 +391,7 @@

         if (ellipse.IsStroked && ellipse.IsFilled)
         {
-            _gfx.DrawEllipse(
+            gfx.DrawEllipse(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 ToXBrush(style.Fill.Color),
                 _scaleToPage(rect.X),
@@ -385,7 +401,7 @@
         }
         else if (ellipse.IsStroked && !ellipse.IsFilled)
         {
-            _gfx.DrawEllipse(
+            gfx.DrawEllipse(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 _scaleToPage(rect.X),
                 _scaleToPage(rect.Y),
@@ -394,7 +410,7 @@
         }
         else if (!ellipse.IsStroked && ellipse.IsFilled)
         {
-            _gfx.DrawEllipse(
+            gfx.DrawEllipse(
                 ToXBrush(style.Fill.Color),
                 _scaleToPage(rect.X),
                 _scaleToPage(rect.Y),
@@ -403,9 +419,12 @@
         }
     }

-    public void DrawArc(object dc, ArcShapeViewModel arc, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawArc(object? dc, ArcShapeViewModel arc, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var a = new Spatial.Arc.GdiArc(
             Spatial.Point2.FromXY(arc.Point1.X, arc.Point1.Y),
@@ -427,14 +446,14 @@

             if (arc.IsStroked)
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     ToXBrush(style.Fill.Color),
                     path);
             }
             else
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXBrush(style.Fill.Color),
                     path);
             }
@@ -443,7 +462,7 @@
         {
             if (arc.IsStroked)
             {
-                _gfx.DrawArc(
+                gfx.DrawArc(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     _scaleToPage(a.X),
                     _scaleToPage(a.Y),
@@ -455,9 +474,12 @@
         }
     }

-    public void DrawCubicBezier(object dc, CubicBezierShapeViewModel cubicBezier, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawCubicBezier(object? dc, CubicBezierShapeViewModel cubicBezier, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         if (cubicBezier.IsFilled)
         {
@@ -474,14 +496,14 @@

             if (cubicBezier.IsStroked)
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     ToXBrush(style.Fill.Color),
                     path);
             }
             else
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXBrush(style.Fill.Color),
                     path);
             }
@@ -490,7 +512,7 @@
         {
             if (cubicBezier.IsStroked)
             {
-                _gfx.DrawBezier(
+                gfx.DrawBezier(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     _scaleToPage(cubicBezier.Point1.X),
                     _scaleToPage(cubicBezier.Point1.Y),
@@ -504,9 +526,12 @@
         }
     }

-    public void DrawQuadraticBezier(object dc, QuadraticBezierShapeViewModel quadraticBezier, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawQuadraticBezier(object? dc, QuadraticBezierShapeViewModel quadraticBezier, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         double x1 = quadraticBezier.Point1.X;
         double y1 = quadraticBezier.Point1.Y;
@@ -532,14 +557,14 @@

             if (quadraticBezier.IsStroked)
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     ToXBrush(style.Fill.Color),
                     path);
             }
             else
             {
-                _gfx.DrawPath(
+                gfx.DrawPath(
                     ToXBrush(style.Fill.Color),
                     path);
             }
@@ -548,7 +573,7 @@
         {
             if (quadraticBezier.IsStroked)
             {
-                _gfx.DrawBezier(
+                gfx.DrawBezier(
                     ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                     _scaleToPage(x1),
                     _scaleToPage(y1),
@@ -562,9 +587,12 @@
         }
     }

-    public void DrawText(object dc, TextShapeViewModel text, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawText(object? dc, TextShapeViewModel text, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         if (!(text.GetProperty(nameof(TextShapeViewModel.Text)) is string tbind))
         {
@@ -640,7 +668,7 @@
                 break;
         }

-        _gfx.DrawString(
+        gfx.DrawString(
             tbind,
             font,
             ToXBrush(style.Stroke.Color),
@@ -648,9 +676,12 @@
             format);
     }

-    public void DrawImage(object dc, ImageShapeViewModel image, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawImage(object? dc, ImageShapeViewModel image, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var rect = Spatial.Rect2.FromPoints(
             image.TopLeft.X,
@@ -668,7 +699,7 @@
         if (image.IsStroked || image.IsFilled)
         {
             DrawRectangleInternal(
-                _gfx,
+                gfx,
                 ToXBrush(style.Fill.Color),
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 image.IsStroked,
@@ -679,7 +710,7 @@
         var imageCached = _biCache.Get(image.Key);
         if (imageCached is { })
         {
-            _gfx.DrawImage(imageCached, srect);
+            gfx.DrawImage(imageCached, srect);
         }
         else
         {
@@ -694,34 +725,37 @@

                     _biCache.Set(image.Key, bi);

-                    _gfx.DrawImage(bi, srect);
+                    gfx.DrawImage(bi, srect);
                 }
             }
         }
     }

-    public void DrawPath(object dc, PathShapeViewModel path, ShapeStyleViewModel style)
-    {
-        var _gfx = dc as XGraphics;
+    public void DrawPath(object? dc, PathShapeViewModel path, ShapeStyleViewModel? style)
+    {
+        if (dc is not XGraphics gfx)
+        {
+            return;
+        }

         var gp = path.ToXGraphicsPath(_scaleToPage);

         if (path.IsFilled && path.IsStroked)
         {
-            _gfx.DrawPath(
+            gfx.DrawPath(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 ToXBrush(style.Fill.Color),
                 gp);
         }
         else if (path.IsFilled && !path.IsStroked)
         {
-            _gfx.DrawPath(
+            gfx.DrawPath(
                 ToXBrush(style.Fill.Color),
                 gp);
         }
         else if (!path.IsFilled && path.IsStroked)
         {
-            _gfx.DrawPath(
+            gfx.DrawPath(
                 ToXPen(style, _scaleToPage, _sourceDpi, _targetDpi),
                 gp);
         }


Strip RTP header during read

Strip RTP header during read

--- src/Discord.Net.WebSocket/Audio/Streams/RTPReadStream.cs
+++ src/Discord.Net.WebSocket/Audio/Streams/RTPReadStream.cs
@@ -1,5 +1,4 @@
-using System;
-using System.IO;
+using System.IO;
 using System.Threading;
 using System.Threading.Tasks;

@@ -33,9 +32,6 @@
             if (buffer[offset + 0] != 0x80 || buffer[offset + 1] != 0x78)
                 return;

-            var payload = new byte[count - 12];
-            Buffer.BlockCopy(buffer, offset + 12, payload, 0, count - 12);
-
             ushort seq =  (ushort)((buffer[offset + 2] << 8) |
                 (buffer[offset + 3] << 0));

@@ -45,7 +41,7 @@
                 (buffer[offset + 7] << 0));

             _queue.WriteHeader(seq, timestamp);
-            await (_next ?? _queue as Stream).WriteAsync(buffer, offset, count, cancelToken).ConfigureAwait(false);
+            await (_next ?? _queue as Stream).WriteAsync(buffer, offset + 12, count - 12, cancelToken).ConfigureAwait(false);
         }

         public static bool TryReadSsrc(byte[] buffer, int offset, out uint ssrc)


Fix lost data.

Fix lost data.

--- src/Features/Core/Portable/AddImport/AddImportFixData.cs
+++ src/Features/Core/Portable/AddImport/AddImportFixData.cs
@@ -47,7 +47,7 @@
         /// <summary>
         /// The optional id for a <see cref="Project"/> we'd like to add a reference to.
         /// </summary>
-        public readonly ProjectId ProjectReferenceToAdd;
+        public ProjectId ProjectReferenceToAdd { get; private set; }

         #endregion

@@ -97,7 +97,8 @@
             {
                 Title = title,
                 Tags = tags,
-                Priority = priority
+                Priority = priority,
+                ProjectReferenceToAdd = projectReferenceToAdd
             };
         }


feat: Update Firebase TestLab event with TestMatrixId

--- src/Google.Events.Protobuf/Firebase/TestLab/V1/Data.g.cs
+++ src/Google.Events.Protobuf/Firebase/TestLab/V1/Data.g.cs
@@ -40,7 +40,7 @@
           string.Concat(
             "Cixnb29nbGUvZXZlbnRzL2ZpcmViYXNlL3Rlc3RsYWIvdjEvZGF0YS5wcm90",
             "bxIhZ29vZ2xlLmV2ZW50cy5maXJlYmFzZS50ZXN0bGFiLnYxGh9nb29nbGUv",
-            "cHJvdG9idWYvdGltZXN0YW1wLnByb3RvIv0CChNUZXN0TWF0cml4RXZlbnRE",
+            "cHJvdG9idWYvdGltZXN0YW1wLnByb3RvIpUDChNUZXN0TWF0cml4RXZlbnRE",
             "YXRhEi8KC2NyZWF0ZV90aW1lGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRp",
             "bWVzdGFtcBI7CgVzdGF0ZRgCIAEoDjIsLmdvb2dsZS5ldmVudHMuZmlyZWJh",
             "c2UudGVzdGxhYi52MS5UZXN0U3RhdGUSHgoWaW52YWxpZF9tYXRyaXhfZGV0",
@@ -49,24 +49,24 @@
             "cmVzdWx0X3N0b3JhZ2UYBSABKAsyMC5nb29nbGUuZXZlbnRzLmZpcmViYXNl",
             "LnRlc3RsYWIudjEuUmVzdWx0U3RvcmFnZRJCCgtjbGllbnRfaW5mbxgGIAEo",
             "CzItLmdvb2dsZS5ldmVudHMuZmlyZWJhc2UudGVzdGxhYi52MS5DbGllbnRJ",
-            "bmZvIpkBCgpDbGllbnRJbmZvEg4KBmNsaWVudBgBIAEoCRJLCgdkZXRhaWxz",
-            "GAIgAygLMjouZ29vZ2xlLmV2ZW50cy5maXJlYmFzZS50ZXN0bGFiLnYxLkNs",
-            "aWVudEluZm8uRGV0YWlsc0VudHJ5Gi4KDERldGFpbHNFbnRyeRILCgNrZXkY",
-            "ASABKAkSDQoFdmFsdWUYAiABKAk6AjgBInQKDVJlc3VsdFN0b3JhZ2USHAoU",
-            "dG9vbF9yZXN1bHRzX2hpc3RvcnkYASABKAkSHgoWdG9vbF9yZXN1bHRzX2V4",
-            "ZWN1dGlvbhgCIAEoCRITCgtyZXN1bHRzX3VyaRgDIAEoCRIQCghnY3NfcGF0",
-            "aBgEIAEoCSpqCglUZXN0U3RhdGUSGgoWVEVTVF9TVEFURV9VTlNQRUNJRklF",
-            "RBAAEg4KClZBTElEQVRJTkcQARILCgdQRU5ESU5HEAISDAoIRklOSVNIRUQQ",
-            "AxIJCgVFUlJPUhAEEgsKB0lOVkFMSUQQBSpqCg5PdXRjb21lU3VtbWFyeRIf",
-            "ChtPVVRDT01FX1NVTU1BUllfVU5TUEVDSUZJRUQQABILCgdTVUNDRVNTEAES",
-            "CwoHRkFJTFVSRRACEhAKDElOQ09OQ0xVU0lWRRADEgsKB1NLSVBQRUQQBEJh",
-            "CiVjb20uZ29vZ2xlLmV2ZW50cy5maXJlYmFzZS50ZXN0bGFiLnYxQglEYXRh",
-            "UHJvdG9QAaoCKkdvb2dsZS5FdmVudHMuUHJvdG9idWYuRmlyZWJhc2UuVGVz",
-            "dExhYi5WMWIGcHJvdG8z"));
+            "bmZvEhYKDnRlc3RfbWF0cml4X2lkGAcgASgJIpkBCgpDbGllbnRJbmZvEg4K",
+            "BmNsaWVudBgBIAEoCRJLCgdkZXRhaWxzGAIgAygLMjouZ29vZ2xlLmV2ZW50",
+            "cy5maXJlYmFzZS50ZXN0bGFiLnYxLkNsaWVudEluZm8uRGV0YWlsc0VudHJ5",
+            "Gi4KDERldGFpbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6",
+            "AjgBInQKDVJlc3VsdFN0b3JhZ2USHAoUdG9vbF9yZXN1bHRzX2hpc3RvcnkY",
+            "ASABKAkSHgoWdG9vbF9yZXN1bHRzX2V4ZWN1dGlvbhgCIAEoCRITCgtyZXN1",
+            "bHRzX3VyaRgDIAEoCRIQCghnY3NfcGF0aBgEIAEoCSpqCglUZXN0U3RhdGUS",
+            "GgoWVEVTVF9TVEFURV9VTlNQRUNJRklFRBAAEg4KClZBTElEQVRJTkcQARIL",
+            "CgdQRU5ESU5HEAISDAoIRklOSVNIRUQQAxIJCgVFUlJPUhAEEgsKB0lOVkFM",
+            "SUQQBSpqCg5PdXRjb21lU3VtbWFyeRIfChtPVVRDT01FX1NVTU1BUllfVU5T",
+            "UEVDSUZJRUQQABILCgdTVUNDRVNTEAESCwoHRkFJTFVSRRACEhAKDElOQ09O",
+            "Q0xVU0lWRRADEgsKB1NLSVBQRUQQBEJhCiVjb20uZ29vZ2xlLmV2ZW50cy5m",
+            "aXJlYmFzZS50ZXN0bGFiLnYxQglEYXRhUHJvdG9QAaoCKkdvb2dsZS5FdmVu",
+            "dHMuUHJvdG9idWYuRmlyZWJhc2UuVGVzdExhYi5WMWIGcHJvdG8z"));
       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
           new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
           new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.TestState), typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.OutcomeSummary), }, null, new pbr::GeneratedClrTypeInfo[] {
-            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.TestMatrixEventData), global::Google.Events.Protobuf.Firebase.TestLab.V1.TestMatrixEventData.Parser, new[]{ "CreateTime", "State", "InvalidMatrixDetails", "OutcomeSummary", "ResultStorage", "ClientInfo" }, null, null, null, null),
+            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.TestMatrixEventData), global::Google.Events.Protobuf.Firebase.TestLab.V1.TestMatrixEventData.Parser, new[]{ "CreateTime", "State", "InvalidMatrixDetails", "OutcomeSummary", "ResultStorage", "ClientInfo", "TestMatrixId" }, null, null, null, null),
             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.ClientInfo), global::Google.Events.Protobuf.Firebase.TestLab.V1.ClientInfo.Parser, new[]{ "Client", "Details" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Events.Protobuf.Firebase.TestLab.V1.ResultStorage), global::Google.Events.Protobuf.Firebase.TestLab.V1.ResultStorage.Parser, new[]{ "ToolResultsHistory", "ToolResultsExecution", "ResultsUri", "GcsPath" }, null, null, null, null)
           }));
@@ -179,6 +179,7 @@
       outcomeSummary_ = other.outcomeSummary_;
       resultStorage_ = other.resultStorage_ != null ? other.resultStorage_.Clone() : null;
       clientInfo_ = other.clientInfo_ != null ? other.clientInfo_.Clone() : null;
+      testMatrixId_ = other.testMatrixId_;
       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
     }

@@ -269,6 +270,20 @@
       get { return clientInfo_; }
       set {
         clientInfo_ = value;
+      }
+    }
+
+    /// <summary>Field number for the "test_matrix_id" field.</summary>
+    public const int TestMatrixIdFieldNumber = 7;
+    private string testMatrixId_ = "";
+    /// <summary>
+    /// ID of the test matrix this event belongs to.
+    /// </summary>
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public string TestMatrixId {
+      get { return testMatrixId_; }
+      set {
+        testMatrixId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
       }
     }

@@ -291,6 +306,7 @@
       if (OutcomeSummary != other.OutcomeSummary) return false;
       if (!object.Equals(ResultStorage, other.ResultStorage)) return false;
       if (!object.Equals(ClientInfo, other.ClientInfo)) return false;
+      if (TestMatrixId != other.TestMatrixId) return false;
       return Equals(_unknownFields, other._unknownFields);
     }

@@ -303,6 +319,7 @@
       if (OutcomeSummary != global::Google.Events.Protobuf.Firebase.TestLab.V1.OutcomeSummary.Unspecified) hash ^= OutcomeSummary.GetHashCode();
       if (resultStorage_ != null) hash ^= ResultStorage.GetHashCode();
       if (clientInfo_ != null) hash ^= ClientInfo.GetHashCode();
+      if (TestMatrixId.Length != 0) hash ^= TestMatrixId.GetHashCode();
       if (_unknownFields != null) {
         hash ^= _unknownFields.GetHashCode();
       }
@@ -343,6 +360,10 @@
         output.WriteRawTag(50);
         output.WriteMessage(ClientInfo);
       }
+      if (TestMatrixId.Length != 0) {
+        output.WriteRawTag(58);
+        output.WriteString(TestMatrixId);
+      }
       if (_unknownFields != null) {
         _unknownFields.WriteTo(output);
       }
@@ -376,6 +397,10 @@
         output.WriteRawTag(50);
         output.WriteMessage(ClientInfo);
       }
+      if (TestMatrixId.Length != 0) {
+        output.WriteRawTag(58);
+        output.WriteString(TestMatrixId);
+      }
       if (_unknownFields != null) {
         _unknownFields.WriteTo(ref output);
       }
@@ -402,6 +427,9 @@
       }
       if (clientInfo_ != null) {
         size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClientInfo);
+      }
+      if (TestMatrixId.Length != 0) {
+        size += 1 + pb::CodedOutputStream.ComputeStringSize(TestMatrixId);
       }
       if (_unknownFields != null) {
         size += _unknownFields.CalculateSize();
@@ -440,6 +468,9 @@
           ClientInfo = new global::Google.Events.Protobuf.Firebase.TestLab.V1.ClientInfo();
         }
         ClientInfo.MergeFrom(other.ClientInfo);
+      }
+      if (other.TestMatrixId.Length != 0) {
+        TestMatrixId = other.TestMatrixId;
       }
       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
     }
@@ -488,6 +519,10 @@
             input.ReadMessage(ClientInfo);
             break;
           }
+          case 58: {
+            TestMatrixId = input.ReadString();
+            break;
+          }
         }
       }
     #endif
@@ -533,6 +568,10 @@
               ClientInfo = new global::Google.Events.Protobuf.Firebase.TestLab.V1.ClientInfo();
             }
             input.ReadMessage(ClientInfo);
+            break;
+          }
+          case 58: {
+            TestMatrixId = input.ReadString();
             break;
           }
         }


Lucene.Net.Core.Index.BinaryDocValuesFieldUpdates refactor: renamed private/protected fields camelCase

--- src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
+++ src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
@@ -38,109 +38,109 @@
     /// </summary>
     internal class BinaryDocValuesFieldUpdates : AbstractDocValuesFieldUpdates
     {
-        new internal sealed class Iterator : AbstractDocValuesFieldUpdates.IIterator
-        {
-            private readonly PagedGrowableWriter Offsets;
-            private readonly int Size;
-            private readonly PagedGrowableWriter Lengths;
-            private readonly PagedMutable Docs;
-            private readonly FixedBitSet DocsWithField;
-            private long Idx = 0; // long so we don't overflow if size == Integer.MAX_VALUE
-            private int Doc_Renamed = -1;
-            private readonly BytesRef Value_Renamed;
-            private int Offset, Length;
+        internal sealed class Iterator : AbstractDocValuesFieldUpdates.IIterator
+        {
+            private readonly PagedGrowableWriter offsets;
+            private readonly int size;
+            private readonly PagedGrowableWriter lengths;
+            private readonly PagedMutable docs;
+            private readonly FixedBitSet docsWithField;
+            private long idx = 0; // long so we don't overflow if size == Integer.MAX_VALUE
+            private int doc = -1;
+            private readonly BytesRef value;
+            private int offset, length;

             internal Iterator(int size, PagedGrowableWriter offsets, PagedGrowableWriter lengths, PagedMutable docs, BytesRef values, FixedBitSet docsWithField)
             {
-                this.Offsets = offsets;
-                this.Size = size;
-                this.Lengths = lengths;
-                this.Docs = docs;
-                this.DocsWithField = docsWithField;
-                Value_Renamed = (BytesRef)values.Clone();
+                this.offsets = offsets;
+                this.size = size;
+                this.lengths = lengths;
+                this.docs = docs;
+                this.docsWithField = docsWithField;
+                value = (BytesRef)values.Clone();
             }

             public object Value
             {
                 get
                 {
-                    if (Offset == -1)
+                    if (offset == -1)
                     {
                         return null;
                     }
                     else
                     {
-                        Value_Renamed.Offset = Offset;
-                        Value_Renamed.Length = Length;
-                        return Value_Renamed;
+                        value.Offset = offset;
+                        value.Length = length;
+                        return value;
                     }
                 }
             }

             public int NextDoc()
             {
-                if (Idx >= Size)
-                {
-                    Offset = -1;
-                    return Doc_Renamed = DocIdSetIterator.NO_MORE_DOCS;
-                }
-                Doc_Renamed = (int)Docs.Get(Idx);
-                ++Idx;
-                while (Idx < Size && Docs.Get(Idx) == Doc_Renamed)
-                {
-                    ++Idx;
+                if (idx >= size)
+                {
+                    offset = -1;
+                    return doc = DocIdSetIterator.NO_MORE_DOCS;
+                }
+                doc = (int)docs.Get(idx);
+                ++idx;
+                while (idx < size && docs.Get(idx) == doc)
+                {
+                    ++idx;
                 }
                 // idx points to the "next" element
-                long prevIdx = Idx - 1;
-                if (!DocsWithField.Get((int)prevIdx))
-                {
-                    Offset = -1;
+                long prevIdx = idx - 1;
+                if (!docsWithField.Get((int)prevIdx))
+                {
+                    offset = -1;
                 }
                 else
                 {
                     // cannot change 'value' here because nextDoc is called before the
                     // value is used, and it's a waste to clone the BytesRef when we
                     // obtain the value
-                    Offset = (int)Offsets.Get(prevIdx);
-                    Length = (int)Lengths.Get(prevIdx);
-                }
-                return Doc_Renamed;
+                    offset = (int)offsets.Get(prevIdx);
+                    length = (int)lengths.Get(prevIdx);
+                }
+                return doc;
             }

             public int Doc
             {
-                get { return Doc_Renamed; }
+                get { return doc; }
             }

             public void Reset()
             {
-                Doc_Renamed = -1;
-                Offset = -1;
-                Idx = 0;
-            }
-        }
-
-        private FixedBitSet DocsWithField;
-        private PagedMutable Docs;
-        private PagedGrowableWriter Offsets, Lengths;
-        private BytesRef Values;
-        private int Size;
+                doc = -1;
+                offset = -1;
+                idx = 0;
+            }
+        }
+
+        private FixedBitSet docsWithField;
+        private PagedMutable docs;
+        private PagedGrowableWriter offsets, lengths;
+        private BytesRef values;
+        private int size;

         public BinaryDocValuesFieldUpdates(string field, int maxDoc)
             : base(field, DocValuesFieldUpdates.Type.BINARY)
         {
-            DocsWithField = new FixedBitSet(64);
-            Docs = new PagedMutable(1, 1024, PackedInts.BitsRequired(maxDoc - 1), PackedInts.COMPACT);
-            Offsets = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
-            Lengths = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
-            Values = new BytesRef(16); // start small
-            Size = 0;
+            docsWithField = new FixedBitSet(64);
+            docs = new PagedMutable(1, 1024, PackedInts.BitsRequired(maxDoc - 1), PackedInts.COMPACT);
+            offsets = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
+            lengths = new PagedGrowableWriter(1, 1024, 1, PackedInts.FAST);
+            values = new BytesRef(16); // start small
+            size = 0;
         }

         public override void Add(int doc, object value)
         {
             // TODO: if the Sorter interface changes to take long indexes, we can remove that limitation
-            if (Size == int.MaxValue)
+            if (size == int.MaxValue)
             {
                 throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE doc/value entries");
             }
@@ -152,94 +152,94 @@
             }

             // grow the structures to have room for more elements
-            if (Docs.Size == Size)
-            {
-                Docs = Docs.Grow(Size + 1);
-                Offsets = Offsets.Grow(Size + 1);
-                Lengths = Lengths.Grow(Size + 1);
-                DocsWithField = FixedBitSet.EnsureCapacity(DocsWithField, (int)Docs.Size);
+            if (docs.Size == size)
+            {
+                docs = docs.Grow(size + 1);
+                offsets = offsets.Grow(size + 1);
+                lengths = lengths.Grow(size + 1);
+                docsWithField = FixedBitSet.EnsureCapacity(docsWithField, (int)docs.Size);
             }

             if (val != BinaryDocValuesUpdate.MISSING)
             {
                 // only mark the document as having a value in that field if the value wasn't set to null (MISSING)
-                DocsWithField.Set(Size);
-            }
-
-            Docs.Set(Size, doc);
-            Offsets.Set(Size, Values.Length);
-            Lengths.Set(Size, val.Length);
-            Values.Append(val);
-            ++Size;
+                docsWithField.Set(size);
+            }
+
+            docs.Set(size, doc);
+            offsets.Set(size, values.Length);
+            lengths.Set(size, val.Length);
+            values.Append(val);
+            ++size;
         }

         public override AbstractDocValuesFieldUpdates.IIterator GetIterator()
         {
-            PagedMutable docs = this.Docs;
-            PagedGrowableWriter offsets = this.Offsets;
-            PagedGrowableWriter lengths = this.Lengths;
-            BytesRef values = this.Values;
-            FixedBitSet docsWithField = this.DocsWithField;
-            new InPlaceMergeSorterAnonymousInnerClassHelper(this, docs, offsets, lengths, docsWithField).Sort(0, Size);
-
-            return new Iterator(Size, offsets, lengths, docs, values, docsWithField);
+            PagedMutable docs = this.docs;
+            PagedGrowableWriter offsets = this.offsets;
+            PagedGrowableWriter lengths = this.lengths;
+            BytesRef values = this.values;
+            FixedBitSet docsWithField = this.docsWithField;
+            new InPlaceMergeSorterAnonymousInnerClassHelper(this, docs, offsets, lengths, docsWithField).Sort(0, size);
+
+            return new Iterator(size, offsets, lengths, docs, values, docsWithField);
         }

         private class InPlaceMergeSorterAnonymousInnerClassHelper : InPlaceMergeSorter
         {
-            private readonly BinaryDocValuesFieldUpdates OuterInstance;
-
-            private PagedMutable Docs;
-            private PagedGrowableWriter Offsets;
-            private PagedGrowableWriter Lengths;
-            private FixedBitSet DocsWithField;
+            private readonly BinaryDocValuesFieldUpdates outerInstance;
+
+            private PagedMutable docs;
+            private PagedGrowableWriter offsets;
+            private PagedGrowableWriter lengths;
+            private FixedBitSet docsWithField;

             public InPlaceMergeSorterAnonymousInnerClassHelper(BinaryDocValuesFieldUpdates outerInstance, PagedMutable docs, PagedGrowableWriter offsets, PagedGrowableWriter lengths, FixedBitSet docsWithField)
             {
-                this.OuterInstance = outerInstance;
-                this.Docs = docs;
-                this.Offsets = offsets;
-                this.Lengths = lengths;
-                this.DocsWithField = docsWithField;
+                this.outerInstance = outerInstance;
+                this.docs = docs;
+                this.offsets = offsets;
+                this.lengths = lengths;
+                this.docsWithField = docsWithField;
             }

             protected override void Swap(int i, int j)
             {
-                long tmpDoc = Docs.Get(j);
-                Docs.Set(j, Docs.Get(i));
-                Docs.Set(i, tmpDoc);
-
-                long tmpOffset = Offsets.Get(j);
-                Offsets.Set(j, Offsets.Get(i));
-                Offsets.Set(i, tmpOffset);
-
-                long tmpLength = Lengths.Get(j);
-                Lengths.Set(j, Lengths.Get(i));
-                Lengths.Set(i, tmpLength);
-
-                bool tmpBool = DocsWithField.Get(j);
-                if (DocsWithField.Get(i))
-                {
-                    DocsWithField.Set(j);
+                long tmpDoc = docs.Get(j);
+                docs.Set(j, docs.Get(i));
+                docs.Set(i, tmpDoc);
+
+                long tmpOffset = offsets.Get(j);
+                offsets.Set(j, offsets.Get(i));
+                offsets.Set(i, tmpOffset);
+
+                long tmpLength = lengths.Get(j);
+                lengths.Set(j, lengths.Get(i));
+                lengths.Set(i, tmpLength);
+
+                bool tmpBool = docsWithField.Get(j);
+                if (docsWithField.Get(i))
+                {
+                    docsWithField.Set(j);
                 }
                 else
                 {
-                    DocsWithField.Clear(j);
+                    docsWithField.Clear(j);
                 }
                 if (tmpBool)
                 {
-                    DocsWithField.Set(i);
+                    docsWithField.Set(i);
                 }
                 else
                 {
-                    DocsWithField.Clear(i);
+                    docsWithField.Clear(i);
                 }
             }

             protected override int Compare(int i, int j)
             {
-                int x = (int)Docs.Get(i);
-                int y = (int)Docs.Get(j);
+                int x = (int)docs.Get(i);
+                int y = (int)docs.Get(j);
                 return (x < y) ? -1 : ((x == y) ? 0 : 1);
             }
         }
@@ -247,33 +247,33 @@
         public override void Merge(AbstractDocValuesFieldUpdates other)
         {
             BinaryDocValuesFieldUpdates otherUpdates = (BinaryDocValuesFieldUpdates)other;
-            int newSize = Size + otherUpdates.Size;
+            int newSize = size + otherUpdates.size;
             if (newSize > int.MaxValue)
             {
-                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE doc/value entries; size=" + Size + " other.size=" + otherUpdates.Size);
-            }
-            Docs = Docs.Grow(newSize);
-            Offsets = Offsets.Grow(newSize);
-            Lengths = Lengths.Grow(newSize);
-            DocsWithField = FixedBitSet.EnsureCapacity(DocsWithField, (int)Docs.Size);
-            for (int i = 0; i < otherUpdates.Size; i++)
-            {
-                int doc = (int)otherUpdates.Docs.Get(i);
-                if (otherUpdates.DocsWithField.Get(i))
-                {
-                    DocsWithField.Set(Size);
-                }
-                Docs.Set(Size, doc);
-                Offsets.Set(Size, Values.Length + otherUpdates.Offsets.Get(i)); // correct relative offset
-                Lengths.Set(Size, otherUpdates.Lengths.Get(i));
-                ++Size;
-            }
-            Values.Append(otherUpdates.Values);
+                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE doc/value entries; size=" + size + " other.size=" + otherUpdates.size);
+            }
+            docs = docs.Grow(newSize);
+            offsets = offsets.Grow(newSize);
+            lengths = lengths.Grow(newSize);
+            docsWithField = FixedBitSet.EnsureCapacity(docsWithField, (int)docs.Size);
+            for (int i = 0; i < otherUpdates.size; i++)
+            {
+                int doc = (int)otherUpdates.docs.Get(i);
+                if (otherUpdates.docsWithField.Get(i))
+                {
+                    docsWithField.Set(size);
+                }
+                docs.Set(size, doc);
+                offsets.Set(size, values.Length + otherUpdates.offsets.Get(i)); // correct relative offset
+                lengths.Set(size, otherUpdates.lengths.Get(i));
+                ++size;
+            }
+            values.Append(otherUpdates.values);
         }

         public override bool Any()
         {
-            return Size > 0;
+            return size > 0;
         }
     }
 }


Default to using the ipaddress/port, not just the ipaddress when comparing peers in the tracker

svn path=/trunk/bitsharp/; revision=125251

--- src/MonoTorrent/MonoTorrent.Tracker/IPAddressComparer.cs
+++ src/MonoTorrent/MonoTorrent.Tracker/IPAddressComparer.cs
@@ -14,7 +14,7 @@
     {
         public object GetKey(AnnounceParameters parameters)
         {
-            return parameters.ClientAddress.Address;
+            return parameters.ClientAddress;
         }
     }
 }


Fixed problem when deleting wizard target (discussions/280739)

--- src/Mvc/MvcTemplates/N2/Content/Wizard/LocationWizard.cs
+++ src/Mvc/MvcTemplates/N2/Content/Wizard/LocationWizard.cs
@@ -1,3 +1,4 @@
+using System.Linq;
 using System.Collections.Generic;
 using N2.Edit.Wizard.Items;
 using N2.Engine;
@@ -32,8 +33,10 @@
 			if (container == null)
 				yield break;

-			foreach (ContentItem child in container.GetChildren())
+			foreach (var child in container.GetChildren().OfType<MagicLocation>())
 			{
+				if (child.Location == null || child.Location.State == ContentState.Deleted)
+					continue;
 				yield return child as MagicLocation;
 			}
 		}


fix portable apps

fix portable apps

--- build_projects/shared-build-targets-utils/Utils/BuildVersion.cs
+++ build_projects/shared-build-targets-utils/Utils/BuildVersion.cs
@@ -7,7 +7,7 @@
         public string SimpleVersion => $"{Major}.{Minor}.{Patch}.{CommitCountString}";
         public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}";
         public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}";
-        public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc3-{CommitCountString}";
+        public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc3-{CommitCountString}-00";
         public string ProductionVersion => $"{Major}.{Minor}.{Patch}";
     }
 }


Made some UI changes to match with requirements

--- src/SFA.DAS.EAS.Web/Views/EmployerAgreement/Index.cshtml
+++ src/SFA.DAS.EAS.Web/Views/EmployerAgreement/Index.cshtml
@@ -40,7 +40,7 @@

                     Organisation
                     Agreement status
-                    Action
+                    Action

@@ -75,7 +75,7 @@
 }
                             else
                             {
-                                View agreement
+                                View

                             }


fixed bug with var-action number not getting passed around

--- Explore/EpsilonGreedyExplorer.cs
+++ Explore/EpsilonGreedyExplorer.cs
@@ -105,7 +105,7 @@
             uint numActions = VariableActionHelper.GetNumberOfActions(this.numActionsFixed, numActionsVariable);

             // Invoke the default policy function to get the action
-            PolicyDecisionTuple policyDecisionTuple = this.defaultPolicy.ChooseAction(context);
+            PolicyDecisionTuple policyDecisionTuple = this.defaultPolicy.ChooseAction(context, numActions);
             uint chosenAction = policyDecisionTuple.Action;

             if (chosenAction == 0 || chosenAction > numActions)
@@ -195,7 +195,7 @@
             uint numActions = VariableActionHelper.GetNumberOfActions(this.numActionsFixed, numActionsVariable);

             // Invoke the default policy function to get the action
-            PolicyDecisionTuple policyDecisionTuple = this.defaultPolicy.ChooseAction(context);
+            PolicyDecisionTuple policyDecisionTuple = this.defaultPolicy.ChooseAction(context, numActions);
             uint[] chosenActions = policyDecisionTuple.Actions;

             MultiActionHelper.ValidateActionList(chosenActions);


Added property for level total for use in filename output

--- FG5eXmlToPdf/Models/Character.cs
+++ FG5eXmlToPdf/Models/Character.cs
@@ -7,7 +7,6 @@
     {
         public List<Skill> Skills { get;  }
         public List<Ability> Abilities { get; }
-        //public Dictionary<string,string> Properties { get; }
         public List<Properity> Properities { get; }
         public List<Class> Classes { get;  }
         public Character5e()
@@ -32,30 +31,13 @@
                 new Properity("HPMax", "hp/total"),
                 new Properity("Passive", "perception"),
                 new Properity("Speed", "speed/total"),
-                new Properity("Exp")
+                new Properity("Exp"),
+                new Properity("LevelTotal", "level")
             };
             Abilities = new List<Ability>();
             Skills = new List<Skill>();
             Classes = new List<Class>();
-            //Properties = new Dictionary<string, string>()
-            //{
-            //    {"Name", "" },
-            //    {"Race", "" },
-            //    {"Background", "" },
-            //    {"ProfBonus", "" },
-            //    {"Alignment", "" },
-            //    {"Age", "" },
-            //    {"Bonds", "" },
-            //    {"Exp", "" },
-            //    {"Flaws", "" },
-            //    {"Height", "" },
-            //    {"Ideals", "" },
-            //    {"PersonalityTraits", "" },
-            //    {"ClassLevel", "" },
-            //    {"Initiative", "" },
-            //    //{"", "" },
-
-            //};
+
         }
     }
 }


(GH-1318) GetChocolatey - ensure one run as admin

With GetChocolatey, we need it to error if there is an issue, so
provide the user information to running once as an administrator in the
error code.

--- src/chocolatey/GetChocolatey.cs
+++ src/chocolatey/GetChocolatey.cs
@@ -414,7 +414,8 @@
             }
             catch (Exception ex)
             {
-                this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. Details:{0} {1}".format_with(Environment.NewLine,ex.ToString()));
+                this.Log().Warn(ChocolateyLoggers.Important, "Please ensure that ChocolateyInstall environment variable is set properly and you've run once as an administrator to ensure all resources are extracted.");
+                this.Log().Error("Unable to extract resources. Please ensure the ChocolateyInstall environment variable is set properly. You may need to run once as an admin to ensure all resources are extracted. Details:{0} {1}".format_with(Environment.NewLine,ex.ToString()));
             }

         }


Fix error in unit test from changing the ToString

--- compiler/NUnit.Tests/MiddleEnd/InstructionTests.cs
+++ compiler/NUnit.Tests/MiddleEnd/InstructionTests.cs
@@ -15,7 +15,7 @@
             var inst2 = new Instruction(IrOps.Add, new Operand(Operand.OpType.Constant, 05),
                 new Operand(inst1));

-            Assert.AreEqual( inst2.Num.ToString() + " Add #5 (" + inst1.Num.ToString() + ")",inst2.ToString());
+            Assert.AreEqual( inst2.Num.ToString() + ": Add #5 (" + inst1.Num.ToString() + ")",inst2.ToString());


Disable failing test for now.

Disable failing test for now.

--- osu.Framework.VisualTests/Tests/TestCaseOnlineTextures.cs
+++ osu.Framework.VisualTests/Tests/TestCaseOnlineTextures.cs
@@ -64,7 +64,8 @@
                             },
                             Children = new Drawable[]
                             {
-                                new Avatar(i) { RelativeSizeAxes = Axes.Both }
+                                //TODO: re-enable post merge of https://github.com/ppy/osu-framework/pull/605
+                                //new Avatar(i) { RelativeSizeAxes = Axes.Both }
                             }
                         },
                         new SpriteText { Text = i.ToString() },


Division-by-zero safety + reference our own size

--- osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
+++ osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs
@@ -113,9 +113,13 @@
             Size = Body.Size;
             OriginPosition = Body.PathOffset;

-            foreach (var obj in NestedHitObjects)
-                obj.RelativeAnchorPosition = Vector2.Divide(OriginPosition, Body.DrawSize);
-            Ball.RelativeAnchorPosition = Vector2.Divide(OriginPosition, Body.DrawSize);
+            if (DrawSize.X > 0 && DrawSize.Y > 0)
+            {
+                var childAnchorPosition = Vector2.Divide(OriginPosition, DrawSize);
+                foreach (var obj in NestedHitObjects)
+                    obj.RelativeAnchorPosition = childAnchorPosition;
+                Ball.RelativeAnchorPosition = childAnchorPosition;
+            }
         }

         protected override void CheckForJudgements(bool userTriggered, double timeOffset)


Fix incorrect osu! difficulty calculator combo count

--- osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs
+++ osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs
@@ -32,7 +32,7 @@
             countHitCircles = Beatmap.HitObjects.Count(h => h is HitCircle);

             beatmapMaxCombo = Beatmap.HitObjects.Count();
-            beatmapMaxCombo += Beatmap.HitObjects.OfType<Slider>().Sum(s => s.NestedHitObjects.Count) + 1;
+            beatmapMaxCombo += Beatmap.HitObjects.OfType<Slider>().Count();
         }

         public override double Calculate(Dictionary<string, double> categoryRatings = null)


Reverted LfsEncoding class back to original. Will create fork for new string handling code.

--- InSimDotNet/LfsEncoding.cs
+++ InSimDotNet/LfsEncoding.cs
@@ -2,12 +2,13 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Text;
+using System.Linq;

 namespace InSimDotNet {
     /// <summary>
     /// Handles converting strings from LFS encoding into unicode and vice versa.
     /// </summary>
-    public static class LfsEncoding {
+    internal static class LfsEncoding {
         private const char ControlChar = '^';
         private const char FallbackChar = '?';
         private static readonly bool IsRunningOnMono = (Type.GetType("Mono.Runtime") != null);
@@ -29,6 +30,19 @@

         private static readonly Encoding DefaultEncoding = EncodingMap['L'];

+        private static readonly Dictionary<char, char> EscapeMap = new Dictionary<char, char> {
+            { 'v', '|' },
+            { 'a', '*' },
+            { 'c', ':' },
+            { 'd', '\\' },
+            { 's', '/' },
+            { 'q', '?' },
+            { 't', '"' },
+            { 'l', '<' },
+            { 'r', '>' },
+            { '^', '^' },
+        };
+
         /// <summary>
         /// Converts a LFS encoded string to unicode.
         /// </summary>
@@ -38,35 +52,142 @@
         /// <returns>The resulting unicode string.</returns>
         public static string GetString(byte[] buffer, int index, int length) {
             StringBuilder output = new StringBuilder(length);
-            Encoding encoding = DefaultEncoding, nextEncoding;
-            int i = 0, lastEncode = index;
-            char control, nextChar;
+            Encoding encoding = DefaultEncoding;
+            Encoding nextEncoding;
+            int i = 0, start = index;
+            char escape;

             for (i = index; i < index + length; i++) {
-                control = (char)buffer[i];
+                char control = (char)buffer[i];

                 // Check for null terminator.
                 if (control == Char.MinValue) {
                     break;
                 }

-                // Check if codepage switch needed.
-                if (control == ControlChar && (i + 1) < buffer.Length) {
-                    nextChar = (char)buffer[i + 1];
-                    if (EncodingMap.TryGetValue(nextChar, out nextEncoding)) {
-                        output.Append(encoding.GetString(buffer, lastEncode, (i - lastEncode)));
-                        lastEncode = i;
-                        encoding = nextEncoding;
-                    }
-                }
-            }
-
-            // Encode anything that's left.
-            if (i - lastEncode > 0) {
-                output.Append(encoding.GetString(buffer, lastEncode, (i - lastEncode)));
+                // If not control character then ignore.
+                if (control != ControlChar) {
+                    continue;
+                }
+
+                // Found control character so encode everything up to this point.
+                if (i - start > 0) {
+                    output.Append(encoding.GetString(buffer, start, (i - start)));
+                }
+                start = (i + 2); // skip control chars.
+
+                // Process control character.
+                char next = (char)buffer[++i];
+                if (EncodingMap.TryGetValue(next, out nextEncoding)) {
+                    encoding = nextEncoding; // Switch encoding.
+                }
+                else if (EscapeMap.TryGetValue(next, out escape)) {
+                    output.Append(escape); // Escape character.
+                }
+                else {
+                    // Character not codepage switch or escape, so just ignore it.
+                    output.Append(control);
+                    output.Append(next);
+                }
+            }
+
+            // End of string reached so encode up all to this point.
+            if (i - start > 0) {
+                output.Append(encoding.GetString(buffer, start, (i - start)));
             }

             return output.ToString();
+        }
+
+        /// <summary>
+        /// Gets the number of bytes a string will take up once it has been converted from unicode string into a LFS encoded string.
+        /// </summary>
+        /// <param name="value">The string to test.</param>
+        /// <param name="maxLength">The maximum number of characters to test.</param>
+        /// <returns>The resulting number of bytes.</returns>
+        public static int GetByteCount(string value, int maxLength) {
+            Encoding encoding = DefaultEncoding;
+            int tempCount, result = 0;
+
+            for (int i = 0; i < value.Length && i < maxLength; i++) {
+                if (value[i] <= 127) {
+                    // All codepages share first 128 values.
+                    result++;
+                }
+                else if (TryGetByteCount(encoding, value[i], out tempCount)) {
+                    // Charcter in current codepage.
+                    result += tempCount;
+                }
+                else {
+                    // Search for new codepage.
+                    bool found = false;
+
+                    foreach (KeyValuePair<char, Encoding> map in EncodingMap) {
+                        if (map.Value == encoding) {
+                            continue;
+                        }
+
+                        if (TryGetByteCount(map.Value, value[i], out tempCount)) {
+                            encoding = map.Value;
+                            result += tempCount + 2;
+                            found = true;
+                            break;
+                        }
+                    }
+
+                    if (!found) {
+                        result++;
+                    }
+                }
+            }
+
+            return result;
+        }
+
+        /// <summary>
+        /// Tries to figure out the number of bytes a unicode character will take up once it has been converted into a LFS character. Either one or two bytes.
+        /// </summary>
+        /// <param name="encoding">The encoding to try and convert the character to.</param>
+        /// <param name="value">The character to convert.</param>
+        /// <param name="count">The numbers of bytes the character will take up.</param>
+        /// <returns>Returns true if the character could be successfully converted or false otherwise.</returns>
+        [DebuggerStepThrough]
+        private static bool TryGetByteCount(Encoding encoding, char value, out int count) {
+            // We use WideCharToMultiByte on Windows as it's very fast, but that's not
+            // available on Mono so we revert to trying to convert a character and then
+            // catching the exception generated when it fails. This is very slow as the
+            // callstack may potentionally need to be unwound for every character in the
+            // string.
+            if (IsRunningOnMono) {
+                return TryGetByteCountMono(encoding, value, out count);
+            }
+
+            return TryGetByteCountDotNet(encoding, value, out count);
+        }
+
+        private static bool TryGetByteCountDotNet(Encoding encoding, char value, out int count) {
+            bool usedDefault = false;
+            count = NativeMethods.WideCharToMultiByte(
+                (uint)encoding.CodePage,
+                NativeMethods.WC_NO_BEST_FIT_CHARS,
+                value.ToString(),
+                1,
+                null,
+                0,
+                IntPtr.Zero,
+                out usedDefault);
+            return !usedDefault;
+        }
+
+        private static bool TryGetByteCountMono(Encoding encoding, char value, out int count) {
+            try {
+                count = encoding.GetByteCount(value.ToString());
+                return true;
+            }
+            catch (EncoderFallbackException) {
+                count = 0;
+                return false;
+            }
         }

         /// <summary>
@@ -78,16 +199,29 @@
         /// <param name="length">The maximum number of bytes to write.</param>
         /// <returns>The number of bytes written during the operation.</returns>
         public static int GetBytes(string value, byte[] buffer, int index, int length) {
-            Encoding encoding = DefaultEncoding, tempEncoding;
+            Encoding encoding = DefaultEncoding;
             byte[] tempBytes = new byte[2];
-            int tempCount, start = index, totalLength = index + (length - 1);
-            bool found;
+            int tempCount;
+            int start = index;
+            int totalLength = index + (length - 1);

             for (int i = 0; i < value.Length && index < totalLength; i++) {
-                // Switch codepage.
-                if (value[i] == '^' && i + 1 < value.Length) {
-                    if (EncodingMap.TryGetValue(value[i + 1], out tempEncoding)) {
-                        encoding = tempEncoding;
+                // Remove any existing language tags from the string.
+                int next = i + 1;
+                if (value[i] == '^' && next < value.Length) {
+                    switch (value[next]) {
+                        case 'L':
+                        case 'G':
+                        case 'C':
+                        case 'J':
+                        case 'E':
+                        case 'T':
+                        case 'B':
+                        case 'H':
+                        case 'S':
+                        case 'K':
+                            i++; // skip codepage chars
+                            continue;
                     }
                 }

@@ -102,7 +236,7 @@
                 }
                 else {
                     // Search for new codepage.
-                    found = false;
+                    bool found = false;
                     foreach (KeyValuePair<char, Encoding> map in EncodingMap) {
                         if (map.Value == encoding) {
                             continue; // Skip current as we've already searched it.


Delete Attributes.cs

Delete Attributes.cs

cleanup

--- Installation/Attributes.cs
+++ Installation/Attributes.cs
@@ -1,166 +0,0 @@
-using System;
-
-namespace DNNtc
-{
-
-    #region Attributes
-
-    /// <summary>
-    /// This class is used to set information about the package
-    /// </summary>
-    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-    public class PackageProperties : Attribute
-    {
-        /// <summary>
-        /// Creates a attribute with the right properties to create a package. Use on View element
-        /// </summary>
-        /// <param name="name">The package name</param>
-        /// <param name="viewOrder">Ordinal number for sorting packages in the manifest</param>
-        /// <param name="friendlyName">The package friendly name</param>
-        /// <param name="description">The package description</param>
-        /// <param name="iconFile">The package iconfile name</param>
-        /// <param name="ownerName">Name of Owner</param>
-        /// <param name="ownerOrganization">Organization of owner</param>
-        /// <param name="ownerUrl">Url of owner</param>
-        /// <param name="ownerEmail">Email of owner</param>
-        /// <param name="azureCompatible">true or false Azure compliant</param>
-        public PackageProperties(string name, int viewOrder, string friendlyName, string description, string iconFile, string ownerName, string ownerOrganization, string ownerUrl, string ownerEmail, bool azureCompatible = false)
-        {
-            //Intentially left empty
-        }
-        /// <summary>
-        /// Creates a attribute with the right properties to create a package. Use on other elements
-        /// </summary>
-        /// <param name="name">The package name</param>
-        public PackageProperties(string name)
-        {
-            //Intentially left empty
-        }
-    }
-
-    /// <summary>
-    /// This class is used to set information about the module
-    /// </summary>
-    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-    public class ModuleProperties : Attribute
-    {
-        /// <summary>
-        /// Creates a attribute with the right properties to create a module. Use on View element
-        /// </summary>
-        /// <param name="name">The module name.</param>
-        /// <param name="friendlyname">The module friendlyname.</param>
-        /// <param name="defaultCacheTime">the module default cachetime.</param>
-        public ModuleProperties(string name, string friendlyname, int defaultCacheTime)
-        {
-            //Intentially left empty
-        }
-        /// <summary>
-        /// Creates a attribute with the right properties to create a module. Use on other elements
-        /// </summary>
-        /// <param name="name">The module name.</param>
-        public ModuleProperties(string name)
-        {
-            //Intentially left empty
-        }
-    }
-
-    /// <summary>
-    /// This class is used to indicate which UserControls should be in the install package
-    /// </summary>
-    public class ModuleControlProperties : Attribute
-    {
-        /// <summary>
-        /// Creates a attribute with the right properties to create a control.
-        /// </summary>
-        /// <param name="key">The key.</param>
-        /// <param name="title">The title.</param>
-        /// <param name="userControlType">type of the user control.</param>
-        /// <param name="helpUrl">The help URL.</param>
-        /// <param name="supportsPartialRendering">if set to <c>true</c> [supports partial rendering].</param>
-        /// <param name="supportsPopUps">if set to <c>true</c> [supports pop ups].</param>
-        public ModuleControlProperties(string key, string title, ControlType userControlType, string helpUrl, bool supportsPartialRendering = false, bool supportsPopUps = false)
-        {
-            //Intentially left empty
-        }
-    }
-
-    /// <summary>
-    /// Module permission attribute
-    /// </summary>
-    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-    public class ModulePermission : Attribute
-    {
-        /// <summary>
-        /// Empty Constructor for Intellisense
-        /// </summary>
-        /// <param name="Code"></param>
-        /// <param name="Key"></param>
-        /// <param name="Name"></param>
-        public ModulePermission(string Code, string Key, string Name)
-        {
-            //Intentially left empty
-        }
-    }
-
-    public class BusinessControllerClass : Attribute
-    {
-        //Intentially left empty
-    }
-
-    public class UpgradeEventMessage : Attribute
-    {
-        public UpgradeEventMessage(string VersionList)
-        {
-            //Intentially left empty
-        }
-    }
-
-    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-    public class ModuleDependencies : Attribute
-    {
-        public ModuleDependencies(ModuleDependency Type, string Value)
-        {
-            //Intentially left empty
-        }
-    }
-
-    #endregion
-
-    #region Helper Enumerations
-
-    /// <summary>
-    /// Enum for type of component used.
-    /// </summary>
-    public enum ComponentType
-    {
-        Script,
-        Assembly,
-        Module
-    }
-
-    /// <summary>
-    /// Enum for the type of controls DotNetNuke is using.
-    /// </summary>
-    public enum ControlType
-    {
-        SkinObject,
-        Anonymous,
-        View,
-        Edit,
-        Admin,
-        Host
-    }
-
-    /// <summary>
-    /// The type of dependency for the DotNetNuke Module
-    /// </summary>
-    public enum ModuleDependency
-    {
-        CoreVersion,
-        Package,
-        Permission,
-        Type
-    }
-
-    #endregion
-}


Switched events to internal

Switched events to internal

--- Jacinth/Entities/Entity.cs
+++ Jacinth/Entities/Entity.cs
@@ -17,8 +17,8 @@
         private readonly int _hashCode;
         private readonly Guid _id;

-        public event EventHandler<ComponentRemovedEventArgs> ComponentRemoved;
-        public event EventHandler ComponentAdded;
+        internal event EventHandler<ComponentRemovedEventArgs> ComponentRemoved;
+        internal event EventHandler ComponentAdded;

         /// <summary>
         /// The World to which this Entity belongs


adding code to check for old-style responses ("True")

--- OpenSim/Framework/Communications/Clients/RegionClient.cs
+++ OpenSim/Framework/Communications/Clients/RegionClient.cs
@@ -135,6 +135,11 @@
                         catch (NullReferenceException e)
                         {
                             m_log.InfoFormat("[REST COMMS]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
+
+                            // check for old style response
+                            if (response.ToLower().StartsWith("true"))
+                                return true;
+
                             return false;
                         }
                     }


Fixed isDiff bug Try catches for game stats Fixed cs:go accuracy game stat

--- PollingEngine/Implementations/SteamPoller/SteamPoller.cs
+++ PollingEngine/Implementations/SteamPoller/SteamPoller.cs
@@ -71,9 +71,13 @@
                 };
             }

+            Func<GamingInfo, GamingInfo, bool> isDiffFunc =
+                (pre, post) => pre == null || pre.Player.GameID != post.Player.GameID ||
+                               (string.IsNullOrEmpty(post.Player.GameExtraInfo) && pre.Player.PersonaState != post.Player.PersonaState);
+
             TimeSpan duration = TimeSpan.Zero;
             var lastDiffStateGamingInfo =
-                _data.Where(x => x.Value.Player.PersonaState != gamingInfo.Player.PersonaState || x.Value.Player.GameID != gamingInfo.Player.GameID)
+                _data.Where(x => isDiffFunc(x.Value, gamingInfo))
                     .Select(x => x.Value)
                     .LastOrDefault();
             if (lastDiffStateGamingInfo != null)
@@ -81,9 +85,7 @@
             else
                 duration = gamingInfo.Time.Subtract(pollStartTime);

-            var isDiff = lastInfo == null || lastInfo.Player.GameID != gamingInfo.Player.GameID ||
-                         (string.IsNullOrEmpty(gamingInfo.Player.GameExtraInfo) &&
-                          lastInfo.Player.PersonaState != gamingInfo.Player.PersonaState);
+            var isDiff = isDiffFunc(lastInfo, gamingInfo);
             //Duration = lastInfo != null ? gamingInfo.Time.Subtract(lastInfo.Time) : TimeSpan.Zero;
             GamingSession session;
             if (isDiff)
@@ -134,12 +136,15 @@
             {
                 try
                 {
-                    var stats = await SteamWebAPI.General().ISteamUserStats().GetUserStatsForGame(Convert.ToInt32(e.Session.Player.GameID), _steamPollIdentity).GetResponseAsync();
+                    var gameID = Convert.ToInt32(e.Session.Player.GameID);
+                    var stats = await SteamWebAPI.General().ISteamUserStats().GetUserStatsForGame(gameID, _steamPollIdentity).GetResponseAsync();
                     _gamestatsBefore = stats.Data;
                 }
                 catch (Exception ex)
                 {
-
+                    Debug.WriteLine("Error getting game stats (pre):");
+                    Debug.WriteLine(ex);
+                    _gamestatsBefore = null;
                 }
             }
         }
@@ -207,38 +212,46 @@

                 try
                 {
-                    var gameID = Convert.ToInt32(e.Session.Player.GameID);
-                    var stats = await SteamWebAPI.General().ISteamUserStats().GetUserStatsForGame(gameID, _steamPollIdentity).GetResponseAsync();
-                    _gamestatsAfter = stats.Data;
-
-                    var diffs =
-                        _gamestatsAfter.Stats
-                            .Where(x => x.Value != _gamestatsBefore.Stats.First(y => y.Name == x.Name).Value)
-                            .Select(x => new StatDiff {Pre = _gamestatsBefore.Stats.First(y => y.Name == x.Name), Post = x})
-                            .OrderByDescending(x => x.PercentualDiff)
-                            .ToList();
-
-                    if (diffs.Any())
+                    if (_gamestatsBefore == null || _gamestatsBefore.Stats == null || !_gamestatsBefore.Stats.Any())
                     {
-                        desc += Environment.NewLine;
-                        desc += Environment.NewLine;
-
-                        var pop = WritePopularStats(diffs, gameID);
-                        if (!string.IsNullOrEmpty(pop))
+                        Console.WriteLine("Missing game stats before game session, ignoring stats after");
+                    }
+                    else
+                    {
+                        var gameID = Convert.ToInt32(e.Session.Player.GameID);
+                        var stats = await SteamWebAPI.General().ISteamUserStats().GetUserStatsForGame(gameID, _steamPollIdentity).GetResponseAsync();
+                        _gamestatsAfter = stats.Data;
+
+                        var diffs =
+                            _gamestatsAfter.Stats
+                                .Where(x => x.Value != _gamestatsBefore.Stats.First(y => y.Name == x.Name).Value)
+                                .Select(x => new StatDiff {Pre = _gamestatsBefore.Stats.First(y => y.Name == x.Name), Post = x})
+                                .OrderByDescending(x => x.PercentualDiff)
+                                .ToList();
+
+                        if (diffs.Any())
                         {
-                            desc += string.Format("Popular stats: {0}{1}{0}", Environment.NewLine, pop);
-                        }
-
-                        desc += "Changed stats: " + Environment.NewLine;
-                        foreach (var statDiff in diffs)
-                        {
-                            desc += string.Format("{0}{1}", statDiff, Environment.NewLine);
+                            desc += Environment.NewLine;
+                            desc += Environment.NewLine;
+
+                            var pop = WritePopularStats(diffs, gameID);
+                            if (!string.IsNullOrEmpty(pop))
+                            {
+                                desc += string.Format("Popular stats: {0}{1}{0}", Environment.NewLine, pop);
+                            }
+
+                            desc += "Changed stats: " + Environment.NewLine;
+                            foreach (var statDiff in diffs)
+                            {
+                                desc += string.Format("{0}{1}", statDiff, Environment.NewLine);
+                            }
                         }
                     }
                 }
                 catch (Exception ex)
                 {
-
+                    Debug.WriteLine("Error getting game stats (post):");
+                    Debug.WriteLine(ex);
                 }

@@ -274,68 +287,76 @@
         private string WritePopularStats(List<StatDiff> diffs, int gameID)
         {
             var res = "";
-            if (gameID == 730)      // CS:GO
-            {
-                var dict = new Dictionary<string, string>
-                {
-                    {"total_kills", "You killed {diff} people"},
-                    {"total_deaths", "You died {diff} times"},
-                    {"kill_death_ratio", null},
-                    {"accuracy", null},
-                    {"total_dominations", "You dominated {diff} people"},
-                    {"total_damage_done", "Total damage done: {diff}"},
-                    {"total_wins", "You won {diff} times"},
-                    {"total_rounds_played", "You played {diff} rounds"},
-                    {"total_mvps", "You earned {diff} MVP stars"},
-                    {"total_kills_knife", "Killed {diff} people with the Knife"},
-                    {"total_kills_m4a1", "Killed {diff} people with M4A1"},
-                    {"total_kills_m4a1-s", "Killed {diff} people with M4A1-S"},
-                    {"total_kills_ak47", "Killed {diff} people with AK47"},
-                    {"total_kills_awp", "Killed {diff} people with AWP"},
-                    {"awp_accuracy", null},
-                };
-
-                foreach (var pair in dict)
-                {
-                    var d = diffs.FirstOrDefault(x => x.Name == pair.Key);
-                    if (d != null)
-                        res += pair.Value.Replace("{diff}", d.Differance.ToString()) + Environment.NewLine;
-                    else
+            try
+            {
+                if (gameID == 730) // CS:GO
+                {
+                    var dict = new Dictionary<string, string>
                     {
-                        if (pair.Key == "kill_death_ratio")
+                        {"total_kills", "You killed {diff} people"},
+                        {"total_deaths", "You died {diff} times"},
+                        {"kill_death_ratio", null},
+                        {"accuracy", null},
+                        {"total_dominations", "You dominated {diff} people"},
+                        {"total_damage_done", "Total damage done: {diff}"},
+                        {"total_wins", "You won {diff} rounds"},
+                        {"total_rounds_played", "You played {diff} rounds"},
+                        {"total_mvps", "You earned {diff} MVP stars"},
+                        {"total_kills_knife", "Killed {diff} people with the Knife"},
+                        {"total_kills_m4a1", "Killed {diff} people with M4A1"},
+                        {"total_kills_m4a1-s", "Killed {diff} people with M4A1-S"},
+                        {"total_kills_ak47", "Killed {diff} people with AK47"},
+                        {"total_kills_awp", "Killed {diff} people with AWP"},
+                        {"awp_accuracy", null},
+                    };
+
+                    foreach (var pair in dict)
+                    {
+                        var d = diffs.FirstOrDefault(x => x.Name == pair.Key);
+                        if (d != null)
+                            res += pair.Value.Replace("{diff}", d.Differance.ToString()) + Environment.NewLine;
+                        else
                         {
-                            var kills = diffs.FirstOrDefault(x => x.Name == "total_kills");
-                            var deaths = diffs.FirstOrDefault(x => x.Name == "total_deaths");
-                            if (kills != null && deaths != null)
+                            if (pair.Key == "kill_death_ratio")
                             {
-                                var ratio = kills.Differance / deaths.Differance;
-                                res += string.Format("You had {0} as k/d ratio", ratio) + Environment.NewLine;
+                                var kills = diffs.FirstOrDefault(x => x.Name == "total_kills");
+                                var deaths = diffs.FirstOrDefault(x => x.Name == "total_deaths");
+                                if (kills != null && deaths != null)
+                                {
+                                    var ratio = kills.Differance/deaths.Differance;
+                                    res += string.Format("You had {0} as k/d ratio", ratio) + Environment.NewLine;
+                                }
                             }
-                        }
-                        else if (pair.Key == "awp_accuracy")
-                        {
-                            var awpShots = diffs.FirstOrDefault(x => x.Name == "total_shots_awp");
-                            var awpHits = diffs.FirstOrDefault(x => x.Name == "total_hits_awp");
-                            if (awpShots != null && awpHits != null)
+                            else if (pair.Key == "awp_accuracy")
                             {
-                                var accuracy = awpHits.Differance / awpShots.Differance;
-                                res += string.Format("You had {0:p1} accuracy with the AWP", accuracy) + Environment.NewLine;
+                                var awpShots = diffs.FirstOrDefault(x => x.Name == "total_shots_awp");
+                                var awpHits = diffs.FirstOrDefault(x => x.Name == "total_hits_awp");
+                                if (awpShots != null && awpHits != null)
+                                {
+                                    var accuracy = awpHits.Differance/awpShots.Differance;
+                                    res += string.Format("You had {0:p1} accuracy with the AWP", accuracy) +
+                                           Environment.NewLine;
+                                }
                             }
-                        }
-                        else if (pair.Key == "accuracy")
-                        {
-                            var shots = diffs.FirstOrDefault(x => x.Name == "total_shots_hit");
-                            var hits = diffs.FirstOrDefault(x => x.Name == "total_shots_fired");
-                            if (shots != null && hits != null)
+                            else if (pair.Key == "accuracy")
                             {
-                                var accuracy = hits.Differance / shots.Differance;
-                                res += string.Format("You had {0:p1} accuracy", accuracy) + Environment.NewLine;
+                                var hits = diffs.FirstOrDefault(x => x.Name == "total_shots_hit");
+                                var shots = diffs.FirstOrDefault(x => x.Name == "total_shots_fired");
+                                if (shots != null && hits != null)
+                                {
+                                    var accuracy = hits.Differance/shots.Differance;
+                                    res += string.Format("You had {0:p1} accuracy", accuracy) + Environment.NewLine;
+                                }
                             }
                         }
                     }
                 }
             }
-
+            catch (Exception ex)
+            {
+                Debug.WriteLine("Error writing popular stats:");
+                Debug.WriteLine(ex);
+            }
             return res;
         }


Incorrectly removed a using clause

Incorrectly removed a using clause

--- Presentation.Core.Shared/ExtendedObservableCollection.cs
+++ Presentation.Core.Shared/ExtendedObservableCollection.cs
@@ -3,6 +3,7 @@
 using System.Collections.ObjectModel;
 using System.Collections.Specialized;
 using System.ComponentModel;
+using System.Linq;
 #if !NETSTANDARD2_0
 using System.Windows.Threading;
 #endif


Query Expression Pattern, Listing 2

Query Expression Pattern, Listing 2

Introducing Select

--- QueryExpressionPattern/QueryExpressionPattern/Program.cs
+++ QueryExpressionPattern/QueryExpressionPattern/Program.cs
@@ -11,9 +11,8 @@
         static void Main(string[] args)
         {
             int[] numbers = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-            var smallNumbers = from n in numbers
-                               where n < 5
-                               select n;
+            var squares = from n in numbers
+                          select n * n;

         }
     }


Doco for IRequestMetadata

Doco for IRequestMetadata

--- source/Glimpse.Core/Framework/IRequestMetadata.cs
+++ source/Glimpse.Core/Framework/IRequestMetadata.cs
@@ -1,23 +1,64 @@
 namespace Glimpse.Core.Framework
 {
+    /// <summary>
+    /// Defines properties that describe the metadata associated with a request
+    /// </summary>
     public interface IRequestMetadata
     {
+        /// <summary>
+        /// Gets the request URI.
+        /// </summary>
+        /// <value>The request URI.</value>
         string RequestUri { get; }
-
+
+        /// <summary>
+        /// Gets the request HTTP method.
+        /// </summary>
+        /// <value>The request HTTP method.</value>
         string RequestHttpMethod { get; }

+        /// <summary>
+        /// Gets the response status code.
+        /// </summary>
+        /// <value>The response status code.</value>
         int ResponseStatusCode { get; }
-
+
+        /// <summary>
+        /// Gets the type of the response content.
+        /// </summary>
+        /// <value>The type of the response content.</value>
         string ResponseContentType { get; }
-
+
+        /// <summary>
+        /// Gets the ip address.
+        /// </summary>
+        /// <value>The ip address.</value>
         string IpAddress { get; }
-
+
+        /// <summary>
+        /// Gets a value indicating whether request is ajax.
+        /// </summary>
+        /// <value><c>true</c> if request is ajax; otherwise, <c>false</c>.</value>
         bool RequestIsAjax { get; }
-
+
+        /// <summary>
+        /// Gets the client id.
+        /// </summary>
+        /// <value>The client id.</value>
         string ClientId { get; }
-
+
+        /// <summary>
+        /// Gets the cookie.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <returns>Value of the Http cookie.</returns>
         string GetCookie(string name);
-
+
+        /// <summary>
+        /// Gets the HTTP header.
+        /// </summary>
+        /// <param name="name">The name.</param>
+        /// <returns>Value of the Http header.</returns>
         string GetHttpHeader(string name);
     }
 }


Reduce warning

Reduce warning

--- source/Htc.Vita.Core/Runtime/WmiProcessWatcher.cs
+++ source/Htc.Vita.Core/Runtime/WmiProcessWatcher.cs
@@ -5,6 +5,7 @@

 namespace Htc.Vita.Core.Runtime
 {
+#pragma warning disable CA1416
     /// <summary>
     /// Class WmiProcessWatcher.
     /// Implements the <see cref="ProcessWatcher" />
@@ -68,7 +69,6 @@

         private void OnManagementEventArrived(object sender, EventArrivedEventArgs e)
         {
-#pragma warning disable CA1416
             var managementBaseObject = e.NewEvent;
             if (managementBaseObject == null)
             {
@@ -146,7 +146,6 @@
                  */
                 managementBaseObject.Dispose();
             }
-#pragma warning restore CA1416
         }

         /// <inheritdoc />
@@ -170,12 +169,10 @@
                 Logger.GetInstance(typeof(WmiProcessWatcher)).Info($"WMI query: {wmiQuery}");
                 try
                 {
-#pragma warning disable CA1416
                     var eventWatcher = new ManagementEventWatcher(wmiQuery);
                     eventWatcher.EventArrived += OnManagementEventArrived;
                     eventWatcher.Start();
                     _eventWatchers.Add(eventWatcher);
-#pragma warning restore CA1416
                 }
                 catch (Exception e)
                 {
@@ -194,9 +191,7 @@
             {
                 try
                 {
-#pragma warning disable CA1416
                     eventWatcher.Stop();
-#pragma warning restore CA1416
                 }
                 catch (Exception e)
                 {
@@ -220,4 +215,5 @@
             return this;
         }
     }
+#pragma warning restore CA1416
 }


Add logs

Add logs

--- src/TeamCityConsole/Commands/ResolveDependencyCommand.cs
+++ src/TeamCityConsole/Commands/ResolveDependencyCommand.cs
@@ -67,6 +67,8 @@
             DependencyConfig dependencyConfig =
                 await ResolveDependencies(_dependencyConfig.BuildConfigId, dependenciesOptions.Tag);

+            Log.Info("Finished resolving dependencies");
+
             var buildConfig = await _client.BuildConfigs.GetByConfigurationId(_dependencyConfig.BuildConfigId);
             _majorVersion = buildConfig.Parameters[ParameterName.MajorVersion]?.Value;
             _minorVersion = buildConfig.Parameters[ParameterName.MinorVersion]?.Value;
@@ -78,12 +80,16 @@
                 UpdateVersionIncVersion();
             }

+            Log.Info("Finished updating versions");
+
             //only writes the file if changes were made to the config.
             if (_dependencyConfig.Equals(dependencyConfig) == false || dependenciesOptions.Force)
             {
+                Log.Info("Updating config file...");
                 string json = JsonConvert.SerializeObject(dependencyConfig, Formatting.Indented);
                 _fileSystem.EnsureDirectoryExists(_configFullPath);
                 _fileSystem.WriteAllTextToFile(_configFullPath, json);
+                Log.Info("Done updating config file");
             }

             Log.Info("================ Get Dependencies: done ================");


Test rename

Test rename

--- source/RedGate.Time.Tests/TestTimeServiceTests.cs
+++ source/RedGate.Time.Tests/TestTimeServiceTests.cs
@@ -25,7 +25,7 @@
         }

         [TestFixture]
-        public class AnInstanceWithPendingDelayTasks : MoveForwardTestsBase
+        public class AnInstanceWithAPendingDelayTask : MoveForwardTestsBase
         {
             public override void SetUp()
             {


Fixing debugger display for button

Fixing debugger display for button

--- Fluent.Ribbon/Controls/Button.cs
+++ Fluent.Ribbon/Controls/Button.cs
@@ -13,7 +13,7 @@
     /// Represents button
     /// </summary>
     [ContentProperty(nameof(Header))]
-    [DebuggerDisplay("class{GetType().FullName}: Header = {Header}, Size = {Size}, IsSimplified = {IsSimplified}")]
+    [DebuggerDisplay("{GetType().FullName}: Header = {Header}, Size = {Size}, IsSimplified = {IsSimplified}")]
     public class Button : System.Windows.Controls.Button, IRibbonControl, IQuickAccessItemProvider, ILargeIconProvider, IMediumIconProvider, ISimplifiedRibbonControl
     {
         #region Properties


stores any result on WebhookSendAttempt.

stores any result on WebhookSendAttempt. If SendHttpRequest gets an unexpected error, store defualt error messages.(So that users can understand that the request is completed but failed.)

--- src/Abp/WebHooks/DefaultWebHookSender.cs
+++ src/Abp/WebHooks/DefaultWebHookSender.cs
@@ -21,6 +21,7 @@
         protected const string SignatureHeaderName = "abp-webhook-signature";

         private readonly IWebhooksConfiguration _webhooksConfiguration;
+        private const string FailedRequestDefaultContent = "Webhook Send Request Failed";

         public DefaultWebhookSender(IWebhooksConfiguration webhooksConfiguration)
         {
@@ -56,8 +57,9 @@
             AddAdditionalHeaders(request, webhookSenderArgs);

             bool isSucceed = false;
-            HttpStatusCode? statusCode;
-            string content;
+            HttpStatusCode? statusCode = null;
+            string content = FailedRequestDefaultContent;
+
             try
             {
                 var response = await SendHttpRequest(request);
@@ -69,16 +71,19 @@
             {
                 statusCode = HttpStatusCode.RequestTimeout;
                 content = "Request Timeout";
-                isSucceed = false;
             }
             catch (HttpRequestException e)
             {
                 content = e.Message;
-                statusCode = null;
-                isSucceed = false;
-            }
-
-            await StoreResponseOnWebhookSendAttemptAsync(webhookSendAttemptId, webhookSenderArgs.TenantId, statusCode, content);
+            }
+            catch (Exception e)
+            {
+                Logger.Error("An error occured while sending a webhook", e);
+            }
+            finally
+            {
+                await StoreResponseOnWebhookSendAttemptAsync(webhookSendAttemptId, webhookSenderArgs.TenantId, statusCode, content);
+            }

             if (!isSucceed)
             {
@@ -112,9 +117,9 @@

             AddAdditionalHeaders(request, webhookSenderArgs);

-            bool isSucceed;
-            HttpStatusCode? statusCode;
-            string content;
+            bool isSucceed = false;
+            HttpStatusCode? statusCode = null;
+            string content = FailedRequestDefaultContent;

             try
             {
@@ -127,16 +132,19 @@
             {
                 statusCode = HttpStatusCode.RequestTimeout;
                 content = "Request Timeout";
-                isSucceed = false;
             }
             catch (HttpRequestException e)
             {
                 content = e.Message;
-                statusCode = null;
-                isSucceed = false;
-            }
-
-            StoreResponseOnWebhookSendAttempt(webhookSendAttemptId, webhookSenderArgs.TenantId, statusCode, content);
+            }
+            catch (Exception e)
+            {
+                Logger.Error("An error occured while sending a webhook", e);
+            }
+            finally
+            {
+                StoreResponseOnWebhookSendAttempt(webhookSendAttemptId, webhookSenderArgs.TenantId, statusCode, content);
+            }

             if (!isSucceed)
             {


Preserve old ShowSnippets behavior.

Preserve old ShowSnippets behavior.

--- src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
+++ src/VisualStudio/CSharp/Impl/Options/AutomationObject.cs
@@ -328,10 +328,26 @@
             set { }
         }

+        [Obsolete("Use SnippetsBehavior instead")]
         public int ShowSnippets
         {
-            get { return this.SnippetsBehavior; }
-            set { this.SnippetsBehavior = value; }
+            get
+            {
+                return GetOption(CompletionOptions.SnippetsBehavior) == SnippetsRule.AlwaysInclude
+                    ? 1 : 0;
+            }
+
+            set
+            {
+                if (value == 0)
+                {
+                    SetOption(CompletionOptions.SnippetsBehavior, SnippetsRule.NeverInclude);
+                }
+                else
+                {
+                    SetOption(CompletionOptions.SnippetsBehavior, SnippetsRule.AlwaysInclude);
+                }
+            }
         }

         public int SortUsings_PlaceSystemFirst


修改开始逻辑

修改开始逻辑

--- GreatEchoWall/MainWindow.xaml.cs
+++ GreatEchoWall/MainWindow.xaml.cs
@@ -49,14 +49,39 @@

         private void startButton_Click(object sender, RoutedEventArgs e)
         {
-            var name = nameBox.Text;
+            var name = string.IsNullOrEmpty(nameBox.Text) ? nameBox.Text : "未命名";
             var time = DateTime.Now.ToString("yyyyMMddHHmmss");
-            var remoteAddress = serverIpBox.Text;
-            var remotePort = serverPortBox.Text;
+
+            IPAddress remoteAddress;
+            if (!IPAddress.TryParse(serverIpBox.Text, out remoteAddress))
+            {
+                MessageBox.Show("服务器IP地址（" + serverIpBox.Text + "）不是有效的IP地址！");
+                return;
+            }
+
+            int remotePort;
+            if (!int.TryParse(serverPortBox.Text, out remotePort) || remotePort <= 0 || remotePort >= 65536)
+            {
+                MessageBox.Show("服务器端口号（" + serverPortBox.Text + "）不是有效的端口号！");
+                return;
+            }
+
+            if (!(tcpBox.IsChecked ?? false) && !(udpBox.IsChecked ?? false))
+            {
+                MessageBox.Show("未选择协议类型！");
+                return;
+            }
+
+            int times;
+            if (!int.TryParse(timesBox.Text, out times) || times <= 0 || times >= 65536)
+            {
+                MessageBox.Show("传输次数（" + timesBox.Text + "）非法！");
+                return;
+            }
+
             var message = messageBox.Text;
-            var times = timesBox.Text;

-            IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Parse(remoteAddress), int.Parse(remotePort));
+            IPEndPoint remoteEndPoint = new IPEndPoint(remoteAddress, remotePort);
             IPEndPoint localEndPoint;

             if (tcpBox.IsChecked ?? false)
@@ -68,7 +93,7 @@
             {
                 var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
             }
-
+
         }

         private void resetButton_Click(object sender, RoutedEventArgs e)


Slight tweaks to the default toggle switch display.

--- Gui/ToggleSwitch/ToggleSwitch.cs
+++ Gui/ToggleSwitch/ToggleSwitch.cs
@@ -106,8 +106,9 @@
 			}
 			RectangleDouble border = getSwitchBounds ();
 			border.Inflate (-3);
-			graphics2D.Rectangle (border, ExteriorColor,2);
+			graphics2D.Rectangle (border, ExteriorColor,1);
 			graphics2D.FillRectangle (getThumbBounds(), ThumbColor);
+            graphics2D.Rectangle(getThumbBounds(), new RGBA_Bytes(255,255,255,90), 1);

 		}//end DrawAfterChildren


Cleaning-up

Cleaning-up

--- HTML.WPF.Component/HTMLWindow.cs
+++ HTML.WPF.Component/HTMLWindow.cs
@@ -1,10 +1,7 @@
 using System;
 using System.Threading.Tasks;
-
 using MVVM.HTML.Core;
-using MVVM.HTML.Core.Binding;
 using MVVM.HTML.Core.Navigation;
-

 namespace HTML_WPF.Component
 {
@@ -18,13 +15,10 @@

         public HTMLWindow(IUrlSolver iIUrlSolver) : base(iIUrlSolver)
         {
-            _INavigationBuilder = iIUrlSolver as INavigationBuilder;
+            NavigationBuilder = iIUrlSolver as INavigationBuilder;
         }

-        public INavigationBuilder NavigationBuilder
-        {
-            get { return _INavigationBuilder; }
-        }
+        public INavigationBuilder NavigationBuilder { get; private set; }

         public async Task NavigateAsync(object iViewModel, string Id = null, JavascriptBindingMode iMode = JavascriptBindingMode.TwoWay)
         {


Fixed error with a new rotation list - first time creation with all zero seniority

--- Server/src/HETSAPI/Services.Impl/RentalRequestService.cs
+++ Server/src/HETSAPI/Services.Impl/RentalRequestService.cs
@@ -1039,7 +1039,8 @@

             // *******************************************************************************
             // get the equipment based on the current seniority list for the area
-            // (and sort the results based on seniority)
+            // (and sort the results based on block then
+            //      numberinblock -> ensures consistency with the UI)
             // *******************************************************************************
             for (int currentBlock = 1; currentBlock <= numberOfBlocks; currentBlock++)
             {
@@ -1049,7 +1050,7 @@
                                 x.BlockNumber == currentBlock &&
                                 x.LocalArea.Id == item.LocalArea.Id &&
                                 x.Status.Equals("Approved", StringComparison.InvariantCultureIgnoreCase))
-                    .OrderByDescending(x => x.Seniority)
+                    .OrderBy(x => x.NumberInBlock)
                     .ToList();

                 int listSize = blockEquipment.Count;