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
- TypeElementCollection.cs
- ReferenceEqualityComparer.cs
- ArithmeticException.cs
- StateItem.cs
- SiteMapHierarchicalDataSourceView.cs
- Inline.cs
- AccessDataSourceView.cs
- DmlSqlGenerator.cs
- XmlSchemaSimpleContentRestriction.cs
- HttpHandlerActionCollection.cs
- ThreadAbortException.cs
- InProcStateClientManager.cs
- PropertyInformation.cs
- TextBoxDesigner.cs
- UnSafeCharBuffer.cs
- MarshalByValueComponent.cs
- ACL.cs
- DbConnectionPoolOptions.cs
- DataTableCollection.cs
- EUCJPEncoding.cs
- NonSerializedAttribute.cs
- ObjectItemAttributeAssemblyLoader.cs
- WebControl.cs
- WebPartManager.cs
- DbCommandTree.cs
- XamlReaderHelper.cs
- DBPropSet.cs
- Membership.cs
- EnumUnknown.cs
- HttpChannelBindingToken.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataGridParentRows.cs
- NgenServicingAttributes.cs
- ObjectConverter.cs
- DesignerDeviceConfig.cs
- IdnMapping.cs
- GroupByExpressionRewriter.cs
- ToolStripPanelRenderEventArgs.cs
- MetafileHeaderEmf.cs
- RelationshipNavigation.cs
- GeometryModel3D.cs
- AssociatedControlConverter.cs
- ProcessHostMapPath.cs
- TextOptions.cs
- ArcSegment.cs
- Switch.cs
- HyperLink.cs
- Annotation.cs
- SqlCommandSet.cs
- Drawing.cs
- PolyBezierSegmentFigureLogic.cs
- TcpClientSocketManager.cs
- GPStream.cs
- PictureBox.cs
- SafeViewOfFileHandle.cs
- JsonMessageEncoderFactory.cs
- ExpressionPrinter.cs
- Empty.cs
- SharedPerformanceCounter.cs
- RenderCapability.cs
- SqlDataSourceRefreshSchemaForm.cs
- CommandHelpers.cs
- StaticFileHandler.cs
- DateTimeValueSerializerContext.cs
- DocumentXmlWriter.cs
- FixUp.cs
- CultureTable.cs
- Math.cs
- SourceChangedEventArgs.cs
- DataContract.cs
- AssemblySettingAttributes.cs
- HashCodeCombiner.cs
- SqlRetyper.cs
- VisualStyleRenderer.cs
- IndicShape.cs
- RtfToXamlReader.cs
- DeviceSpecific.cs
- CriticalExceptions.cs
- StorageAssociationTypeMapping.cs
- Properties.cs
- ArgumentNullException.cs
- Int16AnimationUsingKeyFrames.cs
- ConfigurationStrings.cs
- ComponentRenameEvent.cs
- DnsPermission.cs
- EUCJPEncoding.cs
- SynchronizationContext.cs
- InternalConfigConfigurationFactory.cs
- Math.cs
- Brush.cs
- DrawItemEvent.cs
- TextSelectionHelper.cs
- CompiledAction.cs
- _ContextAwareResult.cs
- XamlReaderHelper.cs
- WebPartMenu.cs
- DesignTimeXamlWriter.cs
- TableRow.cs
- CompilerInfo.cs
- MessagePartDescriptionCollection.cs