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
- ExclusiveCanonicalizationTransform.cs
- ObjectConverter.cs
- ImageAutomationPeer.cs
- GB18030Encoding.cs
- IsolatedStoragePermission.cs
- WebExceptionStatus.cs
- ConnectorEditor.cs
- Pool.cs
- HGlobalSafeHandle.cs
- WebPartDeleteVerb.cs
- AssemblyResourceLoader.cs
- DefaultBindingPropertyAttribute.cs
- MouseGestureConverter.cs
- DataServiceProviderMethods.cs
- DependencyPropertyKey.cs
- IntegrationExceptionEventArgs.cs
- InputScopeNameConverter.cs
- CodeExpressionCollection.cs
- ExtensionSimplifierMarkupObject.cs
- TextEditorDragDrop.cs
- bidPrivateBase.cs
- TemplatePagerField.cs
- ToolboxControl.cs
- TextReturnReader.cs
- CompositeDataBoundControl.cs
- Span.cs
- WebSysDefaultValueAttribute.cs
- ImageList.cs
- SelectiveScrollingGrid.cs
- MailDefinition.cs
- ToolboxItemWrapper.cs
- ObjRef.cs
- Mutex.cs
- WpfSharedXamlSchemaContext.cs
- COM2Properties.cs
- SimpleFileLog.cs
- TextureBrush.cs
- InheritanceContextHelper.cs
- safelinkcollection.cs
- AssociationSet.cs
- WSTrust.cs
- ClientRolePrincipal.cs
- TriggerAction.cs
- StringCollection.cs
- Model3D.cs
- FactoryGenerator.cs
- DataSourceCacheDurationConverter.cs
- FixedTextBuilder.cs
- SharedStatics.cs
- X509WindowsSecurityToken.cs
- CurrentTimeZone.cs
- MenuEventArgs.cs
- CapiNative.cs
- RepeaterItemCollection.cs
- TypeDescriptionProviderAttribute.cs
- CryptoConfig.cs
- ItemsPresenter.cs
- CollectionAdapters.cs
- XmlILCommand.cs
- TimeSpanMinutesConverter.cs
- _AutoWebProxyScriptEngine.cs
- DownloadProgressEventArgs.cs
- IssuedTokenParametersElement.cs
- AutomationPeer.cs
- XPathDocument.cs
- AppDomain.cs
- FieldToken.cs
- TableChangeProcessor.cs
- XmlSerializationWriter.cs
- TraceXPathNavigator.cs
- ProfileGroupSettingsCollection.cs
- externdll.cs
- DataSourceControl.cs
- MsmqProcessProtocolHandler.cs
- CurrentChangingEventManager.cs
- Types.cs
- _ServiceNameStore.cs
- SqlInternalConnectionTds.cs
- QueryStringParameter.cs
- SmiContextFactory.cs
- MailHeaderInfo.cs
- ListViewTableRow.cs
- AsymmetricSignatureFormatter.cs
- BindingManagerDataErrorEventArgs.cs
- PointIndependentAnimationStorage.cs
- Zone.cs
- TreeViewEvent.cs
- XmlCodeExporter.cs
- ObjectSecurity.cs
- BufferBuilder.cs
- DataGridRowDetailsEventArgs.cs
- Overlapped.cs
- QueryMatcher.cs
- DateTimePicker.cs
- ManagedIStream.cs
- DiagnosticTrace.cs
- SqlDataSourceView.cs
- SafePointer.cs
- ReadWriteSpinLock.cs
- BuildProviderCollection.cs