Fixed a bug, which caused the HTML parser to always parse a single text node. Also fixed a bug, which made the conversion fail when there were top-level text nodes.

--- System.Windows.Documents.Reporting/HtmlConverter.cs
+++ System.Windows.Documents.Reporting/HtmlConverter.cs
@@ -1,16 +1,16 @@

 #region Using Directives

+using AngleSharp.Dom;
 using AngleSharp.Dom.Html;
 using AngleSharp.Parser.Html;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Net.Http;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-using AngleSharp.Dom;
-using System.Collections.Generic;

 #endregion

@@ -29,56 +29,52 @@
         /// <param name="htmlNode">The HTML node that is to be converted into a flow document element.</param>
         /// <param name="cancellationToken">The cancellation token, which can be used to cancel the conversion.</param>
         /// <returns>Returns the converted flow document element.</returns>
-        private static Task<TextElement> ConvertHtmlNodeAsync(INode htmlNode, CancellationToken cancellationToken)
-        {
-            // Creates a new task, which runs in the background and converts the HTML element
-            return Task<TextElement>.Run(async () =>
-            {
-                // Checks if the HTML node is an HTML element, in that case the HTML element is parsed
-                IHtmlElement htmlElement = htmlNode as IHtmlElement;
-                if (htmlElement != null)
+        private static TextElement ConvertHtmlNode(INode htmlNode)
+        {
+            // Checks if the HTML node is an HTML element, in that case the HTML element is parsed
+            IHtmlElement htmlElement = htmlNode as IHtmlElement;
+            if (htmlElement != null)
+            {
+                switch (htmlElement.NodeName.ToUpperInvariant())
                 {
-                    switch (htmlElement.NodeName.ToUpperInvariant())
-                    {
-                        case "BR":
-                            return new LineBreak();
-                        case "P":
-                            IEnumerable<Inline> paragraphContent = (await Task.WhenAll(htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNodeAsync(child, cancellationToken)))).OfType<Inline>();
-                            Paragraph paragraph = new Paragraph();
-                            paragraph.Inlines.AddRange(paragraphContent);
-                            return paragraph;
-                        case "SPAN":
-                            IEnumerable<Inline> spanContent = (await Task.WhenAll(htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNodeAsync(child, cancellationToken)))).OfType<Inline>();
-                            Span span = new Span();
-                            span.Inlines.AddRange(spanContent);
-                            return span;
-                        case "EM":
-                            IEnumerable<Inline> emphasisContent = (await Task.WhenAll(htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNodeAsync(child, cancellationToken)))).OfType<Inline>();
-                            Span emphasis = new Span();
-                            emphasis.FontStyle = FontStyles.Italic;
-                            emphasis.Inlines.AddRange(emphasisContent);
-                            return emphasis;
-                        case "STRONG":
-                            IEnumerable<Inline> strongContent = (await Task.WhenAll(htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNodeAsync(child, cancellationToken)))).OfType<Inline>();
-                            Span strong = new Span();
-                            strong.FontWeight = FontWeights.Bold;
-                            strong.Inlines.AddRange(strongContent);
-                            return strong;
-                        case "A":
-                            IEnumerable<Inline> hyperlinkContent = (await Task.WhenAll(htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNodeAsync(child, cancellationToken)))).OfType<Inline>();
-                            Hyperlink hyperlink = new Hyperlink();
-                            hyperlink.Inlines.AddRange(hyperlinkContent);
-                            string hyperReference = htmlElement.GetAttribute("href");
-                            Uri navigationUri;
-                            if (Uri.TryCreate(hyperReference, UriKind.RelativeOrAbsolute, out navigationUri))
-                                hyperlink.NavigateUri = navigationUri;
-                            return hyperlink;
-                    }
+                    case "BR":
+                        return new LineBreak();
+                    case "P":
+                        IEnumerable<Inline> paragraphContent = htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNode(child)).OfType<Inline>();
+                        Paragraph paragraph = new Paragraph();
+                        paragraph.Inlines.AddRange(paragraphContent);
+                        return paragraph;
+                    case "SPAN":
+                        IEnumerable<Inline> spanContent = htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNode(child)).OfType<Inline>();
+                        Span span = new Span();
+                        span.Inlines.AddRange(spanContent);
+                        return span;
+                    case "EM":
+                        IEnumerable<Inline> emphasisContent = htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNode(child)).OfType<Inline>();
+                        Span emphasis = new Span();
+                        emphasis.FontStyle = FontStyles.Italic;
+                        emphasis.Inlines.AddRange(emphasisContent);
+                        return emphasis;
+                    case "STRONG":
+                        IEnumerable<Inline> strongContent = htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNode(child)).OfType<Inline>();
+                        Span strong = new Span();
+                        strong.FontWeight = FontWeights.Bold;
+                        strong.Inlines.AddRange(strongContent);
+                        return strong;
+                    case "A":
+                        IEnumerable<Inline> hyperlinkContent = htmlElement.ChildNodes.Select(child => HtmlConverter.ConvertHtmlNode(child)).OfType<Inline>();
+                        Hyperlink hyperlink = new Hyperlink();
+                        hyperlink.Inlines.AddRange(hyperlinkContent);
+                        string hyperReference = htmlElement.GetAttribute("href");
+                        Uri navigationUri;
+                        if (Uri.TryCreate(hyperReference, UriKind.RelativeOrAbsolute, out navigationUri))
+                            hyperlink.NavigateUri = navigationUri;
+                        return hyperlink;
                 }
-
-                // Since the HTML node was either not an HTML element or the HTML element is not supported, the textual content of the HTML node is returned as a run element
-                return new Run(htmlNode.TextContent) as TextElement;
-            }, cancellationToken);
+            }
+
+            // Since the HTML node was either not an HTML element or the HTML element is not supported, the textual content of the HTML node is returned as a run element
+            return new Run(htmlNode.TextContent) as TextElement;
         }

         #endregion
@@ -108,8 +104,10 @@
             // Creates a new flow document
             FlowDocument flowDocument = new FlowDocument();

-            // Converts the HTML to block items, which are added to the flow document
-            flowDocument.Blocks.AddRange(await Task.WhenAll(htmlDocument.Body.ChildNodes.Select(childNode => HtmlConverter.ConvertHtmlNodeAsync(childNode, cancellationToken))));
+            // Converts the HTML to block items, which are added to the flow document (elements that are not a block have to be wrapped in a paragraph, otherwise the flow document will not accept them as content)
+            IEnumerable<TextElement> textElements = htmlDocument.Body.ChildNodes.Select(childNode => HtmlConverter.ConvertHtmlNode(childNode));
+            IEnumerable<Block> blockElements = textElements.Select(textElement => textElement is Block ? textElement as Block : new Paragraph(textElement as Inline));
+            flowDocument.Blocks.AddRange(blockElements);

             // Returns the created flow document
             return flowDocument;
@@ -194,7 +192,7 @@
         public static Task<FlowDocument> ConvertFromString(string html, CancellationToken cancellationToken)
         {
             // Converts the string into a memory stream, converts the HTML into a flow document, and returns it
-            using (MemoryStream memoryStream = new MemoryStream(Encoding.Unicode.GetBytes(html)))
+            using (MemoryStream memoryStream = new MemoryStream(html.Select(character => (byte)character).ToArray()))
                 return HtmlConverter.ConvertFromStream(memoryStream, cancellationToken);
         }


Gjør ctor for ContactInformation public

Gjør ctor for ContactInformation public

Ja, for den må også det.

--- Digipost.Signature.Api.Client.Core/Identifier/ContactInformation.cs
+++ Digipost.Signature.Api.Client.Core/Identifier/ContactInformation.cs
@@ -4,7 +4,7 @@
 {
     public class ContactInformation : SignerIdentifier
     {
-        internal ContactInformation()
+        public ContactInformation()
         {
         }


use StringComparer

use StringComparer

--- source/Core/Services/Default/DefaultRedirectUriValidator.cs
+++ source/Core/Services/Default/DefaultRedirectUriValidator.cs
@@ -36,15 +36,9 @@
         /// <returns></returns>
         protected bool StringCollectionContainsString(IEnumerable<string> uris, string requestedUri)
         {
-            foreach (var uri in uris)
-            {
-                if (uri.Equals(requestedUri, StringComparison.OrdinalIgnoreCase))
-                {
-                    return true;
-                }
-            }
+            if (uris == null) return false;

-            return false;
+            return uris.Contains(requestedUri, StringComparer.OrdinalIgnoreCase);
         }

         /// <summary>
@@ -57,7 +51,6 @@
         /// </returns>
         public virtual Task<bool> IsRedirectUriValidAsync(string requestedUri, Client client)
         {
-
             return Task.FromResult(StringCollectionContainsString(client.RedirectUris, requestedUri));
         }


Added missing directory timing tests for File.Copy

--- src/Fakes.Tests/Specs/FakeDirectory/DirectoryTimeUpdatesSpecs.cs
+++ src/Fakes.Tests/Specs/FakeDirectory/DirectoryTimeUpdatesSpecs.cs
@@ -91,13 +91,13 @@
         private void When_creating_file_it_must_update_directory_timings()
         {
             // TODO: Split file I/O into various operations:
-		    // - Open existing file
-		    // - Read from file
-		    // - Write to file
-		    // - Append to file
-		    // - Truncate file
-		    // - Create new file
-		    // - Overwrite existing file
+            // - Open existing file
+            // - Read from file
+            // - Write to file
+            // - Append to file
+            // - Truncate file
+            // - Create new file
+            // - Overwrite existing file

             // Arrange
             const string path = @"C:\folder";
@@ -203,29 +203,84 @@
         [Fact]
         private void When_copying_file_into_directory_it_must_update_directory_timings()
         {
-            // TODO: Add test for copy with overwrite existing
-
-            // Arrange
-            const string path = @"C:\folder";
-
-            DateTime creationTimeUtc = 17.March(2006).At(14, 03, 53).AsUtc();
-            var clock = new SystemClock(() => creationTimeUtc);
-
-            IFileSystem fileSystem = new FakeFileSystemBuilder(clock)
-                .IncludingDirectory(path)
-                .IncludingEmptyFile(@"c:\other\file.txt")
-                .Build();
-
-            DateTime updateTimeUtc = 18.March(2006).At(14, 03, 53).AsUtc();
-            clock.UtcNow = () => updateTimeUtc;
-
-            // Act
-            fileSystem.File.Copy(@"c:\other\file.txt", @"c:\folder\file.txt");
-
-            // Assert
-            fileSystem.Directory.GetCreationTimeUtc(path).Should().Be(creationTimeUtc);
-            fileSystem.Directory.GetLastWriteTimeUtc(path).Should().Be(updateTimeUtc);
-            fileSystem.Directory.GetLastAccessTimeUtc(path).Should().Be(updateTimeUtc);
+            // Arrange
+            const string directoryPath = @"C:\folder";
+            const string sourceFilePath = @"c:\other\file.txt";
+            const string destinationFilePath = @"c:\folder\file.txt";
+
+            DateTime creationTimeUtc = 17.March(2006).At(14, 03, 53).AsUtc();
+            var clock = new SystemClock(() => creationTimeUtc);
+
+            IFileSystem fileSystem = new FakeFileSystemBuilder(clock)
+                .IncludingDirectory(directoryPath)
+                .IncludingEmptyFile(sourceFilePath)
+                .Build();
+
+            DateTime updateTimeUtc = 18.March(2006).At(14, 03, 53).AsUtc();
+            clock.UtcNow = () => updateTimeUtc;
+
+            // Act
+            fileSystem.File.Copy(sourceFilePath, destinationFilePath);
+
+            // Assert
+            fileSystem.Directory.GetCreationTimeUtc(directoryPath).Should().Be(creationTimeUtc);
+            fileSystem.Directory.GetLastWriteTimeUtc(directoryPath).Should().Be(updateTimeUtc);
+            fileSystem.Directory.GetLastAccessTimeUtc(directoryPath).Should().Be(updateTimeUtc);
+        }
+
+        [Fact]
+        private void When_copying_file_it_must_update_directory_timings()
+        {
+            // Arrange
+            const string directoryPath = @"C:\folder";
+            const string sourceFilePath = @"C:\folder\source.txt";
+            const string destinationFilePath = @"C:\folder\target.txt";
+
+            DateTime creationTimeUtc = 17.March(2006).At(14, 03, 53).AsUtc();
+            var clock = new SystemClock(() => creationTimeUtc);
+
+            IFileSystem fileSystem = new FakeFileSystemBuilder(clock)
+                .IncludingTextFile(sourceFilePath, "SourceContent")
+                .Build();
+
+            DateTime updateTimeUtc = 18.March(2006).At(14, 03, 53).AsUtc();
+            clock.UtcNow = () => updateTimeUtc;
+
+            // Act
+            fileSystem.File.Copy(sourceFilePath, destinationFilePath);
+
+            // Assert
+            fileSystem.Directory.GetCreationTimeUtc(directoryPath).Should().Be(creationTimeUtc);
+            fileSystem.Directory.GetLastWriteTimeUtc(directoryPath).Should().Be(updateTimeUtc);
+            fileSystem.Directory.GetLastAccessTimeUtc(directoryPath).Should().Be(updateTimeUtc);
+        }
+
+        [Fact]
+        private void When_copying_file_overwriting_existing_file_it_must_not_update_directory_timings()
+        {
+            // Arrange
+            const string directoryPath = @"C:\folder";
+            const string sourceFilePath = @"C:\folder\source.txt";
+            const string destinationFilePath = @"C:\folder\target.txt";
+
+            DateTime creationTimeUtc = 17.March(2006).At(14, 03, 53).AsUtc();
+            var clock = new SystemClock(() => creationTimeUtc);
+
+            IFileSystem fileSystem = new FakeFileSystemBuilder(clock)
+                .IncludingTextFile(sourceFilePath, "SourceContent")
+                .IncludingTextFile(destinationFilePath, "DestinationContent")
+                .Build();
+
+            DateTime updateTimeUtc = 18.March(2006).At(14, 03, 53).AsUtc();
+            clock.UtcNow = () => updateTimeUtc;
+
+            // Act
+            fileSystem.File.Copy(sourceFilePath, destinationFilePath, true);
+
+            // Assert
+            fileSystem.Directory.GetCreationTimeUtc(directoryPath).Should().Be(creationTimeUtc);
+            fileSystem.Directory.GetLastWriteTimeUtc(directoryPath).Should().Be(creationTimeUtc);
+            fileSystem.Directory.GetLastAccessTimeUtc(directoryPath).Should().Be(creationTimeUtc);
         }

         [Fact]


cheap getting extended dav properties

cheap getting extended dav properties

--- WebDavMailRuCloudStore/Mailru/StoreBase/MailruStoreCollection.cs
+++ WebDavMailRuCloudStore/Mailru/StoreBase/MailruStoreCollection.cs
@@ -43,8 +43,9 @@

             new DavQuotaUsedBytes<MailruStoreCollection>
             {
-                Getter = (context, collection) => collection.FullPath == "/" ? Cloud.Instance(context).GetDiskUsage().Result.Used.DefaultValue : long.MaxValue,
-                IsExpensive = true  //folder listing performance
+                Getter = (context, collection) =>
+                    collection.DirectoryInfo.Size.DefaultValue // collection.FullPath == "/" ? Cloud.Instance(context).GetDiskUsage().Result.Used.DefaultValue : long.MaxValue,
+                //IsExpensive = true  //folder listing performance
             },

             // RFC-2518 properties
@@ -59,8 +60,7 @@
             },
             new DavDisplayName<MailruStoreCollection>
             {
-                Getter = (context, collection) =>
-                collection._directoryInfo.Name
+                Getter = (context, collection) => collection._directoryInfo.Name
             },
             new DavGetLastModified<MailruStoreCollection>
             {
@@ -83,13 +83,7 @@
             //Hopmann/Lippert collection properties
             new DavExtCollectionChildCount<MailruStoreCollection>
             {
-                Getter = (context, collection) =>
-                {
-                    var data = Cloud.Instance(context).GetItems(collection.DirectoryInfo).Result;
-                    int cnt = data.NumberOfItems;
-                    return cnt;
-                },
-                IsExpensive = true  //folder listing performance
+                Getter = (context, collection) => collection.DirectoryInfo.NumberOfFolders + collection.DirectoryInfo.NumberOfFiles
             },
             new DavExtCollectionIsFolder<MailruStoreCollection>
             {
@@ -106,8 +100,7 @@

             new DavExtCollectionHasSubs<MailruStoreCollection>
             {
-                Getter = (context, collection) => collection.Folders.Any(),
-                IsExpensive = true  //folder listing performance
+                Getter = (context, collection) => collection.DirectoryInfo.NumberOfFolders > 0
             },

             new DavExtCollectionNoSubs<MailruStoreCollection>
@@ -117,8 +110,7 @@

             new DavExtCollectionObjectCount<MailruStoreCollection>
             {
-                Getter = (context, collection) => collection.Files.Count(),
-                IsExpensive = true  //folder listing performance
+                Getter = (context, collection) => collection.DirectoryInfo.NumberOfFiles
             },

             new DavExtCollectionReserved<MailruStoreCollection>
@@ -126,11 +118,9 @@
                 Getter = (context, collection) => !collection.IsWritable
             },

-            //folder listing performance
             new DavExtCollectionVisibleCount<MailruStoreCollection>
             {
-                Getter = (context, collection) => collection.Items.Count,
-                IsExpensive = true  //folder listing performance
+                Getter = (context, collection) => collection.DirectoryInfo.NumberOfFiles + collection.DirectoryInfo.NumberOfFolders
             },

             // Win32 extensions
@@ -179,7 +169,7 @@
             new DavGetContentLength<MailruStoreCollection>
             {
                 Getter = (context, item) => item.DirectoryInfo.Size.DefaultValue
-            },
+            }
         });

         public bool IsWritable { get; }
@@ -247,12 +237,6 @@

             var size = httpContext.Request.ContentLength();

-            //long allowedSize = Cloud.Instance.CloudApi.Account.Info.FileSizeLimit - name.BytesCount();
-            //if (size > allowedSize)
-            //{
-            //    return Task.FromResult(new StoreItemResult(DavStatusCode.PreconditionFailed));
-            //}
-
             var f = new MailRuCloudApi.File(destinationPath, size, null);

             return Task.FromResult(new StoreItemResult(result, new MailruStoreItem(LockingManager, f, IsWritable)));
@@ -380,7 +364,7 @@

             // Determine the full path
-            var fullPath = Path.Combine(_directoryInfo.FullPath, name).Replace("\\", "/");
+            var fullPath = WebDavPath.Combine(_directoryInfo.FullPath, name);
             try
             {
                 var item = FindSubItem(name);


add swift glyphs tracking for warrior

add swift glyphs tracking for warrior

--- TCC.Core/ClassSpecific/WarriorAbnormalityTracker.cs
+++ TCC.Core/ClassSpecific/WarriorAbnormalityTracker.cs
@@ -13,6 +13,7 @@
         private static readonly uint[] DstanceIDs = { 100200, 100201, 100202, 100203 };
         private static readonly uint[] TraverseCutIDs = { 101300/*, 101301*/ };
         private static readonly uint[] BladeWaltzIDs = { 104100 };
+        private static readonly uint[] SwiftGlyphs = { 21010, 21070 };

         private Skill _bladeWaltz;

@@ -23,6 +24,7 @@
             CheckDefensiveStance(p);
             CheckDeadlyGamble(p);
             CheckTraverseCut(p);
+            CheckSwiftGlyphs(p);
             CheckBladeWaltz(p);
         }
         public override void CheckAbnormality(S_ABNORMALITY_REFRESH p)
@@ -32,12 +34,14 @@
             CheckDefensiveStance(p);
             CheckDeadlyGamble(p);
             CheckTraverseCut(p);
+            CheckSwiftGlyphs(p);
             //CheckTempestAura(p);
         }
         public override void CheckAbnormality(S_ABNORMALITY_END p)
         {
             if (!p.TargetId.IsMe()) return;
             CheckTraverseCut(p);
+            CheckSwiftGlyphs(p);
             CheckDefensiveStance(p);
             CheckAssaultStance(p);
             CheckDeadlyGamble(p);
@@ -120,6 +124,25 @@
             if (!TraverseCutIDs.Contains(p.AbnormalityId)) return;
             ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).TraverseCut.Val = 0;
         }
+
+        private static void CheckSwiftGlyphs(S_ABNORMALITY_BEGIN p)
+        {
+            if (!SwiftGlyphs.Contains(p.AbnormalityId)) return;
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).Swift.Start(p.Duration);
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).SwiftProc = true;
+        }
+        private static void CheckSwiftGlyphs(S_ABNORMALITY_REFRESH p)
+        {
+            if (!SwiftGlyphs.Contains(p.AbnormalityId)) return;
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).Swift.Start(p.Duration);
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).SwiftProc = true;
+        }
+        private static void CheckSwiftGlyphs(S_ABNORMALITY_END p)
+        {
+            if (!SwiftGlyphs.Contains(p.AbnormalityId)) return;
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).Swift.Refresh(0);
+            ((WarriorBarManager)ClassWindowViewModel.Instance.CurrentManager).SwiftProc = false;
+        }
     }
 }
 /*


Fix exception when generating a task without properties

--- source/Nuke.CodeGeneration/Generators/DataClassGenerator.cs
+++ source/Nuke.CodeGeneration/Generators/DataClassGenerator.cs
@@ -200,14 +200,18 @@
                 return writer;

             var argumentAdditions = formatProperties.Select(GetArgumentAddition).ToArray();
-            ref var last = ref argumentAdditions[argumentAdditions.Length - 1];
-            last += ";";
+
+            var hasArguments = argumentAdditions.Length > 0;
+            if (hasArguments)
+            {
+                argumentAdditions[argumentAdditions.Length - 1] += ";";
+            }

             return writer
                 .WriteLine("protected override Arguments ConfigureArguments(Arguments arguments)")
                 .WriteBlock(w => w
                     .WriteLine("arguments")
-                    .WriteLine(GetCommandAdditionOrNull(writer.DataClass))
+                    .WriteLine($"{GetCommandAdditionOrNull(writer.DataClass)}{(hasArguments ? string.Empty : ";")}")
                     .ForEachWriteLine(argumentAdditions)
                     .WriteLine("return base.ConfigureArguments(arguments);"));
         }


EnvelopeクラスのXMLドキュメントを修正

EnvelopeクラスのXMLドキュメントを修正

--- ux/Component/Envelope.cs
+++ ux/Component/Envelope.cs
@@ -45,7 +45,7 @@
         public EnvelopeState State { get { return this.state; } }

         /// <summary>
-        /// ノートが開始されてピークに達するまでの遷移時間を取得します。
+        /// ノートが開始されてピークに達するまでの遷移時間を取得または設定します。
         /// </summary>
         public float AttackTime
         {
@@ -54,7 +54,7 @@
         }

         /// <summary>
-        /// ピークを維持する時間を取得します。
+        /// ピークを維持する時間を取得または設定します。
         /// </summary>
         public float PeakTime
         {
@@ -63,7 +63,7 @@
         }

         /// <summary>
-        /// ピークからサスティンレベルに達するまでの遷移時間を取得します。
+        /// ピークからサスティンレベルに達するまでの遷移時間を取得または設定します。
         /// </summary>
         public float DecayTime
         {
@@ -72,7 +72,7 @@
         }

         /// <summary>
-        /// エンベロープがリリースされるまで持続するサスティンレベルを取得します。
+        /// エンベロープがリリースされるまで持続するサスティンレベルを取得または設定します。
         /// </summary>
         public float SustainLevel
         {
@@ -81,7 +81,7 @@
         }

         /// <summary>
-        /// リリースされてからエンベロープが消滅するまでの時間を取得します。
+        /// リリースされてからエンベロープが消滅するまでの時間を取得または設定します。
         /// </summary>
         public float ReleaseTime
         {
@@ -90,7 +90,7 @@
         }

         /// <summary>
-        /// このエンベロープで使われるサンプリング周波数を取得します。
+        /// このエンベロープで使われるサンプリング周波数を取得または設定します。
         /// </summary>
         public float SamplingRate { get { return this.samplingRate; } }
         #endregion


Refactored and improved EntitasCheckForUpdates

--- Entitas.Unity/Assets/Entitas/Unity/Editor/EntitasCheckForUpdates.cs
+++ Entitas.Unity/Assets/Entitas/Unity/Editor/EntitasCheckForUpdates.cs
@@ -9,6 +9,47 @@

 namespace Entitas.Unity {

+    public enum EntitasUpdateState {
+        UpToDate,
+        UpdateAvailable,
+        AheadOfLatestRelease,
+        NoConnection
+    }
+
+    public class EntitasUpdateInfo {
+
+        public EntitasUpdateState updateState { get { return _updateState; } }
+
+        public readonly string localVersionString;
+        public readonly string remoteVersionString;
+
+        readonly EntitasUpdateState _updateState;
+
+        public EntitasUpdateInfo(string localVersionString, string remoteVersionString) {
+            this.localVersionString = localVersionString.Trim();
+            this.remoteVersionString = remoteVersionString.Trim();
+
+            if(remoteVersionString != string.Empty) {
+                var localVersion = new Version(localVersionString);
+                var remoteVersion = new Version(remoteVersionString);
+
+                switch(remoteVersion.CompareTo(localVersion)) {
+                    case 1:
+                        _updateState = EntitasUpdateState.UpdateAvailable;
+                        break;
+                    case 0:
+                        _updateState = EntitasUpdateState.UpToDate;
+                        break;
+                    case -1:
+                        _updateState = EntitasUpdateState.AheadOfLatestRelease;
+                        break;
+                }
+            } else {
+                _updateState = EntitasUpdateState.NoConnection;
+            }
+        }
+    }
+
     public static class EntitasCheckForUpdates {

         const string URL_GITHUB_API_LATEST_RELEASE = "https://api.github.com/repos/sschmid/Entitas-CSharp/releases/latest";
@@ -16,30 +57,14 @@

         [MenuItem(EntitasMenuItems.check_for_updates, false, EntitasMenuItemPriorities.check_for_updates)]
         public static void CheckForUpdates() {
-            var response = requestLatestRelease();
-            var remoteVersion = parseVersion(response);
-            var localVersion = GetLocalVersion();
-
-            displayUpdateInfo(remoteVersion, localVersion);
+            var info = GetUpdateInfo();
+            displayUpdateInfo(info);
         }

-        static string requestLatestRelease() {
-            ServicePointManager.ServerCertificateValidationCallback += trustSource;
-            var httpWebRequest = (HttpWebRequest)WebRequest.Create(URL_GITHUB_API_LATEST_RELEASE);
-            httpWebRequest.UserAgent = Environment.UserName + "sschmid/Entitas-CSharp/Entitas.Unity/CheckForUpdates";
-            httpWebRequest.Timeout = 15000;
-            var webResponse = httpWebRequest.GetResponse();
-            ServicePointManager.ServerCertificateValidationCallback -= trustSource;
-            var response = string.Empty;
-            using (var streamReader = new StreamReader(webResponse.GetResponseStream())) {
-                response = streamReader.ReadToEnd();
-            }
-            return response;
-        }
-
-        static string parseVersion(string response) {
-            const string versionPattern = @"(?<=""tag_name"":"").*?(?="")";
-            return Regex.Match(response, versionPattern).Value;
+        public static EntitasUpdateInfo GetUpdateInfo() {
+            var localVersion = GetLocalVersion();
+            var remoteVersion = GetRemoteVersion();
+            return new EntitasUpdateInfo(localVersion, remoteVersion);
         }

         public static string GetLocalVersion() {
@@ -52,37 +77,74 @@
             return File.ReadAllText(files[0]);
         }

-        static void displayUpdateInfo(string remoteVersionString, string localVersionString) {
-            var remoteVersion = new Version(remoteVersionString);
-            var localVersion = new Version(localVersionString);
+        public static string GetRemoteVersion() {
+            string latestRelease = null;
+            try {
+                latestRelease = requestLatestRelease();
+            } catch(Exception) {
+                latestRelease = string.Empty;
+            }

-            switch (remoteVersion.CompareTo(localVersion)) {
-                case 1:
+            return parseVersion(latestRelease);
+        }
+
+        static string requestLatestRelease() {
+            ServicePointManager.ServerCertificateValidationCallback += trustSource;
+            var httpWebRequest = (HttpWebRequest)WebRequest.Create(URL_GITHUB_API_LATEST_RELEASE);
+            httpWebRequest.UserAgent = Environment.UserName + "sschmid/Entitas-CSharp/Entitas.Unity/CheckForUpdates";
+            httpWebRequest.Timeout = 15000;
+            var webResponse = httpWebRequest.GetResponse();
+            ServicePointManager.ServerCertificateValidationCallback -= trustSource;
+            var response = string.Empty;
+            using(var streamReader = new StreamReader(webResponse.GetResponseStream())) {
+                response = streamReader.ReadToEnd();
+            }
+            return response;
+        }
+
+        static string parseVersion(string response) {
+            const string versionPattern = @"(?<=""tag_name"":"").*?(?="")";
+            return Regex.Match(response, versionPattern).Value;
+        }
+
+        static void displayUpdateInfo(EntitasUpdateInfo info) {
+            switch(info.updateState) {
+                case EntitasUpdateState.UpdateAvailable:
                     if(EditorUtility.DisplayDialog("Entitas Update",
                             string.Format("A newer version of Entitas is available!\n\n" +
                             "Currently installed version: {0}\n" +
-                            "New version: {1}", localVersion, remoteVersion),
+                            "New version: {1}", info.localVersionString, info.remoteVersionString),
                             "Show release",
                             "Cancel"
                         )) {
                         Application.OpenURL(URL_GITHUB_RELEASES);
                     }
                     break;
-                case 0:
+                case EntitasUpdateState.UpToDate:
                     EditorUtility.DisplayDialog("Entitas Update",
-                        "Entitas is up to date (" + localVersion + ")",
+                        "Entitas is up to date (" + info.localVersionString + ")",
                         "Ok"
                     );
                     break;
-                case -1:
+                case EntitasUpdateState.AheadOfLatestRelease:
                     if(EditorUtility.DisplayDialog("Entitas Update",
                             string.Format("Your Entitas version seems to be newer than the latest release?!?\n\n" +
                             "Currently installed version: {0}\n" +
-                            "Latest release: {1}", localVersion, remoteVersion),
+                            "Latest release: {1}", info.localVersionString, info.remoteVersionString),
                             "Show release",
                             "Cancel"
                         )) {
                         Application.OpenURL(URL_GITHUB_RELEASES);
+                    }
+                    break;
+                case EntitasUpdateState.NoConnection:
+                    if(EditorUtility.DisplayDialog("Entitas Update",
+                            "Could not request latest Entitas version!\n\n" +
+                            "Make sure that you are connected to the internet.\n",
+                            "Try again",
+                            "Cancel"
+                        )) {
+                        CheckForUpdates();
                     }
                     break;
             }


fix: NullReference in ReportErrorOnLocalCertificate

* Fixes #111

--- src/Helsenorge.Messaging/ServiceBus/Receivers/MessageListener.cs
+++ src/Helsenorge.Messaging/ServiceBus/Receivers/MessageListener.cs
@@ -400,13 +400,17 @@
                     description = "Unable to determine revocation status";
                     id = EventIds.LocalCertificateRevocation;
                     break;
+                case CertificateErrors.Missing:
+                    description = "Certificate is missing";
+                    id = EventIds.LocalCertificate;
+                    break;
                 default: // since the value is bitcoded
                     description = "More than one error with certificate";
                     id = EventIds.LocalCertificate;
                     break;
             }
             Logger.LogError(id, null, "Description: {Description} Subject: {Subject} Thumbprint: {Thumbprint}",
-                description, certificate.Subject, certificate.Thumbprint);
+                description, certificate?.Subject, certificate?.Thumbprint);

             if (removeMessage)
             {


fix(nlu): manual change: convert MetadataOptions back to Object on Model/Features

--- src/IBM.Watson.NaturalLanguageUnderstanding.v1/Model/Features.cs
+++ src/IBM.Watson.NaturalLanguageUnderstanding.v1/Model/Features.cs
@@ -71,7 +71,7 @@
         /// and publication date. Supports URL and HTML input types only.
         /// </summary>
         [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)]
-        public MetadataOptions Metadata { get; set; }
+        public object Metadata { get; set; }
         /// <summary>
         /// Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo`
         /// relation might connect the entities "Nobel Prize" and "Albert Einstein". For more information, see [Relation


Code Docs #FIX: Fixed comment in component execution order test code.

--- Test/Core/Components/ComponentExecutionOrderTest.cs
+++ Test/Core/Components/ComponentExecutionOrderTest.cs
@@ -117,7 +117,7 @@
 			// there when the scene is initialized after loading
 			this.AssignEventLog(scene, eventLog);

-			// Save the scene and reload it without initializing it
+			// Save the scene and reload it so the OnLoaded code is triggered
 			using (MemoryStream data = new MemoryStream())
 			{
 				scene.Save(data);


spelling: comments in src/Microsoft.PowerShell.PackageManagement

--- src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs
+++ src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs
@@ -179,7 +179,7 @@
                     }
                 }

-                return Constants.DefaultTimeout; // in a non-invokcation, always default to one hour
+                return Constants.DefaultTimeout; // in a non-invocation, always default to one hour
             }
         }

@@ -191,7 +191,7 @@
                         return t;
                     }
                 }
-                return Constants.DefaultResponsiveness; // in a non-invokcation, always default to one hour
+                return Constants.DefaultResponsiveness; // in a non-invocation, always default to one hour
             }
         }


Make proeprty setters private if they are not being used

--- src/MiniWebDeploy.Deployer/Features/Discovery/AssemblyDetails.cs
+++ src/MiniWebDeploy.Deployer/Features/Discovery/AssemblyDetails.cs
@@ -4,9 +4,9 @@
 {
     public class AssemblyDetails
     {
-        public string Path { get; set; }
-        public string BinaryPath { get; set; }
-        public Type InstallerType { get; set; }
+        public string Path { get; private set; }
+        public string BinaryPath { get; private set; }
+        public Type InstallerType { get; private set; }

         public AssemblyDetails(string path, string binaryPath, Type installerType)
         {


WPF0019 handle AddOwner & OverrideMetadata

--- WpfAnalyzers.Test/WPF0019CastSenderToCorrectTypeTests/CodeFix.cs
+++ WpfAnalyzers.Test/WPF0019CastSenderToCorrectTypeTests/CodeFix.cs
@@ -422,7 +422,6 @@
             AnalyzerAssert.CodeFix(Analyzer, Fix, ExpectedDiagnostic, testCode, fixedCode);
         }

-        [Explicit("Not handling this yet.")]
         [Test]
         public void DependencyPropertyOverrideMetadata()
         {
@@ -436,8 +435,7 @@
     {
         static FooControl()
         {
-            BackgroundProperty.OverrideMetadata(typeof(FooControl),
-                new FrameworkPropertyMetadata(null, OnValueChanged));
+            BackgroundProperty.OverrideMetadata(typeof(FooControl), new FrameworkPropertyMetadata(null, OnValueChanged));
         }

         private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
@@ -457,20 +455,18 @@
     {
         static FooControl()
         {
-            BackgroundProperty.OverrideMetadata(typeof(FooControl),
-                new FrameworkPropertyMetadata(null, OnBackgroundChanged));
-        }
-
-        private static void OnBackgroundChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            var control = (↓DataGrid)d;
-        }
-    }
-}";
-            AnalyzerAssert.CodeFix(Analyzer, Fix, ExpectedDiagnostic, testCode, fixedCode);
-        }
-
-        [Explicit("Not handling this yet.")]
+            BackgroundProperty.OverrideMetadata(typeof(FooControl), new FrameworkPropertyMetadata(null, OnValueChanged));
+        }
+
+        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            var control = (FooControl)d;
+        }
+    }
+}";
+            AnalyzerAssert.CodeFix(Analyzer, Fix, ExpectedDiagnostic, testCode, fixedCode);
+        }
+
         [Test]
         public void DependencyPropertyAddOwner()
         {
@@ -506,12 +502,12 @@
     {
         static FooControl()
         {
-            TextElement.FontSizeProperty.AddOwner(typeof(FooControl), new PropertyMetadata(12.0, OnFontSizeChanged));
-        }
-
-        private static void OnFontSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            // nop
+            TextElement.FontSizeProperty.AddOwner(typeof(FooControl), new PropertyMetadata(12.0, OnValueChanged));
+        }
+
+        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            var control = (FooControl)d;
         }
     }
 }";


Decode incoming handshake correctly. Also if a connection can't be established - don't retry. Add to busy queue.

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

--- src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
+++ src/MonoTorrent/MonoTorrent.Client/Managers/ConnectionManager.cs
@@ -243,10 +243,7 @@
                         id.TorrentManager.Peers.RemovePeer(id.Peer, PeerType.Active);
                         id.TorrentManager.ConnectingToPeers.Remove(id);

-                        if (id.Peer.FailedConnectionAttempts < 2)   // We couldn't connect this time, so re-add to available
-                            id.TorrentManager.Peers.AddPeer(id.Peer, PeerType.Available);
-                        else
-                            id.TorrentManager.Peers.AddPeer(id.Peer, PeerType.Busy);
+                        id.TorrentManager.Peers.AddPeer(id.Peer, PeerType.Busy);
                     }
                 }
             }
@@ -517,7 +514,7 @@

                     // Decode the handshake and handle it
                     msg = new HandshakeMessage();
-                    msg.Decode(id.Connection.recieveBuffer, 0, id.Connection.BytesToRecieve);
+                    msg.Decode(id.Connection.recieveBuffer, 4, id.Connection.BytesToRecieve-4);
                     msg.Handle(id);

                     Logger.Log(id.Connection.Connection, "ConnectionManager - Handshake recieved");


Removed now unused variable.

Removed now unused variable.

--- TinyReflectiveToolkit/Contracts/ContractProvider.cs
+++ TinyReflectiveToolkit/Contracts/ContractProvider.cs
@@ -154,7 +154,6 @@
             info.FoundMethods = info.RequiredMethods.Select(x =>
             {
                 var name = x.Name;
-                var parameters = x.GetParameters().Select(n => n.ParameterType).ToArray();
                 var method = type.GetGenericMethod(name, x.GetParameters());
                 return method;
             }).Except(x => x == null).ToList();


Validation added.

Validation added.

--- XOMNI.SDK/XOMNI.SDK.Public/Clients/PII/WishlistPassbookClient.cs
+++ XOMNI.SDK/XOMNI.SDK.Public/Clients/PII/WishlistPassbookClient.cs
@@ -3,6 +3,7 @@
 using System.Threading.Tasks;
 using XOMNI.SDK.Public.Clients;
 using XOMNI.SDK.Public.Models;
+using XOMNI.SDK.Public.Extensions;

 namespace XOMNI.SDK.Public.Clients.PII
 {
@@ -16,7 +17,12 @@

         public async Task<ApiResponse<byte[]>> GetAsync(Guid wishlistUniqueKey, string templateName)
 		{
-			string path = string.Format("/pii/wishlist/{0}/passbook?templateName={1}", wishlistUniqueKey, templateName);
+            ValidatePIIToken();
+
+			string path = string.Format("/pii/wishlist/{0}", wishlistUniqueKey.ToString());
+
+            Validator.For(templateName, "templateName").IsNotNullOrEmpty();
+            path += string.Format("/passbook?templateName={0}", templateName.ToString());

 			using (var response = await Client.GetAsync(path).ConfigureAwait(false))
 			{
@@ -24,4 +30,4 @@
 			}
 		}
 	}
-}+}


Format document

Format document

--- src/OrchardCore.Modules/OrchardCore.Admin/Admin/AdminSettings.cs
+++ src/OrchardCore.Modules/OrchardCore.Admin/Admin/AdminSettings.cs
@@ -1,9 +1,7 @@
-using System;
-
 namespace OrchardCore.Admin.Models
 {
     public class AdminSettings
     {
-        public bool DisplayMenuFilter{ get; set; }
+        public bool DisplayMenuFilter { get; set; }
     }
 }


Nice unit test to look for incorrect scoping.

--- LINQToTTree/LINQToTTreeLib.Tests/ResultOperators/t_ROPairWiseAll.cs
+++ LINQToTTree/LINQToTTreeLib.Tests/ResultOperators/t_ROPairWiseAll.cs
@@ -1,8 +1,10 @@
 using System;
 using System.Linq;
 using LinqToTTreeInterfacesLib;
+using LINQToTTreeLib.CodeAttributes;
 using LINQToTTreeLib.relinq;
 using LINQToTTreeLib.ResultOperators;
+using LINQToTTreeLib.Statements;
 using Microsoft.Pex.Framework;
 using Microsoft.Pex.Framework.Validation;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -111,5 +113,36 @@
             Assert.IsNotNull(res, "final result");
             Assert.AreEqual(typeof(int), res.Type, "final result type");
         }
+
+        [CPPHelperClass]
+        public static class CPPHelperFunctions
+        {
+            [CPPCode(Code = new string[] { "Calc = arg*2;" })]
+            public static int Calc(int arg)
+            {
+                throw new NotImplementedException();
+            }
+        }
+
+        [TestMethod]
+        public void TestScope()
+        {
+            // Make sure that if anything funky needs to be done outside our loop,
+            // it gets declared correctly.
+
+            var q = new QueriableDummy<ntupArray>();
+            var results = from evt in q
+                          select evt.run.PairWiseAll((r1, r2) => CPPHelperFunctions.Calc(r1) != r2).Count();
+            var total = results.Aggregate(0, (seed, val) => seed + val);
+            DummyQueryExectuor.FinalResult.DumpCodeToConsole();
+
+            //
+            // The *2 should be burried in the loop. However, we've seen it popped up to the top
+            // in a bug. So test for that regression.
+            //
+
+            var seen2 = DummyQueryExectuor.FinalResult.CodeBody.Statements.Where(s => s is StatementSimpleStatement).Cast<StatementSimpleStatement>().Where(s => s.ToString().Contains("]*2")).Any();
+            Assert.IsFalse(seen2, "Saw a ']*2' in a top level code statement!");
+        }
     }
 }


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
@@ -350,6 +350,15 @@
     {
       const int source = 41;
       const int expected = 13;
+      int result = FunctionsPrimes.Pi(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_Pi_43()
+    {
+      const int source = 43;
+      const int expected = 14;
       int result = FunctionsPrimes.Pi(source);
       Assert.AreEqual(result, expected);
     }


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
@@ -824,6 +824,16 @@
     {
       const int source = 277;
       const int expected = 59;
+      int result = FunctionsPrimes.Pi(source);
+      Assert.AreEqual(result, expected);
+    }
+
+
+    [TestMethod]
+    public void TestMethod_Pi_281()
+    {
+      const int source = 281;
+      const int expected = 60;
       int result = FunctionsPrimes.Pi(source);
       Assert.AreEqual(result, expected);
     }


Add unit test

Add unit test

--- UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsPrimes.cs
@@ -869,6 +869,15 @@
     {
       const int source = 311;
       const int expected = 64;
+      int result = FunctionsPrimes.Pi(source);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_Pi_313()
+    {
+      const int source = 313;
+      const int expected = 65;
       int result = FunctionsPrimes.Pi(source);
       Assert.AreEqual(result, expected);
     }


Fixing typo highlighted by @peschkaj

Fixing typo highlighted by @peschkaj

Former-commit-id: f7e5a86e88e8fb34205bc4e9f01275b88d7aa65a

--- src/RiakClient/Models/MapReduce/Inputs/RiakBinIndexRangeInput.cs
+++ src/RiakClient/Models/MapReduce/Inputs/RiakBinIndexRangeInput.cs
@@ -64,7 +64,7 @@
         public string Start { get; set; }

         /// <summary>
-        /// The inclusive lower bound of the string range to query for.
+        /// The inclusive upper bound of the string range to query for.
         /// </summary>
         public string End { get; set; }


Add unit tests generated by application

Add unit tests generated by application

--- UnitTestUsefullFunctions/UnitTestFunctionsString.cs
+++ UnitTestUsefullFunctions/UnitTestFunctionsString.cs
@@ -9406,6 +9406,150 @@
       Assert.AreEqual(result, expected);
     }

+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_10()
+    {
+      const int source = 10;
+      const string expected = "0000010";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_11()
+    {
+      const int source = 11;
+      const string expected = "0000011";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_12()
+    {
+      const int source = 12;
+      const string expected = "0000012";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_13()
+    {
+      const int source = 13;
+      const string expected = "0000013";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_14()
+    {
+      const int source = 14;
+      const string expected = "0000014";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_15()
+    {
+      const int source = 15;
+      const string expected = "0000015";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_16()
+    {
+      const int source = 16;
+      const string expected = "0000016";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_17()
+    {
+      const int source = 17;
+      const string expected = "0000017";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_18()
+    {
+      const int source = 18;
+      const string expected = "0000018";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_19()
+    {
+      const int source = 19;
+      const string expected = "0000019";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_20()
+    {
+      const int source = 20;
+      const string expected = "0000020";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_21()
+    {
+      const int source = 21;
+      const string expected = "0000021";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_22()
+    {
+      const int source = 22;
+      const string expected = "0000022";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_23()
+    {
+      const int source = 23;
+      const string expected = "0000023";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_24()
+    {
+      const int source = 24;
+      const string expected = "0000024";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+
+    [TestMethod]
+    public void TestMethod_ToNDigits_7_zeros_value_25()
+    {
+      const int source = 25;
+      const string expected = "0000025";
+      string result = StringFunc.ToNDigits(source, 7);
+      Assert.AreEqual(result, expected);
+    }
+

     #endregion ToNDigits


Add support for metadata on BankAccount creation

--- src/Stripe.net/Services/BankAccounts/BankAccountCreateOptions.cs
+++ src/Stripe.net/Services/BankAccounts/BankAccountCreateOptions.cs
@@ -1,10 +1,18 @@
 namespace Stripe
 {
+    using System.Collections.Generic;
     using Newtonsoft.Json;
     using Stripe.Infrastructure;

-    public class BankAccountCreateOptions : BaseOptions
+    public class BankAccountCreateOptions : BaseOptions, IHasMetadata
     {
+        ///
+        /// A set of key/value pairs that you can attach to an object. It can be useful for storing
+        /// additional information about the object in a structured format.
+        ///
+        [JsonProperty("metadata")]
+        public Dictionary<string, string> Metadata { get; set; }
+
         ///
         /// REQUIRED. Either a token, like the ones returned by
         /// Stripe.js, or a


Some comments (update is not working)

Some comments (update is not working)

--- NugetReferencesExplorer/Model/Repository/RemotePackageRepository.cs
+++ NugetReferencesExplorer/Model/Repository/RemotePackageRepository.cs
@@ -51,7 +51,9 @@
                 PackageManager packageManager = new PackageManager(repo, path);
                 //Update the package
                 //packageManager.InstallPackage(packageId, new SemanticVersion(version));
-                packageManager.UpdatePackage(packageId, new SemanticVersion(version), false, false);
+                //TODO : Not working here!!!
+                throw new NotImplementedException();
+                //packageManager.UpdatePackage(packageId, new SemanticVersion(version), false, false);
             }
             catch (Exception ex)
             {


Fixed Quickload Method.
improved constructor.

git-svn-id: 0004e7b640e8845fb7013942b4e8d616ef162b3b@821 e4b68894-0884-4741-a77c-4b4ad7eeb51c

--- Mandelbrot/State.cs
+++ Mandelbrot/State.cs
@@ -11,8 +11,13 @@
     {
         private int _x1, _y1;
         private double _xende, _yende, _xstart, _ystart;
-
+
         public State (int x1, int y1, double xstart, double ystart, double xende, double yende)
+        {
+            SetValues(x1, y1, xstart, ystart, xende, yende);
+        }
+
+        public void SetValues(int x1, int y1, double xstart, double ystart, double xende, double yende)
         {
             this._x1 = x1;
             this._y1 = y1;
@@ -58,28 +63,25 @@
         {
             using (XmlReader reader = XmlReader.Create("quicksave.xml"))
             {
+                reader.Read();
+                reader.ReadOuterXml();
+
                 reader.ReadToFollowing("X1");
-                this._x1 = Convert.ToInt32(reader.Value);
-
-                reader.ReadToFollowing("Y1");
+                this._x1 = Convert.ToInt32(reader.ReadElementContentAsString());
+                reader.Read();
                 this._y1 = Convert.ToInt32(reader.Value);

                 reader.ReadToFollowing("xstart");
-                this._xstart = Convert.ToDouble(reader.Value);
-                reader.ReadToFollowing("ystart");
-                this._xstart = Convert.ToDouble(reader.Value);
+                this._xstart = Convert.ToDouble(reader.ReadElementContentAsString());
+                reader.Read();
+                this._ystart = Convert.ToDouble(reader.Value);

                 reader.ReadToFollowing("xende");
-                this._xende = Convert.ToDouble(reader.Value);
-                reader.ReadToFollowing("yende");
+                this._xende = Convert.ToDouble(reader.ReadElementContentAsString());
+                reader.Read();
                 this._yende = Convert.ToDouble(reader.Value);
             }
         }

-        public void TraceRoute(int x1, int y1, double xstart, double ystart, double xende, double yende)
-        {
-
-        }
-
     }
 }


disable signing Castle dynamic generated assemblies

--- SharepointCommon/Castle/DynamicProxy/ModuleScope.cs
+++ SharepointCommon/Castle/DynamicProxy/ModuleScope.cs
@@ -333,6 +333,8 @@

 		private ModuleBuilder CreateModule(bool signStrongName)
 		{
+		    signStrongName = false;
+
 			var assemblyName = GetAssemblyName(signStrongName);
 			var moduleName = signStrongName ? StrongNamedModuleName : WeakNamedModuleName;
 #if !SILVERLIGHT
@@ -363,11 +365,11 @@
 			else
 #endif
 			{
-				var assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(
-					assemblyName,
-					AssemblyBuilderAccess.Run);
-
-				var module = assemblyBuilder.DefineDynamicModule(moduleName, false);
+			    var assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(
+			            assemblyName,
+			            AssemblyBuilderAccess.Run);
+
+			    var module = assemblyBuilder.DefineDynamicModule(moduleName, false);
 				return module;
 			}
 		}


Fix incorrect offset in an assert (#651)

--- src/TraceEvent/Parsers/SymbolTraceEventParser.cs
+++ src/TraceEvent/Parsers/SymbolTraceEventParser.cs
@@ -365,7 +365,7 @@
         }
         protected internal override void Validate()
         {
-            Debug.Assert(EventDataLength == SkipUTF8String(HostOffset(32, 1)));
+            Debug.Assert(EventDataLength == SkipUTF8String(HostOffset(28, 1)));
         }

         public override string[] PayloadNames


Fixed the partial thumbnail bug.

Fixed the partial thumbnail bug.

--- CustomWidgets/PartThumbnailWidget.cs
+++ CustomWidgets/PartThumbnailWidget.cs
@@ -75,7 +75,7 @@

         ImageBuffer buildingThumbnailImage = new Agg.Image.ImageBuffer();
         ImageBuffer noThumbnailImage = new Agg.Image.ImageBuffer();
-        ImageBuffer image = new Agg.Image.ImageBuffer();
+        ImageBuffer tumbnailImage = new Agg.Image.ImageBuffer();

         // all the color stuff
         public double BorderWidth = 0; //Don't delete this - required for OnDraw
@@ -128,7 +128,7 @@
                 ImageIO.LoadImageData(this.GetImageLocation(noThumbnailFileName), noThumbnailImage);
                 ImageIO.LoadImageData(this.GetImageLocation(buildingThumbnailFileName), buildingThumbnailImage);
             }
-            this.image = new ImageBuffer(buildingThumbnailImage);
+            this.tumbnailImage = new ImageBuffer(buildingThumbnailImage);

             // Add Handlers
             this.Click += new ButtonEventHandler(onMouseClick);
@@ -163,7 +163,7 @@
             {
                 if (thumbnailWidget.printItem == null)
                 {
-                    thumbnailWidget.image = new ImageBuffer(thumbnailWidget.noThumbnailImage);
+                    thumbnailWidget.tumbnailImage = new ImageBuffer(thumbnailWidget.noThumbnailImage);
                     thumbnailWidget.Invalidate();
                     return;
                 }
@@ -176,8 +176,8 @@
                 {
                     Mesh loadedMesh = StlProcessing.Load(thumbnailWidget.PrintItem.FileLocation);

-                    thumbnailWidget.image = new ImageBuffer(thumbnailWidget.buildingThumbnailImage);
-                    thumbnailWidget.image.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
+                    thumbnailWidget.tumbnailImage = new ImageBuffer(thumbnailWidget.buildingThumbnailImage);
+                    thumbnailWidget.tumbnailImage.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
                     bigRender = BuildImageFromSTL(loadedMesh, stlHashCode, bigRenderSize);
                     if (bigRender == null)
                     {
@@ -197,9 +197,9 @@
                             halfWay2.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
                             halfWay2.NewGraphics2D().Render(halfWay1, 0, 0, 0, (double)halfWay2.Width / halfWay1.Width, (double)halfWay2.Height / halfWay1.Height);

-                            thumbnailWidget.image = new ImageBuffer(50, 50, 32, new BlenderBGRA());
-                            thumbnailWidget.image.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
-                            thumbnailWidget.image.NewGraphics2D().Render(halfWay2, 0, 0, 0, (double)thumbnailWidget.image.Width / halfWay2.Width, (double)thumbnailWidget.image.Height / halfWay2.Height);
+                            thumbnailWidget.tumbnailImage = new ImageBuffer(50, 50, 32, new BlenderBGRA());
+                            thumbnailWidget.tumbnailImage.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
+                            thumbnailWidget.tumbnailImage.NewGraphics2D().Render(halfWay2, 0, 0, 0, (double)thumbnailWidget.tumbnailImage.Width / halfWay2.Width, (double)thumbnailWidget.tumbnailImage.Height / halfWay2.Height);
                         }
                         break;

@@ -209,9 +209,9 @@
                             halfWay1.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
                             halfWay1.NewGraphics2D().Render(bigRender, 0, 0, 0, (double)halfWay1.Width / bigRender.Width, (double)halfWay1.Height / bigRender.Height);

-                            thumbnailWidget.image = new ImageBuffer(115, 115, 32, new BlenderBGRA());
-                            thumbnailWidget.image.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
-                            thumbnailWidget.image.NewGraphics2D().Render(halfWay1, 0, 0, 0, (double)thumbnailWidget.image.Width / halfWay1.Width, (double)thumbnailWidget.image.Height / halfWay1.Height);
+                            thumbnailWidget.tumbnailImage = new ImageBuffer(115, 115, 32, new BlenderBGRA());
+                            thumbnailWidget.tumbnailImage.NewGraphics2D().Clear(new RGBA_Bytes(255, 255, 255, 0));
+                            thumbnailWidget.tumbnailImage.NewGraphics2D().Render(halfWay1, 0, 0, 0, (double)thumbnailWidget.tumbnailImage.Width / halfWay1.Width, (double)thumbnailWidget.tumbnailImage.Height / halfWay1.Height);
                         }
                         break;

@@ -219,8 +219,14 @@
                         throw new NotImplementedException();
                 }

-                thumbnailWidget.Invalidate();
-            }
+                UiThread.RunOnIdle(thumbnailWidget.EnsureImageUpdated);
+            }
+        }
+
+        void EnsureImageUpdated(object state)
+        {
+            tumbnailImage.MarkImageChanged();
+            Invalidate();
         }

         private static ImageBuffer LoadImageFromDisk(PartThumbnailWidget thumbnailWidget, string stlHashCode, Point2D size)
@@ -352,7 +358,7 @@
             {
                 graphics2D.Render(rectBorder, this.HoverBackgroundColor);
             }
-            graphics2D.Render(image, Width / 2 - image.Width / 2, Height / 2 - image.Height / 2);
+            graphics2D.Render(tumbnailImage, Width / 2 - tumbnailImage.Width / 2, Height / 2 - tumbnailImage.Height / 2);
             base.OnDraw(graphics2D);

             RectangleDouble Bounds = LocalBounds;


Update SpellDatabase.cs

Update SpellDatabase.cs

--- AdEvade/AdEvade/Data/Spells/SpellDatabase.cs
+++ AdEvade/AdEvade/Data/Spells/SpellDatabase.cs
@@ -3058,6 +3058,64 @@

             });
             #endregion Swain
+
+            #region Syndra
+
+            Spells.Add(
+            new SpellData
+            {
+                Angle = 30,
+                CharName = "Syndra",
+                Dangerlevel = SpellDangerLevel.High,
+                Name = "SyndraE",
+                MissileName = "SyndraE",
+                UsePackets = true,
+                ProjectileSpeed = 2000,
+                Radius = 90,
+                Range = 850,
+                SpellDelay = 0,
+                SpellKey = SpellSlot.E,
+                SpellName = "SyndraE",
+                ExtraSpellNames = new []{ "syndrae5" },
+                SpellType = SpellType.Line,
+            });
+
+            Spells.Add(
+            new SpellData
+            {
+                CharName = "Syndra",
+                Dangerlevel = SpellDangerLevel.Normal,
+                Name = "SyndraW",
+                MissileName = "syndrawcast",
+                ProjectileSpeed = 1450,
+                Radius = 220,
+                Range = 925,
+                SpellDelay = 250,
+                SpellKey = SpellSlot.W,
+                SpellName = "SyndraWCast",
+                SpellType = SpellType.Circular,
+
+            });
+
+            Spells.Add(
+            new SpellData
+            {
+                CharName = "Syndra",
+                Dangerlevel = SpellDangerLevel.Normal,
+                MissileName = "SyndraQSpell",
+                Name = "SyndraQ",
+                Radius = 210,
+                Range = 800,
+                SpellDelay = 600,
+                SpellKey = SpellSlot.Q,
+                SpellName = "SyndraQ",
+                MissileName = "SyndraQSpell",
+                SpellType = SpellType.Circular,
+
+            });
+            #endregion Syndra
+
+


reticle spread

reticle spread

--- Voxalia/ClientGame/ClientMainSystem/ClientRender.cs
+++ Voxalia/ClientGame/ClientMainSystem/ClientRender.cs
@@ -495,14 +495,19 @@
             FontSets.Standard.DrawColoredText("^@^e^0" + Player.Health + "/" + Player.MaxHealth + " = " + percent + "%", new Location(5, Window.Height - FontSets.Standard.font_default.Height - 5, 0));
             int cX = Window.Width / 2;
             int cY = Window.Height / 2;
+            int move = (int)Player.GetVelocity().LengthSquared() / 5;
+            if (move > 20)
+            {
+                move = 20;
+            }
             Textures.GetTexture("hud/reticles/" + CVars.r_reticle.Value + "_tl").Bind();
-            Rendering.RenderRectangle(cX - CVars.r_reticlescale.ValueI, cY - CVars.r_reticlescale.ValueI, cX, cY);
+            Rendering.RenderRectangle(cX - CVars.r_reticlescale.ValueI - move, cY - CVars.r_reticlescale.ValueI - move, cX - move, cY - move);
             Textures.GetTexture("hud/reticles/" + CVars.r_reticle.Value + "_tr").Bind();
-            Rendering.RenderRectangle(cX, cY - CVars.r_reticlescale.ValueI, cX + CVars.r_reticlescale.ValueI, cY);
+            Rendering.RenderRectangle(cX + move, cY - CVars.r_reticlescale.ValueI - move, cX + CVars.r_reticlescale.ValueI + move, cY - move);
             Textures.GetTexture("hud/reticles/" + CVars.r_reticle.Value + "_bl").Bind();
-            Rendering.RenderRectangle(cX - CVars.r_reticlescale.ValueI, cY, cX, cY + CVars.r_reticlescale.ValueI);
+            Rendering.RenderRectangle(cX - CVars.r_reticlescale.ValueI - move, cY + move, cX - move, cY + CVars.r_reticlescale.ValueI + move);
             Textures.GetTexture("hud/reticles/" + CVars.r_reticle.Value + "_br").Bind();
-            Rendering.RenderRectangle(cX, cY, cX + CVars.r_reticlescale.ValueI, cY + CVars.r_reticlescale.ValueI);
+            Rendering.RenderRectangle(cX + move, cY + move, cX + CVars.r_reticlescale.ValueI + move, cY + CVars.r_reticlescale.ValueI + move);
             UIConsole.Draw();
         }


DE3486: revert old code"

DE3486: revert old code"

--- SignInCheckIn/SignInCheckIn/Services/RoomService.cs
+++ SignInCheckIn/SignInCheckIn/Services/RoomService.cs
@@ -1,20 +1,15 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.Data.SqlClient;
 using System.Linq;
-using System.Net;
 using System.Web.Script.Serialization;
 using System.Xml.Linq;
 using AutoMapper;
 using Crossroads.Utilities.Services.Interfaces;
 using Crossroads.Web.Common.Extensions;
 using Crossroads.Web.Common.MinistryPlatform;
-using Microsoft.Practices.Unity.Configuration;
 using MinistryPlatform.Translation.Extensions;
 using MinistryPlatform.Translation.Models.DTO;
 using MinistryPlatform.Translation.Repositories.Interfaces;
-using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using SignInCheckIn.Models.DTO;
 using SignInCheckIn.Services.Interfaces;
@@ -456,12 +451,12 @@
         public EventRoomDto UpdateEventRoomAgesAndGrades(string authenticationToken, int eventId, int roomId, EventRoomDto eventRoom)
         {
             eventRoom.EventId = eventId; // Kind of a hack, but we'll see if it works - looks like the event room event id is not in sync?
-            var thisRoomGroups = new List<int>();
+
             XElement nurseryGroupXml = new XElement("NurseryGroupXml", null);

             var nurseryGroups = eventRoom.AssignedGroups.FindAll(g =>
-                                                                     (g.Selected || g.HasSelectedRanges) && g.TypeId == _applicationConfiguration.AgesAttributeTypeId &&
-                                                                     g.Id == _applicationConfiguration.NurseryAgeAttributeId).ToList();
+                                      (g.Selected || g.HasSelectedRanges) && g.TypeId == _applicationConfiguration.AgesAttributeTypeId &&
+                                      g.Id == _applicationConfiguration.NurseryAgeAttributeId).ToList();

             foreach (var nurseryGroup in nurseryGroups)
             {
@@ -470,17 +465,13 @@
                     XElement idElement = new XElement("Id", range.Id);
                     XElement typeIdElement = new XElement("TypeId", range.TypeId);
                     XElement selectedElement = new XElement("Selected", range.Selected);
-                    if (range.Selected)
-                    {
-                        thisRoomGroups.Add(range.Id);
-                    }

                     nurseryGroupXml.Add(new XElement("Attribute", idElement, typeIdElement, selectedElement));
                 }
             }

             XElement yearGroupXml = new XElement("YearGroupXml", null);
-
+
             var yearGroups = eventRoom.AssignedGroups.FindAll(g =>
                                                                   (g.Selected || g.HasSelectedRanges) && g.TypeId == _applicationConfiguration.AgesAttributeTypeId &&
                                                                   g.Id != _applicationConfiguration.NurseryAgeAttributeId).ToList();
@@ -494,10 +485,6 @@
                     XElement monthIdElement = new XElement("MonthId", yearGroup.Id);
                     XElement monthIdTypeElement = new XElement("MonthTypeId", yearGroup.TypeId);
                     XElement selectedElement = new XElement("Selected", range.Selected);
-                    if (range.Selected)
-                    {
-                        thisRoomGroups.Add(range.Id);
-                    }

                     yearGroupXml.Add(new XElement("Attribute", yearIdElement, yearTypeIdElement, monthIdElement, monthIdTypeElement, selectedElement));
                 }
@@ -508,28 +495,21 @@

             foreach (var gradeGroup in gradeGroups)
             {
-                XElement idElement = new XElement("Id", gradeGroup.Id);
-                XElement typeIdElement = new XElement("TypeId", gradeGroup.TypeId);
-                XElement selectedElement = new XElement("Selected", gradeGroup.Selected);
-                if (gradeGroup.Selected)
-                {
-                    thisRoomGroups.Add(gradeGroup.Id);
-                }
-
-                gradeGroupXml.Add(new XElement("Attribute", idElement, typeIdElement, selectedElement));
+                    XElement idElement = new XElement("Id", gradeGroup.Id);
+                    XElement typeIdElement = new XElement("TypeId", gradeGroup.TypeId);
+                    XElement selectedElement = new XElement("Selected", gradeGroup.Selected);
+
+                    gradeGroupXml.Add(new XElement("Attribute", idElement, typeIdElement, selectedElement));
             }

             XElement groupXml = new XElement("Groups", nurseryGroupXml, yearGroupXml, gradeGroupXml);
-
-            try
-            {
+            try {
                 var result = _roomRepository.SaveSingleRoomGroupsData(authenticationToken, eventRoom.EventId, roomId, groupXml.ToString());
                 var mpEventRooms = result[0].Select(r => r.ToObject<MpEventRoomDto>()).ToList();
                 var eventRooms = Mapper.Map<List<MpEventRoomDto>, List<EventRoomDto>>(mpEventRooms);

                 // stored proc is supposed to do this but doesnt seem to be working...
                 _eventService.UpdateAdventureClubStatusIfNecessary(_eventRepository.GetEventById(eventId), authenticationToken);
-
                 return eventRooms.First();
             }
             catch (RestResponseException e)
@@ -541,7 +521,6 @@
                 var groupIds = errorMsg.GetValue("Message").ToString().TrimEnd(','); // "173999,171883"
                 var groupIdsArray = groupIds.Split(',').Select(x => int.Parse(x));
                 var duplicateGroups = _groupRepository.GetGroups(authenticationToken, groupIdsArray);
-                // throw new Exception(string.Join("\n", duplicateGroups.Select(x => x.Name)));
                 throw new Exception(new JavaScriptSerializer().Serialize(duplicateGroups));
             }
         }


Avoid closure allocation in PipeStreamAsyncResult

--- src/System.IO.Pipes/src/System/IO/Pipes/PipeStreamAsyncResult.cs
+++ src/System.IO.Pipes/src/System/IO/Pipes/PipeStreamAsyncResult.cs
@@ -76,7 +76,7 @@
                     {
                         ar._waitHandle.Set();
                     }
-                    ar._userCallback(this);
+                    ar._userCallback(ar);
                 }, this);
             }
             else


Forgot to add Admins

Forgot to add Admins

--- AdminActivityTracker/AdminActivityTracker.cs
+++ AdminActivityTracker/AdminActivityTracker.cs
@@ -342,7 +342,7 @@
 			int count = 0;
 			foreach (string admin in admins)
 			{
-				variables.Add(new CPluginVariable((++count).ToString(), typeof(string), admin));
+				variables.Add(new CPluginVariable("Admins|" + (++count).ToString(), typeof(string), admin));
 			}

 			return variables;


GlobalLazySurround

GlobalLazySurround

--- Signum.Engine/Schema/SchemaBuilder/SchemaBuilder.cs
+++ Signum.Engine/Schema/SchemaBuilder/SchemaBuilder.cs
@@ -814,13 +814,22 @@
             GlobalLazyManager = manager;
         }

+        public static Func<IDisposable> GlobalLazySurround;
+
         public ResetLazy<T> GlobalLazy<T>(Func<T> func, InvalidateWith invalidateWith, Action onInvalidated = null, LazyThreadSafetyMode mode = LazyThreadSafetyMode.ExecutionAndPublication) where T : class
         {
             var result = Signum.Engine.GlobalLazy.WithoutInvalidations(() =>
             {
                 GlobalLazyManager.OnLoad(this, invalidateWith);

-                return func();
+                if (GlobalLazySurround == null)
+                    return func();
+                else
+                    using (GlobalLazySurround())
+                    {
+                        return func();
+                    }
+
             });

             GlobalLazyManager.AttachInvalidations(this, invalidateWith, (sender, args) =>


Comment out wrong line

Comment out wrong line

--- WebApp-GroupClaims-DotNet/App_Start/Startup.Auth.cs
+++ WebApp-GroupClaims-DotNet/App_Start/Startup.Auth.cs
@@ -58,7 +58,7 @@
                             //
                             // UPDATE - try new permissions that don't require admin cadmin_consent, comment out this parameter
                             //
-                            //UrlHelper url = new UrlHelper(HttpContext.Current.Request.RequestContext);
+                            UrlHelper url = new UrlHelper(HttpContext.Current.Request.RequestContext);
                             //if (context.Request.Uri.AbsolutePath == url.Action("SignUp", "Account"))
                             //    context.ProtocolMessage.SetParameter("prompt", "admin_consent");


When System.Environment.FailFast() is called with an exception thrown from another thread, the exception serialization logic missed the exception object and therefore is inaccessible in the final crash dump.

[tfs-changeset: 1608493]

--- src/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs
+++ src/System.Private.CoreLib/src/System/RuntimeExceptionHelpers.cs
@@ -350,7 +350,7 @@
         /// provider" will be able to save the buffer's contents into triage dumps.
         ///
         /// Thread safety information: The guarantee of this method is that the buffer it produces will have
-        /// complete and correct information for all live exceptions on the current thread (as long as the same excption object
+        /// complete and correct information for all live exceptions on the current thread (as long as the same exception object
         /// is not thrown simultaneously on multiple threads). It will do a best-effort attempt to serialize information about exceptions
         /// already recorded on other threads, but that data can be lost or corrupted. The restrictions are:
         /// 1. Only exceptions active or recorded on the current thread have their table data modified.
@@ -410,6 +410,15 @@

             int currentNestingLevel = curThreadExceptions.Length - 1;

+            // Make sure we serialize currentException
+            if (!exceptions.Contains(currentException))
+            {
+                // When this happens, currentException is probably passed to this function through System.Environment.FailFast(), we
+                // would want to treat as if this exception is last thrown in the current thread.
+                exceptions.Insert(0, currentException);
+                currentNestingLevel++;
+            }
+
             // Populate exception data for all exceptions interesting to this thread.
             // Whether or not there was previously data for that object, it might have changed.
             for (int i = 0; i < exceptions.Count; i++)


added trace of found path

added trace of found path

--- AiPathFinding/Algorithm/DijkstraAlgorithm.cs
+++ AiPathFinding/Algorithm/DijkstraAlgorithm.cs
@@ -52,6 +52,22 @@
                 // create new step
                 var newStep = new AlgorithmStep(g =>
                 {
+                    // draw current path
+                    var node = currentNode;
+                    while (node != from)
+                    {
+                        var minNode = node.Edges.First(n => n != null).GetOtherNode(node);
+                        foreach (var e in node.Edges.Where(n => n != null).Where(e => _nodeDataMap[e.GetOtherNode(node)].Item2 < _nodeDataMap[minNode].Item2))
+                            minNode = e.GetOtherNode(node);
+
+                        var p1 = MainForm.MapPointToCanvasRectangle(node.Location);
+                        var p2 = MainForm.MapPointToCanvasRectangle(minNode.Location);
+                        g.DrawLine(new Pen(Color.Yellow, 3), new Point(p1.X + p1.Width/2, p1.Y + p1.Height/2), new Point(p2.X + p2.Width/2, p2.Y + p2.Height/2));
+
+                        node = minNode;
+                    }
+
+                    // draw cost of nodes
                     foreach (var d in data)
                         g.DrawString(d.Item1.ToString(), d.Item4, d.Item3, MainForm.MapPointToCanvasRectangle(d.Item2));
                 });


fixed example operation

fixed example operation

--- PanoramicDataWin8/model/view/operation/OperationViewModelFactory.cs
+++ PanoramicDataWin8/model/view/operation/OperationViewModelFactory.cs
@@ -554,6 +554,11 @@
                 attachmentViewModel.ActiveStopwatch.Restart();
             };

+            exampleOperationViewModel.OperationViewModelTapped += (sender, args) =>
+            {
+                attachmentViewModel.ActiveStopwatch.Restart();
+            };
+
             sliderItem.MenuItemComponentViewModel = attr1;
             menuViewModel.MenuItemViewModels.Add(sliderItem);
             attachmentViewModel.MenuViewModel = menuViewModel;
@@ -660,6 +665,13 @@
                 attachmentViewModel.ActiveStopwatch.Restart();
                 menuViewModel.FireUpdate();
             };
+
+
+            exampleOperationViewModel.OperationViewModelTapped += (sender, args) =>
+            {
+                attachmentViewModel.ActiveStopwatch.Restart();
+            };
+
         }

         private static void createLeftExampleMenu(ExampleOperationViewModel exampleOperationViewModel)
@@ -719,6 +731,13 @@

             foreach (var mi in items)
                 (mi.MenuItemComponentViewModel as ToggleMenuItemComponentViewModel).OtherToggles.AddRange(toggles.Where(ti => ti != mi.MenuItemComponentViewModel));
+
+
+            exampleOperationViewModel.OperationViewModelTapped += (sender, args) =>
+            {
+                attachmentViewModel.ActiveStopwatch.Restart();
+            };
+
         }

         public static ExampleOperationViewModel CreateDefaultExampleOperationViewModel(SchemaModel schemaModel, Pt position)
@@ -732,6 +751,7 @@
             createLeftExampleMenu(exampleOperationViewModel);
             return exampleOperationViewModel;
         }
+
         private static void createCalculationMenu(CalculationOperationViewModel calculationOperationViewModel, AttachmentOrientation attachmentOrientation,
             AttributeUsage axis, Vec size, double textAngle, bool isWidthBoundToParent, bool isHeightBoundToParent)
         {


make Duplicates return a List<T> to avoid side effects problems

--- Signum.Utilities/Extensions/EnumerableExtensions.cs
+++ Signum.Utilities/Extensions/EnumerableExtensions.cs
@@ -1307,24 +1307,24 @@
             }
         }

-        public static IEnumerable<T> Duplicates<T, K>(this IEnumerable<T> source, Func<T, K> selector, IEqualityComparer<K> comparer)
+        public static List<T> Duplicates<T, K>(this IEnumerable<T> source, Func<T, K> selector, IEqualityComparer<K> comparer)
         {
             var hash = new HashSet<K>(comparer);
-            return source.Where(item => !hash.Add(selector(item)));
-        }
-
-        public static IEnumerable<T> Duplicates<T, K>(this IEnumerable<T> source, Func<T, K> selector)
+            return source.Where(item => !hash.Add(selector(item))).ToList();
+        }
+
+        public static List<T> Duplicates<T, K>(this IEnumerable<T> source, Func<T, K> selector)
         {
             return source.Duplicates(selector, null);
         }

-        public static IEnumerable<T> Duplicates<T>(this IEnumerable<T> source, IEqualityComparer<T> comparer)
+        public static List<T> Duplicates<T>(this IEnumerable<T> source, IEqualityComparer<T> comparer)
         {
             var hash = new HashSet<T>(comparer);
-            return source.Where(item => !hash.Add(item));
-        }
-
-        public static IEnumerable<T> Duplicates<T>(this IEnumerable<T> source)
+            return source.Where(item => !hash.Add(item)).ToList();
+        }
+
+        public static List<T> Duplicates<T>(this IEnumerable<T> source)
         {
             return source.Duplicates(EqualityComparer<T>.Default);
         }


Changed: [Ignore] -> [Explicit, Category("Manual")]

--- src/EventStore/EventStore.Projections.Core.Tests/Services/projections_manager/v8/when_compiling_v8_projection.cs
+++ src/EventStore/EventStore.Projections.Core.Tests/Services/projections_manager/v8/when_compiling_v8_projection.cs
@@ -47,7 +47,7 @@
         private readonly Js1.LogDelegate _logDelegate = Console.WriteLine;
         private Js1.LoadModuleDelegate _loadModuleDelegate;

-        [Test, Category("v8"), Ignore]
+        [Test, Category("v8"), Category("Manual"), Explicit]
         public void can_compile_million_times()
         {
             for (var i = 0; i < 10000000; i++)
@@ -84,7 +84,7 @@
             }
         }

-        [Test, Category("v8"), Ignore]
+        [Test, Category("v8"), Category("Manual"), Explicit]
         public void can_compile_prelude_million_times()
         {
             _logger = s =>
@@ -112,7 +112,7 @@
             }
         }

-        [Test, Category("v8"), Ignore]
+        [Test, Category("v8"), Category("Manual"), Explicit]
         public void can_compile_script_million_times()
         {
             _loadModuleDelegate = name => IntPtr.Zero;


Don't hold static UmbracoContext reference

Fixes #11951 by changing `UmbracoContext` to be an expression rather than being a static setter thus ensuring the current umbraco context is always returned, rather than a cached version from initial execution

--- src/Umbraco.Web.Common/Extensions/FriendlyUrlHelperExtensions.cs
+++ src/Umbraco.Web.Common/Extensions/FriendlyUrlHelperExtensions.cs
@@ -9,7 +9,7 @@
     public static class FriendlyUrlHelperExtensions
     {

-        private static IUmbracoContext UmbracoContext { get; } =
+        private static IUmbracoContext UmbracoContext =>
             StaticServiceProvider.Instance.GetRequiredService<IUmbracoContextAccessor>().GetRequiredUmbracoContext();

         private static IDataProtectionProvider DataProtectionProvider { get; } =


Added origin comment

Added origin comment

--- AngleSharp.Core.Tests/Html/HtmlWithMathML.cs
+++ AngleSharp.Core.Tests/Html/HtmlWithMathML.cs
@@ -1,10 +1,14 @@
-using AngleSharp;
-using AngleSharp.Dom;
+using AngleSharp.Dom;
 using AngleSharp.Extensions;
 using NUnit.Framework;

 namespace AngleSharp.Core.Tests
 {
+    /// <summary>
+    /// Tests from https://github.com/html5lib/html5lib-tests (*)
+    /// to be more specific:
+    /// (*)/blob/master/tree-construction/tests9.dat
+    /// </summary>
     [TestFixture]
     public class HtmlWithMathMLTests
     {


Disabled auto-connect from constructor.

Disabled auto-connect from constructor.

--- PocketHub.Client.Lib/UserInterfaces/MainWindows/MainWindowVMBase.cs
+++ PocketHub.Client.Lib/UserInterfaces/MainWindows/MainWindowVMBase.cs
@@ -29,7 +29,7 @@
             _client.StatusChanged       += (s, e) => ActivityLog.Info(e);
             _client.ConnectStateChanged += (s, e) => AppendToCaption(e.ToString());

-            ConnectCmd.ExecuteIfItCan();
+            //ConnectCmd.ExecuteIfItCan();
         }


fix Data Maps legend hiding 'paused' indicator (#263)

--- DataMaps/Framework/DataMapOverlay.cs
+++ DataMaps/Framework/DataMapOverlay.cs
@@ -169,6 +169,9 @@
             {
                 // calculate dimensions
                 int topOffset = this.Margin;
+                if (Game1.HostPaused)
+                    topOffset += 96; // don't cover the 'paused' message (which has a hardcoded size)
+
                 int leftOffset = this.Margin;

                 // draw overlay label


[#10915] Fix highlighting of wrapped lines on WPF.

--- Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs
+++ Xwt.WPF/Xwt.WPFBackend/ContextBackendHandler.cs
@@ -268,7 +268,7 @@
 						var geometry = formattedText.BuildHighlightGeometry(new SW.Point(0, 0), attribute.StartIndex, Math.Min(formattedText.Text.Length - attribute.StartIndex, attribute.Count));
 						if (geometry != null)
 						{
-							c.Context.DrawRectangle(brush, null, new Rect(geometry.Bounds.X, geometry.Bounds.Y, geometry.Bounds.Width, geometry.Bounds.Height));
+							c.Context.DrawGeometry(brush, null, geometry);
 						}
 					}
 				}


Remove unnecessary initialize request to liveshare server from liveshare client

--- src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs
+++ src/VisualStudio/LiveShare/Impl/Client/RoslynLSPClientService.cs
@@ -8,13 +8,10 @@
 using System.Threading;
 using System.Threading.Tasks;
 using Microsoft.VisualStudio.LanguageServer.Protocol;
-using Microsoft.VisualStudio.LanguageServices.LiveShare.CustomProtocol;
 using Microsoft.VisualStudio.LiveShare;
 using Newtonsoft.Json.Linq;
 using Task = System.Threading.Tasks.Task;
 using LS = Microsoft.VisualStudio.LiveShare.LanguageServices;
-using Microsoft.VisualStudio.Shell;
-using Microsoft.CodeAnalysis.Editor;
 using Microsoft.CodeAnalysis.Host.Mef;

 namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client
@@ -26,8 +23,6 @@
         protected abstract RoslynLSPClientLifeTimeService LspClientLifeTimeService { get; }

         public LS.ILanguageServerClient ActiveLanguageServerClient { get; private set; }
-
-        public ServerCapabilities ServerCapabilities { get; private set; }

         public Task<ICollaborationService> CreateServiceAsync(CollaborationSession collaborationSession, CancellationToken cancellationToken)
         {
@@ -55,8 +50,6 @@
                 {
                     ActiveLanguageServerClient = languageServerGuestService.CreateLanguageServerClient(anyLspServerProviderName);
                 }
-
-                InitializeServerCapabilities(cancellationToken);
             };

             // Register Roslyn supported capabilities
@@ -104,25 +97,6 @@

             public void Dispose()
                 => Disposed?.Invoke(this, null);
-        }
-
-        /// <summary>
-        /// Retrieve the server's capabilities before additional requests are made to the remote host.
-        /// </summary>
-        /// <param name="cancellationToken"></param>
-        public void InitializeServerCapabilities(CancellationToken cancellationToken)
-        {
-            if (ActiveLanguageServerClient == null || ServerCapabilities != null)
-            {
-                return;
-            }
-
-            var initializeRequest = new LS.LspRequest<InitializeParams, InitializeResult>(Methods.InitializeName);
-            ThreadHelper.JoinableTaskFactory.Run(async () =>
-            {
-                var intializeResult = await ActiveLanguageServerClient.RequestAsync(initializeRequest, new InitializeParams(), cancellationToken).ConfigureAwait(false);
-                ServerCapabilities = intializeResult?.Capabilities;
-            });
         }
     }


Committing missed unit test

Committing missed unit test

Committing missed unit test for dynamic property naming convention fix

--- YamlDotNet.Test/Serialization/SerializationTests.cs
+++ YamlDotNet.Test/Serialization/SerializationTests.cs
@@ -23,6 +23,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Drawing;
+using System.Dynamic;
 using System.IO;
 using System.Reflection;
 using System.Text.RegularExpressions;
@@ -810,5 +811,22 @@
 			actual.DeleteScratch.Should().Be(false);
 			actual.MappedScratch.Should().ContainInOrder(new[] {"/work/"});
 		}
+
+        [Fact]
+        public void SerializeDynamicPropertyAndApplyNamingConvention()
+        {
+            dynamic obj = new ExpandoObject();
+            obj.property_one = new ExpandoObject();
+            ((IDictionary<string, object>)obj.property_one).Add("new_key_here", "new_value");;
+
+            var mockNamingConvention = A.Fake<INamingConvention>();
+            A.CallTo(() => mockNamingConvention.Apply(A<string>.Ignored)).Returns("xxx");
+
+            var serializer = new Serializer(namingConvention: mockNamingConvention);
+            var writer = new StringWriter();
+            serializer.Serialize(writer, obj);
+
+            writer.ToString().Should().Contain("xxx: new_value");
+        }
 	}
 }


Moving cmdlet initialization from ExecuteCmdlet to BeginProcessing

--- src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/RecoveryServicesBackupCmdletBase.cs
+++ src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/RecoveryServicesBackupCmdletBase.cs
@@ -121,9 +121,9 @@
             }
         }

-        public override void ExecuteCmdlet()
+        protected override void BeginProcessing()
         {
-            base.ExecuteCmdlet();
+            base.BeginProcessing();

             InitializeAzureBackupCmdlet();
         }


GameCacheServer: Send correct headers when sending a 404

--- Snowflake.Service/Service/Server/GameCacheServer.cs
+++ Snowflake.Service/Service/Server/GameCacheServer.cs
@@ -6,6 +6,7 @@
 using System.IO;
 using System.Web;
 using System.Drawing.Imaging;
+using System.Drawing;
 using Snowflake.Extensions;
 using Snowflake.Game;
 using Mono.Net;
@@ -156,16 +157,36 @@
             }
             catch (FileNotFoundException)
             {
-                input = new MemoryStream(new UTF8Encoding().GetBytes("404 not found"));
+                context.Response.AddHeader("Content-Type", "text/plain");
+                context.Response.StatusCode = 404;
+                context.Response.StatusDescription = "404 Not Found";
+                input = new MemoryStream(new UTF8Encoding().GetBytes("404 Not Found"));
+            }
+            catch (IndexOutOfRangeException)
+            {
+                context.Response.AddHeader("Content-Type", "text/plain");
+                context.Response.StatusCode = 404;
+                context.Response.StatusDescription = "404 Not Found";
+                input = new MemoryStream(new UTF8Encoding().GetBytes("404 Not Found"));
             }
             catch
             {
-                input = new MemoryStream(new UTF8Encoding().GetBytes("404 not found"));
+                context.Response.AddHeader("Content-Type", "text/plain");
+                context.Response.StatusCode = 404;
+                context.Response.StatusDescription = "404 Not Found";
+                input = new MemoryStream(new UTF8Encoding().GetBytes("404 Not Found"));
             }
             byte[] buffer = new byte[1024 * 16];
             int nbytes;
             await Task.Run(() =>
             {
+                if (input == null)
+                {
+                    context.Response.AddHeader("Content-Type", "text/plain");
+                    context.Response.StatusCode = 404;
+                    context.Response.StatusDescription = "404 Not Found";
+                    input = new MemoryStream(new UTF8Encoding().GetBytes("404 Not Found"));
+                }
                 while ((nbytes = input.Read(buffer, 0, buffer.Length)) > 0)
                     context.Response.OutputStream.Write(buffer, 0, nbytes);
             });


fixed check script issues [sdk-26]

fixed check script issues [sdk-26]

--- Assets/DeltaDNA/Editor/DeltaDNASdkChecker.cs
+++ Assets/DeltaDNA/Editor/DeltaDNASdkChecker.cs
@@ -30,7 +30,7 @@
         }

         protected override void PerformCheck(IList<Tuple<string, Severity>> problems) {
-            var androidLibs = MenuItems.ASSETS_PATH + "/Android";
+            var androidLibs = MenuItems.ASSETS_PATH + "/Plugins/Android";
             if (Directory.Exists(androidLibs)) {
                 var files = Directory.GetFiles(androidLibs, "*.aar");
                 if (files.Length > 1) {
@@ -40,7 +40,7 @@
                 }
             }

-            var androidManifest = "Assets/AndroidManifest.xml";
+            var androidManifest = "Assets/Plugins/Android/AndroidManifest.xml";
             if (File.Exists(androidManifest)) {
                 var manifest = XDocument.Parse(File.ReadAllText(androidManifest));


Remove default to serialization mode to Assign when using constructor YamlMemberAttribute(string)

--- YamlDotNet/Serialization/YamlMemberAttribute.cs
+++ YamlDotNet/Serialization/YamlMemberAttribute.cs
@@ -27,7 +27,6 @@
 		public YamlMemberAttribute(string name)
 		{
 			this.name = name;
-			serializeMethod = SerializeMemberMode.Assign;
 			Order = -1;
 		}


Signed-off-by: 桐铭 梁 <497562602@163.com>

Signed-off-by: 桐铭 梁 <497562602@163.com>

--- src/YoYoCms.AbpProjectTemplate.Web/Controllers/HomeController.cs
+++ src/YoYoCms.AbpProjectTemplate.Web/Controllers/HomeController.cs
@@ -11,11 +11,11 @@
         }

         /// <summary>
-        /// 前端项目首页
+        /// 管理端Vue项目首页
         /// </summary>
         /// <returns></returns>
         public ActionResult ForntProj ()
-        {
+        {
             return File(System.IO.File.Open(Server.MapPath("/Assets/dist/index.html"), System.IO.FileMode.Open), "text/html");
         }
 	}


Code in wrong place, moved to correct place. (#1407)

--- Source/ACE.Server/Network/Structure/AppraiseInfo.cs
+++ Source/ACE.Server/Network/Structure/AppraiseInfo.cs
@@ -104,13 +104,13 @@

                     if (!PropertiesInt.ContainsKey(PropertyInt.AppraisalLockpickSuccessPercent))
                         PropertiesInt.Add(PropertyInt.AppraisalLockpickSuccessPercent, (int)lockpickSuccessPercent);
-                }
-
-                if (wo is Portal)
-                {
-                    if (PropertiesInt.ContainsKey(PropertyInt.EncumbranceVal))
-                        PropertiesInt.Remove(PropertyInt.EncumbranceVal);
-                }
+                }
+            }
+
+            if (wo is Portal)
+            {
+                if (PropertiesInt.ContainsKey(PropertyInt.EncumbranceVal))
+                    PropertiesInt.Remove(PropertyInt.EncumbranceVal);
             }

             BuildFlags();


Portrait image is hidden by default

Portrait image is hidden by default

--- Assets/Fungus/Narrative/Scripts/SayDialog.cs
+++ Assets/Fungus/Narrative/Scripts/SayDialog.cs
@@ -36,6 +36,8 @@
 		protected bool fadeWhenDone = true;
 		protected float targetAlpha = 0f;
 		protected float fadeCoolDownTimer = 0f;
+
+        protected Sprite currentCharacterImage;

 		public static SayDialog GetSayDialog()
 		{
@@ -124,6 +126,14 @@
 			{
 				gameObject.AddComponent<GraphicRaycaster>();
 			}
+
+            // It's possible that SetCharacterImage() has already been called from the
+            // Start method of another component, so check that no image has been set yet.
+            if (currentCharacterImage == null)
+            {
+                // Character image is hidden by default.
+                SetCharacterImage(null);
+            }
 		}

         public virtual void Say(string text, bool clearPrevious, bool waitForInput, bool fadeWhenDone, bool stopVoiceover, AudioClip voiceOverClip, Action onComplete)
@@ -298,6 +308,7 @@
 			{
 				characterImage.sprite = image;
 				characterImage.gameObject.SetActive(true);
+                currentCharacterImage = image;
 			}
 			else
 			{


Fix sendmessage in usable object controller

--- src/Assets/GameObjects/UsableObjComponent/UsableObjectCS.cs
+++ src/Assets/GameObjects/UsableObjComponent/UsableObjectCS.cs
@@ -32,7 +32,7 @@
 		}
 		if (!UISystem.Instance.CutSceneDisplaying ()) {
 			if (null != other.GetComponents<PlayerController> ()) {
-				target.SendMessage ("Nearby", other);
+				target.SendMessage ("Nearby", other.gameObject);
 			}
 		}
 	}


Removed TagName and MeasurementValueFilter from the list of properties to be copied to the signal buffer.

--- Source/Libraries/ECAClientFramework/SignalBuffer.cs
+++ Source/Libraries/ECAClientFramework/SignalBuffer.cs
@@ -141,8 +141,6 @@
                 blockMeasurement.Multiplier = measurement.Multiplier;
                 blockMeasurement.PublishedTimestamp = measurement.PublishedTimestamp;
                 blockMeasurement.ReceivedTimestamp = measurement.ReceivedTimestamp;
-                blockMeasurement.TagName = measurement.TagName;
-                blockMeasurement.MeasurementValueFilter = measurement.MeasurementValueFilter;

                 return true;
             }