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
- ColorConverter.cs
- MemberInitExpression.cs
- TimerEventSubscription.cs
- BaseDataList.cs
- _SpnDictionary.cs
- TouchFrameEventArgs.cs
- AsyncResult.cs
- DESCryptoServiceProvider.cs
- MouseEventArgs.cs
- DataBindingExpressionBuilder.cs
- DefaultBinder.cs
- PropertyRef.cs
- ContractNamespaceAttribute.cs
- SqlProfileProvider.cs
- FileAuthorizationModule.cs
- Rules.cs
- Query.cs
- FileDialog.cs
- MethodRental.cs
- RsaSecurityToken.cs
- WindowsListViewItemCheckBox.cs
- ElementFactory.cs
- InheritanceRules.cs
- PassportAuthenticationEventArgs.cs
- ListBoxItem.cs
- ThicknessAnimationBase.cs
- FormViewUpdatedEventArgs.cs
- CheckBoxPopupAdapter.cs
- DataGridTextBox.cs
- Helper.cs
- AsymmetricSignatureFormatter.cs
- ComponentCollection.cs
- CookieParameter.cs
- PrimarySelectionGlyph.cs
- SerializationObjectManager.cs
- GlyphElement.cs
- NumberFormatter.cs
- MenuItemBinding.cs
- BaseUriHelper.cs
- QueryExpression.cs
- DesignerAutoFormatStyle.cs
- SafeNativeMethods.cs
- URL.cs
- StdValidatorsAndConverters.cs
- PersonalizationProviderCollection.cs
- TableDetailsCollection.cs
- SEHException.cs
- TitleStyle.cs
- XmlSchemaComplexType.cs
- TextDecorationUnitValidation.cs
- WebPartEditVerb.cs
- X509WindowsSecurityToken.cs
- DbProviderFactoriesConfigurationHandler.cs
- DesignOnlyAttribute.cs
- PrintPreviewGraphics.cs
- ChameleonKey.cs
- ToolboxDataAttribute.cs
- TabletCollection.cs
- LocationUpdates.cs
- TraceRecord.cs
- DocumentGrid.cs
- MobileListItem.cs
- DataGridView.cs
- List.cs
- GenericTypeParameterBuilder.cs
- NumberFormatter.cs
- DecimalFormatter.cs
- BevelBitmapEffect.cs
- BrushMappingModeValidation.cs
- InputLanguage.cs
- Point3DAnimationUsingKeyFrames.cs
- SourceFileBuildProvider.cs
- XmlJsonWriter.cs
- ClipboardData.cs
- OneOfElement.cs
- FtpCachePolicyElement.cs
- ComponentChangedEvent.cs
- BamlLocalizer.cs
- UserControlCodeDomTreeGenerator.cs
- XmlSchemaGroupRef.cs
- _UriSyntax.cs
- invalidudtexception.cs
- DataTable.cs
- SoapHeaders.cs
- ListViewInsertEventArgs.cs
- ObjectDisposedException.cs
- DiscoveryDocumentLinksPattern.cs
- SchemaHelper.cs
- FontResourceCache.cs
- Profiler.cs
- FamilyTypeface.cs
- FormViewDesigner.cs
- DPTypeDescriptorContext.cs
- PromptEventArgs.cs
- GuidelineSet.cs
- DataGridViewComboBoxEditingControl.cs
- SingleAnimationBase.cs
- LogStore.cs
- OleDbEnumerator.cs
- WebSysDefaultValueAttribute.cs