parent
343208331d
commit
54c1122582
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core common types used by the various authentication components.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;authentication;security</PackageTags>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core common types used by the various authentication middleware components.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;authentication;security</PackageTags>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@ namespace Microsoft.Net.Http.Headers
|
|||
sb.Append(", ");
|
||||
}
|
||||
|
||||
sb.Append(value);
|
||||
sb.Append(value.AsSpan());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ namespace Microsoft.Net.Http.Headers
|
|||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(_unit);
|
||||
sb.Append(_unit.AsSpan());
|
||||
sb.Append(' ');
|
||||
|
||||
if (HasRange)
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ namespace Microsoft.Net.Http.Headers
|
|||
{
|
||||
var header = new StringBuilder();
|
||||
|
||||
header.Append(_name);
|
||||
header.Append(_name.AsSpan());
|
||||
header.Append("=");
|
||||
header.Append(_value);
|
||||
header.Append(_value.AsSpan());
|
||||
|
||||
return header.ToString();
|
||||
}
|
||||
|
|
@ -274,4 +274,4 @@ namespace Microsoft.Net.Http.Headers
|
|||
return _name.GetHashCode() ^ _value.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ namespace Microsoft.Net.Http.Headers
|
|||
public override string ToString()
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
builder.Append(_mediaType);
|
||||
builder.Append(_mediaType.AsSpan());
|
||||
NameValueHeaderValue.ToString(_parameters, separator: ';', leadingSeparator: true, destination: builder);
|
||||
return builder.ToString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>HTTP header parser implementations.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
|
|
|||
|
|
@ -226,11 +226,11 @@ namespace Microsoft.Net.Http.Headers
|
|||
destination.Append(separator);
|
||||
destination.Append(' ');
|
||||
}
|
||||
destination.Append(values[i].Name);
|
||||
destination.Append(values[i].Name.AsSpan());
|
||||
if (!StringSegment.IsNullOrEmpty(values[i].Value))
|
||||
{
|
||||
destination.Append('=');
|
||||
destination.Append(values[i].Value);
|
||||
destination.Append(values[i].Value.AsSpan());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace Microsoft.Net.Http.Headers
|
|||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(_unit);
|
||||
sb.Append(_unit.AsSpan());
|
||||
sb.Append('=');
|
||||
|
||||
var first = true;
|
||||
|
|
|
|||
|
|
@ -206,9 +206,9 @@ namespace Microsoft.Net.Http.Headers
|
|||
/// </param>
|
||||
public void AppendToStringBuilder(StringBuilder builder)
|
||||
{
|
||||
builder.Append(_name);
|
||||
builder.Append(_name.AsSpan());
|
||||
builder.Append("=");
|
||||
builder.Append(_value);
|
||||
builder.Append(_value.AsSpan());
|
||||
|
||||
if (Expires.HasValue)
|
||||
{
|
||||
|
|
@ -249,11 +249,11 @@ namespace Microsoft.Net.Http.Headers
|
|||
private static void AppendSegment(StringBuilder builder, StringSegment name, StringSegment value)
|
||||
{
|
||||
builder.Append("; ");
|
||||
builder.Append(name);
|
||||
builder.Append(name.AsSpan());
|
||||
if (value != null)
|
||||
{
|
||||
builder.Append("=");
|
||||
builder.Append(value);
|
||||
builder.Append(value.AsSpan());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ Microsoft.AspNetCore.Builder.IApplicationBuilder
|
|||
Microsoft.AspNetCore.Http.HttpContext
|
||||
Microsoft.AspNetCore.Http.HttpRequest
|
||||
Microsoft.AspNetCore.Http.HttpResponse</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore</PackageTags>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core common extension methods for HTTP abstractions, HTTP headers, HTTP request/response, and session state.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore</PackageTags>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ServerGarbageCollection>true</ServerGarbageCollection>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core default HTTP feature implementations.</Description>
|
||||
<TargetFrameworks>netstandard2.0;netcoreapp2.2</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
try
|
||||
{
|
||||
AllocateReadTail();
|
||||
#if NETCOREAPP2_2
|
||||
#if NETCOREAPP3_0
|
||||
var length = await _readingStream.ReadAsync(_readTail.AvailableMemory.Slice(_readTail.End), tokenSource.Token);
|
||||
#elif NETSTANDARD2_0
|
||||
if (!MemoryMarshal.TryGetArray<byte>(_readTail.AvailableMemory.Slice(_readTail.End), out var arraySegment))
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var segment = _completedSegments[0];
|
||||
#if NETCOREAPP2_2
|
||||
#if NETCOREAPP3_0
|
||||
await _writingStream.WriteAsync(segment.Buffer.Slice(0, segment.Length), localToken);
|
||||
#elif NETSTANDARD2_0
|
||||
MemoryMarshal.TryGetArray<byte>(segment.Buffer, out var arraySegment);
|
||||
|
|
@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
|
||||
if (!_currentSegment.IsEmpty)
|
||||
{
|
||||
#if NETCOREAPP2_2
|
||||
#if NETCOREAPP3_0
|
||||
await _writingStream.WriteAsync(_currentSegment.Slice(0, _position), localToken);
|
||||
#elif NETSTANDARD2_0
|
||||
MemoryMarshal.TryGetArray<byte>(_currentSegment, out var arraySegment);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ namespace Microsoft.AspNetCore.Http.Tests
|
|||
await Assert.ThrowsAsync<TaskCanceledException>(async () => await pipeReader.ReadAsync(cts.Token));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/4621")]
|
||||
public async Task ReadCanBeCanceledViaCancelPendingReadWhenReadIsAsync()
|
||||
{
|
||||
var pipeReader = new StreamPipeReader(new HangingStream());
|
||||
|
|
@ -169,9 +169,9 @@ namespace Microsoft.AspNetCore.Http.Tests
|
|||
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
var task = Task.Run(async () =>
|
||||
{
|
||||
var writingTask = pipeReader.ReadAsync();
|
||||
var readingTask = pipeReader.ReadAsync();
|
||||
tcs.SetResult(0);
|
||||
result = await writingTask;
|
||||
result = await readingTask;
|
||||
});
|
||||
await tcs.Task;
|
||||
pipeReader.CancelPendingRead();
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace Microsoft.AspNetCore.Http.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/4621")]
|
||||
public async Task CancelPendingFlushBetweenWritesAllDataIsPreserved()
|
||||
{
|
||||
MemoryStream = new SingleWriteStream();
|
||||
|
|
@ -214,7 +214,7 @@ namespace Microsoft.AspNetCore.Http.Tests
|
|||
Assert.True(flushResult.IsCanceled);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/4621")]
|
||||
public async Task CancelPendingFlushLostOfCancellationsNoDataLost()
|
||||
{
|
||||
var writeSize = 16;
|
||||
|
|
@ -228,7 +228,6 @@ namespace Microsoft.AspNetCore.Http.Tests
|
|||
var expectedData = Encoding.ASCII.GetBytes(new string('a', writeSize));
|
||||
|
||||
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
// TaskCreationOptions.RunAsync
|
||||
|
||||
var task = Task.Run(async () =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core component for running OWIN middleware in an ASP.NET Core application, and to run ASP.NET Core middleware in an OWIN application.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PackageTags>aspnetcore;owin</PackageTags>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>ASP.NET Core utilities, such as for working with forms, multipart messages, and query strings.</Description>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<DefineConstants>$(DefineConstants);WebEncoders_In_WebUtilities</DefineConstants>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(StandardTestTfms)</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.2;net461</TargetFrameworks>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue