Example #1
0
        public CFHTTPMessage GetResponseHeader()
        {
            var handle = GetProperty(_ResponseHeader);

            if (handle == IntPtr.Zero)
            {
                return(null);
            }

            if (CFType.GetTypeID(handle) != CFHTTPMessage.GetTypeID())
            {
                CFObject.CFRelease(handle);
                throw new InvalidCastException();
            }
            return(new CFHTTPMessage(handle));
        }