本文整理匯總了C#中System.Dynamic.InvokeMemberBinder.Defer方法的典型用法代碼示例。如果您正苦於以下問題:C# InvokeMemberBinder.Defer方法的具體用法?C# InvokeMemberBinder.Defer怎麽用?C# InvokeMemberBinder.Defer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Dynamic.InvokeMemberBinder
的用法示例。
在下文中一共展示了InvokeMemberBinder.Defer方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: BindInvokeMember
public override DynamicMetaObject BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args) {
ContractUtils.RequiresNotNull(binder, "binder");
return binder.Defer(args.AddFirst(WrapSelf()));
}
示例2: GenericInvokeMember
/// <summary>
/// Transforms an invoke member into a Python GetMember/Invoke. The caller should
/// verify that the given attribute is not resolved against a normal .NET class
/// before calling this. If it is a normal .NET member then a fallback InvokeMember
/// is preferred.
/// </summary>
internal static DynamicMetaObject/*!*/ GenericInvokeMember(InvokeMemberBinder/*!*/ action, ValidationInfo valInfo, DynamicMetaObject target, DynamicMetaObject/*!*/[]/*!*/ args) {
if (target.NeedsDeferral()) {
return action.Defer(args);
}
return AddDynamicTestAndDefer(action,
action.FallbackInvoke(
new DynamicMetaObject(
Binders.Get(
PythonContext.GetCodeContext(action),
PythonContext.GetPythonContext(action),
typeof(object),
action.Name,
target.Expression
),
BindingRestrictionsHelpers.GetRuntimeTypeRestriction(target)
),
args,
null
),
args,
valInfo
);
}
示例3: BindInvokeMember
public override DynamicMetaObject BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)
{
return binder.Defer(args.AddFirst(WrapSelf()));
}