コード例 #1
0
        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>();
        }
コード例 #2
0
 public CachedPartialConvention()
 {
     Where.AnyActionMatches(call => call.Method.Name.EndsWith("CachedPartial"));
     Add.NodeToEnd <OutputCachingNode>();
 }
コード例 #3
0
 public PartialOnlyConvention()
 {
     Where.AnyActionMatches(call => call.Method.Name.EndsWith("Partial"));
     ModifyBy(chain => chain.IsPartialOnly = true, configurationType: ConfigurationType.Policy);
 }