Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Dispatcher / XmlFormatMapping.cs / 1305376 / XmlFormatMapping.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Dispatcher { using System.Collections.Generic; using System.ServiceModel.Channels; using System.ServiceModel.Web; using System.Text; using System.Xml; class XmlFormatMapping : MultiplexingFormatMapping { public static readonly WebContentFormat WebContentFormat = WebContentFormat.Xml; internal static readonly string defaultMediaType = "application/xml"; static Dictionaryencoders = new Dictionary (); static object thisLock = new object(); public XmlFormatMapping(Encoding writeEncoding, WebContentTypeMapper contentTypeMapper) : base(writeEncoding, contentTypeMapper) { } public override WebContentFormat ContentFormat { get { return XmlFormatMapping.WebContentFormat; } } public override WebMessageFormat MessageFormat { get { return WebMessageFormat.Xml; } } public override string DefaultMediaType { get { return XmlFormatMapping.defaultMediaType; } } protected override MessageEncoder Encoder { get { lock (thisLock) { if (!XmlFormatMapping.encoders.ContainsKey(this.writeEncoding)) { XmlFormatMapping.encoders[this.writeEncoding] = new TextMessageEncoderFactory(MessageVersion.None, this.writeEncoding, 0, 0, new XmlDictionaryReaderQuotas()).Encoder; } } return XmlFormatMapping.encoders[this.writeEncoding]; } } } } // 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
- APCustomTypeDescriptor.cs
- MasterPageBuildProvider.cs
- SecondaryViewProvider.cs
- ColumnWidthChangingEvent.cs
- SystemMulticastIPAddressInformation.cs
- AutomationIdentifierGuids.cs
- UrlPropertyAttribute.cs
- ApplicationId.cs
- HashFinalRequest.cs
- WebPartZoneBase.cs
- RawStylusInputCustomDataList.cs
- NetDataContractSerializer.cs
- SoapFault.cs
- SettingsAttributeDictionary.cs
- RichTextBox.cs
- CFStream.cs
- DaylightTime.cs
- Encoder.cs
- SystemIPGlobalProperties.cs
- TreeNodeConverter.cs
- PeerCustomResolverBindingElement.cs
- PasswordBoxAutomationPeer.cs
- ListView.cs
- TagMapInfo.cs
- UserControlParser.cs
- FontConverter.cs
- SafeBitVector32.cs
- ContextItemManager.cs
- MD5.cs
- CompositionCommandSet.cs
- ShutDownListener.cs
- LinkDescriptor.cs
- COM2PropertyBuilderUITypeEditor.cs
- ListSortDescriptionCollection.cs
- ArrayEditor.cs
- StateMachine.cs
- LinqDataSourceView.cs
- RuleInfoComparer.cs
- RealizationDrawingContextWalker.cs
- ButtonFieldBase.cs
- LogExtentCollection.cs
- UnmanagedMarshal.cs
- ToolStripScrollButton.cs
- ContentType.cs
- InternalPermissions.cs
- ImageSourceConverter.cs
- Viewport3DVisual.cs
- TraceData.cs
- CheckedPointers.cs
- DataGridViewImageCell.cs
- EventLogReader.cs
- VerticalConnector.xaml.cs
- HMACMD5.cs
- InstanceContextManager.cs
- LinearKeyFrames.cs
- ToolStripControlHost.cs
- AnnotationComponentChooser.cs
- WebPartZoneAutoFormat.cs
- FileLogRecordEnumerator.cs
- PrimitiveDataContract.cs
- _HeaderInfoTable.cs
- DbConnectionFactory.cs
- TransportContext.cs
- OracleDataReader.cs
- RankException.cs
- Margins.cs
- SourceSwitch.cs
- DataSourceCache.cs
- RuntimeIdentifierPropertyAttribute.cs
- OrthographicCamera.cs
- CompositeDispatchFormatter.cs
- ReadWriteSpinLock.cs
- OleDbCommandBuilder.cs
- DataGridViewDataErrorEventArgs.cs
- SqlBuffer.cs
- PropertyConverter.cs
- MenuBindingsEditorForm.cs
- DynamicExpression.cs
- TaskSchedulerException.cs
- SQLByteStorage.cs
- NullableConverter.cs
- LinqDataSourceDeleteEventArgs.cs
- ActivityCollectionMarkupSerializer.cs
- OutOfProcStateClientManager.cs
- GenericWebPart.cs
- BamlBinaryReader.cs
- SubclassTypeValidatorAttribute.cs
- PropertyValueUIItem.cs
- TagMapCollection.cs
- TreeViewImageKeyConverter.cs
- EventManager.cs
- CachedPathData.cs
- MulticastOption.cs
- BamlRecordWriter.cs
- GACIdentityPermission.cs
- ProcessHost.cs
- SQLBytes.cs
- FlowDocumentFormatter.cs
- ViewBase.cs
- WebBrowserProgressChangedEventHandler.cs