protected override void Dispose (bool disposing) { if (disposing) { if (auth != null) { auth.Dispose (); auth = null; } } base.Dispose (disposing); }
void FindAuthenticationObject (CFHTTPMessage response) { if (auth != null) { if (auth.IsValid) return; auth.Dispose (); auth = null; } if (auth == null) { auth = CFHTTPAuthentication.CreateFromResponse (response); if (auth == null) throw new HttpRequestException ("Failed to create CFHTTPAuthentication"); } if (!auth.IsValid) throw new HttpRequestException ("Failed to validate CFHTTPAuthentication"); }