Exemple #1
0
        public MyConnegPolicy()
        {
            // Apply some sort of matching
            // filter.
            Where.ChainMatches(chain => true);

            Conneg.AcceptJson();

            Conneg.AllowHttpFormPosts();

            Conneg.ApplyConneg();

            Conneg.AddHtml();

            Conneg.AddWriter(typeof(SpecialContentMediaWriter));

            Conneg.ClearAllWriters();

            Conneg.MakeAsymmetricJson();

            Conneg.MakeSymmetricJson();
        }
 public JsonMessageInputConvention()
 {
     Where.IsNotPartial();
     Where.ResourceTypeImplements <JsonMessage>().Or.InputTypeImplements <JsonMessage>();
     Conneg.MakeAsymmetricJson();
 }
Exemple #3
0
 public DictionaryOutputConvention()
 {
     Where.ResourceTypeImplements <IDictionary <string, object> >();
     Conneg.MakeAsymmetricJson();
 }