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
- HttpResponse.cs
- ChannelTerminatedException.cs
- diagnosticsswitches.cs
- InputDevice.cs
- _TransmitFileOverlappedAsyncResult.cs
- KeyMatchBuilder.cs
- StrokeCollectionDefaultValueFactory.cs
- SoapTypeAttribute.cs
- HandlerFactoryCache.cs
- SqlCharStream.cs
- DirectionalLight.cs
- Camera.cs
- SystemUnicastIPAddressInformation.cs
- ScrollEventArgs.cs
- Timeline.cs
- BufferedWebEventProvider.cs
- CacheDict.cs
- UpdatePanel.cs
- WebBodyFormatMessageProperty.cs
- XPathBinder.cs
- Triplet.cs
- FreezableDefaultValueFactory.cs
- GC.cs
- XmlCharType.cs
- ZipIOLocalFileBlock.cs
- DebugTrace.cs
- ObjectListCommandCollection.cs
- SequenceNumber.cs
- DispatcherTimer.cs
- ModelUIElement3D.cs
- HtmlTableRow.cs
- ExecutionContext.cs
- XXXOnTypeBuilderInstantiation.cs
- NamespaceListProperty.cs
- DetailsViewInsertEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- ScriptingProfileServiceSection.cs
- ActiveXHost.cs
- SecurityTokenRequirement.cs
- DummyDataSource.cs
- FacetChecker.cs
- InstanceNotFoundException.cs
- DBPropSet.cs
- LineServicesRun.cs
- ScopedMessagePartSpecification.cs
- CursorConverter.cs
- XPathSelectionIterator.cs
- WebPartActionVerb.cs
- ThicknessKeyFrameCollection.cs
- VariableQuery.cs
- BuildProviderCollection.cs
- WeakReferenceList.cs
- RuntimeDelegateArgument.cs
- XappLauncher.cs
- GenericTypeParameterBuilder.cs
- SqlGatherProducedAliases.cs
- Set.cs
- StringUtil.cs
- BindUriHelper.cs
- UiaCoreProviderApi.cs
- IndexerNameAttribute.cs
- PostBackTrigger.cs
- TemplateLookupAction.cs
- PointValueSerializer.cs
- CodeDOMProvider.cs
- SpecularMaterial.cs
- SQLSingle.cs
- CookieParameter.cs
- PathBox.cs
- SimpleWorkerRequest.cs
- ToolStripItemEventArgs.cs
- ThreadLocal.cs
- SqlRewriteScalarSubqueries.cs
- PersonalizationDictionary.cs
- mactripleDES.cs
- PropertyGridDesigner.cs
- TextWriterTraceListener.cs
- ProjectionPathBuilder.cs
- IntegerValidatorAttribute.cs
- ObjectManager.cs
- DrawingAttributeSerializer.cs
- SByteConverter.cs
- AmbiguousMatchException.cs
- _SingleItemRequestCache.cs
- TextAutomationPeer.cs
- configsystem.cs
- MenuScrollingVisibilityConverter.cs
- Zone.cs
- Stroke2.cs
- TrackingStringDictionary.cs
- EventLogReader.cs
- DesignTimeTemplateParser.cs
- FileDetails.cs
- ForEachAction.cs
- XmlAttributeAttribute.cs
- XmlNamespaceManager.cs
- Semaphore.cs
- ButtonFieldBase.cs
- ToolboxBitmapAttribute.cs
- AttachedAnnotationChangedEventArgs.cs