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
- RequiredAttributeAttribute.cs
- SynthesizerStateChangedEventArgs.cs
- EllipseGeometry.cs
- ProfileModule.cs
- ButtonBase.cs
- HttpInputStream.cs
- HwndProxyElementProvider.cs
- ComNativeDescriptor.cs
- Application.cs
- ReversePositionQuery.cs
- TaskHelper.cs
- SchemaObjectWriter.cs
- ColumnResizeAdorner.cs
- MetadataSource.cs
- Label.cs
- documentsequencetextpointer.cs
- X509CertificateTokenFactoryCredential.cs
- AssociationType.cs
- ThreadInterruptedException.cs
- TreeNodeClickEventArgs.cs
- HtmlTableRowCollection.cs
- DictionarySectionHandler.cs
- TableRow.cs
- EventArgs.cs
- ReachPageContentSerializerAsync.cs
- CqlParserHelpers.cs
- PathFigureCollectionConverter.cs
- PropertyEntry.cs
- ProxyWebPartConnectionCollection.cs
- DriveInfo.cs
- Rfc4050KeyFormatter.cs
- DbParameterHelper.cs
- HistoryEventArgs.cs
- InvalidEnumArgumentException.cs
- XmlSchemaCollection.cs
- baseaxisquery.cs
- SetState.cs
- ResXFileRef.cs
- EnumBuilder.cs
- MetadataItem.cs
- TimelineGroup.cs
- SafeMarshalContext.cs
- Stroke.cs
- ExpanderAutomationPeer.cs
- StringCollection.cs
- XslNumber.cs
- HierarchicalDataSourceControl.cs
- TextFindEngine.cs
- TextEditorDragDrop.cs
- Point.cs
- XmlILConstructAnalyzer.cs
- ListenerServiceInstallComponent.cs
- URLString.cs
- MDIClient.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- GroupBox.cs
- UpdateCompiler.cs
- Attributes.cs
- PageParser.cs
- ScriptResourceInfo.cs
- StylusEventArgs.cs
- LayoutEditorPart.cs
- SByteConverter.cs
- ReachSerializableProperties.cs
- PolyLineSegment.cs
- Console.cs
- InputBuffer.cs
- DoubleKeyFrameCollection.cs
- _ListenerRequestStream.cs
- CodeNamespace.cs
- StringBlob.cs
- WmlCalendarAdapter.cs
- AddInIpcChannel.cs
- HtmlInputFile.cs
- CookielessHelper.cs
- BindingMAnagerBase.cs
- MembershipPasswordException.cs
- DataGridItemEventArgs.cs
- XPathEmptyIterator.cs
- ClientData.cs
- XmlText.cs
- CodeBinaryOperatorExpression.cs
- GridViewSortEventArgs.cs
- DbSetClause.cs
- CharStorage.cs
- ResizingMessageFilter.cs
- NonParentingControl.cs
- BulletDecorator.cs
- APCustomTypeDescriptor.cs
- contentDescriptor.cs
- MetadataItemEmitter.cs
- ModifyActivitiesPropertyDescriptor.cs
- Win32Native.cs
- DependencyPropertyKey.cs
- DateTimeSerializationSection.cs
- ClaimTypeElementCollection.cs
- CheckBoxFlatAdapter.cs
- ErrorProvider.cs
- LocatorGroup.cs
- CompoundFileStorageReference.cs