|
| 1 | +// <auto-generated/> |
| 2 | +#pragma warning disable |
| 3 | +#nullable enable annotations |
| 4 | + |
| 5 | +// Licensed to the .NET Foundation under one or more agreements. |
| 6 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 7 | + |
| 8 | +#if NETFRAMEWORK || NETSTANDARD2_0 |
| 9 | + |
| 10 | +namespace System.Diagnostics.CodeAnalysis; |
| 11 | + |
| 12 | +/// <summary> |
| 13 | +/// Indicates that certain members on a specified <see cref="global::System.Type"/> are accessed dynamically, |
| 14 | +/// for example through <see cref="global::System.Reflection"/>. |
| 15 | +/// </summary> |
| 16 | +/// <remarks> |
| 17 | +/// This allows tools to understand which members are being accessed during the execution |
| 18 | +/// of a program. |
| 19 | +/// |
| 20 | +/// This attribute is valid on members whose type is <see cref="global::System.Type"/> or <see cref="string"/>. |
| 21 | +/// |
| 22 | +/// When this attribute is applied to a location of type <see cref="string"/>, the assumption is |
| 23 | +/// that the string represents a fully qualified type name. |
| 24 | +/// |
| 25 | +/// When this attribute is applied to a class, interface, or struct, the members specified |
| 26 | +/// can be accessed dynamically on <see cref="global::System.Type"/> instances returned from calling |
| 27 | +/// <see cref="object.GetType"/> on instances of that class, interface, or struct. |
| 28 | +/// |
| 29 | +/// If the attribute is applied to a method it's treated as a special case and it implies |
| 30 | +/// the attribute should be applied to the "this" parameter of the method. As such the attribute |
| 31 | +/// should only be used on instance methods of types assignable to System.Type (or string, but no methods |
| 32 | +/// will use it there). |
| 33 | +/// </remarks> |
| 34 | +[global::System.AttributeUsage( |
| 35 | + global::System.AttributeTargets.Field | |
| 36 | + global::System.AttributeTargets.ReturnValue | |
| 37 | + global::System.AttributeTargets.GenericParameter | |
| 38 | + global::System.AttributeTargets.Parameter | |
| 39 | + global::System.AttributeTargets.Property | |
| 40 | + global::System.AttributeTargets.Method | |
| 41 | + global::System.AttributeTargets.Class | |
| 42 | + global::System.AttributeTargets.Interface | |
| 43 | + global::System.AttributeTargets.Struct, |
| 44 | + Inherited = false)] |
| 45 | +[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] |
| 46 | +internal sealed class DynamicallyAccessedMembersAttribute : global::System.Attribute |
| 47 | +{ |
| 48 | + /// <summary> |
| 49 | + /// Initializes a new instance of the <see cref="global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute"/> class |
| 50 | + /// with the specified member types. |
| 51 | + /// </summary> |
| 52 | + /// <param name="memberTypes">The types of members dynamically accessed.</param> |
| 53 | + public DynamicallyAccessedMembersAttribute(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes memberTypes) |
| 54 | + { |
| 55 | + MemberTypes = memberTypes; |
| 56 | + } |
| 57 | + |
| 58 | + /// <summary> |
| 59 | + /// Gets the <see cref="global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes"/> which specifies the type |
| 60 | + /// of members dynamically accessed. |
| 61 | + /// </summary> |
| 62 | + public global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberTypes { get; } |
| 63 | +} |
| 64 | + |
| 65 | +#endif |
0 commit comments