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
- DataSvcMapFile.cs
- Underline.cs
- HttpHeaderCollection.cs
- PartialCachingControl.cs
- DbDeleteCommandTree.cs
- SerializationTrace.cs
- Point3D.cs
- WindowsGrip.cs
- X509CertificateClaimSet.cs
- ExpressionTextBox.xaml.cs
- _NestedSingleAsyncResult.cs
- DataControlFieldCollection.cs
- DataGridViewComboBoxEditingControl.cs
- TemplateBamlRecordReader.cs
- DataKey.cs
- StylusPointProperties.cs
- DllNotFoundException.cs
- ClientProxyGenerator.cs
- UInt32Converter.cs
- OptimizedTemplateContentHelper.cs
- behaviorssection.cs
- IRCollection.cs
- NativeCompoundFileAPIs.cs
- OdbcConnectionString.cs
- CheckBox.cs
- XPathDocumentBuilder.cs
- GradientStop.cs
- IconEditor.cs
- VariableAction.cs
- QuaternionRotation3D.cs
- RadioButtonBaseAdapter.cs
- VisualCollection.cs
- ViewEvent.cs
- SystemIPGlobalProperties.cs
- SelectionUIHandler.cs
- WmfPlaceableFileHeader.cs
- ClonableStack.cs
- NodeInfo.cs
- ProcessHostServerConfig.cs
- FormatPage.cs
- EqualityComparer.cs
- XmlKeywords.cs
- OleDbCommand.cs
- WriteTimeStream.cs
- WorkerProcess.cs
- EventTrigger.cs
- WeakReference.cs
- ProviderSettingsCollection.cs
- GregorianCalendarHelper.cs
- SourceSwitch.cs
- RoleService.cs
- DomNameTable.cs
- CompModSwitches.cs
- SimpleHandlerBuildProvider.cs
- FormViewCommandEventArgs.cs
- ProviderBase.cs
- MessageDispatch.cs
- OutputCacheSettings.cs
- SelectionEditor.cs
- XmlCharacterData.cs
- dataobject.cs
- TypeToken.cs
- XamlUtilities.cs
- LocalValueEnumerator.cs
- SplitterPanelDesigner.cs
- InstanceDataCollectionCollection.cs
- SmtpNtlmAuthenticationModule.cs
- QueryParameter.cs
- ScalarType.cs
- ProviderException.cs
- DomNameTable.cs
- BamlRecordReader.cs
- XmlReader.cs
- XhtmlConformanceSection.cs
- WebPartDisplayModeEventArgs.cs
- WeakReferenceEnumerator.cs
- GeometryModel3D.cs
- HtmlGenericControl.cs
- InheritablePropertyChangeInfo.cs
- SQLSingle.cs
- ItemsChangedEventArgs.cs
- SymbolTable.cs
- OverflowException.cs
- SafeNativeMethods.cs
- SqlDataSourceSelectingEventArgs.cs
- DynamicResourceExtensionConverter.cs
- SafeFileMapViewHandle.cs
- DataGrid.cs
- TrackingMemoryStreamFactory.cs
- DependencyPropertyDescriptor.cs
- Model3D.cs
- XmlNavigatorFilter.cs
- PageAsyncTaskManager.cs
- MissingSatelliteAssemblyException.cs
- EnvironmentPermission.cs
- _ListenerAsyncResult.cs
- TemplateField.cs
- SerializationInfoEnumerator.cs
- SizeKeyFrameCollection.cs
- ElementsClipboardData.cs