/// <summary> /// Closes this instance by asking its Parent to initiate shutdown or by asking it's corresponding view to close. /// This overload also provides an opportunity to pass a dialog result to it's corresponding view. /// </summary> /// <param name="dialogResult">The dialog result.</param> public virtual void TryClose(bool?dialogResult) { SafeExecutor executor = new SafeExecutor(this); executor.ExecuteOnUIThread(() => { var closeAction = GetViewCloseAction(dialogResult); closeAction(); }); }
/// <summary> /// Tries to close this instance by asking its Parent to initiate shutdown or by asking its corresponding view to close. /// </summary> public void TryClose() { SafeExecutor executor = new SafeExecutor(this); executor.ExecuteOnUIThread(() => { var closeAction = GetViewCloseAction(null); closeAction(); }); }