You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Common.Data
|
|
{
|
|
/// <summary>
|
|
/// 功能:数据库应用信息
|
|
/// 作者:王昊昇
|
|
/// 时间:2012.2.8
|
|
/// </summary>
|
|
public class DataBaseInfo : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// 连接字符串
|
|
/// </summary>
|
|
public string ConnectionString { get; set; }
|
|
|
|
/// <summary>
|
|
/// 数据库应用编号
|
|
/// </summary>
|
|
public string DatabaseID { get; set; }
|
|
|
|
/// <summary>
|
|
/// 最小连接数
|
|
/// </summary>
|
|
public int MinConnectionLength { get; set; }
|
|
|
|
/// <summary>
|
|
/// 数据源连接列表
|
|
/// </summary>
|
|
public List<ConnectionInfo> ConnectionList { get; set; }
|
|
|
|
/// <summary>
|
|
/// 数据库状态
|
|
/// </summary>
|
|
public DataBaseStatus DataBaseStatus { get; set; }
|
|
|
|
/// <summary>
|
|
/// 释放所有资源
|
|
/// </summary>
|
|
public void Dispose()
|
|
{
|
|
ConnectionString = string.Empty;
|
|
DatabaseID = string.Empty;
|
|
MinConnectionLength = 0;
|
|
foreach (var c in ConnectionList)
|
|
{
|
|
c.Dispose();
|
|
}
|
|
ConnectionList.Clear();
|
|
ConnectionList = null;
|
|
}
|
|
}
|
|
}
|
|
|