ApplicationTrust Constructor (PermissionSet^, IEnumerable<StrongName^>^)
Initializes a new instance of the ApplicationTrust class using the provided grant set and collection of full-trust assemblies.
Assembly: mscorlib (in mscorlib.dll)
public:
ApplicationTrust(
PermissionSet^ defaultGrantSet,
IEnumerable<StrongName^>^ fullTrustAssemblies
)
Parameters
- defaultGrantSet
-
Type:
System.Security::PermissionSet^
A default permission set that is granted to all assemblies that do not have specific grants.
- fullTrustAssemblies
-
Type:
System.Collections.Generic::IEnumerable<StrongName^>^
An array of strong names that represent assemblies that should be considered fully trusted in an application domain.
| Exception | Condition |
|---|---|
| ArgumentNullException | defaultGrantSet is null. |
| ArgumentNullException | fullTrustAssemblies is null. |
| ArgumentException | fullTrustAssemblies contains an assembly that does not have a StrongName. |
fullTrustAssemblies identifies strong-named assemblies within the AppDomain that are to be granted full trust. This constructor is called by the AppDomain::CreateDomain method to create an AppDomain that will be used as a sandbox. For more information about running an application in a sandbox, see How to: Run Partially Trusted Code in a Sandbox.
Available since 4.0