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
- CodeRemoveEventStatement.cs
- ComboBoxRenderer.cs
- IItemProperties.cs
- ActiveXSite.cs
- Codec.cs
- CheckBoxFlatAdapter.cs
- Missing.cs
- WebReferenceCollection.cs
- MemberMemberBinding.cs
- CounterSampleCalculator.cs
- BitmapFrameEncode.cs
- ToolStripSplitButton.cs
- ValueExpressions.cs
- InternalBufferOverflowException.cs
- DriveNotFoundException.cs
- MimeMultiPart.cs
- ColumnTypeConverter.cs
- Rect3DValueSerializer.cs
- BamlMapTable.cs
- ProcessHost.cs
- BitmapCodecInfo.cs
- AnonymousIdentificationSection.cs
- BoolLiteral.cs
- TransformerTypeCollection.cs
- ColorConverter.cs
- TypeAccessException.cs
- StringExpressionSet.cs
- PathSegmentCollection.cs
- HostingEnvironmentSection.cs
- Color.cs
- RowParagraph.cs
- FacetChecker.cs
- Metafile.cs
- TextEmbeddedObject.cs
- TextSelectionHelper.cs
- CompiledQueryCacheKey.cs
- TraversalRequest.cs
- BoundField.cs
- ThemeDirectoryCompiler.cs
- XmlAttributeProperties.cs
- DataColumnPropertyDescriptor.cs
- Internal.cs
- SafeFileMapViewHandle.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- CloudCollection.cs
- UserPersonalizationStateInfo.cs
- TaskFileService.cs
- Int64Animation.cs
- Walker.cs
- FormViewPagerRow.cs
- TextTreeNode.cs
- Win32Exception.cs
- RelationshipEntry.cs
- WorkflowTraceTransfer.cs
- And.cs
- MailAddress.cs
- SAPIEngineTypes.cs
- ExceptionCollection.cs
- LogicalTreeHelper.cs
- SqlConnectionString.cs
- WebServiceHost.cs
- ImpersonationContext.cs
- ListComponentEditor.cs
- TypeValidationEventArgs.cs
- SafeEventLogReadHandle.cs
- Decorator.cs
- EventDescriptorCollection.cs
- Model3D.cs
- SqlWebEventProvider.cs
- WebPartVerbsEventArgs.cs
- RectValueSerializer.cs
- ChildrenQuery.cs
- HttpCookieCollection.cs
- DataGridViewDataErrorEventArgs.cs
- KerberosSecurityTokenAuthenticator.cs
- SourceFileInfo.cs
- MarshalByRefObject.cs
- InheritedPropertyChangedEventArgs.cs
- WorkflowQueue.cs
- MasterPage.cs
- FocusChangedEventArgs.cs
- MimePart.cs
- Run.cs
- TickBar.cs
- PropertyGeneratedEventArgs.cs
- DesignTimeVisibleAttribute.cs
- OdbcHandle.cs
- Size.cs
- ReflectEventDescriptor.cs
- ListViewSortEventArgs.cs
- Clause.cs
- ValidationHelpers.cs
- XsdBuildProvider.cs
- OutputCacheSettings.cs
- GenericUriParser.cs
- MembershipSection.cs
- ReferenceSchema.cs
- PropertyNames.cs
- ColorTransform.cs
- HttpRuntimeSection.cs