public async void UpdateOnlineNames() { ReadOnlyCollection <string> names; var asyncServiceClient = _client as IAsyncServiceClient; if (asyncServiceClient != null) { names = await asyncServiceClient.GetNamesOnlineAsync(); } else { names = _client.GetNamesOnline(); } OnlineNames = names; }