/// <summary>
        /// Event call from Worker Process, sends ReponseEventArgs to ResponseCallbackDelegate on callee.
        /// </summary>
        /// <param name="command"> The IPipelineCommand.</param>
        private void RequestCallback(IPipelineCommand command)
        {
            ScriptingResponseArgs args = new ScriptingResponseArgs();
            args.Context = ((ScriptingHttpState)command.HttpStateData).HttpRequestResponseContext;

            if ( args.Context.Request.WebResponse.ErrorMessage.Length == 0 )
            {
                // Saves Cookies
                _cookieManager.AddCookies(command.HttpResponseData.CookieCollection);
            }

            // Return response in a event
            ScriptingRequestClientResult(this, args);
        }
        /// <summary>
        /// The request client result.
        /// </summary>
        /// <param name="sender"> The sender object.</param>
        /// <param name="e"> The event arguments.</param>
        private void ScriptingRequestClientResult(object sender, ScriptingResponseArgs e)
        {
            WebRequest request = e.Context.Request;

            if ( e.Context.Request.WebResponse.ErrorMessage.Length > 0 )
            {
                AbortSessionRun(e.Context.Request.WebResponse.ErrorMessage);
                _currentIndex = 0;
                return;
            }

            // Update Scripting Data
            _sessionScripting.WebRequests[e.Context.RequestIndex] = request;

            if ( OnRequestEnd != null )
            {
                RequestStartEndEventArgs args = new RequestStartEndEventArgs();
                args.CurrentIndex = e.Context.RequestIndex;
                args.RequestCount = _sessionScripting.WebRequests.Length;
                args.Request = request;

                OnRequestEnd(this, args);
            }

            // Execute Next Request
            if ( this.IsRunning )
            {
                ExecuteNextRequest();
            }
            else
            {
                _currentIndex = 0;
            }
        }