Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / LocalClientSecuritySettingsElement.cs / 1 / LocalClientSecuritySettingsElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Channels; using System.Globalization; using System.Net.Security; using System.ServiceModel.Security; using System.ComponentModel; public sealed partial class LocalClientSecuritySettingsElement : ConfigurationElement { public LocalClientSecuritySettingsElement() { } [ConfigurationProperty(ConfigurationStrings.CacheCookies, DefaultValue = SpnegoTokenProvider.defaultClientCacheTokens)] public bool CacheCookies { get {return (bool) base[ConfigurationStrings.CacheCookies]; } set {base[ConfigurationStrings.CacheCookies] = value; } } [ConfigurationProperty(ConfigurationStrings.DetectReplays, DefaultValue = SecurityProtocolFactory.defaultDetectReplays)] public bool DetectReplays { get {return (bool) base[ConfigurationStrings.DetectReplays]; } set {base[ConfigurationStrings.DetectReplays] = value; } } [ConfigurationProperty(ConfigurationStrings.ReplayCacheSize, DefaultValue = SecurityProtocolFactory.defaultMaxCachedNonces)] [IntegerValidator(MinValue = 1)] public int ReplayCacheSize { get { return (int)base[ConfigurationStrings.ReplayCacheSize]; } set { base[ConfigurationStrings.ReplayCacheSize] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxClockSkew, DefaultValue = SecurityProtocolFactory.defaultMaxClockSkewString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan MaxClockSkew { get {return (TimeSpan) base[ConfigurationStrings.MaxClockSkew]; } set {base[ConfigurationStrings.MaxClockSkew] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxCookieCachingTime, DefaultValue = SpnegoTokenProvider.defaultClientMaxTokenCachingTimeString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan MaxCookieCachingTime { get {return (TimeSpan) base[ConfigurationStrings.MaxCookieCachingTime]; } set {base[ConfigurationStrings.MaxCookieCachingTime] = value; } } [ConfigurationProperty(ConfigurationStrings.ReplayWindow, DefaultValue = SecurityProtocolFactory.defaultReplayWindowString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan ReplayWindow { get {return (TimeSpan) base[ConfigurationStrings.ReplayWindow]; } set {base[ConfigurationStrings.ReplayWindow] = value; } } [ConfigurationProperty(ConfigurationStrings.SessionKeyRenewalInterval, DefaultValue = SecuritySessionClientSettings.defaultKeyRenewalIntervalString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan SessionKeyRenewalInterval { get { return (TimeSpan)base[ConfigurationStrings.SessionKeyRenewalInterval]; } set { base[ConfigurationStrings.SessionKeyRenewalInterval] = value; } } [ConfigurationProperty(ConfigurationStrings.SessionKeyRolloverInterval, DefaultValue = SecuritySessionClientSettings.defaultKeyRolloverIntervalString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan SessionKeyRolloverInterval { get { return (TimeSpan) base[ConfigurationStrings.SessionKeyRolloverInterval]; } set { base[ConfigurationStrings.SessionKeyRolloverInterval] = value; } } [ConfigurationProperty(ConfigurationStrings.ReconnectTransportOnFailure, DefaultValue = System.ServiceModel.Security.SecuritySessionClientSettings.defaultTolerateTransportFailures)] public bool ReconnectTransportOnFailure { get { return (bool)base[ConfigurationStrings.ReconnectTransportOnFailure]; } set { base[ConfigurationStrings.ReconnectTransportOnFailure] = value; } } [ConfigurationProperty(ConfigurationStrings.TimestampValidityDuration, DefaultValue = SecurityProtocolFactory.defaultTimestampValidityDurationString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan TimestampValidityDuration { get { return (TimeSpan)base[ConfigurationStrings.TimestampValidityDuration]; } set { base[ConfigurationStrings.TimestampValidityDuration] = value; } } [ConfigurationProperty(ConfigurationStrings.CookieRenewalThresholdPercentage, DefaultValue = SpnegoTokenProvider.defaultServiceTokenValidityThresholdPercentage)] [IntegerValidator(MinValue = 0, MaxValue=100)] public int CookieRenewalThresholdPercentage { get { return (int)base[ConfigurationStrings.CookieRenewalThresholdPercentage]; } set { base[ConfigurationStrings.CookieRenewalThresholdPercentage] = value; } } internal void ApplyConfiguration(LocalClientSecuritySettings settings) { if (settings == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } settings.CacheCookies = this.CacheCookies; if (PropertyValueOrigin.Default != this.ElementInformation.Properties[ConfigurationStrings.DetectReplays].ValueOrigin) settings.DetectReplays = this.DetectReplays; settings.MaxClockSkew = this.MaxClockSkew; settings.MaxCookieCachingTime = this.MaxCookieCachingTime; settings.ReconnectTransportOnFailure = this.ReconnectTransportOnFailure; settings.ReplayCacheSize = this.ReplayCacheSize; settings.ReplayWindow = this.ReplayWindow; settings.SessionKeyRenewalInterval = this.SessionKeyRenewalInterval; settings.SessionKeyRolloverInterval = this.SessionKeyRolloverInterval; settings.TimestampValidityDuration = this.TimestampValidityDuration; settings.CookieRenewalThresholdPercentage = this.CookieRenewalThresholdPercentage; } internal void InitializeFrom(LocalClientSecuritySettings settings) { if (settings == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } this.CacheCookies = settings.CacheCookies; this.DetectReplays = settings.DetectReplays; this.MaxClockSkew = settings.MaxClockSkew; this.MaxCookieCachingTime = settings.MaxCookieCachingTime; this.ReconnectTransportOnFailure = settings.ReconnectTransportOnFailure; this.ReplayCacheSize = settings.ReplayCacheSize; this.ReplayWindow = settings.ReplayWindow; this.SessionKeyRenewalInterval = settings.SessionKeyRenewalInterval; this.SessionKeyRolloverInterval = settings.SessionKeyRolloverInterval; this.TimestampValidityDuration = settings.TimestampValidityDuration; this.CookieRenewalThresholdPercentage = settings.CookieRenewalThresholdPercentage; } internal void CopyFrom(LocalClientSecuritySettingsElement source) { if (source == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source"); } this.CacheCookies = source.CacheCookies; if (PropertyValueOrigin.Default != source.ElementInformation.Properties[ConfigurationStrings.DetectReplays].ValueOrigin) this.DetectReplays = source.DetectReplays; this.MaxClockSkew = source.MaxClockSkew; this.MaxCookieCachingTime = source.MaxCookieCachingTime; this.ReconnectTransportOnFailure = source.ReconnectTransportOnFailure; this.ReplayCacheSize = source.ReplayCacheSize; this.ReplayWindow = source.ReplayWindow; this.SessionKeyRenewalInterval = source.SessionKeyRenewalInterval; this.SessionKeyRolloverInterval = source.SessionKeyRolloverInterval; this.TimestampValidityDuration = source.TimestampValidityDuration; this.CookieRenewalThresholdPercentage = source.CookieRenewalThresholdPercentage; } } } // 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
- DnsElement.cs
- QueueProcessor.cs
- TextEditorThreadLocalStore.cs
- AccessText.cs
- InheritedPropertyChangedEventArgs.cs
- BindingContext.cs
- MemberCollection.cs
- WebPartCatalogCloseVerb.cs
- _NTAuthentication.cs
- ComboBoxAutomationPeer.cs
- EdmComplexPropertyAttribute.cs
- AsyncMethodInvoker.cs
- TreeNodeCollectionEditor.cs
- _ConnectStream.cs
- CodeObject.cs
- ConfigUtil.cs
- SmtpClient.cs
- SecurityTokenResolver.cs
- ApplicationTrust.cs
- safex509handles.cs
- BoundConstants.cs
- MappedMetaModel.cs
- NameSpaceExtractor.cs
- DataGridViewRowPrePaintEventArgs.cs
- DialogDivider.cs
- DataGridViewCellStyleConverter.cs
- MultiTrigger.cs
- SequenceNumber.cs
- Effect.cs
- XmlStringTable.cs
- AppDomainManager.cs
- HiddenField.cs
- XPathMultyIterator.cs
- FormClosingEvent.cs
- ListView.cs
- DataGridViewColumnTypePicker.cs
- WebBrowserDesigner.cs
- XmlSerializerAssemblyAttribute.cs
- httpapplicationstate.cs
- TableColumn.cs
- XmlSchemaChoice.cs
- ExceptionUtil.cs
- MatrixCamera.cs
- HttpListenerException.cs
- IsolatedStorageFile.cs
- EditorAttribute.cs
- ConstrainedDataObject.cs
- InputLanguageProfileNotifySink.cs
- WrapPanel.cs
- CryptoKeySecurity.cs
- GC.cs
- WpfPayload.cs
- Hash.cs
- LinkButton.cs
- ButtonBase.cs
- ValidationRuleCollection.cs
- XmlNullResolver.cs
- DataTableMappingCollection.cs
- ManipulationDeltaEventArgs.cs
- RemotingAttributes.cs
- ListQueryResults.cs
- Helpers.cs
- PtsHost.cs
- DataGridCaption.cs
- Group.cs
- SHA1CryptoServiceProvider.cs
- Rect.cs
- TileBrush.cs
- ServicePointManagerElement.cs
- TakeQueryOptionExpression.cs
- AndMessageFilter.cs
- HttpException.cs
- SingleKeyFrameCollection.cs
- SoapParser.cs
- DataViewListener.cs
- X509CertificateClaimSet.cs
- InvalidOleVariantTypeException.cs
- QueryStringParameter.cs
- BitmapSourceSafeMILHandle.cs
- PortCache.cs
- EditorPartCollection.cs
- MsmqIntegrationChannelListener.cs
- WinEventTracker.cs
- DNS.cs
- HtmlPhoneCallAdapter.cs
- ObservableCollection.cs
- Pen.cs
- MetadataImporterQuotas.cs
- RecognitionEventArgs.cs
- ILGenerator.cs
- XmlSchemaGroupRef.cs
- OpenTypeLayoutCache.cs
- RequestQueryProcessor.cs
- CancelEventArgs.cs
- SQLResource.cs
- SerTrace.cs
- _Semaphore.cs
- MobilePage.cs
- ApplicationFileCodeDomTreeGenerator.cs
- LayoutTableCell.cs