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
- LeaseManager.cs
- RichTextBoxConstants.cs
- FrameworkName.cs
- SymbolType.cs
- MessageSmuggler.cs
- AnimationException.cs
- TraceContextRecord.cs
- DrawingGroupDrawingContext.cs
- TypeUtils.cs
- Enumerable.cs
- CalendarDateRange.cs
- TimelineClockCollection.cs
- ProfilePropertyNameValidator.cs
- WebContext.cs
- RequestBringIntoViewEventArgs.cs
- CombinedGeometry.cs
- InvokeProviderWrapper.cs
- ExpandSegmentCollection.cs
- AnnotationResourceChangedEventArgs.cs
- FrameworkElement.cs
- HttpPostedFile.cs
- ObjectPersistData.cs
- CTreeGenerator.cs
- PrintDialogException.cs
- LoginView.cs
- InputProcessorProfiles.cs
- EntityDesignerBuildProvider.cs
- LogSwitch.cs
- ContentPosition.cs
- EventMappingSettingsCollection.cs
- Group.cs
- TextModifier.cs
- TypeConverterHelper.cs
- PrintDialog.cs
- XmlWhitespace.cs
- EntryWrittenEventArgs.cs
- TransactedBatchingElement.cs
- MemoryResponseElement.cs
- ToolBarOverflowPanel.cs
- QilReference.cs
- FormParameter.cs
- MD5CryptoServiceProvider.cs
- GenericsInstances.cs
- Calendar.cs
- XPathMultyIterator.cs
- UserMapPath.cs
- UnmanagedMemoryStream.cs
- KoreanCalendar.cs
- BitmapData.cs
- MimeMapping.cs
- NullableFloatSumAggregationOperator.cs
- ActiveXContainer.cs
- ArgumentNullException.cs
- XmlQueryType.cs
- XmlNullResolver.cs
- SqlXmlStorage.cs
- ResourceManagerWrapper.cs
- RecognizedWordUnit.cs
- EnvironmentPermission.cs
- AssemblyCollection.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- OrthographicCamera.cs
- ScrollChrome.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ImageFormatConverter.cs
- InitializerFacet.cs
- ContractNamespaceAttribute.cs
- PointAnimation.cs
- EndpointConfigContainer.cs
- SystemParameters.cs
- FormViewInsertEventArgs.cs
- ProfileService.cs
- ReturnType.cs
- DependencyProperty.cs
- SqlUtils.cs
- Misc.cs
- TableSectionStyle.cs
- CodeAttributeDeclarationCollection.cs
- HttpHeaderCollection.cs
- ColumnMapCopier.cs
- QueryContext.cs
- NameObjectCollectionBase.cs
- PassportPrincipal.cs
- MessageLoggingElement.cs
- AttributeEmitter.cs
- KerberosRequestorSecurityToken.cs
- RootNamespaceAttribute.cs
- InnerItemCollectionView.cs
- Timeline.cs
- HttpModuleActionCollection.cs
- TextEncodedRawTextWriter.cs
- ExternalException.cs
- FunctionUpdateCommand.cs
- IdnMapping.cs
- HttpGetProtocolImporter.cs
- EventWaitHandleSecurity.cs
- DelegateInArgument.cs
- HtmlHistory.cs
- InputScopeAttribute.cs
- SmiGettersStream.cs