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); }
public static void Apply(RequestContext context, ThemedAttribute attribute) { context.HttpContext.Items[typeof(ThemeFilter)] = attribute; }