Ejemplo n.º 1
0
		protected void VisitProject( ProjectComponent project, ProjectItem item )
		{
			if( item.SubProject == null )
			{
				FileComponent file = VisitFile( item );
				if( file != null )
					project.Visit( file );
			}
		}
Ejemplo n.º 2
0
		protected void WalkProjectItems( ProjectComponent project,  ProjectItems itemList )
		{
			if( itemList != null )
			{
				foreach( ProjectItem item in itemList )
				{
					VisitProject( project, item );
				
					WalkProjectItems( project, item.ProjectItems ); // Get children.
				}
			}
		}
Ejemplo n.º 3
0
		public SolutionComponent CreateModel( _DTE app )
		{
			m_app = app;

			string name = Path.GetFileNameWithoutExtension(app.Solution.FileName);
			SolutionComponent sol = new SolutionComponent( app.Solution.FullName, name );

			foreach( Project p in app.Solution )
			{
				ProjectComponent project = new ProjectComponent( p.FullName, p.Name );
				if( p.ProjectItems != null )
				{
					WalkProjectItems( project, p.ProjectItems );
					sol.Visit( project );
				}
			}
			return sol;
		}