public override UnicastIPAddressInformationCollection EndGetUnicastAddresses(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException("asyncResult");
            }
            ContextAwareResult result = asyncResult as ContextAwareResult;

            if (((result == null) || (result.AsyncObject == null)) || (result.AsyncObject.GetType() != typeof(SystemIPGlobalProperties)))
            {
                throw new ArgumentException(SR.GetString("net_io_invalidasyncresult"));
            }
            if (result.EndCalled)
            {
                throw new InvalidOperationException(SR.GetString("net_io_invalidendcall", new object[] { "EndGetStableUnicastAddresses" }));
            }
            result.InternalWaitForCompletion();
            result.EndCalled = true;
            return(GetUnicastAddressTable());
        }
        private UnicastIPAddressInformationCollection EndGetUnicastAddresses(IAsyncResult asyncResult)
        {
            if (asyncResult == null)
            {
                throw new ArgumentNullException(nameof(asyncResult));
            }

            ContextAwareResult result = asyncResult as ContextAwareResult;

            if (result == null || result.AsyncObject == null || result.AsyncObject.GetType() != typeof(SystemIPGlobalProperties))
            {
                throw new ArgumentException(SR.net_io_invalidasyncresult);
            }

            if (result.EndCalled)
            {
                throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetStableUnicastAddresses"));
            }

            result.InternalWaitForCompletion();

            result.EndCalled = true;
            return(GetUnicastAddressTable());
        }