private void FireOperationComplete(Operation operation, bool withSuccess) { OperationCompleteHandler handler = OperationComplete; if (handler != null) { handler(this, operation, withSuccess); } }
/// <summary> /// Register a delegate to be executed when Execute() is called. /// Methods are executed first in last out. /// </summary> /// <param name="handler"></param> /// <param name="tag">Object to pass to handler when executed</param> public void RegisterEvent(OperationCompleteHandler handler, object tag) { registeredEvents.Push(new Pair(handler, tag)); }
/// <summary> /// Register a delegate to be executed when Execute() is called. /// Methods are executed first in last out. /// </summary> /// <param name="handler"></param> public void RegisterEvent(OperationCompleteHandler handler) { RegisterEvent(handler, null); }
/// <summary> /// /// </summary> /// <param name="handler">Initial handler to register</param> /// <param name="tag">Object to pass to handler when executed</param> public OperationCompleteEvent(OperationCompleteHandler handler, object tag) { RegisterEvent(handler, tag); }
/// <summary> /// /// </summary> /// <param name="handler">Initial handler to register</param> public OperationCompleteEvent(OperationCompleteHandler handler) : this(handler, null) { }