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


C# IParameterizedMember类代码示例

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


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

示例1: InvocationResolveResult

		public InvocationResolveResult(
			ResolveResult targetResult, IParameterizedMember member, IType returnType,
			IList<ResolveResult> arguments)
			: base(targetResult, member, returnType)
		{
			this.Arguments = arguments ?? EmptyList<ResolveResult>.Instance;
		}
开发者ID:jiguixin,项目名称:ILSpy,代码行数:7,代码来源:InvocationResolveResult.cs

示例2: InvocationResolveResult

		public InvocationResolveResult(ResolveResult targetResult, IParameterizedMember member,
		                               IList<ResolveResult> arguments = null,
		                               IList<ResolveResult> initializerStatements = null)
			: base(targetResult, member)
		{
			this.Arguments = arguments ?? EmptyList<ResolveResult>.Instance;
			this.InitializerStatements = initializerStatements ?? EmptyList<ResolveResult>.Instance;
		}
开发者ID:adisik,项目名称:simple-assembly-explorer,代码行数:8,代码来源:InvocationResolveResult.cs

示例3: InvocationResolveResult

		public InvocationResolveResult(ResolveResult targetResult, IParameterizedMember member,
		                               IList<ResolveResult> arguments = null,
		                               IList<ResolveResult> initializerStatements = null,
		                               IType returnTypeOverride = null,
		                               bool isConditionallyRemoved = false)
			: base(targetResult, member, returnTypeOverride)
		{
			this.Arguments = arguments ?? EmptyList<ResolveResult>.Instance;
			this.InitializerStatements = initializerStatements ?? EmptyList<ResolveResult>.Instance;
			this.IsConditionallyRemoved = isConditionallyRemoved;
		}
开发者ID:erik-kallen,项目名称:NRefactory,代码行数:11,代码来源:InvocationResolveResult.cs

示例4: GetHashCode

		public static int GetHashCode(ITypeResolveContext context, IParameterizedMember obj)
		{
			int hashCode = obj.Parameters.Count;
			unchecked {
				foreach (IParameter p in obj.Parameters) {
					hashCode *= 27;
					hashCode += p.Type.Resolve(context).GetHashCode();
				}
			}
			return hashCode;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:11,代码来源:ParameterListComparer.cs

示例5: NamedArgumentResolveResult

		public NamedArgumentResolveResult(IParameter parameter, ResolveResult argument, IParameterizedMember member = null)
			: base(argument.Type)
		{
			if (parameter == null)
				throw new ArgumentNullException("parameter");
			if (argument == null)
				throw new ArgumentNullException("argument");
			this.Member = member;
			this.Parameter = parameter;
			this.ParameterName = parameter.Name;
			this.Argument = argument;
		}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:12,代码来源:NamedArgumentResolveResult.cs

示例6: CSharpInvocationResolveResult

		public CSharpInvocationResolveResult(
			ResolveResult targetResult, IParameterizedMember member,
			IList<ResolveResult> arguments,
			OverloadResolutionErrors overloadResolutionErrors = OverloadResolutionErrors.None,
			bool isExtensionMethodInvocation = false,
			bool isExpandedForm = false,
			bool isDelegateInvocation = false,
			IList<int> argumentToParameterMap = null)
			: base(targetResult, member, arguments)
		{
			this.OverloadResolutionErrors = overloadResolutionErrors;
			this.IsExtensionMethodInvocation = isExtensionMethodInvocation;
			this.IsExpandedForm = isExpandedForm;
			this.IsDelegateInvocation = isDelegateInvocation;
			this.argumentToParameterMap = argumentToParameterMap;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:16,代码来源:CSharpInvocationResolveResult.cs

示例7: Compare

		public static bool Compare(ITypeResolveContext context, IParameterizedMember x, IParameterizedMember y)
		{
			var px = x.Parameters;
			var py = y.Parameters;
			if (px.Count != py.Count)
				return false;
			for (int i = 0; i < px.Count; i++) {
				var a = px[i];
				var b = py[i];
				if (a == null && b == null)
					continue;
				if (a == null || b == null)
					return false;
				if (!a.Type.Resolve(context).Equals(b.Type.Resolve(context)))
					return false;
			}
			return true;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:18,代码来源:ParameterListComparer.cs

示例8: DefaultParameter

		public DefaultParameter(IType type, string name, IParameterizedMember owner = null, DomRegion region = default(DomRegion), IList<IAttribute> attributes = null,
		                        bool isRef = false, bool isOut = false, bool isParams = false, bool isOptional = false, object defaultValue = null)
		{
			if (type == null)
				throw new ArgumentNullException("type");
			if (name == null)
				throw new ArgumentNullException("name");
			this.type = type;
			this.name = name;
			this.owner = owner;
			this.region = region;
			this.attributes = attributes;
			this.isRef = isRef;
			this.isOut = isOut;
			this.isParams = isParams;
			this.isOptional = isOptional;
			this.defaultValue = defaultValue;
		}
开发者ID:erik-kallen,项目名称:NRefactory,代码行数:18,代码来源:DefaultParameter.cs

示例9: InvocationResolveResult

		public InvocationResolveResult(
			ResolveResult targetResult, IParameterizedMember member, IType returnType,
			IList<ResolveResult> arguments,
			OverloadResolutionErrors overloadResolutionErrors = OverloadResolutionErrors.None,
			bool isExtensionMethodInvocation = false, 
			bool isExpandedForm = false,
			bool isLiftedOperatorInvocation = false,
			bool isDelegateInvocation = false,
			IList<int> argumentToParameterMap = null)
			: base(targetResult, member, returnType)
		{
			this.OverloadResolutionErrors = overloadResolutionErrors;
			this.Arguments = arguments ?? EmptyList<ResolveResult>.Instance;
			this.IsExtensionMethodInvocation = isExtensionMethodInvocation;
			this.IsExpandedForm = isExpandedForm;
			this.IsLiftedOperatorInvocation = isLiftedOperatorInvocation;
			this.IsDelegateInvocation = isDelegateInvocation;
			this.argumentToParameterMap = argumentToParameterMap;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:19,代码来源:InvocationResolveResult.cs

示例10: HasPredicateVersion

			bool HasPredicateVersion(IParameterizedMember member)
			{
				if (!IsQueryExtensionClass(member.DeclaringTypeDefinition))
					return false;
				switch (member.Name) {
					case "Any":
					case "Count":
					case "First":
					case "FirstOrDefault":
					case "Last":
					case "LastOrDefault":
					case "LongCount":
					case "Single":
					case "SingleOrDefault":
						return true;
					default:
						return false;
				}
			}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:19,代码来源:RedundantWhereWithPredicateIssue.cs

示例11: CSharpInvocationResolveResult

		public CSharpInvocationResolveResult(
			ResolveResult targetResult, IParameterizedMember member,
			IList<ResolveResult> arguments,
			OverloadResolutionErrors overloadResolutionErrors = OverloadResolutionErrors.None,
			bool isExtensionMethodInvocation = false,
			bool isExpandedForm = false,
			bool isDelegateInvocation = false,
			IList<int> argumentToParameterMap = null,
			IList<ResolveResult> initializerStatements = null,
			IType returnTypeOverride = null,
			bool isConditionallyRemoved = false
		)
			: base(targetResult, member, arguments, initializerStatements, returnTypeOverride, isConditionallyRemoved)
		{
			this.OverloadResolutionErrors = overloadResolutionErrors;
			this.IsExtensionMethodInvocation = isExtensionMethodInvocation;
			this.IsExpandedForm = isExpandedForm;
			this.IsDelegateInvocation = isDelegateInvocation;
			this.argumentToParameterMap = argumentToParameterMap;
		}
开发者ID:erik-kallen,项目名称:NRefactory,代码行数:20,代码来源:CSharpInvocationResolveResult.cs

示例12: Candidate

			public Candidate(IParameterizedMember member, bool isExpanded)
			{
				this.Member = member;
				this.IsExpandedForm = isExpanded;
				IMethod method = member as IMethod;
				if (method != null && method.TypeParameters.Count > 0) {
					// For generic methods, go back to the original parameters
					// (without any type parameter substitution, not even class type parameters)
					// We'll re-substitute them as part of RunTypeInference().
					method = (IMethod)method.MemberDefinition;
					this.Parameters = method.Parameters;
					this.TypeParameters = method.TypeParameters;
				} else {
					this.Parameters = member.Parameters;
				}
				this.ParameterTypes = new IType[this.Parameters.Count];
			}
开发者ID:Netring,项目名称:ILSpy,代码行数:17,代码来源:OverloadResolution.cs

示例13: LogCandidateAddingResult

		internal void LogCandidateAddingResult(string text, IParameterizedMember method, OverloadResolutionErrors errors)
		{
			#if DEBUG
			Log.WriteLine(string.Format("{0} {1} = {2}{3}",
			                            text, method,
			                            errors == OverloadResolutionErrors.None ? "Success" : errors.ToString(),
			                            this.BestCandidate == method ? " (best candidate so far)" :
			                            this.BestCandidateAmbiguousWith == method ? " (ambiguous)" : ""
			                           ));
			#endif
		}
开发者ID:Netring,项目名称:ILSpy,代码行数:11,代码来源:OverloadResolution.cs

示例14: AddCandidate

		public OverloadResolutionErrors AddCandidate(IParameterizedMember member, OverloadResolutionErrors additionalErrors)
		{
			if (member == null)
				throw new ArgumentNullException("member");
			
			Candidate c = new Candidate(member, false);
			if (additionalErrors != OverloadResolutionErrors.None)
				c.AddError(additionalErrors);
			if (CalculateCandidate(c)) {
				//candidates.Add(c);
			}
			
			if (this.AllowExpandingParams && member.Parameters.Count > 0
			    && member.Parameters[member.Parameters.Count - 1].IsParams)
			{
				Candidate expandedCandidate = new Candidate(member, true);
				if (additionalErrors != OverloadResolutionErrors.None)
					expandedCandidate.AddError(additionalErrors);
				// consider expanded form only if it isn't obviously wrong
				if (CalculateCandidate(expandedCandidate)) {
					//candidates.Add(expandedCandidate);
					
					if (expandedCandidate.ErrorCount < c.ErrorCount)
						return expandedCandidate.Errors;
				}
			}
			return c.Errors;
		}
开发者ID:Netring,项目名称:ILSpy,代码行数:28,代码来源:OverloadResolution.cs

示例15: MatchParameters

		static bool MatchParameters (IParameterizedMember a, IParameterizedMember b)
		{
			if (a == null && b == null) return true;
			if (a == null || b == null) return false;
			return ParameterListComparer.Instance.Equals (a.Parameters, b.Parameters);
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:6,代码来源:MemberCollector.cs


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