async Task<IEnumerable<UserSearchResult>> IFindMultipleBeamUsersTasks.ByPartialName(string partialName) { var request = new FindUsersByPartialNameRequest(partialName); var response = await _client.Get<FindUsersByPartialNameRequest, FindUsersByPartialNameResponse>(request); return response; }
async Task<User> IFindBeamUserTasks.ByName(string name) { var request = new FindUsersByPartialNameRequest(name); var response = await _client.Get<FindUsersByPartialNameRequest, FindUsersByPartialNameResponse>(request); var user = response.SingleOrDefault(_ => _.Username.Equals(name)); if (user == null) { throw new BeamUserNotFoundException(); } return await ((IFindBeamUserTasks)this).ById(user.UserId); }