Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / AddressingVersion.cs / 1 / AddressingVersion.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Runtime.Serialization; using System.Xml; using System.ServiceModel.Security; public sealed class AddressingVersion { string ns; XmlDictionaryString dictionaryNs; MessagePartSpecification signedMessageParts; string toStringFormat; string anonymous; XmlDictionaryString dictionaryAnonymous; Uri anonymousUri; Uri noneUri; string faultAction; string defaultFaultAction; static AddressingVersion none = new AddressingVersion(AddressingNoneStrings.Namespace, XD.AddressingNoneDictionary.Namespace, SR.AddressingNoneToStringFormat, new MessagePartSpecification(), null, null, null, null, null); static AddressingVersion addressing10 = new AddressingVersion(Addressing10Strings.Namespace, XD.Addressing10Dictionary.Namespace, SR.Addressing10ToStringFormat, Addressing10SignedMessageParts, Addressing10Strings.Anonymous, XD.Addressing10Dictionary.Anonymous, Addressing10Strings.NoneAddress, Addressing10Strings.FaultAction, Addressing10Strings.DefaultFaultAction); static MessagePartSpecification addressing10SignedMessageParts; static AddressingVersion addressing200408 = new AddressingVersion(Addressing200408Strings.Namespace, XD.Addressing200408Dictionary.Namespace, SR.Addressing200408ToStringFormat, Addressing200408SignedMessageParts, Addressing200408Strings.Anonymous, XD.Addressing200408Dictionary.Anonymous, null, Addressing200408Strings.FaultAction, Addressing200408Strings.DefaultFaultAction); static MessagePartSpecification addressing200408SignedMessageParts; AddressingVersion(string ns, XmlDictionaryString dictionaryNs, string toStringFormat, MessagePartSpecification signedMessageParts, string anonymous, XmlDictionaryString dictionaryAnonymous, string none, string faultAction, string defaultFaultAction) { this.ns = ns; this.dictionaryNs = dictionaryNs; this.toStringFormat = toStringFormat; this.signedMessageParts = signedMessageParts; this.anonymous = anonymous; this.dictionaryAnonymous = dictionaryAnonymous; if (anonymous != null) { this.anonymousUri = new Uri(anonymous); } if (none != null) { this.noneUri = new Uri(none); } this.faultAction = faultAction; this.defaultFaultAction = defaultFaultAction; } public static AddressingVersion WSAddressingAugust2004 { get { return addressing200408; } } public static AddressingVersion WSAddressing10 { get { return addressing10; } } public static AddressingVersion None { get { return none; } } internal string Namespace { get { return ns; } } static MessagePartSpecification Addressing10SignedMessageParts { get { if (addressing10SignedMessageParts == null) { MessagePartSpecification s = new MessagePartSpecification( new XmlQualifiedName(AddressingStrings.To, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.From, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.FaultTo, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.ReplyTo, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.MessageId, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.RelatesTo, Addressing10Strings.Namespace), new XmlQualifiedName(AddressingStrings.Action, Addressing10Strings.Namespace) ); s.MakeReadOnly(); addressing10SignedMessageParts = s; } return addressing10SignedMessageParts; } } static MessagePartSpecification Addressing200408SignedMessageParts { get { if (addressing200408SignedMessageParts == null) { MessagePartSpecification s = new MessagePartSpecification( new XmlQualifiedName(AddressingStrings.To, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.From, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.FaultTo, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.ReplyTo, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.MessageId, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.RelatesTo, Addressing200408Strings.Namespace), new XmlQualifiedName(AddressingStrings.Action, Addressing200408Strings.Namespace) ); s.MakeReadOnly(); addressing200408SignedMessageParts = s; } return addressing200408SignedMessageParts; } } internal XmlDictionaryString DictionaryNamespace { get { return dictionaryNs; } } internal string Anonymous { get { return anonymous; } } internal XmlDictionaryString DictionaryAnonymous { get { return dictionaryAnonymous; } } internal Uri AnonymousUri { get { return anonymousUri; } } internal Uri NoneUri { get { return noneUri; } } internal string FaultAction // the action for addressing faults { get { return faultAction; } } internal string DefaultFaultAction // a default string that can be used for non-addressing faults { get { return defaultFaultAction; } } internal MessagePartSpecification SignedMessageParts { get { return this.signedMessageParts; } } public override string ToString() { return SR.GetString(toStringFormat, Namespace); } } } // 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
- ItemCollection.cs
- GeneralTransform2DTo3D.cs
- DiagnosticsConfiguration.cs
- SqlDataSource.cs
- UIElementHelper.cs
- ProgressBarRenderer.cs
- UIElementParagraph.cs
- TokenBasedSetEnumerator.cs
- compensatingcollection.cs
- NavigationProperty.cs
- RadialGradientBrush.cs
- PointLightBase.cs
- FixedTextContainer.cs
- ThicknessAnimationBase.cs
- PlainXmlWriter.cs
- WindowsUpDown.cs
- FilterUserControlBase.cs
- X509Chain.cs
- PropertyGridEditorPart.cs
- TriggerAction.cs
- SafeBitVector32.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- Convert.cs
- PageHandlerFactory.cs
- Pair.cs
- DesignTimeTemplateParser.cs
- TextLineBreak.cs
- TogglePatternIdentifiers.cs
- XPathNodeHelper.cs
- OpenTypeLayoutCache.cs
- DesignParameter.cs
- AffineTransform3D.cs
- VisualStyleTypesAndProperties.cs
- DocobjHost.cs
- CollectionType.cs
- CacheDependency.cs
- EmbossBitmapEffect.cs
- PageAdapter.cs
- DefaultAsyncDataDispatcher.cs
- ClientConfigurationHost.cs
- MenuItem.cs
- MethodInfo.cs
- UIElement.cs
- Attributes.cs
- Compiler.cs
- ServiceProviders.cs
- TimelineGroup.cs
- StringSource.cs
- IntegrationExceptionEventArgs.cs
- DbConnectionClosed.cs
- ActivityBindForm.Designer.cs
- DictionaryGlobals.cs
- Resources.Designer.cs
- SimpleNameService.cs
- ColorConverter.cs
- WsdlInspector.cs
- ExpandCollapsePattern.cs
- UniqueConstraint.cs
- _Events.cs
- AccessDataSourceWizardForm.cs
- Transaction.cs
- CapabilitiesAssignment.cs
- EqualityComparer.cs
- DataViewManager.cs
- SecurityTokenResolver.cs
- ItemsPresenter.cs
- COAUTHIDENTITY.cs
- ConsumerConnectionPointCollection.cs
- ContourSegment.cs
- DesignerProperties.cs
- DeploymentSection.cs
- GlobalEventManager.cs
- WebPartManagerInternals.cs
- CorrelationValidator.cs
- WindowsTooltip.cs
- CodeTypeDelegate.cs
- DecimalConverter.cs
- srgsitem.cs
- CustomAttributeFormatException.cs
- SchemaElement.cs
- Monitor.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- WebPartExportVerb.cs
- Int32Animation.cs
- MimeFormatExtensions.cs
- PropertyDescriptorCollection.cs
- EventToken.cs
- DecoratedNameAttribute.cs
- InheritablePropertyChangeInfo.cs
- NodeFunctions.cs
- PolyLineSegmentFigureLogic.cs
- UIHelper.cs
- SqlRowUpdatedEvent.cs
- TimeSpanSecondsConverter.cs
- HttpFileCollection.cs
- UniqueID.cs
- MessageQueueException.cs
- OleDbCommandBuilder.cs
- ZipArchive.cs
- XmlSchemaParticle.cs