AppDomainExtensionMethods provides several extension methods for the
class. This type is in the Security namespace (not the System namespace), so in order to use these extension methods, you will need to make sure you include this namespace as well as a reference to Security.dll.
Get the permission set that the current AppDomain is sandboxed with. This is the permission set which is used if a security demand crosses the AppDomain boundary.
Detect if an AppDomain is a simple sandbox style domain, created by passing a PermissionSet to the
True if the domain is a simple sandbox; false if it is a legacy v1.x domain.
Determine if an AppDomain is sandboxed
True if the AppDomain has a grant set other than FullTrust