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


C# ProjectDocument.AddReference方法代码示例

本文整理汇总了C#中AutoTest.Core.Caching.Projects.ProjectDocument.AddReference方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectDocument.AddReference方法的具体用法?C# ProjectDocument.AddReference怎么用?C# ProjectDocument.AddReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AutoTest.Core.Caching.Projects.ProjectDocument的用法示例。


在下文中一共展示了ProjectDocument.AddReference方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public void SetUp()
 {
     var document = new ProjectDocument(ProjectType.CSharp);
     document.AddReference("ReferencedProject");
     var parser = new FakeProjectParser(new ProjectDocument[] {document});
     _cache = new FakeCache();
     _preparer = new ProjectPreparer(parser, _cache);
 }
开发者ID:nieve,项目名称:AutoTest.Net,代码行数:8,代码来源:ProjectPreparerTest.cs

示例2: SetUp

 public void SetUp()
 {
     var document = new ProjectDocument(ProjectType.CSharp);
     document.AddReference("ReferencedProject");
     var parser = new FakeProjectParser(new ProjectDocument[] {document});
     _cache = new FakeCache();
     _preparer = new ProjectPreparer(parser, _cache);
     _testProject = Path.GetFullPath(string.Format("TestResources{0}VS2008{0}CSharpNUnitTestProject.csproj", Path.DirectorySeparatorChar));
 }
开发者ID:tonyx,项目名称:AutoTest.Net,代码行数:9,代码来源:ProjectPreparerTest.cs

示例3: setReferences

 private void setReferences(ProjectDocument document)
 {
     var regExp = new Regex(string.Format("{0}.*?{1}", PROJECT_REFERENCE_START, PROJECT_REFERENCE_END));
     var matches = regExp.Matches(_fileContent);
     for (int i = 0; i < matches.Count; i++)
     {
         var reference = getReference(matches[i].Value);
         if (!_fsService.FileExists(reference))
             continue;
         document.AddReference(reference);
     }
 }
开发者ID:tonyx,项目名称:AutoTest.Net,代码行数:12,代码来源:ProjectParser.cs

示例4: SetUp

		public void SetUp()
		{
			// Project dependency graph
			//
			//		    Project2
			//		   /
			//Project0			 Project5
			//		   \ 		/
			//			Project6
			//					\
			//Project1			Project4
			//	      \        /
			//		   Project3
			//
			_projectList = new string[]
									{ 
										string.Format("Proj0{0}Project0.csproj", Path.DirectorySeparatorChar), 
										string.Format("Proj1{0}Project1.csproj", Path.DirectorySeparatorChar), 
										string.Format("Proj2{0}Project2.csproj", Path.DirectorySeparatorChar), 
										string.Format("Proj3{0}Project3.csproj", Path.DirectorySeparatorChar),
										string.Format("Proj4{0}Project4.csproj", Path.DirectorySeparatorChar), 
										string.Format("Proj5{0}Project5.csproj", Path.DirectorySeparatorChar), 
										string.Format("Proj6{0}Project6.csproj", Path.DirectorySeparatorChar)
									};
			_cache = MockRepository.GenerateMock<ICache>();
			var document = new ProjectDocument(ProjectType.CSharp);
			document.AddReferencedBy(new string[] { _projectList[2], _projectList[6] });
			document.SetAssemblyName("Project0.dll");
            document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			_cache.Stub(c => c.Get<Project>(_projectList[0])).Return(new Project(_projectList[0], document));
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReferencedBy(_projectList[3]);
			document.SetAssemblyName("Project1.dll");
            document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			document.RebuildOnNextRun();
			_cache.Stub(c => c.Get<Project>(_projectList[1])).Return(new Project(_projectList[1], document));
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReference(_projectList[0]);
			document.SetAssemblyName("Project2.dll");
			document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			_cache.Stub(c => c.Get<Project>(_projectList[2])).Return(new Project(_projectList[2], document));
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReference(_projectList[1]);
			document.AddReferencedBy(_projectList[4]);
			document.SetAssemblyName("Project3.dll");
            document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			_cache.Stub(c => c.Get<Project>(_projectList[3])).Return(new Project(_projectList[3], document));
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReference(new string[] { _projectList[6], _projectList[3] });
			document.SetAssemblyName("Project4.dll");
			document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			_cache.Stub(c => c.Get<Project>(_projectList[4])).Return(new Project(_projectList[4], document));                                                                      
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReference(_projectList[6]);
			document.SetAssemblyName("Project5.dll");
			document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			document.RebuildOnNextRun();
			_cache.Stub(c => c.Get<Project>(_projectList[5])).Return(new Project(_projectList[5], document));
			document = new ProjectDocument(ProjectType.CSharp);
			document.AddReference(_projectList[0]);
			document.AddReferencedBy(new string[] { _projectList[4], _projectList[5] });
			document.SetAssemblyName("Project6.dll");
            document.SetOutputPath(string.Format("bin{0}Debug", Path.DirectorySeparatorChar));
			_cache.Stub(c => c.Get<Project>(_projectList[6])).Return(new Project(_projectList[6], document));
			                                                                                                                                                                                                                                                                                                                        
			_optimizer = new BuildOptimizer(_cache, MockRepository.GenerateMock<IConfiguration>());
		}
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:67,代码来源:BuildOptimizerTest.cs

示例5: setReferences

 private void setReferences(ProjectDocument document)
 {
     var references = getNodes("b:Project/b:ItemGroup/b:ProjectReference", "Include")
         .Select(x => new PathParser(x.Replace('\\', Path.DirectorySeparatorChar)).ToAbsolute(Path.GetDirectoryName(_projectFile)))
         .Where(x => _fsService.FileExists(x)).ToArray();
     document.AddReference(references);
 }
开发者ID:noamkfir,项目名称:AutoTest.Net,代码行数:7,代码来源:ProjectParser.cs

示例6: setReferences

 private void setReferences(ProjectDocument document)
 {
     var regExp = new Regex(string.Format("{0}.*?{1}", PROJECT_REFERENCE_START, PROJECT_REFERENCE_END));
     var matches = regExp.Matches(_fileContent);
     for (int i = 0; i < matches.Count; i++)
         document.AddReference(getReference(matches[i].Value));
 }
开发者ID:nieve,项目名称:AutoTest.Net,代码行数:7,代码来源:ProjectParser.cs


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