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
- SqlDataSourceView.cs
- ItemsControl.cs
- BaseProcessProtocolHandler.cs
- LZCodec.cs
- RuntimeWrappedException.cs
- HttpBrowserCapabilitiesWrapper.cs
- TransformGroup.cs
- MenuRendererClassic.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- PeerNearMe.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- AccessibleObject.cs
- VirtualPathUtility.cs
- DataGridViewCell.cs
- Column.cs
- WebPartEditorCancelVerb.cs
- DesignerActionItemCollection.cs
- RowType.cs
- AxHostDesigner.cs
- XmlEntityReference.cs
- HierarchicalDataTemplate.cs
- CfgRule.cs
- HexParser.cs
- CachedTypeface.cs
- AmbiguousMatchException.cs
- TextRangeEditTables.cs
- ReliabilityContractAttribute.cs
- TimeSpanOrInfiniteValidator.cs
- CultureMapper.cs
- SymmetricAlgorithm.cs
- smtpconnection.cs
- PagerStyle.cs
- SqlCrossApplyToCrossJoin.cs
- TextBox.cs
- ListControlBuilder.cs
- DoubleLink.cs
- ExtractedStateEntry.cs
- OleDbWrapper.cs
- Maps.cs
- SqlCachedBuffer.cs
- DataPagerCommandEventArgs.cs
- SQLMoneyStorage.cs
- Int64Animation.cs
- ColumnClickEvent.cs
- Tuple.cs
- Win32Native.cs
- StructureChangedEventArgs.cs
- PathFigureCollectionConverter.cs
- BufferBuilder.cs
- CustomAttribute.cs
- TextServicesContext.cs
- CoreSwitches.cs
- UpdateProgress.cs
- ScriptControlManager.cs
- SimpleLine.cs
- WebServiceData.cs
- TypeDescriptorFilterService.cs
- SystemColors.cs
- XmlParserContext.cs
- Formatter.cs
- HeaderUtility.cs
- StrongNameKeyPair.cs
- UntypedNullExpression.cs
- SecuritySessionServerSettings.cs
- DataGridTablesFactory.cs
- HttpCookiesSection.cs
- KeyedPriorityQueue.cs
- OdbcDataReader.cs
- ExpressionBinding.cs
- DetailsViewDeletedEventArgs.cs
- DataSourceSerializationException.cs
- DynamicMetaObject.cs
- ClientBuildManager.cs
- Rectangle.cs
- ZipArchive.cs
- DbConnectionClosed.cs
- PropertyTab.cs
- mediapermission.cs
- IImplicitResourceProvider.cs
- ByValueEqualityComparer.cs
- NodeInfo.cs
- ObjectParameterCollection.cs
- BindingMemberInfo.cs
- DbLambda.cs
- DataReceivedEventArgs.cs
- DataRecordInfo.cs
- HtmlString.cs
- CompositeDataBoundControl.cs
- WindowsGraphics2.cs
- Binding.cs
- AutoFocusStyle.xaml.cs
- Soap.cs
- Timeline.cs
- AsyncStreamReader.cs
- CompilerError.cs
- dbdatarecord.cs
- ValidatorUtils.cs
- translator.cs
- HtmlTableCell.cs
- AdapterUtil.cs