本文整理汇总了C#中ParameterValues.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterValues.Clone方法的具体用法?C# ParameterValues.Clone怎么用?C# ParameterValues.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterValues
的用法示例。
在下文中一共展示了ParameterValues.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: callMethod
private void callMethod(Node upNode, ParameterValues paramVals, ReferenceBTValue ret, bool isVirtCall)
{
bool flag;
if (isVirtCall)
{
ReferenceBTValue thisObj = paramVals[0].Val as ReferenceBTValue;
flag = thisObj.BTType == BTType.Dynamic;
for (int i = 0; (! flag) && i < thisObj.Types.Length; i++)
if (paramVals.Method.DeclaringType.IsAssignableFrom(thisObj.Types[i]) && thisObj.Types[i] != PrimitiveBTValue.PrimitiveType())
{
ParameterValues exactParamVals = paramVals.Clone();
exactParamVals.ChooseVirtualMethod(thisObj.Types[i]);
flag = ! this.holder.SourceHolder.ContainsMethodBody(exactParamVals.Method);
}
}
else
flag = ! this.holder.SourceHolder.ContainsMethodBody(paramVals.Method);
if (flag)
Annotation.SetNodeBTType(upNode, this.checkAnnotatedMethodForInvoke(new AnnotatedMethod(paramVals, ret)));
else
{
if (isVirtCall)
{
foreach (Type type in (paramVals[0].Val as ReferenceBTValue).Types)
if (paramVals.Method.DeclaringType.IsAssignableFrom(type) && type != PrimitiveBTValue.PrimitiveType())
{
ParameterValues exactParamVals = paramVals.Clone();
exactParamVals.ChooseVirtualMethod(type);
AnnotatedMethod method = new AnnotatedMethod(exactParamVals, ret);
Annotation.SetAnnotatedMethod(upNode, type, this.checkAnnotatedMethodForCall(method));
}
}
else
Annotation.SetAnnotatedMethod(upNode, this.checkAnnotatedMethodForCall(new AnnotatedMethod(paramVals, ret)));
Annotation.SetNodeBTType(upNode, BTType.eXclusive);
}
}