string assembly,
string type);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern void nSetHostSecurityManagerFlags (HostSecurityManagerOptions flags);
-
[SuppressUnmanagedCodeSecurity]
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
private static extern void SetSecurityHomogeneousFlag(AppDomainHandle domain,
CompatibilitySwitches.InitializeSwitches();
}
- // Retrieves a possibly-cached target framework name for this appdomain. This could be set
- // either by a host in native, a host in managed using an AppDomainSetup, or by the
- // TargetFrameworkAttribute on the executable (VS emits its target framework moniker using this
- // attribute starting in version 4).
- internal String GetTargetFrameworkName()
- {
- String targetFrameworkName = _FusionStore.TargetFrameworkName;
-
- if (targetFrameworkName == null && IsDefaultAppDomain() && !_FusionStore.CheckedForTargetFrameworkName)
- {
- // This should only be run in the default appdomain. All other appdomains should have
- // values copied from the default appdomain and/or specified by the host.
- Assembly assembly = Assembly.GetEntryAssembly();
- if (assembly != null)
- {
- TargetFrameworkAttribute[] attrs = (TargetFrameworkAttribute[])assembly.GetCustomAttributes(typeof(TargetFrameworkAttribute));
- if (attrs != null && attrs.Length > 0)
- {
- Debug.Assert(attrs.Length == 1);
- targetFrameworkName = attrs[0].FrameworkName;
- _FusionStore.TargetFrameworkName = targetFrameworkName;
- }
- }
- _FusionStore.CheckedForTargetFrameworkName = true;
- }
-
- return targetFrameworkName;
- }
-
/// <summary>
/// Returns the setting of the corresponding compatibility config switch (see CreateAppDomainManager for the impact).
/// </summary>
#endif
}
- /// <summary>
- /// Checks (and throws on failure) if the domain supports Assembly.LoadWithPartialName.
- /// </summary>
- [Pure]
- internal static void CheckLoadWithPartialNameSupported(StackCrawlMark stackMark)
- {
-#if FEATURE_APPX
- if (IsAppXModel())
- {
- RuntimeAssembly callingAssembly = RuntimeAssembly.GetExecutingAssembly(ref stackMark);
- bool callerIsFxAssembly = callingAssembly != null && callingAssembly.IsFrameworkAssembly();
- if (!callerIsFxAssembly)
- {
- throw new NotSupportedException(Environment.GetResourceString("NotSupported_AppX", "Assembly.LoadWithPartialName"));
- }
- }
-#endif
- }
-
- /// <summary>
- /// Checks (and throws on failure) if the domain supports DefinePInvokeMethod.
- /// </summary>
- [Pure]
- internal static void CheckDefinePInvokeSupported()
- {
- // We don't want users to use DefinePInvokeMethod in RefEmit to bypass app store validation on allowed native libraries.
-#if FEATURE_APPX
- if (IsAppXModel())
- throw new NotSupportedException(Environment.GetResourceString("NotSupported_AppX", "DefinePInvokeMethod"));
-#endif
- }
-
/// <summary>
/// Checks (and throws on failure) if the domain supports Assembly.Load(byte[] ...).
/// </summary>
#endif
}
- /// <summary>
- /// Checks (and throws on failure) if the domain supports AppDomain.CreateDomain.
- /// </summary>
- [Pure]
- internal static void CheckCreateDomainSupported()
- {
-#if FEATURE_APPX
- // Can create a new domain in an AppX process only when DevMode is enabled and
- // AssemblyLoadingCompat is not enabled (since there is no multi-domain support
- // for LoadFrom and LoadFile in AppX.
- if(IsAppXModel())
- {
- if (!IsAppXDesignMode())
- {
- throw new NotSupportedException(Environment.GetResourceString("NotSupported_AppX", "AppDomain.CreateDomain"));
- }
- }
-#endif
- }
-
/// <summary>
/// Get the name of the assembly and type that act as the AppDomainManager for this domain
/// </summary>
}
#endif // FEATURE_REFLECTION_ONLY_LOAD
-
- /**********************************************
- * If an AssemblyName has a public key specified, the assembly is assumed
- * to have a strong name and a hash will be computed when the assembly
- * is saved.
- **********************************************/
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, null,
- null, null, null, null, ref stackMark, null, SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- IEnumerable<CustomAttributeBuilder> assemblyAttributes)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name,
- access,
- null, null, null, null, null,
- ref stackMark,
- assemblyAttributes, SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Due to the stack crawl mark
- public AssemblyBuilder DefineDynamicAssembly(AssemblyName name,
- AssemblyBuilderAccess access,
- IEnumerable<CustomAttributeBuilder> assemblyAttributes,
- SecurityContextSource securityContextSource)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name,
- access,
- null, null, null, null, null,
- ref stackMark,
- assemblyAttributes,
- securityContextSource);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, dir,
- null, null, null, null,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- Evidence evidence)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, null,
- evidence, null, null, null,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, null, null,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of DefineDynamicAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- Evidence evidence)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, dir, evidence,
- null, null, null, ref stackMark, null, SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, dir, null,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, null,
- evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. Please see http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name, access, dir,
- evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
- bool isSynchronized)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name,
- access,
- dir,
- evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- null,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
- bool isSynchronized,
- IEnumerable<CustomAttributeBuilder> assemblyAttributes)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name,
- access,
- dir,
- evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- assemblyAttributes,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public AssemblyBuilder DefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- bool isSynchronized,
- IEnumerable<CustomAttributeBuilder> assemblyAttributes)
- {
- Contract.Ensures(Contract.Result<AssemblyBuilder>() != null);
-
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return InternalDefineDynamicAssembly(name,
- access,
- dir,
- null,
- null,
- null,
- null,
- ref stackMark,
- assemblyAttributes,
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- private AssemblyBuilder InternalDefineDynamicAssembly(
- AssemblyName name,
- AssemblyBuilderAccess access,
- String dir,
- Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
- ref StackCrawlMark stackMark,
- IEnumerable<CustomAttributeBuilder> assemblyAttributes,
- SecurityContextSource securityContextSource)
- {
- return AssemblyBuilder.InternalDefineDynamicAssembly(name,
- access,
- dir,
- evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
- ref stackMark,
- assemblyAttributes,
- securityContextSource);
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern String nApplyPolicy(AssemblyName an);
-
- // Return the assembly name that results from applying policy.
- [ComVisible(false)]
- public String ApplyPolicy(String assemblyName)
- {
- AssemblyName asmName = new AssemblyName(assemblyName);
-
- byte[] pk = asmName.GetPublicKeyToken();
- if (pk == null)
- pk = asmName.GetPublicKey();
-
- // Simply-named assemblies cannot have policy, so for those,
- // we simply return the passed-in assembly name.
- if ((pk == null) || (pk.Length == 0))
- return assemblyName;
- else
- return nApplyPolicy(asmName);
- }
-
public ObjectHandle CreateInstance(String assemblyName,
String typeName)
return CreateInstanceFrom(assemblyName, typeName);
}
-#if FEATURE_COMINTEROP
- // The first parameter should be named assemblyFile, but it was incorrectly named in a previous
- // release, and the compatibility police won't let us change the name now.
- public ObjectHandle CreateComInstanceFrom(String assemblyName,
- String typeName)
-
- {
- if (this == null)
- throw new NullReferenceException();
- Contract.EndContractBlock();
-
- return Activator.CreateComInstanceFrom(assemblyName,
- typeName);
- }
-
- public ObjectHandle CreateComInstanceFrom(String assemblyFile,
- String typeName,
- byte[] hashValue,
- AssemblyHashAlgorithm hashAlgorithm)
-
- {
- if (this == null)
- throw new NullReferenceException();
- Contract.EndContractBlock();
-
- return Activator.CreateComInstanceFrom(assemblyFile,
- typeName,
- hashValue,
- hashAlgorithm);
- }
-
-#endif // FEATURE_COMINTEROP
-
- public ObjectHandle CreateInstance(String assemblyName,
- String typeName,
- Object[] activationAttributes)
-
- {
- // jit does not check for that, so we should do it ...
- if (this == null)
- throw new NullReferenceException();
-
- if (assemblyName == null)
- throw new ArgumentNullException(nameof(assemblyName));
- Contract.EndContractBlock();
-
- return Activator.CreateInstance(assemblyName,
- typeName,
- activationAttributes);
- }
-
- public ObjectHandle CreateInstanceFrom(String assemblyFile,
- String typeName,
- Object[] activationAttributes)
-
- {
- // jit does not check for that, so we should do it ...
- if (this == null)
- throw new NullReferenceException();
- Contract.EndContractBlock();
-
- return Activator.CreateInstanceFrom(assemblyFile,
- typeName,
- activationAttributes);
- }
-
[Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of CreateInstance which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public ObjectHandle CreateInstance(String assemblyName,
String typeName,
#pragma warning restore 618
}
- public ObjectHandle CreateInstance(string assemblyName,
- string typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- object[] args,
- CultureInfo culture,
- object[] activationAttributes)
- {
- // jit does not check for that, so we should do it ...
- if (this == null)
- throw new NullReferenceException();
-
- if (assemblyName == null)
- throw new ArgumentNullException(nameof(assemblyName));
- Contract.EndContractBlock();
-
- return Activator.CreateInstance(assemblyName,
- typeName,
- ignoreCase,
- bindingAttr,
- binder,
- args,
- culture,
- activationAttributes);
- }
-
internal ObjectHandle InternalCreateInstanceWithNoSecurity (string assemblyName,
string typeName,
bool ignoreCase,
securityAttributes);
}
- public ObjectHandle CreateInstanceFrom(string assemblyFile,
- string typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- object[] args,
- CultureInfo culture,
- object[] activationAttributes)
- {
- // jit does not check for that, so we should do it ...
- if (this == null)
- throw new NullReferenceException();
- Contract.EndContractBlock();
-
- return Activator.CreateInstanceFrom(assemblyFile,
- typeName,
- ignoreCase,
- bindingAttr,
- binder,
- args,
- culture,
- activationAttributes);
- }
-
internal ObjectHandle InternalCreateInstanceFromWithNoSecurity (string assemblyName,
string typeName,
bool ignoreCase,
#pragma warning restore 618
}
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public Assembly Load(AssemblyName assemblyRef)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.InternalLoadAssemblyName(assemblyRef, null, null, ref stackMark, true /*thrownOnFileNotFound*/, false, false);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public Assembly Load(String assemblyString)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.InternalLoad(assemblyString, null, ref stackMark, false);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public Assembly Load(byte[] rawAssembly)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.nLoadImage(rawAssembly,
- null, // symbol store
- null, // evidence
- ref stackMark,
- false,
- SecurityContextSource.CurrentAssembly);
-
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- public Assembly Load(byte[] rawAssembly,
- byte[] rawSymbolStore)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.nLoadImage(rawAssembly,
- rawSymbolStore,
- null, // evidence
- ref stackMark,
- false, // fIntrospection
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of Load which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")]
- public Assembly Load(byte[] rawAssembly,
- byte[] rawSymbolStore,
- Evidence securityEvidence)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.nLoadImage(rawAssembly,
- rawSymbolStore,
- securityEvidence,
- ref stackMark,
- false, // fIntrospection
- SecurityContextSource.CurrentAssembly);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of Load which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public Assembly Load(AssemblyName assemblyRef,
- Evidence assemblySecurity)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.InternalLoadAssemblyName(assemblyRef, assemblySecurity, null, ref stackMark, true /*thrownOnFileNotFound*/, false, false);
- }
-
- [MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of Load which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public Assembly Load(String assemblyString,
- Evidence assemblySecurity)
- {
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return RuntimeAssembly.InternalLoad(assemblyString, assemblySecurity, ref stackMark, false);
- }
-
- public int ExecuteAssembly(String assemblyFile)
- {
- return ExecuteAssembly(assemblyFile, (string[])null);
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssembly(String assemblyFile,
- Evidence assemblySecurity)
- {
- return ExecuteAssembly(assemblyFile, assemblySecurity, null);
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssembly(String assemblyFile,
- Evidence assemblySecurity,
- String[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.LoadFrom(assemblyFile, assemblySecurity);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- public int ExecuteAssembly(string assemblyFile, string[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.LoadFrom(assemblyFile);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssembly which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssembly(String assemblyFile,
- Evidence assemblySecurity,
- String[] args,
- byte[] hashValue,
- AssemblyHashAlgorithm hashAlgorithm)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.LoadFrom(assemblyFile,
- assemblySecurity,
- hashValue,
- hashAlgorithm);
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- public int ExecuteAssembly(string assemblyFile,
- string[] args,
- byte[] hashValue,
- AssemblyHashAlgorithm hashAlgorithm)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.LoadFrom(assemblyFile,
- hashValue,
- hashAlgorithm);
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- public int ExecuteAssemblyByName(String assemblyName)
- {
- return ExecuteAssemblyByName(assemblyName, (string[])null);
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssemblyByName(String assemblyName,
- Evidence assemblySecurity)
- {
-#pragma warning disable 618
- return ExecuteAssemblyByName(assemblyName, assemblySecurity, null);
-#pragma warning restore 618
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssemblyByName(String assemblyName,
- Evidence assemblySecurity,
- params String[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.Load(assemblyName, assemblySecurity);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- public int ExecuteAssemblyByName(string assemblyName, params string[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.Load(assemblyName);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of ExecuteAssemblyByName which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public int ExecuteAssemblyByName(AssemblyName assemblyName,
- Evidence assemblySecurity,
- params String[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.Load(assemblyName, assemblySecurity);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
- public int ExecuteAssemblyByName(AssemblyName assemblyName, params string[] args)
- {
- RuntimeAssembly assembly = (RuntimeAssembly)Assembly.Load(assemblyName);
-
- if (args == null)
- args = new String[0];
-
- return nExecuteAssembly(assembly, args);
- }
-
public static AppDomain CurrentDomain
{
get {
}
}
- public String FriendlyName
- {
- get { return nGetFriendlyName(); }
- }
-
public String BaseDirectory
{
get {
return StringBuilderCache.GetStringAndRelease(sb);
}
- public Assembly[] GetAssemblies()
- {
- return nGetAssemblies(false /* forIntrospection */);
- }
-
- public Assembly[] ReflectionOnlyGetAssemblies()
- {
- return nGetAssemblies(true /* forIntrospection */);
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern Assembly[] nGetAssemblies(bool forIntrospection);
-
// this is true when we've removed the handles etc so really can't do anything
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern bool IsUnloadingForcedFinalize();
SetDataHelper(name, data, null);
}
- public void SetData (string name, object data, IPermission permission)
- {
- if (!name.Equals("LOCATION_URI"))
- {
- // Only LOCATION_URI can be set using AppDomain.SetData
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_SetData_OnlyLocationURI", name));
- }
-
- SetDataHelper(name, data, permission);
- }
-
private void SetDataHelper (string name, object data, IPermission permission)
{
if (name == null)
}
}
}
-
- // The compat flags are set at domain creation time to indicate that the given breaking
- // change should not be used in this domain.
- //
- // After the domain has been created, this Nullable boolean returned by this method should
- // always have a value. Code in the runtime uses this to know if it is safe to cache values
- // that might change if the compatibility switches have not been set yet.
- public Nullable<bool> IsCompatibilitySwitchSet(String value)
- {
- Nullable<bool> fReturn;
-
- if (_compatFlagsInitialized == false)
- {
- fReturn = new Nullable<bool>();
- }
- else
- {
- fReturn = new Nullable<bool>(_compatFlags != null && _compatFlags.ContainsKey(value));
- }
-
- return fReturn;
- }
[Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/?linkid=14202", false)]
[DllImport(Microsoft.Win32.Win32Native.KERNEL32)]
public static extern int GetCurrentThreadId();
- internal ApplicationTrust ApplicationTrust
- {
- get {
- if (_applicationTrust == null && _IsFastFullTrustDomain) {
- _applicationTrust = new ApplicationTrust(new PermissionSet(PermissionState.Unrestricted));
- }
-
- return _applicationTrust;
- }
- }
-
- public String DynamicDirectory
- {
- get {
- String dyndir = GetDynamicDir();
- if (dyndir != null)
- new FileIOPermission( FileIOPermissionAccess.PathDiscovery, dyndir ).Demand();
-
- return dyndir;
- }
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern private String GetDynamicDir();
-
private AppDomain() {
throw new NotSupportedException(Environment.GetResourceString(ResId.NotSupported_Constructor));
}
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern int _nExecuteAssembly(RuntimeAssembly assembly, String[] args);
- internal int nExecuteAssembly(RuntimeAssembly assembly, String[] args)
- {
- return _nExecuteAssembly(assembly, args);
- }
-
#if FEATURE_VERSIONING
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern void nCreateContext();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern String nGetFriendlyName();
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern bool nIsDefaultAppDomainForEvidence();
// support reliability for certain event handlers, if the target
// methods also participate in this discipline. If caller passes
}
}
- // Used to determine if server object context is valid in
- // x-domain remoting scenarios.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
- internal static extern bool IsDomainIdValid(Int32 id);
-
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
[SuppressUnmanagedCodeSecurity]
private static extern void nSetNativeDllSearchDirectories(string paths);
_FusionStore = info;
}
- // used to package up evidence, so it can be serialized
- // for the call to InternalRemotelySetupRemoteDomain
- [Serializable]
- private class EvidenceCollection
- {
- public Evidence ProvidedSecurityInfo;
- public Evidence CreatorsSecurityInfo;
- }
-
private static void RunInitializer(AppDomainSetup setup)
{
if (setup.AppDomainInitializer!=null)
}
}
-#if FEATURE_LOADER_OPTIMIZATION
- private void SetupLoaderOptimization(LoaderOptimization policy)
- {
- if(policy != LoaderOptimization.NotSpecified) {
- Debug.Assert(FusionStore.LoaderOptimization == LoaderOptimization.NotSpecified,
- "It is illegal to change the Loader optimization on a domain");
-
- FusionStore.LoaderOptimization = policy;
- UpdateLoaderOptimization(FusionStore.LoaderOptimization);
- }
- }
-#endif
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal extern IntPtr GetSecurityDescriptor();
-
private void SetupDomainSecurity(Evidence appDomainEvidence,
IntPtr creatorsSecurityDescriptor,
bool publishAppDomain)
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
private static extern void GetGrantSet(AppDomainHandle domain, ObjectHandleOnStack retGrantSet);
- public PermissionSet PermissionSet
- {
- // SecurityCritical because permissions can contain sensitive information such as paths
- get
- {
- PermissionSet grantSet = null;
- GetGrantSet(GetNativeHandle(), JitHelpers.GetObjectHandleOnStack(ref grantSet));
-
- if (grantSet != null)
- {
- return grantSet.Copy();
- }
- else
- {
- return new PermissionSet(PermissionState.Unrestricted);
- }
- }
- }
-
public bool IsFullyTrusted
{
get
}
}
- public bool IsHomogenous
- {
- get
- {
- // Homogenous AppDomains always have an ApplicationTrust associated with them
- return _IsFastFullTrustDomain || _applicationTrust != null;
- }
- }
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern void nChangeSecurityPolicy();
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- [ReliabilityContract(Consistency.MayCorruptAppDomain, Cer.MayFail)]
- internal static extern void nUnload(Int32 domainInternal);
-
public Object CreateInstanceAndUnwrap(String assemblyName,
String typeName)
{
return oh.Unwrap();
} // CreateInstanceAndUnwrap
- public Object CreateInstanceAndUnwrap(String assemblyName,
- String typeName,
- Object[] activationAttributes)
- {
- ObjectHandle oh = CreateInstance(assemblyName, typeName, activationAttributes);
- if (oh == null)
- return null;
-
- return oh.Unwrap();
- } // CreateInstanceAndUnwrap
-
-
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of CreateInstanceAndUnwrap which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public Object CreateInstanceAndUnwrap(String assemblyName,
- String typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- Object[] args,
- CultureInfo culture,
- Object[] activationAttributes,
- Evidence securityAttributes)
- {
-#pragma warning disable 618
- ObjectHandle oh = CreateInstance(assemblyName, typeName, ignoreCase, bindingAttr,
- binder, args, culture, activationAttributes, securityAttributes);
-#pragma warning restore 618
-
- if (oh == null)
- return null;
-
- return oh.Unwrap();
- } // CreateInstanceAndUnwrap
-
- public object CreateInstanceAndUnwrap(string assemblyName,
- string typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- object[] args,
- CultureInfo culture,
- object[] activationAttributes)
- {
- ObjectHandle oh = CreateInstance(assemblyName,
- typeName,
- ignoreCase,
- bindingAttr,
- binder,
- args,
- culture,
- activationAttributes);
-
- if (oh == null)
- {
- return null;
- }
-
- return oh.Unwrap();
- }
-
- // The first parameter should be named assemblyFile, but it was incorrectly named in a previous
- // release, and the compatibility police won't let us change the name now.
- public Object CreateInstanceFromAndUnwrap(String assemblyName,
- String typeName)
- {
- ObjectHandle oh = CreateInstanceFrom(assemblyName, typeName);
- if (oh == null)
- return null;
-
- return oh.Unwrap();
- } // CreateInstanceAndUnwrap
-
-
- // The first parameter should be named assemblyFile, but it was incorrectly named in a previous
- // release, and the compatibility police won't let us change the name now.
- public Object CreateInstanceFromAndUnwrap(String assemblyName,
- String typeName,
- Object[] activationAttributes)
- {
- ObjectHandle oh = CreateInstanceFrom(assemblyName, typeName, activationAttributes);
- if (oh == null)
- return null;
-
- return oh.Unwrap();
- } // CreateInstanceAndUnwrap
-
-
- // The first parameter should be named assemblyFile, but it was incorrectly named in a previous
- // release, and the compatibility police won't let us change the name now.
- [Obsolete("Methods which use evidence to sandbox are obsolete and will be removed in a future release of the .NET Framework. Please use an overload of CreateInstanceFromAndUnwrap which does not take an Evidence parameter. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- public Object CreateInstanceFromAndUnwrap(String assemblyName,
- String typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- Object[] args,
- CultureInfo culture,
- Object[] activationAttributes,
- Evidence securityAttributes)
- {
-#pragma warning disable 618
- ObjectHandle oh = CreateInstanceFrom(assemblyName, typeName, ignoreCase, bindingAttr,
- binder, args, culture, activationAttributes, securityAttributes);
-#pragma warning restore 618
-
- if (oh == null)
- return null;
-
- return oh.Unwrap();
- } // CreateInstanceAndUnwrap
-
- public object CreateInstanceFromAndUnwrap(string assemblyFile,
- string typeName,
- bool ignoreCase,
- BindingFlags bindingAttr,
- Binder binder,
- object[] args,
- CultureInfo culture,
- object[] activationAttributes)
- {
- ObjectHandle oh = CreateInstanceFrom(assemblyFile,
- typeName,
- ignoreCase,
- bindingAttr,
- binder,
- args,
- culture,
- activationAttributes);
- if (oh == null)
- {
- return null;
- }
-
- return oh.Unwrap();
- }
-
public Int32 Id
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal extern Int32 GetId();
-
- internal const Int32 DefaultADID = 1;
-
- public bool IsDefaultAppDomain()
- {
- if (GetId()==DefaultADID)
- return true;
- return false;
- }
#if FEATURE_APPDOMAIN_RESOURCE_MONITORING
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[Serializable]
[ClassInterface(ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
- public sealed class AppDomainSetup :
- IAppDomainSetup
+ public sealed class AppDomainSetup
{
[Serializable]
internal enum LoaderInformation
return path;
}
- private bool IsFilePath(String path)
- {
-#if !PLATFORM_UNIX
- return (path[1] == ':') || ( (path[0] == '\\') && (path[1] == '\\') );
-#else
- return (path[0] == '/');
-#endif // !PLATFORM_UNIX
- }
-
- internal static String ApplicationBaseKey
- {
- get {
- return ACTAG_APP_BASE_URL;
- }
- }
-
public String ConfigurationFile
{
get {
}
}
- // Used by the ResourceManager internally. This must not do any
- // security checks to avoid infinite loops.
- internal String ConfigurationFileInternal
- {
- get {
- return NormalizePath(Value[(int) LoaderInformation.ConfigurationFileValue], true);
- }
- }
-
- internal static String ConfigurationFileKey
- {
- get {
- return ACTAG_APP_CONFIG_FILE;
- }
- }
-
public byte[] GetConfigurationBytes()
{
if (_ConfigurationBytes == null)
return (byte[]) _ConfigurationBytes.Clone();
}
- public void SetConfigurationBytes(byte[] value)
- {
- _ConfigurationBytes = value;
- }
-
- private static String ConfigurationBytesKey
- {
- get {
- return ACTAG_APP_CONFIG_BLOB;
- }
- }
-
// only needed by AppDomain.Setup(). Not really needed by users.
internal Dictionary<string, object> GetCompatibilityFlags()
{
}
}
- internal bool CheckedForTargetFrameworkName
- {
- get { return _CheckedForTargetFrameworkName; }
- set { _CheckedForTargetFrameworkName = value; }
- }
-
- public String DynamicBase
- {
- get {
- return VerifyDir(Value[(int) LoaderInformation.DynamicBaseValue], true);
- }
-
- set {
- if (value == null)
- Value[(int) LoaderInformation.DynamicBaseValue] = null;
- else {
- if(ApplicationName == null)
- throw new MemberAccessException(Environment.GetResourceString("AppDomain_RequireApplicationName"));
-
- StringBuilder s = new StringBuilder( NormalizePath(value, false) );
- s.Append('\\');
- string h = ParseNumbers.IntToString(ApplicationName.GetLegacyNonRandomizedHashCode(),
- 16, 8, '0', ParseNumbers.PrintAsI4);
- s.Append(h);
-
- Value[(int) LoaderInformation.DynamicBaseValue] = s.ToString();
- }
- }
- }
-
- internal static String DynamicBaseKey
- {
- get {
- return ACTAG_APP_DYNAMIC_BASE;
- }
- }
-
- public bool DisallowPublisherPolicy
- {
- get
- {
- return (Value[(int) LoaderInformation.DisallowPublisherPolicyValue] != null);
- }
- set
- {
- if (value)
- Value[(int) LoaderInformation.DisallowPublisherPolicyValue]="true";
- else
- Value[(int) LoaderInformation.DisallowPublisherPolicyValue]=null;
- }
- }
-
-
- public bool DisallowBindingRedirects
- {
- get
- {
- return (Value[(int) LoaderInformation.DisallowBindingRedirectsValue] != null);
- }
- set
- {
- if (value)
- Value[(int) LoaderInformation.DisallowBindingRedirectsValue] = "true";
- else
- Value[(int) LoaderInformation.DisallowBindingRedirectsValue] = null;
- }
- }
-
- public bool DisallowCodeDownload
- {
- get
- {
- return (Value[(int) LoaderInformation.DisallowCodeDownloadValue] != null);
- }
- set
- {
- if (value)
- Value[(int) LoaderInformation.DisallowCodeDownloadValue] = "true";
- else
- Value[(int) LoaderInformation.DisallowCodeDownloadValue] = null;
- }
- }
-
-
- public bool DisallowApplicationBaseProbing
- {
- get
- {
- return (Value[(int) LoaderInformation.DisallowAppBaseProbingValue] != null);
- }
- set
- {
- if (value)
- Value[(int) LoaderInformation.DisallowAppBaseProbingValue] = "true";
- else
- Value[(int) LoaderInformation.DisallowAppBaseProbingValue] = null;
- }
- }
-
private String VerifyDir(String dir, bool normalize)
{
if (dir != null) {
return dir;
}
- private void VerifyDirList(String dirs)
- {
- if (dirs != null) {
- String[] dirArray = dirs.Split(';');
- int len = dirArray.Length;
-
- for (int i = 0; i < len; i++)
- VerifyDir(dirArray[i], true);
- }
- }
-
- internal String DeveloperPath
- {
- get {
- String dirs = Value[(int) LoaderInformation.DevPathValue];
- VerifyDirList(dirs);
- return dirs;
- }
-
- set {
- if(value == null)
- Value[(int) LoaderInformation.DevPathValue] = null;
- else {
- String[] directories = value.Split(';');
- int size = directories.Length;
- StringBuilder newPath = StringBuilderCache.Acquire();
- bool fDelimiter = false;
-
- for(int i = 0; i < size; i++) {
- if(directories[i].Length != 0) {
- if(fDelimiter)
- newPath.Append(";");
- else
- fDelimiter = true;
-
- newPath.Append(Path.GetFullPath(directories[i]));
- }
- }
-
- String newString = StringBuilderCache.GetStringAndRelease(newPath);
- if (newString.Length == 0)
- Value[(int) LoaderInformation.DevPathValue] = null;
- else
- Value[(int) LoaderInformation.DevPathValue] = newString;
- }
- }
- }
-
- internal static String DisallowPublisherPolicyKey
- {
- get
- {
- return ACTAG_DISALLOW_APPLYPUBLISHERPOLICY;
- }
- }
-
- internal static String DisallowCodeDownloadKey
- {
- get
- {
- return ACTAG_CODE_DOWNLOAD_DISABLED;
- }
- }
-
- internal static String DisallowBindingRedirectsKey
- {
- get
- {
- return ACTAG_DISALLOW_APP_BINDING_REDIRECTS;
- }
- }
-
- internal static String DeveloperPathKey
- {
- get {
- return ACTAG_DEV_PATH;
- }
- }
-
- internal static String DisallowAppBaseProbingKey
- {
- get
- {
- return ACTAG_DISALLOW_APP_BASE_PROBING;
- }
- }
-
public String ApplicationName
{
get {
}
}
- internal static String ApplicationNameKey
- {
- get {
- return ACTAG_APP_NAME;
- }
- }
-
[XmlIgnoreMember]
public AppDomainInitializer AppDomainInitializer
{
}
}
- public String PrivateBinPath
- {
- get {
- String dirs = Value[(int) LoaderInformation.PrivateBinPathValue];
- VerifyDirList(dirs);
- return dirs;
- }
-
- set {
- Value[(int) LoaderInformation.PrivateBinPathValue] = value;
- }
- }
-
- internal static String PrivateBinPathKey
- {
- get {
- return ACTAG_APP_PRIVATE_BINPATH;
- }
- }
-
- public String PrivateBinPathProbe
- {
- get {
- return Value[(int) LoaderInformation.PrivateBinPathProbeValue];
- }
-
- set {
- Value[(int) LoaderInformation.PrivateBinPathProbeValue] = value;
- }
- }
-
- internal static String PrivateBinPathProbeKey
- {
- get {
- return ACTAG_BINPATH_PROBE_ONLY;
- }
- }
-
- public String ShadowCopyDirectories
- {
- get {
- String dirs = Value[(int) LoaderInformation.ShadowCopyDirectoriesValue];
- VerifyDirList(dirs);
- return dirs;
- }
-
- set {
- Value[(int) LoaderInformation.ShadowCopyDirectoriesValue] = value;
- }
- }
-
- internal static String ShadowCopyDirectoriesKey
- {
- get {
- return ACTAG_APP_SHADOW_COPY_DIRS;
- }
- }
-
- public String ShadowCopyFiles
- {
- get {
- return Value[(int) LoaderInformation.ShadowCopyFilesValue];
- }
-
- set {
- if((value != null) &&
- (String.Compare(value, "true", StringComparison.OrdinalIgnoreCase) == 0))
- Value[(int) LoaderInformation.ShadowCopyFilesValue] = value;
- else
- Value[(int) LoaderInformation.ShadowCopyFilesValue] = null;
- }
- }
-
- internal static String ShadowCopyFilesKey
- {
- get {
- return ACTAG_FORCE_CACHE_INSTALL;
- }
- }
-
- public String CachePath
- {
- get {
- return VerifyDir(Value[(int) LoaderInformation.CachePathValue], false);
- }
-
- set {
- Value[(int) LoaderInformation.CachePathValue] = NormalizePath(value, false);
- }
- }
-
- internal static String CachePathKey
- {
- get {
- return ACTAG_APP_CACHE_BASE;
- }
- }
-
- public String LicenseFile
- {
- get {
- return VerifyDir(Value[(int) LoaderInformation.LicenseFileValue], true);
- }
-
- set {
- Value[(int) LoaderInformation.LicenseFileValue] = value;
- }
- }
-
public LoaderOptimization LoaderOptimization
{
get {
}
}
- internal static String PrivateBinPathEnvironmentVariable
- {
- get {
- return APPENV_RELATIVEPATH;
- }
- }
-
- internal static string RuntimeConfigurationFile
- {
- get {
- return MACHINE_CONFIGURATION_FILE;
- }
- }
-
- internal static string MachineConfigKey
- {
- get {
- return ACTAG_MACHINE_CONFIG;
- }
- }
-
- internal static string HostBindingKey
- {
- get {
- return ACTAG_HOST_CONFIG_FILE;
- }
- }
-
static internal int Locate(String s)
{
if(String.IsNullOrEmpty(s))