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
- ViewGenResults.cs
- ClassImporter.cs
- UnmanagedHandle.cs
- OracleLob.cs
- ping.cs
- METAHEADER.cs
- Adorner.cs
- COM2PictureConverter.cs
- FocusWithinProperty.cs
- UnhandledExceptionEventArgs.cs
- ElementInit.cs
- TableLayoutPanel.cs
- EllipseGeometry.cs
- ForceCopyBuildProvider.cs
- streamingZipPartStream.cs
- ExecutionContext.cs
- QilInvokeEarlyBound.cs
- RuntimeArgumentHandle.cs
- XmlSchemaImporter.cs
- CultureTableRecord.cs
- _SslState.cs
- RegexGroup.cs
- WebPartConnectionsConnectVerb.cs
- InfoCardSchemas.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- DefaultAssemblyResolver.cs
- HttpCacheVary.cs
- ExclusiveCanonicalizationTransform.cs
- CompositionTarget.cs
- ValidationVisibilityAttribute.cs
- SmiGettersStream.cs
- CompositeCollectionView.cs
- ToolboxItemImageConverter.cs
- XmlSchemaObjectTable.cs
- DocumentPaginator.cs
- ExpressionBuilder.cs
- Wildcard.cs
- OracleFactory.cs
- Binding.cs
- SimpleMailWebEventProvider.cs
- SocketPermission.cs
- Configuration.cs
- DispatcherExceptionFilterEventArgs.cs
- PolicyChain.cs
- StringInfo.cs
- PersonalizationProviderCollection.cs
- XmlSchemaComplexContentRestriction.cs
- HostingMessageProperty.cs
- CryptoApi.cs
- DPTypeDescriptorContext.cs
- BaseCAMarshaler.cs
- LifetimeServices.cs
- NullableBoolConverter.cs
- DataGridViewSelectedColumnCollection.cs
- TextTreeUndoUnit.cs
- Parser.cs
- WindowsGraphics2.cs
- Vector3DValueSerializer.cs
- ToolStripTextBox.cs
- UnsafeMethods.cs
- ComponentGuaranteesAttribute.cs
- SqlDataSourceCache.cs
- WindowsAuthenticationEventArgs.cs
- cookiecollection.cs
- TrustSection.cs
- BinaryEditor.cs
- IUnknownConstantAttribute.cs
- DescendentsWalkerBase.cs
- SQLDoubleStorage.cs
- IODescriptionAttribute.cs
- SerializationObjectManager.cs
- MessageHeaderDescription.cs
- IssuedTokenServiceElement.cs
- DataList.cs
- GroupBox.cs
- Predicate.cs
- _ChunkParse.cs
- OdbcFactory.cs
- XslNumber.cs
- MasterPageCodeDomTreeGenerator.cs
- FontStyle.cs
- ChangeProcessor.cs
- OlePropertyStructs.cs
- SynchronizationScope.cs
- LinkLabelLinkClickedEvent.cs
- ScriptingScriptResourceHandlerSection.cs
- PointAnimationUsingKeyFrames.cs
- XmlSchemaComplexContentExtension.cs
- MappingModelBuildProvider.cs
- Peer.cs
- ObjectDataSourceEventArgs.cs
- DocumentViewerBase.cs
- AuthenticationSection.cs
- ArgumentsParser.cs
- LoginName.cs
- PropertyGeneratedEventArgs.cs
- ControlLocalizer.cs
- EDesignUtil.cs
- ConfigXmlText.cs
- ObjectItemAttributeAssemblyLoader.cs