AdoHelper能否改写成单例模式?
MS提供的GotDotNet.Application.Data 3.1中,实现了对多种数据库的操作,但访问方式也从原来的static方法改为工厂方法创建实例。考虑到一个问题,这个类在项目中会被大量调用,每次都new会花很多时间,故想能否做一个单例模式来快速访问,但查看代码发现有两个Field,不太明白这两个Field保存的是什么状态,若只用一个实例是否会在不同的调用者之间出现混乱。
不知是否有人和我同样的想法。
/// <summary>
/// Internal handler used for bubbling up the event to the user
/// </summary>
protected RowUpdatingHandler m_rowUpdating;
/// <summary>
/// Internal handler used for bubbling up the event to the user
/// </summary>
protected RowUpdatedHandler m_rowUpdated;
不知是否有人和我同样的想法。
/// <summary>
/// Internal handler used for bubbling up the event to the user
/// </summary>
protected RowUpdatingHandler m_rowUpdating;
/// <summary>
/// Internal handler used for bubbling up the event to the user
/// </summary>
protected RowUpdatedHandler m_rowUpdated;