Call() public method

public Call ( Proc procArg ) : object
procArg Proc
return object
示例#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));
        }
示例#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;
        }
示例#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);
 }
示例#4
0
 public static object Call(Proc/*!*/ self, object arg1) {
     RequireParameterCount(self, 1);
     return self.Call(arg1);
 }   
示例#5
0
 public static object Call(Proc/*!*/ self) {
     RequireParameterCount(self, 0);
     return self.Call();
 }
示例#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);
 }
示例#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));
 }
示例#8
0
 public static object Call(Proc /*!*/ self, object arg1)
 {
     RequireParameterCount(self, 1);
     return(self.Call(arg1));
 }
示例#9
0
 public static object Call(Proc /*!*/ self)
 {
     RequireParameterCount(self, 0);
     return(self.Call());
 }
示例#10
0
 public static Func<IRequest, bool> ToRequestPredicate(Proc proc)
 {
     return r => (bool)proc.Call(r);
 }
示例#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));
 }
示例#12
0
 public static object Call(BlockParam block, Proc /*!*/ self)
 {
     RequireParameterCount(self, 0);
     return(self.Call(block != null ? block.Proc : null));
 }
示例#13
0
文件: ProcOps.cs 项目: TerabyteX/main
 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);
 }
示例#14
0
文件: ProcOps.cs 项目: TerabyteX/main
 public static object Call(BlockParam block, Proc/*!*/ self)
 {
     RequireParameterCount(self, 0);
     return self.Call(block != null ? block.Proc : null);
 }