• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IProject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IProject的典型用法代码示例。如果您正苦于以下问题:C# IProject类的具体用法?C# IProject怎么用?C# IProject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IProject类属于命名空间,在下文中一共展示了IProject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddProjectNode

		public TreeNode AddProjectNode(TreeNode motherNode, IProject project)
		{			
			ProjectNode projectNode = new ProjectNode(project);
			projectNode.AddTo(motherNode);

			ReferenceFolder referenceFolderNode = new ReferenceFolder(project);
			referenceFolderNode.AddTo(projectNode);

			//TagManagerNode tagManagerNode = new TagManagerNode(project);
			//tagManagerNode.AddTo(projectNode);
//			
//			TagListFileNode tagListFileNode = new TagListFileNode(TagManager.FullFileName, FileNodeStatus.InProject);
//			tagListFileNode.AddTo(projectNode);
				
//			TagGroupNode tagGroupNode = new TagGroupNode(project);
//			tagGroupNode.AddTo(projectNode);

//			AimTagGroupFolderNode aimTagGroupFolderNode = new AimTagGroupFolderNode(project);
//			aimTagGroupFolderNode.AddTo(projectNode);
//
//			SecurityNode securityNode = new SecurityNode(project);
//			securityNode.AddTo(projectNode);

			//DriverFolderNode driverFolderNode = new DriverFolderNode(project);
			//driverFolderNode.AddTo(projectNode);

			motherNode.TreeView.MouseDoubleClick += new MouseEventHandler(TreeView_MouseDoubleClick);

			return projectNode;
		}
开发者ID:garryforreg,项目名称:iview-scada,代码行数:30,代码来源:AimProjectNodeBuilder.cs


示例2: IsFileAValidModification

        public bool IsFileAValidModification(IFileInfo file, IProject baseProject, IProject sourceProject, List<string> warnings, List<FileReleaseInfo> releases)
        {
            if (FileIsDeletedItem(file))
                return false;

            if (FileIsSharedResx(file))
            {
                var baseFile = baseProject.Drive.GetFileInfo(file.Url);
                var sourceFile = sourceProject.Drive.GetFileInfo(file.Url);
                ResxDifferences changes = ResxDiffMerge.CompareResxFiles(sourceFile, baseFile);
                if (changes.None)
                    return false;
            }

            if (FileIsRelationship(file))
            {
                Guid sourceId = GetModelItemIdFromFile(file);
                if (sourceId == Guid.Empty)
                    return true;

                OrmRelationship baseRelationship = FindRelationshipInBaseById(sourceId, baseProject);
                if (baseRelationship != null)
                {
                    var sourceRelationship = sourceProject.Get<OrmRelationship>(file.Url);
                    var diffMerge = new ObjectDiffMerge();
                    var changes = diffMerge.CompareObjects(sourceRelationship, baseRelationship);
                    if (!changes.All(change => RelationshipChangeCanBeIgnored(change)))
                        warnings.Add(string.Format("{0} is an existing SalesLogix relationship that was renamed and also modified.  This file will need to be manually merged.", file.Url));

                    return false;
                }
            }

            return true;
        }
开发者ID:Saleslogix,项目名称:ProjectUpgrade,代码行数:35,代码来源:OrmModelUpgradeService.cs


示例3: Reparse

		public static void Reparse(IProject project, bool initReferences, bool parseCode)
		{
			if (jobs == null)
				return; // do nothing if service wasn't initialized (e.g. some unit tests)
			ParseProjectContent pc = ParserService.GetProjectContent(project) as ParseProjectContent;
			if (pc != null) {
				if (initReferences) {
					lock (reParse1) {
						if (!reParse1.Contains(pc)) {
							LoggingService.Debug("Enqueue for reinitializing references: " + project);
							reParse1.Add(pc);
							jobs.AddJob(new JobTask(pm => ReInitializeReferences(pc, pm),
							                        GetLoadReferenceTaskTitle(project.Name),
							                        10
							                       ));
						}
					}
				}
				if (parseCode) {
					lock (reParse2) {
						if (!reParse2.Contains(pc)) {
							LoggingService.Debug("Enqueue for reparsing code: " + project);
							reParse2.Add(pc);
							jobs.AddJob(new JobTask(pm => ReparseCode(pc, pm),
							                        GetParseTaskTitle(project.Name),
							                        pc.GetInitializationWorkAmount()
							                       ));
						}
					}
				}
				jobs.StartRunningIfRequired();
			}
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:33,代码来源:LoadSolutionProjects.cs


示例4: GetOrCreateContextSpecification

    public static ContextSpecificationElement GetOrCreateContextSpecification(MSpecUnitTestProvider provider,
                                                                              IUnitTestElementManager manager,
                                                                              PsiModuleManager psiModuleManager,
                                                                              CacheManager cacheManager,
                                                                              IProject project,
                                                                              ContextElement context,
                                                                              ProjectModelElementEnvoy projectEnvoy,
                                                                              IClrTypeName declaringTypeName,
                                                                              string fieldName,
                                                                              bool isIgnored)
    {
      var id = ContextSpecificationElement.CreateId(context, fieldName);
      var contextSpecification = manager.GetElementById(project, id) as ContextSpecificationElement;
      if (contextSpecification != null)
      {
        contextSpecification.Parent = context;
        contextSpecification.State = UnitTestElementState.Valid;
        return contextSpecification;
      }

      return new ContextSpecificationElement(provider,
                                             psiModuleManager,
                                             cacheManager,
                                             context,
                                             projectEnvoy,
                                             declaringTypeName,
                                             fieldName,
                                             isIgnored);
    }
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:29,代码来源:ContextSpecificationFactory.cs


示例5: TextTemplatingAssemblyPathResolver

		public TextTemplatingAssemblyPathResolver(IProject project)
			: this(
				project,
				new TextTemplatingAssemblyParserService(),
				new TextTemplatingPathResolver())
		{
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:7,代码来源:TextTemplatingAssemblyPathResolver.cs


示例6: Parse

		public ParseInformation Parse(FileName fileName, ITextSource fileContent, bool fullParseInformationRequested,
		                              IProject parentProject, CancellationToken cancellationToken)
		{
			var csharpProject = parentProject as CSharpProject;
			
			CSharpParser parser = new CSharpParser(csharpProject != null ? csharpProject.CompilerSettings : null);
			parser.GenerateTypeSystemMode = !fullParseInformationRequested;
			
			SyntaxTree cu = parser.Parse(fileContent, fileName);
			cu.Freeze();
			
			CSharpUnresolvedFile file = cu.ToTypeSystem();
			ParseInformation parseInfo;
			
			if (fullParseInformationRequested)
				parseInfo = new CSharpFullParseInformation(file, fileContent.Version, cu);
			else
				parseInfo = new ParseInformation(file, fileContent.Version, fullParseInformationRequested);
			
			IDocument document = fileContent as IDocument;
			AddCommentTags(cu, parseInfo.TagComments, fileContent, parseInfo.FileName, ref document);
			if (fullParseInformationRequested) {
				if (document == null)
					document = new ReadOnlyDocument(fileContent, parseInfo.FileName);
				((CSharpFullParseInformation)parseInfo).newFoldings = CreateNewFoldings(cu, document);
			}
			
			return parseInfo;
		}
开发者ID:asiazhang,项目名称:SharpDevelop,代码行数:29,代码来源:Parser.cs


示例7: AddProject

        public IProject AddProject(IProject project)
        {
            _projects.Add(project);
               project.ProjectId = _projects.Count();

               return project;
        }
开发者ID:solutiatonyspears,项目名称:TrainingProjectReference,代码行数:7,代码来源:MockProjectRepository.cs


示例8: GetOrCreateContext

        public ContextElement GetOrCreateContext(string assemblyPath,
                                                 IProject project,
                                                 IClrTypeName typeName,
                                                 string subject,
                                                 ICollection<string> tags,
                                                 bool isIgnored)
        {
            var id = ContextElement.CreateId(_elementIdFactory, _provider, project, subject, typeName.FullName, tags);
            var contextElement = this._manager.GetElementById(id) as ContextElement;
            if (contextElement != null)
            {
                contextElement.State = UnitTestElementState.Valid;
                contextElement.AssemblyLocation = assemblyPath;
                return contextElement;
            }

            return new ContextElement(this._provider,
                                      this._psiModuleManager,
                                      this._cacheManager,
                                      id,
                                      new ProjectModelElementEnvoy(project),
                                      typeName,
                                      assemblyPath,
                                      subject,
                                      tags,
                                      isIgnored,
                                      _categoryFactory);
        }
开发者ID:pjobs,项目名称:machine.specifications.runner.resharper,代码行数:28,代码来源:ContextFactory.cs


示例9: CreateTypeScriptContextIfProjectHasTypeScriptFiles

		void CreateTypeScriptContextIfProjectHasTypeScriptFiles(IProject project)
		{
			var typeScriptProject = new TypeScriptProject(project);
			if (typeScriptProject.HasTypeScriptFiles()) {
				contextProvider.CreateProjectContext(typeScriptProject);
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:TypeScriptProjectMonitor.cs


示例10: ProjectContentContainer

		public ProjectContentContainer(MSBuildBasedProject project, IProjectContent initialProjectContent)
		{
			if (project == null)
				throw new ArgumentNullException("project");
			this.project = project;
			this.projectContent = initialProjectContent.SetAssemblyName(project.AssemblyName).SetLocation(project.OutputAssemblyFullPath);
			this.assemblyModel = (IUpdateableAssemblyModel)project.AssemblyModel;
			this.assemblyModel.AssemblyName = this.projectContent.AssemblyName;
			this.assemblyModel.FullAssemblyName = this.projectContent.FullAssemblyName;
			this.cacheFileName = GetCacheFileName(project.FileName);
			
			SD.ProjectService.ProjectItemAdded += OnProjectItemAdded;
			SD.ProjectService.ProjectItemRemoved += OnProjectItemRemoved;
			SD.AssemblyParserService.AssemblyRefreshed += OnAssemblyRefreshed;
			
			List<FileName> filesToParse = new List<FileName>();
			foreach (var file in project.Items.OfType<FileProjectItem>()) {
				if (IsParseableFile(file)) {
					var fileName = file.FileName;
					parserService.AddOwnerProject(fileName, project, startAsyncParse: false, isLinkedFile: file.IsLink);
					filesToParse.Add(fileName);
				}
			}
			
			SD.ParserService.LoadSolutionProjectsThread.AddJob(
				monitor => Initialize(monitor, filesToParse),
				"Loading " + project.Name + "...", filesToParse.Count + LoadingReferencesWorkAmount);
		}
开发者ID:jrenzas,项目名称:SharpDevelop,代码行数:28,代码来源:ProjectContentContainer.cs


示例11: CreateTestProjectWithTestClassAndSingleTestMethod

		public static TestProject CreateTestProjectWithTestClassAndSingleTestMethod(IProject project, 
			string className, 
			string methodName)
		{
			string[] methodNames = new string[] { methodName };
			return CreateTestProjectWithTestClassTestMethods(project, className, methodNames);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:TestProjectHelper.cs


示例12: CreatePackageManager

		void CreatePackageManager(IProject project, PackageReferenceRepositoryHelper packageRefRepositoryHelper)
		{
			options = new TestablePackageManagementOptions();
			options.PackagesDirectory = "packages";
			
			repositoryPaths = new SolutionPackageRepositoryPath(project, options);
			var pathResolver = new DefaultPackagePathResolver(repositoryPaths.PackageRepositoryPath);
			
			fakeFileSystem = new FakeFileSystem();
			
			fakeFeedSourceRepository = new FakePackageRepository();
			fakeSolutionSharedRepository = packageRefRepositoryHelper.FakeSharedSourceRepository;
			
			fakePackageOperationResolverFactory = new FakePackageOperationResolverFactory();
			
			var fakeSolutionPackageRepository = new FakeSolutionPackageRepository();
			fakeSolutionPackageRepository.FileSystem = fakeFileSystem;
			fakeSolutionPackageRepository.PackagePathResolver = pathResolver;
			fakeSolutionPackageRepository.FakeSharedRepository = fakeSolutionSharedRepository;
			
			packageManager = new SharpDevelopPackageManager(fakeFeedSourceRepository,
				packageRefRepositoryHelper.FakeProjectSystem,
				fakeSolutionPackageRepository,
				fakePackageOperationResolverFactory);
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:25,代码来源:SharpDevelopPackageManagerTests.cs


示例13: Folder

 public Folder(IProject project, string name)
 {
     this._project = project;
     this._name = name;
     this._items = new List<IItem>();
     this._folders = new List<IFolder>();
 }
开发者ID:JadeHub,项目名称:Jade,代码行数:7,代码来源:Folder.cs


示例14: BehaviorSpecificationFactory

    public BehaviorSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy)
    {
#endif
      _provider = provider;
      _project = project;
      _projectEnvoy = projectEnvoy;
    }
开发者ID:hereyes,项目名称:machine.specifications,代码行数:7,代码来源:BehaviorSpecificationFactory.cs


示例15: Accepts

        public override bool Accepts(IProject project)
        {
            if (!project.IsProjectReferencingNancyRazorViewEngine())
                return false;

            return Language == ProjectLanguage.UNKNOWN || Language == project.ProjectProperties.DefaultLanguage;
        }
开发者ID:jimmason,项目名称:Nancy.ReSharper,代码行数:7,代码来源:NancyRazorCSharpFileTemplatesSupport.cs


示例16: GetOrCreateContext

    public ContextElement GetOrCreateContext(string assemblyPath,
                                             IProject project,
                                             IClrTypeName typeName,
                                             string subject,
                                             ICollection<string> tags,
                                             bool isIgnored)
    {
      var id = ContextElement.CreateId(subject, typeName.FullName, tags);
      var contextElement = _manager.GetElementById(project, id) as ContextElement;
      if (contextElement != null)
      {
        contextElement.State = UnitTestElementState.Valid;
        return contextElement;
      }

      return new ContextElement(_provider,
                                _psiModuleManager,
                                _cacheManager,
                                new ProjectModelElementEnvoy(project),
                                typeName,
                                assemblyPath,
                                subject,
                                tags,
                                isIgnored);
    }
开发者ID:hennys,项目名称:machine.specifications,代码行数:25,代码来源:ContextFactory.cs


示例17: CustomToolContext

		public CustomToolContext(IProject project, IProgressMonitor progressMonitor)
		{
			if (project == null)
				throw new ArgumentNullException("project");
			this.project = project;
			this.ProgressMonitor = progressMonitor;
		}
开发者ID:siegfriedpammer,项目名称:SharpDevelop,代码行数:7,代码来源:CustomTool.cs


示例18: ExploreAssembly

 public void ExploreAssembly(IProject project,
                             IMetadataAssembly assembly,
                             UnitTestElementConsumer consumer,
                             ManualResetEvent exitEvent)
 {
   ExploreAssembly(project, assembly, consumer);
 }
开发者ID:agross,项目名称:machine.specifications,代码行数:7,代码来源:MSpecTestMetadataExplorer.8.0.cs


示例19: GetLaunchedDate

        private DateTime? GetLaunchedDate(IProject project)
        {
            var submittedDate = GetSubmittedDate(project.SubmittedDate);
            var developmentTime = GetDevelopmentTime(project.DevelopmentTime);

            return GetLaunchedDate(submittedDate, developmentTime);
        }
开发者ID:JaGTM,项目名称:QuirkyScraper,代码行数:7,代码来源:CommonCollaboratorProcessor.cs


示例20: ProjectsReturnsSingleItemContainingProjectPassedToConstructor

		public void ProjectsReturnsSingleItemContainingProjectPassedToConstructor()
		{
			List<IProject> projects = new List<IProject>(selectedTests.Projects);
			IProject[] expectedProjects = new IProject[] { project };
			
			Assert.AreEqual(expectedProjects, projects);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:SelectedTestsTestFixture.cs



注:本文中的IProject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IProjectContent类代码示例发布时间:2022-05-24
下一篇:
C# IProgressStatus类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap