예제 #1
0
        /// <summary>
        /// This constructor takes metadata values that could have been passed in by the calling cmdlet
        /// and uses those to create associated script class properties (PSScriptMetadata, PSScriptHelp, PSScriptRequires, PSScriptContents)
        /// </summary>
        public PSScriptFileInfo(
            string version,
            Guid guid,
            string author,
            string companyName,
            string copyright,
            string[] tags,
            Uri licenseUri,
            Uri projectUri,
            Uri iconUri,
            ModuleSpecification[] requiredModules,
            string[] externalModuleDependencies,
            string[] requiredScripts,
            string[] externalScriptDependencies,
            string releaseNotes,
            string privateData,
            string description)
        {
            PSScriptMetadata scriptMetadataComment = new PSScriptMetadata(
                version,
                guid,
                author,
                companyName,
                copyright,
                tags,
                licenseUri,
                projectUri,
                iconUri,
                externalModuleDependencies,
                requiredScripts,
                externalScriptDependencies,
                releaseNotes,
                privateData);

            PSScriptHelp     scriptHelpComment      = new PSScriptHelp(description);
            PSScriptRequires scriptRequiresComment  = new PSScriptRequires(requiredModules);
            PSScriptContents scriptRemainingContent = new PSScriptContents(Utils.EmptyStrArray);

            ScriptMetadataComment = scriptMetadataComment;
            ScriptHelpComment     = scriptHelpComment;
            ScriptRequiresComment = scriptRequiresComment;
            ScriptContent         = scriptRemainingContent;
        }