System.Runtime.Versioning.ResourceScope Enumeration

Identifies the scope of a sharable resource.

Syntax

[System.Flags]
public enum ResourceScope

Remarks

A resource is an object that holds state. Examples of resources include a file on disk, a message queue for a process, and a named System.Threading.Mutex. Knowing an object is a resource does not indicate its appropriate use; the important property of a resource is the scope of the resource. The scope includes both the type and the visibility of the resource. The resource type specifies whether the resource is a machine-level resource, such as a file on disk, a process-wide resource, such as a block of non-shared memory, or an application domain-level resource, such as a lock on an instance of a non-marshal by reference object. The visibility scopes are ResourceScope.Assembly and ResourceScope.Private, the default is Public, which is implicit if ResourceScope.Private or ResourceScope.Assembly are not indicated. There is no enumeration value for Public.

Members

Member NameDescription
AppDomain

The state is shared by objects within an AppDomain.

Assembly

The resource is visible at an assembly scope.

Library

The state is shared by objects within a library.

Machine

The state is shared by objects within the machine.

None

There is no shared state.

Private

The resource is visible to only the type.

Process

The state is shared within a process.

Requirements

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