private bool CanAddCompressionFilter(ActionContext context)
		{
			if (context.Context.IsChild)
				return false;

			return (!context.HttpContext.Items.Contains(COMPRESS_ENABLED_KEY));
		}
		private string GetCultureCode(ActionContext context)
		{
			IValueProvider provider = Configuration.Instance.Models
				.ValueProviders.GetProvider(context.Context, 
				ParameterSource.FromString(Source));

			ValueProviderResult result = provider.GetValue(_parameterName);
			return (result == null) ? null : result.GetValue<string>();
		}
예제 #3
0
        public ActionExecutionContext(ActionContext context)
            : this(ActionContext.GetActionContext(context).Context,
				ActionContext.GetActionContext(context).Action)
        {
        }
예제 #4
0
 internal static ActionContext GetActionContext(ActionContext context)
 {
     Precondition.Require(context, () => Error.ArgumentNull("context"));
     return context;
 }
예제 #5
0
        public ActionExecutedContext(ActionContext context, Exception exception)
            : base(ActionContext.GetActionContext(context).Context, 
				ActionContext.GetActionContext(context).Action)
        {
            _exception = exception;
        }