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
- AutomationFocusChangedEventArgs.cs
- ExpressionList.cs
- HttpModuleAction.cs
- ChooseAction.cs
- SqlPersonalizationProvider.cs
- ActivityMarkupSerializer.cs
- NativeRecognizer.cs
- RewritingPass.cs
- ReplyChannelAcceptor.cs
- NamespaceCollection.cs
- Freezable.cs
- ItemCheckedEvent.cs
- DecimalStorage.cs
- UInt64.cs
- XPathNode.cs
- ExpressionPrefixAttribute.cs
- tooltip.cs
- ObjectManager.cs
- OutputScopeManager.cs
- DataGridViewRowStateChangedEventArgs.cs
- Size.cs
- HtmlControlPersistable.cs
- PerformanceCounterManager.cs
- VirtualPathProvider.cs
- AttributeCollection.cs
- XmlSchemaCollection.cs
- ToolStripItemEventArgs.cs
- IntellisenseTextBox.cs
- LocalizationParserHooks.cs
- IgnoreFlushAndCloseStream.cs
- UxThemeWrapper.cs
- FrameworkContentElement.cs
- DataGridSortingEventArgs.cs
- HtmlInputFile.cs
- InfoCardKeyedHashAlgorithm.cs
- SoapParser.cs
- NetNamedPipeBinding.cs
- Aggregates.cs
- DeflateStreamAsyncResult.cs
- WebExceptionStatus.cs
- ModifierKeysConverter.cs
- MailBnfHelper.cs
- ProfessionalColorTable.cs
- ComponentSerializationService.cs
- WindowsScrollBar.cs
- DataGridViewSelectedCellCollection.cs
- HtmlHead.cs
- PageThemeBuildProvider.cs
- UIElement3D.cs
- InfoCardBaseException.cs
- ObjectDataSourceEventArgs.cs
- DoubleCollectionValueSerializer.cs
- RewritingPass.cs
- SettingsPropertyIsReadOnlyException.cs
- ItemCheckEvent.cs
- Activator.cs
- ParameterSubsegment.cs
- TemplateEditingVerb.cs
- QuaternionValueSerializer.cs
- BinaryReader.cs
- DefaultValidator.cs
- ScaleTransform.cs
- VisemeEventArgs.cs
- XamlTreeBuilderBamlRecordWriter.cs
- SetMemberBinder.cs
- StickyNoteHelper.cs
- ConsoleCancelEventArgs.cs
- DbLambda.cs
- FullTextState.cs
- WinEventTracker.cs
- ListItemConverter.cs
- RowsCopiedEventArgs.cs
- XmlWriter.cs
- Currency.cs
- BaseConfigurationRecord.cs
- Int32KeyFrameCollection.cs
- StreamSecurityUpgradeInitiator.cs
- FormatSettings.cs
- SerializationEventsCache.cs
- FontWeightConverter.cs
- StringFunctions.cs
- PointConverter.cs
- PrivateFontCollection.cs
- QuotedPrintableStream.cs
- FlowDocumentFormatter.cs
- ChannelTracker.cs
- DiscreteKeyFrames.cs
- ComponentSerializationService.cs
- DbMetaDataColumnNames.cs
- GroupLabel.cs
- ComEventsSink.cs
- ForceCopyBuildProvider.cs
- _ContextAwareResult.cs
- metadatamappinghashervisitor.cs
- WorkflowDesigner.cs
- XmlDesigner.cs
- DiagnosticsConfigurationHandler.cs
- RuntimeArgumentHandle.cs
- OrderedEnumerableRowCollection.cs
- CustomBindingElement.cs