Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / PeerCredentialElement.cs / 1 / PeerCredentialElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.Configuration; using System.ServiceModel.Channels; using System.ServiceModel.Security; using System.Xml; using System.Security.Cryptography.X509Certificates; public sealed partial class PeerCredentialElement : ConfigurationElement { public PeerCredentialElement() { } [ConfigurationProperty(ConfigurationStrings.Certificate)] public X509PeerCertificateElement Certificate { get { return (X509PeerCertificateElement)base[ConfigurationStrings.Certificate]; } } [ConfigurationProperty(ConfigurationStrings.PeerAuthentication)] public X509PeerCertificateAuthenticationElement PeerAuthentication { get { return (X509PeerCertificateAuthenticationElement)base[ConfigurationStrings.PeerAuthentication]; } } [ConfigurationProperty(ConfigurationStrings.MessageSenderAuthentication)] public X509PeerCertificateAuthenticationElement MessageSenderAuthentication { get { return (X509PeerCertificateAuthenticationElement)base[ConfigurationStrings.MessageSenderAuthentication]; } } public void Copy(PeerCredentialElement from) { if (this.IsReadOnly()) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly))); } if (null == from) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from"); } this.Certificate.Copy(from.Certificate); this.PeerAuthentication.Copy(from.PeerAuthentication); this.MessageSenderAuthentication.Copy(from.MessageSenderAuthentication); } internal void ApplyConfiguration(PeerCredential creds) { if (creds == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("creds"); } PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.Certificate].ValueOrigin != PropertyValueOrigin.Default) { this.Certificate.ApplyConfiguration(creds); } if (propertyInfo[ConfigurationStrings.PeerAuthentication].ValueOrigin != PropertyValueOrigin.Default) { this.PeerAuthentication.ApplyConfiguration(creds.PeerAuthentication); } if (propertyInfo[ConfigurationStrings.MessageSenderAuthentication].ValueOrigin != PropertyValueOrigin.Default) { this.MessageSenderAuthentication.ApplyConfiguration(creds.MessageSenderAuthentication); } } } } // 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
- _SingleItemRequestCache.cs
- DescendantBaseQuery.cs
- XPathNodeInfoAtom.cs
- DataGridViewCellMouseEventArgs.cs
- SortedDictionary.cs
- TimeSpanValidatorAttribute.cs
- UpdateEventArgs.cs
- RequestDescription.cs
- CodeAttributeArgumentCollection.cs
- StrongNameMembershipCondition.cs
- MultiAsyncResult.cs
- XmlBinaryWriterSession.cs
- RequestUriProcessor.cs
- SafeSecurityHandles.cs
- XmlAnyElementAttribute.cs
- ButtonField.cs
- DBDataPermissionAttribute.cs
- VarRefManager.cs
- MaskedTextProvider.cs
- StateMachineSubscriptionManager.cs
- ProjectionPruner.cs
- WebPartCloseVerb.cs
- PropertyEmitter.cs
- ResourceDictionary.cs
- DbConnectionPoolCounters.cs
- TypeTypeConverter.cs
- XmlReturnWriter.cs
- DocumentAutomationPeer.cs
- TripleDES.cs
- SchemaMerger.cs
- IPipelineRuntime.cs
- XmlSerializerFactory.cs
- WriteTimeStream.cs
- FormViewPagerRow.cs
- ObjectDisposedException.cs
- ManagementException.cs
- WmpBitmapEncoder.cs
- SigningCredentials.cs
- GifBitmapDecoder.cs
- DataGridItem.cs
- Table.cs
- CompressEmulationStream.cs
- StorageConditionPropertyMapping.cs
- NetCodeGroup.cs
- PreviewPageInfo.cs
- SafeHandles.cs
- Compensate.cs
- Thickness.cs
- TextSelectionProcessor.cs
- CodeMemberMethod.cs
- ExpressionServices.cs
- UserControl.cs
- Pair.cs
- ReadOnlyAttribute.cs
- XmlTextReaderImplHelpers.cs
- QuotedStringFormatReader.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- BigInt.cs
- OleAutBinder.cs
- Helpers.cs
- ApplicationGesture.cs
- OleDbEnumerator.cs
- ZipIOModeEnforcingStream.cs
- UnsafeNativeMethods.cs
- QualificationDataItem.cs
- XmlUnspecifiedAttribute.cs
- TemplatedAdorner.cs
- TypeEnumerableViewSchema.cs
- XmlSchemaInferenceException.cs
- Section.cs
- PassportAuthenticationEventArgs.cs
- ElementsClipboardData.cs
- SQLBinaryStorage.cs
- ConfigurationConverterBase.cs
- UndoEngine.cs
- AccessKeyManager.cs
- WebServicesDescriptionAttribute.cs
- RemotingException.cs
- SourceChangedEventArgs.cs
- ProfileService.cs
- DataGridDesigner.cs
- TreeNodeMouseHoverEvent.cs
- UserPreferenceChangedEventArgs.cs
- CommandEventArgs.cs
- ConditionalAttribute.cs
- MarginsConverter.cs
- RenderContext.cs
- CategoryNameCollection.cs
- input.cs
- ObjectStateEntryDbDataRecord.cs
- ScalarConstant.cs
- CellParagraph.cs
- MatchingStyle.cs
- HtmlHistory.cs
- Context.cs
- CopyAttributesAction.cs
- MasterPageParser.cs
- DataControlReference.cs
- ObjectDataSource.cs
- OptimisticConcurrencyException.cs