public void Open(string uri, string method, Action readyStateChangeCallback) { Util.CheckArgumentNull(uri, "uri"); Util.CheckArgumentNull(method, "method"); Util.CheckArgumentNull(readyStateChangeCallback, "readyStateChangeCallback"); ScriptObject callback = ScriptObjectUtility.ToScriptFunction(readyStateChangeCallback); ScriptObjectUtility.CallOpen(this.request, method, uri); ScriptObjectUtility.SetReadyStateChange(this.request, callback); }
public void Dispose() { var currentRequest = this.request; if (currentRequest != null) { try { ScriptObjectUtility.SetReadyStateChange(currentRequest, null); } finally { this.request = null; } } }