/// <summary> /// Searches for a user by name. /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public Task Consume(ConsumeContext <IFindUserByName> context) { var user = _ldapService.FindUserByName(context.Message.UserName); return(context.RespondAsync <IFindUserByNameResult>(new FindUserByNameResult(user))); }