예제 #1
0
 public virtual IAsyncResult BeginExecuteXmlReader(AsyncCallback callback, object state)
 {
     if (IsTraced)
     {
         Tracer.Instance.EnterFunction(TraceClass, "AsyncExecuteXmlReader", new string[] { "CommandText", "callback", "state", "Parameters" }, new object[] { this.CommandText, callback, state, this.GetTraceParameters(true) });
     }
     this.AsyncExecuteXmlReader = new AsyncExecuteXmlReaderHandler(this.ExecuteXmlReader);
     return(this.AsyncExecuteXmlReader.BeginInvoke(callback, state));
 }
예제 #2
0
        public virtual XmlReader EndExecuteXmlReader(IAsyncResult asyncResult)
        {
            ParameterChecker.CheckNull("DbAccessCommand.EndExecuteXmlReader", "AsyncExecuteXmlReader", this.AsyncExecuteXmlReader);
            ParameterChecker.CheckNull("DbAccessCommand.EndExecuteXmlReader", "asyncResult", asyncResult);
            XmlReader result = this.AsyncExecuteXmlReader.EndInvoke(asyncResult);

            this.AsyncExecuteXmlReader = null;
            if (IsTraced)
            {
                Tracer.Instance.LeaveFunction(TraceClass, "AsyncExecuteXmlReader", new string[] { "asyncResult", "result", "Parameters" }, new object[] { "Null:" + (asyncResult == null), "Null:" + (result == null), this.GetTraceParameters(false) });
            }
            return(result);
        }