"景先生毕设|www.jxszl.com

C# CallSignature类代码示例

2023-12-29 17:39编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CallSignature类的典型用法代码示例。如果您正苦于以下问题:C#CallSignature类的具体用法?C#CallSignature怎么用?C#CallSignature使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Create publicDynamicMetaObjectCreate(CallSignaturesignature,DynamicMetaObjecttarget,DynamicMetaObject[]args,ExpressioncontextExpression){ Typet=GetTargetType(target.Value); if(t!=null){ if(typeof(Delegate).IsAssignableFrom(t)&&args.Length==1){ MethodInfodc=GetDelegateCtor(t); //BinderOps.CreateDelegate(CodeContextcontext,objectcallable); returnnewDynamicMetaObject( Ast.Call(null,dc,contextExpression,args[0].Expression), target.Restrictions.Merge(BindingRestrictions.GetInstanceRestriction(target.Expression,target.Value)) ); } returnCallMethod( newPythonOverloadResolver( this, args, signature, contextExpression ), CompilerHelpers.GetConstructors(t,PrivateBinding), BindingRestrictions.Empty ); } returnnull; }
原文链接:http://www.jxszl.com/biancheng/C/556651.html