Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / X509InitiatorCertificateClientElement.cs / 1 / X509InitiatorCertificateClientElement.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 X509InitiatorCertificateClientElement : ConfigurationElement { public X509InitiatorCertificateClientElement() { } [ConfigurationProperty(ConfigurationStrings.FindValue, DefaultValue = "")] [StringValidator(MinLength = 0)] public string FindValue { get {return (string) base[ConfigurationStrings.FindValue]; } set { if (String.IsNullOrEmpty(value)) { value = String.Empty; } base[ConfigurationStrings.FindValue] = value; } } [ConfigurationProperty(ConfigurationStrings.StoreLocation, DefaultValue = X509CertificateInitiatorClientCredential.DefaultStoreLocation)] [StandardRuntimeEnumValidator(typeof(StoreLocation))] public StoreLocation StoreLocation { get {return (StoreLocation) base[ConfigurationStrings.StoreLocation]; } set {base[ConfigurationStrings.StoreLocation] = value; } } [ConfigurationProperty(ConfigurationStrings.StoreName, DefaultValue = X509CertificateInitiatorClientCredential.DefaultStoreName)] [StandardRuntimeEnumValidator(typeof(StoreName))] public StoreName StoreName { get {return (StoreName) base[ConfigurationStrings.StoreName]; } set {base[ConfigurationStrings.StoreName] = value; } } [ConfigurationProperty(ConfigurationStrings.X509FindType, DefaultValue = X509CertificateInitiatorClientCredential.DefaultFindType)] [StandardRuntimeEnumValidator(typeof(X509FindType))] public X509FindType X509FindType { get {return (X509FindType) base[ConfigurationStrings.X509FindType]; } set {base[ConfigurationStrings.X509FindType] = value; } } public void Copy(X509InitiatorCertificateClientElement from) { if (this.IsReadOnly()) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly))); } if (null == from) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("from"); } this.FindValue = from.FindValue; this.StoreLocation = from.StoreLocation; this.StoreName = from.StoreName; this.X509FindType = from.X509FindType; } internal void ApplyConfiguration(X509CertificateInitiatorClientCredential cert) { if (cert == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("cert"); } PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.StoreLocation].ValueOrigin != PropertyValueOrigin.Default || propertyInfo[ConfigurationStrings.StoreName].ValueOrigin != PropertyValueOrigin.Default || propertyInfo[ConfigurationStrings.X509FindType].ValueOrigin != PropertyValueOrigin.Default || propertyInfo[ConfigurationStrings.FindValue].ValueOrigin != PropertyValueOrigin.Default) { cert.SetCertificate(this.StoreLocation, this.StoreName, this.X509FindType, this.FindValue); } } } } // 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
- Win32.cs
- XsltSettings.cs
- SemanticAnalyzer.cs
- Accessible.cs
- RepeaterCommandEventArgs.cs
- CollectionViewGroup.cs
- HashStream.cs
- WriteFileContext.cs
- DataBinder.cs
- HttpFileCollection.cs
- ConfigXmlWhitespace.cs
- CalendarDay.cs
- Span.cs
- ProviderSettingsCollection.cs
- ObjectStateEntryDbDataRecord.cs
- _BasicClient.cs
- CodeExpressionRuleDeclaration.cs
- DataSourceXmlTextReader.cs
- CacheDict.cs
- GcHandle.cs
- ProcessHostServerConfig.cs
- XmlEnumAttribute.cs
- HttpListenerContext.cs
- PtsPage.cs
- ClusterRegistryConfigurationProvider.cs
- AttachedPropertyBrowsableAttribute.cs
- DurableServiceAttribute.cs
- TraceUtils.cs
- Timer.cs
- RemoteWebConfigurationHost.cs
- Decoder.cs
- StatusBarItemAutomationPeer.cs
- MultipleViewProviderWrapper.cs
- XmlSchemaAttributeGroupRef.cs
- WsdlInspector.cs
- Serialization.cs
- PlainXmlWriter.cs
- ScrollPatternIdentifiers.cs
- DelegatingConfigHost.cs
- StreamingContext.cs
- SmtpDigestAuthenticationModule.cs
- __Error.cs
- WindowsTooltip.cs
- RelOps.cs
- UnsafeNativeMethods.cs
- Calendar.cs
- SafeProcessHandle.cs
- TypeBuilder.cs
- TextDecoration.cs
- EntityCodeGenerator.cs
- PointF.cs
- HashMembershipCondition.cs
- BehaviorEditorPart.cs
- AspCompat.cs
- Geometry.cs
- TableLayout.cs
- SelectedCellsChangedEventArgs.cs
- TreeIterator.cs
- X509ChainPolicy.cs
- OdbcDataAdapter.cs
- serverconfig.cs
- TypeEnumerableViewSchema.cs
- HtmlInputButton.cs
- Repeater.cs
- XmlValueConverter.cs
- WebServiceTypeData.cs
- HttpCookie.cs
- Validator.cs
- ScriptingProfileServiceSection.cs
- WindowsImpersonationContext.cs
- HMACSHA512.cs
- AssemblyAssociatedContentFileAttribute.cs
- XmlnsPrefixAttribute.cs
- SafePEFileHandle.cs
- StaticTextPointer.cs
- XmlSchemaInclude.cs
- CodeValidator.cs
- GridViewPageEventArgs.cs
- SqlBuffer.cs
- NullReferenceException.cs
- MetadataSource.cs
- OdbcEnvironment.cs
- PresentationTraceSources.cs
- IgnoreSectionHandler.cs
- RootBuilder.cs
- WebPartDeleteVerb.cs
- XmlEnumAttribute.cs
- ItemAutomationPeer.cs
- OdbcDataReader.cs
- SystemDiagnosticsSection.cs
- isolationinterop.cs
- CodeTypeConstructor.cs
- DPAPIProtectedConfigurationProvider.cs
- SHA1Managed.cs
- ObjectStorage.cs
- SafePEFileHandle.cs
- UnmanagedMemoryAccessor.cs
- SignedXml.cs
- SplineKeyFrames.cs
- EncoderExceptionFallback.cs