/*
namespace InABox.API
{
    public class CompressionServiceRunner<TRequest> : ServiceRunner<TRequest>
    {
        public CompressionServiceRunner(IAppHost appHost, ActionContext actionContext) : base(appHost, actionContext)
        {
        }

        public override void OnBeforeExecute(IRequestContext requestContext, TRequest request)
        {
            base.OnBeforeExecute(requestContext, request);
        }

        public override object OnAfterExecute(IRequestContext requestContext, object response)
        {
            bool bCompress = false;
            string queryString = new System.Uri(requestContext.AbsoluteUri).Query;
            var queryDictionary = System.Web.HttpUtility.ParseQueryString(queryString.ToLower());
            if (queryDictionary.AllKeys.Contains("compression"))
                bCompress = queryDictionary.Get("compression").Equals("gzip") || queryDictionary.Get("compression").Equals("deflate");

            if ((response != null) && (bCompress) && !(response is CompressedResult))
                response = requestContext.ToOptimizedResult(response);

            var result = base.OnAfterExecute(requestContext, response);
            return result;
        }

        public override object HandleException(IRequestContext requestContext, TRequest request, Exception ex)
        {
            return base.HandleException(requestContext, request, ex);
        }
    }
}
*/

