-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Move IFeatureCollection to new Extensions.Features assembly #32043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7d6f155
Move IFeatureCollection to new Extensions.Features assembly
Tratcher 3cd5017
Update src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.…
Tratcher 1bd37ff
Update Microsoft.Extensions.Features.csproj
Tratcher b0b580f
Regen props
Tratcher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
src/Http/Features/src/Microsoft.Extensions.Features.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <Description>Provides abstractions for a loosly coupled collection of features. | ||
|
|
||
| Commonly Used Types: | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection | ||
| </Description> | ||
| <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks> | ||
| <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks> | ||
| <IsAspNetCoreApp>true</IsAspNetCoreApp> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <PackageTags>aspnetcore</PackageTags> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #nullable enable | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #nullable enable | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.FeatureCollection() -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.FeatureCollection(Microsoft.AspNetCore.Http.Features.IFeatureCollection! defaults) -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.Get<TFeature>() -> TFeature? | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.Type!, object!>>! | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.IsReadOnly.get -> bool | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.Set<TFeature>(TFeature? instance) -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.this[System.Type! key].get -> object? | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.this[System.Type! key].set -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureReference<T> | ||
| Microsoft.AspNetCore.Http.Features.FeatureReference<T>.Fetch(Microsoft.AspNetCore.Http.Features.IFeatureCollection! features) -> T? | ||
| Microsoft.AspNetCore.Http.Features.FeatureReference<T>.Update(Microsoft.AspNetCore.Http.Features.IFeatureCollection! features, T feature) -> T | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache> | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Cache -> TCache? | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Collection.get -> Microsoft.AspNetCore.Http.Features.IFeatureCollection! | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.FeatureReferences(Microsoft.AspNetCore.Http.Features.IFeatureCollection! collection) -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Fetch<TFeature, TState>(ref TFeature? cached, TState state, System.Func<TState, TFeature?>! factory) -> TFeature? | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Fetch<TFeature>(ref TFeature? cached, System.Func<Microsoft.AspNetCore.Http.Features.IFeatureCollection!, TFeature?>! factory) -> TFeature? | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection! collection) -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Initalize(Microsoft.AspNetCore.Http.Features.IFeatureCollection! collection, int revision) -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureReferences<TCache>.Revision.get -> int | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.Get<TFeature>() -> TFeature? | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.IsReadOnly.get -> bool | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.Revision.get -> int | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.Set<TFeature>(TFeature? instance) -> void | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.this[System.Type! key].get -> object? | ||
| Microsoft.AspNetCore.Http.Features.IFeatureCollection.this[System.Type! key].set -> void | ||
| Microsoft.AspNetCore.Http.Features.FeatureCollection.FeatureCollection(int initialCapacity) -> void | ||
| static readonly Microsoft.AspNetCore.Http.Features.FeatureReference<T>.Default -> Microsoft.AspNetCore.Http.Features.FeatureReference<T> | ||
| virtual Microsoft.AspNetCore.Http.Features.FeatureCollection.Revision.get -> int |
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,19 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <Description>ASP.NET Core HTTP feature interface definitions.</Description> | ||
| <TargetFrameworks>$(DefaultNetFxTargetFramework);netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks> | ||
| <TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks> | ||
| <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> | ||
| <IsAspNetCoreApp>true</IsAspNetCoreApp> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <PackageTags>aspnetcore</PackageTags> | ||
| <IsPackable>false</IsPackable> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Reference Include="Microsoft.Extensions.Features" /> | ||
| <Reference Include="Microsoft.Extensions.Primitives" /> | ||
| <Reference Include="System.IO.Pipelines" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Shipped.txt" /> | ||
| <AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" /> | ||
| </ItemGroup> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // 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. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using Microsoft.AspNetCore.Http.Features; | ||
|
|
||
| [assembly: TypeForwardedTo(typeof(IFeatureCollection))] | ||
| [assembly: TypeForwardedTo(typeof(FeatureCollection))] | ||
| [assembly: TypeForwardedTo(typeof(FeatureReference<>))] | ||
| [assembly: TypeForwardedTo(typeof(FeatureReferences<>))] | ||
halter73 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should
PublicAPI.Shipped.txtbe changing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Nothing has shipped yet in this assembly. Did you think this was
src/Http/Http.Features/? I wonder if we should rename the folders. That tripped me up earlier in the review too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well CodeCheck agrees with you. I guess it doesn't like the file at all even if empty. Still think the folder names are confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JunTaoLuo? This is a new assembly and the tools failed if it didn't have this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why I was asking why it was changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note Code Check is complaining about different files because they were deleted:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you get the CI to green ignoring the Code Check job, let @dotnet/aspnet-build know and we'll override the required checks to squishy-merge your change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From build perspective, the changes here make sense and simplify our PublicAPI files.