internal RestOptions() { EnumerableChunkedSupport = true; FaultDetail = FaultDetail.DetailedInDebugMode; JsonSettings = new JsonFormatterSettings(); XmlSettings = new XmlFormatterSettings(); ODataSettings = new ODataSettings(); BeginRequestAction = context => { }; EndRequestAction = context => { }; ExceptionAction = (context, Exception) => { }; }
/// <summary> /// Sets custom XML formatter and result settings. /// </summary> /// <param name="builder">The XML formatter settings builder.</param> /// <returns>The configuration options object.</returns> public RestOptions WithXmlFormatterSettings(Action<XmlFormatterSettings> builder) { if (builder == null) { throw new ArgumentNullException("builder"); } var settings = new XmlFormatterSettings(); builder(settings); XmlSettings = settings; return this; }