Set service name correctly when using Azure Pipelines urls (#1846)

The previous service naming logic used the instance's subdomain. When an
Azure Pipelines url was provided, "dev" was always used. Now, the instance
name will be obtained from the url's path if an Azure Pipelines url is
provided.

Resolves #1841

--- src/Agent.Listener/Configuration/ServiceControlManager.cs
+++ src/Agent.Listener/Configuration/ServiceControlManager.cs
@@ -35,7 +35,18 @@
             serviceName = string.Empty;
             serviceDisplayName = string.Empty;

-            string accountName = new Uri(settings.ServerUrl).Host.Split('.').FirstOrDefault();
+            Uri accountUri = new Uri(settings.ServerUrl);
+            string accountName = string.Empty;
+
+            if (accountUri.Host.Equals("dev.azure.com", StringComparison.OrdinalIgnoreCase))
+            {
+                accountName = accountUri.AbsolutePath.Split('/', StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
+            }
+            else
+            {
+                accountName = accountUri.Host.Split('.').FirstOrDefault();
+            }
+
             if (string.IsNullOrEmpty(accountName))
             {
                 throw new InvalidOperationException(StringUtil.Loc("CannotFindHostName", settings.ServerUrl));


Tweaked comments.

Tweaked comments.

--- src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs
+++ src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs
@@ -258,7 +258,8 @@
             else
             {
                 // Items have been removed and now the range FirstIndex..NextIndex goes out of
-                // the item bounds. Try to scroll up and then remove any excess containers.
+                // the item bounds. Remove any excess containers, try to scroll up and then recycle
+                // the containers to make sure they point to the correct item.
                 var newFirstIndex = Math.Max(0, FirstIndex - (NextIndex - ItemCount));
                 var delta = newFirstIndex - FirstIndex;
                 var newNextIndex = NextIndex + delta;


Removing unused 'isSystem' local that's currently breaking the build. (changeset 1404204)

--- src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+++ src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
@@ -3590,8 +3590,7 @@
         public void Bug15538()
         {
             // Several Jenkins VMs are still running with local systems permissions.  This suite won't run properly
-            // in that environment.  Removing this check is being tracked by issue #79.
-            bool isSystem;
+            // in that environment.  Removing this check is being tracked by issue #79.
             using (var identity = System.Security.Principal.WindowsIdentity.GetCurrent())
             {
                 if (identity.IsSystem)


Making code easier to read

Making code easier to read

--- src/ControlzEx/Behaviors/GlowWindow/GlowWindowBehavior.cs
+++ src/ControlzEx/Behaviors/GlowWindow/GlowWindowBehavior.cs
@@ -463,8 +463,8 @@

                 var handle = this.windowHandle;
                 if (NativeMethods.IsWindowVisible(handle)
-                    && !NativeMethods.IsIconic(handle)
-                    && !NativeMethods.IsZoomed(handle))
+                    && NativeMethods.IsIconic(handle) == false
+                    && NativeMethods.IsZoomed(handle) == false)
                 {
                     var result = this.AssociatedObject is not null
                            && this.AssociatedObject.ResizeMode != ResizeMode.NoResize


added linewrap for signature help descriptions

--- VS/CSHARP/intrinsics-dude-vsix/SignHelp/IntrSignHelpSource.cs
+++ VS/CSHARP/intrinsics-dude-vsix/SignHelp/IntrSignHelpSource.cs
@@ -153,7 +153,7 @@
             signatureText.Append("]");
             #endregion Create Signature Text

-            IntrSign sig = new IntrSign(textBuffer, signatureText.ToString(), dataElement.description, null);
+            IntrSign sig = new IntrSign(textBuffer, signatureText.ToString(), IntrinsicTools.linewrap(dataElement.description, IntrinsicsDudePackage.maxNumberOfCharsInToolTips), null);

             List<IParameter> paramList = new List<IParameter>();
             for (int i = 0; i < nParameters; ++i)


Add exmaple in comment

Add exmaple in comment

--- src/Features/Core/Portable/Completion/CompletionHelper.cs
+++ src/Features/Core/Portable/Completion/CompletionHelper.cs
@@ -197,11 +197,42 @@

         private int CompareMatches(PatternMatch match1, PatternMatch match2, CompletionItem item1, CompletionItem item2)
         {
-            // Almost always prefer non-expanded item regardless of the pattern matching result,
-            // (except when all of the non-expanded items are worse than prefix matching and there's
-            // a complete match from expanded ones.)
-            // This currently means unimported types will be treated as "2nd tier" results,
-            // which forces users to be more explicit about selecting them.
+            // *Almost* always prefer non-expanded item regardless of the pattern matching result.
+            // Except when all non-expanded items are worse than prefix matching and there's
+            // a complete match from expanded ones.
+            //
+            // For example, In the scenarios below, `NS2.Designer` would be selected over `System.Security.Cryptography.DES`
+            //
+            //  namespace System.Security.Cryptography
+            //  {
+            //      class DES {}
+            //  }
+            //  namespace NS2
+            //  {
+            //      class Designer {}
+            //      class C
+            //      {
+            //          des$$
+            //      }
+            //  }
+            //
+            // But in this case, `System.Security.Cryptography.DES` would be selected over `NS2.MyDesigner`
+            //
+            //  namespace System.Security.Cryptography
+            //  {
+            //      class DES {}
+            //  }
+            //  namespace NS2
+            //  {
+            //      class MyDesigner {}
+            //      class C
+            //      {
+            //          des$$
+            //      }
+            //  }
+            //
+            // This currently means items from unimported namespaces (those are the only expanded items now)
+            // are treated as "2nd tier" results, which forces users to be more explicit about selecting them.
             var expandedDiff = CompareExpandedItem(item1, match1, item2, match2);
             if (expandedDiff != 0)
             {


Trying to simplify the observable

Trying to simplify the observable

--- src/GitHub.UI/Controls/AutoCompleteBox/AutoCompleteBox.cs
+++ src/GitHub.UI/Controls/AutoCompleteBox/AutoCompleteBox.cs
@@ -632,7 +632,7 @@
             if (textInput != null)
             {
                 UnsubscribeToEvent("SelectionChanged");
-//                UnsubscribeToEvent("OnTextBoxTextChanged");
+                UnsubscribeToEvent("OnTextBoxTextChanged");
             }

             textInput = value;
@@ -646,18 +646,18 @@
                     supportsShortcutOriginalValue = shortcutContainer.SupportsKeyboardShortcuts;
                 }

-//                SubscribeToEvent("OnTextBoxTextChanged", ObserveTextBoxChanges()
-//                    .Subscribe(shouldPopulate =>
-//                    {
-//                        if (shouldPopulate)
-//                        {
-//                            PopulateDropDown();
-//                        }
-//                        else
-//                        {
-//                            DismissDropDown();
-//                        }
-//                    }));
+                SubscribeToEvent("OnTextBoxTextChanged",
+                    ObserveTextBoxChanges().Subscribe(shouldPopulate =>
+                    {
+                        if (shouldPopulate)
+                        {
+                            PopulateDropDown();
+                        }
+                        else
+                        {
+                            DismissDropDown();
+                        }
+                    }));

                 if (Text != null)
                 {
@@ -668,30 +668,37 @@

         IObservable<bool> ObserveTextBoxChanges()
         {
-            var distinctTextChanges = textInput
+            return textInput
                 .TextChanged
-                .Select(_ => textInput.Text ?? "")
-                .DistinctUntilChanged();
-
-            if (MinimumPopulateDelay >= 0)
-            {
-                distinctTextChanges = distinctTextChanges
-                    .Throttle(TimeSpan.FromMilliseconds(MinimumPopulateDelay), RxApp.MainThreadScheduler);
-            }
-
-            return distinctTextChanges
-                .Select(text => {
-                    bool userChangedTextBox = ignoreTextPropertyChange == 0;
-                    if (ignoreTextPropertyChange > 0) ignoreTextPropertyChange--;
-
-                    return new { Text = text, ShouldPopulate = text.Length > 0 && userChangedTextBox };
-                })
-                .Do(textInfo =>
-                {
-                    userCalledPopulate = textInfo.ShouldPopulate;
-                    UpdateAutoCompleteTextValue(textInfo.Text);
-                })
-                .Select(textInfo => textInfo.ShouldPopulate);
+                .Select(args =>
+                {
+                    return true;
+                });
+
+//            var distinctTextChanges = textInput
+//                .TextChanged
+//                .Select(_ => textInput.Text ?? "")
+//                .DistinctUntilChanged();
+//
+//            if (MinimumPopulateDelay >= 0)
+//            {
+//                distinctTextChanges = distinctTextChanges
+//                    .Throttle(TimeSpan.FromMilliseconds(MinimumPopulateDelay), RxApp.MainThreadScheduler);
+//            }
+//
+//            return distinctTextChanges
+//                .Select(text => {
+//                    bool userChangedTextBox = ignoreTextPropertyChange == 0;
+//                    if (ignoreTextPropertyChange > 0) ignoreTextPropertyChange--;
+//
+//                    return new { Text = text, ShouldPopulate = text.Length > 0 && userChangedTextBox };
+//                })
+//                .Do(textInfo =>
+//                {
+//                    userCalledPopulate = textInfo.ShouldPopulate;
+//                    UpdateAutoCompleteTextValue(textInfo.Text);
+//                })
+//                .Select(textInfo => textInfo.ShouldPopulate);
         }

         /// <summary>


Show empty message

Show empty message

--- src/IFS.Web/Areas/Administration/Views/Files/Index.cshtml
+++ src/IFS.Web/Areas/Administration/Views/Files/Index.cshtml
@@ -10,6 +10,7 @@
 @{
     var sortedFiles = Model.Files.OrderBy(x => x.Metadata.OriginalFileName);
 }
+

@@ -49,6 +50,14 @@

     }
+
+    @if (Model.Files.Count == 0) {
+

+
+                Its empty! No files have been uploaded yet.
+
+

+    }


first implementation of exception handler behaviors

--- src/MediatR/Pipeline/RequestExceptionProcessorBehavior.cs
+++ src/MediatR/Pipeline/RequestExceptionProcessorBehavior.cs
@@ -1,9 +1,8 @@
-using System.Reflection;
-
 namespace MediatR.Pipeline
 {
     using System;
     using System.Collections.Generic;
+    using System.Reflection;
     using System.Threading;
     using System.Threading.Tasks;

@@ -32,7 +31,6 @@
             catch (Exception exception)
             {
                 var state = new RequestExceptionHandlerState<TResponse>();
-
                 Type exceptionType = exception.GetType();

                 do
@@ -48,7 +46,7 @@
                     }

                     exceptionType = exceptionType.BaseType;
-                } while (exceptionType != typeof(object));
+                } while (exceptionType != typeof(Exception).BaseType);

                 foreach (var exceptionHandler in _exceptionHandlers)
                 {


Handling link creation failure handling such as MessagingEntityNotFoundException on the sender.

--- src/Microsoft.Azure.EventHubs/Amqp/AmqpEventDataSender.cs
+++ src/Microsoft.Azure.EventHubs/Amqp/AmqpEventDataSender.cs
@@ -55,27 +55,31 @@

                     try
                     {
-                        var amqpLink = await this.SendLinkManager.GetOrCreateAsync(timeoutHelper.RemainingTime());
-                        if (amqpLink.Settings.MaxMessageSize.HasValue)
+                        try
                         {
-                            ulong size = (ulong)amqpMessage.SerializedMessageSize;
-                            if (size > amqpLink.Settings.MaxMessageSize.Value)
+                            var amqpLink = await this.SendLinkManager.GetOrCreateAsync(timeoutHelper.RemainingTime());
+                            if (amqpLink.Settings.MaxMessageSize.HasValue)
                             {
-                                // TODO: Add MessageSizeExceededException
-                                throw new NotImplementedException("MessageSizeExceededException: " + Resources.AmqpMessageSizeExceeded.FormatForUser(amqpMessage.DeliveryId.Value, size, amqpLink.Settings.MaxMessageSize.Value));
-                                //throw Fx.Exception.AsError(new MessageSizeExceededException(
-                                //    Resources.AmqpMessageSizeExceeded.FormatForUser(amqpMessage.DeliveryId.Value, size, amqpLink.Settings.MaxMessageSize.Value)));
+                                ulong size = (ulong)amqpMessage.SerializedMessageSize;
+                                if (size > amqpLink.Settings.MaxMessageSize.Value)
+                                {
+                                    throw new MessageSizeExceededException(amqpMessage.DeliveryId.Value, size, amqpLink.Settings.MaxMessageSize.Value);
+                                }
                             }
+
+                            Outcome outcome = await amqpLink.SendMessageAsync(amqpMessage, this.GetNextDeliveryTag(), AmqpConstants.NullBinary, timeoutHelper.RemainingTime());
+                            if (outcome.DescriptorCode != Accepted.Code)
+                            {
+                                Rejected rejected = (Rejected)outcome;
+                                throw new AmqpException(rejected.Error);
+                            }
+
+                            this.retryPolicy.ResetRetryCount();
                         }
-
-                        Outcome outcome = await amqpLink.SendMessageAsync(amqpMessage, this.GetNextDeliveryTag(), AmqpConstants.NullBinary, timeoutHelper.RemainingTime());
-                        if (outcome.DescriptorCode != Accepted.Code)
+                        catch (AmqpException amqpException)
                         {
-                            Rejected rejected = (Rejected)outcome;
-                            throw Fx.Exception.AsError(AmqpExceptionHelper.ToMessagingContract(rejected.Error));
+                            throw AmqpExceptionHelper.ToMessagingContract(amqpException.Error);
                         }
-
-                        this.retryPolicy.ResetRetryCount();
                     }
                     catch (Exception ex)
                     {


More verification and logging in EventServer.

--- src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Internal/EventServer.cs
+++ src/Mono.Upnp/Mono.Upnp/Mono.Upnp.Internal/EventServer.cs
@@ -220,7 +220,14 @@

             var uuid = string.Format ("uuid:{0}", Guid.NewGuid ());
             var subscriber = new Subscription (url, uuid);
-            HandleSubscription (context, subscriber);
+
+            if (!HandleSubscription (context, subscriber)) {
+                Log.Error (string.Format (
+                    "{0} from {1} failed to subscribe to {0}.",
+                    subscriber.Callback, context.Request.RemoteEndPoint, context.Request.Url));
+                return;
+            }
+
             subscribers.Add (uuid, subscriber);
             context.Response.Close ();

@@ -247,9 +254,13 @@
                 return;
             }

-            HandleSubscription (context, subscribers[sid]);
+            if (!HandleSubscription (context, subscribers[sid])) {
+                Log.Error (string.Format ("Failed to renew subscription {0}.", sid));
+                return;
+            }

             Log.Information (string.Format ("Subscription {0} was renewed.", sid));
+
         }

         void Unsubscribe (HttpListenerContext context)
@@ -273,7 +284,7 @@
             Log.Information (string.Format ("Subscription {0} was canceled.", sid));
         }

-        void HandleSubscription (HttpListenerContext context, Subscription subscriber)
+        bool HandleSubscription (HttpListenerContext context, Subscription subscriber)
         {
             dispatcher.Remove (subscriber.TimeoutId);
             var timeout = context.Request.Headers["TIMEOUT"] ?? "Second-1800";
@@ -282,10 +293,8 @@
                 if (timeout.Length > 7 && int.TryParse (timeout.Substring (7), out time)) {
                     subscriber.TimeoutId = dispatcher.Add (TimeSpan.FromSeconds (time), OnTimeout, subscriber.Sid);
                 } else {
-                    Log.Error (string.Format (
-                        "Subscription {0} ({1}) from {2} to {3} has an illegal TIMEOUT value: {4}",
-                        subscriber.Sid, subscriber.Callback, context.Request.RemoteEndPoint, context.Request.Url, timeout));
-                    // TODO throw
+                    Log.Error (string.Format ("Subscription request has an illegal TIMEOUT value: {0}", timeout));
+                    return false;
                 }
             }
             context.Response.AddHeader ("DATE", DateTime.Now.ToString ("r"));
@@ -294,6 +303,7 @@
             context.Response.AddHeader ("TIMEOUT", timeout);
             context.Response.StatusCode = 200;
             context.Response.StatusDescription = "OK";
+            return true;
         }

         bool OnTimeout (object state, ref TimeSpan interval)


Throw exception if CommandText is set while reading.

--- src/MySqlConnector/MySql.Data.MySqlClient/MySqlCommand.cs
+++ src/MySqlConnector/MySql.Data.MySqlClient/MySqlCommand.cs
@@ -85,7 +85,17 @@
 			//    this is not actually true because "Prepared statement handles are defined to work only with strings that contain a single statement" (http://dev.mysql.com/doc/refman/5.7/en/c-api-multiple-queries.html).
 		}

-		public override string CommandText { get; set; }
+		public override string CommandText
+		{
+			get => m_commandText;
+			set
+			{
+				if (m_connection?.HasActiveReader ?? false)
+					throw new InvalidOperationException("Cannot set MySqlCommand.CommandText when there is an open DataReader for this command; it must be closed first.");
+				m_commandText = value;
+			}
+		}
+
 		public new MySqlTransaction Transaction { get; set; }

 		public new MySqlConnection Connection
@@ -265,6 +275,7 @@
 		static int s_commandId = 1;

 		MySqlConnection m_connection;
+		string m_commandText;
 		MySqlParameterCollection m_parameterCollection;
 		int? m_commandTimeout;
 		CommandType m_commandType;


Update ScriptComplierEngine.cs

Update ScriptComplierEngine.cs

优化引擎逻辑

--- src/Natasha/Engine/ComplierModule/ScriptComplierEngine.cs
+++ src/Natasha/Engine/ComplierModule/ScriptComplierEngine.cs
@@ -113,6 +113,8 @@
         }

+
+
         public static (SyntaxTree Tree, string[] ClassNames, string formatter) GetTreeAndClassNames(string content)
         {

@@ -275,7 +277,12 @@
             //类名获取
             var (Tree, ClassNames, formatter) = GetTreeAndClassNames(sourceContent.Trim());
             formatContent = formatter;
-            StringBuilder recoder = new StringBuilder(FormatLineCode(formatter));
+
+
+            if (ClassMapping.ContainsKey(ClassNames[0]))
+            {
+                return ClassMapping[ClassNames[0]];
+            }

             //生成路径
@@ -303,6 +310,7 @@
             try
             {

+                StringBuilder recoder = new StringBuilder(FormatLineCode(formatter));
                 fileResult = compilation.Emit(path);
                 if (fileResult.Success)
                 {
@@ -421,6 +429,8 @@
         }

+
+
         public static string GetErrorString(string content, FileLinePositionSpan linePositionSpan)
         {


Allow inheritance of Parameters

Allow inheritance of Parameters

--- src/Nethereum.ABI/FunctionEncoding/FunctionCallDecoder.cs
+++ src/Nethereum.ABI/FunctionEncoding/FunctionCallDecoder.cs
@@ -18,11 +18,11 @@
             var parameterObjects = new List<ParameterOutputProperty>();

             foreach (var property in properties)
-                if (property.IsDefined(typeof(ParameterAttribute), false))
+                if (property.IsDefined(typeof(ParameterAttribute), true))
                 {

 #if DOTNET35
-                   var parameterAttribute = (ParameterAttribute)property.GetCustomAttributes(typeof(ParameterAttribute), false)[0];
+                   var parameterAttribute = (ParameterAttribute)property.GetCustomAttributes(typeof(ParameterAttribute), true)[0];
 #else
                    var parameterAttribute = property.GetCustomAttribute<ParameterAttribute>();
 #endif
@@ -114,7 +114,7 @@
         {
             var result = new List<PropertyInfo>();
             foreach (var property in properties)
-                if (property.IsDefined(typeof(ParameterAttribute), false))
+                if (property.IsDefined(typeof(ParameterAttribute), true))
                     result.Add(property);
             return result.ToArray();
         }


'all'

'all'

--- src/Node.Net.Test/Extension/IDictionary.Extension.Test.cs
+++ src/Node.Net.Test/Extension/IDictionary.Extension.Test.cs
@@ -33,6 +33,9 @@
 			Assert.NotNull(data, nameof(data));
 			data.Collect(typeof(IDictionary));
 			data.Collect<IDictionary>(Filter);
+			data.Collect<IDictionary>("");
+			data.Collect<IDictionary>("test");
+			data.CollectKeys();
 		}
 		[Test]
 		public void DeepUpdateParents()
@@ -42,6 +45,7 @@
 			Assert.NotNull(data, nameof(data));
 			data.DeepUpdateParents();
 			IDictionaryExtension.DeepUpdateParents(null);
+			data.ComputeHashCode();
 		}
 		[Test]
 		public void GetLengthMeters()


No need to try to open the selfdiagnostic file if it does not exist (#1608)

--- src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs
+++ src/OpenTelemetry/Internal/SelfDiagnosticsConfigParser.cs
@@ -54,6 +54,11 @@
             logLevel = EventLevel.LogAlways;
             try
             {
+                if (!File.Exists(ConfigFileName))
+                {
+                    return false;
+                }
+
                 using FileStream file = File.Open(ConfigFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
                 var buffer = this.configBuffer;
                 if (buffer == null)


Update comment.

Update comment.

--- WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
+++ WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -212,7 +212,7 @@
 			IsCoinListLoading = true;
 			RefreshOrdering();

-			// Otherwise they're all selected on load.
+			// Otherwise they're all selected as null on load.
 			SelectAllCheckBoxState = false;
 			SelectPrivateCheckBoxState = false;
 			SelectNonPrivateCheckBoxState = false;


Elevate mingaplimit at recovery (#1502)

Elevate mingaplimit at recovery (#1502)

Elevate mingaplimit at recovery

--- WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
+++ WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
@@ -196,7 +196,7 @@
 			ValidationMessage = null;
 			ShowAdvancedOptions = false;
 			AccountKeyPath = $"m/{KeyManager.DefaultAccountKeyPath}";
-			MinGapLimit = KeyManager.AbsoluteMinGapLimit;
+			MinGapLimit = KeyManager.AbsoluteMinGapLimit * 3;
 		}

 		private void UpdateSuggestions(string words)


CA-286291: Remove the ToolTip from the VMOperationTollStripManuSubItem, as the reason why the item is disabled is already included in the items's MenuText

This change improves the performance of the drop-down menu considerably, as it avoids the server calls from the Command.ToolTipText

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs
+++ XenAdmin/Commands/Controls/VMOperationToolStripMenuSubItem.cs
@@ -30,11 +30,8 @@
  */

 using System;
-using System.Collections.Generic;
-using System.Text;
 using XenAdmin.Controls;
 using System.Drawing;
-using XenAPI;

 namespace XenAdmin.Commands
 {
@@ -74,8 +71,8 @@
                     SecondImage = _command.SecondImage;
                 }

-                //null is allowed (CA-147657)
-                ToolTipText = _command.ToolTipText;
+                //No tooltip needed as the reason is included in the menu text
+                //ToolTipText = _command.ToolTipText;

                 StarRating = _command.StarRating;
             }


Remove unused code

Remove unused code

--- src/Pickles/Pickles/TestFrameworks/SingleMsTestResults.cs
+++ src/Pickles/Pickles/TestFrameworks/SingleMsTestResults.cs
@@ -13,14 +13,6 @@
   {
     private static readonly XNamespace ns = @"http://microsoft.com/schemas/VisualStudio/TeamTest/2010";
     private readonly XDocument resultsDocument;
-
-    public SingleMsTestResults(Configuration configuration)
-    {
-      if (configuration.HasTestResults)
-      {
-        this.resultsDocument = this.ReadResultsFile(configuration.TestResultsFile);
-      }
-    }

     public SingleMsTestResults(FileInfoBase testResultsFile)
     {


minor bug fixed

minor bug fixed

--- source/FFImageLoading.Touch/Work/UIViewTarget.cs
+++ source/FFImageLoading.Touch/Work/UIViewTarget.cs
@@ -32,8 +32,6 @@
 		{
 			return IsValid;
 		}
-
-		public abstract void Set(ImageLoaderTask task, UIImage image, bool isLocalOrFromCache, bool isLoadingPlaceholder);

 		public override bool UsesSameNativeControl(ImageLoaderTask task)
 		{


Fix debug presentation for ExecutableTarget

--- source/Nuke.Common/Execution/ExecutableTarget.cs
+++ source/Nuke.Common/Execution/ExecutableTarget.cs
@@ -11,7 +11,7 @@

 namespace Nuke.Common.Execution
 {
-    [DebuggerDisplay("{" + nameof(ToDebugString) + "}")]
+    [DebuggerDisplay("{" + nameof(Name) + "}")]
     public class ExecutableTarget
     {
         internal ExecutableTarget()
@@ -44,10 +44,5 @@
         public TimeSpan Duration { get; internal set; }
         public bool Invoked { get; internal set; }
         public string SkipReason { get; internal set; }
-
-        internal string ToDebugString()
-        {
-            return Name;
-        }
     }
 }


Set namespace by convention

Set namespace by convention

--- AbpODataDemo-Core-vNext/aspnet-core/src/AbpODataDemo.Web.Host/ResultWrapping/ODataWrapResultFilter.cs
+++ AbpODataDemo-Core-vNext/aspnet-core/src/AbpODataDemo.Web.Host/ResultWrapping/ODataWrapResultFilter.cs
@@ -1,7 +1,7 @@
 using Abp.Web.Results.Filters;
 using System;

-namespace AbpODataDemo.ResultWrapping
+namespace AbpODataDemo.Web.Host.ResultWrapping
 {
     public class ODataWrapResultFilter : IWrapResultFilter
     {


Fix test name

Fix test name

--- test/Abp.AutoMapper.Tests/AutoMapping_Tests.cs
+++ test/Abp.AutoMapper.Tests/AutoMapping_Tests.cs
@@ -56,7 +56,7 @@
         }

         [Fact]
-        public void Should_Map_Two_Way_When_AutoMAp_Attribute_Is_Used()
+        public void Should_Map_Two_Way_When_AutoMap_Attribute_Is_Used()
         {
             MyClass3 obj2 = new MyClass3
             {


Fixing test

Fixing test

--- test/MusicStore.Test/GenreMenuComponentTest.cs
+++ test/MusicStore.Test/GenreMenuComponentTest.cs
@@ -41,7 +41,7 @@
             Assert.NotNull(result);
             var viewResult = Assert.IsType<ViewViewComponentResult>(result);
             Assert.Null(viewResult.ViewName);
-            var genreResult = Assert.IsType<List<Genre>>(viewResult.ViewData.Model);
+            var genreResult = Assert.IsType<List<string>>(viewResult.ViewData.Model);
             Assert.Equal(9, genreResult.Count);
         }


Revert "Serial (#68)"

Revert "Serial (#68)"

This reverts commit 28eab557157dc1c59ca1ff0c3f7ea9c54d251ef9.

--- test/Qwack.Math.Tests/LinearRegressionFacts.cs
+++ test/Qwack.Math.Tests/LinearRegressionFacts.cs
@@ -7,7 +7,7 @@
 {
     public class LinearRegressionFacts
     {
-        [Fact(Skip = "Failure")]
+        [Fact]
         public void VectorAndNoneVectorLinearRegressionMatches()
         {
             var rand = new System.Random();
@@ -27,6 +27,7 @@
             Assert.Equal(reg1.Alpha, reg2.Alpha);
             Assert.Equal(reg1.Beta, reg2.Beta);
             Assert.Equal(reg1.R2, reg2.R2);
+            Assert.Equal(reg1.SSE, reg2.SSE);
         }
     }
 }


Fix inconsistent API signatures

Fix inconsistent API signatures

--- src/NQuery/SemanticModel.cs
+++ src/NQuery/SemanticModel.cs
@@ -115,13 +115,13 @@
             return result == null ? null : result.TableSymbol;
         }

-        public TableInstanceSymbol GetDeclaredSymbol(TableReferenceSyntax tableReference)
+        public TableInstanceSymbol GetDeclaredSymbol(NamedTableReferenceSyntax tableReference)
         {
             var result = _bindingResult.GetBoundNode(tableReference) as BoundNamedTableReference;
             return result == null ? null : result.TableInstance;
         }

-        public Symbol GetDeclaredSymbol(DerivedTableReferenceSyntax tableReference)
+        public TableInstanceSymbol GetDeclaredSymbol(DerivedTableReferenceSyntax tableReference)
         {
             var result = _bindingResult.GetBoundNode(tableReference) as BoundDerivedTableReference;
             return result == null ? null : result.TableInstance;


Short-circuit agenda filters

Short-circuit agenda filters

--- src/NRules/NRules/Agenda.cs
+++ src/NRules/NRules/Agenda.cs
@@ -136,17 +136,16 @@

         private bool AcceptActivation(Activation activation)
         {
-            bool result = true;
             foreach (var filter in _globalFilters)
             {
-                if (!filter.Accept(activation)) result = false;
+                if (!filter.Accept(activation)) return false;
             }
-            if (!_ruleFilters.TryGetValue(activation.Rule, out var ruleFilters)) return result;
+            if (!_ruleFilters.TryGetValue(activation.Rule, out var ruleFilters)) return true;
             foreach (var filter in ruleFilters)
             {
-                if (!filter.Accept(activation)) result = false;
+                if (!filter.Accept(activation)) return false;
             }
-            return result;
+            return true;
         }

         private static void UnlinkFacts(ISessionInternal session, Activation activation)


Better confirmation messages

Better confirmation messages

--- src/PhotoVersionCommands.cs
+++ src/PhotoVersionCommands.cs
@@ -230,9 +230,9 @@
 		public bool Execute (PhotoStore store, Photo [] photos, Photo new_parent, Gtk.Window parent_window)
 		{
 			string ok_caption = Catalog.GetString ("Re_parent");
-			string msg = String.Format (Catalog.GetPluralString ("Really reparent selected photo as version of {1}?",
-			                                                     "Really reparent {0} selected photos as versions of {1}?", photos.Length),
-			                            photos.Length, new_parent.Name.Replace ("_", "__"));
+			string msg = String.Format (Catalog.GetPluralString ("Really reparent \"{2}\" as version of \"{1}\"?",
+			                                                     "Really reparent {0} photos as versions of \"{1}\"?", photos.Length),
+			                            photos.Length, new_parent.Name.Replace ("_", "__"), photos[0].Name.Replace ("_", "__"));
 			string desc = Catalog.GetString ("This makes the photos appear as a single one in the library. The versions can be detached using the Photo menu.");

 			try {


Angular-CSharp template variable naming (#13423)

--- src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs
+++ src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/Controllers/OidcConfigurationController.cs
@@ -6,12 +6,12 @@
 {
     public class OidcConfigurationController : Controller
     {
-        private readonly ILogger<OidcConfigurationController> logger;
+        private readonly ILogger<OidcConfigurationController> _logger;

-        public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger<OidcConfigurationController> _logger)
+        public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger<OidcConfigurationController> logger)
         {
             ClientRequestParametersProvider = clientRequestParametersProvider;
-            logger = _logger;
+            _logger = logger;
         }

         public IClientRequestParametersProvider ClientRequestParametersProvider { get; }


Auto-detect use of Facebook JavaScript SDK

--- Assets/Carrot/Carrot.cs
+++ Assets/Carrot/Carrot.cs
@@ -389,12 +389,19 @@

     #region Internal
     /// @cond hide_from_doxygen
+    public enum FacebookSDKType : int
+    {
+        None = -1,
+        OfficialUnitySDK = 0,
+        JavaScriptSDK = 1
+    }
+
     Carrot()
     {
         mCarrotCache = new CarrotCache();
         this.InstallDate = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(mCarrotCache.InstallDate);

-        // Check to see if the official Facebook SDK is included
+        // Check to see if the official Facebook SDK is being used
         mFacebookDelegateType = Type.GetType("Facebook.FacebookDelegate,IFacebook");
         if(mFacebookDelegateType != null)
         {
@@ -405,8 +412,36 @@
             mFBResultPropertyText = t.GetProperty("Text");
             mFBResultPropertyError = t.GetProperty("Error");
             mFacebookDelegateType = Type.GetType("Facebook.FacebookDelegate,IFacebook");
-        }
-    }
+
+            if(mFacebookDelegateType != null &&
+               mOfficialFBSDKFeedMethod != null &&
+               mFBResultPropertyText != null &&
+               mFBResultPropertyError != null &&
+               mFacebookDelegateType != null)
+            {
+                mFacebookSDKType = FacebookSDKType.OfficialUnitySDK;
+            }
+        }
+#if UNITY_WEBPLAYER
+        // If on Unity WebPlayer, some use the JavaScript SDK
+        else
+        {
+            Application.ExternalEval("if(window.__carrotUnityInstance == null || window.__carrotUnityInstance == undefined) {" +
+                                     "    window.__carrotUnityInstance = UnityObject2.instances[0];" +
+                                     "}" +
+                                     "window.__carrotUnityInstance.getUnity().SendMessage('CarrotGameObject', 'assignUnityObject2Instance', 'window.__carrotUnityInstance');"
+            );
+        }
+#endif
+    }
+
+#if UNITY_WEBPLAYER
+    private void assignUnityObject2Instance(string message)
+    {
+        mFacebookSDKType = FacebookSDKType.JavaScriptSDK;
+        mUnityObject2Instance = message;
+    }
+#endif

     private CarrotRequestResponse cachedRequestHandler(CarrotCache.CachedRequest cachedRequest,
                                                        CarrotRequestResponse callback)
@@ -928,6 +963,8 @@
     private string mAccessTokenOrFacebookId;
     private CarrotCache mCarrotCache;
     private long mSessionStartTime;
+    private FacebookSDKType mFacebookSDKType = FacebookSDKType.None;
+    private string mUnityObject2Instance = null;
     private MethodInfo mOfficialFBSDKFeedMethod;
     private PropertyInfo mFBResultPropertyText;
     private PropertyInfo mFBResultPropertyError;


Removed unused code lines

Removed unused code lines

--- PART/Source/CprBroker/ServicePlatform.Tests/ServicePlatformDataProvider/ServicePlatformDataProviderTests.Sftp.cs
+++ PART/Source/CprBroker/ServicePlatform.Tests/ServicePlatformDataProvider/ServicePlatformDataProviderTests.Sftp.cs
@@ -94,13 +94,14 @@
                 var prov = ServicePlatformDataProviderFactory.Create();
                 String fileName2LocalPath = Utilities.Strings.EnsureEndString(prov.ExtractsFolder, "\\", true) + fileName2;
                 Assert.False(File.Exists(fileName2LocalPath));
+
                 prov.DownloadFile(fileName2, 0);
+
                 Assert.True(File.Exists(fileName2LocalPath));
                 Assert.True(File.Exists(fileName2LocalPath + CprBroker.Providers.ServicePlatform.Constants.MetaDataFilePostfix));
-                File.Delete(fileName2LocalPath);
-                Assert.False(File.Exists(fileName2LocalPath));
+
+                File.Delete(fileName2LocalPath);
                 File.Delete(fileName2LocalPath + CprBroker.Providers.ServicePlatform.Constants.MetaDataFilePostfix);
-                Assert.False(File.Exists(fileName2LocalPath + CprBroker.Providers.ServicePlatform.Constants.MetaDataFilePostfix));
             }

             [TearDown]


changing sync gesture to double tap before spread fingers recognition is improved

--- ZombieShooter/Assets/Scripts/MyoHandler.cs
+++ ZombieShooter/Assets/Scripts/MyoHandler.cs
@@ -57,7 +57,8 @@
         if (thalmicMyo.pose != _lastPose) {
             _lastPose = thalmicMyo.pose;

-            if (thalmicMyo.pose == Pose.FingersSpread) {
+            //if (thalmicMyo.pose == Pose.FingersSpread) {
+            if (thalmicMyo.pose == Pose.DoubleTap) {
                 updateReference = true;

                 ExtendUnlockAndNotifyUserAction(thalmicMyo);


minor optimization for excluding empty syllable slots

git-svn-id: 20792e741222cff084d07cff69ca4ceb56fee0da@88 c8c96672-cb5c-11de-b058-13285e7dd63e


[bugfix] Test if the file exists before parsing it as PE


prints stats - problems per module and time for analysis


New clientlib ver

New clientlib ver


Fix weapons link

Fix weapons link

--- Battery-Commander.Web/Views/Shared/Components/Navigation/Default.cshtml
+++ Battery-Commander.Web/Views/Shared/Components/Navigation/Default.cshtml
@@ -23,7 +23,7 @@

@Html.ActionLink("My Vehicles", "Index", "Vehicles", new VehicleService.Query { Units = new[] { Model.Soldier.UnitId } }, new { @class = "nav-link" })

@Html.ActionLink("APFT", "Index", "APFT", new SoldierService.Query { Unit = Model.Soldier.UnitId }, new { @class = "nav-link" })

@Html.ActionLink("ABCP", "Index", "ABCP", new SoldierService.Query { Unit = Model.Soldier.UnitId }, new { @class = "nav-link" })

-
Weapons

+
Weapons

SSD

                 }
                 else


Extend the extension methods test case again

--- tests/cs/extension-methods/ExtensionMethods.cs
+++ tests/cs/extension-methods/ExtensionMethods.cs
@@ -37,5 +37,9 @@
         {
             Console.WriteLine(x);
         }
+        foreach (var x in items.Concat<int>(new int[] { 40, 50 }))
+        {
+            Console.WriteLine(x);
+        }
     }
 }


clean up main

clean up main

--- GearUp/Program.cs
+++ GearUp/Program.cs
@@ -9,7 +9,6 @@
 		public static void Main(string[] args)
 		{
 			Console.WriteLine("Args:\n" + string.Join("\n", args));
-
 			var config = WebApplicationConfiguration.GetDefault(args);

 			var application = new WebApplicationBuilder()
@@ -17,19 +16,8 @@
 				.UseStartup<Startup>()
 				.Build();

-			string port = System.Environment.GetEnvironmentVariable("HTTP_PLATFORM_PORT");
-			if (string.IsNullOrEmpty(port))
-			{
-				port = "5000";
-			}
-
-			Console.WriteLine("Port: " + port);
-
 			var addresses = application.GetAddresses();
 			Console.WriteLine("Listening on " + string.Join(", ", addresses));
-
-			addresses.Clear();
-			addresses.Add("http://localhost:" + port);

 			try
 			{


desing: moved search button to the right

--- DND.Gui/SearchInputControl.cs
+++ DND.Gui/SearchInputControl.cs
@@ -99,6 +99,8 @@

             txtInput.MouseEnter += onTxtMouseEnter;
             txtInput.MouseLeave += onTxtMouseLeave;
+            txtInput.MouseMove += onTxtMouseMove;
+            txtInput.TextChanged += onTxtTextChanged;
         }

         /// <summary>
@@ -116,14 +118,17 @@
             int textBoxHeight = Height - padding;
             int textBoxTop = AbsTop + 1;
             // Text field: search icon on left, X icon on right
+            // ctrlHeight stands for width of buttons (they're all rectangular)
             // Position must be in absolute (canvas) position, winforms controls' onwer is borderless form.
             // Position below is suitable for Noto, but not for Segoe.
-            //txtInput.Location = new Point(AbsLeft + padding + ctrlHeight + padding, AbsTop + padding);
-            txtInput.Location = new Point(AbsLeft + padding + ctrlHeight + padding, AbsTop + 1);
+            //txtInput.Location = new Point(AbsLeft + padding, AbsTop + padding);
+            txtInput.Location = new Point(AbsLeft + padding, AbsTop + 1);
             txtInput.Size = new Size(Width - 4 * padding - 2 * ctrlHeight, textBoxHeight);

-            // Cancel button: right-aligned
-            btnCancel.RelLocation = new Point(Width - padding - btnCancel.Width, 2 * padding / 3);
+            // Search button: right-aligned
+            btnSearch.RelLocation = new Point(Width - padding - btnSearch.Width, padding);
+            // Cancel button: right-aligned, to the left of search button
+            btnCancel.RelLocation = new Point(Width - btnSearch.Width - padding - btnCancel.Width, padding);
         }

         /// <summary>
@@ -167,9 +172,11 @@
         /// <returns></returns>
         private bool isCancelVisible()
         {
+            if (txtInput.Text == string.Empty) return false;
             Point p = MousePosition;
-            Rectangle rect = new Rectangle(txtInput.Left, 1, Width - txtInput.Left - 1, Height - 2);
-            return rect.Contains(p);
+            Rectangle rect = new Rectangle(1, 1, btnCancel.RelRight - 1, Height - 2);
+            bool visible = rect.Contains(p);
+            return visible;
         }

         /// <summary>
@@ -178,7 +185,9 @@
         public override bool DoMouseMove(Point p, MouseButtons button)
         {
             base.DoMouseMove(p, button);
+            bool visibleBefore = btnCancel.Visible;
             btnCancel.Visible = isCancelVisible();
+            if (btnCancel.Visible != visibleBefore) MakeMePaint(false, RenderMode.Invalidate);
             return true;
         }

@@ -188,42 +197,55 @@
         public override void DoMouseEnter()
         {
             base.DoMouseEnter();
+            bool visibleBefore = btnCancel.Visible;
             btnCancel.Visible = isCancelVisible();
+            if (btnCancel.Visible != visibleBefore) MakeMePaint(false, RenderMode.Invalidate);
+        }
+
+        /// <summary>
+        /// Handles the mouse leave event to update visibility of "clear text" button.
+        /// </summary>
+        public override void DoMouseLeave()
+        {
+            base.DoMouseLeave();
+            bool visibleBefore = btnCancel.Visible;
+            btnCancel.Visible = false;
+            if (btnCancel.Visible != visibleBefore) MakeMePaint(false, RenderMode.Invalidate);
+        }
+
+        /// <summary>
+        /// Handles the text box's mouse leave event to update visibility of "clear text" button.
+        /// </summary>
+        private void onTxtMouseLeave(object sender, EventArgs e)
+        {
+            // Pointer may leave text box but still be inside me
+            if (sender == txtInput)
+            {
+                btnCancel.Visible = isCancelVisible();
+                MakeMePaint(false, RenderMode.Invalidate);
+            }
+        }
+
+        /// <summary>
+        /// Handles the text box's mouse enter event to update visibility of "clear text" button.
+        /// </summary>
+        private void onTxtMouseEnter(object sender, EventArgs e)
+        {
+            btnCancel.Visible = txtInput.Text != string.Empty;
             MakeMePaint(false, RenderMode.Invalidate);
         }

-        /// <summary>
-        /// Handles the mouse leave event to update visibility of "clear text" button.
-        /// </summary>
-        public override void DoMouseLeave()
-        {
-            base.DoMouseLeave();
-            btnCancel.Visible = false;
+        private void onTxtMouseMove(object sender, MouseEventArgs e)
+        {
+            btnCancel.Visible = txtInput.Text != string.Empty;
             MakeMePaint(false, RenderMode.Invalidate);
         }

-        /// <summary>
-        /// Handles the text box's mouse leave event to update visibility of "clear text" button.
-        /// </summary>
-        private void onTxtMouseLeave(object sender, EventArgs e)
-        {
-            // Pointer may lease text box but still be inside me
-            if (sender == txtInput)
-            {
-                Point p = MousePositionAbs;
-                if (AbsRect.Contains(p)) return;
-            }
-            DoMouseLeave();
-        }
-
-        /// <summary>
-        /// Handles the text box's mouse enter event to update visibility of "clear text" button.
-        /// </summary>
-        private void onTxtMouseEnter(object sender, EventArgs e)
-        {
-            if (btnCancel.Visible) return;
-            btnCancel.Visible = true;
-            MakeMePaint(false, RenderMode.Invalidate);
+        private void onTxtTextChanged(object sender, EventArgs e)
+        {
+            bool visibleBefore = btnCancel.Visible;
+            btnCancel.Visible = isCancelVisible();
+            if (btnCancel.Visible != visibleBefore) MakeMePaint(false, RenderMode.Invalidate);
         }

         /// <summary>


Improved cookie handling for the StartSessionAsync / EndSessionAsync [release]

--- Dapplo.Jira.Shared/JiraApi.cs
+++ Dapplo.Jira.Shared/JiraApi.cs
@@ -639,6 +639,10 @@
 			{
 				throw new ArgumentNullException(nameof(password));
 			}
+			if (!_behaviour.HttpSettings.UseCookies)
+			{
+				throw new ArgumentException("Cookies need to be enabled", nameof(IHttpSettings.UseCookies));
+			}
 			var sessionUri = JiraAuthUri.AppendSegments("session");

 			_behaviour.MakeCurrent();
@@ -650,7 +654,6 @@

 			HandleErrors(response);

-			_behaviour.CookieContainer.Add(JiraBaseUri, new Cookie(response.Response.Session.Name, response.Response.Session.Value));
 			return response.Response.LoginInfo;
 		}

@@ -659,9 +662,11 @@
 		/// </summary>
 		public async Task EndSessionAsync(CancellationToken cancellationToken = default(CancellationToken))
 		{
-			var sessionCookie = _behaviour.CookieContainer.GetCookies(JiraBaseUri).Cast<Cookie>().FirstOrDefault();
-
-			if (sessionCookie != null)
+			// Find the cookie to expire
+			var sessionCookies = _behaviour.CookieContainer.GetCookies(JiraBaseUri).Cast<Cookie>().ToList();
+
+			// check if a cookie was found, if not skip the end session
+			if (sessionCookies.Any())
 			{
 				var sessionUri = JiraAuthUri.AppendSegments("session");

@@ -672,8 +677,12 @@
 				{
 					throw new Exception($"Status: {response.StatusCode} Message: Failed to close jira session");
 				}
-				// Remove the cookie
-				sessionCookie.Expired = true;
+				// Expire the cookie
+				foreach (var sessionCookie in sessionCookies)
+				{
+					sessionCookie.Expired = true;
+				}
+
 			}
 		}


DeleteByIds support. #71

DeleteByIds support. #71

--- DataCore.Database/Database.cs
+++ DataCore.Database/Database.cs
@@ -135,6 +135,27 @@
             Execute(query, parameters);
         }

+        public void DeleteById<T>(params object[] ids)
+        {
+            var type = typeof(T);
+            var tableName = GetTableName(type);
+
+            var idProperty = GetIdPropertyForType(typeof(T));
+
+            var parameters = new Parameters();
+            foreach (var id in ids)
+            {
+                parameters.Add(Translator, id);
+            }
+            var inParams = string.Join(",", parameters.GetValues().Select(kv => kv.Key));
+
+            var whereQuery = string.Concat(idProperty.Name, " IN (", inParams, ")");
+
+            var query = Translator.GetDeleteQuery(tableName, whereQuery, parameters);
+
+            Execute(query, parameters);
+        }
+
         public int CreateTableIfNotExists<T>()
         {
             var type = typeof(T);


DbMetal: fix on parameters parsing

DbMetal: fix on parameters parsing

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@484 33146b6e-df29-0410-a1ca-39be37fb9416

--- DbMetal/AbstractParameters.cs
+++ DbMetal/AbstractParameters.cs
@@ -309,7 +309,10 @@
         /// <returns></returns>
         public string[] GetArray(string list)
         {
-            return (from entityInterface in list.Split(',') select entityInterface.Trim()).ToArray();
+            if (string.IsNullOrEmpty(list))
+                return new string[0];
+            return (from entityInterface in list.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
+                    select entityInterface.Trim()).ToArray();
         }

         /// <summary>


Add Kerbal and Science recovery

Add Kerbal and Science recovery

--- DebRefund/DebRefundManager.cs
+++ DebRefund/DebRefundManager.cs
@@ -14,13 +14,19 @@
             DontDestroyOnLoad(this);

             print("DebRefund Awake");
-
+            GameEvents.onVesselGoOnRails.Add(this.onVesselGoOnRails);
             GameEvents.onVesselDestroy.Add(this.onVesselDestroy);
         }

         public void OnDestroy()
         {
             print("DebRefund Destroy");
+        }
+
+        public void onVesselGoOnRails(Vessel v)
+        {
+            //ShipConstruction.FindVesselsAtLaunchSite(
+
         }

         public void onVesselDestroy(Vessel v)
@@ -165,13 +171,22 @@

                 if (drag > mass * 70)
                 {
+                    List<String> crew = RecoverKerbals(v);
                     float recFactor = CalculateRecoveryFactor(v);
                     if (drag > mass * 90)
                     {
+                        float Science = RecoverScience(v, 0.95f);
                         StringBuilder Message = new StringBuilder();
                         Message.AppendLine("Debris was landed safely");
                         Message.Append(partlist.ToString());
                         Message.AppendFormat("{0} refunded({1:P2})", recFactor * cost, recFactor);
+                        Message.AppendLine();
+                        Message.AppendFormat("Science Recovered: {0}(95%)", Science);
+                        Message.AppendLine();
+                        foreach (string member in crew)
+                        {
+                            Message.AppendLine(member + " Recovered");
+                        }
                         Funding.Instance.Funds += recFactor * cost;
                         MessageSystem.Message m = new MessageSystem.Message(
                             "Debris landed safely",
@@ -183,11 +198,19 @@
                     else
                     {
                         float damageFactor = Mathf.Lerp(0.9f, 0.5f, Mathf.InverseLerp(mass * 90, mass * 70, drag));
+                        float Science = RecoverScience(v, damageFactor);
                         StringBuilder Message = new StringBuilder();
                         Message.AppendLine("Debris was landed with some damage");
                         Message.Append(partlist.ToString());
                         Message.AppendFormat("{0} refunded({1:P2})", recFactor * cost * damageFactor, recFactor * damageFactor);
                         Funding.Instance.Funds += recFactor * cost * damageFactor;
+                        Message.AppendLine();
+                        Message.AppendFormat("Science Recovered: {0}({1:P2})", Science, damageFactor);
+                        Message.AppendLine();
+                        foreach (string member in crew)
+                        {
+                            Message.AppendLine(member + " Recovered");
+                        }
                         MessageSystem.Message m = new MessageSystem.Message(
                             "Debris landed",
                             Message.ToString(),
@@ -195,7 +218,7 @@
                             MessageSystemButton.ButtonIcons.ALERT);
                         MessageSystem.Instance.AddMessage(m);
                     }
-
+
                 }
                 else
                 {
@@ -212,6 +235,38 @@
             }
         }

+        public List<String> RecoverKerbals(Vessel v)
+        {
+            List<String> crew = new List<string>();
+            foreach (ProtoCrewMember pcm in v.protoVessel.GetVesselCrew())
+            {
+                pcm.rosterStatus = ProtoCrewMember.RosterStatus.Available;
+                crew.Add(pcm.KerbalRef.crewMemberName);
+            }
+            return crew;
+        }
+
+        public float RecoverScience(Vessel v, float Damage)
+        {
+            float SciRecovered = 0f;
+            foreach (ProtoPartSnapshot p in v.protoVessel.protoPartSnapshots)
+            {
+                foreach (ProtoPartModuleSnapshot pm in p.modules)
+                {
+                    Debug.Log("DebRefund: " + pm.moduleValues.HasNode("ScienceData"));
+                    foreach (ConfigNode sciNode in pm.moduleValues.GetNodes("ScienceData"))
+                    {
+                        ScienceData sci = new ScienceData(sciNode);
+
+                        ScienceSubject sciSub = ResearchAndDevelopment.GetSubjectByID(sci.subjectID);
+
+                        SciRecovered += ResearchAndDevelopment.Instance.SubmitScienceData(sci.dataAmount, sciSub, Damage);
+                    }
+                }
+            }
+            return SciRecovered;
+        }
+
         public float CalculateRecoveryFactor(Vessel v)
         {
             var cb = SpaceCenter.Instance.cb;


Made DataType class a struct, simplified some literals.

--- HedgeLib/Types.cs
+++ HedgeLib/Types.cs
@@ -20,22 +20,22 @@

             //4-Byte Values
             new DataType(typeof(int), 0, "signed int", "integer", "sint32", "int"),
-            new DataType(typeof(uint), (uint)0,
-                "unsigned int", "unsigned integer", "uint32", "uint", "target"),
-            new DataType(typeof(float), 0.0f, "single", "float"),
+            new DataType(typeof(uint), 0u, "unsigned int",
+				"unsigned integer", "uint32", "uint", "target"),
+            new DataType(typeof(float), 0f, "single", "float"),

             new DataType(typeof(uint[]), new uint[0], "uint32array"),

             //8-Byte Values
             new DataType(typeof(long), 0L, "signed long", "sint64", "long"),
-            new DataType(typeof(ulong), (ulong)0, "unsigned long", "uint64", "ulong"),
-            new DataType(typeof(double), 0.0D, "double"),
+            new DataType(typeof(ulong), 0UL, "unsigned long", "uint64", "ulong"),
+            new DataType(typeof(double), 0D, "double"),

             //12-Byte Values
             new DataType(typeof(Vector3), new Vector3(), "vect", "vector", "vector3", "position"),

             //16-Byte Values
-            new DataType(typeof(decimal), 0.0M, "decimal"),
+            new DataType(typeof(decimal), 0M, "decimal"),
             new DataType(typeof(Vector4), new Vector4(), "vector4"),
             new DataType(typeof(Quaternion), new Quaternion(), "quat", "quaternion"),

@@ -81,7 +81,7 @@
         }
     }

-    public class DataType
+    public struct DataType
     {
         //Variables/Constants
         public string[] Identifiers;


Учитывются неопределенные параметры в методе СтрШаблон. fixes #269

--- src/ScriptEngine.HostedScript/Library/StringOperations.cs
+++ src/ScriptEngine.HostedScript/Library/StringOperations.cs
@@ -293,7 +293,7 @@

             var re = new System.Text.RegularExpressions.Regex(@"(%%)|(%\d+)|(%\D)");
             int matchCount = 0;
-            int passedArgsCount = arguments.Skip(1).Where(x => x != null).Count();
+            int passedArgsCount = arguments.Skip(1).Where(x => x != null && x.DataType != DataType.Undefined).Count();
             var result = re.Replace(srcFormat, (m) =>
             {
                 if (m.Groups[1].Success)


fixed feature RomanNumeral.Instantiation

--- src/SharpRomans.Tests/Spec/Roman_Numeral/Instantiation.cs
+++ src/SharpRomans.Tests/Spec/Roman_Numeral/Instantiation.cs
@@ -7,7 +7,7 @@

 namespace SharpRomans.Tests.Spec.Roman_Numeral
 {
-	[Category("Spec"), Category("RomanNumeral"), Category("Instantiation")]
+	[Category("Spec", Subject = "RomanNumeral", Feature = "Instantiation")]
 	[Collection("bddfy")]
 	[Story(
 		Title = "creation of roman numerals",
@@ -22,33 +22,33 @@
 		{

 			this.WithTags("RomanNumeral", "Creation", "Outside range")
-				.Given(_ => _.anArabicNumeral_(-20))
+				.Given(_ => _.theArabicNumeral(-20))
 				.When(_ => _.theRomanNumeralIsInstantiating())
 				.Then(_ => _.aRangeExceptionIsThrown())
 				.BDDfy("negative number");

 			this.WithTags("RomanNumeral", "Creation", "Outside range")
-				.Given(_ => _.anArabicNumeral_(4001))
+				.Given(_ => _.theArabicNumeral(4001))
 				.When(_ => _.theRomanNumeralIsInstantiating())
 				.Then(_ => _.aRangeExceptionIsThrown())
 				.BDDfy("overflowing number");

 			this.WithTags("RomanNumeral", "Creation", "Within range")
-				.Given(_ => _.anArabicNumeral_(0))
+				.Given(_ => _.theArabicNumeral(0))
 				.When(_ => _.theRomanNumeralIsInstantiated())
-				.Then(_ => _.isARomanNumeralWithValue_(0))
+				.Then(_ => _.isARomanNumeralWithValue(0))
 				.BDDfy("zero");

 			this.WithTags("RomanNumeral", "Creation", "Within range")
-				.Given(_ => _.anArabicNumeral_(50))
+				.Given(_ => _.theArabicNumeral(50))
 				.When(_ => _.theRomanNumeralIsInstantiated())
-				.Then(_ => _.isARomanNumeralWithValue_(50))
+				.Then(_ => _.isARomanNumeralWithValue(50))
 				.BDDfy("single-figure");

 			this.WithTags("RomanNumeral", "Creation", "Within range")
-				.Given(_ => _.anArabicNumeral_(75))
+				.Given(_ => _.theArabicNumeral(75))
 				.When(_ => _.theRomanNumeralIsInstantiated())
-				.Then(_ => _.isARomanNumeralWithValue_(75))
+				.Then(_ => _.isARomanNumeralWithValue(75))
 				.BDDfy("multiple-figures");
 		}

@@ -56,26 +56,26 @@
 		public void Instances()
 		{
 			this.WithTags("RomanNumeral", "Creation", "Peculiar")
-				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Zero)))
+				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Zero)), "the '{0}' roman numeral")
 				.When(_ => _.itIsAccessed())
-				.Then(_ => _.isARomanNumeralWithValue_(0))
+				.Then(_ => _.isARomanNumeralWithValue(0))
 				.BDDfy("zero");

 			this.WithTags("RomanNumeral", "Creation", "Peculiar")
-				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Min)))
+				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Min)), "the '{0}' roman numeral")
 				.When(_ => _.itIsAccessed())
-				.Then(_ => _.isARomanNumeralWithValue_(RomanNumeral.MinValue))
+				.Then(_ => _.isARomanNumeralWithValue(RomanNumeral.MinValue))
 				.BDDfy("min");

 			this.WithTags("RomanNumeral", "Creation", "Peculiar")
-				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Max)))
+				.Given(_ => _.the_RomanNumeral(Ins.tance(() => RomanNumeral.Max)), "the '{0}' roman numeral")
 				.When(_ => _.itIsAccessed())
-				.Then(_ => _.isARomanNumeralWithValue_(RomanNumeral.MaxValue))
+				.Then(_ => _.isARomanNumeralWithValue(RomanNumeral.MaxValue))
 				.BDDfy("max");
 		}

 		ushort _number;
-		private void anArabicNumeral_(int number)
+		private void theArabicNumeral(int number)
 		{
 			_number = (ushort)number;
 		}
@@ -107,7 +107,7 @@
 			Assert.Contains(RomanNumeral.MaxValue.ToString(CultureInfo.InvariantCulture), ex.Message);
 		}

-		private void isARomanNumeralWithValue_(int value)
+		private void isARomanNumeralWithValue(int value)
 		{
 			Assert.Equal(value, _subject.Value);
 		}


Split single DivikResultLoaderTests test into several separate

--- src/Spectre.Algorithms.Tests/Io/DivikResultLoaderTests.cs
+++ src/Spectre.Algorithms.Tests/Io/DivikResultLoaderTests.cs
@@ -29,6 +29,13 @@
     public class DivikResultLoaderTests
     {
         private readonly string _testFilesDirectory = TestContext.CurrentContext.TestDirectory + "\\..\\..\\..\\..\\..\\test_files";
+        private string _samplePath;
+
+        [SetUp]
+        public void SetUp()
+        {
+            _samplePath = Path.GetFullPath(Path.Combine(_testFilesDirectory, "sample_divik_result.mat"));
+    }

         [Test]
         public void InitializesWithMcrBackend()
@@ -42,22 +49,92 @@
         }

         [Test]
-        public void LoadsTree()
+        public void LoadsTreeWithoutException()
         {
-            var samplePath = Path.GetFullPath(Path.Combine(_testFilesDirectory, "sample_divik_result.mat"));
-            DivikResult tree = null;
             using (var loader = new DivikResultLoader())
             {
-                Assert.DoesNotThrow(code: () => tree = loader.Load(samplePath));
+                Assert.DoesNotThrow(code: () => loader.Load(_samplePath));
             }
-            Assert.NotNull(tree);
-            Assert.AreEqual(expected: 12.3806, actual: tree.AmplitudeThreshold, delta: 0.001);
-            Assert.AreEqual(expected: float.NegativeInfinity, actual: tree.VarianceThreshold);
-            Assert.AreEqual(expected: 2398, actual: tree.AmplitudeFilter.Length);
-            Assert.AreEqual(expected: 2263, actual: tree.VarianceFilter.Length);
-            Assert.AreEqual(expected: 7671, actual: tree.Merged.Length);
-            Assert.AreEqual(expected: 2, actual: tree.Subregions.Length);
-            Assert.NotNull(anObject: tree.Subregions[0]);
+        }
+
+        [Test]
+        public void LoadedTreeIsNotNull()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.NotNull(tree);
+            }
+        }
+
+        [Test]
+        public void LoadsAmplitudeThreshold()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: 12.3806, actual: tree.AmplitudeThreshold, delta: 0.001);
+            }
+        }
+
+        [Test]
+        public void LoadsVarianceThreshold()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: float.NegativeInfinity, actual: tree.VarianceThreshold);
+            }
+        }
+
+        [Test]
+        public void LoadsAmplitudeFilterOfProperLength()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: 2398, actual: tree.AmplitudeFilter.Length);
+            }
+        }
+
+        [Test]
+        public void LoadsVarianceFilterOfProperLength()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: 2263, actual: tree.VarianceFilter.Length);
+            }
+        }
+
+        [Test]
+        public void LoadsMergedPartitionOfProperLength()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: 7671, actual: tree.Merged.Length);
+            }
+        }
+
+        [Test]
+        public void LoadsSubregions()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.AreEqual(expected: 2, actual: tree.Subregions.Length);
+            }
+        }
+
+        [Test]
+        public void LoadedSubregionsAreNotNullIfExisted()
+        {
+            using (var loader = new DivikResultLoader())
+            {
+                var tree = loader.Load(_samplePath);
+                Assert.NotNull(anObject: tree.Subregions[0]);
+            }
         }
     }
 }


Fix in API validation

Fix in API validation

--- src/Squidex/Controllers/Api/Schemas/Models/AddFieldDto.cs
+++ src/Squidex/Controllers/Api/Schemas/Models/AddFieldDto.cs
@@ -18,7 +18,7 @@
         /// The name of the field. Must be unique within the schema.
         /// </summary>
         [Required]
-        [RegularExpression("^[a-z0-9]+(\\-[a-z0-9]+)*$")]
+        [RegularExpression("^[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*$")]
         public string Name { get; set; }

         /// <summary>


chore(CSP): add leafletjs to CSP

chore(CSP): add leafletjs to CSP

--- src/StockportWebapp/Utils/ContentSecurityPolicyBuilder.cs
+++ src/StockportWebapp/Utils/ContentSecurityPolicyBuilder.cs
@@ -136,7 +136,8 @@
 				.AddSource("*.cloudfront.net/butotv/live/", false, true)
                 .AddSource("tagmanager.google.com/")
 				.AddSource("https://wpcc.io/lib/1.0.2/cookieconsent.min.css")
-                .Finish());
+                .AddSource("unpkg.com/")
+				.Finish());
 		}

 		private void BuildScriptSource()
@@ -191,6 +192,7 @@
 				.AddSource("widget.wheredoivote.co.uk/")
 				.AddSource("https://static.hotjar.com/")
 				.AddSource("https://wpcc.io/lib/1.0.2/cookieconsent.min.js")
+                .AddSource("unpkg.com/")
                 .Finish());
 		}


Refactor AbpRepositoryBase async operations

--- src/Abp/Domain/Repositories/AbpRepositoryBase.cs
+++ src/Abp/Domain/Repositories/AbpRepositoryBase.cs
@@ -139,9 +139,10 @@
             return Insert(entity).Id;
         }

-        public virtual Task<TPrimaryKey> InsertAndGetIdAsync(TEntity entity)
-        {
-            return Task.FromResult(InsertAndGetId(entity));
+        public virtual async Task<TPrimaryKey> InsertAndGetIdAsync(TEntity entity)
+        {
+            var insertedEntity = await InsertAsync(entity);
+            return insertedEntity.Id;
         }

         public virtual TEntity InsertOrUpdate(TEntity entity)
@@ -163,9 +164,10 @@
             return InsertOrUpdate(entity).Id;
         }

-        public virtual Task<TPrimaryKey> InsertOrUpdateAndGetIdAsync(TEntity entity)
-        {
-            return Task.FromResult(InsertOrUpdateAndGetId(entity));
+        public virtual async Task<TPrimaryKey> InsertOrUpdateAndGetIdAsync(TEntity entity)
+        {
+            var insertedEntity = await InsertOrUpdateAsync(entity);
+            return insertedEntity.Id;
         }

         public abstract TEntity Update(TEntity entity);
@@ -194,7 +196,7 @@
         public virtual Task DeleteAsync(TEntity entity)
         {
             Delete(entity);
-            return Task.FromResult(0);
+            return Task.CompletedTask;
         }

         public abstract void Delete(TPrimaryKey id);
@@ -202,21 +204,25 @@
         public virtual Task DeleteAsync(TPrimaryKey id)
         {
             Delete(id);
-            return Task.FromResult(0);
+            return Task.CompletedTask;
         }

         public virtual void Delete(Expression<Func<TEntity, bool>> predicate)
         {
-            foreach (var entity in GetAll().Where(predicate).ToList())
+            foreach (var entity in GetAllList(predicate))
             {
                 Delete(entity);
             }
         }

-        public virtual Task DeleteAsync(Expression<Func<TEntity, bool>> predicate)
-        {
-            Delete(predicate);
-            return Task.FromResult(0);
+        public virtual async Task DeleteAsync(Expression<Func<TEntity, bool>> predicate)
+        {
+            var entities = await GetAllListAsync(predicate);
+
+            foreach (var entity in entities)
+            {
+                await DeleteAsync(entity);
+            }
         }

         public virtual int Count()
@@ -231,7 +237,7 @@

         public virtual int Count(Expression<Func<TEntity, bool>> predicate)
         {
-            return GetAll().Where(predicate).Count();
+            return GetAll().Count(predicate);
         }

         public virtual Task<int> CountAsync(Expression<Func<TEntity, bool>> predicate)
@@ -251,7 +257,7 @@

         public virtual long LongCount(Expression<Func<TEntity, bool>> predicate)
         {
-            return GetAll().Where(predicate).LongCount();
+            return GetAll().LongCount(predicate);
         }

         public virtual Task<long> LongCountAsync(Expression<Func<TEntity, bool>> predicate)


Fixed launching application on Linux

Fixed launching application on Linux

--- src/Assets/Scripts/Patcher/PatcherApplication.cs
+++ src/Assets/Scripts/Patcher/PatcherApplication.cs
@@ -53,7 +53,7 @@
             }
             else if (Application.platform == RuntimePlatform.LinuxPlayer)
             {
-                var executableFile = directoryInfo.GetDirectories("*", SearchOption.TopDirectoryOnly).Where(info =>
+                var executableFile = directoryInfo.GetFiles("*", SearchOption.TopDirectoryOnly).Where(info =>
                 {
                     // Read magic bytes
                     using (FileStream executableFileStream = File.OpenRead(info.FullName))


Add license to Sum indicator

Add license to Sum indicator

--- Indicators/Sum.cs
+++ Indicators/Sum.cs
@@ -1,12 +1,23 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/*
+ * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
+ * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+

 namespace QuantConnect.Indicators {
-
-
+    /// <summary>
+    /// Represents an indictor capable of tracking the sum for the given period
+    /// </summary>
     public class Sum : WindowIndicator<IndicatorDataPoint> {
         /// <summary>The sum for the given period</summary>
         private decimal _sum;


Workaround to hide default drop shadow on glass frame thickness change

--- src/ControlzEx/Behaviors/WindowChromeBehavior.cs
+++ src/ControlzEx/Behaviors/WindowChromeBehavior.cs
@@ -94,9 +94,7 @@
         {
             this.isWindwos10OrHigher = IsWindows10OrHigher();

-            this.InitializeWindowChrome();
-
-            this.AssociatedObject.SetValue(WindowChrome.WindowChromeProperty, this.windowChrome);
+            this.InitializeWindowChrome();

             // no transparany, because it hase more then one unwanted issues
             var windowHandle = new WindowInteropHelper(this.AssociatedObject).Handle;
@@ -166,6 +164,8 @@

             // port: Is forwarded by code in IgnoreTaskbarOnMaximizePropertyChangedCallback
             //BindingOperations.SetBinding(this.windowChrome, WindowChrome.IgnoreTaskbarOnMaximizeProperty, new Binding { Path = new PropertyPath(IgnoreTaskbarOnMaximizeProperty), Source = this });
+
+            this.AssociatedObject.SetValue(WindowChrome.WindowChromeProperty, this.windowChrome);
         }

         private static Thickness GetDefaultResizeBorderThickness()
@@ -199,6 +199,10 @@

         private static void OnGlassFrameThicknessChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
+            var behavior = (WindowChromeBehavior)d;
+
+            behavior.AssociatedObject.SetValue(WindowChrome.WindowChromeProperty, null);
+            behavior.InitializeWindowChrome();
         }

         private static void IgnoreTaskbarOnMaximizePropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)


fixing issue #7

fixing issue #7

--- src/ConveyorBelt.Tooling/Parsing/IisLogParser.cs
+++ src/ConveyorBelt.Tooling/Parsing/IisLogParser.cs
@@ -57,6 +57,9 @@
                     string name = fields[i];
                     string value = rest[i];

+                    if (value == "-") // to get around the missing fields in IIS... this is how it does its
+                        value = null;
+
                     if (Regex.IsMatch(value, @"^[1-9]\d*$")) // numeric
                         entity.Properties.Add(name, new EntityProperty(Convert.ToInt64(value)));
                     else


remove using p2p namespace that causing jenkis job failing

--- src/Couchbase.Lite.Tests.Shared/WebSocketTest.cs
+++ src/Couchbase.Lite.Tests.Shared/WebSocketTest.cs
@@ -1,5 +1,4 @@
-using Couchbase.Lite.P2P;
-using Couchbase.Lite.DI;
+using Couchbase.Lite.DI;
 using Couchbase.Lite.Sync;
 using FluentAssertions;
 using System;
@@ -241,6 +240,7 @@
         [Fact]
         public void TestHttpLogic()
         {
+            var logic = new HTTPLogic(new Uri("ws://192.168.0.11:4984/app"));
             var prop = HttpLogicType.GetProperty("Credential", BindingFlags.Public | BindingFlags.Instance);
             prop.SetValue(hTTPLogic, new NetworkCredential("name", "pass"));
             var method = HttpLogicType.GetMethod("CreateAuthHeader", BindingFlags.NonPublic | BindingFlags.Instance);
@@ -251,11 +251,16 @@
             res = method.Invoke(hTTPLogic, new object[1] { authstring });

             prop = HttpLogicType.GetProperty("UseTls", BindingFlags.Public | BindingFlags.Instance);
+            var useTle = logic.UseTls;
+
+            prop = HttpLogicType.GetProperty("Error", BindingFlags.Public | BindingFlags.Instance);
+            var error = logic.Error;
         }

         [Fact]
         public void TestReplicatorOptionsDictionary()
         {
+            var ReplicatorOptionsDictionaryType = typeof(ReplicatorOptionsDictionary);
             var optDict = new ReplicatorOptionsDictionary();
             var cookieStr = optDict.CookieString;
             var protocol = optDict.Protocols;
@@ -267,6 +272,11 @@
             var filterParam = optDict.FilterParams;
             optDict.RemoteDBUniqueID = "remote id";
             var remoteId = optDict.RemoteDBUniqueID;
+
+            optDict.Cookies.Add(new Cookie("name", "value"));
+
+            var method = ReplicatorOptionsDictionaryType.GetMethod("BuildInternal", BindingFlags.NonPublic | BindingFlags.Instance);
+            var res = method.Invoke(optDict, null);
         }
     }
 }


Fixes to EnigineerContribution events.

Fixes to EnigineerContribution events.

(cherry picked from commit bf4389213c372ab27810ad8543790c5a5390d018)

--- EDDiscovery/EliteDangerous/JournalEvents/JournalEngineerContribution.cs
+++ EDDiscovery/EliteDangerous/JournalEvents/JournalEngineerContribution.cs
@@ -19,31 +19,61 @@
 namespace EDDiscovery.EliteDangerous.JournalEvents
 {
     //{ "timestamp":"2017-06-27T01:32:36Z", "event":"EngineerContribution", "Engineer":"Liz Ryder", "Type":"Commodity", "Commodity":"landmines", "Quantity":200, "TotalQuantity":200 }
+    //{ "timestamp":"2017-06-27T03:02:37Z", "event":"EngineerContribution", "Engineer":"Tiana Fortune", "Type":"Materials", "Material":"decodedemissiondata", "Quantity":50, "TotalQuantity":50 }

-    [JournalEntryType(JournalTypeEnum.EngineerContribution)]
+[JournalEntryType(JournalTypeEnum.EngineerContribution)]
     public class JournalEngineerContribution : JournalEntry
     {
         public JournalEngineerContribution(JObject evt ) : base(evt, JournalTypeEnum.EngineerContribution)
         {
             Engineer = evt["Engineer"].Str();
             Type = evt["Type"].Str();
+
+            if (Type.Equals("Commodity") || Type.Equals("Materials"))
+                unknownType = false;
+            else
+                unknownType = true;
+
             Commodity = evt["Commodity"].Str();
+            Commodity = JournalFieldNaming.FDNameTranslation(Commodity);     // pre-mangle to latest names, in case we are reading old journal records
+            FriendlyCommodity = JournalFieldNaming.RMat(Commodity);
+
+            Material = evt["Material"].Str();
+            Material = JournalFieldNaming.FDNameTranslation(Material);     // pre-mangle to latest names, in case we are reading old journal records
+            FriendlyMaterial = JournalFieldNaming.RMat(Material);
+
             Quantity = evt["Quantity"].Int();
             TotalQuantity = evt["TotalQuantity"].Int();
         }

+        private bool unknownType;
         public string Engineer { get; set; }
         public string Type { get; set; }
+        public string FriendlyCommodity { get; set; }
         public string Commodity { get; set; }
+        public string FriendlyMaterial { get; set; }
+        public string Material { get; set; }
         public int Quantity { get; set; }
         public int TotalQuantity { get; set; }

-        public override System.Drawing.Bitmap Icon { get { return EDDiscovery.Properties.Resources.engineerapply; } }
+        public override System.Drawing.Bitmap Icon
+        {
+            get
+            {
+                if (unknownType)
+                    return EDDiscovery.Properties.Resources.genericevent;
+                else
+                    return EDDiscovery.Properties.Resources.engineerapply;
+            }
+        }

         public override void FillInformation(out string summary, out string info, out string detailed) //V
         {
             summary = EventTypeStr.SplitCapsWord();
-            info = Tools.FieldBuilder("", Engineer, "Type:", Type, "Commodity:", Commodity, "Quantity:", Quantity, "TotalQuantity:", TotalQuantity);
+            if (unknownType==true)
+                info = "Report to EDDiscovery team an unknown EngineerContribution type: " + Type;
+             else
+                info = Tools.FieldBuilder("", Engineer, "Type:", Type, "Commodity:", FriendlyCommodity, "Material:", FriendlyMaterial, "Quantity:", Quantity, "TotalQuantity:", TotalQuantity);
             detailed = "";
         }
     }


MenuItems are now calling a command on click.

--- src/Editor/Editor.Client/GUI/Controls/MenuBar.cs
+++ src/Editor/Editor.Client/GUI/Controls/MenuBar.cs
@@ -1,8 +1,5 @@
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
 using Editor.Client.Extensions;
 using Flood.GUI;
 using Flood.GUI.Controls;
@@ -48,14 +45,14 @@
                 var menuItem = menuChild as MenuItemNode;
                 if(menuItem != null)
                 {
-                    menuControl.Menu.AddItem(menuItem.Label);
+                    var mControl = menuControl.Menu.AddItem(menuItem.Label);
+                    mControl.Clicked += control => menuItem.RunCommand();
                     continue;
                 }

                 var submenu = menuChild as SubmenuNode;
                 if (submenu != null)
                 {
-                    //menuControl.
                     //BuildSubmenu(submenu);
                     continue;
                 }
@@ -66,8 +63,6 @@
                     continue;
                 }

-
-
                 throw new NotImplementedException();
             }
         }


Update DeletingBlankColumns.cs

Update DeletingBlankColumns.cs

--- Examples/CSharp/Articles/DeleteBlankRowsColumns/DeletingBlankColumns.cs
+++ Examples/CSharp/Articles/DeleteBlankRowsColumns/DeletingBlankColumns.cs
@@ -8,6 +8,7 @@
     {
         public static void Main()
         {
+            //ExStart:1
             // The path to the documents directory.
             string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

@@ -27,7 +28,8 @@

             //Save the excel file.
             wb.Save(dataDir+ "mybook.out.xlsx");
+            //ExEnd:1

         }
     }
-}+}


Fixed missing pathname.

Fixed missing pathname.

--- FilePicker/FilePicker/Plugin.FilePicker.iOS/FilePickerImplementation.cs
+++ FilePicker/FilePicker/Plugin.FilePicker.iOS/FilePickerImplementation.cs
@@ -50,14 +50,12 @@
             System.Runtime.InteropServices.Marshal.Copy (data.Bytes, dataBytes, 0, Convert.ToInt32 (data.Length));

             string filename = doc.LocalizedName;
+            string pathname = doc.FileUrl?.ToString();

             // iCloud drive can return null for LocalizedName.
             if (filename == null) {
                 // Retrieve actual filename by taking the last entry after / in FileURL.
                 // e.g. /path/to/file.ext -> file.ext
-
-                // pathname is either a string or null.
-                var pathname = doc.FileUrl?.ToString ();

                 // filesplit is either:
                 // 0 (pathname is null, or last / is at position 0)
@@ -68,7 +66,7 @@
                 filename = pathname?.Substring (filesplit + 1);
             }

-            OnFilePicked (new FilePickerEventArgs (dataBytes, filename));
+            OnFilePicked (new FilePickerEventArgs (dataBytes, filename, pathname));
         }

         /// <summary>


The NUnit sample convention's "TestCaseSource" feature uses the sufficient MethodInfo.DeclaringType property versus the deprecated MethodInfo.ReflectedType property, as ReflectedType will not be present when targeting .NET Core.

--- src/Fixie.Samples/NUnitStyle/CustomConvention.cs
+++ src/Fixie.Samples/NUnitStyle/CustomConvention.cs
@@ -41,7 +41,7 @@

             foreach (var attribute in testCaseSourceAttributes)
             {
-                var sourceType = attribute.SourceType ?? method.ReflectedType;
+                var sourceType = attribute.SourceType ?? method.DeclaringType;

                 if (sourceType == null)
                     throw new Exception("Could not find source type for method " + method.Name);


fixed culture sensitive sorting in MethodFilterTests

--- src/Fixie.Tests/Conventions/MethodFilterTests.cs
+++ src/Fixie.Tests/Conventions/MethodFilterTests.cs
@@ -1,6 +1,6 @@
-using System;
+using Fixie.Conventions;
+using System;
 using System.Linq;
-using Fixie.Conventions;

 namespace Fixie.Tests.Conventions
 {
@@ -10,7 +10,7 @@
         {
             new MethodFilter()
                 .Filter(typeof(Sample))
-                .OrderBy(method => method.Name)
+                .OrderBy(method => method.Name, StringComparer.Ordinal)
                 .Select(method => method.Name)
                 .ShouldEqual("PublicInstanceNoArgsVoid", "PublicInstanceNoArgsWithReturn",
                              "PublicInstanceWithArgsVoid", "PublicInstanceWithArgsWithReturn");
@@ -37,7 +37,7 @@
             new MethodFilter()
                 .HasOrInherits<SampleAttribute>()
                 .Filter(typeof(Sample))
-                .OrderBy(method => method.Name)
+                .OrderBy(method => method.Name, StringComparer.Ordinal)
                 .Select(method => method.Name)
                 .ShouldEqual("PublicInstanceNoArgsWithReturn", "PublicInstanceWithArgsWithReturn");
         }


Error in FieldElementsMatrix constructor was fixed

--- src/GfAlgorithms/Matrices/FieldElementsMatrix.cs
+++ src/GfAlgorithms/Matrices/FieldElementsMatrix.cs
@@ -58,7 +58,7 @@
                 if(Field.Equals(element.Field) == false)
                     throw new ArgumentException("Incorrect field");

-                _elements[i, j] = element;
+                _elements[i, j] = new FieldElement(element);
             }
         }


Add null check to TagCollection

Add null check to TagCollection

--- src/GitVersion.LibGit2Sharp/Git/TagCollection.cs
+++ src/GitVersion.LibGit2Sharp/Git/TagCollection.cs
@@ -1,11 +1,16 @@
+using GitVersion.Extensions;
+
 namespace GitVersion;

 internal sealed class TagCollection : ITagCollection
 {
     private readonly LibGit2Sharp.TagCollection innerCollection;
-    internal TagCollection(LibGit2Sharp.TagCollection collection) => this.innerCollection = collection;

-    public IEnumerator<ITag> GetEnumerator() => this.innerCollection.Select(tag => new Tag(tag)).GetEnumerator();
+    internal TagCollection(LibGit2Sharp.TagCollection collection)
+        => this.innerCollection = collection.NotNull();
+
+    public IEnumerator<ITag> GetEnumerator()
+        => this.innerCollection.Select(tag => new Tag(tag)).GetEnumerator();

     IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
 }


Spelling error in log message. (#1273)

Spelling error in log message. (#1273)

--- src/IdentityServer4/Validation/TokenValidator.cs
+++ src/IdentityServer4/Validation/TokenValidator.cs
@@ -94,7 +94,7 @@
             var client = await _clients.FindEnabledClientByIdAsync(clientId);
             if (client == null)
             {
-                _logger.LogError("Unknown or diabled client: {clientId}.", clientId);
+                _logger.LogError("Unknown or disabled client: {clientId}.", clientId);
                 return Invalid(OidcConstants.ProtectedResourceErrors.InvalidToken);
             }

@@ -362,4 +362,4 @@
             _logger.LogDebug("Token validation success\n{logMessage}", _log);
         }
     }
-}+}


Remove comments.

Remove comments.

--- src/ImmutableUndoRedo/Properties/AssemblyInfo.cs
+++ src/ImmutableUndoRedo/Properties/AssemblyInfo.cs
@@ -21,9 +21,6 @@
 using System.Reflection;
 using System.Runtime.InteropServices;

-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die mit einer Assembly verknüpft sind.
 [assembly: AssemblyTitle("ImmutableUndoRedo")]
 [assembly: AssemblyDescription("A lightweight, flexible and easy to use do/undo/redo implementation based on immutable objects for .NET.")]
 [assembly: AssemblyConfiguration("")]
@@ -33,23 +30,9 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

-// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
-// für COM-Komponenten.  Wenn Sie auf einen Typ in dieser Assembly von
-// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
 [assembly: ComVisible(false)]

-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
 [assembly: Guid("ef605850-4540-4e3a-9e71-cc10385d94c7")]

-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-//      Hauptversion
-//      Nebenversion
-//      Buildnummer
-//      Revision
-//
-// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]


CommandLineTests fixes

CommandLineTests fixes

--- src/Kirkin.Tests/CommandLine/CommandLineTests.cs
+++ src/Kirkin.Tests/CommandLine/CommandLineTests.cs
@@ -154,17 +154,17 @@
                 Assert.AreEqual("zzz.txt", command.Arguments["log"]);
             }

-            {
-                ICommand command = parser.Parse("sync --log=zzz.txt".Split(' '));
-
-                Assert.AreEqual("zzz.txt", command.Arguments["log"]);
-            }
-
-            {
-                ICommand command = parser.Parse("sync --log:zzz.txt".Split(' '));
-
-                Assert.AreEqual("zzz.txt", command.Arguments["log"]);
-            }
+            //{
+            //    ICommand command = parser.Parse("sync --log=zzz.txt".Split(' '));
+
+            //    Assert.AreEqual("zzz.txt", command.Arguments["log"]);
+            //}
+
+            //{
+            //    ICommand command = parser.Parse("sync --log:zzz.txt".Split(' '));
+
+            //    Assert.AreEqual("zzz.txt", command.Arguments["log"]);
+            //}
         }

         [Test]
@@ -236,7 +236,7 @@
             Assert.Throws<InvalidOperationException>(() => parser.Parse(""));

             // Check text.
-            string expected = @"Usage: Kirkin.Experimental <command> [<args>].
+            string expected = @"Usage: Kirkin <command> [<args>].

     aaa    Does the zzz thing.
     bbb    Does the uuu thing, which is totally different to the aaa
@@ -270,7 +270,7 @@
             Assert.Throws<InvalidOperationException>(() => parser.Parse(""));

             // Check text.
-            string expected = @"Usage: Kirkin.Experimental command <aaa> [--bbb <arg>] [--ccc].
+            string expected = @"Usage: Kirkin command <aaa> [--bbb <arg>] [--ccc].

     <aaa>          Does the zzz thing.
     --bbb <arg>    Does the uuu thing, which is totally different to the


fixed localizator

fixed localizator

--- MasDev.Common/MasDev.Common.Portable/Source/Localization/Localizator.cs
+++ MasDev.Common/MasDev.Common.Portable/Source/Localization/Localizator.cs
@@ -11,6 +11,7 @@

 		public static TLocalizationInterface Get<TLocalizationInterface> (string locale) where TLocalizationInterface : ILocalization
 		{
+
 			var localizationInterface = typeof(TLocalizationInterface);
 			if (!_localizations.ContainsKey (localizationInterface))
 				throw new InvalidOperationException (localizationInterface + " localization interface is not subscribed");
@@ -22,6 +23,7 @@
 			if (!StringUtils.ContainsSomethingReadable (locale))
 				return instances.Single (i => i.IsDefault).Localization;

+			locale = locale.Trim ().ToLowerInvariant ();
 			var instance = instances.SingleOrDefault (wrapper => wrapper.Localization.Locale.Trim ().ToLowerInvariant () == locale);
 			if (instance == null)
 				instance = instances.FirstOrDefault (wrapper => AreSameLanguage (wrapper.Localization.Locale, locale));
@@ -62,8 +64,8 @@
 		{
 			locale1 = locale1.Trim ().ToLowerInvariant ();
 			locale2 = locale2.Trim ().ToLowerInvariant ();
-			var underscore1 = locale1.IndexOf ('_');
-			var underscore2 = locale2.IndexOf ('_');
+			var underscore1 = locale1.IndexOf ('-');
+			var underscore2 = locale2.IndexOf ('-');
 			if (underscore1 < 0 || underscore2 < 0)
 				return false;


* Minor: Another small log adjustment

* Minor: Another small log adjustment

--- OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -58,7 +58,7 @@

             byte[] data = archive.Read(out filePath);

-            m_log.DebugFormat("Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath);
+            m_log.DebugFormat("[ARCHIVER]: Successfully read {0} ({1} bytes) from archive {2}", filePath, data.Length, m_loadPath);

             archive.Close();
         }


Use new switch syntax.

Use new switch syntax.

--- src/Magick.NET/Shared/Settings/MagickSettings.cs
+++ src/Magick.NET/Shared/Settings/MagickSettings.cs
@@ -691,26 +691,16 @@
             return instance;
         }

-        private string GetFormat()
-        {
-            switch (Format)
-            {
-                case MagickFormat.Unknown:
-                    return null;
-                case MagickFormat.ThreeFr:
-                    return "3FR";
-                case MagickFormat.ThreeG2:
-                    return "3G2";
-                case MagickFormat.ThreeGp:
-                    return "3GP";
-                case MagickFormat.RadialGradient:
-                    return "RADIAL-GRADIENT";
-                case MagickFormat.SparseColor:
-                    return "SPARSE-COLOR";
-                default:
-                    return EnumHelper.GetName(Format).ToUpperInvariant();
-            }
-        }
+        private string GetFormat() => Format switch
+        {
+            MagickFormat.Unknown => null,
+            MagickFormat.ThreeFr => "3FR",
+            MagickFormat.ThreeG2 => "3G2",
+            MagickFormat.ThreeGp => "3GP",
+            MagickFormat.RadialGradient => "RADIAL-GRADIENT",
+            MagickFormat.SparseColor => "SPARSE-COLOR",
+            _ => EnumHelper.GetName(Format).ToUpperInvariant(),
+        };

         private void SetOptionAndArtifact(string key, double value) => SetOptionAndArtifact(key, value.ToString(CultureInfo.InvariantCulture));


Version-Rolling logging

Version-Rolling logging

--- src/Miningcore/Blockchain/Bitcoin/BitcoinPool.cs
+++ src/Miningcore/Blockchain/Bitcoin/BitcoinPool.cs
@@ -305,6 +305,8 @@
             // enabled
             result[BitcoinStratumExtensions.VersionRolling] = true;
             result[BitcoinStratumExtensions.VersionRollingMask] = context.VersionRollingMask.Value.ToStringHex8();
+
+            logger.Info(() => $"[{client.ConnectionId}] Using version-rolling mask {result[BitcoinStratumExtensions.VersionRollingMask]}");
         }

         private void ConfigureMinimumDiff(StratumClient client, BitcoinWorkerContext context,


Update "MarlahShake.cs" to print blank line for empty string text


Cosmetic changes.

Cosmetic changes.

--- src/MsgPack/Serialization/SerializationTarget.cs
+++ src/MsgPack/Serialization/SerializationTarget.cs
@@ -155,7 +155,7 @@
 			var duplicated =
 				filtered.FirstOrDefault(
 					member => member.IsDefined( typeof( MessagePackIgnoreAttribute ) )
-					);
+				);

 			if ( duplicated != null )
 			{
@@ -165,8 +165,8 @@
 						"A member '{0}' of type '{1}' is marked with both MessagePackMemberAttribute and MessagePackIgnoreAttribute.",
 						duplicated.Name,
 						type
-						)
-					);
+					)
+				);
 			}

 			return
@@ -175,7 +175,7 @@
 						new SerializingMember(
 							member,
 							new DataMemberContract( member, member.GetCustomAttribute<MessagePackMemberAttribute>() )
-							)
+						)
 					);
 		}


Add comments to the EscapeInvalidXmlCharacters method.

--- src/NUnitFramework/framework/Interfaces/TNode.cs
+++ src/NUnitFramework/framework/Interfaces/TNode.cs
@@ -323,8 +323,6 @@
         {
             if (str == null) return null;

-            // Based on the XML spec http://www.w3.org/TR/xml/#charsets
-
             StringBuilder builder = null;
             for (int i = 0; i < str.Length; i++)
             {
@@ -335,6 +333,9 @@
                     if (builder != null)
                         builder.Append(c);
                 }
+                // From the XML specification: http://www.w3.org/TR/xml/#charsets
+                // Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
+                // Any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
                 else if (!(0x0 <= c && c <= 0x8) &&
                     c != 0xB &&
                     c != 0xC &&
@@ -348,6 +349,8 @@
                     if (builder != null)
                         builder.Append(c);
                 }
+                // Also check if the char is actually a high/low surogate pair of two characters
+                // If it is, then it is a valid XML character (from above based on the surrogate blocks)
                 else if (char.IsHighSurrogate(c) &&
                     i + 1 != str.Length &&
                     char.IsLowSurrogate(str[i + 1]))
@@ -361,6 +364,10 @@
                 }
                 else
                 {
+                    // We keep the builder null so that we don't allocate a string
+                    // when doing this conversion until we encounter a unicode character
+                    // Then, we allocate the rest of the string and escape the invalid
+                    // character
                     if (builder == null)
                     {
                         builder = new StringBuilder();


Fix #1225: corrected outdated xmldocs for AddContractJsonConverters()

--- src/Nest/Domain/Connection/ConnectionSettings.cs
+++ src/Nest/Domain/Connection/ConnectionSettings.cs
@@ -139,8 +139,6 @@
 		}
 		/// <summary>
 		/// Add a custom JsonConverter to the build in json serialization by passing in a predicate for a type.
-		/// This is faster then adding them using AddJsonConverters() because this way they will be part of the cached
-		/// Json.net contract for a type.
 		/// </summary>
 		public T AddContractJsonConverters(params Func<Type, JsonConverter>[] contractSelectors)
 		{


Made the same change to SuperColumnFamilies

--- src/Operations/MultiGetSuperColumnFamilySlice.cs
+++ src/Operations/MultiGetSuperColumnFamilySlice.cs
@@ -53,7 +53,12 @@
 				}
 				else
 				{
-					superColumns = result.Value.Select(col => Helper.ConvertSuperColumnToFluentSuperColumn(col.Super_column, schema));
+					superColumns = result.Value.Select(col =>
+					    {
+					        if (col.Counter_super_column != null)
+					            return Helper.ConvertSuperColumnToFluentCounterSuperColumn(col.Counter_super_column, schema);
+                            return Helper.ConvertSuperColumnToFluentSuperColumn(col.Super_column, schema);
+                        });
 				}

 				var familyName = ColumnFamily.FamilyName;


#21218: Fixing IFilterProvider execution order

Work Item: 21218

--- src/Orchard/Mvc/Filters/OrchardFilterProvider.cs
+++ src/Orchard/Mvc/Filters/OrchardFilterProvider.cs
@@ -7,8 +7,16 @@

         public IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) {
             var workContext = controllerContext.GetWorkContext();
-            var filterProviders = workContext.Resolve<IEnumerable<IFilterProvider>>();
-            return filterProviders.Select(x => new Filter(x, FilterScope.Action, null));
+
+            // Map IFilterProvider implementations to MVC Filter objects
+            // Need to provide order values since Filter objects of identical
+            // scope and order would run in undefined order.
+            // We create negative order values to avoid conflicts with other
+            // potential user-provided MVC Filter objects, which hopefully use
+            // positive order values. We do this by reversing the list and
+            // negating the index.
+            var filters = workContext.Resolve<IEnumerable<IFilterProvider>>();
+            return filters.Reverse().Select((filter, index) => new Filter(filter, FilterScope.Action, -(index + 1)));
         }
     }
 }