Call() public method

public Call ( Proc procArg ) : object
procArg Proc
return object
Ejemplo n.º 1
0
        public RubyPart(RubyPartDefinition definition, Proc createInstance)
        {
            if (definition == null)
                throw new ArgumentNullException("definition");
            if (createInstance == null)
                throw new ArgumentNullException("createInstance");

            _definition = definition;
            _instance = new DelayedInit<object>(() => createInstance.Call(createInstance));
        }
Ejemplo n.º 2
0
        public static object Trap(
            RubyContext/*!*/ context, 
            object self, 
            object signalId, 
            Proc proc) {

            if ((signalId is MutableString) && ((MutableString)signalId).ConvertToString() == "INT") {
                context.InterruptSignalHandler = delegate() { proc.Call(); };
            } else {
                // TODO: For now, just ignore unknown signals. This should be changed to throw an
                // exception. We are not doing it yet as it is close to the V1 RTM, and throwing
                // an exception might cause some app to misbehave whereas it might have happenned
                // to work if no exception is thrown
            }
            return null;
        }
Ejemplo n.º 3
0
 public static object Trap(
     RubyContext /*!*/ context,
     object self,
     object signalId,
     Proc proc)
 {
     if ((signalId is MutableString) && ((MutableString)signalId).ConvertToString() == "INT")
     {
         context.InterruptSignalHandler = delegate() { proc.Call(); };
     }
     else
     {
         // TODO: For now, just ignore unknown signals. This should be changed to throw an
         // exception. We are not doing it yet as it is close to the V1 RTM, and throwing
         // an exception might cause some app to misbehave whereas it might have happenned
         // to work if no exception is thrown
     }
     return(null);
 }
Ejemplo n.º 4
0
 public static object Call(Proc/*!*/ self, object arg1) {
     RequireParameterCount(self, 1);
     return self.Call(arg1);
 }   
Ejemplo n.º 5
0
 public static object Call(Proc/*!*/ self) {
     RequireParameterCount(self, 0);
     return self.Call();
 }
Ejemplo n.º 6
0
 public static object Call(Proc/*!*/ self, object arg1, object arg2, object arg3, object arg4) {
     RequireParameterCount(self, 4);
     return self.Call(arg1, arg2, arg3, arg4);
 }
Ejemplo n.º 7
0
 public static object Call(Proc /*!*/ self, object arg1, object arg2, object arg3, object arg4)
 {
     RequireParameterCount(self, 4);
     return(self.Call(arg1, arg2, arg3, arg4));
 }
Ejemplo n.º 8
0
 public static object Call(Proc /*!*/ self, object arg1)
 {
     RequireParameterCount(self, 1);
     return(self.Call(arg1));
 }
Ejemplo n.º 9
0
 public static object Call(Proc /*!*/ self)
 {
     RequireParameterCount(self, 0);
     return(self.Call());
 }
Ejemplo n.º 10
0
 public static Func<IRequest, bool> ToRequestPredicate(Proc proc)
 {
     return r => (bool)proc.Call(r);
 }
Ejemplo n.º 11
0
 public static object Call(BlockParam block, Proc /*!*/ self, object arg1, object arg2, object arg3, object arg4)
 {
     RequireParameterCount(self, 4);
     return(self.Call(block != null ? block.Proc : null, arg1, arg2, arg3, arg4));
 }
Ejemplo n.º 12
0
 public static object Call(BlockParam block, Proc /*!*/ self)
 {
     RequireParameterCount(self, 0);
     return(self.Call(block != null ? block.Proc : null));
 }
Ejemplo n.º 13
0
 public static object Call(BlockParam block, Proc/*!*/ self, object arg1, object arg2, object arg3, object arg4)
 {
     RequireParameterCount(self, 4);
     return self.Call(block != null ? block.Proc : null, arg1, arg2, arg3, arg4);
 }
Ejemplo n.º 14
0
 public static object Call(BlockParam block, Proc/*!*/ self)
 {
     RequireParameterCount(self, 0);
     return self.Call(block != null ? block.Proc : null);
 }