add exception log if storage structure failed.  #337

--- src/DotNetCore.CAP/IBootstrapper.Default.cs
+++ src/DotNetCore.CAP/IBootstrapper.Default.cs
@@ -35,7 +35,14 @@
         {
             _logger.LogDebug("### CAP background task is starting.");

-            await Storage.InitializeAsync(stoppingToken);
+            try
+            {
+                await Storage.InitializeAsync(stoppingToken);
+            }
+            catch (Exception e)
+            {
+                _logger.LogError(e, "Initializing the storage structure failed!");
+            }

             stoppingToken.Register(() =>
             {
@@ -53,11 +60,11 @@
                     }
                 }
             });
-
+
             await BootstrapCoreAsync();

             _logger.LogInformation("### CAP started!");
-        }
+        }

         protected virtual Task BootstrapCoreAsync()
         {


Single parameter for LDAPs

Single parameter for LDAPs

--- src/EventStore/EventStore.Core/Util/Opts.cs
+++ src/EventStore/EventStore.Core/Util/Opts.cs
@@ -370,16 +370,10 @@
 		/*
 		 * Authentication Options
 		 */
-	    public const string UseLdapsAuthenticationCmd = "ldaps-authentication";
-	    public const string UseLdapsAuthenticationEnv = "LDAPS_AUTHENTICATION";
-	    public const string UseLdapsAuthenticationJson = "ldapsAuthentication";
-	    public const string UseLdapsAuthenticationDescr = "Use LDAPS authentication, disable Event Store internal authentication";
-	    public static readonly bool UseLdapsAuthenticationDefault = false;
-
 	    public const string LdapsConfigurationFileCmd = "ldaps-config=";
 	    public const string LdapsConfigurationFileEnv = "LDAPS_CONFIG";
 	    public const string LdapsConfigurationFileJson = "ldapsConfigFile";
-	    public const string LdapsConfigurationFileDescr = "Path to the configuration file for LDAPS authentication";
+	    public const string LdapsConfigurationFileDescr = "Path to the configuration file for LDAPS authentication. If this is specified, Event Store internal authentication will be disabled.";
 	    public static readonly string LdapsConfigurationFileDefault = string.Empty;
     }
 }


Removed WindowsRuntime dependency

Removed WindowsRuntime dependency

--- src/Avalonia.Xaml.Interactions/Core/EventTriggerBehavior.cs
+++ src/Avalonia.Xaml.Interactions/Core/EventTriggerBehavior.cs
@@ -4,7 +4,6 @@
 using System;
 using System.Globalization;
 using System.Reflection;
-using System.Runtime.InteropServices.WindowsRuntime;
 using Avalonia.Xaml.Interactivity;
 using Avalonia.Controls;

@@ -56,9 +55,6 @@
         private object resolvedSource;
         private Delegate eventHandler;
         private bool isLoadedEventRegistered;
-        private bool isWindowsRuntimeEvent;
-        private Func<Delegate, EventRegistrationToken> addEventHandlerMethod;
-        private Action<EventRegistrationToken> removeEventHandlerMethod;

         /// <summary>
         /// Gets or sets the name of the event to listen for. This is a avalonia property.
@@ -151,19 +147,7 @@

                 MethodInfo methodInfo = typeof(EventTriggerBehavior).GetTypeInfo().GetDeclaredMethod("OnEvent");
                 this.eventHandler = methodInfo.CreateDelegate(info.EventHandlerType, this);
-
-                this.isWindowsRuntimeEvent = IsWindowsRuntimeType(info.EventHandlerType);
-                if (this.isWindowsRuntimeEvent)
-                {
-                    this.addEventHandlerMethod = add => (EventRegistrationToken)info.AddMethod.Invoke(this.resolvedSource, new object[] { add });
-                    this.removeEventHandlerMethod = token => info.RemoveMethod.Invoke(this.resolvedSource, new object[] { token });
-
-                    WindowsRuntimeMarshal.AddEventHandler(this.addEventHandlerMethod, this.removeEventHandlerMethod, this.eventHandler);
-                }
-                else
-                {
-                    info.AddEventHandler(this.resolvedSource, this.eventHandler);
-                }
+                info.AddEventHandler(this.resolvedSource, this.eventHandler);
             }
             else if (!this.isLoadedEventRegistered)
             {
@@ -191,15 +175,7 @@
                 }

                 EventInfo info = this.resolvedSource.GetType().GetRuntimeEvent(eventName);
-                if (this.isWindowsRuntimeEvent)
-                {
-                    WindowsRuntimeMarshal.RemoveEventHandler(this.removeEventHandlerMethod, this.eventHandler);
-                }
-                else
-                {
-                    info.RemoveEventHandler(this.resolvedSource, this.eventHandler);
-                }
-
+                info.RemoveEventHandler(this.resolvedSource, this.eventHandler);
                 this.eventHandler = null;
             }
             else if (this.isLoadedEventRegistered)
@@ -224,15 +200,5 @@

             return (element.Parent != null);
         }
-
-        private static bool IsWindowsRuntimeType(Type type)
-        {
-            if (type != null)
-            {
-                return type.AssemblyQualifiedName.EndsWith("ContentType=WindowsRuntime", StringComparison.Ordinal);
-            }
-
-            return false;
-        }
     }
 }


Communicatievorm toevoegen beter via method dan rechtstreeks op lijst werken.

git-svn-id: 0ffdc289f568b1e7493e560395a00d06174c8a92@228 99b415e2-69d1-4072-8d93-0ed3a15484ab

--- poc/LinqToSql/Cg2Services.Tests/PersonenTest.cs
+++ poc/LinqToSql/Cg2Services.Tests/PersonenTest.cs
@@ -108,16 +108,20 @@
             {
                 Persoon p = service.OphalenMetCommunicatie(1893);
                 int aantal = p.Communicatie.Count();
-                CommunicatieVorm v = new CommunicatieVorm();

-                v.Type = CommunicatieType.Telefoon;
-                v.Nummer = "1207";
-                v.Voorkeur = false;
-                v.IsGezinsGebonden = false;
+                // Om een communicatievorm toe te voegen, moeten zowel de
+                // link persoon->communicatievorm als de link
+                // communicatievorm->persoon ok zijn.  Vandaar dat we hiervoor
+                // p.CommunicatieToevoegen gebruiken.

-                p.Communicatie.Add(v);
+                p.CommunicatieToevoegen(CommunicatieType.Telefoon, "1207", false);

                 Assert.IsTrue(p.Communicatie.Count() == aantal + 1);
+
+                foreach (CommunicatieVorm cv in p.Communicatie)
+                {
+                    Assert.IsTrue(cv.PersoonID == p.ID);
+                }
             }
         }
     }


Update GeoffreyHuntley.cs (#160)

Update GeoffreyHuntley.cs (#160)

--- src/Firehose.Web/Authors/GeoffreyHuntley.cs
+++ src/Firehose.Web/Authors/GeoffreyHuntley.cs
@@ -4,7 +4,7 @@

 namespace Firehose.Web.Authors
 {
-    public class GeoffreyHuntley : IAmAMicrosoftMVP
+    public class GeoffreyHuntley : IAmAMicrosoftMVP, IAmAXamarinMVP
     {
         public string FirstName => "Geoffrey";
         public string LastName => "Huntley";
@@ -24,4 +24,4 @@
         public string GitHubHandle => "ghuntley";
         public GeoPosition Position => new GeoPosition(-33.8641859, 151.2143821);
     }
-}+}


Skip failing CompilerServer test. (changeset 1410313)

--- src/Compilers/Core/VBCSCompilerTests/CompilerServerTests.cs
+++ src/Compilers/Core/VBCSCompilerTests/CompilerServerTests.cs
@@ -1574,7 +1574,7 @@
             };
         }

-        [Fact]
+        [Fact(Skip = "1119752"), WorkItem(1119752)]
         [Trait(Traits.Environment, Traits.Environments.VSProductInstall)]
         public void AnalyzerChangesOnDisk()
         {


Change electron window size

Change electron window size

--- src/HstWbInstaller.Imager.GuiApp/Startup.cs
+++ src/HstWbInstaller.Imager.GuiApp/Startup.cs
@@ -140,8 +140,8 @@
             var browserWindow = await Electron.WindowManager.CreateWindowAsync(
                 new BrowserWindowOptions
                 {
-                    Width = 1000,
-                    Height = 800,
+                    Width = 1280,
+                    Height = 720,
                     Center = true,
                     BackgroundColor = "#1A2933",
                     Frame = false,


Sorts the ItemButtons

Sorts the ItemButtons

--- src/DatenMeister.WPF/Forms/Base/ItemExplorerControl.xaml.cs
+++ src/DatenMeister.WPF/Forms/Base/ItemExplorerControl.xaml.cs
@@ -677,6 +677,7 @@
                     }
                 }

+                menuItems = menuItems.OrderBy(x => x.Header.ToString()).ToList();
                 return menuItems;
             }


DbMetal: Allow intermixing of /provider and --with-* options.

Previously, if you wanted to use a custom --with-schema-loader, you had to
provide ALL of --with-schema-loader=T, --with-db-connection=T, and
--with-sql-dialect, even if --provider could provide --with-db-connection (and
if we extend the .exe.config file, it could provide --with-sql-dialect too).

Instead, treat the --with-* options as overrides -- if --provider is present,
load the specified provider, then override the default .exe.config values with
the --with-* values.

--- src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs
+++ src/DbMetal/Generator/Implementation/SchemaLoaderFactory.cs
@@ -260,22 +260,33 @@

         protected void GetLoaderAndConnection(Parameters parameters, out string dbLinqSchemaLoaderType, out string databaseConnectionType, out string sqlDialectType)
         {
+            dbLinqSchemaLoaderType = databaseConnectionType = sqlDialectType = null;
+
             if (!string.IsNullOrEmpty(parameters.Provider))
             {
                 GetLoaderAndConnection(parameters.Provider, out dbLinqSchemaLoaderType, out databaseConnectionType, out sqlDialectType);
             }
+            else if (!string.IsNullOrEmpty(parameters.DbLinqSchemaLoaderProvider) &&
+                !string.IsNullOrEmpty(parameters.DatabaseConnectionProvider) &&
+                !string.IsNullOrEmpty(parameters.SqlDialectType))
+            {
+                // User manually specified everything we need; don't bother with the
+                // default .exe.config provider lookup
+            }
             else
-            {
-                dbLinqSchemaLoaderType = parameters.DbLinqSchemaLoaderProvider;
-                databaseConnectionType = parameters.DatabaseConnectionProvider;
-                sqlDialectType         = parameters.SqlDialectType;
-            }
-            if (string.IsNullOrEmpty(dbLinqSchemaLoaderType))
             {
                 // No provider specified, not explicitly provided either
                 // Default to using SQL Server for sqlmetal.exe compatibility
                 GetLoaderAndConnection("SqlServer", out dbLinqSchemaLoaderType, out databaseConnectionType, out sqlDialectType);
             }
+
+            // Allow command-line options to override the .exe.config file.
+            if (!string.IsNullOrEmpty(parameters.DbLinqSchemaLoaderProvider))
+                dbLinqSchemaLoaderType = parameters.DbLinqSchemaLoaderProvider;
+            if (!string.IsNullOrEmpty(parameters.DatabaseConnectionProvider))
+                databaseConnectionType = parameters.DatabaseConnectionProvider;
+            if (!string.IsNullOrEmpty(parameters.SqlDialectType))
+                sqlDialectType = parameters.SqlDialectType;
         }

     }


Fixed bug for .NET Core version: Can not transtate the expression like 'q.Where(a => !string.IsNullOrEmpty("1") && true)' to the correct sql clause,there is no problem now.

--- src/DotNetCore/Chloe/Core/Visitors/ExpressionVisitorBase.cs
+++ src/DotNetCore/Chloe/Core/Visitors/ExpressionVisitorBase.cs
@@ -109,7 +109,7 @@
                 {
                     // (a.ID==1)==true
                     //dbExp = new DbEqualExpression(this.Visit(exp.Left), new DbConstantExpression(true));
-                    dbExp = DbExpression.Equal(this.Visit(exp.Left), DbConstantExpression.True);
+                    dbExp = this.Visit(Expression.Equal(exp.Left, UtilConstants.Constant_True));
                     return dbExp;
                 }
                 else
@@ -127,7 +127,7 @@
                 if ((bool)c.Value == true)
                 {
                     // (a.ID==1)==true
-                    dbExp = DbExpression.Equal(this.Visit(exp.Right), DbConstantExpression.True);
+                    dbExp = this.Visit(Expression.Equal(exp.Right, UtilConstants.Constant_True));
                     return dbExp;
                 }
                 else
@@ -145,9 +145,7 @@
             // right==true
             var newRight = Expression.Equal(right, UtilConstants.Constant_True);

-            //dbExp = new DbAndExpression(this.Visit(newLeft), this.Visit(newRight));
             dbExp = DbExpression.AndAlso(this.Visit(newLeft), this.Visit(newRight));
-
             return dbExp;
         }
         // |
@@ -170,7 +168,7 @@
                 if ((bool)c.Value == false)
                 {
                     // (a.ID==1)==true
-                    dbExp = DbExpression.Equal(this.Visit(exp.Left), DbConstantExpression.True);
+                    dbExp = this.Visit(Expression.Equal(exp.Left, UtilConstants.Constant_True));
                     return dbExp;
                 }
                 else
@@ -181,18 +179,18 @@
             }

             c = left as ConstantExpression;
-            // true && a.ID == 1
+            // true || a.ID == 1
             if (c != null)
             {
                 if ((bool)c.Value == false)
                 {
                     // (a.ID==1)==true
-                    dbExp = DbExpression.Equal(this.Visit(exp.Right), DbConstantExpression.True);
+                    dbExp = this.Visit(Expression.Equal(exp.Right, UtilConstants.Constant_True));
                     return dbExp;
                 }
                 else
                 {
-                    // 直接 (1=0)
+                    // 直接 (1=1)
                     dbExp = DbEqualExpression.True;
                     return dbExp;
                 }


redundant terminal

redundant terminal

--- src/JsonLD.Entities/NQuadsParser.grammar.cs
+++ src/JsonLD.Entities/NQuadsParser.grammar.cs
@@ -36,7 +36,6 @@
         private static readonly Parser @object = (IRIREF | BLANK_NODE_LABEL | literal).Named("object");
         private static readonly Parser graphLabel = (IRIREF | BLANK_NODE_LABEL).Named("graphLabel");
         private static readonly Parser statement = (subject & predicate & @object & ~graphLabel & '.').SeparatedBy(Ws).Named("statement");
-        private static readonly Parser EOL = Terminals.Eol;
         // ReSharper restore InconsistentNaming
     }
 }


PingTimeout does not use a time unit.

PingTimeout does not use a time unit.

--- src/Elasticsearch.Net/Transport/Pipeline/RequestPipeline.cs
+++ src/Elasticsearch.Net/Transport/Pipeline/RequestPipeline.cs
@@ -245,7 +245,7 @@
 			}
 		}

-		private string SniffPath => "_nodes/_all/settings?flat_settings&timeout=" + this.PingTimeout;
+		private string SniffPath => "_nodes/_all/settings?flat_settings&timeout=" + this.PingTimeout.TotalMilliseconds + "ms";

 		public IEnumerable<Node> SniffNodes => this._connectionPool.CreateView().ToList().OrderBy(n =>  n.MasterEligable ? n.Uri.Port : int.MaxValue);


Set nuget version to 1.0.0-beta1

Set nuget version to 1.0.0-beta1

--- src/FluentAssertions.Ioc.Ninject/Properties/AssemblyInfo.cs
+++ src/FluentAssertions.Ioc.Ninject/Properties/AssemblyInfo.cs
@@ -8,9 +8,9 @@
 [assembly: AssemblyTitle("FluentAssertions.Ioc.Ninject")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyCompany("Kevin Kuszyk")]
 [assembly: AssemblyProduct("FluentAssertions.Ioc.Ninject")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
+[assembly: AssemblyCopyright("Copyright © Kevin Kuszyk 2014")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -34,3 +34,4 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyInformationalVersion("1.0.0-beta1")]


Added more logging in PipesAppMessageRouter

--- src/Kephas.Messaging.Pipes/Routing/PipesAppMessageRouter.cs
+++ src/Kephas.Messaging.Pipes/Routing/PipesAppMessageRouter.cs
@@ -229,6 +229,7 @@
                 PipeTransmissionMode.Message,
                 PipeOptions.Asynchronous);

+            this.Logger.Debug("Pipe {channel} is open (server mode).", channelName);
             return stream;
         }

@@ -249,6 +250,8 @@

             stream.Connect();
             stream.ReadMode = PipeTransmissionMode.Message;
+
+            this.Logger.Debug("Pipe {server}/{channel} is open (client mode).", serverName, channelName);
             return stream;
         }

@@ -290,6 +293,7 @@
             foreach (var peerOutChannel in this.peerOutChannels.Values)
             {
                 peerOutChannel.Stream.Dispose();
+                this.Logger.Debug("Pipe {server}/{channel} disposed.", peerOutChannel.ServerName, peerOutChannel.ChannelName);
             }

             this.peerOutChannels.Clear();
@@ -476,10 +480,12 @@
             using var memStream = new MemoryStream(1000);
             do
             {
+                cancellationToken.ThrowIfCancellationRequested();
+
                 var numBytes = await channel.ReadAsync(buffer, 0, buffer.Length, cancellationToken).PreserveThreadContext();
                 memStream.Write(buffer, 0, numBytes);
             }
-            while (!channel.IsMessageComplete);
+            while (!cancellationToken.IsCancellationRequested && !channel.IsMessageComplete);

             memStream.Position = 0;
             var bytes = memStream.ReadAllBytes();


Use ServiceStack AutoMapper for property assignment

--- src/License.Manager.Core/ServiceInterface/ProductService.cs
+++ src/License.Manager.Core/ServiceInterface/ProductService.cs
@@ -59,11 +59,8 @@
             var product =
                 new Product
                     {
-                        Name = request.Name,
-                        Description = request.Description,
-                        ProductFeatures = request.ProductFeatures,
                         KeyPair = GenerateKeyPair(machineKeySection.DecryptionKey)
-                    };
+                    }.PopulateWith(request);

             documentSession.Store(product);
             documentSession.SaveChanges();


Fixed binding to Task<T>

Fixed binding to Task<T>

--- src/Markup/Avalonia.Markup/Data/Plugins/TaskStreamPlugin.cs
+++ src/Markup/Avalonia.Markup/Data/Plugins/TaskStreamPlugin.cs
@@ -36,7 +36,7 @@

             if (task != null)
             {
-                var resultProperty = task.GetType().GetTypeInfo().GetDeclaredProperty("Result");
+                var resultProperty = task.GetType().GetRuntimeProperty("Result");

                 if (resultProperty != null)
                 {
@@ -61,7 +61,7 @@

         protected IObservable<object> HandleCompleted(Task task)
         {
-            var resultProperty = task.GetType().GetTypeInfo().GetDeclaredProperty("Result");
+            var resultProperty = task.GetType().GetRuntimeProperty("Result");

             if (resultProperty != null)
             {


Clean up '#if CORE' in Utils.cs (#4397)

Clean up '#if CORE' in Utils.cs (#4397)

--- src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs
+++ src/Microsoft.Management.Infrastructure.CimCmdlets/Utils.cs
@@ -214,10 +214,6 @@
         #region runtime methods
         internal static string GetSourceCodeInformation(bool withFileName, int depth)
         {
-#if CORECLR
-            //return a dummy string as StackFrame won't be available on CoreCLR
-            return string.Format(CultureInfo.CurrentUICulture, "{0}::{1}        ", "Type", "Method");
-#else
             StackTrace trace = new StackTrace();
             StackFrame frame = trace.GetFrame(depth);
             //if (withFileName)
@@ -231,8 +227,6 @@
             return string.Format(CultureInfo.CurrentUICulture, "{0}::{1}        ",
                 frame.GetMethod().DeclaringType.Name,
                 frame.GetMethod().Name);
-
-#endif
         }
         #endregion


Using more adapted when no connection string is found

--HG--
branch : dev

--- src/Orchard/Data/Providers/SqlServerDataServicesProvider.cs
+++ src/Orchard/Data/Providers/SqlServerDataServicesProvider.cs
@@ -18,7 +18,7 @@
         public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase) {
             var persistence = MsSqlConfiguration.MsSql2008;
             if (string.IsNullOrEmpty(_connectionString)) {
-                throw new NotImplementedException();
+                throw new ArgumentException("The connection string is empty");
             }
             persistence = persistence.ConnectionString(_connectionString);
             return persistence;


2069.1

--- src/PixelFarm/PixelFarm.Vectors/6_Contours/OutlineWalker.cs
+++ src/PixelFarm/PixelFarm.Vectors/6_Contours/OutlineWalker.cs
@@ -13,7 +13,8 @@
         public OutlineWalker()
         {
             //default
-            WalkJoint = WalkTrianglesAndEdges = WalkCentroidLine = WalkBone = true;
+            WalkTrianglesAndEdges = true;
+            WalkJoint = WalkCentroidLine = WalkBone = true;
         }
         public bool WalkTrianglesAndEdges { get; set; }
         public bool WalkCentroidLine { get; set; }
@@ -124,7 +125,7 @@
                     OnEdgeN(points[m].E0);
                 }
             }
-        }
+        }


FLAPI-128: Fixed response content when updating an ad with bad data

--- src/SEEK.AdPostingApi.SampleConsumer.Tests/UpdateAdTests.cs
+++ src/SEEK.AdPostingApi.SampleConsumer.Tests/UpdateAdTests.cs
@@ -245,7 +245,6 @@
                         },
                         Body = new Dictionary<string, object[]>
                         {
-                            { "advertiserId", new object[] { new { severity = "Error", code = "Required" } } },
                             { "salaryMinimum", new object[] { new { severity = "Error", code = "ValueOutOfRange" } } },
                             { "videoUrl", new object[] {
                                 new { severity = "Error", code = "MaxLengthExceeded" },


bugfixing

bugfixing

--- src/Services/MyServer.Services.ImageGallery/ImageService.cs
+++ src/Services/MyServer.Services.ImageGallery/ImageService.cs
@@ -90,7 +90,7 @@

             // check if first image, if so, make album cover
             var album = this.albums.GetById(albumId);
-            if (album.Images == null || album.Images.Count == 1)
+            if (album.Images == null)
             {
                 album.CoverId = image.Id;
                 this.albums.Update(album);


add "No parameterless constructor defined for targetype" exception

--- src/SmartSql/DataReaderDeserializer/DataRowParserFactory.cs
+++ src/SmartSql/DataReaderDeserializer/DataRowParserFactory.cs
@@ -1,14 +1,13 @@
-using SmartSql.Abstractions.TypeHandler;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Data;
 using System.Reflection;
 using System.Reflection.Emit;
-using System.Text;
 using System.Linq;
 using SmartSql.Abstractions;
 using SmartSql.Utils;
 using System.Globalization;
+using SmartSql.Exceptions;

 namespace SmartSql.DataReaderDeserializer
 {
@@ -19,12 +18,14 @@
         public DataRowParserFactory()
         {
         }
+
         private string GetColumnKey(IDataReader dataReader)
         {
             var columns = Enumerable.Range(0, dataReader.FieldCount)
                             .Select(i => $"({i}:{dataReader.GetName(i)}:{dataReader.GetFieldType(i).Name})");
             return String.Join("&", columns);
         }
+
         public Func<IDataReader, RequestContext, object> GetParser(IDataReaderWrapper dataReader, RequestContext requestContext, Type targetType)
         {
             string key = $"{requestContext.StatementKey}_{GetColumnKey(dataReader)}_{targetType.FullName}";
@@ -49,6 +50,7 @@
             }
             return _cachedDeserializer[key];
         }
+
         private MethodInfo GetRealValueMethod(Type valueType)
         {
             var typeCode = Type.GetTypeCode(valueType);
@@ -170,6 +172,10 @@
                     EmitLoadColVal(iLGenerator, dataReader, col.Index, arg.TypeHandler, arg.ArgType, null);
                 }
             }
+
+            if (targetCtor == null)
+                throw new SmartSqlException($"No parameterless constructor defined for the target type: \"{targetType.FullName}\"");
+
             iLGenerator.Emit(OpCodes.Newobj, targetCtor); // [target]
             iLGenerator.Emit(OpCodes.Stloc_0);

@@ -238,7 +244,9 @@
                 {
                     EmitUtils.TypeOf(iLGenerator, realType);//[target][enumType]
                 }
+
                 #region GetValue
+
                 iLGenerator.Emit(OpCodes.Ldarg_0);// [dataReader]
                 EmitUtils.LoadInt32(iLGenerator, colIndex);// [dataReader][index]
                 if (getRealValueMethod != null)
@@ -253,7 +261,9 @@
                         iLGenerator.Emit(OpCodes.Unbox_Any, fieldType);
                     }
                 }
-                #endregion
+
+                #endregion GetValue
+
                 //[target][property-Value]
                 if (realType.IsEnum)
                 {
@@ -274,6 +284,7 @@
         }

         private static readonly MethodInfo _getTypeHandlerMethod = TypeUtils.RequestContextType.GetMethod("GetTypeHandler");
+
         private void EmitGetTypeHanderValue(ILGenerator iLGenerator, int colIndex, string typeHandlerName, Type propertyType)
         {
             iLGenerator.Emit(OpCodes.Ldarg_1);// [RequestContext]
@@ -299,5 +310,4 @@
             iLGenerator.Emit(OpCodes.Call, enumConvertMethod);
         }
     }
-
-}
+}


Ensure we create directories properly before using them.

--- src/SourceBrowser.Generator/Transformers/HtmlTransformer.cs
+++ src/SourceBrowser.Generator/Transformers/HtmlTransformer.cs
@@ -30,10 +30,11 @@
         protected override void VisitDocument(DocumentModel documentModel)
         {
             var documentSavePath = Path.Combine(_savePath, documentModel.RelativePath);
+            Directory.CreateDirectory(Path.GetDirectoryName(documentSavePath));
+
             var metadataSavePath = documentSavePath + ".json";
             createAndSaveMetadata(documentModel, metadataSavePath);

-            Directory.CreateDirectory(Path.GetDirectoryName(documentSavePath));
             //TODO: Write the HTML to the appropriate path

             using (var sw = new StreamWriter(documentSavePath))


Stephen/Nick #1218 - Removed Desciption from export calendar url

--- src/StockportWebapp/Views/stockportgov/Events/Detail.cshtml
+++ src/StockportWebapp/Views/stockportgov/Events/Detail.cshtml
@@ -159,10 +159,10 @@

-
-
-
-
+
+
+
+


[FIX]

[FIX]

--- src/SuperGlue.Logging.NLog/SetupNLogLoggingConfiguration.cs
+++ src/SuperGlue.Logging.NLog/SetupNLogLoggingConfiguration.cs
@@ -11,7 +11,7 @@
         {
             yield return new ConfigurationSetupResult("superglue.Nlog.LoggingSetup", environment =>
             {
-                environment.RegisterTransient(typeof(ILog), (x, y) => new NLogLogger(LogManager.GetLogger(x.FullName)));
+                environment.RegisterTransient(typeof(ILog), (x, y) => new NLogLogger(LogManager.GetLogger(x?.FullName ?? "")));

                 return Task.CompletedTask;
             }, "superglue.LoggingSetup");


fixed quotes

fixed quotes

--- src/Swetugg.Web/Areas/Gbg2022/Views/Conference/Index.cshtml
+++ src/Swetugg.Web/Areas/Gbg2022/Views/Conference/Index.cshtml
@@ -89,19 +89,28 @@

+            @* too old?

-

+
 *@
+

+

+

+
+

+

+

+            @* new images to 2020 needed here

-

+
 *@

-

+

                     Looking for information or sessions from previous years? All material is archived here:

@@ -130,20 +139,20 @@

-
“Venue was great, nice and bright, great service around breakfast, coffee and lunch. Always free seats at the sessions. Good topics. Friendly atmosphere.„

-                    Attendee 2019
+
“Well organized and you can feel that there are very dedicated people working hard to make it happen! I like the fact that it is kind of low key with focus on the speakers. No fancy key note and stuff which I appreciate. Very good value for money!„

+                    Attendee Stockholm 2020

-
“My first conference as a speaker, and I couldn't have been welcomed more by the organisers and attendees! On top of that, two days of amazing content from enthusiastic speakers on such a range of technical and non technical topics just made it a fantastic two days! Amazing experience!„

-                    Stacy Cashmore, speaker 2019
+
“Fun, thoughtful and hardworking organizers. Wonderful treatment. Very diverse speaker and audience. Well organized activities. Professional. Safe and inclusive enviroment„

+                    Speaker at Stockholm 2020

-
“We are happy to be part of the Swetugg community, being able to share, meet and connect with the community that are such an vital part to us as we are running one of the biggest .net projects in the Nordics. „

-                    Per Ol-Ers, If Insurance, Proud sponsor of Swetugg
+
“Good conference with lots of good and inspiring sessions. Great place too meet and mingle with people in the industry. „

+                    Sponsor of Swetugg Stockholm 2020

@@ -229,24 +238,6 @@
                                 Call for Speakers

-

-

-

-

-

-

-                                “I have spoken a couple of times at user groups, many times at a company but I never ever had spoken at a conference before until this week at Swetugg 2016. It was awesome!!„[mer]
-

-                            Jaime, speaker 2016
-

-

-

-

-

-                                “Jag inledde presentationen med att förklara hur säkerhet ofta blir en eftertanke. Sedan gick jag genom tre viktiga aspekter i att integrera säkerhet...„[mer]
-

-                            Simin, speaker 2015
-

             }


Removing directory creation from initialization.

--- src/System.Management.Automation/engine/PropertyAccessor.cs
+++ src/System.Management.Automation/engine/PropertyAccessor.cs
@@ -134,7 +134,6 @@
     {
         private string psHomeConfigDirectory;
         private string appDataConfigDirectory;
-        private const string configDirectoryName = "Configuration";
         private const string configFileName = "PowerShellProperties.json";

         /// <summary>
@@ -156,6 +155,38 @@
             // Sets the per-user configuration directory
             //
             appDataConfigDirectory = Utils.GetUserSettingsDirectory();
+            if (!Directory.Exists(appDataConfigDirectory))
+            {
+                try
+                {
+                    Directory.CreateDirectory(appDataConfigDirectory);
+                }
+                catch (UnauthorizedAccessException)
+                {
+                    // Do nothing now. This failure shouldn't block initialization
+                    appDataConfigDirectory = null;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Enables delayed creation of the user settings directory so it does not interfere with PowerShell initialization
+        /// </summary>
+        /// <returns>Returns the directory if present or creatable. Throws otherwise.</returns>
+        private string GetAppDataConfigDirectory()
+        {
+            if (null == appDataConfigDirectory)
+            {
+                string tempAppDataConfigDir = Utils.GetUserSettingsDirectory();
+                if (!Directory.Exists(tempAppDataConfigDir))
+                {
+                    Directory.CreateDirectory(tempAppDataConfigDir);
+                    // Only assign it if creation succeeds. It will throw if it fails.
+                    appDataConfigDirectory = tempAppDataConfigDir;
+                }
+                // Do not catch exceptions here. Let them flow up.
+            }
+            return appDataConfigDirectory;
         }

         /// <summary>
@@ -170,7 +201,7 @@
             // Defaults to system wide.
             if (PropertyScope.CurrentUser == scope)
             {
-                scopeDirectory = appDataConfigDirectory;
+                scopeDirectory = GetAppDataConfigDirectory();
             }

             string fileName = Path.Combine(scopeDirectory, configFileName);
@@ -205,7 +236,7 @@
             // Defaults to system wide.
             if(PropertyScope.CurrentUser == scope)
             {
-                scopeDirectory = appDataConfigDirectory;
+                scopeDirectory = GetAppDataConfigDirectory();
             }

             string fileName = Path.Combine(scopeDirectory, configFileName);
@@ -226,7 +257,7 @@
             // Defaults to system wide.
             if (PropertyScope.CurrentUser == scope)
             {
-                scopeDirectory = appDataConfigDirectory;
+                scopeDirectory = GetAppDataConfigDirectory();
             }

             string fileName = Path.Combine(scopeDirectory, configFileName);
@@ -241,7 +272,7 @@
             // Defaults to system wide.
             if (PropertyScope.CurrentUser == scope)
             {
-                scopeDirectory = appDataConfigDirectory;
+                scopeDirectory = GetAppDataConfigDirectory();
             }

             string fileName = Path.Combine(scopeDirectory, configFileName);


Added client operation for get query with parameters (#39398)

* added client operation for get query with parameters

* using stringBuilder for expected string and allowing user to control size when query parameters are present

* typo corrected

--- src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
+++ src/System.Net.Http/tests/StressTests/HttpStress/Program.cs
@@ -25,6 +25,8 @@
 using System.Text;
 using System.Net;
 using System.Net.Sockets;
+using System.Web;
+using System.Collections.Specialized;

 /// <summary>
 /// Simple HttpClient stress app that launches Kestrel in-proc and runs many concurrent requests of varying types against it.
@@ -43,6 +45,7 @@
         cmd.AddOption(new Option("-aspnetlog", "Enable ASP.NET warning and error logging.") { Argument = new Argument<bool>("enable", false) });
         cmd.AddOption(new Option("-listOps", "List available options.") { Argument = new Argument<bool>("enable", false) });
         cmd.AddOption(new Option("-seed", "Seed for generating pseudo-random parameters for a given -n argument.") { Argument = new Argument<int?>("seed", null)});
+        cmd.AddOption(new Option("-p", "Max number of query parameters for a request.") { Argument = new Argument<int>("queryParameters", 1) });

         ParseResult cmdline = cmd.Parse(args);
         if (cmdline.Errors.Count > 0)
@@ -64,10 +67,11 @@
             logPath             : cmdline.HasOption("-trace") ? cmdline.ValueForOption<string>("-trace") : null,
             aspnetLog           : cmdline.ValueForOption<bool>("-aspnetlog"),
             listOps             : cmdline.ValueForOption<bool>("-listOps"),
-            seed                : cmdline.ValueForOption<int?>("-seed") ?? new Random().Next());
+            seed                : cmdline.ValueForOption<int?>("-seed") ?? new Random().Next(),
+            numParameters       : cmdline.ValueForOption<int>("-p"));
     }

-    private static void Run(int concurrentRequests, int maxContentLength, Version[] httpVersions, int? connectionLifetime, int[] opIndices, string logPath, bool aspnetLog, bool listOps, int seed)
+    private static void Run(int concurrentRequests, int maxContentLength, Version[] httpVersions, int? connectionLifetime, int[] opIndices, string logPath, bool aspnetLog, bool listOps, int seed, int numParameters)
     {
         // Handle command-line arguments.
         EventListener listener =
@@ -155,6 +159,19 @@
                 {
                     ValidateResponse(m, httpVersion);
                     ValidateContent(contentSource, await m.Content.ReadAsStringAsync());
+                }
+            }),
+
+            ("GET Parameters",
+            async ctx =>
+            {
+                Version httpVersion = ctx.GetRandomVersion(httpVersions);
+                (string query, string expected) variables = GetGetQueryParameters(contentSource, ctx, numParameters);
+                using (var req = new HttpRequestMessage(HttpMethod.Get, serverUri + "/variables" + variables.query) { Version = httpVersion })
+                using (HttpResponseMessage m = await ctx.HttpClient.SendAsync(req))
+                {
+                    ValidateResponse(m, httpVersion);
+                    ValidateContent(variables.expected, await m.Content.ReadAsStringAsync());
                 }
             }),

@@ -355,16 +372,17 @@
             clientOperations = opIndices.Select(i => clientOperations[i]).ToArray();
         }

-        Console.WriteLine("     .NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(object).Assembly.Location)));
-        Console.WriteLine("  ASP.NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(WebHost).Assembly.Location)));
-        Console.WriteLine("       Tracing: " + (logPath == null ? (object)false : logPath.Length == 0 ? (object)true : logPath));
-        Console.WriteLine("   ASP.NET Log: " + aspnetLog);
-        Console.WriteLine("   Concurrency: " + concurrentRequests);
-        Console.WriteLine("Content Length: " + maxContentLength);
-        Console.WriteLine(" HTTP Versions: " + string.Join<Version>(", ", httpVersions));
-        Console.WriteLine("      Lifetime: " + (connectionLifetime.HasValue ? $"{connectionLifetime}ms" : "(infinite)"));
-        Console.WriteLine("    Operations: " + string.Join(", ", clientOperations.Select(o => o.Item1)));
-        Console.WriteLine("   Random Seed: " + seed);
+        Console.WriteLine("       .NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(object).Assembly.Location)));
+        Console.WriteLine("    ASP.NET Core: " + Path.GetFileName(Path.GetDirectoryName(typeof(WebHost).Assembly.Location)));
+        Console.WriteLine("         Tracing: " + (logPath == null ? (object)false : logPath.Length == 0 ? (object)true : logPath));
+        Console.WriteLine("     ASP.NET Log: " + aspnetLog);
+        Console.WriteLine("     Concurrency: " + concurrentRequests);
+        Console.WriteLine("  Content Length: " + maxContentLength);
+        Console.WriteLine("   HTTP Versions: " + string.Join<Version>(", ", httpVersions));
+        Console.WriteLine("        Lifetime: " + (connectionLifetime.HasValue ? $"{connectionLifetime}ms" : "(infinite)"));
+        Console.WriteLine("      Operations: " + string.Join(", ", clientOperations.Select(o => o.Item1)));
+        Console.WriteLine("     Random Seed: " + seed);
+        Console.WriteLine("Query Parameters: " + numParameters);
         Console.WriteLine();

         // Start the Kestrel web server in-proc.
@@ -435,6 +453,19 @@
                                     new StringValues(Enumerable.Range(0, i).Select(id => "value" + id).ToArray()));
                             }
                         }
+                    });
+                    endpoints.MapGet("/variables", async context =>
+                    {
+                        string queryString = context.Request.QueryString.Value;
+                        NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(queryString);
+
+                        StringBuilder sb = new StringBuilder();
+                        for (int i = 0; i < nameValueCollection.Count; i++)
+                        {
+                            sb.Append(nameValueCollection[$"Var{i}"]);
+                        }
+
+                        await context.Response.WriteAsync(sb.ToString());
                     });
                     endpoints.MapGet("/abort", async context =>
                     {
@@ -586,6 +617,25 @@
         GC.KeepAlive(listener);
     }

+    private static (string, string) GetGetQueryParameters(string contentSource, ClientContext clientContext, int numParameters)
+    {
+        StringBuilder queryString = new StringBuilder();
+        StringBuilder expectedString = new StringBuilder();
+        queryString.Append($"?Var{0}={contentSource}");
+        expectedString.Append(contentSource);
+
+        int num = clientContext.GetRandomInt(numParameters);
+
+        for (int i = 1; i < num; i++)
+        {
+            string vari = clientContext.GetRandomSubstring(contentSource);
+            expectedString.Append(vari);
+            queryString.Append($"&Var{i}={vari}");
+        }
+
+        return (queryString.ToString(), expectedString.ToString());
+    }
+
     /// <summary>Client context containing information pertaining to a single worker.</summary>
     private sealed class ClientContext
     {
@@ -614,6 +664,8 @@
             int length = _random.Next(0, input.Length - offset + 1);
             return input.Substring(offset, length);
         }
+
+        public int GetRandomInt(int maxValue) => _random.Next(0, maxValue);

         public Version GetRandomVersion(Version[] versions) =>
             versions[_random.Next(0, versions.Length)];


Address PR feedback

Address PR feedback

--- src/System.Net.Primitives/src/System/Net/CookieContainer.cs
+++ src/System.Net.Primitives/src/System/Net/CookieContainer.cs
@@ -963,12 +963,15 @@

     internal struct PathList
     {
+        // Usage of PathList depends on it being shallowly immutable;
+        // adding any mutable fields to it would result in breaks.
         private readonly SortedList<string, CookieCollection> _list;

         public static PathList Create() => new PathList(new SortedList<string, CookieCollection>(PathListComparer.StaticInstance));

         private PathList(SortedList<string, CookieCollection> list)
         {
+            Debug.Assert(list != null, $"{nameof(list)} must not be null.");
             _list = list;
         }

@@ -1030,7 +1033,7 @@
         {
             get
             {
-                Debug.Assert(_list != null);
+                Debug.Assert(_list != null, $"{nameof(PathList)} should never be default initialized and only ever created with {nameof(Create)}.");
                 return _list;
             }
         }


2 days of work to fix this bug

2 days of work to fix this bug

--- src/Tgstation.Server.Host/Controllers/InstanceController.cs
+++ src/Tgstation.Server.Host/Controllers/InstanceController.cs
@@ -184,7 +184,7 @@
 							if (++countOfOtherInstances >= generalConfiguration.InstanceLimit)
 								earlyOut = Conflict(new ErrorMessage(ErrorCode.InstanceLimitReached));
 							else
-								earlyOut = CheckInstanceNotChildOf(otherInstance.Path);
+								earlyOut = earlyOut ?? CheckInstanceNotChildOf(otherInstance.Path);

 							if (earlyOut != null && !newCancellationToken.IsCancellationRequested)
 								cts.Cancel();


Deal with FIXMEs

Deal with FIXMEs

--- src/Umbraco.Core/Persistence/Repositories/RepositoryBase.cs
+++ src/Umbraco.Core/Persistence/Repositories/RepositoryBase.cs
@@ -88,11 +88,11 @@
             get
             {
                 if (_cachePolicy != null) return _cachePolicy;
-                // fixme - no query for some TEntity?!
-                //if (_hasIdQuery == null) _hasIdQuery = Query.Where(x => x.Id != 0);
-                //var options = new RepositoryCachePolicyOptions(() => PerformCount(_hasIdQuery));
+
                 var options = new RepositoryCachePolicyOptions(() =>
                 {
+                    // have to initialize query here, because some TEntity cannot create a query,
+                    // but for those TEntity we don't perform counts? all this is a bit weird
                     if (_hasIdQuery == null) _hasIdQuery = Query.Where(x => x.Id != 0);
                     return PerformCount(_hasIdQuery);
                 });


Fixes #199

Fixes #199

--- src/Myra/Graphics2D/UI/Slider.cs
+++ src/Myra/Graphics2D/UI/Slider.cs
@@ -131,6 +131,16 @@
 			}
 		}

+		[XmlIgnore]
+		[Browsable(false)]
+		public ImageButton ImageButton
+		{
+			get
+			{
+				return InternalChild;
+			}
+		}
+
 		/// <summary>
 		/// Fires when the value had been changed
 		/// </summary>


Versionsnummer fr Finalbuilder angepasst.

--- dff.Extensions/Properties/AssemblyInfo.cs
+++ dff.Extensions/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 //
 // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern
 // übernehmen, indem Sie "*" eingeben:
-[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]


Changed width to decimal since tiles supports it on both height and width.

--- src/NTiled/Domain/TiledObject.cs
+++ src/NTiled/Domain/TiledObject.cs
@@ -59,7 +59,7 @@
         /// Gets or sets the width of the object in pixels.
         /// </summary>
         /// <value>The width of the object in pixels.</value>
-        public int Width { get; set; }
+        public decimal Width { get; set; }

         /// <summary>
         /// Gets or sets the height of the object in pixels.


Additiona linebreak for consitency

Additiona linebreak for consitency

--- src/Nancy/Helpers/HttpUtility.cs
+++ src/Nancy/Helpers/HttpUtility.cs
@@ -3,7 +3,7 @@
 //
 // Authors:
 //   Patrik Torstensson (Patrik.Torstensson@labs2.com)
-//   Wictor Wiln (decode/encode functions) (wictor@ibizkit.se)
+//   Wictor Wil�n (decode/encode functions) (wictor@ibizkit.se)
 //   Tim Coleman (tim@timcoleman.com)
 //   Gonzalo Paniagua Javier (gonzalo@ximian.com)
 //
@@ -737,7 +737,8 @@
                 if (valuePos == -1)
                 {
                     var valueLen = valueEnd;
-                    if (valueLen == -1) valueLen = decoded.Length - namePos;
+                    if (valueLen == -1)
+                        valueLen = decoded.Length - namePos;

                     name = UrlDecode(decoded.Substring(namePos, valueLen), encoding);
                     valuePos = namePos;


Override EventStream ToString method for readability

--- src/Elders.Cronus/EventStore/EventStream.cs
+++ src/Elders.Cronus/EventStore/EventStream.cs
@@ -2,6 +2,7 @@
 using System.Linq;
 using System.Text;
 using Elders.Cronus.DomainModeling;
+using System;

 namespace Elders.Cronus.EventStore
 {
@@ -44,14 +45,32 @@

         public override string ToString()
         {
+
             var performanceCriticalOutputBuilder = new StringBuilder();
+            AggregateCommit firstCommit = aggregateCommits.First();
+            string boundedContext = firstCommit.BoundedContext;
+            string base64AggregateRootId = Convert.ToBase64String(firstCommit.AggregateRootId);
+            string aggregateName = Encoding.UTF8.GetString(firstCommit.AggregateRootId).Split('@')[0];
+
+            performanceCriticalOutputBuilder.AppendLine("Aggregate Info");
+            performanceCriticalOutputBuilder.AppendLine("==============");
+            performanceCriticalOutputBuilder.AppendLine($"- Bounded Context: `{boundedContext}`");
+            performanceCriticalOutputBuilder.AppendLine($"- Aggregate root ID (base64): `{base64AggregateRootId}`");
+            performanceCriticalOutputBuilder.AppendLine($"- Aggregate name: `{aggregateName}`");
+            performanceCriticalOutputBuilder.AppendLine();
+
             foreach (var commit in aggregateCommits)
             {
+                performanceCriticalOutputBuilder.AppendLine("## Commits");
+                performanceCriticalOutputBuilder.AppendLine();
+                performanceCriticalOutputBuilder.AppendLine($"#### Revision {commit.Revision}");
+
                 foreach (var @event in commit.Events)
                 {
-                    performanceCriticalOutputBuilder.AppendLine($"\t-{@event}");
+                    performanceCriticalOutputBuilder.AppendLine($"- {@event}");
                 }
             }
+            performanceCriticalOutputBuilder.AppendLine("-------------------------------------------------------------------------------------------------------------------");
             return performanceCriticalOutputBuilder.ToString();
         }
     }


using TimeSpan static methods in Number to TimeSpan extensions

--- src/Humanizer/NumberToTimeSpanExtensions.cs
+++ src/Humanizer/NumberToTimeSpanExtensions.cs
@@ -1,6 +1,9 @@
 using System;
 namespace Humanizer
 {
+    /// <summary>
+    /// Number to TimeSpan extensions
+    /// </summary>
     public static class NumberToTimeSpanExtensions
     {
         /// <summary>
@@ -10,57 +13,57 @@
         /// <returns></returns>
         public static TimeSpan Weeks(this int input)
         {
-            return new TimeSpan(input*7, 0, 0, 0);
+            return Days(7*input);
         }

         /// <summary>
-        /// 2.Days() == new TimeSpan(2, 0, 0, 0)
+        /// 2.Days() == TimeSpan.FromDays(2)
         /// </summary>
-        /// <param name="input"></param>
+        /// <param name="days"></param>
         /// <returns></returns>
-        public static TimeSpan Days(this int input)
+        public static TimeSpan Days(this int days)
         {
-            return new TimeSpan(input, 0, 0, 0);
+            return TimeSpan.FromDays(days);
         }

         /// <summary>
-        /// 3.Hours() == new TimeSpan(0, 3, 0, 0)
+        /// 3.Hours() == TimeSpan.FromHours(3)
         /// </summary>
-        /// <param name="input"></param>
+        /// <param name="hours"></param>
         /// <returns></returns>
-        public static TimeSpan Hours(this int input)
+        public static TimeSpan Hours(this int hours)
         {
-            return new TimeSpan(0, input, 0, 0);
+            return TimeSpan.FromHours(hours);
         }

         /// <summary>
-        /// 4.Minutes() == new TimeSpan(0, 0, 4, 0)
+        /// 4.Minutes() == TimeSpan.FromMinutes(4)
         /// </summary>
-        /// <param name="input"></param>
+        /// <param name="minutes"></param>
         /// <returns></returns>
-        public static TimeSpan Minutes(this int input)
+        public static TimeSpan Minutes(this int minutes)
         {
-            return new TimeSpan(0, 0, input, 0);
+            return TimeSpan.FromMinutes(minutes);
         }

         /// <summary>
-        /// 5.Seconds() == new TimeSpan(0, 0, 0, 5)
+        /// 5.Seconds() == TimeSpan.FromSeconds(5)
         /// </summary>
-        /// <param name="input"></param>
+        /// <param name="seconds"></param>
         /// <returns></returns>
-        public static TimeSpan Seconds(this int input)
+        public static TimeSpan Seconds(this int seconds)
         {
-            return new TimeSpan(0, 0, 0, input);
+            return TimeSpan.FromSeconds(seconds);
         }

         /// <summary>
-        /// 5.Milliseconds() == new TimeSpan(0, 0, 0, 0, 5)
+        /// 5.Milliseconds() == TimeSpan.FromMilliseconds(5)
         /// </summary>
-        /// <param name="input"></param>
+        /// <param name="ms"></param>
         /// <returns></returns>
-        public static TimeSpan Milliseconds(this int input)
+        public static TimeSpan Milliseconds(this int ms)
         {
-            return new TimeSpan(0, 0, 0, 0, input);
+            return TimeSpan.FromMilliseconds(ms);
         }
     }
 }


Removing unused fields that were left after changing how MemoryTableContext stores records

--- src/Hyde/Table/Memory/MemoryTableContext.cs
+++ src/Hyde/Table/Memory/MemoryTableContext.cs
@@ -3,9 +3,6 @@
 using System.Collections.Generic;
 using System.Dynamic;
 using System.Linq;
-using System.Linq.Expressions;
-using System.Runtime.CompilerServices;
-using Microsoft.CSharp.RuntimeBinder;
 using TechSmith.Hyde.Common;
 using TechSmith.Hyde.Common.DataAnnotations;
 using TechSmith.Hyde.Table.Azure;
@@ -15,10 +12,6 @@
    internal class MemoryTableContext : ITableContext
    {
       public static ConcurrentDictionary<string, MemoryTable> _memoryTables = new ConcurrentDictionary<string, MemoryTable>();
-
-      // We store partition/row keys using the following dictionary keys.
-      private const string _partitionKeyName = "PartitionKey";
-      private const string _rowKeyName = "RowKey";

       private readonly Guid _instanceId = Guid.NewGuid();


Add Span send (#443)

Add Span send (#443)

Add Span send
Add a LITENETLIB_SPANS define

--- LiteNetLib/NetPeer.cs
+++ LiteNetLib/NetPeer.cs
@@ -584,6 +584,146 @@
                 channel.AddToQueue(packet);
             }
         }
+
+#if LITENETLIB_SPANS || NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1 || NETCOREAPP3_1 || NET5_0 || NETSTANDARD2_1
+        /// <summary>
+        /// Send data to peer with delivery event called
+        /// </summary>
+        /// <param name="data">Data</param>
+        /// <param name="channelNumber">Number of channel (from 0 to channelsCount - 1)</param>
+        /// <param name="deliveryMethod">Delivery method (reliable, unreliable, etc.)</param>
+        /// <param name="userData">User data that will be received in DeliveryEvent</param>
+        /// <exception cref="ArgumentException">
+        ///     If you trying to send unreliable packet type<para/>
+        /// </exception>
+        public void SendWithDeliveryEvent(ReadOnlySpan<byte> data, byte channelNumber, DeliveryMethod deliveryMethod, object userData)
+        {
+            if (deliveryMethod != DeliveryMethod.ReliableOrdered && deliveryMethod != DeliveryMethod.ReliableUnordered)
+                throw new ArgumentException("Delivery event will work only for ReliableOrdered/Unordered packets");
+            SendInternal(data, channelNumber, deliveryMethod, userData);
+        }
+
+        /// <summary>
+        /// Send data to peer (channel - 0)
+        /// </summary>
+        /// <param name="data">Data</param>
+        /// <param name="deliveryMethod">Send options (reliable, unreliable, etc.)</param>
+        /// <exception cref="TooBigPacketException">
+        ///     If size exceeds maximum limit:<para/>
+        ///     MTU - headerSize bytes for Unreliable<para/>
+        ///     Fragment count exceeded ushort.MaxValue<para/>
+        /// </exception>
+        public void Send(ReadOnlySpan<byte> data, DeliveryMethod deliveryMethod)
+        {
+            SendInternal(data, 0, deliveryMethod, null);
+        }
+
+        /// <summary>
+        /// Send data to peer
+        /// </summary>
+        /// <param name="data">Data</param>
+        /// <param name="channelNumber">Number of channel (from 0 to channelsCount - 1)</param>
+        /// <param name="deliveryMethod">Send options (reliable, unreliable, etc.)</param>
+        /// <exception cref="TooBigPacketException">
+        ///     If size exceeds maximum limit:<para/>
+        ///     MTU - headerSize bytes for Unreliable<para/>
+        ///     Fragment count exceeded ushort.MaxValue<para/>
+        /// </exception>
+        public void Send(ReadOnlySpan<byte> data, byte channelNumber, DeliveryMethod deliveryMethod)
+        {
+            SendInternal(data, channelNumber, deliveryMethod, null);
+        }
+
+        private void SendInternal(
+            ReadOnlySpan<byte> data,
+            byte channelNumber,
+            DeliveryMethod deliveryMethod,
+            object userData)
+        {
+            if (_connectionState != ConnectionState.Connected || channelNumber >= _channels.Length)
+                return;
+
+            //Select channel
+            PacketProperty property;
+            BaseChannel channel = null;
+
+            if (deliveryMethod == DeliveryMethod.Unreliable)
+            {
+                property = PacketProperty.Unreliable;
+            }
+            else
+            {
+                property = PacketProperty.Channeled;
+                channel = CreateChannel((byte)(channelNumber * 4 + (byte)deliveryMethod));
+            }
+
+            //Prepare
+            NetDebug.Write("[RS]Packet: " + property);
+
+            //Check fragmentation
+            int headerSize = NetPacket.GetHeaderSize(property);
+            //Save mtu for multithread
+            int mtu = _mtu;
+            int length = data.Length;
+            if (length + headerSize > mtu)
+            {
+                //if cannot be fragmented
+                if (deliveryMethod != DeliveryMethod.ReliableOrdered && deliveryMethod != DeliveryMethod.ReliableUnordered)
+                    throw new TooBigPacketException("Unreliable or ReliableSequenced packet size exceeded maximum of " + (mtu - headerSize) + " bytes, Check allowed size by GetMaxSinglePacketSize()");
+
+                int packetFullSize = mtu - headerSize;
+                int packetDataSize = packetFullSize - NetConstants.FragmentHeaderSize;
+                int totalPackets = length / packetDataSize + (length % packetDataSize == 0 ? 0 : 1);
+
+                NetDebug.Write("FragmentSend:\n" +
+                           " MTU: {0}\n" +
+                           " headerSize: {1}\n" +
+                           " packetFullSize: {2}\n" +
+                           " packetDataSize: {3}\n" +
+                           " totalPackets: {4}",
+                    mtu, headerSize, packetFullSize, packetDataSize, totalPackets);
+
+                if (totalPackets > ushort.MaxValue)
+                    throw new TooBigPacketException("Data was split in " + totalPackets + " fragments, which exceeds " + ushort.MaxValue);
+
+                ushort currentFragmentId = (ushort)Interlocked.Increment(ref _fragmentId);
+
+                for (ushort partIdx = 0; partIdx < totalPackets; partIdx++)
+                {
+                    int sendLength = length > packetDataSize ? packetDataSize : length;
+
+                    NetPacket p = _packetPool.GetPacket(headerSize + sendLength + NetConstants.FragmentHeaderSize);
+                    p.Property = property;
+                    p.UserData = userData;
+                    p.FragmentId = currentFragmentId;
+                    p.FragmentPart = partIdx;
+                    p.FragmentsTotal = (ushort)totalPackets;
+                    p.MarkFragmented();
+
+                    data.Slice(partIdx * packetDataSize, sendLength).CopyTo(new Span<byte>(p.RawData, NetConstants.FragmentedHeaderTotalSize, sendLength));
+                    channel.AddToQueue(p);
+
+                    length -= sendLength;
+                }
+                return;
+            }
+
+            //Else just send
+            NetPacket packet = _packetPool.GetPacket(headerSize + length);
+            packet.Property = property;
+            data.CopyTo(new Span<byte>(packet.RawData, headerSize, length));
+            packet.UserData = userData;
+
+            if (channel == null) //unreliable
+            {
+                _unreliableChannel.Enqueue(packet);
+            }
+            else
+            {
+                channel.AddToQueue(packet);
+            }
+        }
+#endif

         public void Disconnect(byte[] data)
         {


Channel.Deinterleaveメソッドのオーバーロードを追加

Channel.Deinterleaveメソッドのオーバーロードを追加

--- src/Channel.cs
+++ src/Channel.cs
@@ -77,10 +77,25 @@
             }
         }

+        public static void Deinterleave<T>(T[] src, T[] dest, int count)
+        {
+            for (int i = 0, j = 0, k = 0; i < count; i++, j += 2, k++)
+                dest[k] = src[j];
+        }
+
         public static void Deinterleave<T>(T[] src, int srcOffset, T[] dest, int dest_offset, int count)
         {
             for (int i = 0, j = srcOffset, k = dest_offset; i < count; i++, j += 2, k++)
                 dest[k] = src[j];
+        }
+
+        public static void Deinterleave<T>(T[] src, T[] destR, T[] destI, int count)
+        {
+            for (int i = 0, j = 0, k = 0, l = 0; i < count; i++, j += 2, k++, l++)
+            {
+                destR[k] = src[j];
+                destI[l] = src[j + 1];
+            }
         }

         public static void Deinterleave<T>(T[] src, int srcOffset, T[] destR, int destR_offset, T[] destI, int destI_offset, int count)


remove debug log for FirstChanceException

--- src/Lime.Protocol/Serialization/TypeUtil.cs
+++ src/Lime.Protocol/Serialization/TypeUtil.cs
@@ -37,7 +37,7 @@
         {
             AppDomain.CurrentDomain.UnhandledException += (s, e) =>
             {
-                Trace.WriteLine($"LIME - Unhandled exception at {typeof(TypeUtil).FullName}: {e.ExceptionObject}");
+                Trace.WriteLine($"LIME - Unhandled exception: {e.ExceptionObject}");
             };

             _documentMediaTypeDictionary = new Dictionary<MediaType, Type>();


Lucene.Net.Spatial.Query.SpatialArgs: Fixed null guard clauses to throw ArgumentNullException (see #446)

--- src/Lucene.Net.Spatial/Query/SpatialArgs.cs
+++ src/Lucene.Net.Spatial/Query/SpatialArgs.cs
@@ -39,8 +39,8 @@
         public SpatialArgs(SpatialOperation operation, IShape shape)
         {
             // LUCENENET specific - changed from IllegalArgumentException to ArgumentNullException (.NET convention)
-            this.Operation = operation ?? throw new ArgumentOutOfRangeException(nameof(operation), "operation and shape are required");
-            this.Shape = shape ?? throw new ArgumentOutOfRangeException(nameof(shape), "operation and shape are required");
+            this.Operation = operation ?? throw new ArgumentNullException(nameof(operation), "operation and shape are required");
+            this.Shape = shape ?? throw new ArgumentNullException(nameof(shape), "operation and shape are required");
         }

         /// <summary>
@@ -54,6 +54,10 @@
         /// <returns>A distance (in degrees).</returns>
         public static double CalcDistanceFromErrPct(IShape shape, double distErrPct, SpatialContext ctx)
         {
+            // LUCENENET: Added null guard clause
+            if (ctx is null)
+                throw new ArgumentNullException(nameof(ctx));
+
             if (distErrPct < 0 || distErrPct > 0.5)
             {
                 throw new ArgumentOutOfRangeException(nameof(distErrPct), $"distErrPct {distErrPct} must be between [0 to 0.5]", nameof(distErrPct));// LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)


include score in results

include score in results

--- src/Maw.Domain/Search/MultimediaCategory.cs
+++ src/Maw.Domain/Search/MultimediaCategory.cs
@@ -36,5 +36,8 @@

         [SolrField("teaser_photo_sq_path")]
         public string TeaserPhotoSqPath { get; set; }
+
+        [SolrField("score")]
+        public double Score { get; set; }
     }
 }


Fixed naming

Fixed naming

--- src/Rison/RisonDynamicDecoder.cs
+++ src/Rison/RisonDynamicDecoder.cs
@@ -244,7 +244,7 @@
         {
             var substring = walker.RisonString.Substring(walker.Index);

-            var match = GetIndexMatch(substring);
+            var match = GetIdMatch(substring);
             if (match.Success)
             {
                 var id = match.Groups[0].Value;
@@ -254,7 +254,7 @@
             throw new RisonDecoderException(string.Format("Invalid character: '{0}'", c));
         }

-        private static Match GetIndexMatch(string input)
+        private static Match GetIdMatch(string input)
         {
             var lettersAndDigits = string.Join(string.Empty, Enumerable.Range(0, 127)
                                                                  .Select(i => (char) i)


fix bugs that occurred b/c project references were wrong

--- src/Sir.StringCompare/Program.cs
+++ src/Sir.StringCompare/Program.cs
@@ -31,9 +31,9 @@
                 baseVectorStorage[i] = (float)i + 1;
             }

-            var baseVector = new IndexedVector(baseVectorStorage);
-            var firstVector = model.Tokenize(first).First();
-            var secondVector = model.Tokenize(second).First();
+            var baseVector = new SerializableVector(baseVectorStorage);
+            var firstVector = model.CreateEmbedding(first, false).First();
+            var secondVector = model.CreateEmbedding(second, false).First();
             var angle1 = model.CosAngle(baseVector, firstVector);
             var angle2 = model.CosAngle(baseVector, secondVector);

@@ -44,8 +44,8 @@

         private static void Similarity(string first, string second, IModel<string> model)
         {
-            var vec1 = model.Tokenize(first).First();
-            var vec2 = model.Tokenize(second).First();
+            var vec1 = model.CreateEmbedding(first, false).First();
+            var vec2 = model.CreateEmbedding(second, false).First();
             var angle = model.CosAngle(vec1, vec2);

             Console.WriteLine($"similarity: {angle}");
@@ -66,9 +66,9 @@
                     break;
                 }

-                var node = new VectorNode(model.Tokenize(command).First());
+                var node = new VectorNode(model.CreateEmbedding(command, false).First());

-                root.MergeOrAdd(node, model);
+                root.AddOrAppend(node, model);
             }

             Console.WriteLine(PathFinder.Visualize(root));
@@ -84,7 +84,7 @@
                     break;
                 }

-                var hit = PathFinder.ClosestMatch(root, model.Tokenize(command).First(), model);
+                var hit = PathFinder.ClosestMatch(root, model.CreateEmbedding(command, false).First(), model);

                 Console.WriteLine($"{hit.Score} {hit.Node}");
             }


Eliminate two allocations in UriExtensions

--- src/SmartReader/UriExtensions.cs
+++ src/SmartReader/UriExtensions.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Globalization;
 using System.Text;

 namespace SmartReader
@@ -9,13 +10,19 @@
         {
             var sb = new StringBuilder(startUri.Scheme + "://");

-            if (!string.IsNullOrEmpty(startUri.UserInfo))
-                sb.Append(startUri.UserInfo + "@");
+            if (!string.IsNullOrEmpty(startUri.UserInfo))
+            {
+                sb.Append(startUri.UserInfo);
+                sb.Append('@');
+            }

             sb.Append(startUri.Host);

-            if (startUri.Port != 80 && startUri.Port != 443)
-                sb.Append(":" + startUri.Port);
+            if (!startUri.IsDefaultPort)
+            {
+                sb.Append(':');
+                sb.Append(startUri.Port.ToString(CultureInfo.InvariantCulture));
+            }

             return sb.ToString();
         }


No need to resolve InType one more time.

--- src/SwaggerWcf/Support/Mapper.cs
+++ src/SwaggerWcf/Support/Mapper.cs
@@ -299,7 +299,7 @@
                     TypeFormat typeFormat = Helpers.MapSwaggerType(type, definitionsTypesList);

                     operation.Parameters.Add(GetParameter(typeFormat, declaration, implementation, parameter, settings, uriTemplate, wrappedRequest,
-                                                          definitionsTypesList));
+                                                          definitionsTypesList, inType));
                 }
                 if (wrappedRequest)
                 {
@@ -367,13 +367,20 @@
                    (wi.BodyStyle == WebMessageBodyStyle.Wrapped || wi.BodyStyle == WebMessageBodyStyle.WrappedResponse);
         }

-        private ParameterBase GetParameter(TypeFormat typeFormat, MethodInfo declaration, MethodInfo implementation, ParameterInfo parameter, SwaggerWcfParameterAttribute settings, string uriTemplate, bool wrappedRequest, IList<Type> definitionsTypesList)
+        private ParameterBase GetParameter(TypeFormat typeFormat,
+                                           MethodInfo declaration,
+                                           MethodInfo implementation,
+                                           ParameterInfo parameter,
+                                           SwaggerWcfParameterAttribute settings,
+                                           string uriTemplate,
+                                           bool wrappedRequest,
+                                           IList<Type> definitionsTypesList,
+                                           InType inType)
         {
             string description = settings?.Description;
             bool required = settings != null && settings.Required;
             string name = parameter.Name;

-            InType inType = GetInType(uriTemplate, parameter.Name);
             if (inType == InType.Path)
                 required = true;


Added help file for the command line

Added help file for the command line

--- src/Microsoft.PowerShell.Linux.Host/main.cs
+++ src/Microsoft.PowerShell.Linux.Host/main.cs
@@ -175,6 +175,41 @@
                 this.currentPowerShell = PowerShell.Create();
             }

+
+            if (initialScript == "--help" || initialScript == "-h")
+            {
+                Console.WriteLine(@"
+======HELP======
+PowerShell for Linux
+Command Line Help Resource
+================
+
+TOPIC
+    PowerShell for Linux Command Line Arguments
+
+SYNOPSIS
+    PowerShell for Linux takes several command line arguments.
+
+OPTIONS
+
+    [NO ARGUMENTS]        Will launch PowerShell for Linux in an interactive shell.
+
+    --command <string>    Will execute given string as a PowerShell command.
+
+    -c <string>           Will execute given string as a PowerShell command.
+
+    --file <filePath>     Given a file path will execute as a PowerShell script.
+
+    -f <filePath>         Given a file path will execute as a PowerShell script.
+
+    --help                Prints a basic help of command line arguments for PowerShell on Linux
+
+    -h                    Prints a basic help of command line arguments for PowerShell on Linux.
+
+");
+		return;
+	    }
+
             try
             {
                 this.currentPowerShell.Runspace = this.myRunSpace;


Missed updating CreateOrder method.

Missed updating CreateOrder method.

--- src/Merchello.Core/Services/OrderService.cs
+++ src/Merchello.Core/Services/OrderService.cs
@@ -57,7 +57,7 @@
         /// <returns>The <see cref="IOrder"/></returns>
         public IOrder CreateOrder(Guid orderStatusKey, Guid invoiceKey, bool raiseEvents = true)
         {
-
+            return CreateOrder(orderStatusKey, invoiceKey, 0, raiseEvents);
         }

         /// <summary>


OrderedDictionary now removed. Torrent attributes *must* be sorted alphabetically. If they aren't, it's an illegal torrent.

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

--- src/MonoTorrent.Common/OrderedDictionary.cs
+++ src/MonoTorrent.Common/OrderedDictionary.cs
@@ -1,270 +0,0 @@
-//
-// System.String.cs
-//
-// Authors:
-//   Alan McGovern alan.mcgovern@gmail.com
-//
-// Copyright (C) 2006 Alan McGovern
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-/* OrderedDictionary Revision 0.1.1
- * by Alan McGovern.
- *
- * This is a dictionary that returns the contents in the same order they were inserted in.
-*/
-
-namespace MonoTorrent.Common
-{
-    /// <summary>
-    ///
-    /// </summary>
-    /// <typeparam name="TKey"></typeparam>
-    /// <typeparam name="TValue"></typeparam>
-    public class OrderedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IList<KeyValuePair<TKey, TValue>>
-    {
-        #region Member Variables
-        private List<TKey> keys;
-        private List<TValue> values;
-        #endregion
-
-
-        #region Constructors
-        /// <summary>
-        ///
-        /// </summary>
-        public OrderedDictionary()
-            : this(8)
-        {
-        }
-        /// <summary>
-        ///
-        /// </summary>
-        /// <param name="capacity"></param>
-        public OrderedDictionary(int capacity)
-        {
-            this.keys = new List<TKey>(capacity);
-            this.values = new List<TValue>(capacity);
-        }
-        #endregion
-
-
-        #region IDictionary and IList methods
-        public void Add(TKey key, TValue value)
-        {
-            this.keys.Add(key);
-            this.values.Add(value);
-        }
-
-        public void Add(KeyValuePair<TKey, TValue> item)
-        {
-            if (this.keys.Contains(item.Key))
-                throw new Exception("Key already there");
-
-            this.Add(item.Key, item.Value);
-        }
-
-        public bool Contains(KeyValuePair<TKey, TValue> item)
-        {
-            int keyIndex = this.keys.IndexOf(item.Key);
-            int valueIndex = this.values.IndexOf(item.Value);
-
-            if (keyIndex < 0 || valueIndex < 0)
-                return false;
-
-            return keyIndex == valueIndex;
-        }
-
-        public bool ContainsKey(TKey key)
-        {
-            return this.keys.Contains(key);
-        }
-
-        public void Clear()
-        {
-            this.keys.Clear();
-            this.values.Clear();
-        }
-
-        public int Count
-        {
-            get { return this.keys.Count; }
-        }
-
-        public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
-        {
-            throw new Exception("The method or operation is not implemented.");
-        }
-
-        public int IndexOf(KeyValuePair<TKey, TValue> item)
-        {
-            return this.keys.IndexOf(item.Key);
-        }
-
-        public void Insert(int index, KeyValuePair<TKey, TValue> item)
-        {
-            this.keys.Insert(index, item.Key);
-            this.values.Insert(index, item.Value);
-        }
-
-        public bool IsReadOnly
-        {
-            get { throw new Exception("The method or operation is not implemented."); }
-        }
-
-        public bool Remove(TKey key)
-        {
-            return this.keys.Remove(key);
-        }
-
-        public bool Remove(KeyValuePair<TKey, TValue> item)
-        {
-            int keyIndex = this.keys.IndexOf(item.Key);
-            int valueIndex = this.values.IndexOf(item.Value);
-
-            if (keyIndex < 0 || valueIndex < 0 || keyIndex != valueIndex)
-                return false;
-
-            this.keys.RemoveAt(keyIndex);
-            this.values.RemoveAt(valueIndex);
-
-            return true;
-        }
-
-        public void RemoveAt(int index)
-        {
-            this.keys.RemoveAt(index);
-            this.values.RemoveAt(0);
-        }
-
-        public bool TryGetValue(TKey key, out TValue value)
-        {
-            value = default(TValue);
-
-            int keyIndex = this.keys.IndexOf(key);
-
-            if (keyIndex < 0)
-                return false;
-
-            value = this.values[keyIndex];
-            return true;
-        }
-
-        public ICollection<TKey> Keys
-        {
-            get { return this.keys; }
-        }
-
-        public ICollection<TValue> Values
-        {
-            get { return this.values; }
-        }
-
-        public TValue this[TKey key]
-        {
-            get
-            {
-                int keyIndex = this.keys.IndexOf(key);
-
-                if (keyIndex < 0)
-                    throw new KeyNotFoundException();
-
-                return this.values[keyIndex];
-            }
-            set
-            {
-                int keyIndex = this.keys.IndexOf(key);
-                if (keyIndex < 0)
-                    throw new KeyNotFoundException();
-
-                this.values[keyIndex] = value;
-            }
-        }
-
-        public KeyValuePair<TKey, TValue> this[int index]
-        {
-            get { return new KeyValuePair<TKey, TValue>(this.keys[index], this.values[index]); }
-            set
-            {
-                this.keys[index] = value.Key;
-                this.values[index] = value.Value;
-            }
-        }
-
-        public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
-        {
-            for (int i = 0; i < this.keys.Count; i++)
-                yield return new KeyValuePair<TKey, TValue>(this.keys[i], this.values[i]);
-        }
-
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
-        {
-            return this.GetEnumerator();
-        }
-        #endregion
-
-
-        #region Overridden Methods
-        public override bool Equals(object obj)
-        {
-            OrderedDictionary<TKey, TValue> dict = obj as OrderedDictionary<TKey, TValue>;
-            if (obj == null)
-                return false;
-
-            if (this.keys.Count != dict.keys.Count)     // Wrong file size
-                return false;
-
-            for (int i = 0; i < this.values.Count; i++)
-                if (!this.keys[i].Equals(dict.keys[i]) || !this.values[i].Equals(dict.values[i]))
-                    return false;
-
-            return true;
-        }
-
-        public override int GetHashCode()
-        {
-#warning Can someone verify if this is ok?
-            long result = 0;
-            result += this.keys.GetHashCode();
-            result += this.values.GetHashCode();
-            return result.GetHashCode();
-        }
-
-        public override string ToString()
-        {
-            StringBuilder sb = new StringBuilder(128);
-            for (int i = 0; i < this.keys.Count; i++)
-            {
-                sb.Append(this.keys[i].ToString());
-                sb.Append(this.values[i].ToString());
-            }
-
-            return sb.ToString();
-        }
-        #endregion
-    }
-}


Adding SignalR components to the Ntlm based Startup class.

Missed to do this with previous checkin.

--- src/MusicStore/StartupNtlmAuthentication.cs
+++ src/MusicStore/StartupNtlmAuthentication.cs
@@ -104,7 +104,13 @@

                 // Add MVC services to the services container
                 services.AddMvc();
+
+                //Add all SignalR related services to IoC.
+                services.AddSignalR();
             });
+
+            //Configure SignalR
+            app.UseSignalR();

             // Add static files to the request pipeline
             app.UseStaticFiles();


Fixes bug in previous commit.

Fixes bug in previous commit.

--- src/NCron.Framework/ReflectiveJobFactory.cs
+++ src/NCron.Framework/ReflectiveJobFactory.cs
@@ -15,7 +15,6 @@
  */

 using System;
-using NCron.Framework.Internal;

 namespace NCron.Framework
 {


Implement new 'CanCreate' methods. Fixes #838

--- src/MySqlConnector/MySqlConnectorFactory.cs
+++ src/MySqlConnector/MySqlConnectorFactory.cs
@@ -14,6 +14,12 @@
 #if !NETSTANDARD1_3
 		public override DbCommandBuilder CreateCommandBuilder() => new MySqlCommandBuilder();
 		public override DbDataAdapter CreateDataAdapter() => new MySqlDataAdapter();
+
+#if !NET45 && !NET461 && !NET471 && !NETSTANDARD2_0 && !NETCOREAPP2_1
+		public override bool CanCreateCommandBuilder => true;
+		public override bool CanCreateDataAdapter => true;
+		public override bool CanCreateDataSourceEnumerator => false;
+#endif
 #endif

 		public MySqlBatch CreateBatch() => new MySqlBatch();


Small test for Duration.Add, mostly to demonstrate NCrunch to a colleague :)

--- src/NodaTime.Test/DurationTest.Operators.cs
+++ src/NodaTime.Test/DurationTest.Operators.cs
@@ -52,6 +52,14 @@
             Assert.AreEqual(3000001L, (threeMillion + Duration.One).Ticks, "3,000,000 + 1");
             Assert.AreEqual(0L, (Duration.One + Duration.NegativeOne).Ticks, "1 + (-1)");
             Assert.AreEqual(-49999999L, (negativeFiftyMillion + Duration.One).Ticks, "-50,000,000 + 1");
+        }
+
+        [Test]
+        public void AddMethod_Equivalence()
+        {
+            Duration x = new Duration(100);
+            Duration y = new Duration(200);
+            Assert.AreEqual(x + y, Duration.Add(x, y));
         }
         #endregion


Fix #1655 by only logging Verbose messages from ContentService.

--- src/NuGetGallery/Services/ContentService.cs
+++ src/NuGetGallery/Services/ContentService.cs
@@ -65,10 +65,10 @@
                 ContentItem item = null;
                 if (ContentCache.TryGetValue(name, out item) && DateTime.UtcNow < item.ExpiryUtc)
                 {
-                    Trace.Information("Cache Valid. Expires at: " + item.ExpiryUtc.ToString());
+                    Trace.Verbose("Cache Valid. Expires at: " + item.ExpiryUtc.ToString());
                     return item.Content;
                 }
-                Trace.Information("Cache Expired.");
+                Trace.Verbose("Cache Expired.");

                 // Get the file from the content service
                 string fileName = name + ContentFileExtension;
@@ -85,26 +85,26 @@
                 HtmlString result = new HtmlString(String.Empty);
                 if (reference == null)
                 {
-                    Trace.Error("Requested Content File Not Found: " + fileName);
+                    Trace.Verbose("Requested Content File Not Found: " + fileName);
                 }
                 else
                 {
                     // Check the content ID to see if it's different
                     if (item != null && String.Equals(item.ContentId, reference.ContentId, StringComparison.Ordinal))
                     {
-                        Trace.Information("No change to content item. Using Cache");
+                        Trace.Verbose("No change to content item. Using Cache");
                         // No change, just use the cache.
                         result = item.Content;
                     }
                     else
                     {
                         // Process the file
-                        Trace.Information("Content Item changed. Updating...");
+                        Trace.Verbose("Content Item changed. Updating...");
                         using (var stream = reference.OpenRead())
                         {
                             if (stream == null)
                             {
-                                Trace.Error("Requested Content File Not Found: " + fileName);
+                                Trace.Verbose("Requested Content File Not Found: " + fileName);
                                 reference = null;
                             }
                             else


tokenizer nullable annotations

tokenizer nullable annotations

--- src/Peachpie.Library.Scripting/Tokenizer.cs
+++ src/Peachpie.Library.Scripting/Tokenizer.cs
@@ -1,4 +1,6 @@
-using System;
+#nullable enable
+
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;


Soporte para métodos con argumentos

Soporte para métodos con argumentos

--- src/Platform/WPF/ViewModel/SimpleCommand.cs
+++ src/Platform/WPF/ViewModel/SimpleCommand.cs
@@ -36,7 +36,7 @@
     /// </summary>
     public class SimpleCommand : NotifyPropertyChanged, ICommand
     {
-        private readonly Action _action;
+        private readonly Action<object> _action;
         private bool _canExecute;

         /// <inheritdoc />
@@ -59,6 +59,31 @@
         ///     inmediatamente después de instanciar esta clase.
         /// </param>
         public SimpleCommand(Action action, bool canExecute)
+        {
+            _action = _=> action();
+            _canExecute = canExecute;
+        }
+
+        /// <inheritdoc />
+        /// <summary>
+        ///     Inicializa una nueva instancia de la clase
+        ///     <see cref="T:TheXDS.MCART.ViewModel.SimpleCommand" />.
+        /// </summary>
+        /// <param name="action">Acción a ejecutar.</param>
+        public SimpleCommand(Action<object> action) : this(action, true)
+        {
+        }
+
+        /// <summary>
+        ///     Inicializa una nueva instancia de la clase
+        ///     <see cref="SimpleCommand"/>.
+        /// </summary>
+        /// <param name="action">Acción a ejecutar.</param>
+        /// <param name="canExecute">
+        ///     Valor que indica si el comando puede ser ejecutado
+        ///     inmediatamente después de instanciar esta clase.
+        /// </param>
+        public SimpleCommand(Action<object> action, bool canExecute)
         {
             _action = action;
             _canExecute = canExecute;
@@ -112,7 +137,7 @@
         /// </param>
         public void Execute(object parameter)
         {
-            _action();
+            _action(parameter);
         }

         /// <summary>


Add version to svg's href files to prevent cache issues

--- BTCPayServer/TagHelpers.cs
+++ BTCPayServer/TagHelpers.cs
@@ -3,10 +3,15 @@
 using System.Globalization;
 using System.Linq;
 using System.Text;
+using System.Text.Encodings.Web;
 using System.Threading.Tasks;
 using BTCPayServer.Configuration;
 using BTCPayServer.Security;
 using BTCPayServer.Services;
+using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.AspNetCore.Mvc.Routing;
+using Microsoft.AspNetCore.Mvc.ViewFeatures;
 using Microsoft.AspNetCore.Razor.TagHelpers;
 using NBitcoin;
 using NBitcoin.Crypto;
@@ -145,22 +150,19 @@

     // Make sure that <svg><use href=/ are correctly working if rootpath is present
     [HtmlTargetElement("use", Attributes = "href")]
-    public class SVGUse : TagHelper
+    public class SVGUse : UrlResolutionTagHelper
     {
-        private string _RootPath;
+        private readonly IFileVersionProvider _fileVersionProvider;

-        public SVGUse(BTCPayServerOptions opts)
+        public SVGUse(IUrlHelperFactory urlHelperFactory, HtmlEncoder htmlEncoder, IFileVersionProvider fileVersionProvider):base(urlHelperFactory, htmlEncoder)
         {
-            _RootPath = opts.RootPath;
+            _fileVersionProvider = fileVersionProvider;
         }
         public override void Process(TagHelperContext context, TagHelperOutput output)
         {
-            if (string.IsNullOrEmpty(_RootPath) || _RootPath == "/")
-                return;
-            var attr = output.Attributes["href"];
-            if (!attr.Value.ToString().StartsWith("/", StringComparison.OrdinalIgnoreCase))
-                return;
-            output.Attributes.SetAttribute("href", $"{_RootPath}{attr.Value}");
+            var attr = output.Attributes["href"].Value.ToString();
+            attr = _fileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, attr);
+            output.Attributes.SetAttribute("href", attr);
         }
     }
 }


fix some problems reported by Resharper

fix some problems reported by Resharper

--- src/SuperSocket.Server/SuperSocketServer.cs
+++ src/SuperSocket.Server/SuperSocketServer.cs
@@ -1,15 +1,10 @@
 using System;
 using System.Linq;
-using System.Net.Sockets;
 using System.Threading.Tasks;
 using System.Threading;
-using System.IO.Pipelines;
 using System.Collections.Generic;
-using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.Options;
-using SuperSocket.Channel;
 using SuperSocket.ProtoBase;

 namespace SuperSocket.Server
@@ -75,7 +70,7 @@
             }

             if (pipelineFilterFactory == null)
-                throw new ArgumentNullException("pipelineFilterFactory");
+                throw new ArgumentNullException(nameof(pipelineFilterFactory));

             var listenerFactory = _serviceProvider.GetService<IListenerFactory>();

@@ -93,17 +88,20 @@
                 {
                     _sessionInitializer = (s) =>
                     {
-                        (s.Channel as IChannel<TPackageInfo>).PackageReceived += (ch, p) =>
+                        if (s.Channel is IChannel<TPackageInfo> channel)
                         {
-                            try
+                            channel.PackageReceived += (ch, p) =>
                             {
-                                packageHandler(s, p);
-                            }
-                            catch (Exception e)
-                            {
-                                OnSessionError(s, e);
-                            }
-                        };
+                                try
+                                {
+                                    packageHandler(s, p);
+                                }
+                                catch (Exception e)
+                                {
+                                    OnSessionError(s, e);
+                                }
+                            };
+                        }
                     };
                 }

@@ -117,7 +115,7 @@
             where TPackageInfo : class
             where TPipelineFilter: IPipelineFilter<TPackageInfo>, new()
         {
-            return Configure<TPackageInfo>(options, services, new DefaultPipelineFilterFactory<TPackageInfo, TPipelineFilter>(), packageHandler: packageHandler);
+            return Configure(options, services, new DefaultPipelineFilterFactory<TPackageInfo, TPipelineFilter>(), packageHandler: packageHandler);
         }

         protected virtual void OnNewClientAccept(IListener listener, IChannel channel)
@@ -162,24 +160,24 @@
             if (!_configured)
                 _logger.LogError("The server has not been initialized successfully!");

-            var binded = 0;
+            var bound = 0;

             foreach (var listener in _listeners)
             {
                 try
                 {
                     listener.Start();
-                    binded++;
+                    bound++;
                 }
                 catch (Exception e)
                 {
-                    _logger.LogError(e, $"Failed to bind the transport {listener.ToString()}.");
+                    _logger.LogError(e, $"Failed to bind the transport {listener}.");
                 }
             }

-            if (binded == 0)
+            if (bound == 0)
             {
-                _logger.LogCritical("No transport binded successfully.");
+                _logger.LogCritical("No transport bound successfully.");
                 return false;
             }


Remove unnecessary creation of SMTLIBQueryPrinter

--- src/Symbooglix/Solver/SimpleSMTLIBSolver.cs
+++ src/Symbooglix/Solver/SimpleSMTLIBSolver.cs
@@ -32,8 +32,6 @@

                 // We create the process early so the printer has access to the TextWriter
                 CreateNewProcess();
-
-                Printer = new SMTLIBQueryPrinter(TheProcess.StandardInput, /*humanReadable=*/ false);
             }

             private void CreateNewProcess()


添加备注：全局设置需要考虑分布式的情况，后期需要储存在缓存中

添加备注：全局设置需要考虑分布式的情况，后期需要储存在缓存中

--- src/Senparc.Weixin/Senparc.Weixin/Config.cs
+++ src/Senparc.Weixin/Senparc.Weixin/Config.cs
@@ -30,9 +30,9 @@
         /// 请求超时设置（以毫秒为单位），默认为10秒。
         /// 说明：此处常量专为提供给方法的参数的默认值，不是方法内所有请求的默认超时时间。
         /// </summary>
-        public const int TIME_OUT = 10000;
+        public const int TIME_OUT = 10000;//TODO:需要考虑分布式的情况，后期需要储存在缓存中

-        private static bool _isDebug = false;
+        private static bool _isDebug = false;//TODO:需要考虑分布式的情况，后期需要储存在缓存中

         /// <summary>
         /// 指定是否是Debug状态，如果是，系统会自动输出日志


Fix exception logging

Fix exception logging

--- src/ServiceStack.Logging.NLog/NLogLogger.cs
+++ src/ServiceStack.Logging.NLog/NLogLogger.cs
@@ -42,7 +42,7 @@
         /// <param name="exception">The exception.</param>
         public void Debug(object message, Exception exception)
         {
-            log.Debug(message + " : " + exception.ToString());
+            log.DebugException(message.ToString(), exception);
         }

         /// <summary>
@@ -71,7 +71,7 @@
         /// <param name="exception">The exception.</param>
         public void Error(object message, Exception exception)
         {
-            log.Error(message + " : " + exception.ToString());
+            log.ErrorException(message.ToString(), exception);
         }

         /// <summary>
@@ -100,7 +100,7 @@
         /// <param name="exception">The exception.</param>
         public void Fatal(object message, Exception exception)
         {
-            log.Fatal(message + " : " + exception.ToString());
+            log.FatalException(message.ToString(), exception);
         }

         /// <summary>
@@ -129,7 +129,7 @@
         /// <param name="exception">The exception.</param>
         public void Info(object message, Exception exception)
         {
-            log.Info(message + " : " + exception.ToString());
+            log.InfoException(message.ToString(), exception);
         }

         /// <summary>
@@ -158,7 +158,7 @@
         /// <param name="exception">The exception.</param>
         public void Warn(object message, Exception exception)
         {
-            log.Warn(message + " : " + exception.ToString());
+            log.WarnException(message.ToString(), exception);
         }

         /// <summary>


Fix spaces for tabs

Fix spaces for tabs

--- src/SevenDigital.Api.Schema/Tracks/Track.cs
+++ src/SevenDigital.Api.Schema/Tracks/Track.cs
@@ -63,8 +63,8 @@
 		[XmlElement("discNumber")]
 		public int DiscNumber { get; set; }

-        [XmlElement("formats")]
-        public FormatList Formats { get; set; }
+		[XmlElement("formats")]
+		public FormatList Formats { get; set; }

 		/// <summary>
 		/// Track Number. Should be used instead of "TrackNumber"


Add basic bindable instantiation benchmark

--- osu.Framework.Benchmarks/BenchmarkBindableInstantiation.cs
+++ osu.Framework.Benchmarks/BenchmarkBindableInstantiation.cs
@@ -7,13 +7,17 @@

 namespace osu.Framework.Benchmarks
 {
+    [MemoryDiagnoser]
     public class BenchmarkBindableInstantiation
     {
-        [Benchmark(Baseline = true)]
-        public Bindable<int> GetBoundCopyOld() => new BindableOld<int>().GetBoundCopy();
+        [Benchmark]
+        public Bindable<int> Instantiate() => new Bindable<int>();

         [Benchmark]
         public Bindable<int> GetBoundCopy() => new Bindable<int>().GetBoundCopy();
+
+        [Benchmark(Baseline = true)]
+        public Bindable<int> GetBoundCopyOld() => new BindableOld<int>().GetBoundCopy();

         private class BindableOld<T> : Bindable<T>
         {


Apply same fix for miss-triggering case

Apply same fix for miss-triggering case

See 5888ecd - the same fix is applied here, but in the miss case.

--- osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs
+++ osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSpinner.cs
@@ -212,7 +212,7 @@
                 return;

             // Trigger a miss result for remaining ticks to avoid infinite gameplay.
-            foreach (var tick in ticks.Where(t => !t.IsHit))
+            foreach (var tick in ticks.Where(t => !t.Result.HasResult))
                 tick.TriggerResult(false);

             ApplyResult(r =>


Bring profile header test in line with modern conventions

- Removed online code that didn't work anyway after the introduction of
  the development web instance.

- Removed some weird test steps.

- Fixed online/offline test steps not working at all due to identical
  user ID.

--- osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs
+++ osu.Game.Tests/Visual/Online/TestSceneUserProfileHeader.cs
@@ -2,84 +2,51 @@
 // See the LICENCE file in the repository root for full licence text.

 using System;
+using NUnit.Framework;
 using osu.Framework.Allocation;
-using osu.Game.Online.API;
-using osu.Game.Online.API.Requests;
+using osu.Framework.Testing;
 using osu.Game.Online.API.Requests.Responses;
 using osu.Game.Overlays;
 using osu.Game.Overlays.Profile;
-using osu.Game.Users;

 namespace osu.Game.Tests.Visual.Online
 {
     public class TestSceneUserProfileHeader : OsuTestScene
     {
-        protected override bool UseOnlineAPI => true;
-
         [Cached]
         private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Green);

-        [Resolved]
-        private IAPIProvider api { get; set; }
+        private ProfileHeader header;

-        private readonly ProfileHeader header;
+        [SetUpSteps]
+        public void SetUpSteps()
+        {
+            AddStep("create header", () => Child = header = new ProfileHeader());
+        }

-        public TestSceneUserProfileHeader()
+        [Test]
+        public void TestBasic()
         {
-            header = new ProfileHeader();
-            Add(header);
+            AddStep("Show example user", () => header.User.Value = TestSceneUserProfileOverlay.TEST_USER);
+        }

-            AddStep("Show test dummy", () => header.User.Value = TestSceneUserProfileOverlay.TEST_USER);
-
-            AddStep("Show null dummy", () => header.User.Value = new APIUser
+        [Test]
+        public void TestOnlineState()
+        {
+            AddStep("Show online user", () => header.User.Value = new APIUser
             {
-                Username = "Null"
-            });
-
-            AddStep("Show online dummy", () => header.User.Value = new APIUser
-            {
+                Id = 1001,
                 Username = "IAmOnline",
                 LastVisit = DateTimeOffset.Now,
                 IsOnline = true,
             });

-            AddStep("Show offline dummy", () => header.User.Value = new APIUser
+            AddStep("Show offline user", () => header.User.Value = new APIUser
             {
+                Id = 1002,
                 Username = "IAmOffline",
-                LastVisit = DateTimeOffset.Now,
+                LastVisit = DateTimeOffset.Now.AddDays(-10),
                 IsOnline = false,
-            });
-
-            addOnlineStep("Show ppy", new APIUser
-            {
-                Username = @"peppy",
-                Id = 2,
-                IsSupporter = true,
-                Country = new Country { FullName = @"Australia", FlagName = @"AU" },
-                CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg"
-            });
-
-            addOnlineStep("Show flyte", new APIUser
-            {
-                Username = @"flyte",
-                Id = 3103765,
-                Country = new Country { FullName = @"Japan", FlagName = @"JP" },
-                CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
-            });
-        }
-
-        private void addOnlineStep(string name, APIUser fallback)
-        {
-            AddStep(name, () =>
-            {
-                if (api.IsLoggedIn)
-                {
-                    var request = new GetUserRequest(fallback.Id);
-                    request.Success += user => header.User.Value = user;
-                    api.Queue(request);
-                }
-                else
-                    header.User.Value = fallback;
             });
         }
     }