private async void ExecuteSignIn() { SignInResult result; var asyncServiceClient = _client as IAsyncServiceClient; if (asyncServiceClient != null) { Busy = true; result = await asyncServiceClient.SignInAsync(Name); Busy = false; } else { result = _client.SignIn(Name); } ChatViewModel chatViewModel = result.Success ? new ChatViewModel(_client) : null; OnSignIn(new SignInEventArgs(result, chatViewModel)); }