Inheritance: BikeObject
コード例 #1
0
 public BikeCallback(object target, Type returnType, BikeFunction function)
 {
     callingThread = Thread.CurrentThread;
     ContextLocal[callingThread] = InterpretationContext.Instance;
     Target = target;
     ReturnType = returnType;
     Function = function;
 }
コード例 #2
0
 public void AddHandler(object target, string name, BikeFunction bikeFunc, Interpreter interpreter, bool isStatic)
 {
     var invoker = new BikeCallback(target, null, bikeFunc);
     var delegateType = isStatic
         ? ((Type)target).AddHandler(name, invoker.Callback)
         : target.AddHandler(name, invoker.Callback);
     invoker.ReturnType = delegateType.GetMethod("Invoke").ReturnType;
 }