/// <summary>
 /// 
 /// </summary>
 public NodeProject GetCurrentProject()
 {
     var p = manager.GetCurrentProject();
     NodeProject result = new NodeProject(p);
     return result;
     //var sln = ProjectHelper.GetContext().Solution();
     //NodeProject prj = sln.GetProjects(c => c.Name == p.Name).FirstOrDefault();
     //return prj;
 }
 /// <summary>
 /// 
 /// </summary>
 public ScriptFileScope NewFile(string filename, NodeProject project)
 {
     return new ScriptFileScope(manager, filename, project);
 }
Пример #3
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;
 }
        /// <summary>
        /// Gets the available types defined in the code of the solution.
        /// </summary>
        /// <param name="dteProject">The DTE project.</param>
        /// <returns></returns>
        public static IEnumerable<BaseInfo> GetAvailableCodeTypes(this Project dteProject)
        {

            NodeProject node = new NodeProject(dteProject);

            List<NodeItem> files = node.GetItem<NodeItem>().ToList();

            foreach (NodeItem file in files)
                foreach (BaseInfo item in file.GetClassItems())
                    yield return item;

        }
 internal ScriptFileScope(object manager, string name, NodeProject project)
 {
     string _name = AppliPatternToFilname(name);
     this.manager = manager as Manager;
     block = this.manager.StartNewFile(_name, project);
 }