/// <summary>Creates a new instance of the <see cref="OgcRequestProcessor{TRequest,TResponse}" /> type.</summary> /// <param name="service">The service associated to the processor.</param> protected OgcRequestProcessor(OgcService service) { Debug.Assert(service != null); if (service == null) { throw new ArgumentNullException("service"); } _Service = service; }
/// <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); }