diff options
author | dotnet bot <dotnet-bot@dotnetfoundation.org> | 2018-12-20 20:48:59 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2018-12-20 20:51:17 +0300 |
commit | ccd7b52ca8a70d6aed6667e2d2f0d496f596a941 (patch) | |
tree | 349a7a7fda555563879e5f4ee5604c1d71573527 /netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs | |
parent | 53f091ea4f1fca6fc758a3f3a393898f22f93087 (diff) |
Add System.Private.CoreLib shared sources (#12162)
Taken from corefx commit 5956ad35864352b38c53aa8c2d1ce012c96b168d. Subsequent updates will happen via a mirroring bot.
Diffstat (limited to 'netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs')
-rw-r--r-- | netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000000..688a3a01ba7 --- /dev/null +++ b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,21 @@ +// 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. + +namespace System.Runtime.CompilerServices +{ + /// <summary> + /// Indicates the type of the async method builder that should be used by a language compiler to + /// build the attributed type when used as the return type of an async method. + /// </summary> + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Delegate | AttributeTargets.Enum, Inherited = false, AllowMultiple = false)] + public sealed class AsyncMethodBuilderAttribute : Attribute + { + /// <summary>Initializes the <see cref="AsyncMethodBuilderAttribute"/>.</summary> + /// <param name="builderType">The <see cref="Type"/> of the associated builder.</param> + public AsyncMethodBuilderAttribute(Type builderType) => BuilderType = builderType; + + /// <summary>Gets the <see cref="Type"/> of the associated builder.</summary> + public Type BuilderType { get; } + } +} |