Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / X509RecipientCertificateClientElement.cs / 1 / X509RecipientCertificateClientElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.ServiceModel; using System.Configuration; using System.ServiceModel.Channels; using System.ServiceModel.Security; using System.Xml; using System.Security.Cryptography.X509Certificates; public sealed partial class X509RecipientCertificateClientElement : ConfigurationElement { public X509RecipientCertificateClientElement() { } [ConfigurationProperty(ConfigurationStrings.DefaultCertificate)] public X509DefaultServiceCertificateElement DefaultCertificate { get { return (X509DefaultServiceCertificateElement)base[ConfigurationStrings.DefaultCertificate]; } } [ConfigurationProperty(ConfigurationStrings.ScopedCertificates)] public X509ScopedServiceCertificateElementCollection ScopedCertificates { get { return (X509ScopedServiceCertificateElementCollection)base[ConfigurationStrings.ScopedCertificates]; } } [ConfigurationProperty(ConfigurationStrings.Authentication)] public X509ServiceCertificateAuthenticationElement Authentication { get { return (X509ServiceCertificateAuthenticationElement)base[ConfigurationStrings.Authentication]; } } public void Copy(X509RecipientCertificateClientElement from) { if (this.IsReadOnly()) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly))); } if (null == from) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from"); } this.DefaultCertificate.Copy(from.DefaultCertificate); X509ScopedServiceCertificateElementCollection srcScopedCertificates = from.ScopedCertificates; X509ScopedServiceCertificateElementCollection dstScopedCertificates = this.ScopedCertificates; dstScopedCertificates.Clear(); for (int i = 0; i < srcScopedCertificates.Count; ++i) { dstScopedCertificates.Add(srcScopedCertificates[i]); } this.Authentication.Copy(from.Authentication); } internal void ApplyConfiguration(X509CertificateRecipientClientCredential cert) { if (cert == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("cert"); } PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.Authentication].ValueOrigin != PropertyValueOrigin.Default) { this.Authentication.ApplyConfiguration(cert.Authentication); } this.DefaultCertificate.ApplyConfiguration(cert); X509ScopedServiceCertificateElementCollection scopedCertificates = this.ScopedCertificates; for (int i = 0; i < scopedCertificates.Count; ++i) { scopedCertificates[i].ApplyConfiguration(cert); } } } } // 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
- HTTPNotFoundHandler.cs
- FilterEventArgs.cs
- CachedBitmap.cs
- CodeTypeDeclarationCollection.cs
- ProviderCommandInfoUtils.cs
- OleDbFactory.cs
- ErrorLog.cs
- ExceptionList.cs
- StringUtil.cs
- UdpDiscoveryEndpoint.cs
- PtsPage.cs
- BitmapFrame.cs
- DeleteMemberBinder.cs
- ContentDesigner.cs
- ChangeInterceptorAttribute.cs
- ObjectItemAssemblyLoader.cs
- EditorPartChrome.cs
- FreezableCollection.cs
- CustomSignedXml.cs
- EncryptedXml.cs
- EventKeyword.cs
- ProxyWebPartManagerDesigner.cs
- TextBoxLine.cs
- SafeHGlobalHandleCritical.cs
- Intellisense.cs
- CancelEventArgs.cs
- XsltOutput.cs
- RuleProcessor.cs
- UndirectedGraph.cs
- HttpStreamMessageEncoderFactory.cs
- GetKeyedHashRequest.cs
- XmlNodeComparer.cs
- CompositionAdorner.cs
- FontUnitConverter.cs
- SyndicationDeserializer.cs
- XPathException.cs
- PaginationProgressEventArgs.cs
- ToolboxItemFilterAttribute.cs
- HttpCacheParams.cs
- EntityCommandDefinition.cs
- OleDbDataAdapter.cs
- HttpRawResponse.cs
- PerformanceCountersElement.cs
- SqlIdentifier.cs
- EnumMember.cs
- WebPartConnectionsDisconnectVerb.cs
- DelegateArgumentValue.cs
- COM2PictureConverter.cs
- MessageSecurityProtocolFactory.cs
- PerfCounterSection.cs
- PathFigure.cs
- DirectoryLocalQuery.cs
- ClosableStream.cs
- TabControlCancelEvent.cs
- LinkClickEvent.cs
- TraceSection.cs
- ItemsPresenter.cs
- Highlights.cs
- ParallelTimeline.cs
- NativeMethods.cs
- ClaimSet.cs
- EditorZone.cs
- Types.cs
- ClientSettingsSection.cs
- Pool.cs
- BamlBinaryWriter.cs
- EntityDataSourceMemberPath.cs
- ChannelServices.cs
- exports.cs
- CodeVariableReferenceExpression.cs
- RowToFieldTransformer.cs
- EnvironmentPermission.cs
- XmlQueryRuntime.cs
- RegisteredExpandoAttribute.cs
- ErrorEventArgs.cs
- TreeView.cs
- StdValidatorsAndConverters.cs
- ILGen.cs
- codemethodreferenceexpression.cs
- XsdBuilder.cs
- FormsAuthentication.cs
- IISUnsafeMethods.cs
- XmlSchemaAttribute.cs
- GridViewDeletedEventArgs.cs
- HttpProxyCredentialType.cs
- SqlCommandBuilder.cs
- ImageAnimator.cs
- ValidationErrorInfo.cs
- PassportIdentity.cs
- TimelineCollection.cs
- IndentTextWriter.cs
- WeakReadOnlyCollection.cs
- dbenumerator.cs
- ColorTransform.cs
- MeasureData.cs
- ClientCredentialsSecurityTokenManager.cs
- ListViewInsertionMark.cs
- StrongNameHelpers.cs
- EventPropertyMap.cs
- FormClosingEvent.cs