コード例 #1
0
        /// <summary>
        /// Adds a file to the MSBuild project with metadata where appropriate
        /// </summary>
        /// <param name="file">The file to be added</param>
        /// <returns>A ProjectElement describing the newly added file</returns>
        /// <remarks>Appropriate metadata is added based on the file's extension</remarks>
        public override ProjectElement AddFileToMSBuild(string file)
        {
            SandcastleBuildAction buildAction = SandcastleProject.DefaultBuildAction(file);
            ProjectElement        newItem     = AddFileToMSBuild(file, buildAction.ToString(), null);

            // Set the default ID and alternate text if it is an Image element
            if (buildAction == SandcastleBuildAction.Image)
            {
                newItem.SetImageMetadata();
            }

            return(newItem);
        }
コード例 #2
0
        /// <summary>
        /// Adds a file to the MSBuild project with metadata where appropriate
        /// </summary>
        /// <param name="file">The file to be added</param>
        /// <returns>A ProjectElement describing the newly added file</returns>
        /// <remarks>Appropriate metadata is added based on the file's extension</remarks>
        protected internal override ProjectElement AddFileToMsBuild(string file)
        {
            SandcastleBuildAction buildAction = SandcastleProject.DefaultBuildAction(file);
            string itemPath = PackageUtilities.MakeRelative(base.FileName, file);

            ProjectElement newItem = this.CreateMsBuildFileItem(itemPath, buildAction.ToString());

            // Set the default ID and alternate text if it is an Image element
            if (buildAction == SandcastleBuildAction.Image)
            {
                newItem.SetImageMetadata();
            }

            return(newItem);
        }