AsyncMethodBuilderAttribute.cs 999 B

12345678910111213141516171819202122
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT License.
  3. // See the LICENSE file in the project root for more information.
  4. namespace System.Runtime.CompilerServices
  5. {
  6. /// <summary>
  7. /// Attribute to decorate a task-like type to specify a compatible asynchronous method builder.
  8. /// </summary>
  9. internal sealed class AsyncMethodBuilderAttribute : Attribute
  10. {
  11. /// <summary>
  12. /// Creates a new instance of the attribute using the specified <paramref name="type"/>.
  13. /// </summary>
  14. /// <param name="type">The type implementing the asynchronous method builder.</param>
  15. #pragma warning disable IDE0060 // Remove unused parameter - this attribute is understood intrinsically by the compiler, so it doesn't need to use its argument.
  16. public AsyncMethodBuilderAttribute(Type type)
  17. #pragma warning restore IDE0060 // Remove unused parameter
  18. {
  19. }
  20. }
  21. }