Esempio n. 1
0
        public static AdAccount For(string accountString)
        {
            var account = new AdAccount();

            try
            {
                account.Domain = "domain";
                account.Name   = "name";
            }
            catch (Exception e)
            {
                throw new AdAccountInvalidException(accountString, e);
            }

            return(account);
        }
Esempio n. 2
0
        public static AdAccount For(string accountString)
        {
            var account = new AdAccount();

            try
            {
                var index = accountString.IndexOf("\\", StringComparison.Ordinal);
                account.Domain = accountString.Substring(0, index);
                account.Name   = accountString.Substring(index + 1);
            }
            catch (Exception ex)
            {
                throw new AdAccountInvalidException(accountString, ex);
            }

            return(account);
        }