Move remaining feature interfaces into `Microsoft.AspNetCore.Http.Features` package and namespace
- #590, also related to #561 - move feature interfaces from `Microsoft.AspNetCore.Http` package - move required classes from `Microsoft.AspNetCore.Http.Abstractions` package - move `ISession` and `WebSocketAcceptContext` to `Microsoft.AspNetCore.Http` namespace (#590) nit: remove transient dependencies listed in `Microsoft.AspNetCore.Http.Abstractions`'s `project.json`
This commit is contained in:
parent
131db6c41e
commit
6f24508a33
|
|
@ -29,10 +29,8 @@
|
|||
},
|
||||
"netstandard1.3": {
|
||||
"dependencies": {
|
||||
"System.ComponentModel": "4.0.1-*",
|
||||
"System.Globalization.Extensions": "4.0.1-*",
|
||||
"System.Linq.Expressions": "4.0.11-*",
|
||||
"System.Net.WebSockets": "4.0.0-*",
|
||||
"System.Reflection.TypeExtensions": "4.1.0-*",
|
||||
"System.Runtime.InteropServices": "4.1.0-*"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
||||
/// </returns>
|
||||
int Count { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" />.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
|
|
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// key is null.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IFormCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return StringValues.Empty for missing entries
|
||||
/// rather than throwing an Exception.
|
||||
/// </remarks>
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IFormFeature
|
||||
{
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IItemsFeature
|
||||
{
|
||||
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" />.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
|
|
@ -73,13 +73,14 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// The key of the value to get.
|
||||
/// </param>
|
||||
/// <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 <see cref="T:Microsoft.Extensions.Primitives.StringValues" />.
|
||||
/// Empty if the key is not present.
|
||||
/// </returns>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// key is null.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IQueryCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return StringValues.Empty for missing entries
|
||||
/// rather than throwing an Exception.
|
||||
/// </remarks>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IQueryFeature
|
||||
{
|
||||
|
|
@ -17,9 +17,9 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// The number of elements contained in the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
||||
/// </returns>
|
||||
int Count { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// that implements <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" />.
|
||||
/// </returns>
|
||||
ICollection<string> Keys { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> contains an element
|
||||
/// with the specified key.
|
||||
|
|
@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
/// key is null.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:Microsoft.AspNetCore.Http.IRequestCookieCollection" /> has a different indexer contract than
|
||||
/// <see cref="T:System.Collections.Generic.IDictionary`2" />, as it will return String.Empty for missing entries
|
||||
/// rather than throwing an Exception.
|
||||
/// </remarks>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IRequestCookiesFeature
|
||||
{
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IResponseCookiesFeature
|
||||
{
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features.Internal
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
{
|
||||
public interface IServiceProvidersFeature
|
||||
{
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
namespace Microsoft.AspNetCore.Http
|
||||
{
|
||||
public interface ISession
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// 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.
|
||||
|
||||
namespace Microsoft.AspNetCore.Http.Features
|
||||
namespace Microsoft.AspNetCore.Http
|
||||
{
|
||||
public class WebSocketAcceptContext
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"netstandard1.3": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.11-*",
|
||||
"System.ComponentModel": "4.0.1-*",
|
||||
"System.Linq": "4.1.0-*",
|
||||
"System.Net.Primitives": "4.0.11-*",
|
||||
"System.Net.WebSockets": "4.0.0-*",
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
||||
using Microsoft.AspNetCore.Http.Features.Authentication;
|
||||
using Microsoft.AspNetCore.Http.Features.Authentication.Internal;
|
||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
||||
|
||||
namespace Microsoft.AspNetCore.Owin
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Net.WebSockets;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Owin
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Owin
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.Collections.Generic;
|
|||
using System.Net.WebSockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Owin
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ using System.Net.WebSockets;
|
|||
using System.Reflection;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http.Authentication.Internal;
|
||||
using Microsoft.AspNetCore.Http.Features;
|
||||
using Microsoft.AspNetCore.Http.Features.Internal;
|
||||
using Xunit;
|
||||
|
|
@ -204,7 +203,7 @@ namespace Microsoft.AspNetCore.Http.Internal
|
|||
|
||||
var field = type
|
||||
.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)
|
||||
.Single(f =>
|
||||
.Single(f =>
|
||||
f.FieldType.GetTypeInfo().IsGenericType &&
|
||||
f.FieldType.GetGenericTypeDefinition() == typeof(FeatureReferences<>));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue