96 references to WebContentFormat
System.Data.Services (1)
System\Data\Services\DataService.cs (1)
551message.Properties.Add(WebBodyFormatMessageProperty.Name, new WebBodyFormatMessageProperty(WebContentFormat.Raw));
System.ServiceModel.Web (95)
System\ServiceModel\Channels\RawContentTypeMapper.cs (2)
23public override WebContentFormat GetMessageFormatForContentType(string contentType) 25return WebContentFormat.Raw;
System\ServiceModel\Channels\WebBodyFormatMessageProperty.cs (7)
9WebContentFormat format; 15public WebBodyFormatMessageProperty(WebContentFormat format) 17if (format == WebContentFormat.Default) 24public WebContentFormat Format 35jsonProperty = new WebBodyFormatMessageProperty(WebContentFormat.Json); 47xmlProperty = new WebBodyFormatMessageProperty(WebContentFormat.Xml); 59rawProperty = new WebBodyFormatMessageProperty(WebContentFormat.Raw);
System\ServiceModel\Channels\WebContentFormatHelper.cs (5)
10internal static bool IsDefined(WebContentFormat format) 12return (format == WebContentFormat.Default 13|| format == WebContentFormat.Xml 14|| format == WebContentFormat.Json 15|| format == WebContentFormat.Raw);
System\ServiceModel\Channels\WebContentTypeMapper.cs (1)
13public abstract WebContentFormat GetMessageFormatForContentType(string contentType);
System\ServiceModel\Channels\WebMessageEncoderFactory.cs (35)
171WebContentFormat messageFormat; 173(messageFormat != WebContentFormat.Default)) 188WebContentFormat format = GetFormatForContentType(contentType); 193case WebContentFormat.Json: 197case WebContentFormat.Xml: 201case WebContentFormat.Raw: 218WebContentFormat format = GetFormatForContentType(contentType); 222case WebContentFormat.Json: 226case WebContentFormat.Xml: 230case WebContentFormat.Raw: 262WebContentFormat messageFormat = ExtractFormatFromMessage(message); 266case WebContentFormat.Json: 268case WebContentFormat.Xml: 276case WebContentFormat.Raw: 301WebContentFormat messageFormat = ExtractFormatFromMessage(message); 305case WebContentFormat.Json: 308case WebContentFormat.Xml: 317case WebContentFormat.Raw: 358WebContentFormat ExtractFormatFromMessage(Message message) 364return WebContentFormat.Xml; 369(typedMessageFormatProperty.Format == WebContentFormat.Default)) 371return WebContentFormat.Xml; 377WebContentFormat GetFormatForContentType(string contentType) 379WebContentFormat messageFormat; 382(messageFormat != WebContentFormat.Default)) 402messageFormat = WebContentFormat.Raw; 406messageFormat = WebContentFormat.Json; 410messageFormat = WebContentFormat.Xml; 414messageFormat = WebContentFormat.Raw; 427bool TryGetContentTypeMapping(string contentType, out WebContentFormat format) 431format = WebContentFormat.Default; 471WebContentFormat messageFormat = webMessageEncoder.ExtractFormatFromMessage(message); 476case WebContentFormat.Json: 481case WebContentFormat.Xml: 492case WebContentFormat.Raw:
System\ServiceModel\Description\WebHttpBehavior.cs (8)
1112Dictionary<WebContentFormat, IClientMessageFormatter> map = new Dictionary<WebContentFormat, IClientMessageFormatter>(); 1113map.Add(WebContentFormat.Xml, xmlFormatter); 1114map.Add(WebContentFormat.Json, jsonFormatter); 1127Dictionary<WebContentFormat, IDispatchMessageFormatter> map = new Dictionary<WebContentFormat, IDispatchMessageFormatter>(); 1128map.Add(WebContentFormat.Xml, xmlFormatter); 1129map.Add(WebContentFormat.Json, jsonFormatter);
System\ServiceModel\Description\WebScriptEnablingBehavior.cs (1)
431(bodyFormatProperty.Format != WebContentFormat.Json))
System\ServiceModel\Dispatcher\DataContractJsonSerializerOperationFormatter.cs (2)
239if (formatProperty.Format != WebContentFormat.Json) 241throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.InvalidHttpMessageFormat3, this.OperationName, formatProperty.Format, WebContentFormat.Json)));
System\ServiceModel\Dispatcher\DemultiplexingClientMessageFormatter.cs (5)
17Dictionary<WebContentFormat, IClientMessageFormatter> formatters; 20public DemultiplexingClientMessageFormatter(IDictionary<WebContentFormat, IClientMessageFormatter> formatters, IClientMessageFormatter defaultFormatter) 26this.formatters = new Dictionary<WebContentFormat, IClientMessageFormatter>(); 27foreach (WebContentFormat key in formatters.Keys) 40WebContentFormat format;
System\ServiceModel\Dispatcher\DemultiplexingDispatchMessageFormatter.cs (9)
18Dictionary<WebContentFormat, IDispatchMessageFormatter> formatters; 21public DemultiplexingDispatchMessageFormatter(IDictionary<WebContentFormat, IDispatchMessageFormatter> formatters, IDispatchMessageFormatter defaultFormatter) 27this.formatters = new Dictionary<WebContentFormat, IDispatchMessageFormatter>(); 28foreach (WebContentFormat key in formatters.Keys) 41WebContentFormat format; 67internal static string GetSupportedFormats(IEnumerable<WebContentFormat> formats) 71foreach (WebContentFormat format in formats) 84internal static bool TryGetEncodingFormat(Message message, out WebContentFormat format) 91format = WebContentFormat.Default;
System\ServiceModel\Dispatcher\HttpStreamFormatter.cs (2)
110if (formatProperty.Format != WebContentFormat.Raw) 112throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SR2.GetString(SR2.InvalidHttpMessageFormat, this.operationName, this.contractName, this.contractNs, formatProperty.Format, WebContentFormat.Raw)));
System\ServiceModel\Dispatcher\JavascriptCallbackMessageInspector.cs (1)
50formatProperty.Format == WebContentFormat.Json)
System\ServiceModel\Dispatcher\JsonFormatMapping.cs (3)
15public static readonly WebContentFormat WebContentFormat = WebContentFormat.Json; 25public override WebContentFormat ContentFormat
System\ServiceModel\Dispatcher\MultiplexingFormatMapping.cs (1)
18abstract public WebContentFormat ContentFormat { get; }
System\ServiceModel\Dispatcher\SingleBodyParameterDataContractMessageFormatter.cs (2)
175if (formatProperty.Format != WebContentFormat.Json) 177throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SR2.GetString(SR2.InvalidHttpMessageFormat, this.OperationName, this.ContractName, this.ContractNs, formatProperty.Format, WebContentFormat.Json)));
System\ServiceModel\Dispatcher\SingleBodyParameterMessageFormatter.cs (8)
61Dictionary<WebContentFormat, IClientMessageFormatter> map = new Dictionary<WebContentFormat, IClientMessageFormatter>(); 62map.Add(WebContentFormat.Xml, xmlFormatter); 63map.Add(WebContentFormat.Json, jsonFormatter); 75Dictionary<WebContentFormat, IDispatchMessageFormatter> map = new Dictionary<WebContentFormat, IDispatchMessageFormatter>(); 76map.Add(WebContentFormat.Xml, xmlFormatter); 77map.Add(WebContentFormat.Json, jsonFormatter);
System\ServiceModel\Dispatcher\XmlFormatMapping.cs (3)
14public static readonly WebContentFormat WebContentFormat = WebContentFormat.Xml; 24public override WebContentFormat ContentFormat