//----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- namespace System.IdentityModel.Configuration { using System.ComponentModel; using System.Configuration; /// /// The IdentityModelCachesElement class provides XML configuration for WIF caching services. /// public sealed partial class IdentityModelCachesElement : ConfigurationElement { /// /// Gets or sets the type. This element is optional and the specified custom replay cache /// must derive from . /// To enable replay detection, configure the . /// [ConfigurationProperty(ConfigurationStrings.TokenReplayCache, IsRequired = false)] public CustomTypeElement TokenReplayCache { get { return (CustomTypeElement)this[ConfigurationStrings.TokenReplayCache]; } set { this[ConfigurationStrings.TokenReplayCache] = value; } } /// /// Gets or sets the type. This element is optional and the specified custom cache /// must derive from . /// This cache is used for caching . /// [ConfigurationProperty(ConfigurationStrings.SessionSecurityTokenCache, IsRequired = false)] public CustomTypeElement SessionSecurityTokenCache { get { return (CustomTypeElement)this[ConfigurationStrings.SessionSecurityTokenCache]; } set { this[ConfigurationStrings.SessionSecurityTokenCache] = value; } } /// /// Gets a value indicating whether this element has been configured. /// public bool IsConfigured { get { return this.TokenReplayCache != null || this.SessionSecurityTokenCache != null; } } } }