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
- SqlConnectionString.cs
- MsmqAppDomainProtocolHandler.cs
- CodeSnippetCompileUnit.cs
- WebScriptMetadataInstanceContextProvider.cs
- UITypeEditor.cs
- FormViewDeletedEventArgs.cs
- SiteMapNodeItemEventArgs.cs
- InternalsVisibleToAttribute.cs
- DATA_BLOB.cs
- SerializationInfoEnumerator.cs
- OutputCacheSection.cs
- SpeakCompletedEventArgs.cs
- OptimisticConcurrencyException.cs
- WorkflowOperationErrorHandler.cs
- ToolStripDropDown.cs
- XmlQueryOutput.cs
- SchemaEntity.cs
- CqlLexer.cs
- ExpressionVisitor.cs
- SchemaNamespaceManager.cs
- ConstructorBuilder.cs
- MulticastOption.cs
- RegexRunner.cs
- DataGridViewCellCancelEventArgs.cs
- ProjectedWrapper.cs
- HealthMonitoringSectionHelper.cs
- Point3DAnimationBase.cs
- ContentPropertyAttribute.cs
- WebPartMinimizeVerb.cs
- DeferredReference.cs
- MultiDataTrigger.cs
- GenericEnumerator.cs
- SelectionItemPattern.cs
- ImportedPolicyConversionContext.cs
- Grid.cs
- XmlLanguage.cs
- FontStretchConverter.cs
- ScrollProperties.cs
- FixedSOMImage.cs
- HtmlInputPassword.cs
- _ListenerRequestStream.cs
- SelectionPatternIdentifiers.cs
- WebBrowserNavigatingEventHandler.cs
- Message.cs
- SymmetricAlgorithm.cs
- SqlEnums.cs
- BamlLocalizabilityResolver.cs
- Pen.cs
- CheckBoxField.cs
- ToolStripContainerDesigner.cs
- ItemMap.cs
- TimeSpan.cs
- KeysConverter.cs
- FontWeight.cs
- BeginEvent.cs
- ObjectDataSourceDisposingEventArgs.cs
- QilXmlReader.cs
- BooleanFacetDescriptionElement.cs
- TextRunCacheImp.cs
- RuntimeEnvironment.cs
- HttpCookie.cs
- DragStartedEventArgs.cs
- BigInt.cs
- OverflowException.cs
- XmlRootAttribute.cs
- DesignerSerializationOptionsAttribute.cs
- GPPOINTF.cs
- CornerRadiusConverter.cs
- StreamSecurityUpgradeAcceptor.cs
- WebPartChrome.cs
- Point3DCollection.cs
- ApplicationManager.cs
- FileVersion.cs
- SendKeys.cs
- MruCache.cs
- ObservableCollectionDefaultValueFactory.cs
- Pair.cs
- SqlProcedureAttribute.cs
- OrderedDictionary.cs
- MethodBuilderInstantiation.cs
- CheckBoxField.cs
- MissingFieldException.cs
- DataComponentMethodGenerator.cs
- InkCanvas.cs
- StructuredType.cs
- DynamicRendererThreadManager.cs
- Font.cs
- StateItem.cs
- TypeCodeDomSerializer.cs
- HMAC.cs
- webproxy.cs
- NativeMethodsCLR.cs
- PointIndependentAnimationStorage.cs
- InternalPermissions.cs
- SettingsPropertyValueCollection.cs
- XmlSchemaAny.cs
- X509Certificate2.cs
- ComponentResourceManager.cs
- DataStorage.cs
- WindowsToolbar.cs