示例#1
0
        public static bool IsApplied(RequestContext context, out ThemedAttribute attribute)
        {
            if (context.HttpContext.Items.Contains(typeof(ThemeFilter)))
            {
                attribute = context.HttpContext.Items[typeof(ThemeFilter)] as ThemedAttribute;
                return(true);
            }

            attribute = null;
            return(false);
        }
示例#2
0
 public static void Apply(RequestContext context, ThemedAttribute attribute)
 {
     context.HttpContext.Items[typeof(ThemeFilter)] = attribute;
 }