This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Adding Microsoft.Bcl.AsyncInterfaces for .NET Standard 2.0 #37189
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cb8e4d9
Adding Microsoft.Compatibility.AsyncInterfaces package
joperezr bdfe9fc
Addressing PR Feedback
joperezr dffb076
Fix small typo
joperezr 9cc8148
Remove unnecesary configurations from the package
joperezr 7486695
Rename to Microsoft.Bcl.AsyncInterfaces
joperezr 8455d82
Addressing PR Feedback
joperezr 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project> | ||
| <Import Project="..\Directory.Build.props" /> | ||
| <PropertyGroup> | ||
| <AssemblyVersion>1.0.0.0</AssemblyVersion> | ||
| <PackageVersion>1.0.0</PackageVersion> | ||
| <StrongNameKeyId>Open</StrongNameKeyId> | ||
| <!-- This assembly should never be placed inbox as it is only for downlevel compatibility. --> | ||
| </PropertyGroup> | ||
| </Project> |
41 changes: 41 additions & 0 deletions
41
src/Microsoft.Bcl.AsyncInterfaces/Microsoft.Bcl.AsyncInterfaces.sln
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,41 @@ | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 15 | ||
| VisualStudioVersion = 15.0.27213.1 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "src\Microsoft.Bcl.AsyncInterfaces.csproj", "{96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}" | ||
| ProjectSection(ProjectDependencies) = postProject | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {6371299B-8F39-4A0A-A9CD-70F80FF205F6} | ||
| EndProjectSection | ||
| EndProject | ||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bcl.AsyncInterfaces", "ref\Microsoft.Bcl.AsyncInterfaces.csproj", "{6371299B-8F39-4A0A-A9CD-70F80FF205F6}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" | ||
| EndProject | ||
| Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU | ||
| {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU | ||
| {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU | ||
| {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(NestedProjects) = preSolution | ||
| {96A7CE75-B5E8-421B-BDF0-C4651D97D8CA} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} | ||
| {6371299B-8F39-4A0A-A9CD-70F80FF205F6} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {38217F72-3F9A-4B15-96C8-BFA23083AAD3} | ||
| EndGlobalSection | ||
| EndGlobal |
10 changes: 10 additions & 0 deletions
10
src/Microsoft.Bcl.AsyncInterfaces/pkg/Microsoft.Bcl.AsyncInterfaces.pkgproj
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 @@ | ||
| <Project DefaultTargets="Build"> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" /> | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\ref\Microsoft.Bcl.AsyncInterfaces.csproj"> | ||
| <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework> | ||
| </ProjectReference> | ||
| <ProjectReference Include="..\src\Microsoft.Bcl.AsyncInterfaces.csproj" /> | ||
| </ItemGroup> | ||
| <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" /> | ||
| </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,8 @@ | ||
| <Project DefaultTargets="Build"> | ||
| <PropertyGroup> | ||
| <BuildConfigurations> | ||
| netstandard; | ||
| netstandard2.1; | ||
| </BuildConfigurations> | ||
| </PropertyGroup> | ||
| </Project> |
10 changes: 10 additions & 0 deletions
10
src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.Forwards.cs
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 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IAsyncDisposable))] | ||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerable<>))] | ||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IAsyncEnumerator<>))] | ||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute))] | ||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredAsyncDisposable))] | ||
| [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<>))] |
56 changes: 56 additions & 0 deletions
56
src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.cs
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,56 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
| // ------------------------------------------------------------------------------ | ||
| // Changes to this file must follow the http://aka.ms/api-review process. | ||
| // ------------------------------------------------------------------------------ | ||
|
|
||
| namespace System | ||
| { | ||
| public partial interface IAsyncDisposable | ||
| { | ||
| System.Threading.Tasks.ValueTask DisposeAsync(); | ||
| } | ||
| } | ||
| namespace System.Collections.Generic | ||
| { | ||
| public partial interface IAsyncEnumerable<out T> | ||
| { | ||
| System.Collections.Generic.IAsyncEnumerator<T> GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); | ||
| } | ||
| public partial interface IAsyncEnumerator<out T> : System.IAsyncDisposable | ||
| { | ||
| T Current { get; } | ||
| System.Threading.Tasks.ValueTask<bool> MoveNextAsync(); | ||
| } | ||
| } | ||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)] | ||
| public sealed partial class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute | ||
| { | ||
| public AsyncIteratorStateMachineAttribute(System.Type stateMachineType) : base (default(System.Type)) { } | ||
| } | ||
| public readonly partial struct ConfiguredAsyncDisposable | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; } | ||
| } | ||
| public readonly partial struct ConfiguredCancelableAsyncEnumerable<T> | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(bool continueOnCapturedContext) { throw null; } | ||
| public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T>.Enumerator GetAsyncEnumerator() { throw null; } | ||
| public System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> WithCancellation(System.Threading.CancellationToken cancellationToken) { throw null; } | ||
| public readonly partial struct Enumerator | ||
| { | ||
| private readonly object _dummy; | ||
| private readonly int _dummyPrimitive; | ||
| public T Current { get { throw null; } } | ||
| public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable DisposeAsync() { throw null; } | ||
| public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<bool> MoveNextAsync() { throw null; } | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
src/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.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,17 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <ProjectGuid>{6371299B-8F39-4A0A-A9CD-70F80FF205F6}</ProjectGuid> | ||
| <Configurations>netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations> | ||
| </PropertyGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'"> | ||
| <Compile Include="Microsoft.Bcl.AsyncInterfaces.cs" /> | ||
| <Reference Include="System.Threading.Tasks.Extensions" /> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'"> | ||
| <Compile Include="Microsoft.Bcl.AsyncInterfaces.Forwards.cs" /> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'"> | ||
| <Reference Include="System.Runtime" /> | ||
| <Reference Include="System.Threading.Tasks" /> | ||
| </ItemGroup> | ||
| </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,8 @@ | ||
| <Project DefaultTargets="Build"> | ||
| <PropertyGroup> | ||
| <BuildConfigurations> | ||
| netstandard; | ||
| netstandard2.1; | ||
| </BuildConfigurations> | ||
| </PropertyGroup> | ||
| </Project> |
32 changes: 32 additions & 0 deletions
32
src/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.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,32 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current"> | ||
| <PropertyGroup> | ||
| <ProjectGuid>{96A7CE75-B5E8-421B-BDF0-C4651D97D8CA}</ProjectGuid> | ||
| <Configurations>netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations> | ||
| <IsPartialFacadeAssembly Condition="'$(TargetGroup)' != 'netstandard'">true</IsPartialFacadeAssembly> | ||
| </PropertyGroup> | ||
| <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'"> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\Collections\Generic\IAsyncEnumerable.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\Collections\Generic\IAsyncEnumerable.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\Collections\Generic\IAsyncEnumerator.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\Collections\Generic\IAsyncEnumerator.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\IAsyncDisposable.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\IAsyncDisposable.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\ConfiguredAsyncDisposable.cs</Link> | ||
| </Compile> | ||
| <Compile Include="$(CommonPath)\CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs"> | ||
| <Link>ProductionCode\Common\CoreLib\System\Runtime\CompilerServices\ConfiguredCancelableAsyncEnumerable.cs</Link> | ||
| </Compile> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(TargetGroup)' == 'netstandard'"> | ||
| <Reference Include="System.Runtime" /> | ||
| <Reference Include="System.Threading.Tasks.Extensions" /> | ||
| <Reference Include="System.Threading.Tasks" /> | ||
| </ItemGroup> | ||
| </Project> |
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.
Uh oh!
There was an error while loading. Please reload this page.