using System; using System.Collections.Generic; namespace Common.Data { /// /// 功能:数据库应用信息 /// 作者:王昊昇 /// 时间:2012.2.8 /// public class DataBaseInfo : IDisposable { /// /// 连接字符串 /// public string ConnectionString { get; set; } /// /// 数据库应用编号 /// public string DatabaseID { get; set; } /// /// 最小连接数 /// public int MinConnectionLength { get; set; } /// /// 数据源连接列表 /// public List ConnectionList { get; set; } /// /// 数据库状态 /// public DataBaseStatus DataBaseStatus { get; set; } /// /// 释放所有资源 /// public void Dispose() { ConnectionString = string.Empty; DatabaseID = string.Empty; MinConnectionLength = 0; foreach (var c in ConnectionList) { c.Dispose(); } ConnectionList.Clear(); ConnectionList = null; } } }