public DirectoryProjectItem( Project project, string relativePath) : this(project, CreateFileProjectItem(project, relativePath)) { this.relativePath = relativePath; }
public ProjectItem(Project project, FileProjectItem projectItem) { this.projectItem = projectItem; this.ContainingProject = project; this.ProjectItems = new DirectoryProjectItems(this); CreateProperties(); }
public ProjectItem(Project project, FileProjectItem projectItem) { this.projectItem = projectItem; this.containingProject = project; this.ProjectItems = CreateProjectItems(projectItem); CreateProperties(); Kind = GetKindFromFileProjectItemType(); }
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; }
public FileCodeModel2( Project project, FileProjectItem projectItem, IDocumentNamespaceCreator namespaceCreator) { this.project = project; this.projectItem = projectItem; this.namespaceCreator = namespaceCreator; }
string GetProjectType(Project project) { string extension = project.GetLowercaseFileExtension(); if (extension == ".csproj") { return CSharp; } else if (extension == ".vbproj") { return VBNet; } return String.Empty; }
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; }
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; }
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); }
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); }
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()); }
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) { }
public FileCodeModel2(Project project, FileProjectItem projectItem) : this(project, projectItem, new DocumentNamespaceCreator()) { }
public ProjectObject(Project project) { this.Project = project; References = new References(project); }
public static string GetProjectType(Project project) { return GetProjectType(project.MSBuildProject); }
public Reference(Project project, ReferenceProjectItem referenceProjectItem) { this.project = project; this.referenceProjectItem = referenceProjectItem; }
void CreateReference(Project project, ReferenceProjectItem referenceProjectItem) { reference = new Reference3(project, referenceProjectItem); }
bool ProjectUniqueNameMatches(IProject msbuildProject, string uniqueName) { var project = new Project(msbuildProject as MSBuildBasedProject); return IsCaseInsensitiveMatch(project.UniqueName, uniqueName); }
public References(Project project) { this.project = project; }
public Configuration(Project project) { this.project = project; }
public ProjectPropertyFactory(Project project) { this.project = project; }
public ProjectKind(Project project) { this.Kind = GetProjectKind(project); }
public Reference3(Project project, ReferenceProjectItem referenceProjectItem) : base(project, referenceProjectItem) { }
public CodeModel(CodeModelContext context, Project project) { this.context = context; this.project = project; }
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; }