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
- InkSerializer.cs
- RepeaterItemEventArgs.cs
- DesigntimeLicenseContextSerializer.cs
- PolicyLevel.cs
- DropAnimation.xaml.cs
- FileDialog.cs
- DialogResultConverter.cs
- IdentitySection.cs
- DecoderBestFitFallback.cs
- RealProxy.cs
- HtmlPanelAdapter.cs
- XamlVector3DCollectionSerializer.cs
- AttributeEmitter.cs
- Span.cs
- PrePrepareMethodAttribute.cs
- DeleteBookmarkScope.cs
- ImageCodecInfo.cs
- OleDbInfoMessageEvent.cs
- Wildcard.cs
- SqlConnectionStringBuilder.cs
- PreloadedPackages.cs
- AuthenticationServiceManager.cs
- TemplateColumn.cs
- WebBrowsableAttribute.cs
- WebHttpSecurityElement.cs
- Model3D.cs
- SecurityIdentifierConverter.cs
- XamlParser.cs
- DataGridViewColumnCollection.cs
- BooleanExpr.cs
- HashLookup.cs
- ToolboxItemFilterAttribute.cs
- ValueQuery.cs
- DataSourceXmlAttributeAttribute.cs
- ImageDesigner.cs
- PanelDesigner.cs
- OpenCollectionAsyncResult.cs
- AspCompat.cs
- DataAdapter.cs
- GatewayDefinition.cs
- ChangeBlockUndoRecord.cs
- GridViewColumnCollection.cs
- XmlILModule.cs
- XPathSelfQuery.cs
- AppSettingsExpressionEditor.cs
- SnapLine.cs
- QilSortKey.cs
- SharedUtils.cs
- AuthorizationRule.cs
- RequestTimeoutManager.cs
- Activity.cs
- MetadataPropertyCollection.cs
- RelatedImageListAttribute.cs
- Evidence.cs
- OutputCacheModule.cs
- DataObjectFieldAttribute.cs
- StandardToolWindows.cs
- UiaCoreApi.cs
- SelectionHighlightInfo.cs
- TextBox.cs
- StylusPointPropertyInfoDefaults.cs
- Menu.cs
- InputReport.cs
- SolidColorBrush.cs
- WebBrowserNavigatedEventHandler.cs
- HttpWrapper.cs
- DataServiceHostFactory.cs
- LocalizabilityAttribute.cs
- ScopelessEnumAttribute.cs
- TextFormatterImp.cs
- DynamicResourceExtension.cs
- XmlCodeExporter.cs
- Trigger.cs
- DataGridRow.cs
- DataSourceXmlElementAttribute.cs
- PiiTraceSource.cs
- AssociationSet.cs
- RemotingSurrogateSelector.cs
- AutomationEvent.cs
- DataSourceIDConverter.cs
- wgx_sdk_version.cs
- FillErrorEventArgs.cs
- TypeInfo.cs
- DataFormats.cs
- TypefaceMap.cs
- WindowsListViewItemStartMenu.cs
- HyperLinkStyle.cs
- SqlEnums.cs
- FeatureSupport.cs
- ErrorActivity.cs
- ModelToObjectValueConverter.cs
- MemberDomainMap.cs
- RectValueSerializer.cs
- XmlAnyAttributeAttribute.cs
- DocumentGridPage.cs
- XamlTreeBuilderBamlRecordWriter.cs
- HttpCachePolicyWrapper.cs
- DesignerHelpers.cs
- TemplateNameScope.cs
- AutomationElement.cs