Пример #1
0
        /// <summary>
        ///   Initializes a new instance of the <see cref = "ModuleScope" /> class, allowing to specify whether the assemblies generated by this instance
        ///   should be saved and what simple names are to be assigned to them.
        /// </summary>
        /// <param name = "savePhysicalAssembly">If set to <c>true</c> saves the generated module.</param>
        /// <param name = "disableSignedModule">If set to <c>true</c> disables ability to generate signed module. This should be used in cases where ran under constrained permissions.</param>
        /// <param name = "namingScope">Naming scope used to provide unique names to generated types and their members (usually via sub-scopes).</param>
        /// <param name = "strongAssemblyName">The simple name of the strong-named assembly generated by this <see
        ///    cref = "ModuleScope" />.</param>
        /// <param name = "strongModulePath">The path and file name of the manifest module of the strong-named assembly generated by this <see
        ///    cref = "ModuleScope" />.</param>
        /// <param name = "weakAssemblyName">The simple name of the weak-named assembly generated by this <see cref = "ModuleScope" />.</param>
        /// <param name = "weakModulePath">The path and file name of the manifest module of the weak-named assembly generated by this <see
        ///    cref = "ModuleScope" />.</param>
        public ModuleScope(bool savePhysicalAssembly, bool disableSignedModule, INamingScope namingScope,
                           string strongAssemblyName, string strongModulePath,
                           string weakAssemblyName, string weakModulePath)
        {
            this.savePhysicalAssembly = savePhysicalAssembly;
            this.disableSignedModule  = disableSignedModule;
            this.namingScope          = namingScope;
            this.strongAssemblyName   = strongAssemblyName;
            this.strongModulePath     = strongModulePath;
            this.weakAssemblyName     = weakAssemblyName;
            this.weakModulePath       = weakModulePath;

            this.cacheLock = Lock.CreateFor(typeCache.Lock);
        }