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(); }
public DictionaryOutputConvention() { Where.ResourceTypeImplements <IDictionary <string, object> >(); Conneg.MakeAsymmetricJson(); }