Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / PeerNodeAddress.cs / 1 / PeerNodeAddress.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Collections.Generic; using System.Globalization; using System.Collections.ObjectModel; using System.Net; using System.Runtime.Serialization; using System.ServiceModel.Channels; [DataContract(Name = "PeerNodeAddress", Namespace = PeerStrings.Namespace)] [KnownType(typeof(IPAddress[]))] public sealed class PeerNodeAddress { [DataMember(Name = "EndpointAddress")] internal EndpointAddress10 InnerEPR { get { return this.endpointAddress == null ? null : EndpointAddress10.FromEndpointAddress(this.endpointAddress); } set { this.endpointAddress = (value == null ? null : value.ToEndpointAddress()); } } EndpointAddress endpointAddress; string servicePath; ReadOnlyCollectionipAddresses; [DataMember(Name = "IPAddresses")] internal IList ipAddressesDataMember { get { return ipAddresses; } set { ipAddresses = new ReadOnlyCollection ((value == null) ? new IPAddress[0] : value); } } //NOTE: if a default constructor is provided, make sure to review ServicePath property getter. public PeerNodeAddress(EndpointAddress endpointAddress, ReadOnlyCollection ipAddresses) { if (endpointAddress == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("endpointAddress")); if (ipAddresses == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("ipAddresses")); Initialize(endpointAddress, ipAddresses); } void Initialize(EndpointAddress endpointAddress, ReadOnlyCollection ipAddresses) { this.endpointAddress = endpointAddress; servicePath = this.endpointAddress.Uri.PathAndQuery.ToUpperInvariant(); this.ipAddresses = ipAddresses; } public EndpointAddress EndpointAddress { get { return this.endpointAddress; } } internal string ServicePath { get { if (this.servicePath == null) { this.servicePath = this.endpointAddress.Uri.PathAndQuery.ToUpperInvariant(); } return this.servicePath; } } public ReadOnlyCollection IPAddresses { get { if (this.ipAddresses == null) { this.ipAddresses = new ReadOnlyCollection (new IPAddress[0]); } return this.ipAddresses; } } } } // 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
- ExternalException.cs
- CaseExpr.cs
- CodeDirectionExpression.cs
- SingleAnimationUsingKeyFrames.cs
- UndoEngine.cs
- CustomAttributeBuilder.cs
- StateWorkerRequest.cs
- X509CertificateCollection.cs
- StringBuilder.cs
- ResolveNameEventArgs.cs
- GuidelineCollection.cs
- webbrowsersite.cs
- ToolStripDropDownItemDesigner.cs
- DataGridViewCellStyleConverter.cs
- SizeChangedEventArgs.cs
- TextOutput.cs
- Accessible.cs
- ConfigurationManagerInternalFactory.cs
- HttpModuleCollection.cs
- WorkflowTerminatedException.cs
- documentsequencetextview.cs
- HtmlElementEventArgs.cs
- XmlSerializableReader.cs
- Visual3DCollection.cs
- HtmlForm.cs
- MasterPage.cs
- XmlSchemaGroup.cs
- NetworkInformationException.cs
- ObjectStorage.cs
- SafeArrayRankMismatchException.cs
- NotifyIcon.cs
- ExpandedWrapper.cs
- TextRunProperties.cs
- ListViewItemCollectionEditor.cs
- XPathAncestorQuery.cs
- KnownAssembliesSet.cs
- XmlSchemaAttribute.cs
- DbDeleteCommandTree.cs
- KeyEventArgs.cs
- OutputCacheEntry.cs
- Visual3DCollection.cs
- DocumentEventArgs.cs
- EnumerableCollectionView.cs
- PaperSource.cs
- PolyLineSegment.cs
- PreviewPageInfo.cs
- RuntimeArgumentHandle.cs
- ApplicationBuildProvider.cs
- SafeNativeMethods.cs
- DataObjectPastingEventArgs.cs
- RelationshipWrapper.cs
- ExpressionConverter.cs
- IPEndPointCollection.cs
- StylusTouchDevice.cs
- CompositeActivityValidator.cs
- ConversionContext.cs
- UnescapedXmlDiagnosticData.cs
- XhtmlCssHandler.cs
- DynamicField.cs
- AsmxEndpointPickerExtension.cs
- FrameworkContextData.cs
- BooleanAnimationBase.cs
- BaseCodePageEncoding.cs
- MembershipValidatePasswordEventArgs.cs
- RangeValidator.cs
- dsa.cs
- Error.cs
- DataGridCell.cs
- XmlSchemaInferenceException.cs
- AutomationElementIdentifiers.cs
- AssociationEndMember.cs
- ArrangedElement.cs
- CodeCatchClauseCollection.cs
- BeginSelectCardRequest.cs
- ParagraphVisual.cs
- EntityDesignerUtils.cs
- QilBinary.cs
- SqlUtils.cs
- LiteralControl.cs
- Token.cs
- PackagePartCollection.cs
- HttpHeaderCollection.cs
- SlotInfo.cs
- _OSSOCK.cs
- Condition.cs
- DbCommandTree.cs
- ValueTypeFixupInfo.cs
- OSFeature.cs
- LayoutInformation.cs
- XmlResolver.cs
- StateItem.cs
- cache.cs
- FilterEventArgs.cs
- IgnoreSectionHandler.cs
- CodeFieldReferenceExpression.cs
- CommentEmitter.cs
- FunctionParameter.cs
- TimelineClockCollection.cs
- DictionaryEntry.cs
- SqlDataSourceEnumerator.cs