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
- CornerRadius.cs
- WebBrowser.cs
- DataView.cs
- ExtendedPropertyInfo.cs
- ListBoxAutomationPeer.cs
- HtmlInputSubmit.cs
- MemberListBinding.cs
- RotationValidation.cs
- ConstraintStruct.cs
- WriteFileContext.cs
- ExternalFile.cs
- AvTraceDetails.cs
- ConfigXmlAttribute.cs
- SoapFormatterSinks.cs
- TypedTableBaseExtensions.cs
- ResourceDefaultValueAttribute.cs
- ListItemCollection.cs
- Translator.cs
- Visitors.cs
- ValueExpressions.cs
- SqlDependency.cs
- SymbolTable.cs
- MultiAsyncResult.cs
- OdbcErrorCollection.cs
- XmlSchemaDocumentation.cs
- KnowledgeBase.cs
- CharAnimationBase.cs
- Policy.cs
- XmlSchemaException.cs
- Semaphore.cs
- ScrollChrome.cs
- AddInBase.cs
- HierarchicalDataSourceConverter.cs
- JoinElimination.cs
- TranslateTransform3D.cs
- HttpWriter.cs
- ToolStripSeparatorRenderEventArgs.cs
- DataGridViewColumnConverter.cs
- GroupItem.cs
- UnicodeEncoding.cs
- InstanceLockException.cs
- KeyFrames.cs
- Logging.cs
- AddDataControlFieldDialog.cs
- ThreadExceptionEvent.cs
- HwndKeyboardInputProvider.cs
- Type.cs
- ChineseLunisolarCalendar.cs
- WaitingCursor.cs
- Statements.cs
- ButtonRenderer.cs
- ExtensionQuery.cs
- SafeRegistryKey.cs
- ClientScriptManager.cs
- StylusPointPropertyId.cs
- SqlDataSourceStatusEventArgs.cs
- DataColumnChangeEvent.cs
- MetadataPropertyvalue.cs
- X509CertificateCollection.cs
- XmlAttributeHolder.cs
- RadioButton.cs
- RC2.cs
- ObjectDataSourceMethodEventArgs.cs
- OutputScopeManager.cs
- backend.cs
- ComponentChangedEvent.cs
- ISAPIApplicationHost.cs
- XdrBuilder.cs
- SQLStringStorage.cs
- FillRuleValidation.cs
- SQLBinary.cs
- ConcurrencyBehavior.cs
- SpecialFolderEnumConverter.cs
- RNGCryptoServiceProvider.cs
- PropertyGeneratedEventArgs.cs
- KnownBoxes.cs
- QilInvoke.cs
- XmlDeclaration.cs
- XmlIncludeAttribute.cs
- EditorPart.cs
- KnownBoxes.cs
- DataGridViewComboBoxColumn.cs
- DescendentsWalkerBase.cs
- TypeDelegator.cs
- WebPartCancelEventArgs.cs
- AssemblyBuilder.cs
- XmlSerializerOperationGenerator.cs
- DiscriminatorMap.cs
- PrincipalPermission.cs
- WebRequest.cs
- DataControlPagerLinkButton.cs
- CompositeFontFamily.cs
- InlineCollection.cs
- TraceHandler.cs
- HttpBindingExtension.cs
- RepeatBehavior.cs
- SmtpReplyReaderFactory.cs
- ClockController.cs
- WSFederationHttpSecurityMode.cs
- CellRelation.cs