90 references to WebMessageFormat
System.ServiceModel.Web (90)
System\ServiceModel\Configuration\WebHttpElement.cs (4)
37public WebMessageFormat DefaultOutgoingResponseFormat 39get { return (WebMessageFormat)base[WebConfigurationStrings.DefaultOutgoingResponseFormat]; } 66properties.Add(new ConfigurationProperty(WebConfigurationStrings.DefaultOutgoingResponseFormat, typeof(System.ServiceModel.Web.WebMessageFormat), System.ServiceModel.Web.WebMessageFormat.Xml, null, new System.ServiceModel.Configuration.InternalEnumValidator(typeof(System.ServiceModel.Web.WebMessageFormatHelper)), System.Configuration.ConfigurationPropertyOptions.None));
System\ServiceModel\Configuration\WebHttpEndpointElement.cs (5)
125[ConfigurationProperty(WebConfigurationStrings.DefaultOutgoingResponseFormat, DefaultValue = WebMessageFormat.Xml)] 127public WebMessageFormat DefaultOutgoingResponseFormat 129get { return (WebMessageFormat)base[WebConfigurationStrings.DefaultOutgoingResponseFormat]; } 164properties.Add(new ConfigurationProperty(WebConfigurationStrings.DefaultOutgoingResponseFormat, typeof(System.ServiceModel.Web.WebMessageFormat), System.ServiceModel.Web.WebMessageFormat.Xml, null, new System.ServiceModel.Configuration.InternalEnumValidator(typeof(System.ServiceModel.Web.WebMessageFormatHelper)), System.Configuration.ConfigurationPropertyOptions.None));
System\ServiceModel\Description\WebHttpBehavior.cs (21)
29WebMessageFormat defaultOutgoingReplyFormat; 30WebMessageFormat defaultOutgoingRequestFormat; 36defaultOutgoingRequestFormat = WebMessageFormat.Xml; 37defaultOutgoingReplyFormat = WebMessageFormat.Xml; 57public virtual WebMessageFormat DefaultOutgoingRequestFormat 73public virtual WebMessageFormat DefaultOutgoingResponseFormat 267replyDispatchAsMultiplexing.DefaultContentTypes.Add(WebMessageFormat.Xml, xmlContentType); 268replyDispatchAsMultiplexing.DefaultContentTypes.Add(WebMessageFormat.Json, jsonContentType); 591internal virtual bool UseBareReplyFormatter(WebMessageBodyStyle style, OperationDescription operationDescription, WebMessageFormat responseFormat, out Type parameterType) 604WebMessageFormat responseFormat = GetResponseFormat(operationDescription); 608bool useJson = (responseFormat == WebMessageFormat.Json || SupportsJsonFormat(operationDescription)); 625Dictionary<WebMessageFormat, IDispatchMessageFormatter> formatters = new Dictionary<WebMessageFormat, IDispatchMessageFormatter>(); 629formatters.Add(WebMessageFormat.Xml, SingleBodyParameterMessageFormatter.CreateDispatchFormatter(operationDescription, parameterType, false, false, this.xmlSerializerManager, null)); 632formatters.Add(WebMessageFormat.Json, SingleBodyParameterMessageFormatter.CreateDispatchFormatter(operationDescription, parameterType, false, true, this.xmlSerializerManager, this.JavascriptCallbackParameterName)); 639formatters.Add(WebMessageFormat.Xml, GetDefaultDispatchFormatter(operationDescription, false, !IsBareResponse(style))); 642formatters.Add(WebMessageFormat.Json, GetDefaultDispatchFormatter(operationDescription, true, !IsBareResponse(style))); 654WebMessageFormat requestFormat = GetRequestFormat(operationDescription); 655bool useJson = (requestFormat == WebMessageFormat.Json); 1133internal WebMessageFormat GetRequestFormat(OperationDescription od) 1152internal WebMessageFormat GetResponseFormat(OperationDescription od)
System\ServiceModel\Description\WebHttpEndpoint.cs (1)
34public WebMessageFormat DefaultOutgoingResponseFormat
System\ServiceModel\Description\WebScriptEnablingBehavior.cs (8)
25static readonly WebMessageFormat webScriptDefaultMessageFormat = WebMessageFormat.Json; 27WebMessageFormat requestMessageFormat = webScriptDefaultMessageFormat; 28WebMessageFormat responseMessageFormat = webScriptDefaultMessageFormat; 49public override WebMessageFormat DefaultOutgoingRequestFormat 65public override WebMessageFormat DefaultOutgoingResponseFormat 213internal override bool UseBareReplyFormatter(WebMessageBodyStyle style, OperationDescription operationDescription, WebMessageFormat responseFormat, out Type parameterType) 215if (responseFormat == WebMessageFormat.Json)
System\ServiceModel\Dispatcher\FormatSelectingMessageInspector.cs (6)
138WebMessageFormat format = mapping.MessageFormat; 186WebMessageFormat format = this.formatters[operationName].DefaultFormat; 201void SetFormatAndContentType(WebMessageFormat format, string contentType) 215WebMessageFormat format; 218public FormatContentTypePair(WebMessageFormat format, string contentType) 224public WebMessageFormat Format
System\ServiceModel\Dispatcher\HelpPage.cs (7)
321this.FormatString = WebMessageFormat.Xml.ToString(); 326this.FormatString = WebMessageFormat.Xml.ToString(); 331this.FormatString = WebMessageFormat.Xml.ToString(); 336this.FormatString = WebMessageFormat.Xml.ToString(); 341this.FormatString = WebMessageFormat.Xml.ToString(); 346this.FormatString = WebMessageFormat.Xml.ToString(); 351this.FormatString = WebMessageFormat.Xml.ToString();
System\ServiceModel\Dispatcher\JsonFormatMapping.cs (2)
30public override WebMessageFormat MessageFormat 32get { return WebMessageFormat.Json; }
System\ServiceModel\Dispatcher\MultiplexingDispatchMessageFormatter.cs (13)
18Dictionary<WebMessageFormat, IDispatchMessageFormatter> formatters; 19WebMessageFormat defaultFormat; 20Dictionary<WebMessageFormat, string> defaultContentTypes; 22public WebMessageFormat DefaultFormat 27public Dictionary<WebMessageFormat, string> DefaultContentTypes 35public MultiplexingDispatchMessageFormatter(Dictionary<WebMessageFormat, IDispatchMessageFormatter> formatters, WebMessageFormat defaultFormat) 43this.defaultContentTypes = new Dictionary<WebMessageFormat, string>(); 62WebMessageFormat format = this.defaultFormat; 65WebMessageFormat? nullableFormat = outgoingResponse.Format; 93if (!string.Equals(automatedSelectionContentType, defaultContentTypes[WebMessageFormat.Xml], StringComparison.OrdinalIgnoreCase)) 101if (format != WebMessageFormat.Xml) 113public bool SupportsMessageFormat(WebMessageFormat format)
System\ServiceModel\Dispatcher\MultiplexingFormatMapping.cs (1)
17abstract public WebMessageFormat MessageFormat { get; }
System\ServiceModel\Dispatcher\WebErrorHandler.cs (7)
66if (isXmlSerializerFaultFormat && WebOperationContext.Current.OutgoingResponse.Format == WebMessageFormat.Json) 70WebMessageFormat? nullableFormat = !isXmlSerializerFaultFormat ? context.OutgoingResponse.Format : WebMessageFormat.Xml; 71WebMessageFormat format = nullableFormat.HasValue ? nullableFormat.Value : this.webHttpBehavior.GetResponseFormat(description); 76case WebMessageFormat.Json: 79case WebMessageFormat.Xml: 99if (format == WebMessageFormat.Json)
System\ServiceModel\Dispatcher\XmlFormatMapping.cs (2)
29public override WebMessageFormat MessageFormat 31get { return WebMessageFormat.Xml; }
System\ServiceModel\Web\OutgoingWebResponseContext.cs (2)
103public WebMessageFormat? Format 111return operationContext.OutgoingMessageProperties[WebResponseFormatPropertyName] as WebMessageFormat?;
System\ServiceModel\Web\WebGetAttribute.cs (4)
22WebMessageFormat requestMessageFormat; 23WebMessageFormat responseMessageFormat; 58public WebMessageFormat RequestFormat 76public WebMessageFormat ResponseFormat
System\ServiceModel\Web\WebInvokeAttribute.cs (4)
22WebMessageFormat requestMessageFormat; 23WebMessageFormat responseMessageFormat; 61public WebMessageFormat RequestFormat 79public WebMessageFormat ResponseFormat
System\ServiceModel\Web\WebMessageFormatHelper.cs (3)
9internal static bool IsDefined(WebMessageFormat format) 11return (format == WebMessageFormat.Xml || format == WebMessageFormat.Json);