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


C# IReturnType类代码示例

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


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

示例1: AddMethodsFromBaseType

		void AddMethodsFromBaseType(List<IMethod> l, IReturnType baseType)
		{
			if (baseType != null) {
				foreach (IMethod m in baseType.GetMethods()) {
					if (m.IsConstructor)
						continue;
					
					bool ok = true;
					if (m.IsOverridable) {
						StringComparer comparer = m.DeclaringType.ProjectContent.Language.NameComparer;
						foreach (IMethod oldMethod in c.Methods) {
							if (comparer.Equals(oldMethod.Name, m.Name)) {
								if (m.IsStatic == oldMethod.IsStatic && object.Equals(m.ReturnType, oldMethod.ReturnType)) {
									if (DiffUtility.Compare(oldMethod.Parameters, m.Parameters) == 0) {
										ok = false;
										break;
									}
								}
							}
						}
					}
					if (ok)
						l.Add(m);
				}
			}
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:26,代码来源:DefaultReturnType.cs

示例2: 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

示例3: ProvideContextCompletion

		protected bool ProvideContextCompletion(ITextEditor editor, IReturnType expected, char charTyped)
		{
			if (expected == null) return false;
			IClass c = expected.GetUnderlyingClass();
			if (c == null) return false;
			if (c.ClassType == ClassType.Enum) {
				CtrlSpaceCompletionItemProvider cdp = new NRefactoryCtrlSpaceCompletionItemProvider(languageProperties);
				var ctrlSpaceList = cdp.GenerateCompletionList(editor);
				if (ctrlSpaceList == null) return false;
				ContextCompletionItemList contextList = new ContextCompletionItemList();
				contextList.Items.AddRange(ctrlSpaceList.Items);
				contextList.activationKey = charTyped;
				foreach (CodeCompletionItem item in contextList.Items.OfType<CodeCompletionItem>()) {
					IClass itemClass = item.Entity as IClass;
					if (itemClass != null && c.FullyQualifiedName == itemClass.FullyQualifiedName && c.TypeParameters.Count == itemClass.TypeParameters.Count) {
						contextList.SuggestedItem = item;
						break;
					}
				}
				if (contextList.SuggestedItem != null) {
					if (charTyped != ' ') contextList.InsertSpace = true;
					editor.ShowCompletionWindow(contextList);
					return true;
				}
			}
			return false;
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:27,代码来源:NRefactoryCodeCompletionBinding.cs

示例4: CreateResolveResult

		ResolveResult CreateResolveResult(IReturnType resolvedType)
		{
			if (resolvedType == null)
				return null;
			else
				return new ResolveResult(resolver.CallingClass, resolver.CallingMember, resolvedType);
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:ResolveVisitor.cs

示例5: MakeTypeResult

		void MakeTypeResult(IReturnType rt)
		{
			if (rt != null)
				resolveResult = new TypeResolveResult(callingClass, resolver.CallingMember, rt);
			else
				ClearResult();
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:ResolveVisitor.cs

示例6: FindOverload

		public static IMethodOrProperty FindOverload(IEnumerable<IMethodOrProperty> list,
		                                             IReturnType[] arguments,
		                                             bool allowAdditionalArguments,
		                                             bool substituteInferredTypes,
		                                             out bool acceptableMatch)
		{
			OverloadResolution or = new OverloadResolution();
			or.candidates = list.Select(m => new Candidate(m)).ToList();
			or.arguments = arguments;
			or.allowAdditionalArguments = allowAdditionalArguments;
			
			if (or.candidates.Count == 0)
				throw new ArgumentException("at least one candidate is required");
			
			MemberLookupHelper.Log("OverloadResolution");
			MemberLookupHelper.Log("  arguments = ", arguments);
			
			or.ConstructExpandedForms();
			or.InferTypeArguments();
			or.CheckApplicability();
			
			Candidate result = or.FindBestCandidate();
			MemberLookupHelper.Log("Overload resolution finished. Winning candidate = " + result);
			acceptableMatch = result.Status == CandidateStatus.Success;
			if (substituteInferredTypes)
				return result.Method;
			else
				return result.OriginalMethod;
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:29,代码来源:OverloadResolution.cs

示例7: DefaultField

 public DefaultField(IReturnType type, string name, ModifierEnum m, DomRegion region, IClass declaringType)
     : base(declaringType, name)
 {
     this.ReturnType = type;
     this.Region = region;
     this.Modifiers = m;
 }
开发者ID:SergeTruth,项目名称:OxyChart,代码行数:7,代码来源:DefaultField.cs

示例8: MakeResult

		void MakeResult(IReturnType type)
		{
			if (type == null)
				ClearResult();
			else
				resolveResult = new ResolveResult(callingClass, resolver.CallingMember, type);
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:ResolveVisitor.cs

示例9: SharpAssemblyParameter

 public SharpAssemblyParameter(SharpAssembly_ asm, string paramName, IReturnType type)
 {
     name = paramName;
     if (type.Name.EndsWith("&")) {
         modifier |= ParameterModifier.Ref;
     }
     returnType = type;
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:8,代码来源:SharpAssemblyParameter.cs

示例10: CreateFromBaseType

		/// <summary>
		/// Returns null if base type is not an interface.
		/// </summary>
		public static CodeInterface CreateFromBaseType(IProjectContent projectContent, IReturnType baseType)
		{
			IClass baseTypeClass = baseType.GetUnderlyingClass();
			if (baseTypeClass.ClassType == ClassType.Interface) {
				return new CodeInterface(projectContent, baseType, baseTypeClass);
			}
			return null;
		}
开发者ID:rbrunhuber,项目名称:SharpDevelop,代码行数:11,代码来源:CodeInterface.cs

示例11: AddWebViewPageBaseClass

		void AddWebViewPageBaseClass(DefaultClass webViewPageClass, IReturnType modelType)
		{
			IClass webViewPageBaseClass = webViewPageClass.ProjectContent.GetClass("System.Web.Mvc.WebViewPage", 1);
			if (webViewPageBaseClass != null) {
				IReturnType returnType = GetWebViewPageBaseClassReturnType(webViewPageBaseClass, modelType);
				webViewPageClass.BaseTypes.Add(returnType);
			}
		}
开发者ID:GMRyujin,项目名称:SharpDevelop,代码行数:8,代码来源:RazorCSharpResolver.cs

示例12: DefaultMethod

 public DefaultMethod(string name, IReturnType type, ModifierEnum m, DomRegion region, DomRegion bodyRegion, IClass declaringType)
     : base(declaringType, name)
 {
     this.ReturnType = type;
     this.Region     = region;
     this.BodyRegion = bodyRegion;
     Modifiers = m;
 }
开发者ID:SergeTruth,项目名称:OxyChart,代码行数:8,代码来源:DefaultMethod.cs

示例13: ConstructedReturnType

		public ConstructedReturnType(IReturnType baseType, IList<IReturnType> typeArguments)
		{
			if (baseType == null)
				throw new ArgumentNullException("baseType");
			if (typeArguments == null)
				throw new ArgumentNullException("typeArguments");
			this.typeArguments = typeArguments;
			this.baseType = baseType;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:9,代码来源:ConstructedReturnType.cs

示例14: DefaultAttribute

		public DefaultAttribute(IReturnType attributeType, AttributeTarget attributeTarget, IList<object> positionalArguments, IDictionary<string, object> namedArguments)
		{
			if (attributeType == null)
				throw new ArgumentNullException("attributeType");
			this.AttributeType = attributeType;
			this.AttributeTarget = attributeTarget;
			this.positionalArguments = positionalArguments ?? new List<object>();
			this.namedArguments = namedArguments ?? new SortedList<string, object>();
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:9,代码来源:DefaultAttribute.cs

示例15: DefaultEvent

		public DefaultEvent(string name, IReturnType type, ModifierEnum m, DomRegion region, DomRegion bodyRegion, IClass declaringType) : base(declaringType, name)
		{
			this.ReturnType = type;
			this.Region     = region;
			this.BodyRegion = bodyRegion;
			Modifiers       = (ModifierEnum)m;
			if (Modifiers == ModifierEnum.None) {
				Modifiers = ModifierEnum.Private;
			}
		}
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:10,代码来源:DefaultEvent.cs


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