本文整理汇总了C#中IronRuby.Builtins.Proc.Call方法的典型用法代码示例。如果您正苦于以下问题:C# Proc.Call方法的具体用法?C# Proc.Call怎么用?C# Proc.Call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronRuby.Builtins.Proc
的用法示例。
在下文中一共展示了Proc.Call方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RubyPart
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: Trap
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: Call
public static object Call(Proc/*!*/ self, object arg1) {
RequireParameterCount(self, 1);
return self.Call(arg1);
}
示例4: ToRequestPredicate
public static Func<IRequest, bool> ToRequestPredicate(Proc proc)
{
return r => (bool)proc.Call(r);
}
示例5: Call
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);
}