Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Channels / WebBodyFormatMessageProperty.cs / 1 / WebBodyFormatMessageProperty.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- using System.Globalization; namespace System.ServiceModel.Channels { public sealed class WebBodyFormatMessageProperty : IMessageProperty { WebContentFormat format; static WebBodyFormatMessageProperty jsonProperty; public const string Name = "WebBodyFormatMessageProperty"; static WebBodyFormatMessageProperty xmlProperty; static WebBodyFormatMessageProperty rawProperty; public WebBodyFormatMessageProperty(WebContentFormat format) { if (format == WebContentFormat.Default) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR2.GetString(SR2.DefaultContentFormatNotAllowedInProperty))); } this.format = format; } public WebContentFormat Format { get {return this.format; } } internal static WebBodyFormatMessageProperty JsonProperty { get { if (jsonProperty == null) { jsonProperty = new WebBodyFormatMessageProperty(WebContentFormat.Json); } return jsonProperty; } } internal static WebBodyFormatMessageProperty XmlProperty { get { if (xmlProperty == null) { xmlProperty = new WebBodyFormatMessageProperty(WebContentFormat.Xml); } return xmlProperty; } } internal static WebBodyFormatMessageProperty RawProperty { get { if (rawProperty == null) { rawProperty = new WebBodyFormatMessageProperty(WebContentFormat.Raw); } return rawProperty; } } public IMessageProperty CreateCopy() { return this; } public override string ToString() { return String.Format(CultureInfo.InvariantCulture, SR2.GetString(SR2.WebBodyFormatPropertyToString, this.Format.ToString())); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlCharType.cs
- SqlClientWrapperSmiStream.cs
- EventProviderClassic.cs
- XD.cs
- EntityTemplateUserControl.cs
- TransformDescriptor.cs
- WebPartDeleteVerb.cs
- AutomationPatternInfo.cs
- Selector.cs
- AssemblyCollection.cs
- SoapProtocolImporter.cs
- PolyBezierSegment.cs
- ExpandCollapseProviderWrapper.cs
- CircleEase.cs
- QilXmlWriter.cs
- ValueUtilsSmi.cs
- CacheSection.cs
- EllipseGeometry.cs
- TrailingSpaceComparer.cs
- DataTablePropertyDescriptor.cs
- MultipartContentParser.cs
- WindowsListViewItemCheckBox.cs
- DynamicPropertyHolder.cs
- SelectedPathEditor.cs
- TextChangedEventArgs.cs
- AddInPipelineAttributes.cs
- ResourceContainer.cs
- CommandEventArgs.cs
- BCLDebug.cs
- DataContractSet.cs
- DataColumnCollection.cs
- TypeDependencyAttribute.cs
- XmlSchemas.cs
- SchemaEntity.cs
- lengthconverter.cs
- XmlLanguage.cs
- ClientScriptManagerWrapper.cs
- SettingsPropertyNotFoundException.cs
- EnterpriseServicesHelper.cs
- XmlObjectSerializerReadContextComplexJson.cs
- ClientSideQueueItem.cs
- TraceEventCache.cs
- ScaleTransform3D.cs
- DrawingAttributeSerializer.cs
- SecurityPermission.cs
- Region.cs
- DBConnection.cs
- EventMappingSettings.cs
- SecUtil.cs
- DesignerForm.cs
- ChineseLunisolarCalendar.cs
- ItemContainerGenerator.cs
- EventNotify.cs
- Pair.cs
- JsonSerializer.cs
- EntityTransaction.cs
- PersistStreamTypeWrapper.cs
- MetadataArtifactLoaderComposite.cs
- IfJoinedCondition.cs
- JavaScriptSerializer.cs
- LiteralDesigner.cs
- activationcontext.cs
- SvcMapFileLoader.cs
- Overlapped.cs
- HostingEnvironmentSection.cs
- MatrixTransform.cs
- SecurityTokenRequirement.cs
- Marshal.cs
- ByteStack.cs
- DesignBindingPicker.cs
- TokenBasedSetEnumerator.cs
- ExtensionElement.cs
- OdbcTransaction.cs
- EntityDesignerUtils.cs
- ReflectEventDescriptor.cs
- PostBackOptions.cs
- DocumentOrderQuery.cs
- SetStoryboardSpeedRatio.cs
- SBCSCodePageEncoding.cs
- OletxEnlistment.cs
- _AutoWebProxyScriptWrapper.cs
- ControlBuilder.cs
- ImageAnimator.cs
- DataControlField.cs
- RuleSettings.cs
- TextHidden.cs
- ManualResetEvent.cs
- DataBoundLiteralControl.cs
- PageStatePersister.cs
- DataQuery.cs
- DataService.cs
- WebBrowsableAttribute.cs
- FtpCachePolicyElement.cs
- RMEnrollmentPage1.cs
- XmlAnyElementAttribute.cs
- ProfileSettingsCollection.cs
- MemoryRecordBuffer.cs
- ViewRendering.cs
- SoapEnumAttribute.cs
- BitmapSource.cs