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
- XamlBuildTaskServices.cs
- ColumnPropertiesGroup.cs
- ConfigXmlDocument.cs
- RedirectionProxy.cs
- PermissionRequestEvidence.cs
- ProxyWebPartConnectionCollection.cs
- ScriptIgnoreAttribute.cs
- SequenceQuery.cs
- FrameDimension.cs
- LinearGradientBrush.cs
- FactoryRecord.cs
- LocatorPartList.cs
- EntityDataSourceWrapperCollection.cs
- EntryPointNotFoundException.cs
- ExpressionPrefixAttribute.cs
- ChildrenQuery.cs
- InfoCardSchemas.cs
- ConfigsHelper.cs
- ObjectAnimationUsingKeyFrames.cs
- XmlDownloadManager.cs
- DrawingBrush.cs
- ControlParameter.cs
- GPPOINT.cs
- XmlSchemaExternal.cs
- HtmlButton.cs
- ThreadStartException.cs
- PrimitiveXmlSerializers.cs
- CollectionType.cs
- BinaryCommonClasses.cs
- WebConvert.cs
- Hashtable.cs
- RelatedPropertyManager.cs
- ConstantCheck.cs
- DrawingGroup.cs
- RoamingStoreFile.cs
- CryptographicAttribute.cs
- DataGridViewTextBoxCell.cs
- RNGCryptoServiceProvider.cs
- EnumUnknown.cs
- MD5CryptoServiceProvider.cs
- FormViewUpdateEventArgs.cs
- ServiceHostingEnvironment.cs
- DataServiceExpressionVisitor.cs
- BufferedConnection.cs
- FocusManager.cs
- DataGridViewCellLinkedList.cs
- DataGridColumnDropSeparator.cs
- ConstructorArgumentAttribute.cs
- ParameterElementCollection.cs
- TextPatternIdentifiers.cs
- WindowsGraphics.cs
- XmlDocument.cs
- HostProtectionException.cs
- BindingExpression.cs
- TextElementAutomationPeer.cs
- Utils.cs
- DbConnectionHelper.cs
- DataTableMappingCollection.cs
- PngBitmapDecoder.cs
- DbInsertCommandTree.cs
- CorePropertiesFilter.cs
- XPathChildIterator.cs
- SimpleColumnProvider.cs
- CategoryGridEntry.cs
- Point4D.cs
- XmlSerializerAssemblyAttribute.cs
- XamlGridLengthSerializer.cs
- TemplatePartAttribute.cs
- StateMachineSubscriptionManager.cs
- BlockExpression.cs
- XPathAncestorIterator.cs
- CapabilitiesAssignment.cs
- CodeArgumentReferenceExpression.cs
- UnsafeNativeMethods.cs
- CodeTypeDeclarationCollection.cs
- WeakReference.cs
- AssemblyHash.cs
- VisemeEventArgs.cs
- AuthorizationRule.cs
- Pair.cs
- ClipboardData.cs
- LocatorBase.cs
- JsonDeserializer.cs
- CallSiteBinder.cs
- BreakSafeBase.cs
- ButtonChrome.cs
- ArgumentsParser.cs
- TypeSystem.cs
- ChangeToolStripParentVerb.cs
- DataGridViewCell.cs
- FillBehavior.cs
- EventData.cs
- GroupItemAutomationPeer.cs
- WebPartEditorApplyVerb.cs
- ClientConfigurationHost.cs
- Stack.cs
- BlurEffect.cs
- MenuStrip.cs
- StringAnimationBase.cs
- ItemCollection.cs