public DirectoryProjectItem(
			Project project,
			string relativePath)
            : this(project, CreateFileProjectItem(project, relativePath))
        {
            this.relativePath = relativePath;
        }
Esempio n. 2
0
		public ProjectItem(Project project, FileProjectItem projectItem)
		{
			this.projectItem = projectItem;
			this.ContainingProject = project;
			this.ProjectItems = new DirectoryProjectItems(this);
			CreateProperties();
		}
Esempio n. 3
0
 public ProjectItem(Project project, FileProjectItem projectItem)
 {
     this.projectItem = projectItem;
     this.containingProject = project;
     this.ProjectItems = CreateProjectItems(projectItem);
     CreateProperties();
     Kind = GetKindFromFileProjectItemType();
 }
Esempio n. 4
0
        public FileCodeModel2(CodeModelContext context, Project project)
        {
            if (context == null || context.FilteredFileName == null) {
                throw new ArgumentException("context must be restricted to a file");
            }

            this.context = context;
            this.project = project;
        }
Esempio n. 5
0
		public FileCodeModel2(
			Project project,
			FileProjectItem projectItem,
			IDocumentNamespaceCreator namespaceCreator)
		{
			this.project = project;
			this.projectItem = projectItem;
			this.namespaceCreator = namespaceCreator;
		}
Esempio n. 6
0
		string GetProjectType(Project project)
		{
			string extension = project.GetLowercaseFileExtension();
			if (extension == ".csproj") {
				return CSharp;
			} else if (extension == ".vbproj") {
				return VBNet;
			}
			return String.Empty;
		}
Esempio n. 7
0
 string GetProjectKind(Project project)
 {
     string type = ProjectType.GetProjectType(project);
     if (type == ProjectType.CSharp) {
         return GetProjectKind(SD.ProjectTypeGuids.CSharp);
     } else if (type == ProjectType.VB) {
         return GetProjectKind(SD.ProjectTypeGuids.VB);
     }
     return String.Empty;
 }
Esempio n. 8
0
		string GetProjectKind(Project project)
		{
			string type = new ProjectType(project).Type;
			if (type == ProjectType.CSharp) {
				return SD.ProjectTypeGuids.CSharp;
			} else if (type == ProjectType.VBNet) {
				return SD.ProjectTypeGuids.VBNet;
			}
			return String.Empty;
		}
Esempio n. 9
0
		void CreateProject()
		{
			msbuildProject = ProjectHelper.CreateTestProject();
			helper = new ProjectContentHelper();
			
			fakeProjectService = MockRepository.GenerateStub<IPackageManagementProjectService>();
			fakeProjectService.Stub(service => service.GetProjectContent(msbuildProject)).Return(helper.ProjectContent);
			
			fakeFileService = MockRepository.GenerateStub<IPackageManagementFileService>();
			project = new Project(msbuildProject, fakeProjectService, fakeFileService);
		}
Esempio n. 10
0
		void CreateProject(string fileName = @"d:\projects\MyProject\MyProject.csproj", string language = "C#")
		{
			msbuildProject = ProjectHelper.CreateTestProject();
			msbuildProject.FileName = new FileName(fileName);
			//helper = new ProjectContentHelper();
			
			fakeProjectService = MockRepository.GenerateStub<IPackageManagementProjectService>();
			//fakeProjectService.Stub(service => service.GetProjectContent(msbuildProject)).Return(helper.ProjectContent);
			
			fakeFileService = MockRepository.GenerateStub<IPackageManagementFileService>();
			project = new Project(msbuildProject, fakeProjectService, fakeFileService);
		}
Esempio n. 11
0
		void CreateProject(string fileName = @"d:\projects\MyProject\MyProject.csproj", string language = "C#")
		{
			msbuildProject = ProjectHelper.CreateTestProject();
			msbuildProject.FileName = new FileName(fileName);
			
			projectService = MockRepository.GenerateStub<IPackageManagementProjectService>();
			
			fileService = MockRepository.GenerateStub<IPackageManagementFileService>();
			dteProject = new Project(msbuildProject, projectService, fileService);
			
			msbuildProject.SetAssemblyModel(assemblyModel);
			
			fileService
				.Stub(fs => fs.GetCompilationUnit(msbuildProject))
				.WhenCalled(compilation => compilation.ReturnValue = projectContent.CreateCompilation());
		}
Esempio n. 12
0
		protected void CreateCodeModel()
		{
			msbuildProject = ProjectHelper.CreateTestProject();
			
			projectService = MockRepository.GenerateStub<IPackageManagementProjectService>();
			fileService = MockRepository.GenerateStub<IPackageManagementFileService>();
			dteProject = new Project(msbuildProject, projectService, fileService);
			codeModelContext.DteProject = dteProject;
			
			codeModel = new CodeModel(codeModelContext, dteProject);
			
			msbuildProject.SetAssemblyModel(assemblyModel);
			project.Stub(p => p.AssemblyModel).Return(assemblyModel);
			
			fileService
				.Stub(fs => fs.GetCompilationUnit(msbuildProject))
				.WhenCalled(compilation => compilation.ReturnValue = CreateCompilation());
		}
 static FileProjectItem CreateFileProjectItem(Project project, string relativePath)
 {
     return new FileProjectItem(project.MSBuildProject, ItemType.Folder, relativePath);
 }
 public static DirectoryProjectItem CreateDirectoryProjectItemFromFullPath(Project project, string directory)
 {
     string relativePath = project.GetRelativePath(directory);
     return new DirectoryProjectItem(project, relativePath);
 }
 public DirectoryProjectItem(Project project, FileProjectItem projectItem)
     : base(project, projectItem)
 {
 }
Esempio n. 16
0
 public FileCodeModel2(Project project, FileProjectItem projectItem)
     : this(project, projectItem, new DocumentNamespaceCreator())
 {
 }
Esempio n. 17
0
		public ProjectObject(Project project)
		{
			this.Project = project;
			References = new References(project);
		}
Esempio n. 18
0
 public static string GetProjectType(Project project)
 {
     return GetProjectType(project.MSBuildProject);
 }
Esempio n. 19
0
		public FileCodeModel2(Project project, FileProjectItem projectItem)
			: this(project, projectItem, new DocumentNamespaceCreator())
		{
		}
Esempio n. 20
0
		public Reference(Project project, ReferenceProjectItem referenceProjectItem)
		{
			this.project = project;
			this.referenceProjectItem = referenceProjectItem;
		}
Esempio n. 21
0
		void CreateReference(Project project, ReferenceProjectItem referenceProjectItem)
		{
			reference = new Reference3(project, referenceProjectItem);
		}
Esempio n. 22
0
		bool ProjectUniqueNameMatches(IProject msbuildProject, string uniqueName)
		{
			var project = new Project(msbuildProject as MSBuildBasedProject);
			return IsCaseInsensitiveMatch(project.UniqueName, uniqueName);
		}
Esempio n. 23
0
		public References(Project project)
		{
			this.project = project;
		}
Esempio n. 24
0
		public Configuration(Project project)
		{
			this.project = project;
		}
 public ProjectPropertyFactory(Project project)
 {
     this.project = project;
 }
Esempio n. 26
0
 public ProjectKind(Project project)
 {
     this.Kind = GetProjectKind(project);
 }
Esempio n. 27
0
		public Reference3(Project project, ReferenceProjectItem referenceProjectItem)
			: base(project, referenceProjectItem)
		{
		}
Esempio n. 28
0
 public CodeModel(CodeModelContext context, Project project)
 {
     this.context = context;
     this.project = project;
 }
Esempio n. 29
0
		public ProjectType(Project project)
		{
			this.project = project;
			Type = String.Empty;
			GetProjectType();
		}
 public ConfigurationManager(Project project)
 {
     activeConfiguration = new Configuration(project);
 }
 public ProjectItemsInsideProject(Project project, IPackageManagementFileService fileService)
 {
     this.project = project;
     this.fileService = fileService;
 }