public override void Load() { IAsyncServiceClient asyncServiceClient = _serviceClientFactory.GetAsyncServiceClient(); _client = asyncServiceClient ?? _serviceClientFactory.GetServiceClient(); _client.Connect(_connectionConfiguration); base.Load(); }
private async void Enter() { Busy = true; _client = _serviceClientFactory.GetServiceClient(); var configuration = new ConnectionConfiguration { ServerName = ServerName, UseSsl = UseSsl }; _client.Connect(configuration); SignInResult result = await _client.SignInAsync(Name); Busy = false; ChatViewModel chatViewModel = result.Success ? new ChatViewModel(_client) : null; OnEntered(new SignInEventArgs(result, chatViewModel)); }