System.Runtime.Versioning.ResourceExposureAttribute Class

Specifies the resource exposure for a member of a class. This class cannot be inherited.

See Also: ResourceExposureAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.All, Inherited=false)]
[System.Diagnostics.Conditional("RESOURCE_ANNOTATION_WORK")]
public sealed class ResourceExposureAttribute : Attribute

Remarks

The System.Runtime.Versioning.ResourceConsumptionAttribute attribute must be applied to a member calling a member that has the System.Runtime.Versioning.ResourceExposureAttribute attribute applied. Public members cannot expose ResourceScope.Assembly or ResourceScope.Private resources. Members with ResourceScope.Assembly scope cannot expose ResourceScope.Private resources.

The graph of methods terminates when an System.Runtime.Versioning.ResourceExposureAttribute attribute with a resource scope of ResourceScope.None is applied to a method.

Requirements

Namespace: System.Runtime.Versioning
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0