Change ImmutableSolidColorBrush to a class.

--- src/Avalonia.Visuals/Media/Immutable/ImmutableSolidColorBrush.cs
+++ src/Avalonia.Visuals/Media/Immutable/ImmutableSolidColorBrush.cs
@@ -5,7 +5,7 @@
     /// <summary>
     /// Fills an area with a solid color.
     /// </summary>
-    public readonly struct ImmutableSolidColorBrush : ISolidColorBrush, IEquatable<ImmutableSolidColorBrush>
+    public class ImmutableSolidColorBrush : ISolidColorBrush, IEquatable<ImmutableSolidColorBrush>
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="ImmutableSolidColorBrush"/> class.
@@ -48,8 +48,9 @@

         public bool Equals(ImmutableSolidColorBrush other)
         {
-            // ReSharper disable once CompareOfFloatsByEqualityOperator
-            return Color == other.Color && Opacity == other.Opacity;
+            if (ReferenceEquals(null, other)) return false;
+            if (ReferenceEquals(this, other)) return true;
+            return Color.Equals(other.Color) && Opacity.Equals(other.Opacity);
         }

         public override bool Equals(object obj)
@@ -67,12 +68,12 @@

         public static bool operator ==(ImmutableSolidColorBrush left, ImmutableSolidColorBrush right)
         {
-            return left.Equals(right);
+            return Equals(left, right);
         }

         public static bool operator !=(ImmutableSolidColorBrush left, ImmutableSolidColorBrush right)
         {
-            return !left.Equals(right);
+            return !Equals(left, right);
         }

         /// <summary>


MainProcessorsTestCase no longer necessary

git-svn-id: c3b8989232654601f1acea7403f771adaaa44a81@149 2c1201b4-01cd-e047-a400-b836ae1fbc61

--- src/Boo.Tests/Lang/Compiler/Processors/MainProcessorsTestCase.cs
+++ src/Boo.Tests/Lang/Compiler/Processors/MainProcessorsTestCase.cs
@@ -1,33 +0,0 @@
-#region license
-// boo - an extensible programming language for the CLI
-// Copyright (C) 2004 Rodrigo B. de Oliveira
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-//
-// As a special exception, if you link this library with other files to
-// produce an executable, this library does not by itself cause the
-// resulting executable to be covered by the GNU General Public License.
-// This exception does not however invalidate any other reasons why the
-// executable file might be covered by the GNU General Public License.
-//
-// Contact Information
-//
-// mailto:rbo@acm.org
-#endregion
-
-namespace Boo.Tests.Ast.Compiler.Processors
-{
-}
-


Added couple more tests

Added couple more tests

--- src/Compilers/CSharp/Test/Semantic/Semantics/RefEscapingTests.cs
+++ src/Compilers/CSharp/Test/Semantic/Semantics/RefEscapingTests.cs
@@ -260,10 +260,10 @@
     }
 ";
             CreateCompilationWithMscorlibAndSpan(text).VerifyDiagnostics(
-                // (31,30): error CS8526: Cannot use local 'sp' in this context because it may expose referenced variables outside of their declaration scope
+                // (31,30): error CS8352: Cannot use local 'sp' in this context because it may expose referenced variables outside of their declaration scope
                 //             return ref Test1(sp);
                 Diagnostic(ErrorCode.ERR_EscapeLocal, "sp").WithArguments("sp").WithLocation(31, 30),
-                // (31,24): error CS8521: Cannot use a result of 'Program.Test1(Program.S1)' in this context because it may expose variables referenced by parameter 'arg' outside of their declaration scope
+                // (31,24): error CS8347: Cannot use a result of 'Program.Test1(Program.S1)' in this context because it may expose variables referenced by parameter 'arg' outside of their declaration scope
                 //             return ref Test1(sp);
                 Diagnostic(ErrorCode.ERR_EscapeCall, "Test1(sp)").WithArguments("Program.Test1(Program.S1)", "arg").WithLocation(31, 24),
                 // (28,13): warning CS1717: Assignment made to same variable; did you mean to assign something else?
@@ -548,9 +548,9 @@

     }

-    static ref int ReturnsRef()
-    {
-        return ref ReturnsRef1(out var _ );
+    static ref int ReturnsRefTest()
+    {
+        return ref ReturnsRef1(out var _);
     }

     static ref int ReturnsRef1(out int x)
@@ -562,11 +562,57 @@
 ";
             CreateCompilationWithMscorlibAndSpan(text).VerifyDiagnostics(
                 // (12,36): error CS8156: An expression cannot be used in this context because it may not be returned by reference
-                //         return ref ReturnsRef1(out var _ );
+                //         return ref ReturnsRef1(out var _);
                 Diagnostic(ErrorCode.ERR_RefReturnLvalueExpected, "var _").WithLocation(12, 36),
                 // (12,20): error CS8347: Cannot use a result of 'Program.ReturnsRef1(out int)' in this context because it may expose variables referenced by parameter 'x' outside of their declaration scope
-                //         return ref ReturnsRef1(out var _ );
-                Diagnostic(ErrorCode.ERR_EscapeCall, "ReturnsRef1(out var _ )").WithArguments("Program.ReturnsRef1(out int)", "x").WithLocation(12, 20)
+                //         return ref ReturnsRef1(out var _);
+                Diagnostic(ErrorCode.ERR_EscapeCall, "ReturnsRef1(out var _)").WithArguments("Program.ReturnsRef1(out int)", "x").WithLocation(12, 20)
+                );
+        }
+
+        [Fact()]
+        public void OrdinaryLocalAndOutRef()
+        {
+            var text = @"
+
+class Program
+{
+    static void Main()
+    {
+
+    }
+
+    static ref int ReturnsRefTest1()
+    {
+        return ref ReturnsRef(out var z);
+    }
+
+    static ref int ReturnsRefTest2()
+    {   int z;
+        return ref ReturnsRef(out z);
+    }
+
+
+    static ref int ReturnsRef(out int x)
+    {
+        x = 42;
+        return ref x;
+    }
+}
+";
+            CreateCompilationWithMscorlibAndSpan(text).VerifyDiagnostics(
+                // (12,35): error CS8168: Cannot return local 'z' by reference because it is not a ref local
+                //         return ref ReturnsRef(out var z);
+                Diagnostic(ErrorCode.ERR_RefReturnLocal, "var z").WithArguments("z").WithLocation(12, 35),
+                // (12,20): error CS8347: Cannot use a result of 'Program.ReturnsRef(out int)' in this context because it may expose variables referenced by parameter 'x' outside of their declaration scope
+                //         return ref ReturnsRef(out var z);
+                Diagnostic(ErrorCode.ERR_EscapeCall, "ReturnsRef(out var z)").WithArguments("Program.ReturnsRef(out int)", "x").WithLocation(12, 20),
+                // (17,35): error CS8168: Cannot return local 'z' by reference because it is not a ref local
+                //         return ref ReturnsRef(out z);
+                Diagnostic(ErrorCode.ERR_RefReturnLocal, "z").WithArguments("z").WithLocation(17, 35),
+                // (17,20): error CS8347: Cannot use a result of 'Program.ReturnsRef(out int)' in this context because it may expose variables referenced by parameter 'x' outside of their declaration scope
+                //         return ref ReturnsRef(out z);
+                Diagnostic(ErrorCode.ERR_EscapeCall, "ReturnsRef(out z)").WithArguments("Program.ReturnsRef(out int)", "x").WithLocation(17, 20)
                 );
         }

@@ -603,6 +649,7 @@

     static void Test3()
     {
+        // error
         ReturnsSpan(out var _ ) = stackalloc int[1];
     }

@@ -617,9 +664,97 @@
                 // (23,13): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
                 //         s = stackalloc int[1];
                 Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
-                // (31,35): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
+                // (32,35): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
                 //         ReturnsSpan(out var _ ) = stackalloc int[1];
-                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 35)
+                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(32, 35)
+                );
+        }
+
+        [Fact()]
+        public void OrdinaryLocalAndOutSpan()
+        {
+            var text = @"
+using System;
+class Program
+{
+    static void Main()
+    {
+
+    }
+
+    static Span<int> Test1()
+    {
+        var s = ReturnsSpan(out var z);
+
+        // ok
+        return s;
+    }
+
+    static Span<int> Test2()
+    {
+        ref var r = ref ReturnsSpan(out var z);
+
+        // error
+        r = stackalloc int[1];
+
+        // ok
+        return r;
+    }
+
+    static void Test3()
+    {
+        ReturnsSpan(out var z) = stackalloc int[1];
+    }
+
+    static Span<int> Test4()
+    {
+        Span<int> s;
+        var r = ReturnsSpan(out s);
+
+        // ok
+        return r;
+    }
+
+    static Span<int> Test5()
+    {
+        Span<int> s;
+        ref var r = ref ReturnsSpan(out s);
+
+        // error
+        r = stackalloc int[1];
+
+        // ok
+        return r;
+    }
+
+    static void Test6()
+    {
+        Span<int> s;
+
+        // error
+        ReturnsSpan(out s) = stackalloc int[1];
+    }
+
+    static ref Span<int> ReturnsSpan(out Span<int> x)
+    {
+        x = default;
+        return ref x;
+    }
+}
+";
+            CreateCompilationWithMscorlibAndSpan(text).VerifyDiagnostics(
+                // (23,13): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
+                //         r = stackalloc int[1];
+                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
+                // (31,34): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
+                //         ReturnsSpan(out var z) = stackalloc int[1];
+                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 34),
+                // (49,13): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
+                //         r = stackalloc int[1];
+                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(49, 13),
+                // (60,30): error CS8353: A result of a stackalloc expression of type 'Span<int>' cannot be used in this context because it may be exposed outside of the containing method
+                //         ReturnsSpan(out s) = stackalloc int[1];
+                Diagnostic(ErrorCode.ERR_EscapeStackAlloc, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(60, 30)
                 );
         }


Revert "[ServiceManager] Register the Network service early" (bgo#648927)

This reverts commit 80e8db5aa0b32e2b3066210c9953a99e404f25a1,
because it introduced a workaround to issues of dbus-sharp,
such as [0], which are now fixed in the version we depend on
(since [1]).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648927

[0] https://github.com/mono/dbus-sharp/commit/84f2126d148b78a5310378a243fd3bc822f467b2#diff-0
[1] https://git.gnome.org/browse/banshee/commit/?id=37f949bc59099463ecb58bece17db6133816430b

--- src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
+++ src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
@@ -100,9 +100,6 @@
             RegisterService<DBusCommandService> ();
             RegisterService<BansheeDbConnection> ();
             RegisterService<Banshee.Preferences.PreferenceService> ();
-            // HACK: the next line shouldn't be here, it's needed to work around
-            // a race in NDesk DBus. See bgo#627441.
-            RegisterService<Banshee.Networking.Network> ();
             RegisterService<SourceManager> ();
             RegisterService<MediaProfileManager> ();
             RegisterService<PlayerEngineService> ();


better explanation of wtf

better explanation of wtf

--- Jil/Options.cs
+++ Jil/Options.cs
@@ -344,7 +344,17 @@
         internal SerializationNameFormat SerializationNameFormat { get; private set; }

         /// <summary>
-        /// Compatibility shim.
+        /// For compatibility with earlier Jil versions.
+        ///
+        /// Configuration for Jil serialization options.
+        ///
+        /// Available options:
+        ///   prettyPrint - whether or not to include whitespace and newlines for ease of reading
+        ///   excludeNulls - whether or not to write object members whose value is null
+        ///   jsonp - whether or not the serialized json should be valid for use with JSONP
+        ///   dateFormat - the style in which to serialize DateTimes and TimeSpans
+        ///   includeInherited - whether or not to serialize members declared by an objects base types
+        ///   unspecifiedDateTimeKindBehavior - how to treat DateTime's with a DateTimeKind of Unspecified (Jil converts all DateTimes to Utc for serialization, use DateTimeOffset to preserve time zone information)
         /// </summary>
         public Options(bool prettyPrint, bool excludeNulls, bool jsonp, DateTimeFormat dateFormat, bool includeInherited, UnspecifiedDateTimeKindBehavior unspecifiedDateTimeKindBehavior) :
             this(prettyPrint, excludeNulls, jsonp, dateFormat, includeInherited, unspecifiedDateTimeKindBehavior, SerializationNameFormat.Verbatim)


Accidentally removed the authorize attribute all together. Added it back.

--- src/Peregrine.Web/Controllers/TournamentController.cs
+++ src/Peregrine.Web/Controllers/TournamentController.cs
@@ -57,6 +57,7 @@
 		}

 		[Route]
+		[Authorize]
 		[TournamentAuthorize]
 		public IHttpActionResult Delete(Guid tournamentKey)
 		{


2 Opdrachten veranderd.

2 Opdrachten veranderd.

--- ExpoDraw/Assets/Scripts/GameManager.cs
+++ ExpoDraw/Assets/Scripts/GameManager.cs
@@ -268,7 +268,7 @@
         newColor.Add(Color.red);
         newColor.Add(Color.white);

-        Opdrachten.Add(new Opdracht("Tekenen op inspiratie", "De inspiratie van dit schilderij kwam van het stratenpatroon in New York en van de swingende jazzmuziek van die tijd. Teken jouw variant met de verkregen inspiratie.", newInts, newBrush, newColor));
+        Opdrachten.Add(new Opdracht("Tekenen op inspiratie", "De inspiratie van dit schilderij kwam van het stratenpatroon in New York en van de swingende jazzmuziek van die tijd. Teken jouw stratenpatroon waar je woont met de verkregen inspiratie.", newInts, newBrush, newColor));

         newInts = new List<int>();
         newBrush = new List<Texture>();
@@ -302,7 +302,7 @@
         newColor.Add(Color.red);
         newColor.Add(Color.blue);

-        Opdrachten.Add(new Opdracht("Wat zie jij?", "Mondriaan is een schilder die vooral abstracte kunstwerken maakt. Ook dit is weer een abstract kunstwerk. Teken wat jij ziet in dit kunstwerk met de kleuren die ook in dit kunstwerk verwerkt zijn.", newInts, newBrush, newColor));
+        Opdrachten.Add(new Opdracht("Wat zie jij?", "Mondriaan is een schilder die vooral abstracte kunstwerken maakt. Ook dit is weer een abstract kunstwerk. Teken je hobby met de kleuren die ook in dit kunstwerk verwerkt zijn.", newInts, newBrush, newColor));

         Painting boogie = new Painting("Broadway Boogie Woogie", Opdrachten);
         paintings.Add(boogie);


(#0) Moving properties to above ctor

(#0) Moving properties to above ctor

--- src/RawRabbit/Configuration/RawRabbitConfiguration.cs
+++ src/RawRabbit/Configuration/RawRabbitConfiguration.cs
@@ -70,6 +70,13 @@
 		/// Used for configure Ssl connection to the broker(s).
 		/// </summary>
 		public SslOption Ssl { get; set; }
+
+		public string VirtualHost { get; set; }
+		public string Username { get; set; }
+		public string Password { get; set; }
+		public int Port { get; set; }
+		public List<string> Hostnames { get; set; }
+		public TimeSpan RecoveryInterval { get; set; }

 		public RawRabbitConfiguration()
 		{
@@ -106,12 +113,7 @@
 			Port = 5672,
 			Hostnames = new List<string> { "localhost" }
 		};
-		public string VirtualHost { get; set; }
-		public string Username { get; set; }
-		public string Password { get; set; }
-		public int Port { get; set; }
-		public List<string> Hostnames { get; set; }
-		public TimeSpan RecoveryInterval { get; set; }
+
 	}

 	public class GeneralQueueConfiguration


fix(BaseAnimation): EasngIn and EasingOut was protected

--- src/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs
+++ src/Rg.Plugins.Popup/Animations/Base/BaseAnimation.cs
@@ -17,10 +17,10 @@
         public uint DurationOut { get; set; } = DefaultDuration;

         [TypeConverter(typeof(EasingTypeConverter))]
-        public Easing EasingIn { get; protected set; } = Easing.Linear;
+        public Easing EasingIn { get; set; } = Easing.Linear;

         [TypeConverter(typeof(EasingTypeConverter))]
-        public Easing EasingOut { get; protected set; } = Easing.Linear;
+        public Easing EasingOut { get; set; } = Easing.Linear;

         public abstract void Preparing(View content, PopupPage page);


Tweaks

Tweaks

--- src/Scrutor/ServiceCollectionExtensions.Decoration.cs
+++ src/Scrutor/ServiceCollectionExtensions.Decoration.cs
@@ -156,7 +156,7 @@
             return services;
         }

-        private static List<ServiceDescriptor> GetDescriptors(this IServiceCollection services, Type serviceType)
+        private static IEnumerable<ServiceDescriptor> GetDescriptors(this IServiceCollection services, Type serviceType)
         {
             var descriptors = new List<ServiceDescriptor>();


Updated EventStore appsettings.

Updated EventStore appsettings.

I have prefixed the settings for the EventStoreFeature to match the
convention from ServiceStack.IntroSpec.

--- src/ServiceStack.EventStore/Main/EventStoreFeature.cs
+++ src/ServiceStack.EventStore/Main/EventStoreFeature.cs
@@ -87,10 +87,10 @@
         {
             var connectionSettings = new EventStoreConnectionSettings();

-            connectionSettings.TcpEndpoint(appSettings.GetString("EventStore.TcpEndPoint"));
-            connectionSettings.HttpEndpoint(appSettings.GetString("EventStore.HttpEndPoint"));
-            connectionSettings.UserName(appSettings.GetString("EventStore.UserName"));
-            connectionSettings.Password(appSettings.GetString("EventStore.Password"));
+            connectionSettings.TcpEndpoint(appSettings.GetString("ServiceStack.Plugins.EventStore.TcpEndPoint"));
+            connectionSettings.HttpEndpoint(appSettings.GetString("ServiceStack.Plugins.EventStore.HttpEndPoint"));
+            connectionSettings.UserName(appSettings.GetString("ServiceStack.Plugins.EventStore.UserName"));
+            connectionSettings.Password(appSettings.GetString("ServiceStack.Plugins.EventStore.Password"));

             return connectionSettings;
         }


some stats refactoring...lot more to do

some stats refactoring...lot more to do

--- src/Siotrix.Discord.Statistics/Modules/StatsModule.cs
+++ src/Siotrix.Discord.Statistics/Modules/StatsModule.cs
@@ -20,130 +20,90 @@
             //  Console.WriteLine(info.Summary);
         }

-        private string GetAuthorIconUrl()
-        {
-            string iconurl = null;
-            using (var db = new LogDatabase())
-            {
-                try
-                {
-                    iconurl = db.Authors.First().AuthorIcon;
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                }
+        private async Task<string> GetGuildIconUrl(int id)
+        {
+            string iconurl;
+
+            if (id == 2)
+            {
+                var val = await Context.GetGuildIconUrlAsync();
+                iconurl = val.Avatar;
+            }
+            else
+            {
+                var val = await SiotrixEmbedAuthorExtensions.GetSiotrixAuthorAsync();
+                iconurl = val.AuthorIcon;
             }
             return iconurl;
         }

-        private string GetGuildIconUrl(int id)
-        {
-            var guildId = Context.Guild.Id;
-            string iconurl = null;
-            using (var db = new LogDatabase())
-            {
-                try
-                {
-                    var val = db.Gavatars.Where(p => p.GuildId == guildId.ToLong());
-                    if (val == null || val.ToList().Count <= 0 || id == 2)
-                        iconurl = db.Authors.First().AuthorIcon;
-                    else
-                        iconurl = val.First().Avatar;
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                }
-            }
-            return iconurl;
-        }
-
-        private string GetGuildName(int id)
-        {
-            var guildId = Context.Guild.Id;
-            string name = null;
-            using (var db = new LogDatabase())
-            {
-                try
-                {
-                    if (id == 0 || id == 1)
-                    {
-                        var val = db.Gnames.Where(p => p.GuildId == guildId.ToLong());
-                        if (val == null || val.ToList().Count <= 0)
-                            name = Context.Guild.Name;
-                        else
-                            name = val.First().GuildName;
-                    }
-                    else
-                    {
-                        name = db.Authors.First().AuthorName;
-                    }
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                }
-            }
+        private async Task<string> GetGuildName(int id)
+        {
+            string name;
+
+            if (id == 2)
+            {
+                var val = await SiotrixEmbedAuthorExtensions.GetSiotrixAuthorAsync();
+                name = val.AuthorName;
+            }
+            else
+            {
+                var val = await Context.GetGuildNameAsync();
+                name = val.GuildName;
+            }
+
             return name;
         }

-        private string GetGuildUrl(int id)
-        {
-            var guildId = Context.Guild.Id;
+        private async Task<string> GetGuildUrl(int id)
+        {
             string url = null;
-            using (var db = new LogDatabase())
-            {
-                try
-                {
-                    var val = db.Gwebsiteurls.Where(p => p.GuildId == guildId.ToLong());
-                    if (val == null || val.ToList().Count <= 0 || id == 2)
-                        url = db.Authors.First().AuthorUrl;
-                    else
-                        url = val.First().SiteUrl;
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                }
-            }
+
+            if (id == 2)
+            {
+                var val = await SiotrixEmbedAuthorExtensions.GetSiotrixAuthorAsync();
+                url = val.AuthorUrl;
+            }
+            else
+            {
+                var val = await Context.GetGuildUrlAsync();
+                url = val.SiteUrl;
+            }
             return url;
         }

-        private string[] GetGuildFooter(int id)
-        {
-            var guildId = Context.Guild.Id;
-            var footer = new string[2];
-            using (var db = new LogDatabase())
-            {
-                try
-                {
-                    if (id == 2)
-                    {
-                        footer[0] = db.Bfooters.First().FooterIcon;
-                        footer[1] = db.Bfooters.First().FooterText;
-                    }
-                    else
-                    {
-                        var val = db.Gfooters.Where(p => p.GuildId == guildId.ToLong());
-                        if (val == null || val.ToList().Count <= 0)
-                        {
-                            footer[0] = db.Bfooters.First().FooterIcon;
-                            footer[1] = db.Bfooters.First().FooterText;
-                        }
-                        else
-                        {
-                            footer[0] = val.First().FooterIcon;
-                            footer[1] = val.First().FooterText;
-                        }
-                    }
-                }
-                catch (Exception e)
-                {
-                    Console.WriteLine(e);
-                }
-            }
-            return footer;
+        private async Task<string> GetGuildFooterIcon(int id)
+        {
+            string footerIcon;
+
+            if (id == 2)
+            {
+                var val = await SiotrixEmbedFooterExtensions.GetSiotrixFooterAsync();
+                footerIcon = val.FooterIcon;
+            }
+            else
+            {
+                var val = await Context.GetGuildFooterAsync();
+                footerIcon = val.FooterIcon;
+            }
+            return footerIcon;
+        }
+
+        private async Task<string> GetGuildFooterText(int id)
+        {
+            string footerText;
+
+            if (id == 2)
+            {
+                var val = await SiotrixEmbedFooterExtensions.GetSiotrixFooterAsync();
+                footerText = val.FooterText;
+            }
+            else
+            {
+                var val = await Context.GetGuildFooterAsync();
+                footerText = val.FooterText;
+            }
+            return footerText;
         }

         private string GetUptime()
@@ -878,12 +838,13 @@
         [MinPermissions(AccessLevel.User)]
         public async Task StatsAsync()
         {
-            var gIconUrl = GetGuildIconUrl(0);
-            var gName = GetGuildName(0);
-            var gUrl = GetGuildUrl(0);
+            var gIconUrl = await GetGuildIconUrl(0);
+            var gName = await GetGuildName(0);
+            var gUrl = await GetGuildUrl(0);
             var gColor = await Context.GetGuildColorAsync();
             var gThumbnail = await Context.GetGuildThumbNailAsync();
-            var gFooter = GetGuildFooter(0);
+            var gFooterIcon = await GetGuildFooterIcon(0);
+            var gFooterText = await GetGuildFooterText(0);
             var gPrefix = await Context.GetGuildPrefixAsync();
             var mCount = GetLifeTimeMessagesPerGuild();
             var activeChannel = "None";
@@ -907,8 +868,8 @@
                 .WithTitle("Statistical Information sheet for " + gName)
                 .WithThumbnailUrl(gThumbnail.ThumbNail)
                 .WithFooter(new EmbedFooterBuilder()
-                    .WithIconUrl(gFooter[0])
-                    .WithText(gFooter[1]))
+                    .WithIconUrl(gFooterIcon)
+                    .WithText(gFooterText))
                 .WithTimestamp(DateTime.UtcNow);
             builder
                 .AddField(new EmbedFieldBuilder
@@ -984,12 +945,13 @@
                 id = 1;
             else
                 id = 2;
-            var gIconUrl = GetGuildIconUrl(id);
-            var gName = GetGuildName(id);
-            var gUrl = GetGuildUrl(id);
+            var gIconUrl = await GetGuildIconUrl(id);
+            var gName = await GetGuildName(id);
+            var gUrl = await GetGuildUrl(id);
             var gColor = await Context.GetGuildColorAsync();
-            var gThumbnail = Context.GetGuildThumbNailAsync();
-            var gFooter = GetGuildFooter(id);
+            var gThumbnail = await Context.GetGuildThumbNailAsync();
+            var gFooterIcon = await GetGuildFooterIcon(id);
+            var gFooterText = await GetGuildFooterText(id);
             var gPrefix = await Context.GetGuildPrefixAsync();
             var mCount = GetLifeTimeMessagesPerUser(person);
             var mStatsCount = GetStatsMessagesPerUser(person);
@@ -1020,8 +982,8 @@
                     .WithUrl(gUrl))
                 .WithColor(GuildEmbedColorExtensions.ConvertStringtoColorObject(gColor.ColorHex))
                 .WithFooter(new EmbedFooterBuilder()
-                    .WithIconUrl(gFooter[0])
-                    .WithText(gFooter[1]))
+                    .WithIconUrl(gFooterIcon)
+                    .WithText(gFooterText))
                 .WithTimestamp(DateTime.UtcNow);
             if (id == 1)
             {


Hide Copy file path where not available

Hide Copy file path where not available

--- src/StructuredLogViewer/Controls/BuildControl.xaml.cs
+++ src/StructuredLogViewer/Controls/BuildControl.xaml.cs
@@ -695,7 +695,9 @@
             viewSourceItem.Visibility = CanView(node) ? Visibility.Visible : Visibility.Collapsed;
             viewFullTextItem.Visibility = HasFullText(node) ? Visibility.Visible : Visibility.Collapsed;
             openFileItem.Visibility = CanOpenFile(node) ? Visibility.Visible : Visibility.Collapsed;
-            copyFilePathItem.Visibility = node is IHasSourceFile ? Visibility.Visible : Visibility.Collapsed;
+            copyFilePathItem.Visibility = node is Import || (node is IHasSourceFile file && !string.IsNullOrEmpty(file.SourceFilePath))
+                ? Visibility.Visible
+                : Visibility.Collapsed;
             var hasChildren = node is TreeNode t && t.HasChildren;
             copySubtreeItem.Visibility = hasChildren ? Visibility.Visible : Visibility.Collapsed;
             viewSubtreeTextItem.Visibility = copySubtreeItem.Visibility;


aded test case for empty model id

aded test case for empty model id

--- cs/unittest/TestModelLoading.cs
+++ cs/unittest/TestModelLoading.cs
@@ -100,6 +100,23 @@

         [TestMethod]
         [TestCategory("Model Loading")]
+        public void TestEmptyID()
+        {
+            using (var vw = new VowpalWabbit("-l 1"))
+            {
+                Assert.AreEqual(string.Empty, vw.ID);
+
+                vw.SaveModel("model");
+            }
+
+            using (var vw = new VowpalWabbit("-f model"))
+            {
+                Assert.AreEqual(string.Empty, vw.ID);
+            }
+        }
+
+        [TestMethod]
+        [TestCategory("Model Loading")]
         public void TestReload()
         {
             using (var vw = new VowpalWabbit(""))


bugfix: R# with ShadowCopy enabled will give errors

--- csharp/WorkerTest/WorkerTest.cs
+++ csharp/WorkerTest/WorkerTest.cs
@@ -121,7 +121,7 @@
             tcpListener.Start();
             int port = (tcpListener.LocalEndpoint as IPEndPoint).Port;

-            string exeLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".";
+            var exeLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".";

             worker = new Process
             {


Fix up code now that Range uses longs.

Fix up code now that Range uses longs.

Will need to revisit at some point if Range should be int or long.

--- src/System.Numerics.Tensors/System/Numerics/Tensor.cs
+++ src/System.Numerics.Tensors/System/Numerics/Tensor.cs
@@ -1470,15 +1470,15 @@
                         throw new ArgumentOutOfRangeException($"The Range at position '{i}' targets values outside of the Dimension '{currentDimension}' at that position. The Range.Index value is '{range.Index}'. The Range.Length value is '{range.Length}'.", nameof(ranges));
                     }

-                    offset += range.Index * strides[i];
-                }
-
-                // only create a new dimension if the range requires it
-                if (range.Length > 1)
-                {
-                    newDimensions[newDimensionCount] = range.Length;
-                    newStrides[newDimensionCount] = strides[i];  // strides cannot change since the backing memory must stay the same.
-                    newDimensionCount++;
+                    offset += (int)(range.Index * strides[i]);
+
+                    // only create a new dimension if the range requires it
+                    if (range.Length > 1)
+                    {
+                        newDimensions[newDimensionCount] = (int)range.Length;
+                        newStrides[newDimensionCount] = strides[i];  // strides cannot change since the backing memory must stay the same.
+                        newDimensionCount++;
+                    }
                 }
             }


Fix missing TaskName

Fix missing TaskName

--- src/TraceEvent/Computers/StartStopActivityComputer.cs
+++ src/TraceEvent/Computers/StartStopActivityComputer.cs
@@ -1096,6 +1096,7 @@
             {
                 var sb = Utilities.StringBuilderCache.Acquire(64);

+                sb.Append(TaskName);
                 sb.Append('(');
                 AppendActivityPath(sb, ActivityID);


Update FtpClient_LowLevel.cs

Update FtpClient_LowLevel.cs

--- FluentFTP/Client/FtpClient_LowLevel.cs
+++ FluentFTP/Client/FtpClient_LowLevel.cs
@@ -147,7 +147,7 @@
 			if (!(reply = Execute(command)).Success) {
 				stream.Close();
 				if(command.StartsWith("NLST ") && reply.Code=="550" && reply.Message== "No files found.") {
-					//workaround for ftpd which response "550 No files found" when folder exists but is empty
+					//workaround for ftpd which responses "550 No files found." when folder exists but is empty
 				}
 				else {
 					throw new FtpCommandException(reply);


Remove the use of forced GC in production code

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/588288

--- src/VisualStudio/Core/Def/Implementation/GCManager.cs
+++ src/VisualStudio/Core/Def/Implementation/GCManager.cs
@@ -1,6 +1,5 @@
 // Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

-using System;
 using System.Runtime;
 using System.Threading.Tasks;
 using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
@@ -57,28 +56,8 @@
         /// </summary>
         internal static void TurnOffLowLatencyMode()
         {
-            if (s_delayMilliseconds <= 0)
-            {
-                // if it is already turned off, we don't do anything.
-                return;
-            }
-
-            // first set delay to 0 to turn it off
+            // set delay to 0 to turn off the use of sustained low latency
             s_delayMilliseconds = 0;
-
-            // explictly call Full GC to remove impact of SustainedLowLatency
-            // this is based on finding on https://github.com/dotnet/roslyn/issues/6802
-            // one of reason we do this here is so that GC do compact on fragmented memory.
-            // which will in return let us have bigger continuous free memory chunk.
-            //
-            // we do this 5 times to make sure we release all pending memories. something
-            // most of our tests do. previous collect can put objects in finalizer and running
-            // finalizer can release even more memory so we repeat this 5 times.
-            for (var i = 0; i < 5; i++)
-            {
-                GC.Collect();
-                GC.WaitForPendingFinalizers();
-            }
         }

         /// <summary>
@@ -116,14 +95,10 @@
             }
         }

-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.GC.Collect", Justification = "We are using GCCollectionMode.Optimized and this is called on a threadpool thread.")]
         private static void RestoreGCLatencyMode(GCLatencyMode originalMode)
         {
             GCSettings.LatencyMode = originalMode;
             s_delay = null;
-
-            // hint to the GC that if it postponed a gen 2 collection, now might be a good time to do it.
-            GC.Collect(2, GCCollectionMode.Optimized);
         }
     }
 }


Update HttpClientExtension.cs

Update HttpClientExtension.cs

--- src/WeihanLi.Common/Extensions/HttpClientExtension.cs
+++ src/WeihanLi.Common/Extensions/HttpClientExtension.cs
@@ -124,7 +124,6 @@
         };
         requestAction?.Invoke(requestMessage);
         using var response = await httpClient.SendAsync(requestMessage, cancellationToken);
-        response.EnsureSuccessStatusCode();
 #if NET6_0_OR_GREATER
         var responseText = await response.Content.ReadAsStringAsync(cancellationToken);
 #else


refactor(dialogNodeOutput):change dialogNodeOutput to dyanamic

--- src/IBM.WatsonDeveloperCloud.Conversation.v1/Model/DialogNode.cs
+++ src/IBM.WatsonDeveloperCloud.Conversation.v1/Model/DialogNode.cs
@@ -318,7 +318,7 @@
         /// [documentation](https://console.bluemix.net/docs/services/conversation/dialog-overview.html#complex).
         /// </value>
         [JsonProperty("output", NullValueHandling = NullValueHandling.Ignore)]
-        public DialogNodeOutput Output { get; set; }
+        public dynamic Output { get; set; }
         /// <summary>
         /// The context (if defined) for the dialog node.
         /// </summary>


Translate X.class to typeof(X)

Translate X.class to typeof(X)

--- runtime/CSharp/Antlr4.Runtime.Test/TestPerformance.cs
+++ runtime/CSharp/Antlr4.Runtime.Test/TestPerformance.cs
@@ -234,7 +234,7 @@
                 try {
                     Thread.sleep(4000);
                 } catch (InterruptedException ex) {
-                    Logger.getLogger(TestPerformance.class.getName()).log(Level.SEVERE, null, ex);
+                    Logger.getLogger(typeof(TestPerformance).getName()).log(Level.SEVERE, null, ex);
                 }
             }
         }
@@ -272,7 +272,7 @@
             builder.append(newline);

             builder.append("Op=Lex").append(RUN_PARSER ? "+Parse" : " only");
-            builder.append(", Strategy=").append(BAIL_ON_ERROR ? BailErrorStrategy.class.getSimpleName() : DefaultErrorStrategy.class.getSimpleName());
+            builder.append(", Strategy=").append(BAIL_ON_ERROR ? typeof(BailErrorStrategy).getSimpleName() : typeof(DefaultErrorStrategy).getSimpleName());
             builder.append(", BuildParseTree=").append(BUILD_PARSE_TREES);
             builder.append(", WalkBlankListener=").append(BLANK_LISTENER);

@@ -379,7 +379,7 @@
                 try {
                     value = future.get();
                 } catch (ExecutionException ex) {
-                    Logger.getLogger(TestPerformance.class.getName()).log(Level.SEVERE, null, ex);
+                    Logger.getLogger(typeof(TestPerformance).getName()).log(Level.SEVERE, null, ex);
                 }

                 if (COMPUTE_CHECKSUM) {
@@ -593,12 +593,12 @@
         protected ParserFactory getParserFactory(String lexerName, String parserName, String listenerName, final String entryPoint) {
             try {
                 ClassLoader loader = new URLClassLoader(new URL[] { new File(tmpdir).toURI().toURL() }, ClassLoader.getSystemClassLoader());
-                Class<? extends Lexer> lexerClass = loader.loadClass(lexerName).asSubclass(Lexer.class);
-                Class<? extends Parser> parserClass = loader.loadClass(parserName).asSubclass(Parser.class);
-                Class<? extends ParseTreeListener> listenerClass = (Class<? extends ParseTreeListener>)loader.loadClass(listenerName).asSubclass(ParseTreeListener.class);
-
-                Constructor<? extends Lexer> lexerCtor = lexerClass.getConstructor(CharStream.class);
-                Constructor<? extends Parser> parserCtor = parserClass.getConstructor(TokenStream.class);
+                Class<? extends Lexer> lexerClass = loader.loadClass(lexerName).asSubclass(typeof(Lexer));
+                Class<? extends Parser> parserClass = loader.loadClass(parserName).asSubclass(typeof(Parser));
+                Class<? extends ParseTreeListener> listenerClass = (Class<? extends ParseTreeListener>)loader.loadClass(listenerName).asSubclass(typeof(ParseTreeListener));
+
+                Constructor<? extends Lexer> lexerCtor = lexerClass.getConstructor(typeof(CharStream));
+                Constructor<? extends Parser> parserCtor = parserClass.getConstructor(typeof(TokenStream));

                 // construct initial instances of the lexer and parser to deserialize their ATNs
                 TokenSource tokenSource = lexerCtor.newInstance(new ANTLRInputStream(""));
@@ -771,7 +771,7 @@
                                 }
                             }

-                            assertThat(parseResult, instanceOf(ParseTree.class));
+                            assertThat(parseResult, instanceOf(typeof(ParseTree)));
                             if (BUILD_PARSE_TREES && BLANK_LISTENER) {
                                 ParseTreeWalker.DEFAULT.walk(listener, (ParserRuleContext)parseResult);
                             }


Index tags on content items

Index tags on content items

--HG--
branch : dev

--- src/Orchard.Web/Modules/Orchard.Tags/Handlers/TagsPartHandler.cs
+++ src/Orchard.Web/Modules/Orchard.Tags/Handlers/TagsPartHandler.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Linq;
 using JetBrains.Annotations;
 using Orchard.ContentManagement;
@@ -46,6 +47,9 @@
                 }

             });
+
+            OnIndexing<TagsPart>((context, tagsPart) => context.DocumentIndex
+                                                    .Add("tags", String.Join(", ", tagsPart.CurrentTags.Select(t => t.TagName))).Analyze());
         }
     }
 }


Removed extra semi colon

Removed extra semi colon

--HG--
branch : dev

--- src/Orchard.Web/Modules/Orchard.Widgets/Views/Admin/Index.cshtml
+++ src/Orchard.Web/Modules/Orchard.Widgets/Views/Admin/Index.cshtml
@@ -1,4 +1,4 @@
-@model WidgetsIndexViewModel;
+@model WidgetsIndexViewModel
 @using Orchard.Widgets.Models;
 @using Orchard.Widgets.ViewModels;
 @{ Style.Require("WidgetsAdmin"); }


Fixing vertical alignment of publish button.

--- src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Edit.cshtml
+++ src/Orchard.Web/Modules/Orchard.Widgets/Views/Widget.Edit.cshtml
@@ -2,7 +2,7 @@

         @Display(Model.Content)

-

+

         @Display(Model.Sidebar)


Disable the old parser for now.

Disable the old parser for now.

--- HtmlConsole/HtmlConsolePresentation.cs
+++ HtmlConsole/HtmlConsolePresentation.cs
@@ -10,346 +10,346 @@

 namespace HtmlConsole
 {
-    public class BlockWriter
-    {
-        private readonly StringWriter writer = new StringWriter();
-        private int currentLineLength = 0;
-
-        public char LastCharacter { get; private set; } = '\0';
-        public int BlockWidth { get; }
-        public bool ForceWrapping { get; }
-
-        public BlockWriter(int blockWidth, bool forceWrapping = true)
-        {
-            BlockWidth = blockWidth;
-            ForceWrapping = ForceWrapping;
-        }
-
-        public void Write(string str)
-        {
-            int currentLineLegth = 0;
-            foreach (var c in str)
-            {
-                if (c == '\r' || c == '\n')
-                {
-                    currentLineLegth = 0;
-                }
-
-                if (ForceWrapping && currentLineLegth > BlockWidth)
-                {
-                    writer.Write(Environment.NewLine);
-                    currentLineLegth = 0;
-                }
-
-                writer.Write(c);
-                LastCharacter = c;
-                currentLineLegth++;
-            }
-        }
-
-        public bool LastCharIsWhiteSpace() => char.IsWhiteSpace(LastCharacter);
-
-        public string GetString() => writer.GetStringBuilder().ToString();
-    }
-
-    public class PathSegment
-    {
-        public string Element { get; set; }
-        public List<string> Classes { get; set; }
-        public string Id { get; set; }
-        public int Index { get; set; }
-
-        public override string ToString()
-        {
-            return $"{Element}#{Id}{string.Join("", Classes.Select(p => $".{p}"))}[{Index}]";
-        }
-    }
-
-    public class HtmlConsolePresentation : IConsolePresentation
-    {
-        private class TableStackEntry
-        {
-            public List<TableRow> Rows { get; } = new List<TableRow>();
-        }
-
-        private class TableRow
-        {
-            public XmlElement RowElement { get; set; }
-            public List<XmlElement> CellElements { get; } = new List<XmlElement>();
-        }
+    //public class BlockWriter
+    //{
+    //    private readonly StringWriter writer = new StringWriter();
+    //    private int currentLineLength = 0;
+
+    //    public char LastCharacter { get; private set; } = '\0';
+    //    public int BlockWidth { get; }
+    //    public bool ForceWrapping { get; }
+
+    //    public BlockWriter(int blockWidth, bool forceWrapping = true)
+    //    {
+    //        BlockWidth = blockWidth;
+    //        ForceWrapping = ForceWrapping;
+    //    }
+
+    //    public void Write(string str)
+    //    {
+    //        int currentLineLegth = 0;
+    //        foreach (var c in str)
+    //        {
+    //            if (c == '\r' || c == '\n')
+    //            {
+    //                currentLineLegth = 0;
+    //            }
+
+    //            if (ForceWrapping && currentLineLegth > BlockWidth)
+    //            {
+    //                writer.Write(Environment.NewLine);
+    //                currentLineLegth = 0;
+    //            }
+
+    //            writer.Write(c);
+    //            LastCharacter = c;
+    //            currentLineLegth++;
+    //        }
+    //    }
+
+    //    public bool LastCharIsWhiteSpace() => char.IsWhiteSpace(LastCharacter);
+
+    //    public string GetString() => writer.GetStringBuilder().ToString();
+    //}
+
+    //public class PathSegment
+    //{
+    //    public string Element { get; set; }
+    //    public List<string> Classes { get; set; }
+    //    public string Id { get; set; }
+    //    public int Index { get; set; }
+
+    //    public override string ToString()
+    //    {
+    //        return $"{Element}#{Id}{string.Join("", Classes.Select(p => $".{p}"))}[{Index}]";
+    //    }
+    //}
+
+    //public class HtmlConsolePresentation : IConsolePresentation
+    //{
+    //    private class TableStackEntry
+    //    {
+    //        public List<TableRow> Rows { get; } = new List<TableRow>();
+    //    }
+
+    //    private class TableRow
+    //    {
+    //        public XmlElement RowElement { get; set; }
+    //        public List<XmlElement> CellElements { get; } = new List<XmlElement>();
+    //    }

-        private Stylesheet stylesheet;
-        private IConsoleWriter writer;
-
-        private char lastCharacter = '\0';
-        private readonly Stack<TableStackEntry> tableStack = new Stack<TableStackEntry>();
-        private readonly Stack<BlockWriter> blockWriterStack = new Stack<BlockWriter>();
-        private readonly Stack<PathSegment> pathSegmentStack = new Stack<PathSegment>();
-
-        private BlockWriter CurrentBlockWriter => blockWriterStack.Peek();
-
-        public HtmlConsolePresentation(Stylesheet stylesheet, IConsoleWriter writer)
-        {
-            this.stylesheet = stylesheet;
-            this.writer = writer;
-        }
-
-        public virtual string ReadLine()
-        {
-            return System.Console.ReadLine();
-        }
-
-        public void WriteLine(string line)
-        {
-            Write($"{line}
");
-        }
-
-        public void Write(string str)
-        {
-            HtmlDocument doc = new HtmlDocument();
-            doc.LoadHtml($"<message>{str}</message>");
-
-            // The top level block is not wrapped (the console software will take care of that).
-            //blockWriterStack.Push(new BlockWriter(GetConsoleWidth(), false));
-
-            // Parse
-            var root = TagNode.ParseNode(doc.DocumentNode);
-
-            // Calculate styles
-
-            // Measure
-
-            // Arrange
-
-            //ParseElement(doc.DocumentElement);
-
-            /*Assert.AreEqual(0, pathSegmentStack.Count);
-            Assert.AreEqual(1, blockWriterStack.Count);*/
-
-            //WriteToOutputCore(CurrentBlockWriter.GetString());
-
-            blockWriterStack.Pop();
-        }
-
-        /*private void ParseElement(XmlElement element)
-        {
-            var localName = element.LocalName.ToLowerInvariant();
-
-            var classAttribute = element.Attributes
-                .OfType<XmlAttribute>()
-                .Where(p => p.LocalName == "class")
-                .Select(p => p.InnerText.ToLower())
-                .SingleOrDefault(p => Regex.IsMatch(p, "^-?[_a-z]+[_a-z0-9-]*$")); // http://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors
-
-            var idAttribute = element.Attributes
-                .OfType<XmlAttribute>()
-                .Where(p => p.LocalName == "id")
-                .Select(p => p.InnerText.ToLower())
-                .SingleOrDefault(p => Regex.IsMatch(p, "^[^ #.]+$"));
-
-            pathSegmentStack.Push(new PathSegment
-            {
-                Element = localName,
-                Index = element.ParentNode?.ChildNodes.OfType<XmlNode>().TakeWhile(p => p != element).Count() ?? 0,
-                Id = idAttribute?.ToLower(),
-                Classes = (classAttribute ?? "").ToLower().Split(' ').ToList()
-            });
-
-            var matchingStyles = stylesheet.GetMatchingDeclarations(pathSegmentStack);
-
-            var styleAttribute = element.Attributes
-                .OfType<XmlAttribute>()
-                .Where(p => p.LocalName == "style")
-                .Select(p => p.InnerText)
-                .SingleOrDefault();
-
-            if (styleAttribute != null)
-            {
-                var inlineStyles = Stylesheet.ParseBlock(styleAttribute);
-                matchingStyles.MergeAnotherBlockOver(inlineStyles.ToDictionary(p => p.Property, p => p));
-            }
-
-            Display display;
-            if (matchingStyles.ContainsKey("display") && matchingStyles["display"].Value == "block")
-            {
-                display = Display.Block;
-
-                int blockWidth = CurrentBlockWriter.BlockWidth;
-
-                blockWriterStack.Push(new BlockWriter(CurrentBlockWriter.BlockWidth));
-            }
-            else
-            {
-                display = Display.Inline;
-            }
-
-            var previousBackgroundColor = GetBackgroundColor();
-            if (matchingStyles.ContainsKey("background-color"))
-            {
-                //this.SetBackgroundColor(this.StyleColorToConsoleColor(matchingStyles["background-color"].Value));
-            }
-
-            var previousForegroundColor = GetForegroundColor();
-            if (matchingStyles.ContainsKey("color"))
-            {
-                //this.SetForegroundColor(this.StyleColorToConsoleColor(matchingStyles["color"].Value));
-            }
-
-            if (localName == "br")
-            {
-                CurrentBlockWriter.Write(Environment.NewLine);
-            }
-
-            if (localName == "table")
-            {
-                var tableStackEntry = new TableStackEntry();
-                tableStack.Push(tableStackEntry);
-            }
-
-            if (localName == "pre")
-            {
-                CurrentBlockWriter.Write(element.InnerXml);
-            }
-            else
-            {
-                foreach (var childNode in element.ChildNodes)
-                {
-                    if (childNode is XmlText)
-                    {
-                        var innerText = (childNode as XmlText).InnerText;
-
-                        // Collapse white space
-                        innerText = Regex.Replace(innerText, @"\s+", " ");
-
-                        if (blockWriterStack.Peek().LastCharIsWhiteSpace())
-                        {
-                            innerText = innerText.TrimStart();
-                        }
-
-                        CurrentBlockWriter.Write(innerText);
-                    }
-                    else if (childNode is XmlWhitespace)
-                    {
-                        if (!CurrentBlockWriter.LastCharIsWhiteSpace())
-                        {
-                            CurrentBlockWriter.Write(" ");
-                        }
-                    }
-                    else if (childNode is XmlElement)
-                    {
-                        var xmlElement = childNode as XmlElement;
-                        var childLocalName = xmlElement.LocalName.ToLowerInvariant();
-
-                        if (childLocalName == "tr")
-                        {
-                            if (tableStack.Any())
-                            {
-                                tableStack.Peek().Rows.Add(new TableRow {RowElement = xmlElement});
-                            }
-
-                            //this.ParseElement(xmlElement);
-                        }
-                        else if (childLocalName == "td" || childLocalName == "th")
-                        {
-                            if (tableStack.Any() && tableStack.Peek().Rows.Any())
-                            {
-                                tableStack.Peek().Rows.Last().CellElements.Add(xmlElement);
-                            }
-
-                            //this.ParseElement(xmlElement);
-                        }
-                        else
-                        {
-                            ParseElement(xmlElement);
-                        }
-
-                    }
-                }
-            }
-
-            if(localName == "table")
-            {
-                var tableStackEntry = tableStack.Pop();
-                RenderTable(tableStackEntry);
-            }
-
-            else if (localName == "h1")
-            {
-                CurrentBlockWriter.Write($"{Environment.NewLine}====================");
-            }
-            else if (localName == "h2")
-            {
-                CurrentBlockWriter.Write($"{Environment.NewLine}--------------------");
-            }
-
-            if (display == Display.Block)
-            {
-                var blockWriter = blockWriterStack.Pop();
-
-                CurrentBlockWriter.Write(Environment.NewLine);
-                CurrentBlockWriter.Write(blockWriter.GetString());
-                CurrentBlockWriter.Write(Environment.NewLine);
-            }
-
-
-            if (GetBackgroundColor() != previousBackgroundColor)
-            {
-                SetBackgroundColor(previousBackgroundColor);
-            }
-
-            if (GetForegroundColor() != previousForegroundColor)
-            {
-                SetForegroundColor(previousForegroundColor);
-            }
-
-            pathSegmentStack.Pop();
-        }
-
-        private void RenderTable(TableStackEntry tableStackEntry)
-        {
-
-
-
-            throw new NotImplementedException();
-        }
+    //    private Stylesheet stylesheet;
+    //    private IConsoleWriter writer;
+
+    //    private char lastCharacter = '\0';
+    //    private readonly Stack<TableStackEntry> tableStack = new Stack<TableStackEntry>();
+    //    private readonly Stack<BlockWriter> blockWriterStack = new Stack<BlockWriter>();
+    //    private readonly Stack<PathSegment> pathSegmentStack = new Stack<PathSegment>();
+
+    //    private BlockWriter CurrentBlockWriter => blockWriterStack.Peek();
+
+    //    public HtmlConsolePresentation(Stylesheet stylesheet, IConsoleWriter writer)
+    //    {
+    //        this.stylesheet = stylesheet;
+    //        this.writer = writer;
+    //    }
+
+    //    public virtual string ReadLine()
+    //    {
+    //        return System.Console.ReadLine();
+    //    }
+
+    //    public void WriteLine(string line)
+    //    {
+    //        Write($"{line}
");
+    //    }
+
+    //    public void Write(string str)
+    //    {
+    //        HtmlDocument doc = new HtmlDocument();
+    //        doc.LoadHtml($"<message>{str}</message>");
+
+    //        // The top level block is not wrapped (the console software will take care of that).
+    //        //blockWriterStack.Push(new BlockWriter(GetConsoleWidth(), false));
+
+    //        // Parse
+    //        var root = TagNode.ParseNode(doc.DocumentNode);
+
+    //        // Calculate styles
+
+    //        // Measure
+
+    //        // Arrange
+
+    //        //ParseElement(doc.DocumentElement);
+
+    //        /*Assert.AreEqual(0, pathSegmentStack.Count);
+    //        Assert.AreEqual(1, blockWriterStack.Count);*/
+
+    //        //WriteToOutputCore(CurrentBlockWriter.GetString());
+
+    //        blockWriterStack.Pop();
+    //    }
+
+    //    /*private void ParseElement(XmlElement element)
+    //    {
+    //        var localName = element.LocalName.ToLowerInvariant();
+
+    //        var classAttribute = element.Attributes
+    //            .OfType<XmlAttribute>()
+    //            .Where(p => p.LocalName == "class")
+    //            .Select(p => p.InnerText.ToLower())
+    //            .SingleOrDefault(p => Regex.IsMatch(p, "^-?[_a-z]+[_a-z0-9-]*$")); // http://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors
+
+    //        var idAttribute = element.Attributes
+    //            .OfType<XmlAttribute>()
+    //            .Where(p => p.LocalName == "id")
+    //            .Select(p => p.InnerText.ToLower())
+    //            .SingleOrDefault(p => Regex.IsMatch(p, "^[^ #.]+$"));
+
+    //        pathSegmentStack.Push(new PathSegment
+    //        {
+    //            Element = localName,
+    //            Index = element.ParentNode?.ChildNodes.OfType<XmlNode>().TakeWhile(p => p != element).Count() ?? 0,
+    //            Id = idAttribute?.ToLower(),
+    //            Classes = (classAttribute ?? "").ToLower().Split(' ').ToList()
+    //        });
+
+    //        var matchingStyles = stylesheet.GetMatchingDeclarations(pathSegmentStack);
+
+    //        var styleAttribute = element.Attributes
+    //            .OfType<XmlAttribute>()
+    //            .Where(p => p.LocalName == "style")
+    //            .Select(p => p.InnerText)
+    //            .SingleOrDefault();
+
+    //        if (styleAttribute != null)
+    //        {
+    //            var inlineStyles = Stylesheet.ParseBlock(styleAttribute);
+    //            matchingStyles.MergeAnotherBlockOver(inlineStyles.ToDictionary(p => p.Property, p => p));
+    //        }
+
+    //        Display display;
+    //        if (matchingStyles.ContainsKey("display") && matchingStyles["display"].Value == "block")
+    //        {
+    //            display = Display.Block;
+
+    //            int blockWidth = CurrentBlockWriter.BlockWidth;
+
+    //            blockWriterStack.Push(new BlockWriter(CurrentBlockWriter.BlockWidth));
+    //        }
+    //        else
+    //        {
+    //            display = Display.Inline;
+    //        }
+
+    //        var previousBackgroundColor = GetBackgroundColor();
+    //        if (matchingStyles.ContainsKey("background-color"))
+    //        {
+    //            //this.SetBackgroundColor(this.StyleColorToConsoleColor(matchingStyles["background-color"].Value));
+    //        }
+
+    //        var previousForegroundColor = GetForegroundColor();
+    //        if (matchingStyles.ContainsKey("color"))
+    //        {
+    //            //this.SetForegroundColor(this.StyleColorToConsoleColor(matchingStyles["color"].Value));
+    //        }
+
+    //        if (localName == "br")
+    //        {
+    //            CurrentBlockWriter.Write(Environment.NewLine);
+    //        }
+
+    //        if (localName == "table")
+    //        {
+    //            var tableStackEntry = new TableStackEntry();
+    //            tableStack.Push(tableStackEntry);
+    //        }
+
+    //        if (localName == "pre")
+    //        {
+    //            CurrentBlockWriter.Write(element.InnerXml);
+    //        }
+    //        else
+    //        {
+    //            foreach (var childNode in element.ChildNodes)
+    //            {
+    //                if (childNode is XmlText)
+    //                {
+    //                    var innerText = (childNode as XmlText).InnerText;
+
+    //                    // Collapse white space
+    //                    innerText = Regex.Replace(innerText, @"\s+", " ");
+
+    //                    if (blockWriterStack.Peek().LastCharIsWhiteSpace())
+    //                    {
+    //                        innerText = innerText.TrimStart();
+    //                    }
+
+    //                    CurrentBlockWriter.Write(innerText);
+    //                }
+    //                else if (childNode is XmlWhitespace)
+    //                {
+    //                    if (!CurrentBlockWriter.LastCharIsWhiteSpace())
+    //                    {
+    //                        CurrentBlockWriter.Write(" ");
+    //                    }
+    //                }
+    //                else if (childNode is XmlElement)
+    //                {
+    //                    var xmlElement = childNode as XmlElement;
+    //                    var childLocalName = xmlElement.LocalName.ToLowerInvariant();
+
+    //                    if (childLocalName == "tr")
+    //                    {
+    //                        if (tableStack.Any())
+    //                        {
+    //                            tableStack.Peek().Rows.Add(new TableRow {RowElement = xmlElement});
+    //                        }
+
+    //                        //this.ParseElement(xmlElement);
+    //                    }
+    //                    else if (childLocalName == "td" || childLocalName == "th")
+    //                    {
+    //                        if (tableStack.Any() && tableStack.Peek().Rows.Any())
+    //                        {
+    //                            tableStack.Peek().Rows.Last().CellElements.Add(xmlElement);
+    //                        }
+
+    //                        //this.ParseElement(xmlElement);
+    //                    }
+    //                    else
+    //                    {
+    //                        ParseElement(xmlElement);
+    //                    }
+
+    //                }
+    //            }
+    //        }
+
+    //        if(localName == "table")
+    //        {
+    //            var tableStackEntry = tableStack.Pop();
+    //            RenderTable(tableStackEntry);
+    //        }
+
+    //        else if (localName == "h1")
+    //        {
+    //            CurrentBlockWriter.Write($"{Environment.NewLine}====================");
+    //        }
+    //        else if (localName == "h2")
+    //        {
+    //            CurrentBlockWriter.Write($"{Environment.NewLine}--------------------");
+    //        }
+
+    //        if (display == Display.Block)
+    //        {
+    //            var blockWriter = blockWriterStack.Pop();
+
+    //            CurrentBlockWriter.Write(Environment.NewLine);
+    //            CurrentBlockWriter.Write(blockWriter.GetString());
+    //            CurrentBlockWriter.Write(Environment.NewLine);
+    //        }
+
+
+    //        if (GetBackgroundColor() != previousBackgroundColor)
+    //        {
+    //            SetBackgroundColor(previousBackgroundColor);
+    //        }
+
+    //        if (GetForegroundColor() != previousForegroundColor)
+    //        {
+    //            SetForegroundColor(previousForegroundColor);
+    //        }
+
+    //        pathSegmentStack.Pop();
+    //    }
+
+    //    private void RenderTable(TableStackEntry tableStackEntry)
+    //    {
+
+
+
+    //        throw new NotImplementedException();
+    //    }

-        protected virtual void WriteToOutputCore(string str)
-        {
-            System.Console.Write(str);
-        }
-
-        protected virtual ConsoleColor GetForegroundColor()
-        {
-            return System.Console.ForegroundColor;
-        }
-
-        protected virtual ConsoleColor GetBackgroundColor()
-        {
-            return System.Console.BackgroundColor;
-        }
-
-        protected virtual void SetForegroundColor(ConsoleColor color)
-        {
-            System.Console.ForegroundColor = color;
-        }
-
-        protected virtual void SetBackgroundColor(ConsoleColor color)
-        {
-            System.Console.BackgroundColor = color;
-        }
-
-        protected virtual int GetConsoleWidth()
-        {
-            try
-            {
-                return System.Console.BufferWidth;
-            }
-            catch (IOException)
-            {
-                // Exception is throw when this is run outside of a console (such as within a unit test runner)
-                return 60;
-            }
-        }*/
-    }
+    //    protected virtual void WriteToOutputCore(string str)
+    //    {
+    //        System.Console.Write(str);
+    //    }
+
+    //    protected virtual ConsoleColor GetForegroundColor()
+    //    {
+    //        return System.Console.ForegroundColor;
+    //    }
+
+    //    protected virtual ConsoleColor GetBackgroundColor()
+    //    {
+    //        return System.Console.BackgroundColor;
+    //    }
+
+    //    protected virtual void SetForegroundColor(ConsoleColor color)
+    //    {
+    //        System.Console.ForegroundColor = color;
+    //    }
+
+    //    protected virtual void SetBackgroundColor(ConsoleColor color)
+    //    {
+    //        System.Console.BackgroundColor = color;
+    //    }
+
+    //    protected virtual int GetConsoleWidth()
+    //    {
+    //        try
+    //        {
+    //            return System.Console.BufferWidth;
+    //        }
+    //        catch (IOException)
+    //        {
+    //            // Exception is throw when this is run outside of a console (such as within a unit test runner)
+    //            return 60;
+    //        }
+    //    }*/
+    //}
 }


Added a point load at the SolveBuildingInNoSoilSmall example.

--- ISAAR.MSolve.SamplesConsole/Program.cs
+++ ISAAR.MSolve.SamplesConsole/Program.cs
@@ -20,6 +20,7 @@
             model.SubdomainsDictionary.Add(1, new Subdomain() { ID = 1 });
             BeamBuildingBuilder.MakeBeamBuilding(model, 20, 20, 20, 5, 4, model.NodesDictionary.Count + 1,
                 model.ElementsDictionary.Count + 1, 1, 4, false, false);
+            model.Loads.Add(new Load() { Amount = -100, Node = model.Nodes[21], DOF = DOFType.X });
             model.ConnectDataStructures();

             SolverSkyline solver = new SolverSkyline(model);


add more constructor for bytes

add more constructor for bytes

--- ImageShareTemplate/Block/BlockImage.cs
+++ ImageShareTemplate/Block/BlockImage.cs
@@ -11,6 +11,11 @@
             Data = loader.Load(src);
         }

+        public BlockImage(byte[] data)
+        {
+            Data = data;
+        }
+
         public byte[] Data { get; }
     }
 }


Show the MAs in the charting window

Show the MAs in the charting window

--- Indicator/Moving_Averages_Indicator.cs
+++ Indicator/Moving_Averages_Indicator.cs
@@ -13,9 +13,12 @@

 /// <summary>
-/// Version: 1.0
+/// Version: 1.1
 /// -------------------------------------------------------------------------
 /// Simon Pucher 2016
+/// -------------------------------------------------------------------------
+/// todo
+/// If barsrequired is smaller than the MAs print a warning message.
 /// -------------------------------------------------------------------------
 /// ****** Important ******
 /// To compile this script without any error you also need access to the utility indicator to use these global source code elements.
@@ -35,8 +38,8 @@
     }

     [Description("Use 5 different SMA or EMA at the same time in one indicator.")]
-	public class Moving_Averages_Indicator : UserIndicator
-	{
+    public class Moving_Averages_Indicator : UserIndicator
+    {

         //input
         private Enum_Moving_Averages_Indicator_MA _MA_1_Selected = Enum_Moving_Averages_Indicator_MA.EMA;
@@ -71,11 +74,11 @@
         private DashStyle _linestyle_5 = DashStyle.Solid;
         private Color _col_5 = Color.DarkViolet;

-
+

         protected override void Initialize()
-		{
+        {
             Add(new Plot(new Pen(this.Color_1, this.LineWidth_1), PlotStyle.Line, "MA_1"));
             Add(new Plot(new Pen(this.Color_2, this.LineWidth_2), PlotStyle.Line, "MA_2"));
             Add(new Plot(new Pen(this.Color_3, this.LineWidth_3), PlotStyle.Line, "MA_3"));
@@ -85,13 +88,19 @@
             CalculateOnBarClose = true;
             Overlay = true;

-        }
-
-
-
-
-		protected override void OnBarUpdate()
-		{
+            //this.GetNameOnchart();
+
+        }
+
+
+
+
+
+        protected override void OnBarUpdate()
+        {
+            //this.GetNameOnchart();
+
+

             if (this.MA_1 != 0)
             {
@@ -190,18 +199,50 @@

         }

-
+
+        private string GetNameOnchart()
+        {
+           string returnvalue = "Moving Averages (I) ";
+
+            if (this.MA_1 != 0)
+            {
+                returnvalue += MA_1_Selected.ToString() + this.MA_1 + " ";
+            }
+
+            if (this.MA_2 != 0)
+            {
+                returnvalue += MA_2_Selected.ToString() + this.MA_2 + " ";
+            }
+
+            if (this.MA_3 != 0)
+            {
+                returnvalue += MA_3_Selected.ToString() + this.MA_3 + " ";
+            }
+
+            if (this.MA_4 != 0)
+            {
+                returnvalue += MA_4_Selected.ToString() + this.MA_4 + " ";
+            }
+
+            if (this.MA_5 != 0)
+            {
+                returnvalue += MA_5_Selected.ToString() + this.MA_5 + " ";
+            }
+
+            return returnvalue;
+        }
+

         public override string ToString()
         {
-            return "Moving Averages (I)";
+            return GetNameOnchart();
         }

         public override string DisplayName
         {
             get
             {
-                return "Moving Averages (I)";
+                return GetNameOnchart();
             }
         }


[SamplePhotoApp] Add link to bugzilla issue


Issue with multi-line encoded pictures

Issue with multi-line encoded pictures

Sorry I don't have unit-tests associated, but currently when photos are multi-line, the first line is seen twice in the calculated photoString.

--- vCardLib/Deserializers/v3Deserializer.cs
+++ vCardLib/Deserializers/v3Deserializer.cs
@@ -509,13 +509,9 @@
                         var photoStrIndex = Array.IndexOf(contactDetails, photoStr);
                         while (true)
                         {
-                            if (photoStrIndex < contactDetails.Length)
+                            if (++photoStrIndex < contactDetails.Length && contactDetails[photoStrIndex].StartsWith("PHOTO;"))
                             {
                                 photoString += contactDetails[photoStrIndex];
-                                photoStrIndex++;
-                                if (photoStrIndex < contactDetails.Length &&
-                                    contactDetails[photoStrIndex].StartsWith("PHOTO;"))
-                                    break;
                             }
                             else
                             {
@@ -573,4 +569,4 @@
             return photoCollection;
         }
     }
-}+}


Do not sort the durable buffer

Do not sort the durable buffer

--- common/platform-dotnet/SoundMetrics.Data2/Filters/UnweightedMedianFilter.cs
+++ common/platform-dotnet/SoundMetrics.Data2/Filters/UnweightedMedianFilter.cs
@@ -28,13 +28,21 @@
             itemCount = Math.Min(itemCount + 1, buffer.Length);
             var isBufferFull = itemCount == buffer.Length;

-            Array.Sort(buffer, 0, itemCount);
+            var sorted = SortIntoCopy(buffer, itemCount);

             var currentValueIndex = itemCount / 2;
-            var currentValue = buffer[currentValueIndex];
+            var currentValue = sorted[currentValueIndex];

             filteredValue = currentValue;
             return isBufferFull;
+
+            T[] SortIntoCopy(T[] values, int length)
+            {
+                var copy = new T[length];
+                Array.Copy(values, copy, length);
+                Array.Sort(copy);
+                return copy;
+            }
         }

         private readonly T[] buffer;


Made all exceptions serializable

Made all exceptions serializable

--- src/unQuery/Exceptions.cs
+++ src/unQuery/Exceptions.cs
@@ -5,6 +5,7 @@
 	/// <summary>
 	/// Thrown when rows are expected, but none were present.
 	/// </summary>
+	[Serializable]
 	public class NoRowsException : Exception
 	{
 		public NoRowsException() :
@@ -15,6 +16,7 @@
 	/// <summary>
 	/// Thrown when a parameter type is not supported.
 	/// </summary>
+	[Serializable]
 	public class ParameterTypeNotSupportedException : Exception
 	{
 		public ParameterTypeNotSupportedException(string propertyName, Type t) :
@@ -37,6 +39,7 @@
 	/// <summary>
 	/// Thrown if no connection strings are defined.
 	/// </summary>
+	[Serializable]
 	public class MissingConnectionStringException : Exception
 	{
 		public MissingConnectionStringException() :
@@ -47,6 +50,7 @@
 	/// <summary>
 	/// Thrown if trying to access a non-existing column.
 	/// </summary>
+	[Serializable]
 	public class ColumnDoesNotExistException : Exception
 	{
 		public ColumnDoesNotExistException(string column) :
@@ -57,6 +61,7 @@
 	/// <summary>
 	/// Thrown if a result row contains two columns with the same name.
 	/// </summary>
+	[Serializable]
 	public class DuplicateColumnException : Exception
 	{
 		public DuplicateColumnException(string column) :
@@ -67,6 +72,7 @@
 	/// <summary>
 	/// Thrown if a result contains an unnamed column.
 	/// </summary>
+	[Serializable]
 	public class UnnamedColumnException : Exception
 	{
 		public UnnamedColumnException(int index) :
@@ -78,6 +84,7 @@
 	/// Thrown if trying to add a parameter to a SqlCommand that already contains a parameter.
 	/// with the same name.
 	/// </summary>
+	[Serializable]
 	public class SqlCommandAlreadyHasParametersException : Exception
 	{
 		public SqlCommandAlreadyHasParametersException() :
@@ -88,6 +95,7 @@
 	/// <summary>
 	/// Thrown if properties are expected on an object, but none are present.
 	/// </summary>
+	[Serializable]
 	public class ObjectHasNoPropertiesException : Exception
 	{
 		public ObjectHasNoPropertiesException(string message) :
@@ -98,6 +106,7 @@
 	/// <summary>
 	/// Thrown if a SqlType is used as if it could be auto converted from the native CLR type. E.g. valid for ints but not for strings.
 	/// </summary>
+	[Serializable]
 	public class TypeCannotBeUsedAsAClrTypeException : InvalidOperationException
 	{
 		public TypeCannotBeUsedAsAClrTypeException() :
@@ -108,6 +117,7 @@
 	/// <summary>
 	/// Thrown if a type is used in situations that requires types to be specified explicitly (like for structured use)
 	/// </summary>
+	[Serializable]
 	public class TypePropertiesMustBeSetExplicitlyException : InvalidOperationException
 	{
 		public TypePropertiesMustBeSetExplicitlyException(string properties) :
@@ -119,6 +129,7 @@
 	/// Thrown if an IEnumerable of simple values is passed to a structured parameter, with different types being
 	/// returned from the IEnumerable
 	/// </summary>
+	[Serializable]
 	public class StructuredTypeMismatchException : ArgumentException
 	{
 		public StructuredTypeMismatchException(Type t)
@@ -129,6 +140,7 @@
 	/// <summary>
 	/// Thrown if two types do not match
 	/// </summary>
+	[Serializable]
 	public class TypeMismatchException : Exception
 	{
 		public TypeMismatchException(string msg) : base(msg)
@@ -139,6 +151,7 @@
 	/// Thrown when a result set is being mapped into a list of a simple type, e.g. int/string, and more than one column
 	/// is part of the result set. To avoid masking errors, an exception is thrown.
 	/// </summary>
+	[Serializable]
 	public class MoreThanOneColumnException : Exception
 	{
 		public MoreThanOneColumnException()


Added switch to use compression with tool

--- Keyczar/KeyczarTool/Commands/UseKey.cs
+++ Keyczar/KeyczarTool/Commands/UseKey.cs
@@ -32,6 +32,8 @@
         private string _destination;
         private bool _binary;
         private bool _password;
+		private bool _usecompression;
+		string _compression;

         public UseKey()
         {
@@ -43,6 +45,7 @@
             this.HasOption("d|destination=", "The output destination.", v => { _destination = v; });
             this.HasOption("f|file", "The message is a file location", v => { _file = true; });
             this.HasOption("b|binary", "Specifies binary output.", v => { _binary = true; });
+			this.HasOption("z|compression:", "Specifies binary output. (zlib)", v => {_usecompression = true; _compression = v; });
             this.SkipsCommandSummaryBeforeRunning();
         }

@@ -103,6 +106,10 @@
                     {
                         using (var crypter =  new Crypter(ks))
                         {
+							if(_usecompression){
+								crypter.Compression = CompressionType.Zlib;
+							}
+
                             crypter.Encrypt(inStream, outstream);
                         }
                     }else


Added summary description

Added summary description

--- LtiLibrary.Core/Common/UrnAttribute.cs
+++ LtiLibrary.Core/Common/UrnAttribute.cs
@@ -2,6 +2,11 @@

 namespace LtiLibrary.Core.Common
 {
+    /// <summary>
+    /// Roles in LTI are defined by URNs, although in practice, you can use a nickname such as Learner
+    /// instead of urn:lti:role:ims/lis/Learner. This attribute associates each nickname with the
+    /// corresponding URN.
+    /// </summary>
     [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
     public class UrnAttribute : Attribute
     {


Optimize for larger messages.

Optimize for larger messages.

--- NATS/Parser.cs
+++ NATS/Parser.cs
@@ -191,16 +191,32 @@
                         }
                         break;
                     case MSG_PAYLOAD:
-                        long position = msgBufStream.Position;
-                        if (position >= conn.msgArgs.size)
-                        {
-                            conn.processMsg(msgBufBase, position);
-                            msgBufStream.Position = 0;
+                        int  msgSize  = conn.msgArgs.size;
+                        if (msgSize == 0)
+                        {
+                            conn.processMsg(msgBufBase, msgSize);
                             state = MSG_END;
                         }
                         else
                         {
-                            msgBufStream.WriteByte((byte)b);
+                            long position = msgBufStream.Position;
+                            int writeLen = msgSize - (int)position;
+                            int avail = len - i;
+
+                            if (avail < writeLen)
+                            {
+                                writeLen = avail;
+                            }
+
+                            msgBufStream.Write(buffer, i, writeLen);
+                            i += (writeLen - 1);
+
+                            if ((position + writeLen) >= msgSize)
+                            {
+                                conn.processMsg(msgBufBase, msgSize);
+                                msgBufStream.Position = 0;
+                                state = MSG_END;
+                            }
                         }
                         break;
                     case MSG_END:


Pickles.Tests Passes

Pickles.Tests Passes

--- src/Pickles/Pickles.Test/Formatters/HtmlContentFormatterTests.cs
+++ src/Pickles/Pickles.Test/Formatters/HtmlContentFormatterTests.cs
@@ -1,12 +1,11 @@
 using System;
-using System.IO;
+using System.Xml.Linq;
+using Autofac;
 using Moq;
 using NUnit.Framework;
-using Autofac;
 using PicklesDoc.Pickles.DirectoryCrawler;
 using PicklesDoc.Pickles.DocumentationBuilders.HTML;
 using PicklesDoc.Pickles.Parser;
-using System.Xml.Linq;

 namespace PicklesDoc.Pickles.Test.Formatters
 {
@@ -42,7 +41,7 @@
         public void Format_ContentIsFeatureNode_UsesHtmlFeatureFormatterWithCorrectArgument()
         {
             var fakeHtmlFeatureFormatter = new Mock<IHtmlFeatureFormatter>();
-            var fakeHtmlImageRelocator = new Mock<HtmlImageRelocator>(null);
+            var fakeHtmlImageRelocator = new Mock<HtmlImageRelocator>(null, null);
             fakeHtmlImageRelocator.Setup(x => x.Relocate(It.IsAny<INode>(), It.IsAny<XElement>()));
             var formatter = new HtmlContentFormatter(fakeHtmlFeatureFormatter.Object, Container.Resolve<HtmlIndexFormatter>(), fakeHtmlImageRelocator.Object);


add exploratory test

add exploratory test

--- src/PygmentSharp/PygmentSharp.UnitTests/Lexers/RegexUtilTests.cs
+++ src/PygmentSharp/PygmentSharp.UnitTests/Lexers/RegexUtilTests.cs
@@ -27,6 +27,7 @@
         [InlineData("A,B,C", "[ABC]")]
         [InlineData("A,AB,ABC", "(A(?:(?:B(?:(?:C)?))?))")]
         [InlineData("A,AA,FOO", "(A(?:(?:A)?)|FOO)")]
+        [InlineData("cat,car,cap", "(ca[prt])")]
         public void OptimizedRegex(string input, string output)
         {
             var strings = input.Split(',');


Removed outBus from event store repo. constructor

This commit contains 3 main changes:
1- Removed outBus as param from constructor
2- Removed respective private attribute (_outBus) + cascading impacts
3- Some indentation
Surprizingly this did not break any of the unit test

(RD-20) WIP
(RD-27) Fixed

--- src/ReactiveDomain.Foundation/EventStore/EventStoreRepository.cs
+++ src/ReactiveDomain.Foundation/EventStore/EventStoreRepository.cs
@@ -22,7 +22,6 @@
         public const string CommitIdHeader = "CommitId";
         private const int WritePageSize = 500;
         private const int ReadPageSize = 500;
-        private IBus _outBus;

         private readonly Func<Type, Guid, string> _aggregateIdToStreamName;

@@ -34,25 +33,31 @@
             SerializerSettings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.None };
         }

-        public EventStoreRepository(string domainPrefix, IEventStoreConnection eventStoreConnection, IBus outBus = null)
-            : this(eventStoreConnection, (t, g) => string.Format($"{domainPrefix}.{char.ToLower(t.Name[0]) + t.Name.Substring(1)}-{g:N}", outBus))
-        {
-        }
-
-        public EventStoreRepository(IEventStoreConnection eventStoreConnection, Func<Type, Guid, string> aggregateIdToStreamName, IBus outBus = null)
-        {
-            _outBus = outBus;
+        public EventStoreRepository(
+	        string domainPrefix,
+	        IEventStoreConnection eventStoreConnection)
+            : this(eventStoreConnection, (t, g) => string.Format($"{domainPrefix}.{char.ToLower(t.Name[0]) + t.Name.Substring(1)}-{g:N}"))
+        {
+        }
+
+        public EventStoreRepository(
+	        IEventStoreConnection eventStoreConnection,
+	        Func<Type, Guid, string> aggregateIdToStreamName)
+        {
             _eventStoreConnection = eventStoreConnection;
             _aggregateIdToStreamName = aggregateIdToStreamName;
         }
+
         public bool TryGetById<TAggregate>(Guid id, out TAggregate aggregate) where TAggregate : class, IEventSource
         {
             return TryGetById(id, int.MaxValue, out aggregate);
         }
+
         public TAggregate GetById<TAggregate>(Guid id) where TAggregate : class, IEventSource
         {
             return GetById<TAggregate>(id, int.MaxValue);
         }
+
         public bool TryGetById<TAggregate>(Guid id, int version, out TAggregate aggregate) where TAggregate : class, IEventSource
         {
             try
@@ -66,6 +71,7 @@
                 return false;
             }
         }
+
         public TAggregate GetById<TAggregate>(Guid id, int version) where TAggregate : class, IEventSource
         {
             if (version <= 0)
@@ -155,15 +161,6 @@

                 transaction.CommitAsync().Wait();
             }
-            if (_outBus != null)
-                foreach (var evt in newEvents)
-                {
-                    try
-                    {
-                        _outBus.Publish((Message)evt);
-                    }
-                    catch { }//TODO: see if we need to do something here
-                }
             //aggregate.ClearUncommittedEvents();
         }


Fixes #348: Для СписокЗначений.СортироватьПоЗначению() установлено значение параметра по-умолчанию.

--- src/ScriptEngine.HostedScript/Library/ValueList/ValueListImpl.cs
+++ src/ScriptEngine.HostedScript/Library/ValueList/ValueListImpl.cs
@@ -181,10 +181,10 @@
         }

         [ContextMethod("СортироватьПоЗначению", "SortByValue")]
-        public void SortByValue(SelfAwareEnumValue<SortDirectionEnum> direction)
+        public void SortByValue(SelfAwareEnumValue<SortDirectionEnum> direction = null)
         {
             var enumInstance = GlobalsManager.GetEnum<SortDirectionEnum>();
-            if(direction == enumInstance.Asc)
+            if(direction == null || direction == enumInstance.Asc)
             {
                 _items.Sort((x, y) => SafeCompare(x.Value, y.Value));
             }


Fix for non - TDS packages being used

Fix for non - TDS packages being used

--- src/Sitecore.Ship.Infrastructure/Diagnostics/ManifestReporter.cs
+++ src/Sitecore.Ship.Infrastructure/Diagnostics/ManifestReporter.cs
@@ -33,7 +33,10 @@
             if (extractionPath == null) return manifestReport;

             var manifestFile = LoadManifestFile(extractionPath, manifestReport);
-            if (manifestFile == null) return manifestReport;
+            if (manifestFile == null)
+            {
+                return manifestReport;
+            }

             logger.Info("***************** Begin manifest ****************");

@@ -247,14 +250,15 @@

         private bool UnzipPackageFiles(string zipSource, string pathToUnzipTo)
         {
-            bool result = true;
+            bool result;
             using (var reader = new Zip.ZipReader(zipSource))
             {
-                // unzip manifest
-                result = UnzipTargetFile(reader, this.manifestFilePath, pathToUnzipTo + "DeployedItems.xml");
+                var deployedItemsPath = pathToUnzipTo + "DeployedItems.xml";
+                // unzip manifest. Ignore result as this may not be a TDS package
+                UnzipTargetFile(reader, this.manifestFilePath, deployedItemsPath);

                 //unzip everything in the addeditems folder into a flat list as filenames are unique, but in there db folders
-                result = result && UnzipPackageFilesForDB(reader, pathToUnzipTo, "core");
+                result = UnzipPackageFilesForDB(reader, pathToUnzipTo, "core");
                 result = result && UnzipPackageFilesForDB(reader, pathToUnzipTo, "master");
                 result = result && UnzipPackageFilesForDB(reader, pathToUnzipTo, "web");
             }
@@ -319,34 +323,27 @@
             string extractedTempPackagePath=null;
             var guid = Guid.NewGuid();

-            if (packageFilePath.Trim().ToLower().EndsWith(".update"))
-            {
-                extractedTempPackagePath = System.IO.Path.GetTempPath() + "package." + guid + ".zip";
-                if (!UnzipTargetFile(packageFilePath, "package.zip", extractedTempPackagePath, manifestReport))
-                {
-                    logger.Warn(manifestReport.SetError("Could not report on deployment as ship cannot find package zip in the update file at " + packageFilePath).Error);
-                    return null;
-                }
-                packageFilePath = extractedTempPackagePath;
+            extractedTempPackagePath = System.IO.Path.GetTempPath() + "package." + guid + ".zip";
+            if (!UnzipTargetFile(packageFilePath, "package.zip", extractedTempPackagePath, manifestReport))
+            {
+                logger.Error(manifestReport.SetError("Could not report on deployment as ship cannot find package zip in the update file at " + packageFilePath).Error);
+                return null;
             }

             var targetPath = System.IO.Path.GetTempPath() + guid + "\\";
             if (!System.IO.Directory.Exists(targetPath)) System.IO.Directory.CreateDirectory(targetPath);
             if (!UnzipPackageFiles(packageFilePath, targetPath))
             {
-                logger.Warn(manifestReport.SetError("Could not report on deployment as ship cannot unzip all files in " + packageFilePath).Error);
+                logger.Error(manifestReport.SetError("Could not report on deployment as ship cannot unzip all files in " + packageFilePath).Error);
                 return null;
             }

-            if (extractedTempPackagePath != null)
-            {
-                try
-                {
-                    System.IO.File.Delete(extractedTempPackagePath);
-                }
-                catch
-                {
-                }
+            try
+            {
+                System.IO.File.Delete(extractedTempPackagePath);
+            }
+            catch
+            {
             }

             return targetPath;
@@ -358,7 +355,7 @@

             if (!System.IO.File.Exists(manifestFilePath))
             {
-                logger.Warn(manifestReport.SetError("Could not report on deployment as ship cannot find manifest file at " + manifestFilePath).Error);
+                logger.Warn("Could not report on deployment as ship cannot find manifest file at " + manifestFilePath);
                 return null;
             }