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
- HtmlLink.cs
- HtmlInputFile.cs
- MaskedTextProvider.cs
- ColorKeyFrameCollection.cs
- VisualStyleInformation.cs
- DataGridViewImageCell.cs
- SessionStateSection.cs
- NativeMethods.cs
- RowUpdatingEventArgs.cs
- AudienceUriMode.cs
- SelectionList.cs
- MatrixConverter.cs
- ToolStripMenuItem.cs
- Config.cs
- EntityDataReader.cs
- CompilerGeneratedAttribute.cs
- AmbientProperties.cs
- SystemTcpStatistics.cs
- NonceCache.cs
- WmfPlaceableFileHeader.cs
- RecognizedPhrase.cs
- GestureRecognitionResult.cs
- mactripleDES.cs
- DispatchChannelSink.cs
- filewebresponse.cs
- HostingPreferredMapPath.cs
- RowUpdatingEventArgs.cs
- VerificationAttribute.cs
- TextEditorDragDrop.cs
- RoleService.cs
- WebScriptEnablingBehavior.cs
- PictureBox.cs
- TaskFormBase.cs
- ProviderSettingsCollection.cs
- SkipQueryOptionExpression.cs
- TypedDataSourceCodeGenerator.cs
- SAPICategories.cs
- IteratorDescriptor.cs
- RemotingServices.cs
- FlowNode.cs
- NamespaceInfo.cs
- DataGridViewRowEventArgs.cs
- Scripts.cs
- ModuleBuilderData.cs
- InstanceCompleteException.cs
- RelationshipDetailsRow.cs
- NonBatchDirectoryCompiler.cs
- SiteMapNode.cs
- ToolStripItemDataObject.cs
- SqlTopReducer.cs
- XmlSerializerVersionAttribute.cs
- RootBuilder.cs
- UiaCoreTypesApi.cs
- SweepDirectionValidation.cs
- QueryOptionExpression.cs
- TranslateTransform3D.cs
- TTSVoice.cs
- ExecutionProperties.cs
- AddInAdapter.cs
- LocalizedNameDescriptionPair.cs
- CombinedGeometry.cs
- BuildProvider.cs
- VisualTreeFlattener.cs
- BindingOperations.cs
- HierarchicalDataBoundControl.cs
- Context.cs
- TopClause.cs
- SerializationSectionGroup.cs
- DataGridBoolColumn.cs
- CachedPathData.cs
- XmlSerializerSection.cs
- DeploymentSection.cs
- QueueException.cs
- PathSegment.cs
- DetailsViewRow.cs
- SQLUtility.cs
- NativeMethods.cs
- ExecutionContext.cs
- ElementProxy.cs
- Bold.cs
- UIElementIsland.cs
- X509Certificate2.cs
- Style.cs
- NavigationPropertyEmitter.cs
- EventManager.cs
- TextBlockAutomationPeer.cs
- X509Utils.cs
- SortQuery.cs
- UnicodeEncoding.cs
- RuntimeHelpers.cs
- UIElement3D.cs
- ImageListDesigner.cs
- WebBrowserEvent.cs
- CompositeFontInfo.cs
- UnderstoodHeaders.cs
- DataControlReferenceCollection.cs
- ObjectToIdCache.cs
- XslUrlEditor.cs
- DictionaryGlobals.cs
- MouseActionConverter.cs