Example #1
0
        /// <summary>
        /// <see cref="IScriptExecution.EndExecuteScript"/>
        /// </summary>
        public bool EndExecuteScript(
            IAsyncResult ar)
        {
            // Retrieve the delegate.
            AsyncExecuteScriptDelegate dlgt = (AsyncExecuteScriptDelegate)ar.AsyncState;
            // Call EndInvoke to retrieve the results.
            bool retValue = dlgt.EndInvoke(ar);

            return(retValue);
        }
Example #2
0
        /// <summary>
        /// <see cref="IScriptExecution.BeginExecuteScript"/>
        /// </summary>
        public System.IAsyncResult BeginExecuteScript(
            string scriptFileName,
            bool continueOnError,
            AsyncCallback cb)
        {
            // Create the delegate.
            AsyncExecuteScriptDelegate dlgt = new AsyncExecuteScriptDelegate(this.ExecuteScript);
            // Initiate the asychronous call.
            object       asyncState = dlgt;
            IAsyncResult ar         = dlgt.BeginInvoke(
                scriptFileName,
                continueOnError,
                cb,
                asyncState);

            return(ar);
        }
Example #3
0
 /// <summary>
 /// <see cref="IScriptExecution.BeginExecuteScript"/>
 /// </summary>
 public System.IAsyncResult BeginExecuteScript(
     string scriptFileName, 
     bool continueOnError, 
     AsyncCallback cb)
 {
     // Create the delegate.
     AsyncExecuteScriptDelegate dlgt = new AsyncExecuteScriptDelegate(this.ExecuteScript);
     // Initiate the asychronous call.
     object asyncState = dlgt;
     IAsyncResult ar = dlgt.BeginInvoke(
         scriptFileName,
         continueOnError,
         cb,
         asyncState);
     return ar;
 }