add StrokeDashOffset support for shapes

add StrokeDashOffset support for shapes

--- src/Avalonia.Controls/Shapes/Shape.cs
+++ src/Avalonia.Controls/Shapes/Shape.cs
@@ -20,7 +20,10 @@
             AvaloniaProperty.Register<Shape, IBrush>(nameof(Stroke));

         public static readonly StyledProperty<AvaloniaList<double>> StrokeDashArrayProperty =
-            AvaloniaProperty.Register<Shape, AvaloniaList<double>>("StrokeDashArray");
+            AvaloniaProperty.Register<Shape, AvaloniaList<double>>(nameof(StrokeDashArray));
+
+        public static readonly StyledProperty<double> StrokeDashOffsetProperty =
+            AvaloniaProperty.Register<Shape, double>(nameof(StrokeDashOffset));

         public static readonly StyledProperty<double> StrokeThicknessProperty =
             AvaloniaProperty.Register<Shape, double>(nameof(StrokeThickness));
@@ -103,6 +106,12 @@
             get { return GetValue(StrokeDashArrayProperty); }
             set { SetValue(StrokeDashArrayProperty, value); }
         }
+
+        public double StrokeDashOffset
+        {
+            get { return GetValue(StrokeDashOffsetProperty); }
+            set { SetValue(StrokeDashOffsetProperty, value); }
+        }

         public double StrokeThickness
         {
@@ -124,7 +133,7 @@

             if (geometry != null)
             {
-                var pen = new Pen(Stroke, StrokeThickness, new DashStyle(StrokeDashArray),
+                var pen = new Pen(Stroke, StrokeThickness, new DashStyle(StrokeDashArray, StrokeDashOffset),
                     StrokeDashCap, StrokeStartLineCap, StrokeEndLineCap, StrokeJoin);
                 context.DrawGeometry(Fill, pen, geometry);
             }


Remove commented-out code.

Remove commented-out code.

--- src/Avalonia.Styling/Styling/Style.cs
+++ src/Avalonia.Styling/Styling/Style.cs
@@ -145,11 +145,6 @@
                 throw new InvalidOperationException("The Style already has a parent.");
             }

-            if (parent == null)
-            {
-                //Detach();
-            }
-
             _parent = parent;
         }


Alteração no arquivo CNAB 400 da Sicredi permitindo valor de Juros Mora por Percentual além do Valor.

--- src/Boleto.Net/Banco/Banco_Sicredi.cs
+++ src/Boleto.Net/Banco/Banco_Sicredi.cs
@@ -753,7 +753,21 @@
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0005, 012, 0, string.Empty, ' '));                              //005-016
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0017, 001, 0, "A", ' '));                                       //017-017  Tipo de moeda: 'A' - REAL
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0018, 001, 0, "A", ' '));                                       //018-018  Tipo de desconto: 'A' - VALOR
-                reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0019, 001, 0, "A", ' '));                                       //019-019  Tipo de juros: 'A' - VALOR
+                #region Cdigo de Juros
+                string CodJuros = "A";
+                decimal ValorOuPercJuros = 0;
+                if (boleto.JurosMora > 0)
+                {
+                    CodJuros = "A";
+                    ValorOuPercJuros = boleto.JurosMora;
+                }
+                else if (boleto.PercJurosMora > 0)
+                {
+                    CodJuros = "B";
+                    ValorOuPercJuros = boleto.PercJurosMora;
+                }
+                #endregion
+                reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0019, 001, 0, CodJuros, ' '));                                  //019-019  Tipo de juros: 'A' - VALOR / 'B' PERCENTUAL
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0020, 028, 0, string.Empty, ' '));                              //020-047
                 #region Nosso Nmero + DV
                 boleto.DigitoNossoNumero = DigNossoNumeroSicredi(boleto);
@@ -800,7 +814,7 @@
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0157, 002, 0, vInstrucao1, '0'));                               //157-158
                 reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediAlphaAliEsquerda_____, 0159, 002, 0, vInstrucao2, '0'));                               //159-160
                 #endregion
-                reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediNumericoSemSeparador_, 0161, 013, 2, boleto.JurosMora, '0'));                          //161-173
+                reg.CamposEDI.Add(new TCampoRegistroEDI(TTiposDadoEDI.ediNumericoSemSeparador_, 0161, 013, 2, ValorOuPercJuros, '0'));                          //161-173 Valor/% de juros por dia de atraso
                 #region DataDesconto
                 string vDataDesconto = "000000";
                 if (!boleto.DataDesconto.Equals(DateTime.MinValue))


Added example code for globbing aliases

Added example code for globbing aliases

--- src/Cake.Common/IO/GlobbingAliases.cs
+++ src/Cake.Common/IO/GlobbingAliases.cs
@@ -18,6 +18,15 @@
         /// <param name="context">The context.</param>
         /// <param name="pattern">The glob pattern to match.</param>
         /// <returns>A <see cref="FilePathCollection" />.</returns>
+        /// <example>
+        ///
+        /// var files = GetFiles("./**/Cake.*.dll");
+        /// foreach(var file in files)
+        /// {
+        ///     Information("File: {0}", file);
+        /// }
+        ///
+        /// </example>
         [CakeMethodAlias]
         [CakeAliasCategory("Files")]
         public static FilePathCollection GetFiles(this ICakeContext context, string pattern)
@@ -37,6 +46,15 @@
         /// <param name="context">The context.</param>
         /// <param name="pattern">The glob pattern to match.</param>
         /// <returns>A <see cref="DirectoryPathCollection" />.</returns>
+        /// <example>
+        ///
+        /// var directories = GetDirectories("./src/**/obj/*");
+        /// foreach(var directory in directories)
+        /// {
+        ///     Information("Directory: {0}", directory);
+        /// }
+        ///
+        /// </example>
         [CakeMethodAlias]
         [CakeAliasCategory("Directories")]
         public static DirectoryPathCollection GetDirectories(this ICakeContext context, string pattern)


Writing messages to designated output pane.

--- project/dexter-vs/dexter-vs/UI/DexterCommand.cs
+++ project/dexter-vs/dexter-vs/UI/DexterCommand.cs
@@ -11,6 +11,8 @@
 using Microsoft.VisualStudio.Shell.Interop;
 using dexter_vs.Analysis;
 using System.Collections.Generic;
+using EnvDTE80;
+using EnvDTE;

 namespace dexter_vs.UI
 {
@@ -55,6 +57,7 @@
                 var menuItem = new MenuCommand(this.MenuItemCallback, menuCommandID);
                 commandService.AddCommand(menuItem);
             }
+
         }

         /// <summary>
@@ -97,19 +100,33 @@
         {
             Dexter dexter = new Dexter("D:/Applications/dexter/0.9.2/dexter-cli_0.9.2_32/bin/dexter-executor.jar");

+            OutputWindowPane outputPane = CreatePane("Dexter");
+            outputPane.Activate();
+
+            outputPane.OutputString("Analysis started!");
             List<Defect> defects = dexter.Analyse();
+            outputPane.OutputString("Analysis finished!");
+        }

-            string message = string.Format("Dexster Analysis Peformed! \n Found defects: {0}", defects.Count);
-            string title = "";
-
-            // Show a message box to prove we were here
-            VsShellUtilities.ShowMessageBox(
-                this.ServiceProvider,
-                message,
-                title,
-                OLEMSGICON.OLEMSGICON_INFO,
-                OLEMSGBUTTON.OLEMSGBUTTON_OK,
-                OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
+        /// <summary>
+        /// Creates (or returns, if exists) Output Pane
+        /// </summary>
+        /// <param name="title">Pane title</param>
+        private OutputWindowPane CreatePane(string title)
+        {
+            DTE2 dte = (DTE2)ServiceProvider.GetService(typeof(DTE));
+            OutputWindowPanes panes = dte.ToolWindows.OutputWindow.OutputWindowPanes;
+
+            try
+            {
+                // If the pane exists already, write to it.
+                return panes.Item(title);
+            }
+            catch (ArgumentException)
+            {
+                // Create a new pane and write to it.
+                return panes.Add(title);
+            }
         }
     }
 }


Pack additional useful data into char's "Unicode categories" RVA static info (#26848)

Also improves the performance of char.IsWhiteSpace / char.IsUpper / char.IsLower

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/Char.cs
+++ src/Common/src/CoreLib/System/Char.cs
@@ -37,46 +37,45 @@
         // The minimum character value.
         public const char MinValue = (char)0x00;

-        // Unicode category values from Unicode U+0000 ~ U+00FF. Store them in byte[] array to save space.
-        private static ReadOnlySpan<byte> CategoryForLatin1 => new byte[] { // uses C# compiler's optimization for static byte[] data
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0000 - 0007
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0008 - 000F
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0010 - 0017
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0018 - 001F
-            (byte)UnicodeCategory.SpaceSeparator, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.CurrencySymbol, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation,    // 0020 - 0027
-            (byte)UnicodeCategory.OpenPunctuation, (byte)UnicodeCategory.ClosePunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.DashPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation,    // 0028 - 002F
-            (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber,    // 0030 - 0037
-            (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.DecimalDigitNumber, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.OtherPunctuation,    // 0038 - 003F
-            (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter,    // 0040 - 0047
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter,    // 0048 - 004F
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter,    // 0050 - 0057
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.OpenPunctuation, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.ClosePunctuation, (byte)UnicodeCategory.ModifierSymbol, (byte)UnicodeCategory.ConnectorPunctuation,    // 0058 - 005F
-            (byte)UnicodeCategory.ModifierSymbol, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 0060 - 0067
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 0068 - 006F
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 0070 - 0077
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.OpenPunctuation, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.ClosePunctuation, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.Control,    // 0078 - 007F
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0080 - 0087
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0088 - 008F
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0090 - 0097
-            (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control, (byte)UnicodeCategory.Control,    // 0098 - 009F
-            (byte)UnicodeCategory.SpaceSeparator, (byte)UnicodeCategory.OtherPunctuation, (byte)UnicodeCategory.CurrencySymbol, (byte)UnicodeCategory.CurrencySymbol, (byte)UnicodeCategory.CurrencySymbol, (byte)UnicodeCategory.CurrencySymbol, (byte)UnicodeCategory.OtherSymbol, (byte)UnicodeCategory.OtherSymbol,    // 00A0 - 00A7
-            (byte)UnicodeCategory.ModifierSymbol, (byte)UnicodeCategory.OtherSymbol, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.InitialQuotePunctuation, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.DashPunctuation, (byte)UnicodeCategory.OtherSymbol, (byte)UnicodeCategory.ModifierSymbol,    // 00A8 - 00AF
-            (byte)UnicodeCategory.OtherSymbol, (byte)UnicodeCategory.MathSymbol, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.ModifierSymbol, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.OtherSymbol, (byte)UnicodeCategory.OtherPunctuation,    // 00B0 - 00B7
-            (byte)UnicodeCategory.ModifierSymbol, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.FinalQuotePunctuation, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.OtherNumber, (byte)UnicodeCategory.OtherPunctuation,    // 00B8 - 00BF
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter,    // 00C0 - 00C7
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter,    // 00C8 - 00CF
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.MathSymbol,    // 00D0 - 00D7
-            (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.UppercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 00D8 - 00DF
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 00E0 - 00E7
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 00E8 - 00EF
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.MathSymbol,    // 00F0 - 00F7
-            (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter, (byte)UnicodeCategory.LowercaseLetter,    // 00F8 - 00FF
+        private const byte IsWhiteSpaceFlag = 0x80;
+        private const byte IsUpperCaseLetterFlag = 0x40;
+        private const byte IsLowerCaseLetterFlag = 0x20;
+        private const byte UnicodeCategoryMask = 0x1F;
+
+        // Contains information about the C0, Basic Latin, C1, and Latin-1 Supplement ranges [ U+0000..U+00FF ], with:
+        // - 0x80 bit if set means 'is whitespace'
+        // - 0x40 bit if set means 'is uppercase letter'
+        // - 0x20 bit if set means 'is lowercase letter'
+        // - bottom 5 bits are the UnicodeCategory of the character
+        //
+        // n.b. This data is locked to an earlier version of the Unicode standard (2.0, perhaps?), so
+        // the UnicodeCategory data contained here doesn't necessarily reflect the UnicodeCategory data
+        // contained within the CharUnicodeInfo or Rune types, which generally follow the latest Unicode
+        // standard.
+        private static ReadOnlySpan<byte> Latin1CharInfo => new byte[]
+        {
+            0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x8E, 0x8E, 0x8E, 0x8E, 0x8E, 0x0E, 0x0E, // U+0000..U+000F
+            0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, // U+0010..U+001F
+            0x8B, 0x18, 0x18, 0x18, 0x1A, 0x18, 0x18, 0x18, 0x14, 0x15, 0x18, 0x19, 0x18, 0x13, 0x18, 0x18, // U+0020..U+002F
+            0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18, 0x18, 0x19, 0x19, 0x19, 0x18, // U+0030..U+003F
+            0x18, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // U+0040..U+004F
+            0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x14, 0x18, 0x15, 0x1B, 0x12, // U+0050..U+005F
+            0x1B, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, // U+0060..U+006F
+            0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x14, 0x19, 0x15, 0x19, 0x0E, // U+0070..U+007F
+            0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x8E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, // U+0080..U+008F
+            0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, // U+0090..U+009F
+            0x8B, 0x18, 0x1A, 0x1A, 0x1A, 0x1A, 0x1C, 0x1C, 0x1B, 0x1C, 0x21, 0x16, 0x19, 0x13, 0x1C, 0x1B, // U+00A0..U+00AF
+            0x1C, 0x19, 0x0A, 0x0A, 0x1B, 0x21, 0x1C, 0x18, 0x1B, 0x0A, 0x21, 0x17, 0x0A, 0x0A, 0x0A, 0x18, // U+00B0..U+00BF
+            0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // U+00C0..U+00CF
+            0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x19, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x21, // U+00D0..U+00DF
+            0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, // U+00E0..U+00EF
+            0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x19, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, // U+00F0..U+00FF
         };

         // Return true for all characters below or equal U+00ff, which is ASCII + Latin-1 Supplement.
         private static bool IsLatin1(char ch)
         {
-            return (uint)ch <= '\x00ff';
+            return (uint)ch < (uint)Latin1CharInfo.Length;
         }

         // Return true for all characters below or equal U+007f, which is ASCII.
@@ -88,8 +87,8 @@
         // Return the Unicode category for Unicode character <= 0x00ff.
         private static UnicodeCategory GetLatin1UnicodeCategory(char ch)
         {
-            Debug.Assert(IsLatin1(ch), "char.GetLatin1UnicodeCategory(): ch should be <= 007f");
-            return (UnicodeCategory)CategoryForLatin1[(int)ch];
+            Debug.Assert(IsLatin1(ch), "char.GetLatin1UnicodeCategory(): ch should be <= 00ff");
+            return (UnicodeCategory)(Latin1CharInfo[ch] & UnicodeCategoryMask);
         }

         //
@@ -236,33 +235,17 @@
         {
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    c |= (char)0x20;
-                    return IsInRange(c, 'a', 'z');
-                }
-                return (CheckLetter(GetLatin1UnicodeCategory(c)));
+                // For the version of the Unicode standard the Char type is locked to, the
+                // Latin-1 range doesn't include letters in categories other than "upper" and "lower".
+                return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0;
             }
             return (CheckLetter(CharUnicodeInfo.GetUnicodeCategory(c)));
         }

         private static bool IsWhiteSpaceLatin1(char c)
         {
-            // There are characters which belong to UnicodeCategory.Control but are considered as white spaces.
-            // We use code point comparisons for these characters here as a temporary fix.
-
-            // U+0009 = <control> HORIZONTAL TAB
-            // U+000a = <control> LINE FEED
-            // U+000b = <control> VERTICAL TAB
-            // U+000c = <contorl> FORM FEED
-            // U+000d = <control> CARRIAGE RETURN
-            // U+0085 = <control> NEXT LINE
-            // U+00a0 = NO-BREAK SPACE
-            return
-                c == ' ' ||
-                (uint)(c - '\x0009') <= ('\x000d' - '\x0009') || // (c >= '\x0009' && c <= '\x000d')
-                c == '\x00a0' ||
-                c == '\x0085';
+            Debug.Assert(IsLatin1(c));
+            return (Latin1CharInfo[c] & IsWhiteSpaceFlag) != 0;
         }

         /*===============================ISWHITESPACE===================================
@@ -289,11 +272,7 @@
         {
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    return IsInRange(c, 'A', 'Z');
-                }
-                return (GetLatin1UnicodeCategory(c) == UnicodeCategory.UppercaseLetter);
+                return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0;
             }
             return (CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.UppercaseLetter);
         }
@@ -307,11 +286,7 @@
         {
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    return IsInRange(c, 'a', 'z');
-                }
-                return (GetLatin1UnicodeCategory(c) == UnicodeCategory.LowercaseLetter);
+                return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0;
             }
             return (CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.LowercaseLetter);
         }
@@ -554,12 +529,8 @@
             char c = s[index];
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    c |= (char)0x20;
-                    return IsInRange(c, 'a', 'z');
-                }
-                return (CheckLetter(GetLatin1UnicodeCategory(c)));
+                // The Latin-1 range doesn't include letters in categories other than "upper" and "lower"
+                return (Latin1CharInfo[c] & (IsUpperCaseLetterFlag | IsLowerCaseLetterFlag)) != 0;
             }
             return (CheckLetter(CharUnicodeInfo.GetUnicodeCategory(s, index)));
         }
@@ -591,11 +562,7 @@
             char c = s[index];
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    return IsInRange(c, 'a', 'z');
-                }
-                return (GetLatin1UnicodeCategory(c) == UnicodeCategory.LowercaseLetter);
+                return (Latin1CharInfo[c] & IsLowerCaseLetterFlag) != 0;
             }

             return (CharUnicodeInfo.GetUnicodeCategory(s, index) == UnicodeCategory.LowercaseLetter);
@@ -773,11 +740,7 @@
             char c = s[index];
             if (IsLatin1(c))
             {
-                if (IsAscii(c))
-                {
-                    return IsInRange(c, 'A', 'Z');
-                }
-                return (GetLatin1UnicodeCategory(c) == UnicodeCategory.UppercaseLetter);
+                return (Latin1CharInfo[c] & IsUpperCaseLetterFlag) != 0;
             }

             return (CharUnicodeInfo.GetUnicodeCategory(s, index) == UnicodeCategory.UppercaseLetter);
@@ -792,9 +755,11 @@
                 throw new ArgumentOutOfRangeException(nameof(index));
             }

-            if (IsLatin1(s[index]))
-            {
-                return IsWhiteSpaceLatin1(s[index]);
+            char ch = s[index];
+
+            if (IsLatin1(ch))
+            {
+                return IsWhiteSpaceLatin1(ch);
             }

             return CheckSeparator(CharUnicodeInfo.GetUnicodeCategory(s, index));


remove unused field

remove unused field

--- src/Core/Models/Mail/BaseMailModel.cs
+++ src/Core/Models/Mail/BaseMailModel.cs
@@ -2,8 +2,6 @@
 {
     public class BaseMailModel
     {
-        private string _webVaultUrl;
-
         public string SiteName { get; set; }
         public string WebVaultUrl { get; set; }
     }


Configure SqlServer and remove IISPlatformHandler reference in Startup

--- src/Dangl.WebDocumentation/Startup.cs
+++ src/Dangl.WebDocumentation/Startup.cs
@@ -5,6 +5,7 @@
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
+using Microsoft.EntityFrameworkCore;

 namespace Dangl.WebDocumentation
 {
@@ -31,10 +32,9 @@
         public void ConfigureServices(IServiceCollection services)
         {
             // Add framework services.
-            services.AddEntityFramework()
-                .AddSqlServer()
-                .AddDbContext<ApplicationDbContext>(options =>
-                    options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));
+
+            services.AddDbContext<ApplicationDbContext>(options =>
+                options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));

             services.AddIdentity<ApplicationUser, IdentityRole>()
                 .AddEntityFrameworkStores<ApplicationDbContext>()
@@ -88,8 +88,6 @@
                 }
             }

-            app.UseIISPlatformHandler(options => options.AuthenticationDescriptions.Clear());
-
             app.UseStaticFiles();

             app.UseIdentity();


Changed ForceClient props to be protected

--- src/ForceToolkitForNET/ForceClient.cs
+++ src/ForceToolkitForNET/ForceClient.cs
@@ -13,8 +13,8 @@
 {
     public class ForceClient : IForceClient, IDisposable
     {
-        private readonly XmlHttpClient _xmlHttpClient;
-        private readonly JsonHttpClient _jsonHttpClient;
+        protected readonly XmlHttpClient _xmlHttpClient;
+        protected readonly JsonHttpClient _jsonHttpClient;

         public ForceClient(string instanceUrl, string accessToken, string apiVersion)
             : this(instanceUrl, accessToken, apiVersion, new HttpClient(), new HttpClient())
@@ -73,16 +73,17 @@
             return response;
         }

-		public async Task<T> QueryByIdAsync<T>(string objectName, string recordId)
+        public async Task<T> QueryByIdAsync<T>(string objectName, string recordId)
         {
             if (string.IsNullOrEmpty(objectName)) throw new ArgumentNullException("objectName");
             if (string.IsNullOrEmpty(recordId)) throw new ArgumentNullException("recordId");

-		    var fields = string.Join(", ", typeof(T).GetRuntimeProperties()
-		        .Select(p => {
-		            var customAttribute = p.GetCustomAttribute<DataMemberAttribute>();
-		            return (customAttribute == null || customAttribute.Name == null) ? p.Name : customAttribute.Name;
-		        }));
+            var fields = string.Join(", ", typeof(T).GetRuntimeProperties()
+                .Select(p =>
+                {
+                    var customAttribute = p.GetCustomAttribute<DataMemberAttribute>();
+                    return (customAttribute == null || customAttribute.Name == null) ? p.Name : customAttribute.Name;
+                }));

             var query = string.Format("SELECT {0} FROM {1} WHERE Id = '{2}'", fields, objectName, recordId);
             var results = await QueryAsync<T>(query).ConfigureAwait(false);
@@ -133,7 +134,7 @@

             return _jsonHttpClient.HttpDeleteAsync(string.Format("sobjects/{0}/{1}/{2}", objectName, externalFieldName, externalId));
         }
-
+
         public Task<DescribeGlobalResult<T>> GetObjectsAsync<T>()
         {
             return _jsonHttpClient.HttpGetAsync<DescribeGlobalResult<T>>("sobjects");


CppTypePrinter now prints parameter declaration type.

--- src/Generator/Types/CppTypePrinter.cs
+++ src/Generator/Types/CppTypePrinter.cs
@@ -212,7 +212,7 @@

         public string VisitParameterDecl(Parameter parameter)
         {
-            throw new NotImplementedException();
+            return VisitParameter(parameter, hasName: false);
         }

         public string VisitTypedefDecl(TypedefDecl typedef)


Handle inverse attributes.

Handle inverse attributes.

--- src/IFC-gen/csharp/ExpressListener.cs
+++ src/IFC-gen/csharp/ExpressListener.cs
@@ -328,6 +328,21 @@
 			((Entity)currTypeData).Attributes.Add(cad);
 		}

+		public override void EnterInverseType(ExpressParser.InverseTypeContext context){
+			foreach(var ad in currAttrDatas)
+			{
+				ad.IsCollection = true;
+				ad.Rank ++;
+			}
+		}
+
+		public override void EnterEntityRef(ExpressParser.EntityRefContext context)
+		{
+			foreach(var ad in currAttrDatas){
+				ad.Type = context.SimpleId().GetText();
+			}
+		}
+
 		public override void EnterAttrDef(ExpressParser.AttrDefContext context)
 		{
 			if(context.SimpleId() != null)


Added ContentType to ErrorReport. Closes GH-249

--- src/Jasper/Bus/Runtime/ErrorReport.cs
+++ src/Jasper/Bus/Runtime/ErrorReport.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Net.WebSockets;
+using System.Reflection;
 using Baseline;
 using Microsoft.CodeAnalysis.CSharp.Syntax;
 using Newtonsoft.Json;
@@ -35,8 +36,11 @@
             MessageType = envelope.MessageType;
             Source = envelope.Source;
             Id = envelope.Id;
+            ContentType = envelope.ContentType;

         }
+
+        public string ContentType { get; set; }

         public string Id { get; set; }


POI：bug 58439: rename private FormulaShifter.adjustPtgDueToShiftMove to adjustPtgDueToSheetMove

--- main/SS/Formula/PTG/FormulaShifter.cs
+++ main/SS/Formula/PTG/FormulaShifter.cs
@@ -137,7 +137,7 @@
                 case ShiftMode.Row:
                     return AdjustPtgDueToRowMove(ptg, currentExternSheetIx);
                 case ShiftMode.Sheet:
-                    return AdjustPtgDueToShiftMove(ptg);
+                    return AdjustPtgDueToSheetMove(ptg);
                 default:
                     throw new InvalidOperationException("Unsupported shift mode: " + _mode);
             }
@@ -214,7 +214,7 @@
             }
             return null;
         }
-        private Ptg AdjustPtgDueToShiftMove(Ptg ptg)
+        private Ptg AdjustPtgDueToSheetMove(Ptg ptg)
         {
             Ptg updatedPtg = null;
             if (ptg is Ref3DPtg)


tidy up formatting

tidy up formatting

--- SampleWebApp/Infrastructure/WebUiInitialise.cs
+++ SampleWebApp/Infrastructure/WebUiInitialise.cs
@@ -76,8 +76,6 @@
                 default:
                     throw new ArgumentOutOfRangeException("hostType");
             }
-
         }
-
     }
 }


modify

modify

--- Samples/MP/Senparc.Weixin.Sample.MP/Program.cs
+++ Samples/MP/Senparc.Weixin.Sample.MP/Program.cs
@@ -33,7 +33,7 @@
 #region ʹ MessageHadler мȡ Controller

 //MessageHandler мܣhttps://www.cnblogs.com/szw/p/Wechat-MessageHandler-Middleware.html
-//ʹùںŵ MessageHandler мҪ Controller                       --DPBMARK MP
+//ʹùںŵ MessageHandler мҪ Controller
 app.UseMessageHandlerForMp("/WeixinAsync", CustomMessageHandler.GenerateMessageHandler, options =>
 {
     options.AccountSettingFunc = context => Senparc.Weixin.Config.SenparcWeixinSetting;


Build fix.

Build fix.

--- Samples/SmartCom/SampleSmartSMA/SmaStrategy.cs
+++ Samples/SmartCom/SampleSmartSMA/SmaStrategy.cs
@@ -15,6 +15,8 @@
 #endregion S# License
 namespace SampleSmartSMA
 {
+	using System;
+
 	using Ecng.Common;

 	using StockSharp.Algo;


Rename Setup method, fix hidden inherited member

--- SeleniumExtension.Tests/Elements/TableTests.cs
+++ SeleniumExtension.Tests/Elements/TableTests.cs
@@ -68,7 +68,7 @@
         public TablesPage Page;

         [SetUp]
-        public void SetupTest()
+        public void SetupTableTests()
         {
             Driver.Navigate().GoToUrl(TablesPage.Url);
             Page = new TablesPage(Driver);


Added Alt, Width and Height properties to CustomCollectionImage.

--- ShopifySharp/Entities/CustomCollectionImage.cs
+++ ShopifySharp/Entities/CustomCollectionImage.cs
@@ -21,9 +21,27 @@
         public string Src { get; set; }

         /// <summary>
+        /// Alternative text that describes the collection image.
+        /// </summary>
+        [JsonProperty("alt")]
+        public string Alt { get; set; }
+
+        /// <summary>
         /// The date the image was created.
         /// </summary>
         [JsonProperty("created_at")]
         public DateTimeOffset? Created_At { get; set; }
+
+        /// <summary>
+        /// Width of the image in pixels.
+        /// </summary>
+        [JsonProperty("width")]
+        public int Width { get; set; }
+
+        /// <summary>
+        /// Height of the image in pixels.
+        /// </summary>
+        [JsonProperty("height")]
+        public int Height { get; set; }
     }
 }


fixes all around

fixes all around

--- MiningStationAutomation.cs
+++ MiningStationAutomation.cs
@@ -22,6 +22,9 @@
         *
         */

+        //TODO: fix shutdown trigger
+        //TODO: fix percentage done
+        //TODO: fix ETA
         #region Proggrammable block script
         #region Config
         //OPERATIONAL
@@ -32,6 +35,7 @@
         const bool FORCEROTOR_TORQUE = true;
         const bool INIT_FLATTENING = true; // safety precaoution
         const bool END_FLATTENING = true; //flatten pit bottom to allow cars to drive more easily;
+
         //BLOCK SETUP
         const string ROTOR_NAME = "Drill Rotor";
         const string H_PISTON_NAME = "Horizontal Piston";
@@ -74,7 +78,7 @@

             if (initflattening)
             {
-                FlattenignCircles();
+                FlatteningCircles();
                 return;
             }

@@ -89,13 +93,13 @@
             {
                 if (endflattening)
                 {
-                    FlattenignCircles(TARGET_DEPTH);
+                    FlatteningCircles(TARGET_DEPTH);
                     //the we are doen with the endflattening
                     if (currentCircle < 0)
                     {
                         endflattening = false;
                     }
-
+
                     return;
                 }
                 else {
@@ -200,7 +204,7 @@
                 //move to the start position
                 ToCurrentCircleDrillRadiusStartPosition();

-                //if to start is false, the we are at the starting position, set the current index to 0
+                //if movingToPosition is false, the we are at the starting position, set the current index to 0
                 if (!movingToPosition)
                 {
                     //ínit is done
@@ -224,54 +228,59 @@
             }
             else
             {
-                Echo(string.Format("staring drilling circle {0}/{1}, do currentCurcle++ and performing ToStart()", currentCircle + 1, DRILL_RADII.Count));
-
                 if (currentCircle < DRILL_RADII.Count)
                 {
                     SetStatusToAntenna(string.Format("DRILLING {0}/{1}", currentCircle + 1, DRILL_RADII.Count));

-                    //start the rotor
-                    RemoveRotorLimits();
-                    setRotorSpeed(ROTOR_RPM);
-
-                    if (DEBUG)
-                        OutputToDebug(string.Format("Drilling circle {0}", currentCircle));
-
-                    //Move the horizontal piston to the circle defined
-                    if (DEBUG)
-                        OutputToDebug(string.Format("trying to access DRILL_RADII witj index {0} [2]", currentCircle));
-
-                    MovePistonToPosition(HorizontalPiston, DRILL_RADII[currentCircle]);
-
-                    //move the vertical positions
-                    if (DEBUG)
-                        OutputToDebug(string.Format("Target depth: {0}\nCurrent depth: {1}", TARGET_DEPTH, GetPistonsTotalPosition(VerticalPistons)));
-
-                    MovePistonToPosition(VerticalPistons, TARGET_DEPTH, DRILL_DOWN_SPEED);
-
-                    if (TARGET_DEPTH <= GetPistonsTotalPosition(VerticalPistons))
+                    //if movingToPosition is false, the we are at the starting position, set the current index to 0
+                    if (!movingToPosition)
                     {
+                        //start the rotor
+                        RemoveRotorLimits();
+                        setRotorSpeed(ROTOR_RPM);
+
                         if (DEBUG)
-                            OutputToDebug("All pistons reached max depth, returning to start position");
-
-                        Echo(string.Format("Done drilling circle {0}/{1}, do currentCurcle++ and performing ToStart()", currentCircle + 1, DRILL_RADII.Count));
-
-                        currentCircle++;
-
-                        if (!(currentCircle >= DRILL_RADII.Count))
+                            OutputToDebug(string.Format("Drilling circle {0}", currentCircle));
+
+                        //Move the horizontal piston to the circle defined
+                        if (DEBUG)
+                            OutputToDebug(string.Format("trying to access DRILL_RADII witj index {0} [2]", currentCircle));
+
+                        MovePistonToPosition(HorizontalPiston, DRILL_RADII[currentCircle]);
+
+                        //move the vertical positions
+                        if (DEBUG)
+                            OutputToDebug(string.Format("Target depth: {0}\nCurrent depth: {1}", TARGET_DEPTH, GetPistonsTotalPosition(VerticalPistons)));
+
+                        MovePistonToPosition(VerticalPistons, TARGET_DEPTH, DRILL_DOWN_SPEED);
+
+                        if (TARGET_DEPTH <= GetPistonsTotalPosition(VerticalPistons))
                         {
-                            ToCurrentCircleDrillRadiusStartPosition();
+                            if (DEBUG)
+                                OutputToDebug("All pistons reached max depth, returning to start position");
+
+                            Echo(string.Format("Done drilling circle {0}/{1}, do currentCurcle++ and performing ToStart()", currentCircle + 1, DRILL_RADII.Count));
+
+                            currentCircle++;
+
+                            if (currentCircle < DRILL_RADII.Count)
+                            {
+                                ToCurrentCircleDrillRadiusStartPosition();
+                            }
                         }
                     }
+                    else
+                    {
+                        ToCurrentCircleDrillRadiusStartPosition();
+                    }
                 }
                 else
                 {
                     OutputToDebug("Drill sequece, closure");
                     SetStatusToAntenna(string.Format("DRILLING-END"));

-                    Echo(string.Format("Done drilling, move to position [0,0,0]"));
                     //move to the start position
-                    ToPosition(0, 0, 0);
+                    movingToPosition = ToPosition(0, 0, 0);

                     //if to start is false, the we are at the starting position, turn off all unneeded devices to concerve energy
                     if (!movingToPosition)
@@ -289,7 +298,7 @@
             }
         }

-        void FlattenignCircles(float depth = 0f)
+        void FlatteningCircles(float depth = 0f)
         {
             //clear the output screen
             ClearDebug();
@@ -300,7 +309,7 @@
                 OutputToDebug(string.Format("Current circle: {0}", currentCircle));
             }

-            SetStatusToAntenna("FLATTENING", false);
+            SetStatusToAntenna(string.Format("FLATTENING [{0}/{1}]", currentCircle + 1, DRILL_RADII.Count), false);

             var currentRotorposition = GetRotorPosition();

@@ -383,67 +392,61 @@

         bool ToPosition(float width, float depth, float rotation)
         {
-            bool working = false;
+            var working = false;

             ClearDebug();

             if (DEBUG)
             {
                 OutputToDebug(string.Format("moving to position width: {0}, depth: {1}, rotation: {2}", width, depth, rotation));
-                OutputToDebug(string.Format("Action in progress: {0}", working));
                 OutputToDebug("stopping rotor and turning on drills");
             }

             setRotorSpeed(0f);
+
+            var moveVertical = GetPistonsTotalPosition(VerticalPistons) != depth;
+            var moveHorizontal = HorizontalPiston.CurrentPosition != width;
+            var moveCircle = GetRotorPosition() != rotation;
+
+            if (DEBUG)
+            {
+                OutputToDebug(string.Format("need to move vertical Positons: {0}", moveVertical));
+                OutputToDebug(string.Format("need to move horizontal Positons: {0}", moveHorizontal));
+                OutputToDebug(string.Format("need to move rotor: {0}", moveCircle));
+            }
+
+            setRotorSpeed(0f);
+
+            working = moveVertical || moveHorizontal || moveCircle;

             //If the drills ar not on, turn on
             Drills.ForEach(drill => drill.GetActionWithName("OnOff_On").Apply(drill));

-            if (DEBUG)
-                OutputToDebug(string.Format("Action in progress: {0}", working));
-
             //While the vPistons are not in position, move
-            {
-                if (GetPistonsTotalPosition(VerticalPistons) != depth)
-                {
-                    MovePistonToPosition(VerticalPistons, depth);
-                    working = true;
-                }
-            }
-            if (DEBUG)
-                OutputToDebug(string.Format("Action in progress: {0}", working));
-
-            //if working, stop method
-            if (working)
-                return working;
-
-            //When the hPistons are retracted, retract the hPiston
-            if (HorizontalPiston.CurrentPosition != 0)
+            if (moveVertical)
+            {
+                MovePistonToPosition(VerticalPistons, depth);
+                return true;
+            }
+
+            //When the hPistons are not in position, move
+            if (moveHorizontal)
             {
                 MovePistonToPosition(HorizontalPiston, width);
-                working = true;
-            }
-
-            if (DEBUG)
-                OutputToDebug(string.Format("Action in progress: {0}", working));
-
-            //if working, stop method
-            if (working)
-                return working;
+                return true;
+            }

             //move rotor to position
-            if (GetRotorPosition() != rotation)
+            if (moveCircle)
             {
                 MoveRotorToPosition(rotation);
-                working = true;
-            }
-
-            if (DEBUG)
-                OutputToDebug(string.Format("reached end of ToPosition, work in progress: {0}", working));
-
-            movingToPosition = working;
-
-            return movingToPosition;
+                return true;
+            }
+
+            if (DEBUG)
+                OutputToDebug("reached end of ToPosition, no more moving to be done");
+
+            return working;
         }

         void ToCurrentCircleDrillRadiusStartPosition()
@@ -624,7 +627,7 @@

             if (Antennas != null)
             {
-                Antennas.ForEach(antenna => antenna.SetCustomName(string.Format(antennaName, DRILL_STATION_NAME, status, getPercentageDone(), GetETA())));
+                Antennas.ForEach(antenna => antenna.SetCustomName(string.Format(antennaName, DRILL_STATION_NAME, status, GetPercentageDone(), GetETA())));
             }
         }

@@ -807,7 +810,7 @@
                 return "UNKNOWN";
             }
         }
-        float getPercentageDone()
+        float GetPercentageDone()
         {
             if (VerticalPistons != null)
             {


Make sure that the stream passed in ctor can be seeked and read

--- Mlabs.Ogg/src/OggReader.cs
+++ Mlabs.Ogg/src/OggReader.cs
@@ -20,6 +20,9 @@
         public OggReader(Stream fileStream)
         {
             if (fileStream == null) throw new ArgumentNullException("fileStream");
+            if (!fileStream.CanSeek) throw new ArgumentException("Stream must be seekable", "fileStream");
+            if (!fileStream.CanRead) throw new ArgumentException("Stream must be readable", "fileStream");
+
             m_fileStream = fileStream;
             m_owns = false;
         }
@@ -32,7 +35,7 @@
             var p = new PageReader();
             //read pages and break them down to streams
             var pages = p.ReadPages(m_fileStream).GroupBy(e => e.StreamSerialNumber);
-
+

             if (m_owns)
             {


Removed static field (NewLine) that was never used.

git-svn-id: 7230453ef4d2e9c957b80d4737114f575fc9f7f8@332750 13f79535-47bb-0310-9956-ffa450edef68

--- src/ObjectRenderer/DefaultRenderer.cs
+++ src/ObjectRenderer/DefaultRenderer.cs
@@ -40,8 +40,6 @@
 	/// <author>Gert Driesen</author>
 	public sealed class DefaultRenderer : IObjectRenderer
 	{
-		private static readonly string NewLine = SystemInfo.NewLine;
-
 		#region Constructors

 		/// <summary>


Remove [MethodImpl(MethodImplOptions.AggressiveInlining)] to avoid potential issue to support 3.5

--- src/TraceEvent/TraceLoggingEventId.cs
+++ src/TraceEvent/TraceLoggingEventId.cs
@@ -24,7 +24,6 @@
         /// Checks to see if eventRecord has TraceLogging meta data associated with it (EVENT_HEADER_EXT_TYPE_EVENT_SCHEMA_TL)
         /// and if so updates EventHeader.Id to be an event ID unique to that provider/opcode/meta-data blob.
         /// </summary>
-        [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public void TestForTraceLoggingEventAndFixupIfNeeded(TraceEventNativeMethods.EVENT_RECORD* eventRecord)
         {
             // This method is designed to be inlined and thus have very low overhead for the non-tracelogging case.


Update Vacancy.cshtml

Update Vacancy.cshtml

--- src/WebSite/Views/Home/Vacancy.cshtml
+++ src/WebSite/Views/Home/Vacancy.cshtml
@@ -12,12 +12,13 @@

Vacancy

-
@Model.Title
+
@Model.Title
 @if (!Model.Active) {
     Archived
 }
-

-
@Model.Company

+

+
+
@Model.Company

     @Model.Date.ToString("MMMM dd, yyyy")


Add tests

Add tests

--- Moq.Tests/VerifyFixture.cs
+++ Moq.Tests/VerifyFixture.cs
@@ -1091,6 +1091,117 @@
 			Assert.Contains("setup for getter:", exception.Message);
 		}

+		[Fact]
+		public void Verify_if_successful_marks_matched_invocation_as_verified()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Submit();
+
+			var invocation = mock.Invocations.ToArray()[0];
+			Assert.False(invocation.Verified);
+
+			mock.Verify(m => m.Submit());
+			Assert.True(invocation.Verified);
+		}
+
+		[Fact]
+		public void Verify_if_successful_marks_only_matched_invocations_as_verified()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			mock.Object.Echo(2);
+			mock.Object.Echo(3);
+
+			var invocations = mock.Invocations.ToArray();
+			Assert.False(invocations[0].Verified);
+			Assert.False(invocations[1].Verified);
+			Assert.False(invocations[2].Verified);
+
+			mock.Verify(m => m.Echo(It.Is<int>(i => i != 2)));
+			Assert.True(invocations[0].Verified);
+			Assert.False(invocations[1].Verified);
+			Assert.True(invocations[2].Verified);
+		}
+
+		[Fact]
+		public void Verify_if_unsuccessful_marks_no_matched_invocations_as_verified()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			mock.Object.Echo(2);
+			mock.Object.Echo(3);
+
+			var invocations = mock.Invocations.ToArray();
+			Assert.False(invocations[0].Verified);
+			Assert.False(invocations[1].Verified);
+			Assert.False(invocations[2].Verified);
+
+			Assert.Throws<MockException>(() => mock.Verify(m => m.Echo(It.Is<int>(i => i != 2)), Times.Exactly(1)));
+			Assert.False(invocations[0].Verified);
+			Assert.False(invocations[1].Verified);
+			Assert.False(invocations[2].Verified);
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_succeeds_if_no_calls_were_made()
+		{
+			var mock = new Mock<IFoo>();
+			mock.VerifyNoOtherCalls();
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_fails_if_an_unverified_call_was_made()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			Assert.Throws<MockException>(() => mock.VerifyNoOtherCalls());
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_includes_unverified_calls_in_exception_message()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			var ex = Assert.Throws<MockException>(() => mock.VerifyNoOtherCalls());
+			Assert.Contains(".Echo(1)", ex.Message);
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_succeeds_if_a_verified_call_was_made()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			mock.Verify(m => m.Echo(1));
+			mock.VerifyNoOtherCalls();
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_succeeds_if_several_verified_call_were_made()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			mock.Object.Echo(2);
+			mock.Object.Echo(3);
+			mock.Object.Submit();
+			mock.Verify(m => m.Echo(It.IsAny<int>()));
+			mock.Verify(m => m.Submit());
+			mock.VerifyNoOtherCalls();
+		}
+
+		[Fact]
+		public void VerifyNoOtherCalls_fails_if_several_verified_calls_and_several_unverified_call_were_made()
+		{
+			var mock = new Mock<IFoo>();
+			mock.Object.Echo(1);
+			mock.Object.Echo(2);
+			mock.Object.Echo(3);
+			mock.Object.Submit();
+			mock.Verify(m => m.Echo(It.Is<int>(i => i > 1)));
+			var ex = Assert.Throws<MockException>(() => mock.VerifyNoOtherCalls());
+			Assert.Contains(".Echo(1)", ex.Message);
+			Assert.Contains(".Submit()", ex.Message);
+		}
+
 		public interface IBar
 		{
 			int? Value { get; set; }


Add code to optionally interact with the MobileMiner API async (enabled)

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -1694,6 +1694,7 @@

         private const string mobileMinerApiKey = "P3mVX95iP7xfoI";
         private const string mobileMinerUrl = "https://api.mobileminerapp.com";
+        private const bool mobileMinerAsync = true;

         //don't show a dialog for a 403 after successful submissions.
         //it's not ideal but there have been two reports now of this
@@ -1744,33 +1745,50 @@

             if (statisticsList.Count > 0)
             {
-                try
-                {
-                    MobileMiner.Api.ApiContext.SubmitMiningStatistics(mobileMinerUrl, mobileMinerApiKey,
-                        applicationConfiguration.MobileMinerEmailAddress, applicationConfiguration.MobileMinerApplicationKey,
-                        Environment.MachineName, statisticsList);
-                    mobileMinerSuccess = true;
-                }
-                catch (WebException ex)
-                {
-                    //could be error 400, invalid app key, error 500, internal error, Unable to connect, endpoint down
-                    HttpWebResponse response = ex.Response as HttpWebResponse;
-                    if (response != null)
+                if (mobileMinerAsync)
+                {
+                    if (submitMiningStatisticsDelegate == null)
+                        submitMiningStatisticsDelegate = SubmitMiningStatistics;
+
+                    submitMiningStatisticsDelegate.BeginInvoke(statisticsList, null, null);
+                }
+                else
+                {
+                    SubmitMiningStatistics(statisticsList);
+                }
+            }
+        }
+
+        private Action<List<MultiMiner.MobileMiner.Api.MiningStatistics>> submitMiningStatisticsDelegate;
+
+        private void SubmitMiningStatistics(List<MultiMiner.MobileMiner.Api.MiningStatistics> statisticsList)
+        {
+            try
+            {
+                MobileMiner.Api.ApiContext.SubmitMiningStatistics(mobileMinerUrl, mobileMinerApiKey,
+                    applicationConfiguration.MobileMinerEmailAddress, applicationConfiguration.MobileMinerApplicationKey,
+                    Environment.MachineName, statisticsList);
+                mobileMinerSuccess = true;
+            }
+            catch (WebException ex)
+            {
+                //could be error 400, invalid app key, error 500, internal error, Unable to connect, endpoint down
+                HttpWebResponse response = ex.Response as HttpWebResponse;
+                if (response != null)
+                {
+                    if (response.StatusCode == HttpStatusCode.Forbidden)
                     {
-                        if (response.StatusCode == HttpStatusCode.Forbidden)
+                        if (!mobileMinerSuccess)
                         {
-                            if (!mobileMinerSuccess)
-                            {
-                                this.applicationConfiguration.MobileMinerMonitoring = false;
-                                this.applicationConfiguration.SaveApplicationConfiguration();
-                                MessageBox.Show("Your MobileMiner credentials are incorrect. Please check your MobileMiner settings in the Settings dialog." +
-                                    Environment.NewLine + Environment.NewLine +
-                                    "MobileMiner remote monitoring will now be disabled.", "Invalid Credentails", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-
-                                //check to make sure there are no modal windows already
-                                if (!ShowingModalDialog())
-                                    ShowApplicationSettings();
-                            }
+                            applicationConfiguration.MobileMinerMonitoring = false;
+                            applicationConfiguration.SaveApplicationConfiguration();
+                            MessageBox.Show("Your MobileMiner credentials are incorrect. Please check your MobileMiner settings in the Settings dialog." +
+                                Environment.NewLine + Environment.NewLine +
+                                "MobileMiner remote monitoring will now be disabled.", "Invalid Credentails", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+                            //check to make sure there are no modal windows already
+                            if (!ShowingModalDialog())
+                                ShowApplicationSettings();
                         }
                     }
                 }
@@ -1797,6 +1815,23 @@
                 string.IsNullOrEmpty(applicationConfiguration.MobileMinerEmailAddress))
                 return;

+            if (mobileMinerAsync)
+            {
+                if (checkForRemoteCommandsDelegate == null)
+                    checkForRemoteCommandsDelegate = GetRemoteCommands;
+
+                checkForRemoteCommandsDelegate.BeginInvoke(null, null);
+            }
+            else
+            {
+                GetRemoteCommands();
+            }
+        }
+
+        private Action checkForRemoteCommandsDelegate;
+
+        private void GetRemoteCommands()
+        {
             List<MobileMiner.Api.RemoteCommand> commands = new List<MobileMiner.Api.RemoteCommand>();

             try
@@ -1839,9 +1874,17 @@

                     return;
                 }
-                throw;
-            }
-
+                throw;
+            }
+
+            if (InvokeRequired)
+                BeginInvoke((Action<List<MobileMiner.Api.RemoteCommand>>)((c) => ProcessRemoteCommands(c)), commands);
+            else
+                ProcessRemoteCommands(commands);
+        }
+
+        private void ProcessRemoteCommands(List<MobileMiner.Api.RemoteCommand> commands)
+        {
             if (commands.Count > 0)
             {
                 MobileMiner.Api.RemoteCommand command = commands.First();
@@ -1851,6 +1894,7 @@
                 //if we check for commands again in that time, we don't want to process it again
                 if (processedCommandIds.Contains(command.Id))
                     return;
+
                 processedCommandIds.Add(command.Id);

                 if (command.CommandText.Equals("START", StringComparison.OrdinalIgnoreCase))
@@ -1867,13 +1911,30 @@
                     StartMining();
                 }

-                MobileMiner.Api.ApiContext.DeleteCommand(mobileMinerUrl, mobileMinerApiKey,
-                    applicationConfiguration.MobileMinerEmailAddress, applicationConfiguration.MobileMinerApplicationKey,
-                    Environment.MachineName, command.Id);
-            }
-        }
-
-        private static void PopulateMiningStatsFromDeviceInfo(MultiMiner.MobileMiner.Api.MiningStatistics miningStatistics, MultiMiner.Xgminer.Api.DeviceInformation deviceInformation)
+                if (mobileMinerAsync)
+                {
+                    if (deleteRemoteCommandDelegate == null)
+                        deleteRemoteCommandDelegate = DeleteRemoteCommand;
+
+                    deleteRemoteCommandDelegate.BeginInvoke(command, null, null);
+                }
+                else
+                {
+                    DeleteRemoteCommand(command);
+                }
+            }
+        }
+
+        private Action<MobileMiner.Api.RemoteCommand> deleteRemoteCommandDelegate;
+
+        private void DeleteRemoteCommand(MobileMiner.Api.RemoteCommand command)
+        {
+            MobileMiner.Api.ApiContext.DeleteCommand(mobileMinerUrl, mobileMinerApiKey,
+                                applicationConfiguration.MobileMinerEmailAddress, applicationConfiguration.MobileMinerApplicationKey,
+                                Environment.MachineName, command.Id);
+        }
+
+        private static void PopulateMiningStatsFromDeviceInfo(MobileMiner.Api.MiningStatistics miningStatistics, Xgminer.Api.DeviceInformation deviceInformation)
         {
             miningStatistics.AcceptedShares = deviceInformation.AcceptedShares;
             miningStatistics.AverageHashrate = deviceInformation.AverageHashrate;


Refactoring - fix/clarify argument name

Refactoring - fix/clarify argument name

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -1776,13 +1776,13 @@
             SetDevicesToCoin(devices, coinSymbol);
         }

-        private void SetDevicesToCoinLocally(IEnumerable<DeviceDescriptor> devices, string coinSymbol)
+        private void SetDevicesToCoinLocally(IEnumerable<DeviceDescriptor> devices, string coinName)
         {
             foreach (DeviceDescriptor device in devices)
             {
                 DeviceViewModel deviceViewModel = localViewModel.Devices.SingleOrDefault(dvm => dvm.Equals(device));
                 if ((deviceViewModel != null) && (deviceViewModel.Kind != DeviceKind.NET))
-                    deviceViewModel.Coin = engineConfiguration.CoinConfigurations.Single(cc => cc.Coin.Name.Equals(coinSymbol)).Coin;
+                    deviceViewModel.Coin = engineConfiguration.CoinConfigurations.Single(cc => cc.Coin.Name.Equals(coinName)).Coin;
             }

             RefreshListViewFromViewModel();
@@ -3506,12 +3506,12 @@
             });
         }

-        private void SetDevicesToCoinRemotely(Instance instance, IEnumerable<DeviceDescriptor> devices, string coinSymbol)
+        private void SetDevicesToCoinRemotely(Instance instance, IEnumerable<DeviceDescriptor> devices, string coinName)
         {
             PerformRemoteCommand(instance, (service) =>
             {
                 List<DeviceDescriptor> descriptors = CloneDescriptors(devices);
-                service.SetDevicesToCoin(GetSendingSignature(instance), descriptors, coinSymbol);
+                service.SetDevicesToCoin(GetSendingSignature(instance), descriptors, coinName);
                 UpdateViewFromRemoteInTheFuture(2);
             });
         }
@@ -3565,15 +3565,15 @@
             });
         }

-        private void SetDevicesToCoin(List<DeviceDescriptor> devices, string coinSymbol)
+        private void SetDevicesToCoin(List<DeviceDescriptor> devices, string coinName)
         {
             if (this.selectedRemoteInstance == null)
             {
-                SetDevicesToCoinLocally(devices, coinSymbol);
+                SetDevicesToCoinLocally(devices, coinName);
             }
             else
             {
-                SetDevicesToCoinRemotely(this.selectedRemoteInstance, devices, coinSymbol);
+                SetDevicesToCoinRemotely(this.selectedRemoteInstance, devices, coinName);
             }
         }


Fix Argument exception is thrown on dispose of consumer dispatcher (#1096)

--- Source/EasyNetQ/Consumer/ConsumerDispatcher.cs
+++ Source/EasyNetQ/Consumer/ConsumerDispatcher.cs
@@ -26,10 +26,10 @@
                     while (!cancellation.IsCancellationRequested)
                         try
                         {
-                            BlockingCollection<Action>.TakeFromAny(
-                                blockingCollections, out var action, cancellation.Token
-                            );
-                            action();
+                            if (BlockingCollection<Action>.TryTakeFromAny(blockingCollections, out var action, -1, cancellation.Token) >= 0)
+                            {
+                                action();
+                            }
                         }
                         catch (OperationCanceledException) when (cancellation.IsCancellationRequested)
                         {


Fixed inability to toggle Dynamic Intensity with the accessible menu

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -3442,12 +3442,12 @@

         private void dynamicIntensityButton_Click(object sender, EventArgs e)
         {
-            ToggleDynamicIntensity();
-        }
-
-        private void ToggleDynamicIntensity()
-        {
-            engineConfiguration.XgminerConfiguration.DesktopMode = dynamicIntensityButton.Checked;
+            ToggleDynamicIntensity(dynamicIntensityButton.Checked);
+        }
+
+        private void ToggleDynamicIntensity(bool enabled)
+        {
+            engineConfiguration.XgminerConfiguration.DesktopMode = enabled;
             engineConfiguration.SaveMinerConfiguration();
         }

@@ -3865,7 +3865,7 @@

         private void dynamicIntensityToolStripMenuItem_Click(object sender, EventArgs e)
         {
-            ToggleDynamicIntensity();
+            ToggleDynamicIntensity(dynamicIntensityToolStripMenuItem.Checked);
         }

         private void largeIconsToolStripMenuItem1_Click(object sender, EventArgs e)


GSF.Core: Added radix 2 and 8 default encodings to RadixCodec

--- Source/Libraries/GSF.Core.Shared/RadixCodec.cs
+++ Source/Libraries/GSF.Core.Shared/RadixCodec.cs
@@ -458,6 +458,8 @@
         #region [ Static ]

         // Static Fields
+        private static RadixCodec s_radix2;
+        private static RadixCodec s_radix8;
         private static RadixCodec s_radix16;
         private static RadixCodec s_radix32;
         private static RadixCodec s_radix36;
@@ -465,6 +467,32 @@
         private static RadixCodec s_radix86;

         // Static Properties
+
+        /// <summary>
+        /// Gets a radix-2 value (binary) encoding.
+        /// </summary>
+        /// <remarks>
+        /// int.MaxValue encodes to "1111111111111111111111111111111", 31 characters
+        /// int.MinValue encodes to "-10000000000000000000000000000000", 33 characters
+        /// uint.MaxValue encodes to "11111111111111111111111111111111", 32 characters
+        /// long.MaxValue encodes to "111111111111111111111111111111111111111111111111111111111111111", 63 characters
+        /// long.MinValue encodes to "-1000000000000000000000000000000000000000000000000000000000000000", 65 characters
+        /// ulong.MaxValue encodes to "1111111111111111111111111111111111111111111111111111111111111111", 64 characters
+        /// </remarks>                                                            12
+        public static RadixCodec Radix2 = s_radix2 ?? (s_radix2 = new RadixCodec("01", false));
+
+        /// <summary>
+        /// Gets a radix-8 value (octal) encoding.
+        /// </summary>
+        /// <remarks>
+        /// int.MaxValue encodes to "17777777777", 11 characters
+        /// int.MinValue encodes to "-20000000000", 12 characters
+        /// uint.MaxValue encodes to "37777777777", 11 characters
+        /// long.MaxValue encodes to "777777777777777777777", 21 characters
+        /// long.MinValue encodes to "-1000000000000000000000", 23 characters
+        /// ulong.MaxValue encodes to "1777777777777777777777", 22 characters
+        /// </remarks>                                                            12345678
+        public static RadixCodec Radix8 = s_radix8 ?? (s_radix8 = new RadixCodec("01234567", false));

         /// <summary>
         /// Gets a radix-16 value (hex) encoding.
@@ -527,7 +555,7 @@
         /// uint.MaxValue encodes to "1qu4dh", 6 characters
         /// long.MaxValue encodes to "1X2qL^UmlIt", 11 characters
         /// long.MinValue encodes to "-1X2qL^UmlIu", 12 characters
-        /// ulong.MaxValue encodes to "2&5Sh]zLIbZ", 11 characters
+        /// ulong.MaxValue encodes to "2&5Sh]zLIbZ", 11 characters
         /// </remarks>                                                               1234567890123456789012345678901234567890123456789012345678901234567890123456
         public static RadixCodec Radix86 = s_radix86 ?? (s_radix86 = new RadixCodec("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&*+;=?@[]^", true));


Removing scrypt kludge

Removing scrypt kludge

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -1698,16 +1698,13 @@
                 item.SubItems["Average"].Text = ((double)item.SubItems["Average"].Tag).ToHashrateString();
                 item.SubItems["Current"].Text = ((double)item.SubItems["Current"].Tag).ToHashrateString();

+                //this will be wrong for Scrypt until 3.10.1
                 double shaMultiplier = 71582788 / 1000;
-                double scryptMultiplier = 0.0043;
                 double workUtility = (double)item.SubItems["Effective"].Tag;
                 double hashrate = workUtility * shaMultiplier;
                 CoinConfiguration coinConfiguration = CoinConfigurationForListViewItem(item);
-                if (coinConfiguration.Coin.Algorithm == CoinAlgorithm.Scrypt)
-                    hashrate = hashrate * scryptMultiplier;
-
+
                 item.SubItems["Effective"].Text = hashrate.ToHashrateString();
-

                 //check for >= 0.05 so we don't show 0% (due to the format string)
                 item.SubItems["Rejected"].Text = (double)item.SubItems["Rejected"].Tag >= 0.05 ? ((double)item.SubItems["Rejected"].Tag).ToString("0.#") + "%" : String.Empty;


GSF.Net: Added logging for swallowed exception in FtpFileWatcher.

--- Source/Libraries/GSF.Net/Ftp/FtpFileWatcher.cs
+++ Source/Libraries/GSF.Net/Ftp/FtpFileWatcher.cs
@@ -618,8 +618,9 @@
             {
                 m_session.Close();
             }
-            catch
-            {
+            catch (Exception ex)
+            {
+                Diagnostics.Logger.SwallowException(ex);
             }
         }


Default to BTC for new devices (if BTC is configured)

--- MultiMiner.Win/MainForm.cs
+++ MultiMiner.Win/MainForm.cs
@@ -616,6 +616,12 @@

                     newConfiguration.Assign(device);

+                    //if the user has BTC configured, default to that
+                    string btcSymbol = "BTC";
+                    bool hasBtcConfigured = engineConfiguration.CoinConfigurations.Exists(c => c.Enabled && c.Coin.Symbol.Equals(btcSymbol, StringComparison.OrdinalIgnoreCase));
+                    if (hasBtcConfigured)
+                        newConfiguration.CoinSymbol = btcSymbol;
+
                     newConfiguration.Enabled = true;
                     engineConfiguration.DeviceConfigurations.Add(newConfiguration);
                 }


Update Program.cs

Update Program.cs

S2I-Test: Provoking a Syntax error.

--- app/Program.cs
+++ app/Program.cs
@@ -7,6 +7,8 @@

 using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.Configuration;
+
+blahblah

 namespace WebApplication
 {


Update Package Visualizer to use display name

Work Item: 1164


Added x space between tiles.

Added x space between tiles.

--- ArcanumTextureSlicer/ArcanumTextureSlicer/Program.cs
+++ ArcanumTextureSlicer/ArcanumTextureSlicer/Program.cs
@@ -24,6 +24,7 @@
             var tileHeight = BitmapExtensions.SampleTile.Height;
             var halfTileWidth = tileWidth/2;
             var halfTileHeight = tileHeight/2;
+            var xSpace = 2;

             if (!Directory.Exists(outputFolder))
             {
@@ -34,14 +35,14 @@
             {
                 using (var inputBitmap = new Bitmap(inputFile))
                 {
-                    var n = Math.Ceiling((double) (inputBitmap.Width - initTileX)/tileWidth);
+                    var n = Math.Ceiling((double) (inputBitmap.Width - initTileX)/(tileWidth + xSpace));
                     var m = Math.Ceiling((double) (inputBitmap.Height - initTileY)/tileHeight)*2;
                     for (var i = 0; i < n; i++)
                     {
                         for (var j = 0; j < m; j++)
                         {
                             using (var outputBitmap = inputBitmap.CreateTile(
-                                initTileX + i*tileWidth - halfTileWidth*(1 - j%2),
+                                initTileX + i*tileWidth - halfTileWidth*(1 - j%2) + i*xSpace,
                                 initTileY + j*halfTileHeight - halfTileHeight))
                             {
                                 if (outputBitmap.IsTransparent())


Update CatAPI.cs

Update CatAPI.cs

--- ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs
+++ ArchiSteamFarm.CustomPlugins.ExamplePlugin/CatAPI.cs
@@ -33,7 +33,7 @@
 		private const string URL = "https://aws.random.cat";

 		[ItemCanBeNull]
-		internal static async Task<string> GetRandomCatURL([NotNull] WebBrowser webBrowser) {
+		internal static async Task<string> GetRandomCatURL([JetBrains.Annotations.NotNull] WebBrowser webBrowser) {
 			if (webBrowser == null) {
 				throw new ArgumentNullException(nameof(webBrowser));
 			}


Add ContainsWildcards

Add ContainsWildcards


Update Spider.cs

Update Spider.cs

--- Assets/Resources/Microgames/Spider/Scripts/Spider.cs
+++ Assets/Resources/Microgames/Spider/Scripts/Spider.cs
@@ -112,7 +112,7 @@
 		updateMouth();

 		bool flipped = cursorPosition.x > transform.position.x;
-		transform.localScale = flipped ? new Vector3(1f, -1f, 1f) : new Vector3(1f, 1f, 1f);
+		transform.localScale = new Vector3(1f, flipped ? -1f : 1f, 1f)

 		if (distance <=  eatRadius)
@@ -136,7 +136,7 @@

 	void updateMouth()
 	{
-		top.localRotation = Quaternion.Euler(0f, 0f, -1f * mouthAngle * Mathf.Rad2Deg);
+		top.localRotation = Quaternion.Euler(0f, 0f, -mouthAngle * Mathf.Rad2Deg);
 		bottom.localRotation = Quaternion.Euler(0f, 0f, mouthAngle * Mathf.Rad2Deg);
 	}
 }


Fix unattended mode asking for user input when scheduled task already exists

--- letsencrypt-win-simple/Services/TaskSchedulerService.cs
+++ letsencrypt-win-simple/Services/TaskSchedulerService.cs
@@ -30,7 +30,7 @@
                 var existingTask = taskService.GetTask(taskName);
                 if (existingTask != null)
                 {
-                    if (!_input.PromptYesNo($"Do you want to replace the existing task?"))
+                    if (!string.IsNullOrEmpty(_options.Plugin) || !_input.PromptYesNo($"Do you want to replace the existing task?"))
                         return;

                     _log.Information("Deleting existing task {taskName} from Windows Task Scheduler.", taskName);


configuration fix for dr-62

configuration fix for dr-62

--- src/mindtouch.core/DreamHost.cs
+++ src/mindtouch.core/DreamHost.cs
@@ -155,7 +155,7 @@
                 serviceConfig.Elem("guid", config["guid"].AsText);
                 serviceConfig.AddAll(config["components"]);
                 var memorize = config["memorize-aliases"];
-                if(memorize.IsEmpty) {
+                if(!memorize.IsEmpty) {
                     serviceConfig.Elem("memorize-aliases", memorize.AsBool);
                 }
                 _env.Initialize(serviceConfig);


Specify the security protocols that we are allowed to use to download from HTTPS

references #299

--- src/nbuildkit/tasks/nBuildKit.MsBuild.Tasks/Web/WebDownload.cs
+++ src/nbuildkit/tasks/nBuildKit.MsBuild.Tasks/Web/WebDownload.cs
@@ -126,6 +126,8 @@
             var fileName = Path.GetFileName(source.AbsolutePath);
             var targetPath = Path.Combine(destinationDirectory, fileName);

+            // Make sure that we can establish secure connections. See here: https://stackoverflow.com/a/37572417/539846
+            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
             using (var client = new WebClient())
             {
                 client.Credentials = GetConfiguredCredentials();


Added AssemblyInformationalVersion attribute

--- Src/ScriptComponent/Properties/AssemblyInfo.cs
+++ Src/ScriptComponent/Properties/AssemblyInfo.cs
@@ -34,3 +34,4 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyInformationalVersion("1.0.0.0")]


OnDataSent/Received is protected virtual for debugging in TWP

--- StreamExtended/Network/CustomBufferedStream.cs
+++ StreamExtended/Network/CustomBufferedStream.cs
@@ -372,11 +372,11 @@
             baseStream.Write(oneByteBuffer, 0, 1);
         }

-        private void OnDataSent(byte[] buffer, int offset, int count)
-        {
-        }
-
-        private void OnDataReceived(byte[] buffer, int offset, int count)
+        protected virtual void OnDataSent(byte[] buffer, int offset, int count)
+        {
+        }
+
+        protected virtual void OnDataReceived(byte[] buffer, int offset, int count)
         {
         }


Implemented the dialog IDL, removed public modifier

--- AngleSharp/DOM/Html/Semantic/HTMLDialogElement.cs
+++ AngleSharp/DOM/Html/Semantic/HTMLDialogElement.cs
@@ -5,13 +5,24 @@
     /// <summary>
     /// Represents the object for HTML dialog elements.
     /// </summary>
-    [DomName("HTMLDialogElement")]
-    public sealed class HTMLDialogElement : HTMLElement
+    sealed class HTMLDialogElement : HTMLElement, IHtmlDialogElement
     {
+        #region Fields
+
+        String _returnValue;
+
+        #endregion
+
+        #region ctor
+
         internal HTMLDialogElement()
         {
             _name = Tags.Dialog;
         }
+
+        #endregion
+
+        #region Internal Properties

         /// <summary>
         /// Gets if the node is in the special category.
@@ -20,5 +31,41 @@
         {
             get { return false; }
         }
+
+        #endregion
+
+        #region Properties
+
+        public Boolean Open
+        {
+            get { return GetAttribute(AttributeNames.Open) != null; }
+            set { SetAttribute(AttributeNames.Open, value ? String.Empty : null); }
+        }
+
+        public String ReturnValue
+        {
+            get { return _returnValue; }
+            set { _returnValue = value; }
+        }
+
+        public void Show(IElement anchor = null)
+        {
+            Open = true;
+            //TODO
+        }
+
+        public void ShowModal(IElement anchor = null)
+        {
+            Open = true;
+            //TODO
+        }
+
+        public void Close(String returnValue = null)
+        {
+            Open = false;
+            ReturnValue = returnValue;
+        }
+
+        #endregion
     }
 }


cleanup

cleanup

--- Nez.Portable/ECS/Entity.cs
+++ Nez.Portable/ECS/Entity.cs
@@ -47,7 +47,6 @@
 		/// <summary>
 		/// enables/disables the Entity. When disabled colliders are removed from the Physics system and components methods will not be called
 		/// </summary>
-		/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
 		public bool enabled
 		{
 			get { return _enabled; }


Add auto exit from game over to Showcase Mode


Added some documentation

Added some documentation

--- Astrobot/Objects/Simbad/AstronomicalObjectInfo.cs
+++ Astrobot/Objects/Simbad/AstronomicalObjectInfo.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
@@ -239,7 +239,9 @@
             var result = new ObjectDimensions();
             result.XSize = Convert.ToSingle(segments[0]);
             result.YSize = Convert.ToSingle(segments[1]);
-            result.Rotation = Convert.ToSingle(segments[2]);
+
+            if (!segments[2].StartsWith("~"))
+                result.Rotation = Convert.ToSingle(segments[2]);

             return result;
         }


Update CosmosTableBase.cs

Update CosmosTableBase.cs

--- TIKSN.Core/Data/CosmosTable/CosmosTableBase.cs
+++ TIKSN.Core/Data/CosmosTable/CosmosTableBase.cs
@@ -10,13 +10,11 @@

         protected CosmosTableBase(IConfigurationRoot configuration, string connectionStringKey)
         {
-            _configuration = configuration;
-            _connectionStringKey = connectionStringKey;
+            this._configuration = configuration;
+            this._connectionStringKey = connectionStringKey;
         }

-        protected CloudStorageAccount GetCloudStorageAccount()
-        {
-            return CloudStorageAccount.Parse(_configuration.GetConnectionString(_connectionStringKey));
-        }
+        protected CloudStorageAccount GetCloudStorageAccount() =>
+            CloudStorageAccount.Parse(this._configuration.GetConnectionString(this._connectionStringKey));
     }
-}+}


Update MongoDatabaseProvider.cs

Update MongoDatabaseProvider.cs

--- TIKSN.Core/Data/Mongo/MongoDatabaseProvider.cs
+++ TIKSN.Core/Data/Mongo/MongoDatabaseProvider.cs
@@ -5,10 +5,10 @@
 {
     public class MongoDatabaseProvider : IMongoDatabaseProvider
     {
-        private readonly IConfigurationRoot _configuration;
+        private readonly IConfiguration _configuration;
         private readonly string _connectionStringKey;

-        public MongoDatabaseProvider(IConfigurationRoot configuration, string connectionStringKey)
+        public MongoDatabaseProvider(IConfiguration configuration, string connectionStringKey)
         {
             _configuration = configuration;
             _connectionStringKey = connectionStringKey;


Cleanup status field.

Cleanup status field.

--- NtApiDotNet/NtException.cs
+++ NtApiDotNet/NtException.cs
@@ -22,21 +22,19 @@
     [Serializable]
     public sealed class NtException : ApplicationException
     {
-        private NtStatus _status;
-
         /// <summary>
         /// Constructor
         /// </summary>
         /// <param name="status">Status result</param>
         public NtException(NtStatus status)
         {
-            _status = status;
+            Status = status;
         }

         /// <summary>
         /// Returns the contained NT status code
         /// </summary>
-        public NtStatus Status { get { return _status; } }
+        public NtStatus Status { get; }

         /// <summary>
         /// Returns a string form of the NT status code.
@@ -45,12 +43,12 @@
         {
             get
             {
-                string message = NtObjectUtils.GetNtStatusMessage(_status);
+                string message = NtObjectUtils.GetNtStatusMessage(Status);
                 if (String.IsNullOrEmpty(message))
                 {
-                    if (Enum.IsDefined(typeof(NtStatus), _status))
+                    if (Enum.IsDefined(typeof(NtStatus), Status))
                     {
-                        message = _status.ToString();
+                        message = Status.ToString();
                     }
                     else
                     {
@@ -58,7 +56,7 @@
                     }
                 }

-                return string.Format("(0x{0:X08}) - {1}", (uint)_status, message);
+                return string.Format("(0x{0:X08}) - {1}", (uint)Status, message);
             }
         }
     }


Fix click on label

Fix click on label

--- BTCPayServer/Views/Wallets/WalletTransactions.cshtml
+++ BTCPayServer/Views/Wallets/WalletTransactions.cshtml
@@ -101,11 +101,13 @@
                                         position: relative;
                                     "
                                     title="@label.Tooltip">
-                                    @label.Value
-
                                     @if (!string.IsNullOrEmpty(label.Link))
                                     {
-
+                                        @label.Value
+                                    }
+                                    else
+                                    {
+                                        @label.Value
                                     }
                                     <form
                                         asp-route-walletId="@this.Context.GetRouteValue("walletId")"


[Wallet] Add space between transaction labels

close #1024

--- BTCPayServer/Views/Wallets/WalletTransactions.cshtml
+++ BTCPayServer/Views/Wallets/WalletTransactions.cshtml
@@ -5,8 +5,6 @@
     ViewData.SetActivePageAndTitle(WalletsNavPages.Transactions);
 }

 @if (TempData.ContainsKey("TempDataProperty-StatusMessage"))
@@ -64,7 +66,17 @@

                             @foreach (var label in transaction.Labels)
                             {
-                                @label.Value
+
+                                    @label.Value
+
                             }


GitCommitName: Correctly allow dash characters

--- NuGit/Git/GitCommitName.cs
+++ NuGit/Git/GitCommitName.cs
@@ -41,7 +41,7 @@
                 throw new FormatException("Empty string");
              if (gitCommitString.Contains(' '))
                 throw new FormatException("Contains whitespace");
-             if (!Regex.IsMatch(gitCommitString, @"^[A-Za-z0-9_.-/]+$"))
+             if (!Regex.IsMatch(gitCommitString, @"^[-A-Za-z0-9_./]+$"))
                 throw new FormatException("Contains invalid characters");

              _value = gitCommitString;


Roll back remove logic

Roll back remove logic

--- Client/Systems/VesselRemoveSys/VesselRemoveSystem.cs
+++ Client/Systems/VesselRemoveSys/VesselRemoveSystem.cs
@@ -98,7 +98,6 @@
             UnloadVesselFromGame(killVessel);
             KillGivenVessel(killVessel);
             UnloadVesselFromScenario(killVessel);
-            UnityEngine.Object.Destroy(killVessel.gameObject);
         }

         /// <summary>


Checking if the results of release weakingly increase

They do

--- Tests/System/Threading/SemaphoreSlimTestsEx.cs
+++ Tests/System/Threading/SemaphoreSlimTestsEx.cs
@@ -61,9 +61,19 @@
             {
                 Console.WriteLine(entry);
             }
+            var last = -1;
+            var first = true;
             foreach (var entry in logCount)
             {
-                Console.WriteLine(entry.ToString());
+                if (first)
+                {
+                    first = false;
+                }
+                else if (entry < last)
+                {
+                    Assert.Fail();
+                }
+                last = entry;
             }
         }
     }


Fixed tests to reflect changes induced by ffdb961 merge

--- UnityProject/Assets/Tests/Scripts/GameTests.cs
+++ UnityProject/Assets/Tests/Scripts/GameTests.cs
@@ -27,12 +27,8 @@
 			Assert(getResult["test"] == 2, "Expected test: 2 key");
 			return cloud.Game.GameVfs.GetKey("stringkey");
 		})
-		.ExpectSuccess(stringResult => {
-			Assert(stringResult.Type == Bundle.DataType.String, "Expected string result");
-			// Decode the string (not very beautiful and maybe not error-proof, but works)
-			string value = stringResult;
-			value = value.Substring(1, value.Length - 2).Replace("\\", "");
-			Assert(Bundle.FromJson(value)["str"] == "val", "Expected JSON-decodable string");
+		.ExpectSuccess(v1Result => {
+			Assert(v1Result["str"] == "val", "Expected JSON-decodable string");
 			CompleteTest();
 		});
 	}


Some more small code cleaning of the legacy reading code

--- Unplugged.Segy/BinaryReaderExtensionMethods.cs
+++ Unplugged.Segy/BinaryReaderExtensionMethods.cs
@@ -7,6 +7,15 @@
 {
     public static class BinaryReaderExtensionMethods
     {
+        public static string ReadStringEbcdic(this BinaryReader reader, int length)
+        {
+            var bytes = reader.ReadBytes(length);
+            var unicode = Encoding.Unicode;
+            var ebcdic = Encoding.GetEncoding("IBM037");
+            var unicodeBytes = Encoding.Convert(ebcdic, unicode, bytes);
+            return unicode.GetString(unicodeBytes);
+        }
+
         public static short ReadInt16BigEndian(this BinaryReader reader)
         {
             var bytes = reader.ReadBytes(2).Reverse().ToArray();
@@ -26,7 +35,7 @@

             // The first bit is the sign.  The next 7 bits are the exponent.
             int exponentBits = bytes[0];
-            var sign = 1.0;
+            var sign = +1.0;
             // Remove sign from first bit
             if (exponentBits >= 128)
             {
@@ -35,29 +44,18 @@
             }
             // Remove the bias of 64 from the exponent
             exponentBits -= 64;
-            const int ibmBase = 16;
+            var ibmBase = 16;
             var exponent = Math.Pow(ibmBase, exponentBits);

             // The fractional part is Big Endian unsigned int to the right of the radix point
-            // So we reverse the bytes
-            int fraction3 = bytes[1];
-            int fraction2 = bytes[2];
-            int fraction1 = bytes[3];
-            // Add them back together shifting them to their proper place
-            var mantissa = (fraction3 << 16) + (fraction2 << 8) + fraction1;
+            // So we reverse the bytes and pack them back into an int
+            var fractionBytes = new byte[] { bytes[3], bytes[2], bytes[1], 0 };
+            var mantissa = BitConverter.ToInt32(fractionBytes, 0);
             // And divide by 2^(8 * 3) to move the decimal all the way to the left
-            var dividend = 16777216.0; // Math.Pow(2, 8 * 3);
-            var fraction = mantissa / dividend;
+            var dividend = 16777216; // Math.Pow(2, 8 * 3);
+            var fraction = mantissa / (float)dividend;
+
             return (float)(sign * exponent * fraction);
-        }
-
-        public static string ReadStringEbcdic(this BinaryReader reader, int length)
-        {
-            var bytes = reader.ReadBytes(length);
-            var unicode = Encoding.Unicode;
-            var ebcdic = Encoding.GetEncoding("IBM037");
-            var unicodeBytes = Encoding.Convert(ebcdic, unicode, bytes);
-            return unicode.GetString(unicodeBytes);
         }
     }
 }


Catch NoEstimationException too, not only  RPCException

--- WalletWasabi/Extensions/RPCClientExtensions.cs
+++ WalletWasabi/Extensions/RPCClientExtensions.cs
@@ -51,7 +51,7 @@
 				{
 					return await rpc.EstimateSmartFeeAsync(confirmationTarget, estimateMode);
 				}
-				catch (RPCException ex)
+				catch (Exception ex) when (ex is RPCException || ex is NoEstimationException)
 				{
 					Logger.LogTrace(ex);
 					// Hopefully Bitcoin Core brainfart: https://github.com/bitcoin/bitcoin/issues/14431
@@ -61,7 +61,7 @@
 						{
 							return await rpc.EstimateSmartFeeAsync(i, estimateMode);
 						}
-						catch (RPCException ex2)
+						catch (Exception ex2) when (ex2 is RPCException || ex2 is NoEstimationException)
 						{
 							Logger.LogTrace(ex2);
 						}


Make sure we can send a home

Make sure we can send a home

--- ConfigurationPage/PrintLeveling/LevelWizard3Point.cs
+++ ConfigurationPage/PrintLeveling/LevelWizard3Point.cs
@@ -126,13 +126,10 @@
                 lineBeingSent = lineBeingSent.Substring(0, commentIndex).Trim();
             }
             List<string> lines = new List<string>();
+            lines.Add(lineBeingSent);
             if (lineBeingSent.StartsWith("G28"))
             {
                 lines.Add("M114");
-            }
-            else
-            {
-                lines.Add(lineBeingSent);
             }

             return lines;


Testing appveyor take 8

Testing appveyor take 8

--- Core/System/Threading/Tasks/ITaskCompletionAction.cs
+++ Core/System/Threading/Tasks/ITaskCompletionAction.cs
@@ -116,7 +116,7 @@
                 var index = -1;
                 try
                 {
-                    GC.KeepAlive(tasks.ToString());
+                    Thread.MemoryBarrier();
                     index = Array.IndexOf(tasks, completingTask);
                 }
                 catch (NullReferenceException ex)


Altered logic for validation rule's static string

--- WinUX.Common/Data/Validation/ValidationRule.cs
+++ WinUX.Common/Data/Validation/ValidationRule.cs
@@ -5,15 +5,9 @@
     /// </summary>
     public abstract class ValidationRule
     {
+        public static string DefaultErrorMessage = "Field invalid.";
+
         private string errorMessage;
-
-        /// <summary>
-        /// Gets or sets the default error message for the validation rule.
-        /// </summary>
-        /// <remarks>
-        /// The default error message is currently in English as 'Field invalid'.
-        /// </remarks>
-        public static string DefaultErrorMessage { set; get; } = "Field invalid.";

         /// <summary>
         /// Gets the error message to display for the rule.


[CA-211267] Move the sleep time into a const int of the class. Also removed the ApplianceAction parameter from TickUntilCompletion (it behaved like a static method), to make it more similar to TaskPoller.PollToCompletion

--- XenAdmin/Actions/OVFActions/ApplianceAction.cs
+++ XenAdmin/Actions/OVFActions/ApplianceAction.cs
@@ -45,6 +45,8 @@
 		protected string m_tvmSubnetMask;
 		protected string m_tvmGateway;
 		protected XenOvfTransportBase m_transportAction;
+
+        private const int SLEEP_TIME = 900;

 		/// <summary>
 		/// RBAC dependencies needed to import appliance/export an appliance/import disk image.
@@ -101,17 +103,15 @@

 	    protected void InitialiseTicker()
 	    {
-	        System.Threading.Tasks.Task.Run(() => TickUntilCompletion(this));
+	        System.Threading.Tasks.Task.Run(() => TickUntilCompletion());
 	    }

-	    private void TickUntilCompletion(ApplianceAction action)
+	    private void TickUntilCompletion()
 	    {
-	        int sleepTime = 900;
-
-	        while (!action.IsCompleted)
+	        while (!IsCompleted)
 	        {
-	            action.OnChanged();
-                Thread.Sleep(sleepTime);
+	            OnChanged();
+                Thread.Sleep(SLEEP_TIME);
 	        }
 	    }


[WPF] CustomScrollViewPort: Ensure content offset is updated if child size changes

If a larger child is replaced by a smaller one, we need to ensure the content offset
is re-clamped based on the new extents, otherwise the child may be scrolled entirely
out of the viewport.

--- Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs
+++ Xwt.WPF/Xwt.WPFBackend/CustomScrollViewPort.cs
@@ -196,37 +196,9 @@
 			set;
 		}

-		public void SetHorizontalOffset (double offset)
-		{
-			if (offset < 0 || this.viewport.Width >= this.extent.Width)
-				offset = 0;
-			else if (offset + this.viewport.Width >= this.extent.Width)
-				offset = this.extent.Width - this.viewport.Width;
-
-			this.contentOffset.X = offset;
-			if (usingCustomScrolling)
-				this.horizontalBackend.SetOffset (offset);
-			else
-				this.transform.X = -offset;
-			if (ScrollOwner != null)
-				ScrollOwner.InvalidateScrollInfo ();
-		}
-
-		public void SetVerticalOffset (double offset)
-		{
-			if (offset < 0 || this.viewport.Height >= this.extent.Height)
-				offset = 0;
-			else if (offset + this.viewport.Height >= this.extent.Height)
-				offset = this.extent.Height - this.viewport.Height;
-
-			this.contentOffset.Y = offset;
-			if (usingCustomScrolling)
-				this.verticalBackend.SetOffset (offset);
-			else
-				this.transform.Y = -offset;
-			if (ScrollOwner != null)
-				ScrollOwner.InvalidateScrollInfo ();
-		}
+		public void SetHorizontalOffset (double offset) => SetOffset (x: offset);
+
+		public void SetVerticalOffset (double offset) => SetOffset (y: offset);

 		public void SetOffset (ScrollAdjustmentBackend scroller, double offset)
 		{
@@ -234,6 +206,40 @@
 				SetVerticalOffset (offset);
 			else
 				SetHorizontalOffset (offset);
+		}
+
+		void SetOffset (double? x = null, double? y = null)
+		{
+			var offset = this.contentOffset;
+			if (x.HasValue)
+				offset.X = x.Value;
+			if (y.HasValue)
+				offset.Y = y.Value;
+
+			// Clamp horizontal
+			if (offset.X < 0 || this.viewport.Width >= this.extent.Width)
+				offset.X = 0;
+			else if (offset.X + this.viewport.Width >= this.extent.Width)
+				offset.X = this.extent.Width - this.viewport.Width;
+
+			// Clamp vertical
+			if (offset.Y < 0 || this.viewport.Height >= this.extent.Height)
+				offset.Y = 0;
+			else if (offset.Y + this.viewport.Height >= this.extent.Height)
+				offset.Y = this.extent.Height - this.viewport.Height;
+
+			if (offset != this.contentOffset) {
+				this.contentOffset = offset;
+				if (usingCustomScrolling) {
+					this.horizontalBackend.SetOffset (offset.X);
+					this.verticalBackend.SetOffset (offset.Y);
+				}  else {
+					this.transform.X = -offset.X;
+					this.transform.Y = -offset.Y;
+				}
+				if (ScrollOwner != null)
+					ScrollOwner.InvalidateScrollInfo ();
+			}
 		}

 		public void UpdateCustomExtent ()
@@ -349,6 +355,10 @@
 					this.viewport = finalSize;
 					ScrollOwner.InvalidateScrollInfo ();
 				}
+
+				// It's possible our child is now smaller than our viewport, in which case we need to
+				//  update the content offset, otherwise the child may be scrolled entirely out of view.
+				SetOffset ();
 			}

 			child.Arrange (new Rect (0, 0, childSize.Width, childSize.Height));


Changed drop scripting to exclude generated objects to improve general behavior with respect to dropping and recreating objects.

--- Dataphor/Server/Runtime.Instructions/CatalogNodes.cs
+++ Dataphor/Server/Runtime.Instructions/CatalogNodes.cs
@@ -515,7 +515,8 @@
 			bool includeDependents = arguments.Length > 1 ? (bool)arguments[1] : true;
 			bool includeObject = arguments.Length > 2 ? (bool)arguments[2] : true;

-			return emitter.Emit(program.Catalog.EmitDropStatement(program.CatalogDeviceSession, new string[] { objectValue.Name }, String.Empty, true, true, includeDependents, includeObject));
+			// Do not include generated objects in the drop script, they will be dropped automatically when the generating object is dropped
+			return emitter.Emit(program.Catalog.EmitDropStatement(program.CatalogDeviceSession, new string[] { objectValue.Name }, String.Empty, false, false, includeDependents, includeObject));
 		}
     }