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
- RequestCachingSection.cs
- ReplyChannelBinder.cs
- ToolboxService.cs
- ApplyTemplatesAction.cs
- NavigationHelper.cs
- PropertyGrid.cs
- EnumerableCollectionView.cs
- XmlUnspecifiedAttribute.cs
- FilteredAttributeCollection.cs
- Stack.cs
- FormsAuthenticationModule.cs
- X509Utils.cs
- SchemaElementDecl.cs
- StatusBarPanelClickEvent.cs
- RightsManagementPermission.cs
- SafeNativeMethods.cs
- StaticSiteMapProvider.cs
- DesignRelationCollection.cs
- WebBrowser.cs
- brushes.cs
- DelayedRegex.cs
- DesignTimeVisibleAttribute.cs
- XmlProcessingInstruction.cs
- ListViewInsertEventArgs.cs
- WsdlBuildProvider.cs
- Utils.cs
- WebHttpSecurity.cs
- TcpTransportManager.cs
- OleServicesContext.cs
- SqlError.cs
- BinHexEncoder.cs
- WrappedKeySecurityTokenParameters.cs
- PropertyTabChangedEvent.cs
- QuotaThrottle.cs
- CodeComment.cs
- DesignerLinkAdapter.cs
- Highlights.cs
- DataColumnCollection.cs
- NominalTypeEliminator.cs
- AttachedPropertyMethodSelector.cs
- TableLayoutStyle.cs
- ElementHostPropertyMap.cs
- UrlMappingsSection.cs
- Grid.cs
- ResourceAttributes.cs
- RegexMatch.cs
- FrameworkContentElement.cs
- ResXFileRef.cs
- DistributedTransactionPermission.cs
- addressfiltermode.cs
- SoapInteropTypes.cs
- CreateParams.cs
- SQLByte.cs
- ThreadAttributes.cs
- NetDataContractSerializer.cs
- IdentityManager.cs
- WebServiceResponseDesigner.cs
- Certificate.cs
- ConnectionStringsExpressionEditor.cs
- ContentType.cs
- CompilerResults.cs
- MemoryPressure.cs
- Win32.cs
- DbProviderConfigurationHandler.cs
- AutomationIdentifier.cs
- CompositionCommandSet.cs
- OptimalBreakSession.cs
- TemplateModeChangedEventArgs.cs
- RelationshipConverter.cs
- DataBindingCollectionConverter.cs
- TextSegment.cs
- GlyphRun.cs
- OleDbStruct.cs
- StorageSetMapping.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- namescope.cs
- OutputCacheSettings.cs
- MaskedTextBoxDesigner.cs
- DockPattern.cs
- CodeTypeDeclarationCollection.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- CmsUtils.cs
- Int32Rect.cs
- InputLanguageProfileNotifySink.cs
- FlowNode.cs
- SrgsDocument.cs
- TraceContextRecord.cs
- VideoDrawing.cs
- DataGridViewLinkColumn.cs
- BackgroundWorker.cs
- BinaryObjectWriter.cs
- UnknownMessageReceivedEventArgs.cs
- CompositionTarget.cs
- UDPClient.cs
- ConversionContext.cs
- TypeDescriptionProvider.cs
- DetailsViewRow.cs
- RtfToken.cs
- ReferentialConstraint.cs
- PeerPresenceInfo.cs