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>();
		}
Exemplo n.º 3
0
        public ActionExecutionContext(ActionContext context)
            : this(ActionContext.GetActionContext(context).Context,
				ActionContext.GetActionContext(context).Action)
        {
        }
Exemplo n.º 4
0
 internal static ActionContext GetActionContext(ActionContext context)
 {
     Precondition.Require(context, () => Error.ArgumentNull("context"));
     return context;
 }
Exemplo n.º 5
0
        public ActionExecutedContext(ActionContext context, Exception exception)
            : base(ActionContext.GetActionContext(context).Context, 
				ActionContext.GetActionContext(context).Action)
        {
            _exception = exception;
        }