示例#1
0
 public static ICodecDefinition NewtonsoftJson(
     this IHandlerForResourceWithUriDefinition root,
     JsonSerializerSettings settings = null)
 {
     return(root.TranscodedBy <NewtonsoftJsonCodec>(settings));
 }
示例#2
0
 public static ICodecDefinition AndTranscodedBy <TCodec>(this IHandlerForResourceWithUriDefinition handlerDef)
 {
     return(handlerDef.TranscodedBy(typeof(TCodec)));
 }
 public static ICodecWithMediaTypeDefinition OpenEverythingDoc(this IHandlerForResourceWithUriDefinition root)
 {
     return(root.XmlDataContract()
            .MediaType(new MediaType("application/vnd.openeverything.docs+xml;q=0.9"))
            .MediaType(new MediaType("application/xml")));
 }