Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / PnrpPeerResolverBindingElement.cs / 1 / PnrpPeerResolverBindingElement.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.ComponentModel; using System.ServiceModel; using System.ServiceModel.PeerResolvers; public sealed class PnrpPeerResolverBindingElement : PeerResolverBindingElement { PeerReferralPolicy referralPolicy; public PnrpPeerResolverBindingElement() { } public PnrpPeerResolverBindingElement(PeerReferralPolicy referralPolicy) { this.referralPolicy = referralPolicy; } PnrpPeerResolverBindingElement(PnrpPeerResolverBindingElement elementToBeCloned) : base(elementToBeCloned) { this.referralPolicy = elementToBeCloned.referralPolicy; } public override PeerReferralPolicy ReferralPolicy { get { return referralPolicy; } set { if(!PeerReferralPolicyHelper.IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value, typeof(PeerReferralPolicy))); } referralPolicy = value; } } public override BindingElement Clone() { return new PnrpPeerResolverBindingElement(this); } public override IChannelFactoryBuildChannelFactory (BindingContext context) { if (context == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); context.BindingParameters.Add(this); return context.BuildInnerChannelFactory (); } public override bool CanBuildChannelFactory (BindingContext context) { if (context == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); context.BindingParameters.Add(this); return context.CanBuildInnerChannelFactory (); } public override IChannelListener BuildChannelListener (BindingContext context) { if (context == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); context.BindingParameters.Add(this); return context.BuildInnerChannelListener (); } public override bool CanBuildChannelListener (BindingContext context) { if (context == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); context.BindingParameters.Add(this); return context.CanBuildInnerChannelListener (); } public override PeerResolver CreatePeerResolver() { return new PnrpPeerResolver(this.referralPolicy); } public override T GetProperty (BindingContext context) { return context.GetInnerProperty (); } } } // 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
- ModuleConfigurationInfo.cs
- IncrementalReadDecoders.cs
- WebPartDisplayModeCollection.cs
- StringResourceManager.cs
- TaskHelper.cs
- SlipBehavior.cs
- AnnotationHighlightLayer.cs
- Object.cs
- HighContrastHelper.cs
- Token.cs
- TextDecoration.cs
- Point.cs
- WizardStepBase.cs
- KeyProperty.cs
- GridViewSelectEventArgs.cs
- WindowsScrollBar.cs
- SubMenuStyleCollection.cs
- AnonymousIdentificationModule.cs
- RSACryptoServiceProvider.cs
- PinnedBufferMemoryStream.cs
- WinCategoryAttribute.cs
- ScrollableControl.cs
- MultipartIdentifier.cs
- CreatingCookieEventArgs.cs
- GeneralTransform2DTo3DTo2D.cs
- OdbcPermission.cs
- TimestampInformation.cs
- ISSmlParser.cs
- EntityModelSchemaGenerator.cs
- MessageEventSubscriptionService.cs
- MatrixUtil.cs
- DesignerActionVerbItem.cs
- ValueExpressions.cs
- StateFinalizationDesigner.cs
- Compress.cs
- SiteMapProvider.cs
- DataGridColumn.cs
- MonitoringDescriptionAttribute.cs
- DomainUpDown.cs
- Int32.cs
- SerializerDescriptor.cs
- ResourceDefaultValueAttribute.cs
- Geometry3D.cs
- InvalidComObjectException.cs
- InputScopeConverter.cs
- ReferenceAssemblyAttribute.cs
- OdbcUtils.cs
- TransactionManager.cs
- UIElementParaClient.cs
- Substitution.cs
- PageRanges.cs
- SmtpFailedRecipientsException.cs
- Brush.cs
- ConfigurationSection.cs
- XmlDataSource.cs
- XmlSiteMapProvider.cs
- WindowsSpinner.cs
- PeerTransportElement.cs
- WebPartZone.cs
- XmlHierarchyData.cs
- DbConnectionPoolGroupProviderInfo.cs
- SettingsPropertyNotFoundException.cs
- ClearCollection.cs
- Debugger.cs
- Utils.cs
- NameObjectCollectionBase.cs
- TextEditorParagraphs.cs
- OleDbWrapper.cs
- StyleBamlTreeBuilder.cs
- PropertyRef.cs
- MsmqTransportBindingElement.cs
- ForeignConstraint.cs
- indexingfiltermarshaler.cs
- IconConverter.cs
- UnknownWrapper.cs
- DefaultAsyncDataDispatcher.cs
- ToolStripDropDownItem.cs
- PropertyPath.cs
- DisplayInformation.cs
- MethodCallConverter.cs
- ReadOnlyDictionary.cs
- ListViewEditEventArgs.cs
- DbProviderSpecificTypePropertyAttribute.cs
- PenThreadPool.cs
- CanonicalizationDriver.cs
- XmlDesignerDataSourceView.cs
- DataGridViewComboBoxColumn.cs
- MsmqReceiveHelper.cs
- DrawingContextWalker.cs
- SchemaComplexType.cs
- SolidColorBrush.cs
- InputMethodStateTypeInfo.cs
- SpellerHighlightLayer.cs
- XmlSubtreeReader.cs
- RefreshPropertiesAttribute.cs
- StrongNameMembershipCondition.cs
- SystemDropShadowChrome.cs
- XmlNamedNodeMap.cs
- DependencyPropertyAttribute.cs
- CultureInfoConverter.cs