示例#1
0
        // ATTENTION: Do not add a reference to the Powershell Module object. Otherwise it cannot be serialized on all platforms by the Powershell.

        /// <summary>
        /// Initializes a new instance of the EnvironmentModuleInfoBase class with the given parameters.
        /// </summary>
        /// <param name="fullName">The full name of the module.</param>
        /// <param name="moduleBase">The directory holding the module files (like .psm1, pse1, etc.).</param>
        /// <param name="name">The short name of the module.</param>
        /// <param name="version">The version of the module.</param>
        /// <param name="architecture">The architecture of the module.</param>
        /// <param name="additionalOptions">Additional options specifying the module.</param>
        /// <param name="moduleType">The type of the module.</param>
        public EnvironmentModuleInfoBase(
            string fullName,
            string moduleBase,
            string name,
            string version,
            string architecture,
            string additionalOptions,
            EnvironmentModuleType moduleType)
        {
            FullName          = fullName;
            ModuleBase        = moduleBase;
            ModuleType        = moduleType;
            Name              = name;
            Version           = version;
            Architecture      = architecture;
            AdditionalOptions = additionalOptions;
        }
        /// <summary>
        /// Initializes a new instance of the EnvironmentModuleInfo class with the given parameters.
        /// </summary>
        /// <param name="moduleBase">The directory holding the module files (like .psm1, pse1, etc.).</param>
        /// <param name="moduleRoot">The root module that was identified holding the required items.</param>
        /// <param name="tmpDirectory">The tmp. directory that can be used to store session related files etc..</param>
        /// <param name="fullName">The full name of the module.</param>
        /// <param name="name">The short name of the module.</param>
        /// <param name="version">The version of the module.</param>
        /// <param name="architecture">The architecture of the module.</param>
        /// <param name="additionalOptions">Additional options specifying the module.</param>
        /// <param name="moduleType">The type of the module.</param>
        public EnvironmentModuleInfo(
            string moduleBase,
            string moduleRoot,
            string tmpDirectory,
            string fullName,
            string name,
            string version,
            string architecture,
            string additionalOptions,
            EnvironmentModuleType moduleType = EnvironmentModuleType.Default) : base(fullName, moduleBase, name, version, architecture, additionalOptions, moduleType)
        {
            ModuleRoot   = moduleRoot;
            TmpDirectory = tmpDirectory;

            Dependencies  = new DependencyInfo[0];
            SearchPaths   = new SearchPath[0];
            RequiredItems = new RequiredItem[0];

            DirectUnload = false;
            StyleVersion = 1.0;
            Category     = string.Empty;
            Parameters   = new Dictionary <string, string>();
        }