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