日期:2014-05-18 浏览次数:20444 次
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder; using System; using System.Configuration; [Assembler(typeof(CacheDependencyAssembler))] internal class CacheDependencyData : NameTypeConfigurationElement { private const string dataBaseProperty = "database"; private const string dataTableProperty = "table"; private static void Settings() { new CacheDependencySettings().IsReadOnly(); } [ConfigurationProperty("database", IsRequired=true)] public string Database { get { return (string) base.get_Item("database"); } set { base.set_Item("database", value); } } [ConfigurationProperty("table", IsRequired=true)] public string Table { get { return (string) base.get_Item("table"); } set { base.set_Item("table", value); } } }