Esempio n. 1
0
        public APipelinableRequest SynchronExecution(APipelinableRequest myToBeExecutedRequest)
        {
            Stopwatch sw = Stopwatch.StartNew();

            myToBeExecutedRequest.Validate(_metaManager);

            myToBeExecutedRequest.Execute(_metaManager);

            sw.Stop();

            //set the stats
            myToBeExecutedRequest.Statistics = new RequestStatistics(sw.Elapsed);

            return myToBeExecutedRequest;
        }
Esempio n. 2
0
        /// <summary>
        /// Handles exceptions that occured while processing a request
        /// </summary>
        /// <param name="pipelineRequest">The request that has been processed</param>
        /// <param name="e">The exception that has been thrown</param>
        private void HandleErroneousRequest(ref APipelinableRequest pipelineRequest, Exception e)
        {
            var aSonesException = e as ASonesException ?? new UnknownException(e);

            //add the exception to the request
            pipelineRequest.Exception = aSonesException;
        }