<PackageReference Include="System.Security.Permissions" Version="9.0.5" />

HostProtectionAttribute

Allows the use of declarative security actions to determine host protection requirements. This class cannot be inherited.
public bool ExternalProcessMgmt { get; set; }

Gets or sets a value indicating whether external process management is exposed.

public bool ExternalThreading { get; set; }

Gets or sets a value indicating whether external threading is exposed.

public bool MayLeakOnAbort { get; set; }

Gets or sets a value indicating whether resources might leak memory if the operation is terminated.

public HostProtectionResource Resources { get; set; }

Gets or sets flags specifying categories of functionality that are potentially harmful to the host.

public bool SecurityInfrastructure { get; set; }

Gets or sets a value indicating whether the security infrastructure is exposed.

public bool SelfAffectingProcessMgmt { get; set; }

Gets or sets a value indicating whether self-affecting process management is exposed.

public bool SelfAffectingThreading { get; set; }

Gets or sets a value indicating whether self-affecting threading is exposed.

public bool SharedState { get; set; }

Gets or sets a value indicating whether shared state is exposed.

public bool Synchronization { get; set; }

Gets or sets a value indicating whether synchronization is exposed.

public bool UI { get; set; }

Gets or sets a value indicating whether the user interface is exposed.

Initializes a new instance of the HostProtectionAttribute class with default values.

Initializes a new instance of the HostProtectionAttribute class with the specified SecurityAction value.