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

C# IProjectContent类代码示例

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

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



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

示例1: ElementReturnType

		public ElementReturnType(IProjectContent pc, IReturnType enumerableType)
		{
			if (pc == null)
				throw new ArgumentNullException("pc");
			this.enumerableType = enumerableType;
			this.pc = pc;
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:7,代码来源:ElementReturnType.cs


示例2: CodeNamespace

		public CodeNamespace(IProjectContent projectContent, NamespaceName namespaceName)
		{
			this.projectContent = projectContent;
			this.namespaceName = namespaceName;
			this.InfoLocation = vsCMInfoLocation.vsCMInfoLocationExternal;
			this.Language = GetLanguage(projectContent);
		}
开发者ID:GMRyujin,项目名称:SharpDevelop,代码行数:7,代码来源:CodeNamespace.cs


示例3: AddAttributes

		static void AddAttributes(IProjectContent pc, IList<IAttribute> list, CustomAttributeCollection attributes)
		{
			foreach (CustomAttribute att in attributes) {
				DefaultAttribute a = new DefaultAttribute(CreateType(pc, null, att.Constructor.DeclaringType));
				// Currently Cecil returns string instead of TypeReference for typeof() arguments to attributes
				var parameters = att.Constructor.Parameters;
				for (int i = 0; i < Math.Min(parameters.Count, att.ConstructorParameters.Count); i++) {
					object o = att.ConstructorParameters[i];
					if (parameters[i].ParameterType.FullName == "System.Type" && o is string) {
						try {
							a.PositionalArguments.Add(ReflectionReturnType.Parse(pc, (string)o));
						} catch (ReflectionTypeNameSyntaxError ex) {
							LoggingService.Warn("parsing '" + o + "'", ex);
							a.PositionalArguments.Add(o);
						}
					} else {
						a.PositionalArguments.Add(o);
					}
				}
				foreach (DictionaryEntry entry in att.Properties) {
					a.NamedArguments.Add(entry.Key.ToString(), entry.Value);
				}
				list.Add(a);
			}
		}
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Projects,代码行数:25,代码来源:CecilReader.cs


示例4: CreateCompilationUnit

		void CreateCompilationUnit(IProjectContent projectContent, string fileName)
		{
			compilationUnit = new DefaultCompilationUnit(projectContent);
			compilationUnit.FileName = fileName;
			
			CreateUsingScopeForCompilationUnit(fileName);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:PythonAstWalker.cs


示例5: Parse

		public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
		{
			var modelTypeLocater = new RazorCSharpModelTypeLocater(fileContent);
			return new RazorCompilationUnit(projectContent) {
				ModelTypeName = modelTypeLocater.ModelTypeName
			};
		}
开发者ID:GMRyujin,项目名称:SharpDevelop,代码行数:7,代码来源:RazorCSharpParser.cs


示例6: Parse

		public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent)
		{
			LoggingService.Debug("Parse " + fileName);
			int lineCount = 1;
			foreach (char c in fileContent) {
				if (c == '\n') {
					lineCount++;
				}
			}
			int[] lineLength = new int[lineCount];
			int length = 0;
			int i = 0;
			foreach (char c in fileContent) {
				if (c == '\n') {
					lineLength[i] = length;
					i += 1;
					length = 0;
				} else if (c != '\r') {
					length += 1;
				}
			}
			lineLength[i] = length;
			BooCompiler compiler = new BooCompiler();
			compiler.Parameters.Input.Add(new StringInput(fileName, fileContent));
			ICompilationUnit cu = Parse(projectContent, fileName, lineLength, compiler);
			AddCommentsAndRegions(cu, fileContent, fileName);
			return cu;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:28,代码来源:BooParser.cs


示例7: GetProject

 IProject GetProject(IProjectContent projectContent)
 {
     if (this.project.ProjectContent == projectContent) {
         return project;
     }
     return null;
 }
开发者ID:Rew,项目名称:SharpDevelop,代码行数:7,代码来源:TestableSolutionSnapshot.cs


示例8: ParseInformationEventArgs

		public ParseInformationEventArgs(string fileName, IProjectContent projectContent, ICompilationUnit oldCompilationUnit, ICompilationUnit newCompilationUnit)
		{
			this.fileName = fileName;
			this.projectContent = projectContent;
			this.oldCompilationUnit = oldCompilationUnit;
			this.newCompilationUnit = newCompilationUnit;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:ParseInformationEventHandler.cs


示例9: GetValue

		static object GetValue(IProjectContent pc, IEntity member, CustomAttributeArgument argument)
		{
			if (argument.Value is TypeReference)
				return CreateType(pc, member, (TypeReference)argument.Value);
			else
				return argument.Value;
		}
开发者ID:kleinux,项目名称:SharpDevelop,代码行数:7,代码来源:CecilReader.cs


示例10: GetClassReturnType

		public GetClassReturnType(IProjectContent content, string fullName, int typeArgumentCount, GetClassOptions options)
		{
			this.content = content;
			this.typeArgumentCount = typeArgumentCount;
			SetFullyQualifiedName(fullName);
			this.options = options;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:GetClassReturnType.cs


示例11: GetInfoLocation

		global::EnvDTE.vsCMInfoLocation GetInfoLocation(IProjectContent projectContent, IClass c)
		{
			if (projectContent.Project == c.ProjectContent.Project) {
				return global::EnvDTE.vsCMInfoLocation.vsCMInfoLocationProject;
			}
			return global::EnvDTE.vsCMInfoLocation.vsCMInfoLocationExternal;
		}
开发者ID:Netring,项目名称:SharpDevelop,代码行数:7,代码来源:CodeType.cs


示例12: VoidClass

		public VoidClass(IProjectContent pc)
			: base(new DefaultCompilationUnit(pc), VoidName)
		{
			this.ClassType = ClassType.Struct;
			this.Modifiers = ModifierEnum.Public | ModifierEnum.Sealed;
			Freeze();
		}
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:7,代码来源:SystemTypes.cs


示例13: CodeType

		/// <summary>
		/// Note that projectContent may be different to the IClass.ProjectContent since the class
		/// is retrieved from the namespace contents and could belong to a separate project or
		/// referenced assembly.
		/// </summary>
		public CodeType(IProjectContent projectContent, IClass c)
			: base(c)
		{
			this.Class = c;
			this.ProjectContent = projectContent;
			InfoLocation = GetInfoLocation(projectContent, c);
		}
开发者ID:Netring,项目名称:SharpDevelop,代码行数:12,代码来源:CodeType.cs


示例14: GetClassIfTypeNameIsNotEmpty

		IClass GetClassIfTypeNameIsNotEmpty(IProjectContent projectContent, string modelTypeName)
		{
			if (!String.IsNullOrEmpty(modelTypeName)) {
				return projectContent.GetClass(modelTypeName, 0);
			}
			return null;
		}
开发者ID:GMRyujin,项目名称:SharpDevelop,代码行数:7,代码来源:RazorCSharpResolver.cs


示例15: CSharpCompletion

        public CSharpCompletion()
        {
            projectContent = new CSharpProjectContent();
            var assemblies = new List<Assembly>
            {
                    typeof(object).Assembly, // mscorlib
                    typeof(Uri).Assembly, // System.dll
                    typeof(Enumerable).Assembly, // System.Core.dll
//					typeof(System.Xml.XmlDocument).Assembly, // System.Xml.dll
//					typeof(System.Drawing.Bitmap).Assembly, // System.Drawing.dll
//					typeof(Form).Assembly, // System.Windows.Forms.dll
//					typeof(ICSharpCode.NRefactory.TypeSystem.IProjectContent).Assembly,
                };

            var unresolvedAssemblies = new IUnresolvedAssembly[assemblies.Count];
            Stopwatch total = Stopwatch.StartNew();
            Parallel.For(
                0, assemblies.Count,
                delegate(int i)
                {
                    var loader = new CecilLoader();
                    var path = assemblies[i].Location;
                    loader.DocumentationProvider = GetXmlDocumentation(assemblies[i].Location);
                    unresolvedAssemblies[i] = loader.LoadAssemblyFile(assemblies[i].Location);
                });
            Debug.WriteLine("Init project content, loading base assemblies: " + total.Elapsed);
            projectContent = projectContent.AddAssemblyReferences((IEnumerable<IUnresolvedAssembly>)unresolvedAssemblies);
        }
开发者ID:uQr,项目名称:NRefactory-Completion-Sample,代码行数:28,代码来源:CSharpCompletion.cs


示例16: NRefactoryASTConvertVisitor

		public NRefactoryASTConvertVisitor(IProjectContent projectContent, SupportedLanguage language)
		{
			if (language == SupportedLanguage.VBNet)
				cu = new VBNetCompilationUnit(projectContent);
			else
				cu = new DefaultCompilationUnit(projectContent);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:NRefactoryASTConvertVisitor.cs


示例17: VoidTypeDefinition

		public VoidTypeDefinition(IProjectContent projectContent)
			: base(projectContent, "System", "Void")
		{
			this.Kind = TypeKind.Void;
			this.Accessibility = Accessibility.Public;
			this.IsSealed = true;
		}
开发者ID:jiguixin,项目名称:ILSpy,代码行数:7,代码来源:VoidTypeDefinition.cs


示例18: VoidTypeDefinition

		public VoidTypeDefinition(IProjectContent projectContent)
			: base(projectContent, "System", "Void")
		{
			this.ClassType = ClassType.Struct;
			this.Accessibility = Accessibility.Public;
			this.IsSealed = true;
		}
开发者ID:JustasB,项目名称:cudafy,代码行数:7,代码来源:VoidTypeDefinition.cs


示例19: FindMyFormsClass

		internal static IClass FindMyFormsClass(IProjectContent pc, string myNamespace)
		{
			if (pc != null) {
				return pc.GetClass(myNamespace + ".MyForms", 0);
			}
			return null;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:CSharpMyNamespaceBuilder.cs


示例20: FindReferences

		public override IEnumerable<MemberReference> FindReferences (MonoDevelop.Projects.Project project, IProjectContent content, IEnumerable<FilePath> files, IProgressMonitor monitor, IEnumerable<object> searchedMembers)
		{ // TODO: Type system conversion.
			yield break;
//			var editor = TextFileProvider.Instance.GetTextEditorData (fileName);
//			AspNetAppProject project = dom.Project as AspNetAppProject;
//			if (project == null)
//				yield break;
//			
//			var unit = AspNetParserService.GetCompileUnit (project, fileName, true);
//			if (unit == null)
//				yield break;
//			var refman = new DocumentReferenceManager (project);
//			
//			var parsedAspDocument = (AspNetParsedDocument)new AspNetParser ().Parse (dom, fileName, editor.Text);
//			refman.Doc = parsedAspDocument;
//			
//			var usings = refman.GetUsings ();
//			var documentInfo = new DocumentInfo (dom, unit, usings, refman.GetDoms ());
//			
//			var builder = new AspLanguageBuilder ();
//			
//			
//			var buildDocument = new Mono.TextEditor.TextDocument ();
//			var offsetInfos = new List<LocalDocumentInfo.OffsetInfo> ();
//			buildDocument.Text = builder.BuildDocumentString (documentInfo, editor, offsetInfos, true);
//			var parsedDocument = AspLanguageBuilder.Parse (dom, fileName, buildDocument.Text);
//			foreach (var member in searchedMembers) {
//				foreach (var reference in SearchMember (member, dom, fileName, editor, buildDocument, offsetInfos, parsedDocument)) {
//					yield return reference;
//				}
//			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:32,代码来源:ASPNetReferenceFinder.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IProjectEntry类代码示例发布时间:2022-05-24
下一篇:
C# IProject类代码示例发布时间: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