Move some implementations (all feature implementations) out of `.Internal` namespaces
- #549, #592 - move feature implementations to `Microsoft.AspNetCore.Http.Features` and `...Authentication.Features` - move `DefaultHttpContext`, `HttpContextAccessor`, `HttpContextFactory`, `FormCollection` and `HeaderDictionary` to `Microsoft.AspNetCore.Http` - move `FormFile` to `Microsoft.AspNetCore.Http.Internal` - that and `Microsoft.AspNetCore.Http.Authentication.Internal` are the remaining `.Internal` namespaces nits: - remove a couple of parameterless constructors - add / fill subfolders to align with new namespaces - remove all use of (unnecessary) "T:..." `<see cref=""/>` values
This commit is contained in:
parent
ff0a37c5f5
commit
6725d68559
|
|
@ -12,7 +12,7 @@ namespace SampleApp
|
||||||
DefaultHttpRequest _pooledHttpRequest;
|
DefaultHttpRequest _pooledHttpRequest;
|
||||||
DefaultHttpResponse _pooledHttpResponse;
|
DefaultHttpResponse _pooledHttpResponse;
|
||||||
|
|
||||||
public PooledHttpContext(IFeatureCollection featureCollection) :
|
public PooledHttpContext(IFeatureCollection featureCollection) :
|
||||||
base(featureCollection)
|
base(featureCollection)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Microsoft.Extensions.ObjectPool;
|
using Microsoft.Extensions.ObjectPool;
|
||||||
|
|
||||||
namespace SampleApp
|
namespace SampleApp
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http.Internal
|
||||||
{
|
{
|
||||||
internal struct HeaderSegment : IEquatable<HeaderSegment>
|
internal struct HeaderSegment : IEquatable<HeaderSegment>
|
||||||
|
|
@ -13,7 +12,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
private readonly StringSegment _data;
|
private readonly StringSegment _data;
|
||||||
|
|
||||||
// <summary>
|
// <summary>
|
||||||
// Initializes a new instance of the <see cref="T:System.Object"/> class.
|
// Initializes a new instance of the <see cref="HeaderSegment/> structure.
|
||||||
// </summary>
|
// </summary>
|
||||||
public HeaderSegment(StringSegment formatting, StringSegment data)
|
public HeaderSegment(StringSegment formatting, StringSegment data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,35 +12,35 @@ namespace Microsoft.AspNetCore.Http
|
||||||
public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues>>
|
public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues>>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
/// Gets the number of elements contained in the <see cref="IFormCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
/// The number of elements contained in the <see cref="IFormCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
int Count { get; }
|
int Count { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
/// Gets an <see cref="ICollection{T}" /> containing the keys of the
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
/// <see cref="IFormCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the object
|
/// An <see cref="ICollection{T}" /> containing the keys of the object
|
||||||
/// that implements <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
/// that implements <see cref="IFormCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
ICollection<string> Keys { get; }
|
ICollection<string> Keys { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> contains an element
|
/// Determines whether the <see cref="IFormCollection" /> contains an element
|
||||||
/// with the specified key.
|
/// with the specified key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">
|
/// <param name="key">
|
||||||
/// The key to locate in the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
/// The key to locate in the <see cref="IFormCollection" />.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> contains an element with
|
/// true if the <see cref="IFormCollection" /> contains an element with
|
||||||
/// the key; otherwise, false.
|
/// the key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool ContainsKey(string key);
|
bool ContainsKey(string key);
|
||||||
|
|
@ -58,10 +58,10 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// This parameter is passed uninitialized.
|
/// This parameter is passed uninitialized.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the object that implements <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> contains
|
/// true if the object that implements <see cref="IFormCollection" /> contains
|
||||||
/// an element with the specified key; otherwise, false.
|
/// an element with the specified key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool TryGetValue(string key, out StringValues value);
|
bool TryGetValue(string key, out StringValues value);
|
||||||
|
|
@ -73,14 +73,14 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// The key of the value to get.
|
/// The key of the value to get.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The element with the specified key, or <see cref="T:Microsoft.Extensions.Primitives.StringValues" />.Empty if the key is not present.
|
/// The element with the specified key, or <c>StringValues.Empty</c> if the key is not present.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> has a different indexer contract than
|
/// <see cref="IFormCollection" /> has a different indexer contract than
|
||||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return StringValues.Empty for missing entries
|
/// <see cref="IDictionary{TKey, TValue}" />, as it will return <c>StringValues.Empty</c> for missing entries
|
||||||
/// rather than throwing an Exception.
|
/// rather than throwing an Exception.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
StringValues this[string key] { get; }
|
StringValues this[string key] { get; }
|
||||||
|
|
|
||||||
|
|
@ -12,35 +12,35 @@ namespace Microsoft.AspNetCore.Http
|
||||||
public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValues>>
|
public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValues>>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
/// Gets the number of elements contained in the <see cref="IQueryCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
/// The number of elements contained in the <see cref="IQueryCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
int Count { get; }
|
int Count { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
/// Gets an <see cref="ICollection{T}" /> containing the keys of the
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
/// <see cref="IQueryCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the object
|
/// An <see cref="ICollection{T}" /> containing the keys of the object
|
||||||
/// that implements <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
/// that implements <see cref="IQueryCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
ICollection<string> Keys { get; }
|
ICollection<string> Keys { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> contains an element
|
/// Determines whether the <see cref="IQueryCollection" /> contains an element
|
||||||
/// with the specified key.
|
/// with the specified key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">
|
/// <param name="key">
|
||||||
/// The key to locate in the <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
/// The key to locate in the <see cref="IQueryCollection" />.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> contains an element with
|
/// true if the <see cref="IQueryCollection" /> contains an element with
|
||||||
/// the key; otherwise, false.
|
/// the key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool ContainsKey(string key);
|
bool ContainsKey(string key);
|
||||||
|
|
@ -58,10 +58,10 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// This parameter is passed uninitialized.
|
/// This parameter is passed uninitialized.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the object that implements <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> contains
|
/// true if the object that implements <see cref="IQueryCollection" /> contains
|
||||||
/// an element with the specified key; otherwise, false.
|
/// an element with the specified key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool TryGetValue(string key, out StringValues value);
|
bool TryGetValue(string key, out StringValues value);
|
||||||
|
|
@ -73,15 +73,14 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// The key of the value to get.
|
/// The key of the value to get.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The element with the specified key, or <see cref="T:Microsoft.Extensions.Primitives.StringValues" />.
|
/// The element with the specified key, or <c>StringValues.Empty</c> if the key is not present.
|
||||||
/// Empty if the key is not present.
|
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> has a different indexer contract than
|
/// <see cref="IQueryCollection" /> has a different indexer contract than
|
||||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return StringValues.Empty for missing entries
|
/// <see cref="IDictionary{TKey, TValue}" />, as it will return <c>StringValues.Empty</c> for missing entries
|
||||||
/// rather than throwing an Exception.
|
/// rather than throwing an Exception.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
StringValues this[string key] { get; }
|
StringValues this[string key] { get; }
|
||||||
|
|
|
||||||
|
|
@ -11,35 +11,35 @@ namespace Microsoft.AspNetCore.Http
|
||||||
public interface IRequestCookieCollection : IEnumerable<KeyValuePair<string, string>>
|
public interface IRequestCookieCollection : IEnumerable<KeyValuePair<string, string>>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
/// Gets the number of elements contained in the <see cref="IRequestCookieCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
/// The number of elements contained in the <see cref="IRequestCookieCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
int Count { get; }
|
int Count { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
/// Gets an <see cref="ICollection{T}" /> containing the keys of the
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
/// <see cref="IRequestCookieCollection" />.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the object
|
/// An <see cref="ICollection{T}" /> containing the keys of the object
|
||||||
/// that implements <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
/// that implements <see cref="IRequestCookieCollection" />.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
ICollection<string> Keys { get; }
|
ICollection<string> Keys { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> contains an element
|
/// Determines whether the <see cref="IRequestCookieCollection" /> contains an element
|
||||||
/// with the specified key.
|
/// with the specified key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">
|
/// <param name="key">
|
||||||
/// The key to locate in the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
/// The key to locate in the <see cref="IRequestCookieCollection" />.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> contains an element with
|
/// true if the <see cref="IRequestCookieCollection" /> contains an element with
|
||||||
/// the key; otherwise, false.
|
/// the key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool ContainsKey(string key);
|
bool ContainsKey(string key);
|
||||||
|
|
@ -57,10 +57,10 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// This parameter is passed uninitialized.
|
/// This parameter is passed uninitialized.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// true if the object that implements <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> contains
|
/// true if the object that implements <see cref="IRequestCookieCollection" /> contains
|
||||||
/// an element with the specified key; otherwise, false.
|
/// an element with the specified key; otherwise, false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
bool TryGetValue(string key, out string value);
|
bool TryGetValue(string key, out string value);
|
||||||
|
|
@ -72,14 +72,14 @@ namespace Microsoft.AspNetCore.Http
|
||||||
/// The key of the value to get.
|
/// The key of the value to get.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The element with the specified key, or <see cref="T:System.String" />.Empty if the key is not present.
|
/// The element with the specified key, or <c>string.Empty</c> if the key is not present.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <exception cref="T:System.ArgumentNullException">
|
/// <exception cref="System.ArgumentNullException">
|
||||||
/// key is null.
|
/// key is null.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> has a different indexer contract than
|
/// <see cref="IRequestCookieCollection" /> has a different indexer contract than
|
||||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return String.Empty for missing entries
|
/// <see cref="IDictionary{TKey, TValue}" />, as it will return <c>string.Empty</c> for missing entries
|
||||||
/// rather than throwing an Exception.
|
/// rather than throwing an Exception.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
string this[string key] { get; }
|
string this[string key] { get; }
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication;
|
using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Authentication.Internal
|
namespace Microsoft.AspNetCore.Http.Authentication.Internal
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,9 @@ using Microsoft.AspNetCore.Http.Authentication;
|
||||||
using Microsoft.AspNetCore.Http.Authentication.Internal;
|
using Microsoft.AspNetCore.Http.Authentication.Internal;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication;
|
using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication.Internal;
|
using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class DefaultHttpContext : HttpContext
|
public class DefaultHttpContext : HttpContext
|
||||||
{
|
{
|
||||||
|
|
@ -72,7 +71,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
_websockets = null;
|
_websockets = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IItemsFeature ItemsFeature =>
|
private IItemsFeature ItemsFeature =>
|
||||||
_features.Fetch(ref _features.Cache.Items, f => new ItemsFeature());
|
_features.Fetch(ref _features.Cache.Items, f => new ItemsFeature());
|
||||||
|
|
||||||
|
|
@ -165,7 +164,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override void Abort()
|
public override void Abort()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,10 @@
|
||||||
|
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Authentication.Internal
|
namespace Microsoft.AspNetCore.Http.Features.Authentication
|
||||||
{
|
{
|
||||||
public class HttpAuthenticationFeature : IHttpAuthenticationFeature
|
public class HttpAuthenticationFeature : IHttpAuthenticationFeature
|
||||||
{
|
{
|
||||||
public HttpAuthenticationFeature()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ClaimsPrincipal User
|
public ClaimsPrincipal User
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This type exists only for the purpose of unit testing where the user can directly set the
|
/// This type exists only for the purpose of unit testing where the user can directly set the
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class FormFeature : IFormFeature
|
public class FormFeature : IFormFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,10 @@
|
||||||
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpConnectionFeature : IHttpConnectionFeature
|
public class HttpConnectionFeature : IHttpConnectionFeature
|
||||||
{
|
{
|
||||||
public HttpConnectionFeature()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ConnectionId { get; set; }
|
public string ConnectionId { get; set; }
|
||||||
|
|
||||||
public IPAddress LocalIpAddress { get; set; }
|
public IPAddress LocalIpAddress { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpRequestFeature : IHttpRequestFeature
|
public class HttpRequestFeature : IHttpRequestFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpRequestIdentifierFeature : IHttpRequestIdentifierFeature
|
public class HttpRequestIdentifierFeature : IHttpRequestIdentifierFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpRequestLifetimeFeature : IHttpRequestLifetimeFeature
|
public class HttpRequestLifetimeFeature : IHttpRequestLifetimeFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpResponseFeature : IHttpResponseFeature
|
public class HttpResponseFeature : IHttpResponseFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
using Microsoft.AspNetCore.Http.Internal;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class ItemsFeature : IItemsFeature
|
public class ItemsFeature : IItemsFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using System;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class QueryFeature : IQueryFeature
|
public class QueryFeature : IQueryFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,14 @@ using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class RequestCookiesFeature : IRequestCookiesFeature
|
public class RequestCookiesFeature : IRequestCookiesFeature
|
||||||
{
|
{
|
||||||
private FeatureReferences<IHttpRequestFeature> _features;
|
private FeatureReferences<IHttpRequestFeature> _features;
|
||||||
private StringValues _original;
|
private StringValues _original;
|
||||||
private IRequestCookieCollection _parsedValues;
|
private IRequestCookieCollection _parsedValues;
|
||||||
|
|
||||||
public RequestCookiesFeature(IRequestCookieCollection cookies)
|
public RequestCookiesFeature(IRequestCookieCollection cookies)
|
||||||
{
|
{
|
||||||
if (cookies == null)
|
if (cookies == null)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ using System.Text;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.Extensions.ObjectPool;
|
using Microsoft.Extensions.ObjectPool;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default implementation of <see cref="IResponseCookiesFeature"/>.
|
/// Default implementation of <see cref="IResponseCookiesFeature"/>.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class ServiceProvidersFeature : IServiceProvidersFeature
|
public class ServiceProvidersFeature : IServiceProvidersFeature
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,10 @@ using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class TlsConnectionFeature : ITlsConnectionFeature
|
public class TlsConnectionFeature : ITlsConnectionFeature
|
||||||
{
|
{
|
||||||
public TlsConnectionFeature()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public X509Certificate2 ClientCertificate { get; set; }
|
public X509Certificate2 ClientCertificate { get; set; }
|
||||||
|
|
||||||
public Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken)
|
public Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken)
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains the parsed form values.
|
/// Contains the parsed form values.
|
||||||
|
|
@ -20,7 +21,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
#else
|
#else
|
||||||
private static readonly string[] EmptyKeys = new string[0];
|
private static readonly string[] EmptyKeys = new string[0];
|
||||||
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
||||||
#endif
|
#endif
|
||||||
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
||||||
// Pre-box
|
// Pre-box
|
||||||
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
||||||
|
|
@ -77,9 +78,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />;.
|
/// Gets the number of elements contained in the <see cref="HeaderDictionary" />;.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />.</returns>
|
/// <returns>The number of elements contained in the <see cref="HeaderDictionary" />.</returns>
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -101,10 +102,10 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key.
|
/// Determines whether the <see cref="HeaderDictionary" /> contains a specific key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The key.</param>
|
/// <param name="key">The key.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
||||||
public bool ContainsKey(string key)
|
public bool ContainsKey(string key)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -119,7 +120,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The header name.</param>
|
/// <param name="key">The header name.</param>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
||||||
public bool TryGetValue(string key, out StringValues value)
|
public bool TryGetValue(string key, out StringValues value)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -131,9 +132,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an struct enumerator that iterates through a collection without boxing and is also used via the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> interface.
|
/// Returns an struct enumerator that iterates through a collection without boxing and is also used via the <see cref="IFormCollection" /> interface.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:Microsoft.AspNetCore.Http.StructEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="Enumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
public Enumerator GetEnumerator()
|
public Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -148,7 +149,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -163,7 +164,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a wrapper for RequestHeaders and ResponseHeaders.
|
/// Represents a wrapper for RequestHeaders and ResponseHeaders.
|
||||||
|
|
@ -19,13 +19,13 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
#else
|
#else
|
||||||
private static readonly string[] EmptyKeys = new string[0];
|
private static readonly string[] EmptyKeys = new string[0];
|
||||||
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
||||||
#endif
|
#endif
|
||||||
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
||||||
// Pre-box
|
// Pre-box
|
||||||
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
||||||
private static readonly IEnumerator EmptyIEnumerator = EmptyEnumerator;
|
private static readonly IEnumerator EmptyIEnumerator = EmptyEnumerator;
|
||||||
|
|
||||||
public HeaderDictionary()
|
public HeaderDictionary()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,9 +98,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />;.
|
/// Gets the number of elements contained in the <see cref="HeaderDictionary" />;.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />.</returns>
|
/// <returns>The number of elements contained in the <see cref="HeaderDictionary" />.</returns>
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -110,9 +110,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value that indicates whether the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> is in read-only mode.
|
/// Gets a value that indicates whether the <see cref="HeaderDictionary" /> is in read-only mode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> is in read-only mode; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> is in read-only mode; otherwise, false.</returns>
|
||||||
public bool IsReadOnly
|
public bool IsReadOnly
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -207,10 +207,10 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key.
|
/// Determines whether the <see cref="HeaderDictionary" /> contains a specific key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The key.</param>
|
/// <param name="key">The key.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
||||||
public bool ContainsKey(string key)
|
public bool ContainsKey(string key)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -221,9 +221,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Copies the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> elements to a one-dimensional Array instance at the specified index.
|
/// Copies the <see cref="HeaderDictionary" /> elements to a one-dimensional Array instance at the specified index.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="array">The one-dimensional Array that is the destination of the specified objects copied from the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />.</param>
|
/// <param name="array">The one-dimensional Array that is the destination of the specified objects copied from the <see cref="HeaderDictionary" />.</param>
|
||||||
/// <param name="arrayIndex">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
/// <param name="arrayIndex">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||||
public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
|
public void CopyTo(KeyValuePair<string, StringValues>[] array, int arrayIndex)
|
||||||
{
|
{
|
||||||
|
|
@ -279,7 +279,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The header name.</param>
|
/// <param name="key">The header name.</param>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
||||||
public bool TryGetValue(string key, out StringValues value)
|
public bool TryGetValue(string key, out StringValues value)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -293,7 +293,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="Enumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
public Enumerator GetEnumerator()
|
public Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -307,7 +307,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -321,7 +321,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
#if NET451
|
#if NET451
|
||||||
using System.Runtime.Remoting.Messaging;
|
|
||||||
using System.Runtime.Remoting;
|
using System.Runtime.Remoting;
|
||||||
|
using System.Runtime.Remoting.Messaging;
|
||||||
#elif NETSTANDARD1_3
|
#elif NETSTANDARD1_3
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class HttpContextAccessor : IHttpContextAccessor
|
public class HttpContextAccessor : IHttpContextAccessor
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Microsoft.Extensions.ObjectPool;
|
using Microsoft.Extensions.ObjectPool;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class HttpContextFactory : IHttpContextFactory
|
public class HttpContextFactory : IHttpContextFactory
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http.Internal
|
||||||
{
|
{
|
||||||
|
|
@ -6,7 +6,6 @@ using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http.Internal
|
||||||
|
|
@ -5,7 +5,6 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http.Internal
|
||||||
|
|
@ -37,7 +36,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
|
|
||||||
private IResponseCookiesFeature ResponseCookiesFeature =>
|
private IResponseCookiesFeature ResponseCookiesFeature =>
|
||||||
_features.Fetch(ref _features.Cache.Cookies, f => new ResponseCookiesFeature(f));
|
_features.Fetch(ref _features.Cache.Cookies, f => new ResponseCookiesFeature(f));
|
||||||
|
|
||||||
|
|
||||||
public override HttpContext HttpContext { get { return _context; } }
|
public override HttpContext HttpContext { get { return _context; } }
|
||||||
|
|
||||||
|
|
@ -5,9 +5,8 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Internal
|
||||||
{
|
{
|
||||||
public class FormFile : IFormFile
|
public class FormFile : IFormFile
|
||||||
{
|
{
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
private readonly StringSegment _data;
|
private readonly StringSegment _data;
|
||||||
|
|
||||||
// <summary>
|
// <summary>
|
||||||
// Initializes a new instance of the <see cref="T:System.Object"/> class.
|
// Initializes a new instance of the <see cref="HeaderSegment"/> structure.
|
||||||
// </summary>
|
// </summary>
|
||||||
public HeaderSegment(StringSegment formatting, StringSegment data)
|
public HeaderSegment(StringSegment formatting, StringSegment data)
|
||||||
{
|
{
|
||||||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
#else
|
#else
|
||||||
private static readonly string[] EmptyKeys = new string[0];
|
private static readonly string[] EmptyKeys = new string[0];
|
||||||
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
private static readonly StringValues[] EmptyValues = new StringValues[0];
|
||||||
#endif
|
#endif
|
||||||
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
||||||
// Pre-box
|
// Pre-box
|
||||||
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
private static readonly IEnumerator<KeyValuePair<string, StringValues>> EmptyIEnumeratorType = EmptyEnumerator;
|
||||||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
|
|
||||||
private Dictionary<string, StringValues> Store { get; set; }
|
private Dictionary<string, StringValues> Store { get; set; }
|
||||||
|
|
||||||
public QueryCollection()
|
public QueryCollection()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -71,9 +71,9 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />;.
|
/// Gets the number of elements contained in the <see cref="HeaderDictionary" />;.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" />.</returns>
|
/// <returns>The number of elements contained in the <see cref="HeaderDictionary" />.</returns>
|
||||||
public int Count
|
public int Count
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -99,10 +99,10 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key.
|
/// Determines whether the <see cref="HeaderDictionary" /> contains a specific key.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The key.</param>
|
/// <param name="key">The key.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains a specific key; otherwise, false.</returns>
|
||||||
public bool ContainsKey(string key)
|
public bool ContainsKey(string key)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The header name.</param>
|
/// <param name="key">The header name.</param>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
/// <returns>true if the <see cref="T:Microsoft.AspNetCore.Http.Internal.HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
/// <returns>true if the <see cref="HeaderDictionary" /> contains the key; otherwise, false.</returns>
|
||||||
public bool TryGetValue(string key, out StringValues value)
|
public bool TryGetValue(string key, out StringValues value)
|
||||||
{
|
{
|
||||||
if (Store == null)
|
if (Store == null)
|
||||||
|
|
@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="Enumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
public Enumerator GetEnumerator()
|
public Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -145,7 +145,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator{T}" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
IEnumerator<KeyValuePair<string, StringValues>> IEnumerable<KeyValuePair<string, StringValues>>.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -159,7 +159,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection.
|
/// Returns an enumerator that iterates through a collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
private static readonly string[] EmptyKeys = Array.Empty<string>();
|
private static readonly string[] EmptyKeys = Array.Empty<string>();
|
||||||
#else
|
#else
|
||||||
private static readonly string[] EmptyKeys = new string[0];
|
private static readonly string[] EmptyKeys = new string[0];
|
||||||
#endif
|
#endif
|
||||||
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
private static readonly Enumerator EmptyEnumerator = new Enumerator();
|
||||||
// Pre-box
|
// Pre-box
|
||||||
private static readonly IEnumerator<KeyValuePair<string, string>> EmptyIEnumeratorType = EmptyEnumerator;
|
private static readonly IEnumerator<KeyValuePair<string, string>> EmptyIEnumeratorType = EmptyEnumerator;
|
||||||
|
|
@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RequestCookieCollection Parse(IList<string> values)
|
public static RequestCookieCollection Parse(IList<string> values)
|
||||||
{
|
{
|
||||||
if (values.Count == 0)
|
if (values.Count == 0)
|
||||||
|
|
@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an struct enumerator that iterates through a collection without boxing.
|
/// Returns an struct enumerator that iterates through a collection without boxing.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:Microsoft.AspNetCore.Http.Internal.RequestCookies.Enumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="Enumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
public Enumerator GetEnumerator()
|
public Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -150,7 +150,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator{T}" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator()
|
IEnumerator<KeyValuePair<string, string>> IEnumerable<KeyValuePair<string, string>>.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -159,13 +159,13 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
return EmptyIEnumeratorType;
|
return EmptyIEnumeratorType;
|
||||||
}
|
}
|
||||||
// Boxed Enumerator
|
// Boxed Enumerator
|
||||||
return GetEnumerator();
|
return GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
/// Returns an enumerator that iterates through a collection, boxes in non-empty path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
/// <returns>An <see cref="IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
if (Store == null || Store.Count == 0)
|
if (Store == null || Store.Count == 0)
|
||||||
|
|
@ -176,7 +176,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
// Boxed Enumerator
|
// Boxed Enumerator
|
||||||
return GetEnumerator();
|
return GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Enumerator : IEnumerator<KeyValuePair<string, string>>
|
public struct Enumerator : IEnumerator<KeyValuePair<string, string>>
|
||||||
{
|
{
|
||||||
// Do NOT make this readonly, or MoveNext will not work
|
// Do NOT make this readonly, or MoveNext will not work
|
||||||
|
|
@ -17,8 +17,6 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication;
|
using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication.Internal;
|
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Owin
|
namespace Microsoft.AspNetCore.Owin
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder.Internal;
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Microsoft.AspNetCore.Owin;
|
using Microsoft.AspNetCore.Owin;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder
|
namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http
|
namespace Microsoft.AspNetCore.Http
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder.Internal;
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder.Extensions
|
namespace Microsoft.AspNetCore.Builder.Extensions
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder.Internal;
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder.Extensions
|
namespace Microsoft.AspNetCore.Builder.Extensions
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Builder.Internal;
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http.Abstractions;
|
using Microsoft.AspNetCore.Http.Abstractions;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http
|
namespace Microsoft.AspNetCore.Http
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,9 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Microsoft.Extensions.Primitives;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Extensions
|
namespace Microsoft.AspNetCore.Http.Extensions
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved. See License.txt in the project root for license information.
|
// Copyright (c) .NET Foundation. All rights reserved. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Extensions.Tests
|
namespace Microsoft.AspNetCore.Http.Extensions.Tests
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Extensions
|
namespace Microsoft.AspNetCore.Http.Extensions
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication;
|
using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||||
using Microsoft.AspNetCore.Http.Features.Authentication.Internal;
|
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Authentication.Internal
|
namespace Microsoft.AspNetCore.Http.Authentication.Internal
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,9 @@ using System.Reflection;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features;
|
using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class DefaultHttpContextTests
|
public class DefaultHttpContextTests
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class FakeResponseFeature : HttpResponseFeature
|
public class FakeResponseFeature : HttpResponseFeature
|
||||||
{
|
{
|
||||||
|
|
@ -9,7 +9,7 @@ using Microsoft.AspNetCore.Http.Internal;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class FormFeatureTests
|
public class FormFeatureTests
|
||||||
{
|
{
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Tests
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class HttpRequestIdentifierFeatureTests
|
public class HttpRequestIdentifierFeatureTests
|
||||||
{
|
{
|
||||||
|
|
@ -6,7 +6,7 @@ using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class NonSeekableReadStream : Stream
|
public class NonSeekableReadStream : Stream
|
||||||
{
|
{
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
namespace Microsoft.AspNetCore.Http.Features
|
||||||
{
|
{
|
||||||
public class QueryFeatureTests
|
public class QueryFeatureTests
|
||||||
{
|
{
|
||||||
|
|
@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class HeaderDictionaryTests
|
public class HeaderDictionaryTests
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Http.Features;
|
||||||
using Microsoft.Extensions.ObjectPool;
|
using Microsoft.Extensions.ObjectPool;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Http.Internal
|
namespace Microsoft.AspNetCore.Http
|
||||||
{
|
{
|
||||||
public class HttpContextFactoryTests
|
public class HttpContextFactoryTests
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder.Internal
|
namespace Microsoft.AspNetCore.Builder.Internal
|
||||||
|
|
@ -7,7 +7,6 @@ using System.Linq;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Owin
|
namespace Microsoft.AspNetCore.Owin
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Builder.Internal;
|
using Microsoft.AspNetCore.Builder.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Http.Internal;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue