public CorrectMimetypePolicy() { // Any chain that has an Action where the handler class name // contains the text "Ajax" Where.AnyActionMatches(call => call.HandlerType.Name.Contains("Ajax")); Wrap.WithBehavior <CorrectMimetypeForAjaxBehavior>(); }
public CachedPartialConvention() { Where.AnyActionMatches(call => call.Method.Name.EndsWith("CachedPartial")); Add.NodeToEnd <OutputCachingNode>(); }
public PartialOnlyConvention() { Where.AnyActionMatches(call => call.Method.Name.EndsWith("Partial")); ModifyBy(chain => chain.IsPartialOnly = true, configurationType: ConfigurationType.Policy); }