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
- ReadOnlyMetadataCollection.cs
- MenuItem.cs
- VisualTarget.cs
- RegexReplacement.cs
- RequestDescription.cs
- DynamicResourceExtensionConverter.cs
- DBCommand.cs
- AddingNewEventArgs.cs
- objectquery_tresulttype.cs
- PlatformCulture.cs
- ProvidersHelper.cs
- XPathQilFactory.cs
- SelectorAutomationPeer.cs
- SerializationInfo.cs
- XamlStyleSerializer.cs
- XmlSchemaImport.cs
- WinCategoryAttribute.cs
- HostedHttpTransportManager.cs
- Splitter.cs
- ControlPropertyNameConverter.cs
- RuleElement.cs
- CookielessData.cs
- NamespaceList.cs
- RSAPKCS1KeyExchangeFormatter.cs
- HtmlInputImage.cs
- NextPreviousPagerField.cs
- AnnotationAdorner.cs
- RegexMatchCollection.cs
- errorpatternmatcher.cs
- StorageInfo.cs
- SoapAttributeAttribute.cs
- dataSvcMapFileLoader.cs
- WebServiceEnumData.cs
- StopRoutingHandler.cs
- BrowserDefinition.cs
- BaseAddressElementCollection.cs
- PixelShader.cs
- GB18030Encoding.cs
- UrlEncodedParameterWriter.cs
- PersonalizablePropertyEntry.cs
- Math.cs
- IISUnsafeMethods.cs
- AnnotationResource.cs
- StorageRoot.cs
- ArcSegment.cs
- PresentationAppDomainManager.cs
- SqlParameterCollection.cs
- TextSerializer.cs
- StreamGeometry.cs
- StrokeNodeData.cs
- SplashScreen.cs
- TextTreeInsertUndoUnit.cs
- XmlObjectSerializerReadContext.cs
- ConfigurationElementProperty.cs
- EntitySetBase.cs
- DesignerSerializerAttribute.cs
- OutputScopeManager.cs
- ObjectNotFoundException.cs
- QueryResult.cs
- HandleRef.cs
- BuildProviderAppliesToAttribute.cs
- ContentFilePart.cs
- DeferredReference.cs
- ProfileManager.cs
- XmlBindingWorker.cs
- Pair.cs
- CheckBox.cs
- OracleLob.cs
- OrCondition.cs
- GeneralTransform3DTo2D.cs
- DataTableMappingCollection.cs
- ConfigurationManagerInternal.cs
- ParseChildrenAsPropertiesAttribute.cs
- ManagementObjectCollection.cs
- CompilerParameters.cs
- FixedSOMLineCollection.cs
- ToolStripControlHost.cs
- RegisteredExpandoAttribute.cs
- DiscoveryClientOutputChannel.cs
- SourceFilter.cs
- HierarchicalDataTemplate.cs
- RsaEndpointIdentity.cs
- WindowsListViewGroup.cs
- XsltLoader.cs
- ProtocolImporter.cs
- ConditionCollection.cs
- RotateTransform3D.cs
- ClientBuildManagerCallback.cs
- FlagsAttribute.cs
- DoubleLinkListEnumerator.cs
- EncoderParameters.cs
- DelegateHelpers.Generated.cs
- XhtmlTextWriter.cs
- MarshalDirectiveException.cs
- EasingFunctionBase.cs
- TypeConverterHelper.cs
- Stream.cs
- XmlText.cs
- EncryptedReference.cs
- DataGridViewColumnCollection.cs