public void ExecuteAsynchronous(IObserverAsynchronousExecution observer) { // O parâmetro observer representa a interface gráfica que executará este método // de forma assíncrona if (AsynchronousExecution != null) { try { this._observer = observer; observer.ConfigureBeforeAsynchronousExecution(); AsynchronousExecution(); observer.AsynchronousExecutionFinished(); } catch (Exception ex) { if (AsynchronousExecutionAborted != null) AsynchronousExecutionAborted(ex); observer.AsynchronousExecutionAborted(ex); } } }
public void ExecuteAsynchronous(IObserverAsynchronousExecution observer) { // O parâmetro observer representa a interface gráfica que executará este método // de forma assíncrona if (AsynchronousExecution != null) { try { this._observer = observer; observer.ConfigureBeforeAsynchronousExecution(); AsynchronousExecution(); observer.AsynchronousExecutionFinished(); } catch (Exception ex) { if (AsynchronousExecutionAborted != null) { AsynchronousExecutionAborted(ex); } observer.AsynchronousExecutionAborted(ex); } } }