Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / PeerCredentialElement.cs / 1 / PeerCredentialElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.Configuration; using System.ServiceModel.Channels; using System.ServiceModel.Security; using System.Xml; using System.Security.Cryptography.X509Certificates; public sealed partial class PeerCredentialElement : ConfigurationElement { public PeerCredentialElement() { } [ConfigurationProperty(ConfigurationStrings.Certificate)] public X509PeerCertificateElement Certificate { get { return (X509PeerCertificateElement)base[ConfigurationStrings.Certificate]; } } [ConfigurationProperty(ConfigurationStrings.PeerAuthentication)] public X509PeerCertificateAuthenticationElement PeerAuthentication { get { return (X509PeerCertificateAuthenticationElement)base[ConfigurationStrings.PeerAuthentication]; } } [ConfigurationProperty(ConfigurationStrings.MessageSenderAuthentication)] public X509PeerCertificateAuthenticationElement MessageSenderAuthentication { get { return (X509PeerCertificateAuthenticationElement)base[ConfigurationStrings.MessageSenderAuthentication]; } } public void Copy(PeerCredentialElement from) { if (this.IsReadOnly()) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly))); } if (null == from) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from"); } this.Certificate.Copy(from.Certificate); this.PeerAuthentication.Copy(from.PeerAuthentication); this.MessageSenderAuthentication.Copy(from.MessageSenderAuthentication); } internal void ApplyConfiguration(PeerCredential creds) { if (creds == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("creds"); } PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.Certificate].ValueOrigin != PropertyValueOrigin.Default) { this.Certificate.ApplyConfiguration(creds); } if (propertyInfo[ConfigurationStrings.PeerAuthentication].ValueOrigin != PropertyValueOrigin.Default) { this.PeerAuthentication.ApplyConfiguration(creds.PeerAuthentication); } if (propertyInfo[ConfigurationStrings.MessageSenderAuthentication].ValueOrigin != PropertyValueOrigin.Default) { this.MessageSenderAuthentication.ApplyConfiguration(creds.MessageSenderAuthentication); } } } } // 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
- Comparer.cs
- InputLangChangeEvent.cs
- LinqDataSourceInsertEventArgs.cs
- UIntPtr.cs
- XamlClipboardData.cs
- DataControlField.cs
- ContextMenuStrip.cs
- SerializerProvider.cs
- ContentPresenter.cs
- EmptyStringExpandableObjectConverter.cs
- SqlDependencyListener.cs
- CustomErrorCollection.cs
- ContainerControl.cs
- StatusStrip.cs
- EventDescriptor.cs
- SynchronizationHandlesCodeDomSerializer.cs
- CacheVirtualItemsEvent.cs
- SqlDataSource.cs
- Event.cs
- ExpressionBuilder.cs
- Evaluator.cs
- XPathAncestorQuery.cs
- HttpWriter.cs
- WebScriptMetadataMessage.cs
- PeerTransportElement.cs
- VisualTarget.cs
- EncryptedPackageFilter.cs
- WSHttpSecurityElement.cs
- ExtendedTransformFactory.cs
- StreamUpgradeInitiator.cs
- UserCancellationException.cs
- ListViewInsertionMark.cs
- ChunkedMemoryStream.cs
- ServiceContractListItemList.cs
- Rotation3DKeyFrameCollection.cs
- RadioButton.cs
- TextTreeFixupNode.cs
- SingleConverter.cs
- SessionStateModule.cs
- SpecularMaterial.cs
- WindowsFormsSynchronizationContext.cs
- TokenBasedSetEnumerator.cs
- XmlSigningNodeWriter.cs
- MediaPlayer.cs
- BidOverLoads.cs
- HyperLink.cs
- ErasingStroke.cs
- SoapHeader.cs
- xsdvalidator.cs
- CompiledRegexRunnerFactory.cs
- PrefixQName.cs
- SqlParameterizer.cs
- DiscoveryClientProtocol.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- ValueQuery.cs
- OSEnvironmentHelper.cs
- Converter.cs
- TextViewBase.cs
- PageAdapter.cs
- MemberDomainMap.cs
- ConfigurationManagerInternal.cs
- DataServiceProviderWrapper.cs
- ToolTipService.cs
- Rotation3DAnimationBase.cs
- ComponentDesigner.cs
- XmlTextEncoder.cs
- RtfControlWordInfo.cs
- ListViewAutomationPeer.cs
- EarlyBoundInfo.cs
- DataSetSchema.cs
- InlineCollection.cs
- AngleUtil.cs
- CreateParams.cs
- PageContentAsyncResult.cs
- ValidationEventArgs.cs
- HttpNamespaceReservationInstallComponent.cs
- UInt64.cs
- EventDescriptor.cs
- CodeEventReferenceExpression.cs
- ClassicBorderDecorator.cs
- PersistChildrenAttribute.cs
- CookielessHelper.cs
- SmiMetaData.cs
- DataPointer.cs
- NominalTypeEliminator.cs
- BitArray.cs
- RightsManagementUser.cs
- HMAC.cs
- Attributes.cs
- CreatingCookieEventArgs.cs
- XmlText.cs
- FixedDSBuilder.cs
- CriticalFinalizerObject.cs
- SmtpSection.cs
- SqlNotificationRequest.cs
- GrammarBuilderPhrase.cs
- COM2PictureConverter.cs
- RuntimeHelpers.cs
- SqlSelectStatement.cs
- IndicCharClassifier.cs