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
- XPathArrayIterator.cs
- Authorization.cs
- GroupedContextMenuStrip.cs
- SID.cs
- EdmFunction.cs
- AtlasWeb.Designer.cs
- XmlSchemaParticle.cs
- SoapWriter.cs
- RectKeyFrameCollection.cs
- DefaultBindingPropertyAttribute.cs
- SByteConverter.cs
- SignerInfo.cs
- HScrollProperties.cs
- EntityCollection.cs
- NullableConverter.cs
- MimePart.cs
- Int64Animation.cs
- WebConfigurationHost.cs
- TreeViewCancelEvent.cs
- SchemaImporterExtensionElementCollection.cs
- PathGeometry.cs
- MLangCodePageEncoding.cs
- KeyGestureValueSerializer.cs
- ObjectHelper.cs
- GACMembershipCondition.cs
- Matrix.cs
- DataSetMappper.cs
- WhitespaceRuleReader.cs
- Properties.cs
- XPathDescendantIterator.cs
- Content.cs
- SourceLineInfo.cs
- ClrProviderManifest.cs
- ColumnClickEvent.cs
- UnsafeNativeMethods.cs
- FontSource.cs
- MetafileHeaderWmf.cs
- ServiceAuthorizationElement.cs
- WebRequestModuleElement.cs
- FixedSchema.cs
- MenuCommandsChangedEventArgs.cs
- TimeZone.cs
- Solver.cs
- CompiledRegexRunner.cs
- NominalTypeEliminator.cs
- RegexStringValidatorAttribute.cs
- CqlIdentifiers.cs
- WindowsAuthenticationEventArgs.cs
- Int32CollectionConverter.cs
- BinaryObjectInfo.cs
- DefaultValueTypeConverter.cs
- UnsafeNativeMethodsPenimc.cs
- DesignDataSource.cs
- XmlTextEncoder.cs
- ParserExtension.cs
- BackgroundFormatInfo.cs
- LayoutEngine.cs
- SqlDataSourceQueryEditorForm.cs
- WebScriptServiceHostFactory.cs
- SmtpDigestAuthenticationModule.cs
- DirtyTextRange.cs
- CachedFontFamily.cs
- Model3D.cs
- DataGridViewCellLinkedList.cs
- Helpers.cs
- PlaceHolder.cs
- AttributeCollection.cs
- ErrorHandler.cs
- ConfigurationValue.cs
- XmlQueryOutput.cs
- BrushValueSerializer.cs
- DataServiceQueryProvider.cs
- tibetanshape.cs
- ValueCollectionParameterReader.cs
- RSAPKCS1KeyExchangeFormatter.cs
- SiteMapNodeItemEventArgs.cs
- CharEnumerator.cs
- OleAutBinder.cs
- QuadraticBezierSegment.cs
- FormsAuthenticationCredentials.cs
- ClientProxyGenerator.cs
- MimeWriter.cs
- TreeSet.cs
- XamlSerializationHelper.cs
- SmiMetaDataProperty.cs
- arabicshape.cs
- BitmapEffectInputConnector.cs
- EmptyControlCollection.cs
- OdbcStatementHandle.cs
- SqlSupersetValidator.cs
- WebBrowsableAttribute.cs
- NeedSkipTokenVisitor.cs
- NetPeerTcpBindingElement.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ConstraintStruct.cs
- WebControlParameterProxy.cs
- HostProtectionPermission.cs
- WriteFileContext.cs
- JsonReader.cs
- RegisteredArrayDeclaration.cs