Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 public void EndBlock()
 {
     if (CurrentBlock == null)
         return;
     CurrentBlock.Length = template.Length - CurrentBlock.Start;
     if (CurrentBlock != header && CurrentBlock != footer)
         files.Add(CurrentBlock);
     currentBlock = null;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 public Block StartNewFile(String name, NodeProject project)
 {
     if (name == null)
         throw new ArgumentNullException("name");
     CurrentBlock = new Block { Name = name, OutputPath = Path.GetDirectoryName(project.FullPath), ParentProjectItem = templateProjectItem, ParentProject = project.Project };
     return CurrentBlock;
 }
Exemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        public Block StartNewFile(String name, NodeItemFolder folder)
        {
            if (folder == null)
                throw new ArgumentNullException("folder");

            if (name == null)
                throw new ArgumentNullException("name");

            if (folder is NodeItemFolder)
            {
                EnvDTE.ProjectItem ProjectItem = folder.ProjectItem;
            }

            CurrentBlock = new Block { Name = name, OutputPath = folder.LocalPath, ParentProjectItem = folder.ProjectItem, ParentProject = null };
            return CurrentBlock;
        }
Exemplo n.º 4
0
 /// <summary>
 /// 
 /// </summary>
 public Block StartNewFile(String name)
 {
     if (name == null)
         throw new ArgumentNullException("name");
     CurrentBlock = new Block { Name = name, OutputPath = Path.GetDirectoryName(host.TemplateFile), ParentProjectItem = templateProjectItem, ParentProject = null };
     return CurrentBlock;
 }
Exemplo n.º 5
0
 /// <summary>
 /// 
 /// </summary>
 public void StartHeader()
 {
     CurrentBlock = header;
 }
Exemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 public void StartFooter()
 {
     CurrentBlock = footer;
 }
 internal ScriptFileScope(object manager, string name, NodeProject project)
 {
     string _name = AppliPatternToFilname(name);
     this.manager = manager as Manager;
     block = this.manager.StartNewFile(_name, project);
 }
 internal ScriptFileScope(object manager, string name, NodeItemFolder folder)
 {
     string _name = AppliPatternToFilname(name);
     this.manager = manager as Manager;
     block = this.manager.StartNewFile(_name, folder);
 }