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)); }
public override object runBinary(ZoneBinaryCallback f, object arg1, object arg2) { var implementation = _runBinary; ZoneDelegate parentDelegate = async_._parentDelegate(implementation.zone); RunBinaryHandler handler = implementation.function; return(handler(implementation.zone, parentDelegate, this, f, arg1, arg2)); }
public object runBinary(Zone zone, ZoneBinaryCallback f, object arg1, object arg2) { var implementation = _delegationTarget._runBinary; _Zone implZone = implementation.zone; RunBinaryHandler handler = implementation.function; return(handler(implZone, async_._parentDelegate(implZone), zone, f, arg1, arg2)); }
public override object runBinary(ZoneBinaryCallback f, object arg1, object arg2) { if (ReferenceEquals(_current, async_._rootZone)) { return(f(arg1, arg2)); } return(async_._rootRunBinary(null, null, this, f, arg1, arg2)); }
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)); }
internal static object _invokeErrorHandler( ZoneBinaryCallback errorHandler, object error, string stackTrace) { // Dynamic invocation because we don't know the actual type of the // first argument or the error object, but we should successfully call // the handler if they match up. // TODO(lrn): Should we? Why not the same below for the unary case? return(errorHandler(error, stackTrace)); }
public override object runBinaryGuarded(ZoneBinaryCallback f, object arg1, object arg2) { try { return(runBinary(f, arg1, arg2)); } catch (Exception e) { handleUncaughtError(e); return(null); } }
public override object runBinaryGuarded(ZoneBinaryCallback f, object arg1, object arg2) { try { if (ReferenceEquals(async_._rootZone, _current)) { return(f(arg1, arg2)); } return(async_._rootRunBinary(null, null, this, f, arg1, arg2)); } catch (Exception e) { handleUncaughtError(e); return(null); } }
public override void onError(Action <object, string> handleError) { _source.onError(handleError); if (handleError == null) { _handleError = null; } else { _handleError = _zone .registerBinaryCallback((a, b) => { handleError(a, (string)b); return(null); }); } }
public override ZoneBinaryCallback bindBinaryCallbackGuarded(ZoneBinaryCallback f) { var registered = registerBinaryCallback(f); return((arg1, arg2) => runBinaryGuarded(registered, arg1, arg2)); }
public abstract ZoneBinaryCallback bindBinaryCallbackGuarded(ZoneBinaryCallback callback);
public abstract ZoneBinaryCallback bindBinaryCallback(ZoneBinaryCallback callback);
public abstract object runBinaryGuarded(ZoneBinaryCallback action, object argument1, object argument2);
public override ZoneBinaryCallback registerBinaryCallback(ZoneBinaryCallback f) => f;
public override ZoneBinaryCallback bindBinaryCallbackGuarded(ZoneBinaryCallback f) { return((arg1, arg2) => runBinaryGuarded(f, arg1, arg2)); }
Stream <T> handleError(ZoneBinaryCallback onError, _stream._ErrorTest test = null) { return(new _HandleErrorStream <T>(this, onError, test)); }
public abstract ZoneBinaryCallback registerBinaryCallback(ZoneBinaryCallback fcallback);
internal _HandleErrorStream(Stream <T> source, ZoneBinaryCallback onError, _stream._ErrorTest test) : base(source) { _transform = onError; _test = test; }