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
- ColumnResult.cs
- SimpleWorkerRequest.cs
- SqlInternalConnection.cs
- IPCCacheManager.cs
- SuppressMessageAttribute.cs
- EditorPart.cs
- BaseParaClient.cs
- DateTimePicker.cs
- mansign.cs
- QilGeneratorEnv.cs
- WindowsNonControl.cs
- PageBreakRecord.cs
- TabControl.cs
- ListViewEditEventArgs.cs
- TypeDescriptor.cs
- ContentType.cs
- StackSpiller.cs
- RIPEMD160.cs
- DataControlLinkButton.cs
- GeneralTransform3D.cs
- TextViewSelectionProcessor.cs
- OdbcConnectionString.cs
- FilterEventArgs.cs
- ElapsedEventArgs.cs
- ResourceReader.cs
- MenuItem.cs
- HandlerWithFactory.cs
- PersistenceProviderFactory.cs
- ToolStripArrowRenderEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- WebPartConnectionsCancelEventArgs.cs
- safesecurityhelperavalon.cs
- OpenTypeLayout.cs
- FormViewPagerRow.cs
- NonDualMessageSecurityOverHttp.cs
- HttpApplicationStateBase.cs
- CorePropertiesFilter.cs
- DbSetClause.cs
- MsmqInputChannel.cs
- CodeTypeParameterCollection.cs
- XmlUtil.cs
- AncestorChangedEventArgs.cs
- BufferModeSettings.cs
- SchemaNamespaceManager.cs
- ListItem.cs
- CategoryAttribute.cs
- XmlDataDocument.cs
- EdmPropertyAttribute.cs
- PageMediaSize.cs
- RegexTree.cs
- OleDbRowUpdatingEvent.cs
- HtmlTable.cs
- _LocalDataStoreMgr.cs
- PagerStyle.cs
- ExpressionLexer.cs
- CodeNamespaceCollection.cs
- DeferredSelectedIndexReference.cs
- TemplateParser.cs
- Util.cs
- CreationContext.cs
- MessagingDescriptionAttribute.cs
- AttributeQuery.cs
- FixedElement.cs
- Part.cs
- Parsers.cs
- UserControlCodeDomTreeGenerator.cs
- HttpWebRequestElement.cs
- DialogWindow.cs
- Soap12ProtocolReflector.cs
- GenericAuthenticationEventArgs.cs
- Point3DAnimationUsingKeyFrames.cs
- FormsIdentity.cs
- RequestBringIntoViewEventArgs.cs
- XmlCharacterData.cs
- DrawingContextFlattener.cs
- WindowsScroll.cs
- InputReport.cs
- MatrixTransform3D.cs
- MenuAutoFormat.cs
- RegexCapture.cs
- XpsS0ValidatingLoader.cs
- TextComposition.cs
- DBDataPermission.cs
- _NetworkingPerfCounters.cs
- ColorKeyFrameCollection.cs
- Nullable.cs
- EnumConverter.cs
- HighContrastHelper.cs
- FusionWrap.cs
- WebPartZone.cs
- QilBinary.cs
- XmlSchemaCompilationSettings.cs
- ToolStripItemRenderEventArgs.cs
- CodeDomLocalizationProvider.cs
- SingleKeyFrameCollection.cs
- SerializationAttributes.cs
- CodeGenHelper.cs
- RegexCapture.cs
- DBSchemaRow.cs
- DataGridViewSelectedColumnCollection.cs