Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Channels / WebBodyFormatMessageProperty.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GenericTypeParameterBuilder.cs
- FatalException.cs
- LayoutEngine.cs
- TextInfo.cs
- CodeGotoStatement.cs
- PenThreadWorker.cs
- EntitySetBase.cs
- PathSegment.cs
- Internal.cs
- TdsValueSetter.cs
- DefaultMemberAttribute.cs
- selecteditemcollection.cs
- HtmlElementEventArgs.cs
- GenerateTemporaryTargetAssembly.cs
- MailBnfHelper.cs
- SchemaImporter.cs
- MILUtilities.cs
- SecurityElement.cs
- FrameworkRichTextComposition.cs
- CollectionChangeEventArgs.cs
- FileRegion.cs
- HtmlFormParameterReader.cs
- RijndaelManaged.cs
- BindingList.cs
- CodeBinaryOperatorExpression.cs
- UIElement3DAutomationPeer.cs
- BigInt.cs
- ByteAnimationBase.cs
- CompositeActivityMarkupSerializer.cs
- XmlILConstructAnalyzer.cs
- Int16AnimationUsingKeyFrames.cs
- SqlDataSourceStatusEventArgs.cs
- XmlWriterSettings.cs
- UnsafeNativeMethods.cs
- configsystem.cs
- ConvertTextFrag.cs
- odbcmetadatacollectionnames.cs
- ServiceModelStringsVersion1.cs
- RoleGroupCollection.cs
- BitmapSource.cs
- WCFModelStrings.Designer.cs
- DaylightTime.cs
- DtdParser.cs
- x509utils.cs
- Inline.cs
- RayHitTestParameters.cs
- OracleNumber.cs
- FrameworkTextComposition.cs
- UnsafeNativeMethods.cs
- DispatcherProcessingDisabled.cs
- NameValueConfigurationElement.cs
- HtmlString.cs
- CryptoProvider.cs
- StrokeSerializer.cs
- DataGridTableCollection.cs
- SmiContext.cs
- Frame.cs
- XmlC14NWriter.cs
- TrustSection.cs
- XmlNodeWriter.cs
- SqlBuffer.cs
- TargetException.cs
- PaintEvent.cs
- FrameworkElementFactoryMarkupObject.cs
- AbsoluteQuery.cs
- ComponentResourceKeyConverter.cs
- XmlNamespaceMappingCollection.cs
- InstanceContext.cs
- Environment.cs
- Attachment.cs
- SQLGuid.cs
- StorageComplexPropertyMapping.cs
- TransformConverter.cs
- SqlTypeConverter.cs
- WindowsAltTab.cs
- IntegerValidatorAttribute.cs
- HttpConfigurationSystem.cs
- MultiView.cs
- WindowsListViewSubItem.cs
- InstanceLockQueryResult.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- XamlWrapperReaders.cs
- BitmapEffectDrawing.cs
- ErrorInfoXmlDocument.cs
- SignatureConfirmations.cs
- MessageFilterTable.cs
- SqlIdentifier.cs
- TakeOrSkipQueryOperator.cs
- PenContexts.cs
- CompilationSection.cs
- ConstraintStruct.cs
- InfoCardTrace.cs
- DataObjectPastingEventArgs.cs
- SystemGatewayIPAddressInformation.cs
- ExtenderProvidedPropertyAttribute.cs
- ExtenderProvidedPropertyAttribute.cs
- HyperLinkField.cs
- ScaleTransform.cs
- SqlInternalConnectionTds.cs
- GridViewCellAutomationPeer.cs