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
- HandlerBase.cs
- TreeNodeCollection.cs
- ExpressionBindings.cs
- TimelineGroup.cs
- ByeMessageApril2005.cs
- DataGridToolTip.cs
- UriPrefixTable.cs
- DataPointer.cs
- ContentControl.cs
- FtpWebRequest.cs
- RegionData.cs
- CreateDataSourceDialog.cs
- SessionStateUtil.cs
- TextEditorCharacters.cs
- ReliableMessagingVersionConverter.cs
- WebServiceParameterData.cs
- CharacterShapingProperties.cs
- DocumentSchemaValidator.cs
- InstanceStore.cs
- ServiceNotStartedException.cs
- TypeCacheManager.cs
- DataTableNewRowEvent.cs
- ControlBindingsCollection.cs
- OleAutBinder.cs
- Solver.cs
- Parameter.cs
- PersonalizationAdministration.cs
- EncoderReplacementFallback.cs
- SecurityUtils.cs
- NameValueSectionHandler.cs
- EventProvider.cs
- PreviewPageInfo.cs
- CodeCommentStatement.cs
- AssemblyHash.cs
- PtsPage.cs
- TimelineClockCollection.cs
- ProcessManager.cs
- EraserBehavior.cs
- DataTrigger.cs
- WebScriptClientGenerator.cs
- WindowsEditBox.cs
- ToolStripSeparator.cs
- HtmlButton.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- XmlSchemaAttributeGroupRef.cs
- XmlLoader.cs
- SR.cs
- EUCJPEncoding.cs
- EntityRecordInfo.cs
- StatusBarDrawItemEvent.cs
- EtwTrace.cs
- ScriptHandlerFactory.cs
- StackBuilderSink.cs
- CodeGen.cs
- Flowchart.cs
- WebControl.cs
- LinqDataSourceEditData.cs
- PropertyConverter.cs
- errorpatternmatcher.cs
- TypeResolvingOptions.cs
- Visual3D.cs
- SimpleApplicationHost.cs
- Splitter.cs
- ScopelessEnumAttribute.cs
- AtomicFile.cs
- DoubleLinkList.cs
- SlipBehavior.cs
- CheckBoxBaseAdapter.cs
- TextContainerChangedEventArgs.cs
- MethodToken.cs
- AuthenticationModuleElement.cs
- EpmSourcePathSegment.cs
- DataTemplateSelector.cs
- ValidationEventArgs.cs
- DataControlReferenceCollection.cs
- LogExtentCollection.cs
- CryptoApi.cs
- ColumnHeader.cs
- Event.cs
- XPathNavigatorReader.cs
- HostProtectionException.cs
- SwitchLevelAttribute.cs
- DiscoveryReferences.cs
- EditorPartChrome.cs
- QilName.cs
- ToolstripProfessionalRenderer.cs
- BehaviorEditorPart.cs
- HttpRequest.cs
- QuaternionValueSerializer.cs
- RayMeshGeometry3DHitTestResult.cs
- RoutedCommand.cs
- ToolStripArrowRenderEventArgs.cs
- shaperfactory.cs
- coordinatorscratchpad.cs
- DeflateEmulationStream.cs
- UnmanagedMemoryAccessor.cs
- AnnotationResourceCollection.cs
- XmlNodeWriter.cs
- DataGridToolTip.cs
- CodeIdentifier.cs