VsTeXProject.TeXProjectNode.AddFileFromTemplate C# (CSharp) Méthode

AddFileFromTemplate() public méthode

Adds the file from template.
public AddFileFromTemplate ( string source, string target ) : void
source string The source template.
target string The target file.
Résultat void
        public override void AddFileFromTemplate(string source, string target)
        {
            if(!File.Exists(source))
            {
                throw new FileNotFoundException(string.Format("Template file not found: {0}", source));
            }

            // The class name is based on the new file name
            string className = Path.GetFileNameWithoutExtension(target);
            this.FileTemplateProcessor.GetFileNamespace(target, this);

            try
            {
                this.FileTemplateProcessor.UntokenFile(source, target);
                this.FileTemplateProcessor.Reset();
            }
            catch(Exception e)
            {
                throw new FileLoadException("Failed to add template file to project", target, e);
            }
        }
        #endregion