當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。