diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 0000000..8386e4f --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,37 @@ +[*] +end_of_line = crlf +indent_size = tab +tab_width = 2 + +[*.{cs,vb,xml}] +charset = utf-8 +dotnet_sort_system_directives_first = true:none +dotnet_style_coalesce_expression = true:none +dotnet_style_explicit_tuple_names = true:warning +dotnet_style_null_propagation = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:none +dotnet_style_predefined_type_for_member_access = false:none +dotnet_style_qualification_for_event = false:none +dotnet_style_qualification_for_field = false:none +dotnet_style_qualification_for_method = false:none +dotnet_style_qualification_for_property = false:none + +[*.cs] +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_expression_bodied_accessors = false:suggestion +csharp_style_expression_bodied_constructors = false:suggestion +csharp_style_expression_bodied_indexers = false:suggestion +csharp_style_expression_bodied_methods = false:suggestion +csharp_style_expression_bodied_operators = false:suggestion +csharp_style_expression_bodied_properties = false:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_throw_expression = false:none +csharp_style_var_elsewhere = true:suggestion +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_new_line_before_catch = true:none +csharp_new_line_before_else = true:none +csharp_new_line_before_finally = true:none +csharp_new_line_between_query_expression_clauses = true:none diff --git a/src/PublishNugetPackage.cmd b/src/PublishNugetPackage.cmd index 1c9271b..1b0d58b 100644 --- a/src/PublishNugetPackage.cmd +++ b/src/PublishNugetPackage.cmd @@ -1,5 +1,5 @@ @echo off echo Press any key to publish pause -".nuget\NuGet.exe" push Yort.Http.ClientPipeline.1.0.0.7.nupkg +".nuget\NuGet.exe" push Yort.Http.ClientPipeline.1.0.0.8.nupkg pause \ No newline at end of file diff --git a/src/Yort.Http.ClientPipeline.SharedImplementations/AssemblyInfoCommon.cs b/src/Yort.Http.ClientPipeline.SharedImplementations/AssemblyInfoCommon.cs index 499461a..a1bbc92 100644 --- a/src/Yort.Http.ClientPipeline.SharedImplementations/AssemblyInfoCommon.cs +++ b/src/Yort.Http.ClientPipeline.SharedImplementations/AssemblyInfoCommon.cs @@ -1,4 +1,4 @@ -using System.Resources; +using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -14,7 +14,7 @@ [assembly: AssemblyConfiguration("RELEASE")] #endif [assembly: AssemblyProduct("Yort.Http.ClientPipeline")] -[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyCopyright("Copyright © 2018")] [assembly: CLSCompliant(false)] // Version information for an assembly consists of the following four values: @@ -27,5 +27,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.5")] -[assembly: AssemblyInformationalVersionAttribute("1.0.0.5")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.8")] +[assembly: AssemblyInformationalVersionAttribute("1.0.0.8")] \ No newline at end of file diff --git a/src/Yort.Http.ClientPipeline.SharedImplementations/Handlers/MockMessageHandler.cs b/src/Yort.Http.ClientPipeline.SharedImplementations/Handlers/MockMessageHandler.cs index 24202bd..468afb4 100644 --- a/src/Yort.Http.ClientPipeline.SharedImplementations/Handlers/MockMessageHandler.cs +++ b/src/Yort.Http.ClientPipeline.SharedImplementations/Handlers/MockMessageHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -163,18 +163,12 @@ private static async Task CloneResponse(HttpResponseMessage private static async Task CloneRequest(HttpRequestMessage request) { var retVal = new HttpRequestMessage(request.Method, request.RequestUri); - foreach (var header in request.Headers) - { - retVal.Headers.Add(header.Key, header.Value); - } + CopyHeaders(request.Headers, retVal.Headers); if (request.Content != null) { var content = new ByteArrayContent(await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false)); - foreach (var header in request.Content.Headers) - { - content.Headers.Add(header.Key, header.Value); - } + CopyHeaders(request.Content.Headers, content.Headers); retVal.Content = content; } diff --git a/src/Yort.Http.ClientPipeline.nuspec b/src/Yort.Http.ClientPipeline.nuspec index 0918cb9..3d18b96 100644 --- a/src/Yort.Http.ClientPipeline.nuspec +++ b/src/Yort.Http.ClientPipeline.nuspec @@ -2,7 +2,7 @@ Yort.Http.ClientPipeline - 1.0.0.7 + 1.0.0.8 Yort.Http.ClientPipeline Yortw Yortw