public TADWrapperObject FindServerByFqdnWithException(string fqdn, out Exception ex)
        {
            ex = null;
            string nodeNameFromFqdn = MachineName.GetNodeNameFromFqdn(fqdn);

            return(SimpleAdObjectLookup <TADWrapperObject> .FindAdObjectByServerNameStatic(this.AdSession, nodeNameFromFqdn, out ex));
        }
Пример #2
0
        public TADWrapperObject FindServerByFqdnWithException(string fqdn, out Exception exception)
        {
            ExAssert.RetailAssert(typeof(TADWrapperObject) == typeof(IADServer), "This function should only be called with Server objects!");
            if (typeof(TADWrapperObject) != typeof(IADServer))
            {
                throw new NotImplementedException("This only works for Server objects.");
            }
            exception = null;
            Exception           ex     = null;
            AdObjectLookupFlags flags  = AdObjectLookupFlags.None;
            string           shortName = MachineName.GetNodeNameFromFqdn(fqdn);
            TADWrapperObject result    = this.LookupOrFindAdObject(shortName, () => SimpleAdObjectLookup <TADWrapperObject> .FindAdObjectByServerNameStatic(this.AdSession, shortName, out ex), flags);

            exception = ex;
            return(result);
        }