Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Discovery / System / ServiceModel / Discovery / DynamicEndpoint.cs / 1305376 / DynamicEndpoint.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Discovery { using System.ServiceModel; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.Runtime; using System.Xml; [Fx.Tag.XamlVisible(false)] public class DynamicEndpoint : ServiceEndpoint { DiscoveryClientBindingElement discoveryClientBindingElement; internal DynamicEndpoint(ContractDescription contract) : base(contract, null, DiscoveryClientBindingElement.DiscoveryEndpointAddress) { this.discoveryClientBindingElement = new DiscoveryClientBindingElement(); } public DynamicEndpoint(ContractDescription contract, Binding binding) : base(contract, binding, DiscoveryClientBindingElement.DiscoveryEndpointAddress) { if (binding == null) { throw FxTrace.Exception.ArgumentNull("binding"); } this.discoveryClientBindingElement = new DiscoveryClientBindingElement(); if (this.ValidateAndInsertDiscoveryClientBindingElement(binding)) { this.FindCriteria.ContractTypeNames.Add( new XmlQualifiedName(contract.Name, contract.Namespace)); } else { throw FxTrace.Exception.Argument( "binding", SR.DiscoveryClientBindingElementPresentInDynamicEndpoint); } } public DiscoveryEndpointProvider DiscoveryEndpointProvider { get { return this.discoveryClientBindingElement.DiscoveryEndpointProvider; } set { if (value == null) { throw FxTrace.Exception.ArgumentNull("value"); } this.discoveryClientBindingElement.DiscoveryEndpointProvider = value; } } public FindCriteria FindCriteria { get { return this.discoveryClientBindingElement.FindCriteria; } set { if (value == null) { throw FxTrace.Exception.ArgumentNull("value"); } this.discoveryClientBindingElement.FindCriteria = value; } } internal bool ValidateAndInsertDiscoveryClientBindingElement(Binding binding) { CustomBinding customBinding = new CustomBinding(binding); if (customBinding.Elements.Find() == null) { customBinding.Elements.Insert(0, this.discoveryClientBindingElement); this.Binding = customBinding; return true; } else { return false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlBaseReader.cs
- CompilationUtil.cs
- QueryStatement.cs
- NativeMethodsCLR.cs
- MouseGestureValueSerializer.cs
- XmlUtil.cs
- MethodToken.cs
- EventLogPermissionEntry.cs
- StateMachineSubscriptionManager.cs
- BindableTemplateBuilder.cs
- TemplateControlBuildProvider.cs
- TargetParameterCountException.cs
- linebase.cs
- SamlAuthorizationDecisionStatement.cs
- PropertyMapper.cs
- querybuilder.cs
- ReflectPropertyDescriptor.cs
- FirstMatchCodeGroup.cs
- X509UI.cs
- ConfigXmlAttribute.cs
- FixedFlowMap.cs
- ScopeCompiler.cs
- Interlocked.cs
- PolyLineSegmentFigureLogic.cs
- GroupAggregateExpr.cs
- DataGridViewColumnStateChangedEventArgs.cs
- base64Transforms.cs
- ItemAutomationPeer.cs
- PointCollection.cs
- RequiredArgumentAttribute.cs
- RIPEMD160Managed.cs
- ResourceCategoryAttribute.cs
- TableRowGroup.cs
- BindingCompleteEventArgs.cs
- PerformanceCounterNameAttribute.cs
- EncryptedHeader.cs
- sqlmetadatafactory.cs
- SBCSCodePageEncoding.cs
- EndpointFilterProvider.cs
- ListDictionaryInternal.cs
- SiteMapProvider.cs
- Graphics.cs
- ContentControl.cs
- pingexception.cs
- ExpressionBuilderCollection.cs
- EpmCustomContentWriterNodeData.cs
- ReachDocumentReferenceSerializer.cs
- HTMLTextWriter.cs
- HashAlgorithm.cs
- DataGridView.cs
- metrodevice.cs
- TextAnchor.cs
- Transform.cs
- ArrayConverter.cs
- TableLayoutStyleCollection.cs
- ProcessProtocolHandler.cs
- InfoCardKeyedHashAlgorithm.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- PageCatalogPart.cs
- BuildProviderCollection.cs
- RemotingAttributes.cs
- MexTcpBindingElement.cs
- TextInfo.cs
- SynchronousReceiveBehavior.cs
- ApplicationException.cs
- RadioButton.cs
- EntitySetDataBindingList.cs
- SID.cs
- X509CertificateClaimSet.cs
- CounterSample.cs
- NavigationEventArgs.cs
- RoamingStoreFileUtility.cs
- ExpressionBuilder.cs
- WindowsFormsSectionHandler.cs
- ArrangedElement.cs
- WebException.cs
- BinaryWriter.cs
- DesignerTransactionCloseEvent.cs
- CalendarDayButton.cs
- WebConfigurationManager.cs
- CaseInsensitiveHashCodeProvider.cs
- RandomNumberGenerator.cs
- XdrBuilder.cs
- SortedList.cs
- SqlInternalConnection.cs
- CardSpaceException.cs
- NameSpaceEvent.cs
- PropertyFilterAttribute.cs
- CookieParameter.cs
- Int16.cs
- AuthenticationConfig.cs
- XmlSchemaSimpleTypeUnion.cs
- PropertyCondition.cs
- EntityDataSourceEntitySetNameItem.cs
- ObjectItemConventionAssemblyLoader.cs
- COM2TypeInfoProcessor.cs
- XmlBinaryWriterSession.cs
- Lasso.cs
- QilPatternFactory.cs
- DynamicResourceExtension.cs