Ejemplo n.º 1
0
 public VariableInstance CreateVariableInstance(CmlScriptRequest request)
 {
     return(new VariableInstance(
                request.GetTargetInfo().GetTarget().GetStrongTarget(),
                new Variable_Operation(
                    request.GetTargetInfo().GetTargetType(),
                    variable_type,
                    name,
                    set_process.IfNotNull(p => (Process <object, object>) delegate(object t, object v) {
         p(
             request.GetThisArgument().GetArgument(),
             request.GetHostArgument().GetArgument(),
             v
             );
     }),
                    get_operation.IfNotNull(o => (Operation <object, object>) delegate(object t) {
         return get_operation(
             request.GetThisArgument().GetArgument(),
             request.GetHostArgument().GetArgument(),
             null
             );
     })
                    )
                ));
 }
Ejemplo n.º 2
0
        public FunctionInstance CreateFunctionInstance(CmlScriptRequest request)
        {
            return(new FunctionInstance(
                       request.GetTargetInfo().GetTarget().GetStrongTarget(),
                       new Function_Operation(
                           request.GetTargetInfo().GetTargetType(),
                           typeof(void),
                           name,
                           parameter_types,
                           delegate(object t, object[] p) {
                process(
                    request.GetThisArgument().GetArgument(),
                    request.GetHostArgument().GetArgument(),
                    p
                    );

                return null;
            }
                           )
                       ));
        }