Dock browser in LibraryBookView

Dock browser in LibraryBookView

--- src/BloomExe/CollectionTab/LibraryBookView.Designer.cs
+++ src/BloomExe/CollectionTab/LibraryBookView.Designer.cs
@@ -28,89 +28,88 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
-            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
-            this._addToCollectionButton = new System.Windows.Forms.Button();
-            this._browser = new Bloom.Browser();
-            this._editBookButton = new System.Windows.Forms.Button();
-            this._L10NSharpExtender = new L10NSharp.UI.L10NSharpExtender(this.components);
-            ((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).BeginInit();
-            this.SuspendLayout();
-            //
-            // _addToCollectionButton
-            //
-            this._addToCollectionButton.BackColor = System.Drawing.SystemColors.ControlLightLight;
-            this._addToCollectionButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this._addToCollectionButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this._addToCollectionButton.Image = global::Bloom.Properties.Resources.newBook1;
-            this._addToCollectionButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-            this._L10NSharpExtender.SetLocalizableToolTip(this._addToCollectionButton, null);
-            this._L10NSharpExtender.SetLocalizationComment(this._addToCollectionButton, null);
-            this._L10NSharpExtender.SetLocalizingId(this._addToCollectionButton, "CollectionTab.MakeBookUsingThisTemplate");
-            this._addToCollectionButton.Location = new System.Drawing.Point(12, 3);
-            this._addToCollectionButton.Name = "_addToCollectionButton";
-            this._addToCollectionButton.Size = new System.Drawing.Size(250, 42);
-            this._addToCollectionButton.TabIndex = 0;
-            this._addToCollectionButton.Text = "Make a book using this source";
-            this._addToCollectionButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
-            this.toolTip1.SetToolTip(this._addToCollectionButton, "Create a book in my language using this source book");
-            this._addToCollectionButton.UseVisualStyleBackColor = false;
-            this._addToCollectionButton.Click += new System.EventHandler(this.OnAddToLibraryClick);
-            this._addToCollectionButton.MouseEnter += new System.EventHandler(this._addToLibraryButton_MouseEnter);
-            this._addToCollectionButton.MouseLeave += new System.EventHandler(this._addToLibraryButton_MouseLeave);
-            //
-            // _browser
-            //
-            this._browser.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
-            | System.Windows.Forms.AnchorStyles.Right)));
-            this._browser.BackColor = System.Drawing.Color.DarkGray;
-            this._L10NSharpExtender.SetLocalizableToolTip(this._browser, null);
-            this._L10NSharpExtender.SetLocalizationComment(this._browser, null);
-            this._L10NSharpExtender.SetLocalizingId(this._browser, "CollectionTab.Browser");
-            this._browser.Location = new System.Drawing.Point(0, 3);
-            this._browser.Name = "_browser";
-            this._browser.Size = new System.Drawing.Size(897, 447);
-            this._browser.TabIndex = 1;
-            //
-            // _editBookButton
-            //
-            this._editBookButton.BackColor = System.Drawing.SystemColors.ControlLightLight;
-            this._editBookButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this._editBookButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this._editBookButton.Image = global::Bloom.Properties.Resources.edit;
-            this._L10NSharpExtender.SetLocalizableToolTip(this._editBookButton, null);
-            this._L10NSharpExtender.SetLocalizationComment(this._editBookButton, null);
-            this._L10NSharpExtender.SetLocalizingId(this._editBookButton, "CollectionTab._editBookButton");
-            this._editBookButton.Location = new System.Drawing.Point(12, 3);
-            this._editBookButton.Name = "_editBookButton";
-            this._editBookButton.Size = new System.Drawing.Size(147, 42);
-            this._editBookButton.TabIndex = 2;
-            this._editBookButton.Text = "Edit this book";
-            this._editBookButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
-            this._editBookButton.UseVisualStyleBackColor = false;
-            this._editBookButton.Click += new System.EventHandler(this._editBookButton_Click);
-            //
-            // _L10NSharpExtender
-            //
-            this._L10NSharpExtender.LocalizationManagerId = "Bloom";
-            //
-            // LibraryBookView
-            //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.BackColor = System.Drawing.Color.White;
-            this.Controls.Add(this._editBookButton);
-            this.Controls.Add(this._addToCollectionButton);
-            this.Controls.Add(this._browser);
-            this._L10NSharpExtender.SetLocalizableToolTip(this, null);
-            this._L10NSharpExtender.SetLocalizationComment(this, null);
-            this._L10NSharpExtender.SetLocalizingId(this, "CollectionTab.LibraryBookView");
-            this.Name = "LibraryBookView";
-            this.Size = new System.Drawing.Size(900, 450);
-            this.Resize += new System.EventHandler(this.LibraryBookView_Resize);
-            ((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).EndInit();
-            this.ResumeLayout(false);
+			this.components = new System.ComponentModel.Container();
+			this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+			this._addToCollectionButton = new System.Windows.Forms.Button();
+			this._browser = new Bloom.Browser();
+			this._editBookButton = new System.Windows.Forms.Button();
+			this._L10NSharpExtender = new L10NSharp.UI.L10NSharpExtender(this.components);
+			((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).BeginInit();
+			this.SuspendLayout();
+			//
+			// _addToCollectionButton
+			//
+			this._addToCollectionButton.BackColor = System.Drawing.SystemColors.ControlLightLight;
+			this._addToCollectionButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+			this._addToCollectionButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this._addToCollectionButton.Image = global::Bloom.Properties.Resources.newBook1;
+			this._addToCollectionButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+			this._L10NSharpExtender.SetLocalizableToolTip(this._addToCollectionButton, null);
+			this._L10NSharpExtender.SetLocalizationComment(this._addToCollectionButton, null);
+			this._L10NSharpExtender.SetLocalizingId(this._addToCollectionButton, "CollectionTab.MakeBookUsingThisTemplate");
+			this._addToCollectionButton.Location = new System.Drawing.Point(12, 3);
+			this._addToCollectionButton.Name = "_addToCollectionButton";
+			this._addToCollectionButton.Size = new System.Drawing.Size(250, 42);
+			this._addToCollectionButton.TabIndex = 0;
+			this._addToCollectionButton.Text = "Make a book using this source";
+			this._addToCollectionButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+			this.toolTip1.SetToolTip(this._addToCollectionButton, "Create a book in my language using this source book");
+			this._addToCollectionButton.UseVisualStyleBackColor = false;
+			this._addToCollectionButton.Click += new System.EventHandler(this.OnAddToLibraryClick);
+			this._addToCollectionButton.MouseEnter += new System.EventHandler(this._addToLibraryButton_MouseEnter);
+			this._addToCollectionButton.MouseLeave += new System.EventHandler(this._addToLibraryButton_MouseLeave);
+			//
+			// _browser
+			//
+			this._browser.BackColor = System.Drawing.Color.DarkGray;
+			this._browser.Dock = System.Windows.Forms.DockStyle.Fill;
+			this._L10NSharpExtender.SetLocalizableToolTip(this._browser, null);
+			this._L10NSharpExtender.SetLocalizationComment(this._browser, null);
+			this._L10NSharpExtender.SetLocalizingId(this._browser, "CollectionTab.Browser");
+			this._browser.Location = new System.Drawing.Point(0, 0);
+			this._browser.Name = "_browser";
+			this._browser.Size = new System.Drawing.Size(900, 450);
+			this._browser.TabIndex = 1;
+			//
+			// _editBookButton
+			//
+			this._editBookButton.BackColor = System.Drawing.SystemColors.ControlLightLight;
+			this._editBookButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+			this._editBookButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+			this._editBookButton.Image = global::Bloom.Properties.Resources.edit;
+			this._L10NSharpExtender.SetLocalizableToolTip(this._editBookButton, null);
+			this._L10NSharpExtender.SetLocalizationComment(this._editBookButton, null);
+			this._L10NSharpExtender.SetLocalizingId(this._editBookButton, "CollectionTab._editBookButton");
+			this._editBookButton.Location = new System.Drawing.Point(12, 3);
+			this._editBookButton.Name = "_editBookButton";
+			this._editBookButton.Size = new System.Drawing.Size(147, 42);
+			this._editBookButton.TabIndex = 2;
+			this._editBookButton.Text = "Edit this book";
+			this._editBookButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+			this._editBookButton.UseVisualStyleBackColor = false;
+			this._editBookButton.Click += new System.EventHandler(this._editBookButton_Click);
+			//
+			// _L10NSharpExtender
+			//
+			this._L10NSharpExtender.LocalizationManagerId = "Bloom";
+			this._L10NSharpExtender.PrefixForNewItems = null;
+			//
+			// LibraryBookView
+			//
+			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.BackColor = System.Drawing.Color.White;
+			this.Controls.Add(this._editBookButton);
+			this.Controls.Add(this._addToCollectionButton);
+			this.Controls.Add(this._browser);
+			this._L10NSharpExtender.SetLocalizableToolTip(this, null);
+			this._L10NSharpExtender.SetLocalizationComment(this, null);
+			this._L10NSharpExtender.SetLocalizingId(this, "CollectionTab.LibraryBookView");
+			this.Name = "LibraryBookView";
+			this.Size = new System.Drawing.Size(900, 450);
+			this.Resize += new System.EventHandler(this.LibraryBookView_Resize);
+			((System.ComponentModel.ISupportInitialize)(this._L10NSharpExtender)).EndInit();
+			this.ResumeLayout(false);

         }


Updated.

Updated.

--- src/Bugfree.Spo.Analytics.ProcessMemoryDump/Program.cs
+++ src/Bugfree.Spo.Analytics.ProcessMemoryDump/Program.cs
@@ -34,7 +34,7 @@
                 }

                 // Enumerating the heap doesn't preserve allocation order. Hence we impose an
-                // order using the visit's timestamp. This allows for each visit inspection.
+                // order using the visit's timestamp for easier inspection.
                 foreach (var v in visits.OrderBy(v => v.Timestamp))
                 {
                     visitor.Post(VisitorMessage.NewVisit(v));


Try to fix current stamp

Try to fix current stamp

--- src/Cash-Flow-Projection/Controllers/HomeController.cs
+++ src/Cash-Flow-Projection/Controllers/HomeController.cs
@@ -174,9 +174,9 @@
                     .AppendLine("BEGIN:VEVENT")
                     .AppendLine($"SUMMARY:{entry.Description} ").AppendLine($"{entry.Amount:c}")
                     .AppendLine("DTSTART:" + entry.Date.ToString("yyyyMMdd"))
-                    .AppendLine("LAST-MODIFIED:" + DateTime.UtcNow.ToUniversalTime().ToString(DateFormat))
+                    .AppendLine("LAST-MODIFIED:" + DateTime.UtcNow.ToString(DateFormat))
                     .AppendLine("UID: " + entry.id)
-                    .AppendLine("DTSTAMP: " + DateTime.UtcNow.ToUniversalTime().ToString(DateFormat))
+                    .AppendLine("DTSTAMP: " + DateTime.UtcNow.ToString(DateFormat))
                     .AppendLine("SEQUENCE:0")
                     .AppendLine("STATUS:CONFIRMED")
                     .AppendLine("TRANSP:OPAQUE")


Fix the problem that the web request is displayed twice when -Verbosity is set to detailed.

The cause of the duplicate output is the change to fix issue 3801 (which
was caused by incorrect use of the weak  event handler pattern). With
that fix, the SendingRequest handler will be called twice. The fix is to
use the weak event handler pattern here too.

--- src/CommandLine/Common/CommandLineRepositoryFactory.cs
+++ src/CommandLine/Common/CommandLineRepositoryFactory.cs
@@ -1,7 +1,9 @@

+using System.Windows;
+
 namespace NuGet.Common
 {
-    public class CommandLineRepositoryFactory : PackageRepositoryFactory
+    public class CommandLineRepositoryFactory : PackageRepositoryFactory, IWeakEventListener
     {
         public static readonly string UserAgent = "NuGet Command Line";

@@ -16,23 +18,33 @@
         {
             var repository = base.CreateRepository(packageSource);
             var httpClientEvents = repository as IHttpClientEvents;
-
             if (httpClientEvents != null)
             {
-                httpClientEvents.SendingRequest += (sender, args) =>
-                {
-                    if (_console.Verbosity == Verbosity.Detailed)
-                    {
-                        _console.WriteLine(
-                            System.ConsoleColor.Green,
-                            "{0} {1}", args.Request.Method, args.Request.RequestUri);
-                    }
-                    string userAgent = HttpUtility.CreateUserAgentString(CommandLineConstants.UserAgent);
-                    HttpUtility.SetUserAgent(args.Request, userAgent);
-                };
+                SendingRequestEventManager.AddListener(httpClientEvents, this);
             }

             return repository;
         }
+
+        public bool ReceiveWeakEvent(System.Type managerType, object sender, System.EventArgs e)
+        {
+            if (managerType == typeof(SendingRequestEventManager))
+            {
+                var args = (WebRequestEventArgs)e;
+                if (_console.Verbosity == Verbosity.Detailed)
+                {
+                    _console.WriteLine(
+                        System.ConsoleColor.Green,
+                        "{0} {1}", args.Request.Method, args.Request.RequestUri);
+                }
+                string userAgent = HttpUtility.CreateUserAgentString(CommandLineConstants.UserAgent);
+                HttpUtility.SetUserAgent(args.Request, userAgent);
+                return true;
+            }
+            else
+            {
+                return false;
+            }
+        }
     }
 }


Remove unnecessary assignment

Remove unnecessary assignment

--- src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+++ src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
@@ -9131,9 +9131,9 @@

         private ExpressionSyntax ParseTerm(Precedence precedence)
         {
-            ExpressionSyntax expr = null;
-
             var tk = this.CurrentToken.Kind;
+
+            ExpressionSyntax expr;
             switch (tk)
             {
                 case SyntaxKind.TypeOfKeyword:


Fixed up some formatting issues and edited a comment.

--- src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs
+++ src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs
@@ -3042,21 +3042,21 @@

         private UserStringHandle GetOrAddUserString(string str)
         {
-                if (!_userStringTokenOverflow)
-                {
-                    try
-                    {
+            if (!_userStringTokenOverflow)
+            {
+                try
+                {
                     return metadata.GetOrAddUserString(str);
-                    }
-                    catch (ImageFormatLimitationException)
-                    {
-                        this.Context.Diagnostics.Add(this.messageProvider.CreateDiagnostic(this.messageProvider.ERR_TooManyUserStrings, NoLocation.Singleton));
-                        _userStringTokenOverflow = true;
+                }
+                catch (ImageFormatLimitationException)
+                {
+                    this.Context.Diagnostics.Add(this.messageProvider.CreateDiagnostic(this.messageProvider.ERR_TooManyUserStrings, NoLocation.Singleton));
+                    _userStringTokenOverflow = true;
                 }
             }

             return default(UserStringHandle);
-                    }
+        }

         private UserStringHandle ReserveUserString(int length, out Blob fixup)
         {
@@ -3131,7 +3131,7 @@

                     case OperandType.InlineString:
                         {
-                        writer.Offset = offset;
+                            writer.Offset = offset;

                             int pseudoToken = ReadInt32(methodBodyIL, offset);
                             UserStringHandle handle;
@@ -3139,8 +3139,8 @@
                             if ((uint)pseudoToken == ModuleVersionIdStringToken)
                             {
                                 // The pseudotoken encoding indicates that the string should refer to a textual encoding of the
-                                // current module's module version ID. This cannot be determined until very late in the compilation,
-                                // so reserve a slot for it now and fill in the value later.
+                                // current module's module version ID (such that the MVID can be realized using Guid.Parse).
+                                // The value cannot be determined until very late in the compilation, so reserve a slot for it now and fill in the value later.
                                 if (mvidStringHandle.IsNil)
                                 {
                                     const int guidStringLength = 36;
@@ -3157,8 +3157,8 @@

                             writer.WriteInt32(MetadataTokens.GetToken(handle));

-                        offset += 4;
-                        break;
+                            offset += 4;
+                            break;
                         }

                     case OperandType.InlineSig: // calli


[UBER-795] Changed use SetScrollPercent(...) method on ScrollVertical(...).

--- src/Cruciatus/Extensions/AutomationElementExtension.cs
+++ src/Cruciatus/Extensions/AutomationElementExtension.cs
@@ -157,14 +157,19 @@
             var scrollPattern = element.GetCurrentPattern(ScrollPattern.Pattern) as ScrollPattern;
             if (scrollPattern != null)
             {
-                // Запоминаем начальное состояние прокрутки
-                var startVerticalScrollPercent = scrollPattern.Current.VerticalScrollPercent;
-
                 element.MoveMouseToCenter();

-                scrollPattern.SetScrollPercent(scrollPattern.Current.HorizontalScrollPercent, 0);
-
                 searchElement = findFunc(element);
+                if (compareFunc(searchElement))
+                {
+                    while (scrollPattern.Current.VerticalScrollPercent > 0)
+                    {
+                        scrollPattern.ScrollVertical(ScrollAmount.LargeDecrement);
+                    }
+
+                    searchElement = findFunc(element);
+                }
+
                 while (compareFunc(searchElement) && scrollPattern.Current.VerticalScrollPercent < 100)
                 {
                     scrollPattern.ScrollVertical(ScrollAmount.LargeIncrement);
@@ -174,9 +179,6 @@

                     searchElement = findFunc(element);
                 }
-
-                // Возвращаем начальное состояние прокрутки
-                scrollPattern.SetScrollPercent(scrollPattern.Current.HorizontalScrollPercent, startVerticalScrollPercent);
             }
             else
             {
@@ -250,7 +252,11 @@
                 return false;
             }

-            scrollPattern.SetScrollPercent(scrollPattern.Current.HorizontalScrollPercent, 0);
+            while (scrollPattern.Current.VerticalScrollPercent > 0)
+            {
+                scrollPattern.ScrollVertical(ScrollAmount.LargeDecrement);
+            }
+
             do
             {
                 scrollPattern.ScrollVertical(ScrollAmount.SmallIncrement);


Add links in footer

Add links in footer

--- src/Dangl.WebDocumentation/Views/Shared/_Layout.cshtml
+++ src/Dangl.WebDocumentation/Views/Shared/_Layout.cshtml
@@ -65,7 +65,7 @@
         @RenderBody()

-
© 2015 - @DateTime.Now.Year: Georg Dangl, @AppSettings.Value.SiteTitle

+
© 2015 - @DateTime.Now.Year:  Georg Dangl, @AppSettings.Value.SiteTitle


[AppleDocWizard] Make the application and its window come in front when launched

--- samples/macdoc/AppleDocWizard/AppleDocWizardDelegate.cs
+++ samples/macdoc/AppleDocWizard/AppleDocWizardDelegate.cs
@@ -15,8 +15,12 @@
 		public override void DidFinishLaunching (MonoMac.Foundation.NSNotification notification)
 		{
 			wizard = new AppleDocWizardController ();
+			NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
+			wizard.Window.MakeMainWindow ();
+			wizard.Window.MakeKeyWindow ();
+			wizard.Window.MakeKeyAndOrderFront (this);
 			wizard.Window.Center ();
-			NSApplication.SharedApplication.ArrangeInFront (this);
+			wizard.VerifyFreshnessAndLaunchDocProcess ();
 			NSApplication.SharedApplication.RunModalForWindow (wizard.Window);
 		}
 	}


Style

Style

--- src/FubarDev.FtpServer.Abstractions/FtpTransferMode.cs
+++ src/FubarDev.FtpServer.Abstractions/FtpTransferMode.cs
@@ -131,6 +131,7 @@
                 case 'L':
                     return FtpFileType.Local;
             }
+
             throw new NotSupportedException($"Unknown file type \"{fileType}\"");
         }


#16 Crash in DirectoryScanner.GetRelativePath()

--- src/ITGlobal.MarkDocs.Core/Content/DirectoryScanner.cs
+++ src/ITGlobal.MarkDocs.Core/Content/DirectoryScanner.cs
@@ -288,33 +288,22 @@
         {
             try
             {
-                if (string.Equals(rootDirectory, path, StringComparison.OrdinalIgnoreCase))
-                {
-                    return string.Empty;
-                }
-
-                rootDirectory = rootDirectory.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
-                if (rootDirectory[rootDirectory.Length - 1] != Path.DirectorySeparatorChar)
-                {
-                    rootDirectory += Path.DirectorySeparatorChar;
-                }
-
-                var rootDirectoryUri = new Uri(rootDirectory);
-                var pathUri = new Uri(path);
-
-                if (rootDirectoryUri.Scheme != pathUri.Scheme)
-                {
-                    return path;
-                }
-
-                var relativeUri = rootDirectoryUri.MakeRelativeUri(pathUri);
-                var relativePath = Uri.UnescapeDataString(relativeUri.ToString());
-
-                if (pathUri.Scheme.Equals("file", StringComparison.OrdinalIgnoreCase))
-                {
-                    relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
-                }
-
+                var normalizedRootPath = Path.GetFullPath(rootDirectory);
+                var normalizedPath = Path.GetFullPath(path);
+
+                if (!normalizedPath.StartsWith(normalizedRootPath))
+                {
+                    throw new Exception($"\"{normalizedRootPath}\" is not a valid root for \"{normalizedPath}\"");
+                }
+
+                var relativePath = normalizedPath.Substring(normalizedRootPath.Length);
+                relativePath = relativePath.Replace(Path.DirectorySeparatorChar, '/');
+                relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, '/');
+                while (relativePath.Length > 0 && relativePath[0] == '/')
+                {
+                    relativePath = relativePath.Substring(0);
+                }
+
                 return relativePath;
             }
             catch (Exception e)


hack on highlighting the button on mouse over

--- GameControl.cs
+++ GameControl.cs
@@ -172,6 +172,15 @@
                     }
                 }

+                Vector2i mp_sw = Mouse.GetPosition(scoreWin);
+                if (mp_sw.X > buyArrowsButton.Position.X && mp_sw.X < buyArrowsButton.Position.X + buyArrowsButton.Size.X &&
+                    mp_sw.Y > buyArrowsButton.Position.Y && mp_sw.Y < buyArrowsButton.Position.Y + buyArrowsButton.Size.Y)
+                {
+                    buyArrowsButton.OutlineThickness = 2;
+                }
+                else
+                    buyArrowsButton.OutlineThickness = 0;
+
                 if (!Mouse.IsButtonPressed(Mouse.Button.Left))
                     isMouseRepeat = true;
             }


Bumped up alpha version to A6.

Bumped up alpha version to A6.

--- CardMaker/CardMakerBuild.cs
+++ CardMaker/CardMakerBuild.cs
@@ -7,7 +7,7 @@
         public static string GetBuildSuffix()
         {
 #if UNSTABLE
-            return "[UNSTABLE] V.A5";
+            return "[UNSTABLE] V.A6";
 #else
             return string.Empty;
 #endif


.announce fix?

.announce fix?

--- src/NadekoBot/Modules/Administration/Administration.cs
+++ src/NadekoBot/Modules/Administration/Administration.cs
@@ -615,7 +615,9 @@
                 g.GetDefaultChannelAsync()
             )).ConfigureAwait(false);

-            await Task.WhenAll(channels.Select(c => c.SendConfirmAsync($"🆕 Message from {umsg.Author} `[Bot Owner]`:", message)))
+            if (channels == null)
+                return;
+            await Task.WhenAll(channels.Where(c => c != null).Select(c => c.SendConfirmAsync($"🆕 Message from {umsg.Author} `[Bot Owner]`:", message)))
                     .ConfigureAwait(false);

             await umsg.Channel.SendConfirmAsync("🆗").ConfigureAwait(false);


Fixed conventions

Fixed conventions

--- src/Nimbus/Extensions/FluentConfigurationExtensions.cs
+++ src/Nimbus/Extensions/FluentConfigurationExtensions.cs
@@ -4,12 +4,12 @@
 {
     internal static class FluentConfigurationExtensions
     {
-        public static T Chain<T>(this T t, Func<T, T> apply)
+        internal static T Chain<T>(this T t, Func<T, T> apply)
         {
             return apply(t);
         }

-        public static T Chain<T>(this T t, Action<T> apply)
+        internal static T Chain<T>(this T t, Action<T> apply)
         {
             apply(t);
             return t;


adding TODO, delete flow

adding TODO, delete flow

--- settings4net.Core.Repositories/ApiSettingsRepository.cs
+++ settings4net.Core.Repositories/ApiSettingsRepository.cs
@@ -81,6 +81,10 @@
                 foreach (Setting setting in settingValues)
                     if (!CurrentSettings.ContainsKey(setting.Key))
                         this.AddSetting(currentEnvironment, setting);
+                // TODO: implement the delete all settings that are not locally and
+                // are in the remote repo
+                //
+                //    this.DeleteSetting()
             }
         }


cleanings + comments

cleanings + comments

--- ChiroAppDev/MainActivity.cs
+++ ChiroAppDev/MainActivity.cs
@@ -27,17 +27,22 @@
 			SetContentView (Resource.Layout.Tabbed);
 			// Get settings
 			ISharedPreferences settings = GetSharedPreferences ("be.chiro.bivak.settings",0);
+			//Toen waarschuwingen als je niet terugkomt van een call
 			if (Globals.CALLED==false)
 			{
+				// de settings zijn nog nooit opgeslagen
 				if (settings.GetBoolean("ingevuld", false) == false){
 					AlertDialog.Builder sendMessage = new AlertDialog.Builder(this);
 					sendMessage.SetTitle("Vul je gegevens in");
 					sendMessage.SetMessage("Om je optimaal te kunnen helpen als er iets mis gaat hebben we je gegevens nodig. Bekijk even de instellingen om ze in te vullen");
 					sendMessage.SetPositiveButton("OK", delegate {});
 					sendMessage.Show();
-				}else if(settings.GetString("naam","") == "" || settings.GetString("groep","") == ""){
+				}
+				//De settings zijn nog niet volledig
+				else if(settings.GetString("naam","") == "" || settings.GetString("groep","") == ""){
 					Android.Widget.Toast.MakeText (this, "Je hebt je naam en/of je chirogroep nog niet ingevuld", ToastLength.Long).Show ();
 				}
+				//reset global var CALLED
 				Globals.CALLED = false;
 			}

@@ -77,13 +82,6 @@

 		}
 		private void belKipdorp(){
-			//call Kipdorp
-
-			//FOR DEV
-			//EditText telField = FindViewById<EditText> (Resource.Id.tel);
-			//var callUri = Android.Net.Uri.Parse ("tel:" + telField.Text);
-
-			//PRODUCTION: UNCOMMENT NEXT LINE

 			var callUri = Android.Net.Uri.Parse ("tel:" + Constants.TELNUMMER);
 			if (Constants.DEV == false){


Fix glitch from my dumb hack

Fix glitch from my dumb hack

--- HtmlEncoder.cs
+++ HtmlEncoder.cs
@@ -195,7 +195,7 @@

 		static HttpEncoder GetCustomEncoderFromConfig ()
 		{
-            return null;
+            return new HttpEncoder();
 		}
 #endif
 #if NET_4_0


Adds spec to show parser works with formula fields.

--- src/CsvHelper.Excel.Specs/ExcelParserSpecs.cs
+++ src/CsvHelper.Excel.Specs/ExcelParserSpecs.cs
@@ -14,9 +14,9 @@
         {
             protected readonly Person[] Values =
             {
-                new Person { Name = "Bill", Age = 20 },
-                new Person { Name = "Ben", Age = 20 },
-                new Person { Name = "Weed", Age = 30 }
+                new Person { Name = "Bill", Age = 40 },
+                new Person { Name = "Ben", Age = 30 },
+                new Person { Name = "Weed", Age = 40 }
             };
             private XLWorkbook workbook;
             private IXLWorksheet worksheet;
@@ -105,7 +105,7 @@

             protected override int StartRow => 5;

-            protected override string Path => "parse_by_path.xlsx";
+            protected override string Path => "parse_by_path_with_offset.xlsx";
         }

         public class ParseUsingPathAndSheetNameSpec : Spec
@@ -181,5 +181,24 @@

             protected override string Path => "parse_with_range.xlsx";
         }
+
+        public class ParseWithFormulaSpec : Spec
+        {
+            public ParseWithFormulaSpec()
+            {
+                for (int i = 0; i < Values.Length; i++)
+                {
+                    var row = Worksheet.Row(2 + i);
+                    row.Cell(2).FormulaA1 = $"=LEN({row.Cell(1).Address.ToStringFixed()})*10";
+                }
+                Workbook.SaveAs(Path);
+                using (var parser = new ExcelParser(Path))
+                {
+                    Run(parser);
+                }
+            }
+
+            protected override string Path => "parser_with_formula.xlsx";
+        }
     }
 }


DCS-30: Add predefined constants to Roles

--- src/DiplomContentSystem.Core/Entities/User.cs
+++ src/DiplomContentSystem.Core/Entities/User.cs
@@ -16,6 +16,10 @@

     public class Role : IEntity
     {
+        public static Role Admin = new Role(){Name="Admin"};
+        public static Role Owner = new Role(){Name="Owner"};
+        public static Role Teacher = new Role(){Name="Teacher"};
+        public static Role Student = new Role(){Name="Student"};
         public int Id { get; set; }
         public string Name { get; set; }


DiscordHttpClient now treats webhook_id as a major parameter

Closes #36

--- src/Discore/Http/DiscordHttpClient.Webhook.cs
+++ src/Discore/Http/DiscordHttpClient.Webhook.cs
@@ -40,7 +40,7 @@
         public async Task<DiscordWebhook> GetWebhook(Snowflake webhookId)
         {
             DiscordApiData apiData = await rest.Get($"webhooks/{webhookId}",
-                "webhooks/webhook").ConfigureAwait(false);
+                $"webhooks/{webhookId}").ConfigureAwait(false);

             return new DiscordWebhook(this, apiData);
         }
@@ -60,7 +60,7 @@
                 throw new ArgumentException("Token cannot be empty or only contain whitespace characters.", nameof(token));

             DiscordApiData apiData = await rest.Get($"webhooks/{webhookId}/{token}",
-                "webhooks/webhook/token").ConfigureAwait(false);
+                $"webhooks/{webhookId}/token").ConfigureAwait(false);

             return new DiscordWebhook(this, apiData);
         }
@@ -115,7 +115,7 @@
                 postData.Set("avatar", avatar);

             DiscordApiData apiData = await rest.Patch($"webhooks/{webhookId}", postData,
-                "webhooks/webhook").ConfigureAwait(false);
+                $"webhooks/{webhookId}").ConfigureAwait(false);

             return new DiscordWebhook(this, apiData);
         }
@@ -128,7 +128,7 @@
         public async Task DeleteWebhook(Snowflake webhookId)
         {
             await rest.Delete($"webhooks/{webhookId}",
-                "webhooks/webhook").ConfigureAwait(false);
+                $"webhooks/{webhookId}").ConfigureAwait(false);
         }

         /// <summary>
@@ -145,7 +145,7 @@
                 throw new ArgumentException("Token cannot be empty or only contain whitespace characters.", nameof(token));

             await rest.Delete($"webhooks/{webhookId}/{token}",
-                "webhooks/webhook/token").ConfigureAwait(false);
+                $"webhooks/{webhookId}/token").ConfigureAwait(false);
         }

         /// <summary>
@@ -172,7 +172,7 @@
             DiscordApiData requestData = options.Build();

             DiscordApiData returnData = await rest.Post($"webhooks/{webhookId}/{token}?wait={waitAndReturnMessage}", requestData,
-                "webhooks/webhook/token").ConfigureAwait(false);
+                $"webhooks/{webhookId}/token").ConfigureAwait(false);

             return waitAndReturnMessage ? new DiscordMessage(this, returnData) : null;
         }
@@ -249,7 +249,7 @@
                 request.Content = data;

                 return request;
-            }, "webhooks/webhook/token").ConfigureAwait(false);
+            }, $"webhooks/{webhookId}/token").ConfigureAwait(false);

             return waitAndReturnMessage ? new DiscordMessage(this, returnData) : null;
         }


Change ImageScaleService to use PixelFormat.Format32bppArgb

My tests show that this seems to stop certain images causing a crash on certain image position modes.
fix #28

--- src/EgamiFlowScreensaver/ImageScaleService.cs
+++ src/EgamiFlowScreensaver/ImageScaleService.cs
@@ -84,7 +84,7 @@
         private static Bitmap TileImage(Image image, Size scaleSize)
         {
             var tiledBitmap =
-                new Bitmap(scaleSize.Width, scaleSize.Height, PixelFormat.Format32bppPArgb);
+                new Bitmap(scaleSize.Width, scaleSize.Height, PixelFormat.Format32bppArgb);
             try
             {
                 tiledBitmap.SetResolution(image.HorizontalResolution, image.VerticalResolution);
@@ -107,8 +107,8 @@
         private static Bitmap ResizeImage(Image image, Size scaleSize)
         {
             var destRect = new Rectangle(0, 0, scaleSize.Width, scaleSize.Height);
-            var resizedImage =
-                new Bitmap(scaleSize.Width, scaleSize.Height, PixelFormat.Format32bppPArgb);
+            var resizedImage = new Bitmap(
+                scaleSize.Width, scaleSize.Height, PixelFormat.Format32bppArgb);
             try
             {
                 resizedImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);


Added 2 statistic methods.

Added 2 statistic methods.

--- src/GM.Utility/GM.Utility/StatisticUtility.cs
+++ src/GM.Utility/GM.Utility/StatisticUtility.cs
@@ -8,6 +8,96 @@
 {
 	public static class StatisticUtility
 	{
+		/// <summary>
+		/// Calculates the linear regression line and returns the a and b parameters of the line. The equation for the line itself is: y = x*a + b.
+		/// <para>
+		/// https://en.wikipedia.org/wiki/Simple_linear_regression
+		/// </para>
+		/// </summary>
+		/// <param name="independantValues">Values of the independant (X-axis) variable.</param>
+		/// <param name="dependantValues">Values of the dependant (Y-axis) variable.</param>
+		public static Tuple<double,double> CalculateSimpleLinearRegressionLine(IEnumerable<double> x,IEnumerable<double> y)
+		{
+			int n;
+			{
+				int xCount = x.Count();
+				int yCount = y.Count();
+
+				if(xCount != yCount) {
+					throw new ArgumentException("The count of both value collections must be the same.");
+				}
+				n = xCount;
+			}
+
+			double xMean = x.Sum() / n;
+			double yMean = y.Sum() / n;
+
+			double a;
+			{
+				double aTop = 0;
+				double aBottom = 0;
+				for(int i = n - 1; i >= 0; --i) {
+					double xi = x.ElementAt(i);
+					double yi = y.ElementAt(i);
+
+					double tmp = xi - xMean;
+
+					aTop += tmp * (yi - yMean);
+					aBottom += Math.Pow(tmp, 2);
+				}
+				a = aTop / aBottom;
+			}
+
+			double b = yMean - a * xMean;
+
+			return Tuple.Create(a, b);
+		}
+
+		/// <summary>
+		/// Calculates the sample correlation coefficient (also called "R squared") between x and y values. Sample correlation coefficient is the proportion of the variance in the dependent variable (x) that is predictable from the independent variable (y).
+		/// <para>
+		/// https://en.wikipedia.org/wiki/Correlation_and_dependence#Pearson.27s_product-moment_coefficient
+		/// </para>
+		/// </summary>
+		/// <param name="independantValues">Values of the independant (X-axis) variable.</param>
+		/// <param name="dependantValues">Values of the dependant (Y-axis) variable.</param>
+		public static double CalculateR2(IEnumerable<double> x, IEnumerable<double> y)
+		{
+			int n;
+			{
+				int xCount = x.Count();
+				int yCount = y.Count();
+
+				if(xCount != yCount) {
+					throw new ArgumentException("The count of both value collections must be the same.");
+				}
+				n = xCount;
+			}
+
+			double xMean = 0;
+			double yMean = 0;
+			double xyMean = 0;
+			double x2Mean = 0;
+			double y2Mean = 0;
+			for(int i = n - 1; i >= 0; --i) {
+				double xi = x.ElementAt(i);
+				double yi = y.ElementAt(i);
+
+				xMean += xi;
+				yMean += yi;
+				xyMean += xi * yi;
+				x2Mean += xi * xi;
+				y2Mean += yi * yi;
+			}
+			xMean /= n;
+			yMean /= n;
+			xyMean /= n;
+			x2Mean /= n;
+			y2Mean /= n;
+
+			return Math.Pow((xyMean - xMean * yMean), 2) / ((x2Mean - xMean * xMean) * (y2Mean - yMean * yMean));
+		}
+
 		/// <summary>
 		/// Calculates the standard deviation of the provided values.
 		/// <para>


unicode properties are stored in SQL x2

unicode properties are stored in SQL x2

--- src/Horton.MigrationGenerator/EF6/DiffTool.cs
+++ src/Horton.MigrationGenerator/EF6/DiffTool.cs
@@ -162,6 +162,12 @@
                     yield return new AddColumn(objectIdentifier, ColumnInfo.FromEF6(property, entitySet.Table));
                 }

+                if (property.IsUnicode == true)
+                {
+                    // unicode (nchar,nvarchar) are storaged at double the length
+                    existingColumn.max_length = (short)(existingColumn.max_length / 2);
+                }
+
                 if (property.IsStoreGeneratedIdentity != existingColumn.is_identity && typeName != "uniqueidentifier")
                 {
                     yield return new AlterColumn(objectIdentifier, ColumnInfo.FromEF6(property, entitySet.Table), $"IDENTITY Attribute Altered For [{entityName}]. EF = {property.IsStoreGeneratedIdentity} DB = {existingColumn.is_identity}");


Made the OperationResult provide the messages and exceptions in the order of their addition.

--- src/Kephas.Core/Operations/OperationResult.cs
+++ src/Kephas.Core/Operations/OperationResult.cs
@@ -137,11 +137,19 @@
         /// Internal implementation of a concurrent collection.
         ///
         /// <typeparam name="T">The item type.</typeparam>
-        private class ConcurrentCollection<T> : ConcurrentBag<T>, ICollection<T>
+        private class ConcurrentCollection<T> : ConcurrentQueue<T>, ICollection<T>
         {
             /// Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only.
             /// <returns>true if the <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only; otherwise, false.</returns>
             public bool IsReadOnly => false;
+
+            /// Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"></see>.
+            /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"></see>.</param>
+            /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only.</exception>
+            public void Add(T item)
+            {
+                this.Enqueue(item);
+            }

             /// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"></see>.
             /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"></see> is read-only.</exception>


Do not put projects on hold for DNS errors (#270)

DNS errors are likely transient, so don't put projects on hold if that
happens.

--- src/LfMerge.Core/Actions/SynchronizeAction.cs
+++ src/LfMerge.Core/Actions/SynchronizeAction.cs
@@ -165,6 +165,15 @@
 					return;
 				}

+				// Re-queue projects if clone failed due to DNS errors, as those are likely to be transient
+				if (SyncResultedInError(project, syncResult,
+						"Temporary failure in name resolution",
+						ProcessingState.SendReceiveStates.CLONING))
+				{
+					LfMerge.Core.Queues.Queue.GetQueue(LfMerge.Core.Queues.QueueNames.Synchronize).EnqueueProject(project.ProjectCode);
+					return;
+				}
+
 				line = LfMergeBridgeServices.GetLineContaining(syncResult, "No changes from others");
 				if (!string.IsNullOrEmpty(line))
 				{


cvbcvb

cvbcvb

--- src/MVCBlog.Website/Views/Murilo/Index.cshtml
+++ src/MVCBlog.Website/Views/Murilo/Index.cshtml
@@ -31,7 +31,7 @@

-
Rovian Voelz Veronez

+
Murilo Santana

                 software developer


Fixé le delete

Fixé le delete

--- src/Maetsilor/Controllers/MembreController.cs
+++ src/Maetsilor/Controllers/MembreController.cs
@@ -82,9 +82,12 @@
         }

         // GET: Membre/Delete/5
-        public ActionResult Delete(int id)
+        public ActionResult Delete(string id)
         {
-            return View();
+            _context.Remove(_context.Users.Where(m => m.Id == id).Single());
+            _context.SaveChanges();
+            return RedirectToAction("Index");
+
         }

         // POST: Membre/Delete/5
@@ -95,9 +98,7 @@
             try
             {
                 // TODO: Add delete logic here
-               _context.Remove(_context.Users.Where(m => m.Id == id).Single());
-                _context.SaveChanges();
-                return RedirectToAction("Index");
+                return View();
             }
             catch
             {


LWDEV-3350: Increase volume accuracy

LWDEV-3350: Increase volume accuracy

--- src/MarginTrading.Core/MarginTradingConsts.cs
+++ src/MarginTrading.Core/MarginTradingConsts.cs
@@ -3,7 +3,7 @@
     public static class MarginTradingHelpers
     {
         // TODO: Rethink
-        public const int VolumeAccuracy = 2;
+        public const int VolumeAccuracy = 8;
     }

     public static class MatchingEngines


better error message from ProductionSchemaCreation. Closes GH-119

--- src/Marten/Schema/ProductionSchemaCreation.cs
+++ src/Marten/Schema/ProductionSchemaCreation.cs
@@ -7,7 +7,10 @@
     {
         public void CreateSchema(IDocumentSchema schema, DocumentMapping mapping)
         {
-            throw new InvalidOperationException("No document storage exists for type {0} and cannot be created dynamically in production mode".ToFormat(mapping.DocumentType.FullName));
+            var className = nameof(StoreOptions);
+            var propName = nameof(StoreOptions.AutoCreateSchemaObjects);
+
+            throw new InvalidOperationException($"No document storage exists for type {mapping.DocumentType.FullName} and cannot be created dynamically unless the {className}.{propName} = true. See http://jasperfx.github.io/marten/documentation/documents/ for more information");
         }

         public void RunScript(string script)


Fix incorrectly resolved cross-document pointers

--- src/Microsoft.HttpRepl/OpenApi/PointerUtil.cs
+++ src/Microsoft.HttpRepl/OpenApi/PointerUtil.cs
@@ -19,6 +19,8 @@

         private static async Task<JToken> ResolvePointersAsync(Uri loadLocation, JToken root, JToken toResolve, HttpClient client)
         {
+            JToken cursor = root;
+
             if (toResolve is JArray arr)
             {
                 for (int i = 0; i < arr.Count; ++i)
@@ -69,7 +71,7 @@
                             return new JValue((object)null);
                         }

-                        return await ResolvePointersAsync(loadTarget, newRoot, newRoot, client).ConfigureAwait(false);
+                        cursor = await ResolvePointersAsync(loadTarget, newRoot, newRoot, client).ConfigureAwait(false);
                     }

                     //We're in the right document, grab the bookmark (fragment) of the URI and get the element at that path
@@ -81,7 +83,6 @@
                     }

                     string[] parts = fragment.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
-                    JToken cursor = root;

                     for (int i = 0; i < parts.Length; ++i)
                     {


NH-812 - missing space in PostgreSQL81Dialect.ForUpdateNowaitString.

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@2482

--- src/NHibernate/Dialect/PostgreSQL81Dialect.cs
+++ src/NHibernate/Dialect/PostgreSQL81Dialect.cs
@@ -13,12 +13,12 @@
 	{
 		public override string ForUpdateNowaitString
 		{
-			get { return "for update nowait"; }
+			get { return " for update nowait"; }
 		}

 		public override string GetForUpdateNowaitString( string aliases )
 		{
-			return "for update of " + aliases + " nowait";
+			return " for update of " + aliases + " nowait";
 		}
 	}
 }


SourceWriteFormatter must be a closed generic type for Value

--- src/Nest/QueryDsl/TermLevel/Term/TermQuery.cs
+++ src/Nest/QueryDsl/TermLevel/Term/TermQuery.cs
@@ -8,13 +8,12 @@
 	public interface ITermQuery : IFieldNameQuery
 	{
 		[DataMember(Name ="value")]
-		[JsonFormatter(typeof(SourceWriteFormatter<>))]
+		[JsonFormatter(typeof(SourceWriteFormatter<object>))]
 		object Value { get; set; }
 	}

 	public class TermQuery : FieldNameQueryBase, ITermQuery
 	{
-		[JsonFormatter(typeof(SourceWriteFormatter<>))]
 		public object Value { get; set; }

 		protected override bool Conditionless => IsConditionless(this);


- Allow for options that are out of range in PopupGUI

--- Controls/Editor/PopupGUI.cs
+++ Controls/Editor/PopupGUI.cs
@@ -21,6 +21,7 @@
 		/// <param name="selectedOption">The selected option, or null for none.</param>
 		/// <param name="noneOption">The option for "no selection", or null for none.</param>
 		/// <param name="hasMultipleDifferentValues">Whether the content has multiple different values.</param>
+		/// <param name="allowOuterOption">Whether a selected option not in range should be allowed.</param>
 		public static void Render
 		(
 			Rect position,
@@ -28,7 +29,8 @@
 			IEnumerable<PopupOption<T>> options,
 			PopupOption<T> selectedOption,
 			PopupOption<T> noneOption,
-			bool hasMultipleDifferentValues
+			bool hasMultipleDifferentValues,
+			bool allowOuterOption = true
 		)
 		{
 			bool hasOptions = options != null && options.Any();
@@ -86,7 +88,11 @@
 			{
 				// Selected option isn't in range

-				if (noneOption != null)
+				if (allowOuterOption)
+				{
+					callback(selectedOption.value);
+				}
+				else if (noneOption != null)
 				{
 					callback(noneOption.value);
 				}


clean code für c6.4

clean code für c6.4

--- src/ReferenceGridFormWorkSpaceEditor/Addon.cs
+++ src/ReferenceGridFormWorkSpaceEditor/Addon.cs
@@ -78,14 +78,9 @@

             if (!_menus.ContainsKey(referenceGridForm))
             {
-                // C6.3 Falscher Key
-                //var viewMenu = referenceGridForm
-                //           .GetCommandbar(ReferenceGridFormCommandbarId.Menu)
-                //           .GetCommandbarMenu(ReferenceGridFormCommandbarMenuId.View);
-
-                // in C6.3 funktioniert referenceGridForm.GetCommandbar(ReferenceGridFormCommandbarId.Menu) nicht
-                var viewMenu = CommandbarMenu.Create(referenceGridForm.MainToolbarsManager.Toolbars["MainMenu"].Tools["ViewMenu"] as PopupMenuTool);
-
+                var viewMenu = referenceGridForm
+                           .GetCommandbar(ReferenceGridFormCommandbarId.Menu)
+                           .GetCommandbarMenu(ReferenceGridFormCommandbarMenuId.View);

                 var menu = viewMenu.InsertCommandbarMenu(viewMenu.Tool.Tools.Count - 1, Key_Menu.FormatString(referenceGridForm.Id.ToString()), ReferenceGridFormWorkSpaceEditorResources.Menu_Caption);
                 menu.HasSeparator = true;


Fix Identify

Fix Identify

Fix ArgumentException: if key already exists in the dictionary and fix repeatedly identification

--- source/Assets/Scripts/InfinarioSDK/InfinarioUnitySDK.cs
+++ source/Assets/Scripts/InfinarioSDK/InfinarioUnitySDK.cs
@@ -38,15 +38,19 @@

 		public override void Identify(Dictionary<string, object> customer, Dictionary<string, object> properties)
 		{
-			if (customer.ContainsKey (Constants.ID_REGISTERED))
+			if (customer.ContainsKey (Constants.ID_REGISTERED) && customer[Constants.ID_REGISTERED] != null)
 			{
-				customerIds.Add(Constants.ID_REGISTERED, customer[Constants.ID_REGISTERED]);
-				storage.SaveRegisteredId(customer[Constants.ID_REGISTERED].ToString());
-				Dictionary<string, object> mergedProperties = MergeAutomaticProperties(customer);
-				Track (Constants.EVENT_IDENTIFICATION, mergedProperties, double.NaN);
-
-				if (properties != null)
-					Update(properties);
+				customerIds[Constants.ID_REGISTERED] = customer[Constants.ID_REGISTERED];
+
+				if (!customer[Constants.ID_REGISTERED].Equals(storage.GetRegisteredId()))
+				{
+					storage.SaveRegisteredId(customer[Constants.ID_REGISTERED].ToString());
+					Dictionary<string, object> mergedProperties = MergeAutomaticProperties(customer);
+					Track (Constants.EVENT_IDENTIFICATION, mergedProperties, double.NaN);
+
+					if (properties != null)
+						Update(properties);
+				}
 			}
 		}


Version update to 1.2.0

Version update to 1.2.0

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


dynamic params optimization

dynamic params optimization

--- src/Runtime/pchpcor/Dynamic/OverloadBinder.cs
+++ src/Runtime/pchpcor/Dynamic/OverloadBinder.cs
@@ -406,14 +406,22 @@

                     if (element_type == _argsarray.Type.GetElementType())
                     {
-                        // static void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
-                        var array_copy = typeof(Array).GetMethod("Copy", typeof(Array), typeof(int), typeof(Array), typeof(int), typeof(int)); // TODO: to cache
-
-                        expr_newarr = Expression.Block(
-                            expr_newarr,
-                            Expression.Call(array_copy, _argsarray, Expression.Constant(fromarg), var_array, Expression.Constant(0), var_length),   // Array.Copy(argv, fromarg, array, 0, length)
-                            var_array
-                            );
+                        if (fromarg == 0)
+                        {
+                            // return argv;
+                            return _argsarray;
+                        }
+                        else
+                        {
+                            // static void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
+                            var array_copy = typeof(Array).GetMethod("Copy", typeof(Array), typeof(int), typeof(Array), typeof(int), typeof(int)); // TODO: to cache
+
+                            expr_newarr = Expression.Block(
+                                expr_newarr,
+                                Expression.Call(array_copy, _argsarray, Expression.Constant(fromarg), var_array, Expression.Constant(0), var_length),   // Array.Copy(argv, fromarg, array, 0, length)
+                                var_array
+                                );
+                        }
                     }
                     else
                     {


Fixed issue with autofac lambda resolution

--- src/SceneJect.Common/Injection/SceneJector.cs
+++ src/SceneJect.Common/Injection/SceneJector.cs
@@ -59,11 +59,11 @@
 				nbd.Register(AutofacContainerBuilder);

 			//Register the GameObjectFactory and ComponentFactory too
-			AutofacContainerBuilder.Register(context => new DefaultGameObjectFactory(context, new DefaultInjectionStrategy()))
+			AutofacContainerBuilder.Register(context => new DefaultGameObjectFactory(context.Resolve<IComponentContext>(), new DefaultInjectionStrategy()))
 				.As<IGameObjectFactory>()
 				.SingleInstance();

-			AutofacContainerBuilder.Register(context => new DefaultGameObjectComponentAttachmentFactory(context, new DefaultInjectionStrategy()))
+			AutofacContainerBuilder.Register(context => new DefaultGameObjectComponentAttachmentFactory(context.Resolve<IComponentContext>(), new DefaultInjectionStrategy()))
 				.As<IGameObjectComponentAttachmentFactory>()
 				.SingleInstance();


GasReturned to 200k

GasReturned to 200k

--- src/Services/Coins/ExchangeContractService.cs
+++ src/Services/Coins/ExchangeContractService.cs
@@ -254,7 +254,7 @@

             var convertedId = EthUtils.GuidToBigInteger(id);
             var transactionHash = await transferFunction.SendTransactionAsync(Constants.AddressForRoundRobinTransactionSending,
-                    new HexBigInteger(Constants.HalfGasLimit), new HexBigInteger(0),
+                    new HexBigInteger(Constants.GasForCoinTransaction), new HexBigInteger(0),
                     convertedId, coinAFromDb.AdapterAddress, from, to, amount, sign.HexToByteArray().FixByteOrder(), new byte[0]);
             await SaveUserHistory(coinAddress, amount.ToString(), from, to, transactionHash, "Transfer");
             await CreatePendingTransaction(coinAddress, from, transactionHash);
@@ -290,7 +290,7 @@
             var transferFunction = contract.GetFunction("transferWithChange");
             var convertedId = EthUtils.GuidToBigInteger(id);
             var transactionHash = await transferFunction.SendTransactionAsync(Constants.AddressForRoundRobinTransactionSending,
-                    new HexBigInteger(Constants.HalfGasLimit), new HexBigInteger(0),
+                    new HexBigInteger(Constants.GasForCoinTransaction), new HexBigInteger(0),
                     convertedId, coinAFromDb.AdapterAddress, from, to, amount, change,
                     signFrom.HexToByteArray().FixByteOrder(), signTo.HexToByteArray().FixByteOrder(), new byte[0]);
             var difference = (amount - change);


increased version number

increased version number

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


look in areas view locations for layouts as well as standard view locations

--- src/Spark.Web.Mvc/DefaultDescriptorBuilder.cs
+++ src/Spark.Web.Mvc/DefaultDescriptorBuilder.cs
@@ -193,10 +193,10 @@
             {
                 return ApplyFilters(new[]
                                         {
+                                            string.Format("~{0}Areas{0}{1}{0}Views{0}{2}{0}{3}.spark", Path.DirectorySeparatorChar, extra["area"], controllerName, viewName),
+                                            string.Format("~{0}Areas{0}{1}{0}Views{0}Shared{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], viewName),
                                             string.Format("{0}{1}{2}.spark", controllerName, Path.DirectorySeparatorChar, viewName),
                                             string.Format("Shared{0}{1}.spark", Path.DirectorySeparatorChar, viewName),
-                                            string.Format("~{0}Areas{0}{1}{0}Views{0}{2}{0}{3}.spark", Path.DirectorySeparatorChar, extra["area"], controllerName, viewName),
-                                            string.Format("~{0}Areas{0}{1}{0}Views{0}Shared{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], viewName)
                                         }, extra);
             }
             return ApplyFilters(new[]
@@ -208,15 +208,40 @@

         protected virtual IEnumerable<string> PotentialMasterLocations(string masterName, IDictionary<string, object> extra)
         {
+            if (extra.ContainsKey("area") && !string.IsNullOrEmpty(extra["area"] as string))
+            {
+                return ApplyFilters(new[]
+                                    {
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Layouts{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], masterName),
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Shared{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], masterName),
+                                        string.Format("Layouts{0}{1}.spark", Path.DirectorySeparatorChar,masterName),
+                                        string.Format("Shared{0}{1}.spark", Path.DirectorySeparatorChar,masterName),
+                                    }, extra);
+            }
             return ApplyFilters(new[]
                                     {
                                         string.Format("Layouts{0}{1}.spark", Path.DirectorySeparatorChar,masterName),
-                                        string.Format("Shared{0}{1}.spark", Path.DirectorySeparatorChar,masterName)
+                                        string.Format("Shared{0}{1}.spark", Path.DirectorySeparatorChar,masterName),
                                     }, extra);
         }

         protected virtual IEnumerable<string> PotentialDefaultMasterLocations(string controllerName, IDictionary<string, object> extra)
         {
+            if (extra.ContainsKey("area") && !string.IsNullOrEmpty(extra["area"] as string))
+            {
+                return ApplyFilters(new[]
+                                    {
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Layouts{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], controllerName),
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Shared{0}{2}.spark", Path.DirectorySeparatorChar, extra["area"], controllerName),
+                                        string.Format("Layouts{0}{1}.spark", Path.DirectorySeparatorChar, controllerName),
+                                        string.Format("Shared{0}{1}.spark", Path.DirectorySeparatorChar, controllerName),
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Layouts{0}Application.spark", Path.DirectorySeparatorChar, extra["area"]),
+                                        string.Format("~{0}Areas{0}{1}{0}Views{0}Shared{0}Application.spark", Path.DirectorySeparatorChar, extra["area"]),
+                                        string.Format("Layouts{0}Application.spark", Path.DirectorySeparatorChar),
+                                        string.Format("Shared{0}Application.spark", Path.DirectorySeparatorChar),
+                                    }, extra);
+            }
+
             return ApplyFilters(new[]
                                     {
                                         string.Format("Layouts{0}{1}.spark", Path.DirectorySeparatorChar, controllerName),
@@ -226,4 +251,4 @@
                                     }, extra);
         }
     }
-}
+}


Support for creating an empty result based on expected tokens

--- src/Superpower/Model/TokenListParserResult.cs
+++ src/Superpower/Model/TokenListParserResult.cs
@@ -11,6 +11,9 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
+
+using System.Linq;
+using Superpower.Display;

 namespace Superpower.Model
 {
@@ -42,6 +45,20 @@
         public static TokenListParserResult<TKind, T> Empty<TKind, T>(TokenList<TKind> remainder, string[] expectations)
         {
             return new TokenListParserResult<TKind, T>(remainder, Position.Empty, null, expectations, false);
+        }
+
+        /// <summary>
+        /// Create a token result with no value, indicating a failure to parse any value.
+        /// </summary>
+        /// <typeparam name="TKind">The kind of token.</typeparam>
+        /// <typeparam name="T">The result type.</typeparam>
+        /// <param name="remainder">The start of un-parsed input.</param>
+        /// <param name="expectations">Expectations that could not be fulfilled.</param>
+        /// <returns>An empty result.</returns>
+        public static TokenListParserResult<TKind, T> Empty<TKind, T>(TokenList<TKind> remainder, TKind[] expectations)
+        {
+            var stringExpectations = expectations.Select(Presentation.FormatExpectation).ToArray();
+            return new TokenListParserResult<TKind, T>(remainder, Position.Empty, null, stringExpectations, false);
         }

         /// <summary>


Fix UmAlQuraCalendar static data initilaization

The current way of declaring the static data is cauing null reference exception
when the static constructor get called. the reason is the static initialization
method InitDateMapping is using the static array rawData which is not really
get initilaized yet when InitDateMapping execute.

The fix is moving rawData inside InitDateMapping.

https://github.com/dotnet/corefx/issues/6774#issuecomment-196044580


Fix tilde substitution when resolving folders

--- src/SyncTrayzor/SyncThing/SyncThingManager.cs
+++ src/SyncTrayzor/SyncThing/SyncThingManager.cs
@@ -257,7 +257,7 @@
                 var ignores = await this.apiClient.FetchIgnoresAsync(folder.ID);
                 var path = folder.Path;
                 if (path.StartsWith("~"))
-                    path = Path.Combine(tilde, path.Substring(1));
+                    path = Path.Combine(tilde, path.Substring(1).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));
                 return new Folder(folder.ID, path, new FolderIgnores(ignores.IgnorePatterns, ignores.RegexPatterns));
             });


first changes for rabbit connection

first changes for rabbit connection

--- src/TWCore.Messaging.RabbitMQ/RabbitMQueue.cs
+++ src/TWCore.Messaging.RabbitMQ/RabbitMQueue.cs
@@ -109,12 +109,12 @@
                 if (Channel != null) return;
                 if (CurrentConnections.TryGetValue(Route, out var connection))
                 {
-                    Core.Log.LibVerbose("Using existing connection, creating channel for: Route={0}, Name={1}", Route, Name);
+                    Core.Log.InfoDetail("Using existing connection, creating channel for: Route={0}, Name={1}", Route, Name);
                     Channel = connection.CreateModel();
                 }
                 else
                 {
-                    Core.Log.LibVerbose("Creating connection for: Route={0}", Route);
+                    Core.Log.InfoDetail("Creating connection for: Route={0}", Route);
                     var factory = new ConnectionFactory
                     {
                         Uri = new Uri(Route),
@@ -122,7 +122,7 @@
                         AutomaticRecoveryEnabled = true,
                     };
                     connection = factory.CreateConnection();
-                    Core.Log.LibVerbose("Creating channel for: Route={0}, Name={1}", Route, Name);
+                    Core.Log.InfoDetail("Creating channel for: Route={0}, Name={1}", Route, Name);
                     Channel = connection.CreateModel();
                     CurrentConnections.TryAdd(Route, connection);
                 }


Mark TestMerge.PrimaryRevisionInformation as required

--- src/Tgstation.Server.Host/Models/TestMerge.cs
+++ src/Tgstation.Server.Host/Models/TestMerge.cs
@@ -15,6 +15,7 @@
 		/// <summary>
 		/// The initial <see cref="RevisionInformation"/> the <see cref="TestMerge"/> was merged with
 		/// </summary>
+		[Required]
 		public RevisionInformation PrimaryRevisionInformation { get; set; }

 		/// <summary>


Add support for async methods

Add support for async methods

--- src/Avalonia.Xaml.Interactions/Core/CallMethodAction.cs
+++ src/Avalonia.Xaml.Interactions/Core/CallMethodAction.cs
@@ -3,6 +3,7 @@
 using System.Diagnostics;
 using System.Globalization;
 using System.Reflection;
+using System.Threading.Tasks;
 using Avalonia.Controls;
 using Avalonia.Xaml.Interactivity;

@@ -179,7 +180,7 @@
         foreach (var method in _targetObjectType.GetRuntimeMethods())
         {
             if (string.Equals(method.Name, MethodName, StringComparison.Ordinal)
-                && method.ReturnType == typeof(void)
+                && (method.ReturnType == typeof(void) || method.ReturnType == typeof(Task))
                 && method.IsPublic)
             {
                 var parameters = method.GetParameters();


Use IEnumerable instaed of List for fetching datatypes

--- src/Umbraco.Web/Editors/DataTypeController.cs
+++ src/Umbraco.Web/Editors/DataTypeController.cs
@@ -116,7 +116,7 @@

         [UmbracoTreeAuthorize(Constants.Trees.DataTypes, Constants.Trees.Content, Constants.Trees.Media)]
-        public IDictionary<string, List<DataTypeBasic>> GetAllDataTypesAndEditors()
+        public IDictionary<string, IEnumerable<DataTypeBasic>> GetAllDataTypesAndEditors()
         {
             var datadefs = Services.DataTypeService
                                     .GetAllDataTypeDefinitions();
@@ -130,7 +130,7 @@
             foreach (var unusedEditor in editors)
                 datatypes.Add(Mapper.Map<DataTypeBasic>(unusedEditor));

-            var grouped = datatypes.GroupBy(x => x.Group.ToLower()).ToDictionary(group => group.Key, group => group.ToList());
+            var grouped = datatypes.GroupBy(x => x.Group.ToLower()).ToDictionary(group => group.Key, group => group.AsEnumerable());
             return grouped;
         }


Fix incorrect log level in message

Fix incorrect log level in message

--- src/Certify.Providers/ACME/Certes/CertesACMEProvider.cs
+++ src/Certify.Providers/ACME/Certes/CertesACMEProvider.cs
@@ -453,7 +453,7 @@
                         {
                             remainingAttempts--;

-                            log.Error($"BeginCertificateOrder: creating/retrieving order. Retries remaining:{remainingAttempts} ");
+                            log.Information($"BeginCertificateOrder: creating/retrieving order. Retries remaining:{remainingAttempts} ");

                             if (orderUri != null)
                             {
@@ -718,6 +718,7 @@
                     while (attempts > 0 && result.Status == ChallengeStatus.Pending || result.Status == ChallengeStatus.Processing)
                     {
                         result = await challenge.Resource();
+                        await Task.Delay(500);
                     }

                     if (result.Status == ChallengeStatus.Valid)


Resize notebook tab headers if new tab label text has been assigned.

--- src/Xwt.Sdl/Xwt.SdlBackend/NotebookBackend.cs
+++ src/Xwt.Sdl/Xwt.SdlBackend/NotebookBackend.cs
@@ -226,6 +226,9 @@
 			foreach (var th in TabHeaders)
 				if (th.Tab == tab) {
 					th.Text = tab.Label;
+
+					RealignTabHeaders ();
+					Invalidate ();
 					return;
 				}
 		}


Delete DefaultConfigurationSource.cs

Delete DefaultConfigurationSource.cs

--- src/Yalla/Net45/DefaultConfigurationSource.cs
+++ src/Yalla/Net45/DefaultConfigurationSource.cs
@@ -1,188 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Configuration;
-using System.Linq;
-using System.Reflection;
-using Yalla.Configuration;
-
-namespace Yalla
-{
-    /// <summary>
-    /// Default configuration source.
-    /// </summary>
-    public class DefaultConfigurationSource : IConfigurationSource
-    {
-        private static readonly DefaultConfigurationSource _instance =
-            new DefaultConfigurationSource(() => ConfigurationManager.GetSection(ConfigurationSectionHandler.SectionName) as ConfigurationSectionHandler);
-
-        /// <summary>
-        /// Gets the default instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        public static DefaultConfigurationSource Instance
-        {
-            get { return _instance; }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        /// <param name="sectionName">Section name.</param>
-        public static DefaultConfigurationSource FromSection(string sectionName)
-        {
-            var section = ConfigurationManager.GetSection(sectionName);
-            return new DefaultConfigurationSource(section);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        /// <param name="sectionGroupName">Section group name.</param>
-        /// <param name="sectionName">Section name.</param>
-        public static DefaultConfigurationSource FromSection(string sectionGroupName, string sectionName)
-        {
-            var exePath = Assembly.GetEntryAssembly().Location;
-            return FromExeConfiguration(exePath, sectionGroupName, sectionName);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        /// <param name="exePath">The path of the executable (exe) file.</param>
-        public static DefaultConfigurationSource FromExeConfiguration(string exePath)
-        {
-            var config = ConfigurationManager.OpenExeConfiguration(exePath);
-            return FromConfiguration(config, ConfigurationSectionHandler.SectionName);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        /// <param name="exePath">The path of the executable (exe) file.</param>
-        /// <param name="sectionName">Section name.</param>
-        public static DefaultConfigurationSource FromExeConfiguration(string exePath, string sectionName)
-        {
-            var config = ConfigurationManager.OpenExeConfiguration(exePath);
-            return FromConfiguration(config, sectionName);
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="Yalla.DefaultConfigurationSource"/> class.
-        /// </summary>
-        /// <param name="exePath">The path of the executable (exe) file.</param>
-        /// <param name="sectionGroupName">Section group name.</param>
-        /// <param name="sectionName">Section name.</param>
-        public static DefaultConfigurationSource FromExeConfiguration(string exePath, string sectionGroupName, string sectionName)
-        {
-            var config = ConfigurationManager.OpenExeConfiguration(exePath);
-            return FromConfiguration(config, sectionGroupName, sectionName);
-        }
-
-        private static DefaultConfigurationSource FromConfiguration(System.Configuration.Configuration config, string sectionName)
-        {
-            var section = config.GetSection(sectionName);
-            return new DefaultConfigurationSource(section);
-        }
-
-        private static DefaultConfigurationSource FromConfiguration(System.Configuration.Configuration config, string sectionGroupName, string sectionName)
-        {
-            var group = config.GetSectionGroup(sectionGroupName);
-            var section = group.Sections.Get(sectionName);
-            return new DefaultConfigurationSource(section);
-        }
-
-        private Lazy<ConfigurationSectionHandler> _section;
-
-        private DefaultConfigurationSource(Func<ConfigurationSectionHandler> getSection)
-        {
-            _section = new Lazy<ConfigurationSectionHandler>(getSection);
-        }
-
-        private DefaultConfigurationSource(object value)
-        {
-            if (value == null)
-                throw new InvalidOperationException("Section not found.");
-            var section = value as ConfigurationSectionHandler;
-            if (section == null)
-            {
-                var message = string.Format("Section type must be {0}.", typeof(ConfigurationSectionHandler).FullName);
-                throw new InvalidOperationException(message);
-            }
-            _section = new Lazy<ConfigurationSectionHandler>(() => section);
-        }
-
-        /// <summary>
-        /// Configures a log factory.
-        /// </summary>
-        public ILogFactory Configure()
-        {
-            if (Section == null)
-                return NoOpLoggerFactory.Instance;
-            return new LogFactory(
-                CreateInstance<ILoggerFactoryAdapter>(Section.Adapter, "Adapter") ?? NoOpLoggerFactoryAdapter.Instance,
-                CreateInstance<ILogFormatter>(Section.Formatter, "Formatter") ?? DefaultFormatter.Instance);
-        }
-
-        private T CreateInstance<T>(TypeConfigurationElement element, string displayName)
-            where T : class
-        {
-            if (!element.IsPresent)
-                return null;
-            var typeName = element.GetPropertyValue(TypeConfigurationElement.TypePropertyName) as string;
-            if (string.IsNullOrEmpty(typeName))
-            {
-                var message = string.Format("{0} type is required.", displayName);
-                throw new InvalidOperationException(message);
-            }
-            var type = Type.GetType(typeName, true);
-            var instance = Activator.CreateInstance(type) as T;
-            if (instance == null)
-            {
-                var message = string.Format("{0}s must implement {1}.", displayName, typeof(T).FullName);
-                throw new InvalidOperationException(message);
-            }
-            var property = type.GetProperty("Settings", BindingFlags.Public | BindingFlags.Instance);
-            if (property != null)
-            {
-                var settings = GetSettings(element, type, property.PropertyType);
-                property.SetValue(instance, settings, null);
-            }
-            return instance;
-        }
-
-        private static object GetSettings(TypeConfigurationElement element, Type type, Type settingsType)
-        {
-            var settingsAttr = type.GetCustomAttribute<SettingsAttribute>();
-            if (settingsAttr != null)
-                settingsType = settingsAttr.Type;
-            var settings = Activator.CreateInstance(settingsType);
-            var properties = TypeDescriptor.GetProperties(settings)
-                .Cast<PropertyDescriptor>()
-                .Where(p => p.Name.ToLowerInvariant() != TypeConfigurationElement.TypePropertyName);
-            foreach (var property in properties)
-            {
-                var propertyValue = GetPropertyValue(element, property.Name);
-                if (propertyValue != null)
-                {
-                    var value = property.Converter.ConvertFrom(propertyValue);
-                    property.SetValue(settings, value);
-                }
-            }
-            return settings;
-        }
-
-        private static object GetPropertyValue(TypeConfigurationElement element, string name)
-        {
-            var property = element.ElementInformation.Properties
-                .Cast<PropertyInformation>()
-                .SingleOrDefault(p => p.Name.ToLowerInvariant() == name.ToLowerInvariant());
-            return property != null
-                ? property.Value
-                : null;
-        }
-
-        private ConfigurationSectionHandler Section
-        {
-            get { return _section.Value as ConfigurationSectionHandler; }
-        }
-    }
-}


Update MessageHelper.cs (#508)

Update MessageHelper.cs (#508)

--- src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs
+++ src/Discord.Net.Rest/Entities/Messages/MessageHelper.cs
@@ -36,7 +36,7 @@
         }

         public static async Task RemoveReactionAsync(IMessage msg, IUser user, Emoji emoji, BaseDiscordClient client, RequestOptions options)
-            => await RemoveReactionAsync(msg, user, emoji.Id == 0 ? emoji.Name : $"{emoji.Name}:{emoji.Id}", client, options).ConfigureAwait(false);
+            => await RemoveReactionAsync(msg, user, emoji.Id == null ? emoji.Name : $"{emoji.Name}:{emoji.Id}", client, options).ConfigureAwait(false);
         public static async Task RemoveReactionAsync(IMessage msg, IUser user, string emoji, BaseDiscordClient client,
             RequestOptions options)
         {


Restrict flights to club owned flight when filtering for other locations Sorting flight summary according groupBy column

--- src/FLS.Server.Service/Reporting/FlightReportService.cs
+++ src/FLS.Server.Service/Reporting/FlightReportService.cs
@@ -108,6 +108,20 @@

                 flights = flights.WhereIf(filter.LocationId.HasValue,
                     flight => flight.StartLocationId == filter.LocationId.Value || flight.LdgLocationId == filter.LocationId.Value);
+
+                //check also if we have to restrict to the club owned data when selecting a location
+                if (filter.LocationId.HasValue)
+                {
+                    var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                    if (club != null
+                        && club.HomebaseId.HasValue
+                        && club.HomebaseId.Value != filter.LocationId.Value)
+                    {
+                        //we have to restrict the flights of other locations to our own club related flight data
+                        flights = flights.Where(flight => flight.OwnerId == club.ClubId);
+                    }
+                }

                 //filter only flights where person is Pilot, Copilot or instructor
                 flights = flights.WhereIf(filter.FlightCrewPersonId.HasValue,
@@ -205,6 +219,20 @@
                         flight => flight.StartLocationId == filter.LocationId.Value ||
                                   flight.LdgLocationId == filter.LocationId.Value);

+                    //check also if we have to restrict to the club owned data when selecting a location
+                    if (filter.LocationId.HasValue)
+                    {
+                        var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                        if (club != null
+                            && club.HomebaseId.HasValue
+                            && club.HomebaseId.Value != filter.LocationId.Value)
+                        {
+                            //we have to restrict the flights of other locations to our own club related flight data
+                            flightSummary = flightSummary.Where(flight => flight.OwnerId == club.ClubId);
+                        }
+                    }
+
                     //filter only flights where person is Pilot, Copilot or instructor
                     flightSummary = flightSummary.WhereIf(filter.FlightCrewPersonId.HasValue,
                         flight => flight.FlightCrews.Any(x => x.PersonId == filter.FlightCrewPersonId.Value
@@ -260,6 +288,20 @@
                         flight => flight.StartLocationId == filter.LocationId.Value ||
                                   flight.LdgLocationId == filter.LocationId.Value);

+                    //check also if we have to restrict to the club owned data when selecting a location
+                    if (filter.LocationId.HasValue)
+                    {
+                        var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                        if (club != null
+                            && club.HomebaseId.HasValue
+                            && club.HomebaseId.Value != filter.LocationId.Value)
+                        {
+                            //we have to restrict the flights of other locations to our own club related flight data
+                            flightSummary = flightSummary.Where(flight => flight.OwnerId == club.ClubId);
+                        }
+                    }
+
                     //filter only flights where person is Pilot, Copilot or instructor
                     flightSummary = flightSummary.WhereIf(filter.FlightCrewPersonId.HasValue,
                         flight => flight.FlightCrews.Any(x => x.PersonId == filter.FlightCrewPersonId.Value
@@ -315,6 +357,20 @@
                         flight => flight.StartLocationId == filter.LocationId.Value ||
                                   flight.LdgLocationId == filter.LocationId.Value);

+                    //check also if we have to restrict to the club owned data when selecting a location
+                    if (filter.LocationId.HasValue)
+                    {
+                        var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                        if (club != null
+                            && club.HomebaseId.HasValue
+                            && club.HomebaseId.Value != filter.LocationId.Value)
+                        {
+                            //we have to restrict the flights of other locations to our own club related flight data
+                            flightSummary = flightSummary.Where(flight => flight.OwnerId == club.ClubId);
+                        }
+                    }
+
                     //filter only flights where person is Pilot, Copilot or instructor
                     flightSummary = flightSummary.WhereIf(filter.FlightCrewPersonId.HasValue,
                         flight => flight.FlightCrews.Any(x => x.PersonId == filter.FlightCrewPersonId.Value
@@ -374,6 +430,20 @@
                         flight => flight.StartLocationId == filter.LocationId.Value ||
                                   flight.LdgLocationId == filter.LocationId.Value);

+                    //check also if we have to restrict to the club owned data when selecting a location
+                    if (filter.LocationId.HasValue)
+                    {
+                        var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                        if (club != null
+                            && club.HomebaseId.HasValue
+                            && club.HomebaseId.Value != filter.LocationId.Value)
+                        {
+                            //we have to restrict the flights of other locations to our own club related flight data
+                            flightSummary = flightSummary.Where(flight => flight.OwnerId == club.ClubId);
+                        }
+                    }
+
                     //filter only flights where person is Pilot, Copilot or instructor
                     flightSummary = flightSummary.WhereIf(filter.FlightCrewPersonId.HasValue,
                         flight => flight.FlightCrews.Any(x => x.PersonId == filter.FlightCrewPersonId.Value
@@ -451,6 +521,20 @@
                         flight => flight.StartLocationId == filter.LocationId.Value ||
                                   flight.LdgLocationId == filter.LocationId.Value);

+                    //check also if we have to restrict to the club owned data when selecting a location
+                    if (filter.LocationId.HasValue)
+                    {
+                        var club = context.Clubs.FirstOrDefault(x => x.ClubId == CurrentAuthenticatedFLSUserClubId);
+
+                        if (club != null
+                            && club.HomebaseId.HasValue
+                            && club.HomebaseId.Value != filter.LocationId.Value)
+                        {
+                            //we have to restrict the flights of other locations to our own club related flight data
+                            flightSummary = flightSummary.Where(flight => flight.OwnerId == club.ClubId);
+                        }
+                    }
+
                     //filter only flights where person is Pilot, Copilot or instructor
                     flightSummary = flightSummary.WhereIf(filter.FlightCrewPersonId.HasValue,
                         flight => flight.FlightCrews.Any(x => x.PersonId == filter.FlightCrewPersonId.Value
@@ -484,7 +568,7 @@
                             totalSummary.TotalStarts += sum.TotalStarts;
                         }

-                        flightReportSummaries.AddRange(summary);
+                        flightReportSummaries.AddRange(summary.OrderBy(x => x.GroupBy));
                         flightReportSummaries.Add(totalSummary);
                     }
                     else


Add message for pending review comments.

If the user has pending review comments on the server then we can't post new comments. The correct way to test for this would be to make a request to `/repos/:owner/:repo/pulls/:number/reviews` and check for comments with a `PENDING` state. For the moment however we'll just display a message.

--- src/GitHub.InlineReviews/ViewModels/CommentViewModel.cs
+++ src/GitHub.InlineReviews/ViewModels/CommentViewModel.cs
@@ -7,6 +7,7 @@
 using GitHub.Extensions;
 using GitHub.Models;
 using GitHub.UI;
+using Octokit;
 using ReactiveUI;

 namespace GitHub.InlineReviews.ViewModels
@@ -154,7 +155,18 @@
             }
             catch (Exception e)
             {
-                ErrorMessage = e.Message;
+                var message = e.Message;
+
+                if (e is ApiValidationException)
+                {
+                    // HACK: If the user has pending review comments on the server then we can't
+                    // post new comments. The correct way to test for this would be to make a
+                    // request to /repos/:owner/:repo/pulls/:number/reviews and check for comments
+                    // with a PENDING state. For the moment however we'll just display a message.
+                    message += ". Do you have pending review comments?";
+                }
+
+                ErrorMessage = message;
             }
         }


added back restore command.

added back restore command.

--- BuildScript.cs
+++ BuildScript.cs
@@ -27,6 +27,7 @@
             .SetDescription("Compiles the VS solution")
             .AddCoreTask(x => x.UpdateNetCoreVersionTask("FlubuCore/FlubuCore.csproj", "dotnet-flubu/dotnet-flubu.csproj", "Flubu.Tests/Flubu.Tests.csproj")
                         .AdditionalProp("dependencies.FlubuCore", "dependencies.dotnet-flubu"))
+            .AddCoreTask(x => x.ExecuteDotnetTask("restore").WithArguments("Flubu.sln"))
             .AddCoreTask(x => x.ExecuteDotnetTask("build").WithArguments("Flubu.sln"))
             .AddCoreTask(x => x.ExecuteDotnetTask("pack")
                         .WithArguments("FlubuCore", "-c", "Release")
@@ -86,7 +87,7 @@
         }
         catch (Exception e)
         {
-            Console.WriteLine($"Failed to publish FlubuCore. exception: {e}");
+            Console.WriteLine($"Failed to publish FlubuCore. exception: {e.Message}");
         }

         try
@@ -99,7 +100,7 @@
         }
         catch (Exception e)
         {
-            Console.WriteLine($"Failed to publish dotnet-flubu. exception: {e}");
+            Console.WriteLine($"Failed to publish dotnet-flubu. exception: {e.Message}");
         }

         try


fix(#362): improve error message for null HttpContext

--- src/JsonApiDotNetCore/Services/ScopedServiceProvider.cs
+++ src/JsonApiDotNetCore/Services/ScopedServiceProvider.cs
@@ -1,3 +1,4 @@
+using JsonApiDotNetCore.Internal;
 using Microsoft.AspNetCore.Http;
 using System;

@@ -23,6 +24,16 @@
         }

         /// <inheritdoc />
-        public object GetService(Type serviceType) => _httpContextAccessor.HttpContext.RequestServices.GetService(serviceType);
+        public object GetService(Type serviceType)
+        {
+            if (_httpContextAccessor.HttpContext == null)
+                throw new JsonApiException(500,
+                    "Cannot resolve scoped service outside the context of an HTTP Request.",
+                    detail: "If you are hitting this error in automated tests, you should instead inject your own "
+                            + "IScopedServiceProvider implementation. See the GitHub repository for how we do this internally. "
+                            + "https://github.com/json-api-dotnet/JsonApiDotNetCore/search?q=TestScopedServiceProvider&unscoped_q=TestScopedServiceProvider");
+
+            return _httpContextAccessor.HttpContext.RequestServices.GetService(serviceType);
+        }
     }
 }


ClientErrorException.ErrorId property and a corresponding constructor overload added

--- src/Juhta.Net.WebApi.Exceptions/ClientErrorException.cs
+++ src/Juhta.Net.WebApi.Exceptions/ClientErrorException.cs
@@ -15,6 +15,18 @@
     /// </summary>
     public abstract class ClientErrorException : WebApiException
     {
+        #region Public Properties
+
+        /// <summary>
+        /// Gets the custom defined identifier of the client error.
+        /// </summary>
+        public string ErrorId
+        {
+            get {return(m_errorId);}
+        }
+
+        #endregion
+
         #region Protected Constructors

         /// <summary>
@@ -32,6 +44,26 @@
         protected ClientErrorException(HttpStatusCode httpStatusCode, string message) : base(httpStatusCode, message)
         {}

+        /// <summary>
+        /// Initializes a new instance.
+        /// </summary>
+        /// <param name="httpStatusCode">Specifies an HTTP status code.</param>
+        /// <param name="message">Specifies an error message.</param>
+        /// <param name="errorId">Specifies a custom defined identifier for the client error.</param>
+        protected ClientErrorException(HttpStatusCode httpStatusCode, string message, string errorId) : base(httpStatusCode, message)
+        {
+            m_errorId = errorId;
+        }
+
+        #endregion
+
+        #region Private Fields
+
+        /// <summary>
+        /// Stores the <see cref="ErrorId"/> property.
+        /// </summary>
+        private string m_errorId;
+
         #endregion
     }
 }


Improved comment

Improved comment

--- src/Microsoft.Graph.Core/Helpers/ExtractSelectHelper.cs
+++ src/Microsoft.Graph.Core/Helpers/ExtractSelectHelper.cs
@@ -19,7 +19,7 @@
         /// </summary>
         /// <param name="expression">The expression to search</param>
         /// <param name="error">Message about what's wrong with the expression if return value is null</param>
-        /// <returns>A list of strings or null</returns>
+        /// <returns>A comma-separated list of strings or null</returns>
         public static string ExtractMembers<T>(Expression<Func<T, object>> expression, out string error)
         {
             error = null;


Fixes #228

Fixes #228

--- src/MiningCore/Blockchain/BitcoinGold/BitcoinGoldJob.cs
+++ src/MiningCore/Blockchain/BitcoinGold/BitcoinGoldJob.cs
@@ -44,13 +44,12 @@

         protected override Transaction CreateOutputTransaction()
         {
-            rewardToPool = new Money(BlockTemplate.CoinbaseValue, MoneyUnit.Satoshi);
+            rewardToPool = new Money(BlockTemplate.CoinbaseValue * blockRewardMultiplier, MoneyUnit.Satoshi);

             var tx = new Transaction();

             // pool reward (t-addr)
-            var amount = new Money(blockReward + rewardFees, MoneyUnit.Satoshi);
-            tx.AddOutput(amount, poolAddressDestination);
+            tx.AddOutput(rewardToPool, poolAddressDestination);

             return tx;
         }
@@ -64,7 +63,7 @@

             var blockHeader = new ZCashBlockHeader
             {
-                Version = (int) BlockTemplate.Version,
+                Version = (int)BlockTemplate.Version,
                 Bits = new Target(Encoders.Hex.DecodeData(BlockTemplate.Bits)),
                 HashPrevBlock = uint256.Parse(BlockTemplate.PreviousBlockhash),
                 HashMerkleRoot = new uint256(merkleRoot),
@@ -100,7 +99,7 @@

             BlockTemplate = blockTemplate;
             JobId = jobId;
-            Difficulty = (double) new BigRational(ZCashConstants.Diff1b, BlockTemplate.Target.HexToByteArray().ToBigInteger());
+            Difficulty = (double)new BigRational(ZCashConstants.Diff1b, BlockTemplate.Target.HexToByteArray().ToBigInteger());

             this.isPoS = isPoS;
             this.shareMultiplier = shareMultiplier;


Log4JXmlEventLayout - Skip XmlConvert.IsXmlChar validation for safe attributes

--- src/NLog/LayoutRenderers/Log4JXmlEventLayoutRenderer.cs
+++ src/NLog/LayoutRenderers/Log4JXmlEventLayoutRenderer.cs
@@ -268,12 +268,12 @@
                 bool includeNLogCallsite = (IncludeCallSite || IncludeSourceInfo) && logEvent.CallSiteInformation != null;
                 if (includeNLogCallsite && IncludeNLogData)
                 {
-                    xtw.WriteAttributeSafeString("xmlns", "nlog", null, dummyNLogNamespace);
+                    xtw.WriteAttributeString("xmlns", "nlog", null, dummyNLogNamespace);
                 }
                 xtw.WriteAttributeSafeString("logger", LoggerName != null ? LoggerName.Render(logEvent) : logEvent.LoggerName);
-                xtw.WriteAttributeSafeString("level", logEvent.Level.Name.ToUpperInvariant());
-                xtw.WriteAttributeSafeString("timestamp", Convert.ToString((long)(logEvent.TimeStamp.ToUniversalTime() - log4jDateBase).TotalMilliseconds, CultureInfo.InvariantCulture));
-                xtw.WriteAttributeSafeString("thread", AsyncHelpers.GetManagedThreadId().ToString(CultureInfo.InvariantCulture));
+                xtw.WriteAttributeString("level", logEvent.Level.Name.ToUpperInvariant());
+                xtw.WriteAttributeString("timestamp", Convert.ToString((long)(logEvent.TimeStamp.ToUniversalTime() - log4jDateBase).TotalMilliseconds, CultureInfo.InvariantCulture));
+                xtw.WriteAttributeString("thread", AsyncHelpers.GetManagedThreadId().ToString(CultureInfo.InvariantCulture));

                 xtw.WriteElementSafeString("log4j", "message", dummyNamespace, logEvent.FormattedMessage);
                 if (logEvent.Exception != null)
@@ -312,12 +312,12 @@
                 AppendParameters(logEvent, xtw);

                 xtw.WriteStartElement("log4j", "data", dummyNamespace);
-                xtw.WriteAttributeSafeString("name", "log4japp");
+                xtw.WriteAttributeString("name", "log4japp");
                 xtw.WriteAttributeSafeString("value", AppInfo?.Render(logEvent) ?? string.Empty);
                 xtw.WriteEndElement();

                 xtw.WriteStartElement("log4j", "data", dummyNamespace);
-                xtw.WriteAttributeSafeString("name", "log4jmachinename");
+                xtw.WriteAttributeString("name", "log4jmachinename");
                 xtw.WriteAttributeSafeString("value", _machineName);
                 xtw.WriteEndElement();

@@ -430,7 +430,7 @@
             if (IncludeSourceInfo)
             {
                 xtw.WriteAttributeSafeString("file", logEvent.CallSiteInformation.GetCallerFilePath(0));
-                xtw.WriteAttributeSafeString("line", logEvent.CallSiteInformation.GetCallerLineNumber(0).ToString(CultureInfo.InvariantCulture));
+                xtw.WriteAttributeString("line", logEvent.CallSiteInformation.GetCallerLineNumber(0).ToString(CultureInfo.InvariantCulture));
             }
 #endif
             xtw.WriteEndElement();