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
- SecureConversationVersion.cs
- TimeEnumHelper.cs
- dsa.cs
- LinqToSqlWrapper.cs
- SelectionRangeConverter.cs
- QueryPageSettingsEventArgs.cs
- Preprocessor.cs
- PublishLicense.cs
- ThaiBuddhistCalendar.cs
- SchemaAttDef.cs
- DbDataRecord.cs
- Rijndael.cs
- CommandLibraryHelper.cs
- WindowsRichEdit.cs
- LinqDataSourceDisposeEventArgs.cs
- SuppressMessageAttribute.cs
- WorkflowQueueInfo.cs
- WaveHeader.cs
- WinFormsComponentEditor.cs
- HWStack.cs
- MessageRpc.cs
- FacetChecker.cs
- TreeViewDesigner.cs
- WindowsAltTab.cs
- Rotation3DAnimation.cs
- UserCancellationException.cs
- DataFieldConverter.cs
- InternalBufferOverflowException.cs
- CustomExpressionEventArgs.cs
- ProjectedWrapper.cs
- ResourceKey.cs
- GlyphRun.cs
- XmlSchemaSimpleContent.cs
- OdbcError.cs
- UnmanagedHandle.cs
- ZipIOLocalFileHeader.cs
- RadioButtonFlatAdapter.cs
- PreProcessInputEventArgs.cs
- SectionXmlInfo.cs
- path.cs
- DetailsView.cs
- CustomAttributeBuilder.cs
- TypefaceMap.cs
- metadatamappinghashervisitor.cs
- SpoolingTask.cs
- PointAnimationBase.cs
- TransformGroup.cs
- FlowchartStart.xaml.cs
- NullableFloatSumAggregationOperator.cs
- TextSchema.cs
- TabRenderer.cs
- ExtractorMetadata.cs
- DPAPIProtectedConfigurationProvider.cs
- DiffuseMaterial.cs
- Visitors.cs
- IdentityModelDictionary.cs
- ParseHttpDate.cs
- TailPinnedEventArgs.cs
- ProcessModelInfo.cs
- WindowsRichEdit.cs
- connectionpool.cs
- DataControlLinkButton.cs
- AlignmentXValidation.cs
- WindowsListViewItemCheckBox.cs
- SqlXmlStorage.cs
- MarshalDirectiveException.cs
- SafeNativeMethods.cs
- DependencyProperty.cs
- EmbeddedObject.cs
- WebDisplayNameAttribute.cs
- DataTableClearEvent.cs
- GetWinFXPath.cs
- ObjectSecurityT.cs
- EpmAttributeNameBuilder.cs
- XPathDocumentNavigator.cs
- StrokeFIndices.cs
- TableDetailsCollection.cs
- HttpCapabilitiesBase.cs
- _TimerThread.cs
- Span.cs
- ProcessHost.cs
- InheritanceContextHelper.cs
- Completion.cs
- CodeSpit.cs
- SAPIEngineTypes.cs
- Stylesheet.cs
- UserMapPath.cs
- WarningException.cs
- DocumentEventArgs.cs
- LockCookie.cs
- CodeSnippetCompileUnit.cs
- WebExceptionStatus.cs
- EmptyEnumerator.cs
- SessionEndedEventArgs.cs
- WebHttpBinding.cs
- JsonStringDataContract.cs
- ClipboardProcessor.cs
- SdlChannelSink.cs
- DetailsViewInsertedEventArgs.cs
- TraceAsyncResult.cs