/// <summary>
        /// Process Records
        /// </summary>
        protected override void ProcessRecord()
        {
            var qb = new QuerystringBuilder();

            if (Names != null && Names.Any())
            {
                qb.Add("usernames", string.Join(",", Names));
            }

            if (EmailAddresses != null && EmailAddresses.Any())
            {
                qb.Add("emailAddresses", string.Join(",", EmailAddresses));
            }

            if (!string.IsNullOrWhiteSpace(Domain))
            {
                qb.Add("domain", Domain);
            }

            var preparedUrl = $"/public/users{qb.Build()}";

            WriteDebug(preparedUrl);
            var result = Session.ApiClient.Get <IEnumerable <Models.User> >(preparedUrl);

            WriteObject(result, true);
        }
Exemplo n.º 2
0
 public override string ToString()
 {
     return(EmailAddresses.Any() ?
            EmailAddresses[0].ToString() :
            DisplayName);
 }