Example #1
0
        /// <summary>Triggers the <see cref="OgcRequestProcessor{TRequest,TResponse}.Processed" /> event.</summary>
        /// <param name="e">The parameters for the event.</param>
        protected virtual void OnProcessed(Ows.OwsRequestEventArgs <TRequest, TResponse> e)
        {
            var eh = Processed;

            if (eh != null)
            {
                eh(this, e);
            }
        }
Example #2
0
        /// <summary>Processes the specified request.</summary>
        /// <param name="request">The request to process.</param>
        /// <returns>The response to the request.</returns>
        public virtual async Task <TResponse> ProcessAsync(TRequest request)
        {
            Logger.Debug(CultureInfo.InvariantCulture, m => m("Request processing started"));
            Logger.Debug(CultureInfo.InvariantCulture, m => m("> {0}", OgcService.ToTraceString(request)));

            CheckRequest(request);

            TResponse ret = await ProcessRequestAsync(request);

            var args = new Ows.OwsRequestEventArgs <TRequest, TResponse>(request, ret);

            OnProcessed(args);

            Debug.Assert(args.Response != null);
            Logger.Debug(CultureInfo.InvariantCulture, m => m("< {0}", OgcService.ToTraceString(args.Response)));
            Logger.Debug(CultureInfo.InvariantCulture, m => m("Request processing finished"));
            return(args.Response);
        }