本文整理汇总了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;
}