public static DynamicExpression ConvertTo(ActionBinder binder, Type toType, ConversionResultKind kind, Type actionExpressionType, params Expression[] arguments) { ContractUtils.RequiresNotNull(toType, "toType"); ContractUtils.RequiresNotNull(arguments, "arguments"); ContractUtils.Requires(arguments.Length > 0, "arguments"); return(Expression.Dynamic(OldConvertToAction.Make(binder, toType, kind), actionExpressionType, arguments)); }
public virtual int ExecuteProgram(SourceUnit program) { ContractUtils.RequiresNotNull(program, "program"); object returnValue = program.Execute(); CodeContext context = new CodeContext(new Scope(), this); CallSite <Func <CallSite, CodeContext, object, object> > site = CallSite <Func <CallSite, CodeContext, object, object> > .Create(OldConvertToAction.Make(Binder, typeof(int), ConversionResultKind.ExplicitTry)); object exitCode = site.Target(site, context, returnValue); return((exitCode != null) ? (int)exitCode : 0); }
public virtual Expression GetDynamicConversion(Expression value, Type type) { return(Expression.Dynamic(OldConvertToAction.Make(_actionBinder, type), type, value)); }
public override Expression GetDynamicConversion(Expression value, Type type) { return(Expression.Dynamic(OldConvertToAction.Make(Binder, type), type, _context, value)); }
public override Expression /*!*/ GetDynamicConversion(Expression /*!*/ value, Type /*!*/ type) { return(Expression.Dynamic(OldConvertToAction.Make(Binder, type), type, ScopeExpression, value)); }