コード例 #1
0
        public DirectoryProjectItem(
			Project project,
			string relativePath)
            : this(project, CreateFileProjectItem(project, relativePath))
        {
            this.relativePath = relativePath;
        }
コード例 #2
0
ファイル: ProjectItem.cs プロジェクト: hpsa/SharpDevelop
		public ProjectItem(Project project, FileProjectItem projectItem)
		{
			this.projectItem = projectItem;
			this.ContainingProject = project;
			this.ProjectItems = new DirectoryProjectItems(this);
			CreateProperties();
		}
コード例 #3
0
 public ProjectItem(Project project, FileProjectItem projectItem)
 {
     this.projectItem = projectItem;
     this.containingProject = project;
     this.ProjectItems = CreateProjectItems(projectItem);
     CreateProperties();
     Kind = GetKindFromFileProjectItemType();
 }
コード例 #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;
        }
コード例 #5
0
		public FileCodeModel2(
			Project project,
			FileProjectItem projectItem,
			IDocumentNamespaceCreator namespaceCreator)
		{
			this.project = project;
			this.projectItem = projectItem;
			this.namespaceCreator = namespaceCreator;
		}
コード例 #6
0
		string GetProjectType(Project project)
		{
			string extension = project.GetLowercaseFileExtension();
			if (extension == ".csproj") {
				return CSharp;
			} else if (extension == ".vbproj") {
				return VBNet;
			}
			return String.Empty;
		}
コード例 #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;
 }
コード例 #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;
		}
コード例 #9
0
ファイル: ProjectTests.cs プロジェクト: Netring/SharpDevelop
		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);
		}
コード例 #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);
		}
コード例 #11
0
ファイル: ProjectTests.cs プロジェクト: Rew/SharpDevelop
		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());
		}
コード例 #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());
		}
コード例 #13
0
 static FileProjectItem CreateFileProjectItem(Project project, string relativePath)
 {
     return new FileProjectItem(project.MSBuildProject, ItemType.Folder, relativePath);
 }
コード例 #14
0
 public static DirectoryProjectItem CreateDirectoryProjectItemFromFullPath(Project project, string directory)
 {
     string relativePath = project.GetRelativePath(directory);
     return new DirectoryProjectItem(project, relativePath);
 }
コード例 #15
0
 public DirectoryProjectItem(Project project, FileProjectItem projectItem)
     : base(project, projectItem)
 {
 }
コード例 #16
0
 public FileCodeModel2(Project project, FileProjectItem projectItem)
     : this(project, projectItem, new DocumentNamespaceCreator())
 {
 }
コード例 #17
0
ファイル: ProjectObject.cs プロジェクト: nylen/SharpDevelop
		public ProjectObject(Project project)
		{
			this.Project = project;
			References = new References(project);
		}
コード例 #18
0
 public static string GetProjectType(Project project)
 {
     return GetProjectType(project.MSBuildProject);
 }
コード例 #19
0
		public FileCodeModel2(Project project, FileProjectItem projectItem)
			: this(project, projectItem, new DocumentNamespaceCreator())
		{
		}
コード例 #20
0
ファイル: Reference.cs プロジェクト: rbrunhuber/SharpDevelop
		public Reference(Project project, ReferenceProjectItem referenceProjectItem)
		{
			this.project = project;
			this.referenceProjectItem = referenceProjectItem;
		}
コード例 #21
0
		void CreateReference(Project project, ReferenceProjectItem referenceProjectItem)
		{
			reference = new Reference3(project, referenceProjectItem);
		}
コード例 #22
0
ファイル: VsSolution.cs プロジェクト: Paccc/SharpDevelop
		bool ProjectUniqueNameMatches(IProject msbuildProject, string uniqueName)
		{
			var project = new Project(msbuildProject as MSBuildBasedProject);
			return IsCaseInsensitiveMatch(project.UniqueName, uniqueName);
		}
コード例 #23
0
ファイル: References.cs プロジェクト: Paccc/SharpDevelop
		public References(Project project)
		{
			this.project = project;
		}
コード例 #24
0
ファイル: Configuration.cs プロジェクト: Netring/SharpDevelop
		public Configuration(Project project)
		{
			this.project = project;
		}
コード例 #25
0
 public ProjectPropertyFactory(Project project)
 {
     this.project = project;
 }
コード例 #26
0
 public ProjectKind(Project project)
 {
     this.Kind = GetProjectKind(project);
 }
コード例 #27
0
ファイル: Reference3.cs プロジェクト: rbrunhuber/SharpDevelop
		public Reference3(Project project, ReferenceProjectItem referenceProjectItem)
			: base(project, referenceProjectItem)
		{
		}
コード例 #28
0
ファイル: CodeModel.cs プロジェクト: ichengzi/SharpDevelop
 public CodeModel(CodeModelContext context, Project project)
 {
     this.context = context;
     this.project = project;
 }
コード例 #29
0
ファイル: ProjectType.cs プロジェクト: hpsa/SharpDevelop
		public ProjectType(Project project)
		{
			this.project = project;
			Type = String.Empty;
			GetProjectType();
		}
コード例 #30
0
 public ConfigurationManager(Project project)
 {
     activeConfiguration = new Configuration(project);
 }
コード例 #31
0
 public ProjectItemsInsideProject(Project project, IPackageManagementFileService fileService)
 {
     this.project = project;
     this.fileService = fileService;
 }