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
- ManipulationStartingEventArgs.cs
- MarshalDirectiveException.cs
- PeerResolverMode.cs
- PropertyIdentifier.cs
- Menu.cs
- ContentDisposition.cs
- XDRSchema.cs
- XmlSchemaComplexContentRestriction.cs
- XmlRootAttribute.cs
- OrderedDictionary.cs
- AppPool.cs
- ListenerElementsCollection.cs
- DecoderExceptionFallback.cs
- Win32Exception.cs
- JsonByteArrayDataContract.cs
- ValidationPropertyAttribute.cs
- KeyPressEvent.cs
- WebConvert.cs
- ActivityDesignerAccessibleObject.cs
- AsyncPostBackTrigger.cs
- SafePEFileHandle.cs
- LiteralSubsegment.cs
- Size.cs
- GlobalProxySelection.cs
- TableLayoutSettingsTypeConverter.cs
- ConsoleTraceListener.cs
- ReturnEventArgs.cs
- TrackingRecord.cs
- CompilationSection.cs
- UIElement3DAutomationPeer.cs
- DiagnosticTraceSource.cs
- RequestTimeoutManager.cs
- CommonObjectSecurity.cs
- FacetDescription.cs
- RenderCapability.cs
- DefaultBindingPropertyAttribute.cs
- StandardCommands.cs
- XamlToRtfWriter.cs
- EntitySetRetriever.cs
- DSGeneratorProblem.cs
- XmlEntity.cs
- Menu.cs
- ScriptModule.cs
- SQLGuidStorage.cs
- _LoggingObject.cs
- OleServicesContext.cs
- DataGridPagerStyle.cs
- BasicHttpSecurityElement.cs
- DesignTimeTemplateParser.cs
- DbCommandTree.cs
- FieldToken.cs
- PhotoPrintingIntent.cs
- DesignerCommandAdapter.cs
- PersonalizationDictionary.cs
- DefaultValidator.cs
- StandardRuntimeEnumValidator.cs
- DirectoryLocalQuery.cs
- Tokenizer.cs
- BinaryParser.cs
- AlphaSortedEnumConverter.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- XmlNodeList.cs
- smtppermission.cs
- ArgumentOutOfRangeException.cs
- ThousandthOfEmRealDoubles.cs
- LineServices.cs
- ReferencedCollectionType.cs
- ScrollEvent.cs
- CharacterShapingProperties.cs
- StateMachineWorkflow.cs
- FileDialogCustomPlace.cs
- MissingMemberException.cs
- SqlDataReaderSmi.cs
- HtmlInputText.cs
- FormViewRow.cs
- SamlAudienceRestrictionCondition.cs
- ProvidersHelper.cs
- TextInfo.cs
- AccessorTable.cs
- SaveFileDialog.cs
- IODescriptionAttribute.cs
- QuaternionRotation3D.cs
- FixedSOMTableCell.cs
- DrawListViewSubItemEventArgs.cs
- ArgumentValueSerializer.cs
- InkCanvasSelectionAdorner.cs
- BaseComponentEditor.cs
- StrongName.cs
- ShaderRenderModeValidation.cs
- Part.cs
- ParagraphResult.cs
- ConnectionPoint.cs
- XmlAttributeOverrides.cs
- DataTableReader.cs
- QilList.cs
- OdbcConnectionString.cs
- XmlObjectSerializerWriteContext.cs
- DataServiceProcessingPipeline.cs
- TypeBuilder.cs
- TableLayoutSettingsTypeConverter.cs