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
- XmlSchemaObjectCollection.cs
- Ray3DHitTestResult.cs
- Sql8ConformanceChecker.cs
- SecurityAttributeGenerationHelper.cs
- ResourcesGenerator.cs
- FontCollection.cs
- JsonDataContract.cs
- BindingExpressionBase.cs
- DataPagerFieldCommandEventArgs.cs
- FieldCollectionEditor.cs
- odbcmetadatacolumnnames.cs
- DictionaryManager.cs
- WmpBitmapEncoder.cs
- DocumentEventArgs.cs
- TraceSwitch.cs
- XslTransform.cs
- ListViewItem.cs
- nulltextnavigator.cs
- RSAProtectedConfigurationProvider.cs
- GeneralTransformGroup.cs
- VisualStyleInformation.cs
- ObjectDataSourceMethodEventArgs.cs
- ActivityLocationReferenceEnvironment.cs
- CodeExpressionCollection.cs
- SqlBulkCopyColumnMapping.cs
- ViewStateException.cs
- RichTextBoxDesigner.cs
- XmlWrappingWriter.cs
- DiscoveryViaBehavior.cs
- ConfigPathUtility.cs
- ColorDialog.cs
- ArgIterator.cs
- SafeCryptoHandles.cs
- CancellationHandler.cs
- XmlCollation.cs
- ExtensionSimplifierMarkupObject.cs
- Soap.cs
- PropertyGeneratedEventArgs.cs
- DateRangeEvent.cs
- RegisteredDisposeScript.cs
- BitmapFrame.cs
- Overlapped.cs
- WsdlBuildProvider.cs
- CultureSpecificStringDictionary.cs
- LogExtent.cs
- FormsAuthenticationEventArgs.cs
- ContextMenuService.cs
- _Rfc2616CacheValidators.cs
- WaitForChangedResult.cs
- DesignerWithHeader.cs
- StylusLogic.cs
- HtmlShimManager.cs
- InternalConfigHost.cs
- BrushConverter.cs
- CookieProtection.cs
- ExpandSegment.cs
- MSAAWinEventWrap.cs
- URI.cs
- XmlReflectionImporter.cs
- Int64AnimationBase.cs
- MetadataException.cs
- ValidationHelper.cs
- WebPartEditorOkVerb.cs
- XmlTextReaderImpl.cs
- ApplicationActivator.cs
- NamespaceImport.cs
- UniqueIdentifierService.cs
- ToolStripPanel.cs
- SoapHttpTransportImporter.cs
- TypeDescriptor.cs
- HashCodeCombiner.cs
- ChangeInterceptorAttribute.cs
- CompiledQuery.cs
- DirectoryNotFoundException.cs
- WebPartConnection.cs
- ImmutableAssemblyCacheEntry.cs
- ContractInstanceProvider.cs
- XmlNamespaceDeclarationsAttribute.cs
- NameSpaceExtractor.cs
- CollectionViewProxy.cs
- BinHexEncoder.cs
- Set.cs
- ServiceHostFactory.cs
- login.cs
- MouseOverProperty.cs
- XmlDataSource.cs
- CallTemplateAction.cs
- DataSysAttribute.cs
- FixedBufferAttribute.cs
- XmlCharCheckingWriter.cs
- XamlWrappingReader.cs
- SyntaxCheck.cs
- NamedElement.cs
- DelegatingTypeDescriptionProvider.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- WindowsGraphics2.cs
- SHA1.cs
- PersonalizationEntry.cs
- DbReferenceCollection.cs
- ExpressionBuilderContext.cs