当前位置: 首页>>代码示例>>C#>>正文


C# IProject类代码示例

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


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


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