Disco.Services.Interop.ActiveDirectory.ActiveDirectoryContext.TryGetDomainFromId C# (CSharp) Method

TryGetDomainFromId() public method

public TryGetDomainFromId ( string Id, ADDomain &Domain ) : bool
Id string
Domain ADDomain
return bool
        public bool TryGetDomainFromId(string Id, out ADDomain Domain)
        {
            if (string.IsNullOrWhiteSpace(Id))
                throw new ArgumentNullException("Id");

            var slashIndex = Id.IndexOf('\\');

            if (slashIndex < 0)
                throw new ArgumentException(string.Format("The Id must include the Domain [{0}]", Id), "Id");

            return TryGetDomainByNetBiosName(Id.Substring(0, slashIndex), out Domain);
        }
        public ADDomain GetDomainFromId(string Id)