Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Description / ServiceEndpointCollection.cs / 1 / ServiceEndpointCollection.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Description { using System.ServiceModel; using System.ServiceModel.Channels; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Xml; using System.Runtime.Serialization; public class ServiceEndpointCollection : Collection{ internal ServiceEndpointCollection() { } public ServiceEndpoint Find(Type contractType) { if (contractType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType"); } foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.ContractType == contractType) { return endpoint; } } return null; } public ServiceEndpoint Find(XmlQualifiedName contractName) { if (contractName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractName"); } foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.Name == contractName.Name && endpoint.Contract.Namespace == contractName.Namespace) { return endpoint; } } return null; } public ServiceEndpoint Find(Type contractType, XmlQualifiedName bindingName) { if (contractType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType"); } if (bindingName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("bindingName"); } foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.ContractType == contractType && endpoint.Binding.Name == bindingName.Name && endpoint.Binding.Namespace == bindingName.Namespace) { return endpoint; } } return null; } public ServiceEndpoint Find(XmlQualifiedName contractName, XmlQualifiedName bindingName) { if (contractName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractName"); } if (bindingName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("bindingName"); } foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.Name == contractName.Name && endpoint.Contract.Namespace == contractName.Namespace && endpoint.Binding.Name == bindingName.Name && endpoint.Binding.Namespace == bindingName.Namespace) { return endpoint; } } return null; } public ServiceEndpoint Find(Uri address) { if (address == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("address"); } foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Address.Uri == address) { return endpoint; } } return null; } public Collection FindAll(Type contractType) { if (contractType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType"); } Collection results = new Collection (); foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.ContractType == contractType) { results.Add(endpoint); } } return results; } public Collection FindAll(XmlQualifiedName contractName) { if (contractName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractName"); } Collection results = new Collection (); foreach (ServiceEndpoint endpoint in this) { if (endpoint != null && endpoint.Contract.Name == contractName.Name && endpoint.Contract.Namespace == contractName.Namespace) { results.Add(endpoint); } } return results; } protected override void InsertItem(int index, ServiceEndpoint item) { if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } base.InsertItem(index, item); } protected override void SetItem(int index, ServiceEndpoint item) { if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } base.SetItem(index, item); } } } // 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
- CultureInfoConverter.cs
- BamlResourceContent.cs
- SqlTypesSchemaImporter.cs
- XmlTypeAttribute.cs
- RestHandler.cs
- DataGridViewCellMouseEventArgs.cs
- CqlWriter.cs
- TemplateApplicationHelper.cs
- XmlReader.cs
- FunctionCommandText.cs
- DocumentStatusResources.cs
- ActiveXHelper.cs
- WindowsMenu.cs
- DeploymentSection.cs
- BaseCollection.cs
- validationstate.cs
- ShaperBuffers.cs
- ResourcesGenerator.cs
- WorkflowQueueInfo.cs
- RuntimeHelpers.cs
- DocumentApplicationState.cs
- TransportContext.cs
- DataGridTextColumn.cs
- DataSourceProvider.cs
- DataGridViewSelectedRowCollection.cs
- KnownBoxes.cs
- ResourceDisplayNameAttribute.cs
- FocusWithinProperty.cs
- Internal.cs
- MediaPlayer.cs
- NonParentingControl.cs
- ColumnResizeUndoUnit.cs
- ClaimComparer.cs
- SynchronizationValidator.cs
- MimePart.cs
- ResourcesGenerator.cs
- GroupItemAutomationPeer.cs
- PropertyBuilder.cs
- ResizeGrip.cs
- ClientTarget.cs
- SoapSchemaMember.cs
- TrackingQueryElement.cs
- ExpressionBuilder.cs
- LocationEnvironment.cs
- Input.cs
- TextTreeDeleteContentUndoUnit.cs
- ConnectionsZone.cs
- Rotation3D.cs
- SystemFonts.cs
- ExpandedProjectionNode.cs
- ClaimTypeElement.cs
- LogicalTreeHelper.cs
- ObjectStateManager.cs
- XmlQueryCardinality.cs
- MembershipPasswordException.cs
- RightsManagementInformation.cs
- HitTestWithGeometryDrawingContextWalker.cs
- FormatterConverter.cs
- AppDomainUnloadedException.cs
- TableItemStyle.cs
- HeaderedContentControl.cs
- baseaxisquery.cs
- SqlDataSourceCache.cs
- HandledEventArgs.cs
- InfoCardTrace.cs
- VisualStyleRenderer.cs
- RotateTransform3D.cs
- ServerValidateEventArgs.cs
- DataGridViewCellValueEventArgs.cs
- CodeParameterDeclarationExpression.cs
- ExtensionFile.cs
- XmlChildEnumerator.cs
- ObjectContextServiceProvider.cs
- Style.cs
- ValidatingPropertiesEventArgs.cs
- IndividualDeviceConfig.cs
- LocatorPart.cs
- DescendantQuery.cs
- RenderDataDrawingContext.cs
- COM2IProvidePropertyBuilderHandler.cs
- ResourceExpressionBuilder.cs
- BitmapEffectGroup.cs
- PropertyMetadata.cs
- isolationinterop.cs
- LinqDataSourceDeleteEventArgs.cs
- TextSchema.cs
- Trace.cs
- GridItemPatternIdentifiers.cs
- HierarchicalDataSourceConverter.cs
- UnsafeNativeMethods.cs
- ColorConverter.cs
- CacheVirtualItemsEvent.cs
- Journaling.cs
- DataTableReader.cs
- TypeName.cs
- Image.cs
- XamlBrushSerializer.cs
- Pool.cs
- WebMessageBodyStyleHelper.cs
- FixedPage.cs