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
- ViewStateException.cs
- ObjectComplexPropertyMapping.cs
- UriPrefixTable.cs
- ProviderBase.cs
- DefaultAsyncDataDispatcher.cs
- XpsLiterals.cs
- ECDiffieHellmanCngPublicKey.cs
- KeyInfo.cs
- FamilyTypefaceCollection.cs
- SqlConnectionManager.cs
- ZipIOExtraFieldZip64Element.cs
- MailWriter.cs
- Button.cs
- mediaclock.cs
- SqlNodeAnnotations.cs
- DataBindEngine.cs
- LinkedResource.cs
- Substitution.cs
- EntityClassGenerator.cs
- coordinator.cs
- ObjectDataProvider.cs
- HostSecurityManager.cs
- WaitForChangedResult.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SupportsEventValidationAttribute.cs
- ViewSimplifier.cs
- SaveFileDialog.cs
- sqlinternaltransaction.cs
- FullTextState.cs
- XXXInfos.cs
- PageVisual.cs
- DataGridViewTopRowAccessibleObject.cs
- SystemIdentity.cs
- TabItemAutomationPeer.cs
- ISFClipboardData.cs
- Size3DValueSerializer.cs
- ObjectQueryState.cs
- StringWriter.cs
- IsolatedStorageFileStream.cs
- StreamMarshaler.cs
- BaseComponentEditor.cs
- EndOfStreamException.cs
- ConfigurationStrings.cs
- WebPartEditorApplyVerb.cs
- DesignerInterfaces.cs
- printdlgexmarshaler.cs
- WebRequestModuleElement.cs
- ServicePointManager.cs
- Bidi.cs
- GridProviderWrapper.cs
- BaseDataList.cs
- PersonalizationProviderHelper.cs
- SpanIndex.cs
- DockProviderWrapper.cs
- SqlGatherProducedAliases.cs
- SqlConnection.cs
- SQLDecimalStorage.cs
- ProjectionPruner.cs
- ValueQuery.cs
- ExtendedTransformFactory.cs
- RecordsAffectedEventArgs.cs
- GeometryDrawing.cs
- PagesChangedEventArgs.cs
- RbTree.cs
- PublishLicense.cs
- BaseUriHelper.cs
- IdentityManager.cs
- PermissionRequestEvidence.cs
- TrackingValidationObjectDictionary.cs
- BamlRecordHelper.cs
- OdbcParameterCollection.cs
- XmlSchemaDatatype.cs
- DragDropHelper.cs
- ToolStripItemEventArgs.cs
- SoapRpcMethodAttribute.cs
- LinqDataSourceHelper.cs
- assemblycache.cs
- XmlBinaryReader.cs
- CellNormalizer.cs
- newinstructionaction.cs
- SID.cs
- GridViewPageEventArgs.cs
- RuleSettings.cs
- ParentUndoUnit.cs
- EncoderParameter.cs
- Point3DValueSerializer.cs
- TypeTypeConverter.cs
- HttpListenerResponse.cs
- SessionPageStateSection.cs
- EventMemberCodeDomSerializer.cs
- GlobalItem.cs
- HtmlAnchor.cs
- IISUnsafeMethods.cs
- BrushMappingModeValidation.cs
- LassoSelectionBehavior.cs
- SolidBrush.cs
- TemplatePartAttribute.cs
- SizeValueSerializer.cs
- RenameRuleObjectDialog.cs
- EditCommandColumn.cs