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
- ExtendedProtectionPolicy.cs
- MissingSatelliteAssemblyException.cs
- WebPartPersonalization.cs
- EmptyReadOnlyDictionaryInternal.cs
- TCPListener.cs
- CodeAttachEventStatement.cs
- ParallelDesigner.cs
- DetailsViewInsertedEventArgs.cs
- SqlConnectionFactory.cs
- DesignerActionUIService.cs
- SystemResources.cs
- CutCopyPasteHelper.cs
- PrivilegeNotHeldException.cs
- _LoggingObject.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- ConfigDefinitionUpdates.cs
- RectangleHotSpot.cs
- RegexCompiler.cs
- WhiteSpaceTrimStringConverter.cs
- ResXResourceWriter.cs
- DataTemplateKey.cs
- XmlSerializationGeneratedCode.cs
- QueryModel.cs
- ContextQuery.cs
- xml.cs
- File.cs
- SplineKeyFrames.cs
- DictationGrammar.cs
- ToolStripContentPanel.cs
- GifBitmapDecoder.cs
- DataGridViewColumnStateChangedEventArgs.cs
- RelationshipConverter.cs
- WebPartUserCapability.cs
- HwndKeyboardInputProvider.cs
- autovalidator.cs
- DebugTracing.cs
- FormsAuthenticationConfiguration.cs
- NoPersistScope.cs
- SiteMapDesignerDataSourceView.cs
- Viewport3DVisual.cs
- TabControlCancelEvent.cs
- FrameworkTemplate.cs
- ScriptDescriptor.cs
- MessageDescriptionCollection.cs
- PackageDigitalSignatureManager.cs
- DBNull.cs
- SafeNativeMethods.cs
- XmlSerializerSection.cs
- ShapeTypeface.cs
- CompressEmulationStream.cs
- TextShapeableCharacters.cs
- DesignerRegion.cs
- InvalidDocumentContentsException.cs
- CompositeKey.cs
- Selection.cs
- ProtocolViolationException.cs
- PropertyOrder.cs
- MexHttpBindingCollectionElement.cs
- COM2ExtendedUITypeEditor.cs
- IssuedSecurityTokenParameters.cs
- OperationInvokerTrace.cs
- TextBoxAutoCompleteSourceConverter.cs
- RecommendedAsConfigurableAttribute.cs
- WorkflowPageSetupDialog.cs
- HtmlValidatorAdapter.cs
- AutomationPeer.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- OdbcConnectionHandle.cs
- _PooledStream.cs
- WinFormsComponentEditor.cs
- DLinqAssociationProvider.cs
- XmlToDatasetMap.cs
- Boolean.cs
- XmlWriterTraceListener.cs
- ControlParameter.cs
- ConsumerConnectionPoint.cs
- DateTimeValueSerializerContext.cs
- UnconditionalPolicy.cs
- SqlUDTStorage.cs
- ButtonField.cs
- RadialGradientBrush.cs
- PEFileEvidenceFactory.cs
- TreeView.cs
- Cell.cs
- XmlnsDictionary.cs
- Permission.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- DesignUtil.cs
- XmlChoiceIdentifierAttribute.cs
- InlineCollection.cs
- WebPartZone.cs
- _SSPISessionCache.cs
- FixedDSBuilder.cs
- Calendar.cs
- WebBrowsableAttribute.cs
- TemplateInstanceAttribute.cs
- PropertyMapper.cs
- Propagator.Evaluator.cs
- XPathSelfQuery.cs
- KeyNotFoundException.cs