Exemplo n.º 1
0
 public ZoneSpecification(
     HandleUncaughtErrorHandler handleUncaughtError = null,
     RunHandler run             = null,
     RunUnaryHandler runUnary   = null,
     RunBinaryHandler runBinary = null,
     RegisterCallbackHandler registerCallback             = null,
     RegisterUnaryCallbackHandler registerUnaryCallback   = null,
     RegisterBinaryCallbackHandler registerBinaryCallback = null,
     ErrorCallbackHandler errorCallback             = null,
     ScheduleMicrotaskHandler scheduleMicrotask     = null,
     CreateTimerHandler createTimer                 = null,
     CreatePeriodicTimerHandler createPeriodicTimer = null,
     PrintHandler print = null,
     ForkHandler fork   = null)
 {
     this.handleUncaughtError = handleUncaughtError;
     this.run                    = run;
     this.runUnary               = runUnary;
     this.runBinary              = runBinary;
     this.registerCallback       = registerCallback;
     this.registerUnaryCallback  = registerUnaryCallback;
     this.registerBinaryCallback = registerBinaryCallback;
     this.errorCallback          = errorCallback;
     this.scheduleMicrotask      = scheduleMicrotask;
     this.createTimer            = createTimer;
     this.createPeriodicTimer    = createPeriodicTimer;
     this.print                  = print;
     this.fork                   = fork;
 }
Exemplo n.º 2
0
 public static ZoneSpecification from(
     ZoneSpecification other,
     HandleUncaughtErrorHandler handleUncaughtError = null,
     RunHandler run             = null,
     RunUnaryHandler runUnary   = null,
     RunBinaryHandler runBinary = null,
     RegisterCallbackHandler registerCallback             = null,
     RegisterUnaryCallbackHandler registerUnaryCallback   = null,
     RegisterBinaryCallbackHandler registerBinaryCallback = null,
     ErrorCallbackHandler errorCallback             = null,
     ScheduleMicrotaskHandler scheduleMicrotask     = null,
     CreateTimerHandler createTimer                 = null,
     CreatePeriodicTimerHandler createPeriodicTimer = null,
     PrintHandler print = null,
     ForkHandler fork   = null)
 {
     return(new ZoneSpecification(
                handleUncaughtError: handleUncaughtError ?? other.handleUncaughtError,
                run: run ?? other.run,
                runUnary: runUnary ?? other.runUnary,
                runBinary: runBinary ?? other.runBinary,
                registerCallback: registerCallback ?? other.registerCallback,
                registerUnaryCallback:
                registerUnaryCallback ?? other.registerUnaryCallback,
                registerBinaryCallback:
                registerBinaryCallback ?? other.registerBinaryCallback,
                errorCallback: errorCallback ?? other.errorCallback,
                scheduleMicrotask: scheduleMicrotask ?? other.scheduleMicrotask,
                createTimer: createTimer ?? other.createTimer,
                createPeriodicTimer: createPeriodicTimer ?? other.createPeriodicTimer,
                print: print ?? other.print,
                fork: fork ?? other.fork
                ));
 }
Exemplo n.º 3
0
        public override ZoneBinaryCallback registerBinaryCallback(ZoneBinaryCallback callback)
        {
            var          implementation           = _registerBinaryCallback;
            ZoneDelegate parentDelegate           = async_._parentDelegate(implementation.zone);
            RegisterBinaryCallbackHandler handler = implementation.function;

            return(handler(implementation.zone, parentDelegate, this, callback));
        }
Exemplo n.º 4
0
        public ZoneBinaryCallback registerBinaryCallback(Zone zone, ZoneBinaryCallback f)
        {
            var   implementation = _delegationTarget._registerBinaryCallback;
            _Zone implZone       = implementation.zone;
            RegisterBinaryCallbackHandler handler = implementation.function;

            return(handler(implZone, async_._parentDelegate(implZone), zone, f));
        }
Exemplo n.º 5
0
 internal _RegisterBinaryZoneFunction(_Zone zone, RegisterBinaryCallbackHandler function)
 {
     this.zone     = zone;
     this.function = function;
 }