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
- XmlILOptimizerVisitor.cs
- SqlCommand.cs
- ButtonFieldBase.cs
- SecurityDocument.cs
- TranslateTransform.cs
- XmlValueConverter.cs
- GenericEnumerator.cs
- SettingsPropertyNotFoundException.cs
- DiscoveryClient.cs
- X509CertificateRecipientClientCredential.cs
- DriveInfo.cs
- SqlDelegatedTransaction.cs
- ConfigXmlComment.cs
- SelectionHighlightInfo.cs
- GPPOINT.cs
- ProcessHostFactoryHelper.cs
- sortedlist.cs
- ReferenceConverter.cs
- ReflectionTypeLoadException.cs
- Html32TextWriter.cs
- ListControlConvertEventArgs.cs
- DefaultValueMapping.cs
- Column.cs
- DEREncoding.cs
- UiaCoreTypesApi.cs
- DynamicValueConverter.cs
- ListenerConstants.cs
- LogSwitch.cs
- OrderByQueryOptionExpression.cs
- SqlDataRecord.cs
- CodeCatchClauseCollection.cs
- Pair.cs
- TextSerializer.cs
- ResourcePool.cs
- WindowProviderWrapper.cs
- SafeHandle.cs
- ConfigurationManagerInternal.cs
- CompositionTarget.cs
- System.Data_BID.cs
- ToolStripDesignerAvailabilityAttribute.cs
- UpdateProgress.cs
- Container.cs
- VariableAction.cs
- AutomationProperties.cs
- FixedSOMSemanticBox.cs
- ActiveXHelper.cs
- odbcmetadatacollectionnames.cs
- GeometryGroup.cs
- ToolStripRendererSwitcher.cs
- PrintController.cs
- ScrollItemPattern.cs
- HostingPreferredMapPath.cs
- SettingsAttributeDictionary.cs
- FrameDimension.cs
- GenerateScriptTypeAttribute.cs
- AutomationProperties.cs
- IPAddressCollection.cs
- WindowsAuthenticationModule.cs
- ResourceReader.cs
- BulletedListEventArgs.cs
- AlphaSortedEnumConverter.cs
- HorizontalAlignConverter.cs
- StandardRuntimeEnumValidator.cs
- SchemaMapping.cs
- TdsParserHelperClasses.cs
- RetrieveVirtualItemEventArgs.cs
- MarkupWriter.cs
- ProfessionalColorTable.cs
- UpdateInfo.cs
- RuntimeResourceSet.cs
- Range.cs
- WebHeaderCollection.cs
- UrlParameterReader.cs
- SpeechAudioFormatInfo.cs
- FontSource.cs
- datacache.cs
- CompareValidator.cs
- LineServicesRun.cs
- ClientBuildManager.cs
- XmlNodeChangedEventArgs.cs
- ObjectQuery.cs
- Content.cs
- CopyOnWriteList.cs
- TypedAsyncResult.cs
- CompilerParameters.cs
- RolePrincipal.cs
- HostingEnvironment.cs
- XmlBoundElement.cs
- QilUnary.cs
- CLRBindingWorker.cs
- HwndAppCommandInputProvider.cs
- WsdlParser.cs
- EditorZoneDesigner.cs
- IPAddress.cs
- SqlDependencyListener.cs
- FontSource.cs
- WebPartCollection.cs
- ProgressBar.cs
- ClearCollection.cs
- Monitor.cs