Esempio n. 1
0
        protected void onItemUpdate(webRequest sender, webRequestEventArgs args)
        {
            switch (args.type)
            {
            case webRequestEventType.executedOk:
                if (!output.Contains(sender.result))
                {
                    output.Add(sender.result);
                }
                break;
            }

            if (executeMode != webRequestBlockExecuteMode.oneByOne)
            {
                foreach (webRequest wR in this)
                {
                    wR.checkRequest(__settings);
                }
            }

            callExecutionProgress();

            if (executeSyncMode == executionSyncMode.asynced)
            {
                if (!isWorking)
                {
                    callBlockFinishedEvent();
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Event invoker za ExecutionDone - izvrsavanje je uspesno obavljeno
        /// </summary>
        public void callExecutionDone(String message = "Execution completed")
        {
            status = webRequestEventType.executedOk;
            webRequestEventArgs args = new webRequestEventArgs(status, message);

            // args.saveStatus(this);
            if (onExecutionDone != null)
            {
                onExecutionDone(this, args);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Event invoker za RetryCalled - request execution retried
        /// </summary>
        public void callRetryCalled()
        {
            webRequestEventArgs args = new webRequestEventArgs(status,
                                                               "Request execution retried :: " +
                                                               retryCounter.signature());

            // args.saveStatus(this);
            if (onRetryCalled != null)
            {
                onRetryCalled(this, args);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Event invoker za ExecutionTimeout - Execution time limit reached
        /// </summary>
        public void callExecutionTimeout()
        {
            webRequestEventArgs args = new webRequestEventArgs(webRequestEventType.errorTimeout,
                                                               "Execution time limit reached :: " +
                                                               timeCounter.signature());

            //args.saveStatus(this);
            if (onExecutionTimeout != null)
            {
                onExecutionTimeout(this, args);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Event invoker za ExecutionError - Error occoured
        /// </summary>
        public void callExecutionError(webRequestEventType errorType = webRequestEventType.error,
                                       String errorMessage           = "Error occoured")
        {
            if (!status.ToString().Contains("error"))
            {
                status = errorType;
            }
            webRequestEventArgs args = new webRequestEventArgs(status, errorMessage);

            // args.saveStatus(this);
            if (onExecutionError != null)
            {
                onExecutionError(this, args);
            }
        }