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

C# IReturnType类代码示例

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

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



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


示例16: Resolve

        public static PersistentReturnType Resolve(IReturnType source, ITypeResolver typeResolver)
        {
            if (source == null) return null;

            PersistentReturnType rt = new PersistentReturnType ();
            rt.FullyQualifiedName = typeResolver.Resolve (source.FullyQualifiedName);
            rt.pointerNestingLevel = source.PointerNestingLevel;
            rt.arrayDimensions = source.ArrayDimensions;
            return rt;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:10,代码来源:PersistentReturnType.cs


示例17: ResolvePossibleNamespaces

		public virtual IEnumerable<string> ResolvePossibleNamespaces (IReturnType returnType)
		{
			foreach (string ns in InternalResolvePossibleNamespaces (returnType)) {
				yield return ns;
			}
			foreach (ProjectDom refDom in References) {
				foreach (string ns in refDom.InternalResolvePossibleNamespaces (returnType)) {
					yield return ns;
				}
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:11,代码来源:ProjectDom.cs


示例18: InternalResolvePossibleNamespaces

		protected virtual IEnumerable<string> InternalResolvePossibleNamespaces (IReturnType returnType)
		{
			if (returnType == null) 
				yield break;
			
			foreach (IType type in Types) {
				if (type.DecoratedFullName == type.Namespace + "." + returnType.DecoratedFullName) {
					yield return type.Namespace;
				}
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:11,代码来源:ProjectDom.cs


示例19: CanCompareEqualityWithOperator

		static bool CanCompareEqualityWithOperator(IReturnType type)
		{
			// return true for value types except float and double
			// return false for reference types except string.
			IClass c = type.GetUnderlyingClass();
			return c != null
				&& c.FullyQualifiedName != "System.Single"
				&& c.FullyQualifiedName != "System.Double"
				&& (c.ClassType == Dom.ClassType.Struct
				    || c.ClassType == Dom.ClassType.Enum
				    || c.FullyQualifiedName == "System.String");
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:12,代码来源:OverrideEqualsGetHashCodeMethodsDialog.xaml.cs


示例20: ArrayReturnType

		public ArrayReturnType(IProjectContent pc, IReturnType elementType, int dimensions)
		{
			if (pc == null)
				throw new ArgumentNullException("pc");
			if (dimensions <= 0)
				throw new ArgumentOutOfRangeException("dimensions", dimensions, "dimensions must be positive");
			if (elementType == null)
				throw new ArgumentNullException("elementType");
			this.pc = pc;
			this.elementType = elementType;
			this.dimensions = dimensions;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:12,代码来源:ArrayReturnType.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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