HostProtectionResource Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Code Access Security is not supported or honored by the runtime.
Specifies categories of functionality potentially harmful to the host if invoked by a method or class.
This enumeration supports a bitwise combination of its member values.
public enum class HostProtectionResource
[System.Flags]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum HostProtectionResource
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum HostProtectionResource
[System.Flags]
public enum HostProtectionResource
[<System.Flags>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type HostProtectionResource =
[<System.Flags>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type HostProtectionResource =
[<System.Flags>]
type HostProtectionResource =
Public Enum HostProtectionResource
- Inheritance
- Attributes
Fields
Name | Value | Description |
---|---|---|
None | 0 | Exposes no host resources. |
Synchronization | 1 | Exposes synchronization. |
SharedState | 2 | Exposes state that might be shared between threads. |
ExternalProcessMgmt | 4 | Might create or destroy other processes. |
SelfAffectingProcessMgmt | 8 | Might exit the current process, terminating the server. |
ExternalThreading | 16 | Creates or manipulates threads other than its own, which might be harmful to the host. |
SelfAffectingThreading | 32 | Manipulates threads in a way that only affects user code. |
SecurityInfrastructure | 64 | Exposes the security infrastructure. |
UI | 128 | Exposes the user interface. |
MayLeakOnAbort | 256 | Might cause a resource leak on termination, if not protected by a safe handle or some other means of ensuring the release of resources. |
All | 511 | Exposes all host resources. |
Remarks
Caution
Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.
This enumeration is used by the HostProtectionAttribute attribute.