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
- ArithmeticException.cs
- RepeaterDesigner.cs
- TreeViewImageKeyConverter.cs
- CanonicalizationDriver.cs
- DesignSurface.cs
- WebServiceFaultDesigner.cs
- xmlglyphRunInfo.cs
- MenuItemBinding.cs
- GuidelineCollection.cs
- AuthenticationService.cs
- EntityContainerEmitter.cs
- ListControlActionList.cs
- ClassicBorderDecorator.cs
- RegistryKey.cs
- CodeGotoStatement.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- NopReturnReader.cs
- RuntimeResourceSet.cs
- DelegateTypeInfo.cs
- followingsibling.cs
- PixelShader.cs
- Helpers.cs
- CodeMethodReturnStatement.cs
- DataSvcMapFileSerializer.cs
- InheritanceContextHelper.cs
- GB18030Encoding.cs
- ScriptHandlerFactory.cs
- CompilerScopeManager.cs
- CodeMemberField.cs
- LogSwitch.cs
- MessageQueueAccessControlEntry.cs
- XmlSerializerFaultFormatter.cs
- FlowDocumentView.cs
- ResolveDuplexCD1AsyncResult.cs
- SessionStateContainer.cs
- SmtpNtlmAuthenticationModule.cs
- CodeCommentStatementCollection.cs
- ToolboxBitmapAttribute.cs
- ReferencedType.cs
- RadioButtonAutomationPeer.cs
- ExtensionSimplifierMarkupObject.cs
- SQLGuid.cs
- DataObjectEventArgs.cs
- InvalidateEvent.cs
- diagnosticsswitches.cs
- BidirectionalDictionary.cs
- ContainerParagraph.cs
- UIElement3D.cs
- GridLength.cs
- KeySplineConverter.cs
- HttpRuntime.cs
- ResourceReferenceExpression.cs
- TransformPattern.cs
- CodeCommentStatementCollection.cs
- LocationReference.cs
- SecurityTokenAuthenticator.cs
- UnderstoodHeaders.cs
- SqlCommandSet.cs
- PathFigureCollection.cs
- ByteRangeDownloader.cs
- OleDbReferenceCollection.cs
- Collection.cs
- PersonalizationProviderCollection.cs
- TransactionTraceIdentifier.cs
- SmiTypedGetterSetter.cs
- TextRangeAdaptor.cs
- ImageListDesigner.cs
- Span.cs
- ToolStripOverflowButton.cs
- AppSettingsExpressionBuilder.cs
- BitmapPalettes.cs
- InputMethodStateTypeInfo.cs
- PrinterResolution.cs
- DiscriminatorMap.cs
- XmlSchemaDocumentation.cs
- VariableAction.cs
- EncoderNLS.cs
- CheckBoxFlatAdapter.cs
- AppModelKnownContentFactory.cs
- rsa.cs
- HttpApplicationFactory.cs
- Label.cs
- AssemblyBuilder.cs
- DataContractSerializer.cs
- MailMessageEventArgs.cs
- ToolStripItemImageRenderEventArgs.cs
- CollaborationHelperFunctions.cs
- SpotLight.cs
- RequestSecurityTokenForGetBrowserToken.cs
- SessionStateSection.cs
- TimerElapsedEvenArgs.cs
- HttpAsyncResult.cs
- DeviceSpecificDialogCachedState.cs
- TabRenderer.cs
- ChangePassword.cs
- PageAdapter.cs
- XmlBinaryReader.cs
- InvokeMethodActivityDesigner.cs
- CommandLibraryHelper.cs
- PasswordTextContainer.cs