Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Move remaining feature interfaces into Microsoft.AspNetCore.Http.Features package and namespace #589

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/Microsoft.AspNetCore.Http.Abstractions/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@
},
"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-*",
"System.Security.Cryptography.X509Certificates": "4.0.0-*"
"System.Runtime.InteropServices": "4.1.0-*"
},
"imports": [
"dotnet5.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues
/// 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>
Expand Down Expand Up @@ -79,7 +79,7 @@ public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues
/// 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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Collections.Generic;

namespace Microsoft.AspNetCore.Http.Features.Internal
namespace Microsoft.AspNetCore.Http.Features
{
public interface IItemsFeature
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValue
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>
Expand Down Expand Up @@ -73,13 +73,14 @@ public interface IQueryCollection : IEnumerable<KeyValuePair<string, StringValue
/// 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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ public interface IRequestCookieCollection : IEnumerable<KeyValuePair<string, str
/// 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>
/// An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the object
/// 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.
Expand Down Expand Up @@ -78,7 +78,7 @@ public interface IRequestCookieCollection : IEnumerable<KeyValuePair<string, str
/// 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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

namespace Microsoft.AspNetCore.Http.Features.Internal
namespace Microsoft.AspNetCore.Http.Features
{
public interface IServiceProvidersFeature
{
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNetCore.Http.Features/ISession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Microsoft.AspNetCore.Http.Features
namespace Microsoft.AspNetCore.Http
{
public interface ISession
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.AspNetCore.Http.Features/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11-*",
"System.ComponentModel": "4.0.1-*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which type requires this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IServiceProvidersFeature

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I moved this from src/Microsoft.AspNetCore.Http.Abstractions/project.json, same package that interface came from to this one.

"System.Linq": "4.1.0-*",
"System.Net.Primitives": "4.0.11-*",
"System.Net.WebSockets": "4.0.0-*",
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.AspNetCore.Owin/OwinEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have internal features?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementations

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those should go into an internal folder...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


namespace Microsoft.AspNetCore.Owin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Http;

namespace Microsoft.AspNetCore.Owin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
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;
Expand Down Expand Up @@ -204,7 +203,7 @@ void TestCachedFeaturesAreNull(object value, IFeatureCollection features)

var field = type
.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)
.Single(f =>
.Single(f =>
f.FieldType.GetTypeInfo().IsGenericType &&
f.FieldType.GetGenericTypeDefinition() == typeof(FeatureReferences<>));

Expand Down