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

GetDomainFromId() public method

public GetDomainFromId ( string Id ) : ADDomain
Id string
return ADDomain
        public ADDomain GetDomainFromId(string Id)
        {
            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 GetDomainByNetBiosName(Id.Substring(0, slashIndex));
        }