예제 #1
0
		async Task<IEnumerable<UserSearchResult>> IFindMultipleBeamUsersTasks.ByPartialName(string partialName)
		{
			var request = new FindUsersByPartialNameRequest(partialName);
			var response = await _client.Get<FindUsersByPartialNameRequest, FindUsersByPartialNameResponse>(request);
			return response;
		}
예제 #2
0
		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);
		}