动软代码生成器 winform 下DataCache 找不到
解决方案 »
- winfrom 打印 急!!!
- 用Live Writer发帖的问题
- c# 正则表达式
- C#版的ActiveReport打印换页时的PageFooter4(页尾、页脚)的控制问题
- 请教一个问题,关于Treeview的
- 跪求(代码大全第二版电子版)下载地址,顶者有分 ^_^
- 谁有用C#写的Windows Form的邮件收发系统的源代码?
- C# Windows 编程中,Main() 中是不是一般只放一句这个?
- 关于一个数段提示的问题!谢谢!
- 求教
- 界面问题:请问VS2005/2008的显示控件属性的窗口是如何实现的?
- 不显示删除回复显示所有回复显示星级回复显示得分回复 web service使用linq时返回错误:System.Data.Linq.Binary 无法序列化,
{
private System.Collections.Generic.Dictionary<string, object> dic = new Dictionary<string, object>();
private static volatile DataCache instance = null;
private static object lockHelper = new object(); private DataCache()
{ }
//public void Add(string key, string value)
//{
// dic.Add(key, value);
//}
//public void Remove(string key)
//{
// dic.Remove(key);
//}
internal object GetCache(string ClassNamespace)
{
if (dic.ContainsKey(ClassNamespace))
return dic[ClassNamespace];
else
return null;
} internal void SetCache(string ClassNamespace, object objType)
{
dic.Add(ClassNamespace, objType);
}
internal object this[string index]
{
get
{
if (dic.ContainsKey(index))
return dic[index];
else
return null;
}
set { dic[index] = value; }
} internal static DataCache Instance
{
get
{
if (instance == null)
{
lock (lockHelper)
{
if (instance == null)
{
instance = new DataCache();
}
}
}
return instance;
}
}
}