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
- printdlgexmarshaler.cs
- SiteOfOriginContainer.cs
- SchemaMerger.cs
- DesignTimeVisibleAttribute.cs
- AxisAngleRotation3D.cs
- SessionIDManager.cs
- EntityStoreSchemaFilterEntry.cs
- CssClassPropertyAttribute.cs
- CollectionViewGroupRoot.cs
- ObjectList.cs
- TemplateApplicationHelper.cs
- EntityContainerAssociationSetEnd.cs
- PerCallInstanceContextProvider.cs
- ServiceMemoryGates.cs
- PersonalizationAdministration.cs
- DataGridViewRowPostPaintEventArgs.cs
- TextParaLineResult.cs
- FlowDocumentReaderAutomationPeer.cs
- FillErrorEventArgs.cs
- AstTree.cs
- XPathChildIterator.cs
- TdsParserSessionPool.cs
- ConcurrentStack.cs
- LinkConverter.cs
- CodeVariableDeclarationStatement.cs
- RequestReplyCorrelator.cs
- GraphicsPath.cs
- DocumentViewerHelper.cs
- ProxyAssemblyNotLoadedException.cs
- HwndHost.cs
- PassportAuthentication.cs
- SqlDeflator.cs
- ConfigXmlDocument.cs
- HandoffBehavior.cs
- SerializationException.cs
- SQLInt32Storage.cs
- ADMembershipProvider.cs
- FileUtil.cs
- BitmapCacheBrush.cs
- LoadedEvent.cs
- FileSecurity.cs
- HashAlgorithm.cs
- LocatorPart.cs
- XmlSchemaAny.cs
- ProgressBarAutomationPeer.cs
- DriveInfo.cs
- TransactionBehavior.cs
- ISAPIRuntime.cs
- TransferRequestHandler.cs
- ContentOperations.cs
- MethodMessage.cs
- SignatureDescription.cs
- SmtpCommands.cs
- TouchesOverProperty.cs
- CodeCatchClause.cs
- StringKeyFrameCollection.cs
- ActivityExecutorOperation.cs
- DesignSurfaceManager.cs
- CodeDefaultValueExpression.cs
- XmlLangPropertyAttribute.cs
- TitleStyle.cs
- SecurityTokenContainer.cs
- StylusLogic.cs
- EntityTransaction.cs
- EventTrigger.cs
- CodeGotoStatement.cs
- LinkUtilities.cs
- TextEditorCharacters.cs
- HtmlInputHidden.cs
- FontStyleConverter.cs
- DataServiceHostFactory.cs
- TriggerAction.cs
- LayeredChannelFactory.cs
- TextParaLineResult.cs
- TextSelection.cs
- ValueChangedEventManager.cs
- ServiceMemoryGates.cs
- FillRuleValidation.cs
- DictionaryEntry.cs
- MasterPage.cs
- Control.cs
- FixedSOMElement.cs
- AutoGeneratedFieldProperties.cs
- LazyLoadBehavior.cs
- OfTypeExpression.cs
- Rijndael.cs
- AnonymousIdentificationSection.cs
- Pen.cs
- tibetanshape.cs
- ViewBase.cs
- CubicEase.cs
- GridViewColumnCollection.cs
- TextPattern.cs
- InvokeProviderWrapper.cs
- PngBitmapEncoder.cs
- VariableQuery.cs
- FastPropertyAccessor.cs
- SchemaNamespaceManager.cs
- PointHitTestParameters.cs
- StorageRoot.cs