private void ClientAsyncError(AsyncErrorEventArgs e) { var modelException = e.Error as ModelException; if (modelException != null) { switch (modelException.Code) { case ErrorCode.APINotSupported: ClientModel.Reset(); SelectedRoom.AddSystemMessage(Localizer.Instance.Localize(APINotSupportedKey, modelException.Message)); return; } } }
private void ClientAsyncError(object sender, AsyncErrorEventArgs e) { Dispatcher.BeginInvoke(new Action<AsyncErrorEventArgs>(args => { ModelException modelException = args.Error as ModelException; if (modelException != null) switch (modelException.Code) { case ErrorCode.APINotSupported: ClientModel.Reset(); SelectedRoom.AddSystemMessage(string.Format(APINotSupported, modelException.Message)); return; } }), e); }