动软代码生成器 winform DataCache

songguanlgun 2009-06-16 02:12:56
动软代码生成器 winform 下DataCache 找不到
...全文
155 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zetee 2010-04-02
  • 打赏
  • 举报
回复
internal class DataCache
{
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;
}
}


}
songguanlgun 2009-06-17
  • 打赏
  • 举报
回复
此ltp.com.dll在什么地方能找到谢谢
ffffssd 2009-06-16
  • 打赏
  • 举报
回复
需要添加ltp.com.dll的引用。

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧