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
- XmlBindingWorker.cs
- FixedHyperLink.cs
- BinaryConverter.cs
- XpsS0ValidatingLoader.cs
- CanonicalFormWriter.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- StateMachineHistory.cs
- HyperLink.cs
- XhtmlBasicPhoneCallAdapter.cs
- AppDomainManager.cs
- TextRangeEditTables.cs
- DragCompletedEventArgs.cs
- SqlDataSourceCommandEventArgs.cs
- WebCodeGenerator.cs
- DynamicValueConverter.cs
- EncodingNLS.cs
- Model3DGroup.cs
- NativeCppClassAttribute.cs
- UserControlFileEditor.cs
- ApplicationDirectoryMembershipCondition.cs
- VersionedStreamOwner.cs
- ImageAnimator.cs
- ListBoxAutomationPeer.cs
- DataGridRow.cs
- _CommandStream.cs
- ChangeNode.cs
- EventLogEntry.cs
- ConstructorExpr.cs
- EditingScopeUndoUnit.cs
- DataSourceGroupCollection.cs
- InputLanguageSource.cs
- DataGridTextColumn.cs
- SqlDataSourceCustomCommandEditor.cs
- FrameworkElementFactoryMarkupObject.cs
- PhonemeEventArgs.cs
- ComponentDispatcherThread.cs
- OleDbRowUpdatingEvent.cs
- DropDownHolder.cs
- KnownTypesHelper.cs
- RelativeSource.cs
- WebPartTracker.cs
- MethodBuilder.cs
- BackStopAuthenticationModule.cs
- DrawListViewColumnHeaderEventArgs.cs
- ToolStripOverflow.cs
- ZipIOCentralDirectoryFileHeader.cs
- QilPatternVisitor.cs
- MouseCaptureWithinProperty.cs
- ObjectConverter.cs
- Activity.cs
- DescendantOverDescendantQuery.cs
- QuestionEventArgs.cs
- ProfileInfo.cs
- ACE.cs
- Claim.cs
- MulticastNotSupportedException.cs
- InfoCardBaseException.cs
- Util.cs
- ExpressionEditorAttribute.cs
- ZipIOLocalFileBlock.cs
- ReadOnlyDataSourceView.cs
- Privilege.cs
- UnsafeNativeMethods.cs
- AutoResetEvent.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ListBoxItemAutomationPeer.cs
- SqlTransaction.cs
- AbstractExpressions.cs
- PassportIdentity.cs
- TransformerConfigurationWizardBase.cs
- BrowserDefinitionCollection.cs
- RuntimeWrappedException.cs
- AppearanceEditorPart.cs
- SequenceNumber.cs
- ListChangedEventArgs.cs
- XmlCodeExporter.cs
- DelayedRegex.cs
- FrameworkContextData.cs
- RightsManagementInformation.cs
- hebrewshape.cs
- NameScopePropertyAttribute.cs
- AsnEncodedData.cs
- DataObjectEventArgs.cs
- SortFieldComparer.cs
- DataGridViewCellStyleConverter.cs
- UidManager.cs
- QueryContext.cs
- AssemblyNameProxy.cs
- TableItemStyle.cs
- DecimalAnimationUsingKeyFrames.cs
- UnsafeNativeMethods.cs
- LinkedList.cs
- XmlSequenceWriter.cs
- SymbolType.cs
- TextUtf8RawTextWriter.cs
- LambdaCompiler.ControlFlow.cs
- SoapIgnoreAttribute.cs
- CompensatableSequenceActivity.cs
- ProcessModelSection.cs
- DesignerRegionMouseEventArgs.cs