ApplicationTrust Constructors

Definition

Initializes a new instance of the ApplicationTrust class.

Overloads

ApplicationTrust()

Initializes a new instance of the ApplicationTrust class.

ApplicationTrust(ApplicationIdentity)

Initializes a new instance of the ApplicationTrust class with an ApplicationIdentity.

ApplicationTrust(PermissionSet, IEnumerable<StrongName>)

Initializes a new instance of the ApplicationTrust class using the provided grant set and collection of full-trust assemblies.

ApplicationTrust()

Initializes a new instance of the ApplicationTrust class.

public:
 ApplicationTrust();
public ApplicationTrust ();
Public Sub New ()

Remarks

This constructor creates an empty ApplicationTrust object.

ApplicationTrust(ApplicationIdentity)

Initializes a new instance of the ApplicationTrust class with an ApplicationIdentity.

public:
 ApplicationTrust(ApplicationIdentity ^ applicationIdentity);
public ApplicationTrust (ApplicationIdentity applicationIdentity);
new System.Security.Policy.ApplicationTrust : ApplicationIdentity -> System.Security.Policy.ApplicationTrust
Public Sub New (identity As ApplicationIdentity)

Parameters

identity
ApplicationIdentity

An ApplicationIdentity that uniquely identifies an application.

Remarks

An application identity contains the full name of the application and the location of its code base.

ApplicationTrust(PermissionSet, IEnumerable<StrongName>)

Initializes a new instance of the ApplicationTrust class using the provided grant set and collection of full-trust assemblies.

public:
 ApplicationTrust(System::Security::PermissionSet ^ defaultGrantSet, System::Collections::Generic::IEnumerable<System::Security::Policy::StrongName ^> ^ fullTrustAssemblies);
public ApplicationTrust (System.Security.PermissionSet defaultGrantSet, System.Collections.Generic.IEnumerable<System.Security.Policy.StrongName> fullTrustAssemblies);
new System.Security.Policy.ApplicationTrust : System.Security.PermissionSet * seq<System.Security.Policy.StrongName> -> System.Security.Policy.ApplicationTrust
Public Sub New (defaultGrantSet As PermissionSet, fullTrustAssemblies As IEnumerable(Of StrongName))

Parameters

defaultGrantSet
PermissionSet

A default permission set that is granted to all assemblies that do not have specific grants.

fullTrustAssemblies
IEnumerable<StrongName>

An array of strong names that represent assemblies that should be considered fully trusted in an application domain.

Exceptions

fullTrustAssemblies is null.

fullTrustAssemblies contains an assembly that does not have a StrongName.

Remarks

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.

Applies to