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


C# CallSignature.Analyze方法代码示例

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


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

示例1: AnalyzeBaseCtorCallParams

		private void AnalyzeBaseCtorCallParams(Analyzer/*!*/ analyzer, ClrType/*!*/ clrBase)
		{
			// we needn't to resolve the ctor here since the base class has to be known CLR type,
			// which has always a known ctor (may be a stub):
			ClrMethod base_ctor = clrBase.ClrConstructor;

			// create non-generic call signature:
			CallSignature call_sig = new CallSignature(baseCtorParams, TypeRef.EmptyList);

			RoutineSignature signature;
			int overload_index = base_ctor.ResolveOverload(analyzer, call_sig, position, out signature);

			if (overload_index == DRoutine.InvalidOverloadIndex)
			{
				analyzer.ErrorSink.Add(Errors.ClassHasNoVisibleCtor, analyzer.SourceUnit, position, clrBase.FullName);
			}
			else if (base_ctor.Overloads[overload_index].MandatoryParamCount != call_sig.Parameters.Count)
			{
				// invalid argument count passed to the base ctor:
				analyzer.ErrorSink.Add(Errors.InvalidArgumentCount, analyzer.SourceUnit, position);
			}

			call_sig.Analyze(analyzer, signature, AST.ExInfoFromParent.DefaultExInfo, true);

			// stores the signature on the type builder:
			method.DeclaringPhpType.Builder.BaseCtorCallSignature = call_sig;
			method.DeclaringPhpType.Builder.BaseCtorCallOverloadIndex = overload_index;

			// we don't need it any more:
			baseCtorParams = null;
		}
开发者ID:Ashod,项目名称:Phalanger,代码行数:31,代码来源:TypeDecl.cs


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