动软代码生成器 winform  下DataCache 找不到

解决方案 »

  1.   

    需要添加ltp.com.dll的引用。
      

  2.   

    此ltp.com.dll在什么地方能找到谢谢
      

  3.   

    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;
                }
            }        
        }