private void ExecuteFilter(HttpContextBase http, IEnumerable<IFilter> filters)
 {
     var filter = new ResponseFilterStream(http.Response.Filter, http);
     foreach (var f in filters.Where(f => f.CanExecute()))
     {
         filter.TransformString += f.UpdateOutputHtml;
     }
     http.Response.Filter = filter;
 }
        private void ExecuteFilter(HttpContextBase http, IEnumerable <IFilter> filters)
        {
            var filter = new ResponseFilterStream(http.Response.Filter, http);

            foreach (var f in filters.Where(f => f.CanExecute()))
            {
                filter.TransformString += f.UpdateOutputHtml;
            }
            http.Response.Filter = filter;
        }
        private void ExecuteFilter(HttpContextBase http, IEnumerable <IFilter> filters)
        {
            //raise event, deverlopers can cancel the filter from being applied depending on what is on the http context.
            var args = new ApplyingResponseFilterEventArgs(http);

            OnApplyingResponseFilter(args);

            if (!args.Cancel)
            {
                var filter = new ResponseFilterStream(http.Response.Filter, http);
                foreach (var f in filters.Where(f => f.CanExecute()))
                {
                    filter.TransformString += f.UpdateOutputHtml;
                }
                http.Response.Filter = filter;
            }
        }
        private void ExecuteFilter(HttpContextBase http, IEnumerable<IFilter> filters)
        {
            //raise event, deverlopers can cancel the filter from being applied depending on what is on the http context.
            var args = new ApplyingResponseFilterEventArgs(http);
            OnApplyingResponseFilter(args);

            if (!args.Cancel)
            {
                var filter = new ResponseFilterStream(http.Response.Filter, http);
                foreach (var f in filters.Where(f => f.CanExecute()))
                {
                    filter.TransformString += f.UpdateOutputHtml;
                }
                http.Response.Filter = filter;    
            }
            
        }