<PackageReference Include="System.Security.Permissions" Version="9.0.0-preview.5.24306.7" />

HostProtectionResource

Specifies categories of functionality potentially harmful to the host if invoked by a method or class.
All = 511

Exposes all host resources.

Might create or destroy other processes.

Creates or manipulates threads other than its own, which might be harmful to the host.

Might cause a resource leak on termination, if not protected by a safe handle or some other means of ensuring the release of resources.

None = 0

Exposes no host resources.

Exposes the security infrastructure.

Might exit the current process, terminating the server.

Manipulates threads in a way that only affects user code.

Exposes state that might be shared between threads.

Exposes synchronization.

UI = 128

Exposes the user interface.