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.
24 lines
493 B
24 lines
493 B
using System.Threading;
|
|
|
|
namespace EasyNet.Manager
|
|
{
|
|
public class ManagerThread
|
|
{
|
|
private static ThreadLocal<DbManager> m_ManagerLocal = new ThreadLocal<DbManager>();
|
|
|
|
public static void Set(DbManager m)
|
|
{
|
|
m_ManagerLocal.Value = m;
|
|
}
|
|
|
|
public static DbManager Get()
|
|
{
|
|
return m_ManagerLocal.Value;
|
|
}
|
|
|
|
public static void Clear()
|
|
{
|
|
m_ManagerLocal.Value = null;
|
|
}
|
|
}
|
|
}
|