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
- CredentialCache.cs
- NetworkInterface.cs
- RedBlackList.cs
- ObjectContextServiceProvider.cs
- CheckedPointers.cs
- XslTransform.cs
- MapPathBasedVirtualPathProvider.cs
- FieldNameLookup.cs
- ConfigurationProperty.cs
- UMPAttributes.cs
- EqualityComparer.cs
- ChannelOptions.cs
- serverconfig.cs
- EndCreateSecurityTokenRequest.cs
- DataGridViewCellValidatingEventArgs.cs
- InstanceValue.cs
- Label.cs
- BezierSegment.cs
- AddInServer.cs
- UpdatePanelTriggerCollection.cs
- ProfileEventArgs.cs
- Int32Storage.cs
- AdCreatedEventArgs.cs
- XmlSchemaSequence.cs
- DeploymentExceptionMapper.cs
- ListViewUpdateEventArgs.cs
- HtmlInputSubmit.cs
- XmlQueryType.cs
- KeyProperty.cs
- ShaderEffect.cs
- GetParentChain.cs
- MarkupCompilePass2.cs
- LocalServiceSecuritySettings.cs
- DataGridViewAdvancedBorderStyle.cs
- APCustomTypeDescriptor.cs
- WebErrorHandler.cs
- WeakReference.cs
- TreeBuilderBamlTranslator.cs
- ACL.cs
- NativeMethods.cs
- TextEffectCollection.cs
- PresentationTraceSources.cs
- WebPartManager.cs
- BinaryWriter.cs
- PropertyKey.cs
- CodeCastExpression.cs
- ComponentResourceManager.cs
- ChildChangedEventArgs.cs
- HtmlForm.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- Matrix3DConverter.cs
- TrustManager.cs
- InternalConfigConfigurationFactory.cs
- HttpCapabilitiesBase.cs
- EntityWrapper.cs
- CqlWriter.cs
- DataGridViewLayoutData.cs
- BinaryObjectInfo.cs
- HebrewCalendar.cs
- FocusTracker.cs
- DbConnectionStringBuilder.cs
- MethodAccessException.cs
- HttpRequestWrapper.cs
- MouseWheelEventArgs.cs
- ConcurrentQueue.cs
- BamlWriter.cs
- KerberosRequestorSecurityToken.cs
- ReferentialConstraint.cs
- VisualCollection.cs
- Walker.cs
- APCustomTypeDescriptor.cs
- XmlReaderSettings.cs
- TypeUtil.cs
- TraceRecords.cs
- BCLDebug.cs
- BinHexDecoder.cs
- Choices.cs
- DataGridViewLayoutData.cs
- GridViewRowPresenter.cs
- MetadataFile.cs
- HMACSHA512.cs
- ISAPIWorkerRequest.cs
- Vector.cs
- SqlCommandBuilder.cs
- HiddenField.cs
- CustomCategoryAttribute.cs
- GradientStopCollection.cs
- WindowHideOrCloseTracker.cs
- DeploymentSection.cs
- TypeConverterHelper.cs
- RunInstallerAttribute.cs
- ColumnMapTranslator.cs
- HtmlImage.cs
- ValuePatternIdentifiers.cs
- SizeAnimationBase.cs
- MultipartContentParser.cs
- UnauthorizedWebPart.cs
- MobileRedirect.cs
- MetadataProperty.cs
- VirtualPathUtility.cs