namespace ITA.Base.EntLib.FileHelper
{
public class FileHelper : CacheDataHelper,IDataHelper
{
#region IDataHelper 成员
public object GetItem(IHelperPara NamespaceClassnameAndPara, System.Collections.Hashtable ht, object forbase)
{
ICache cache = new ITA.Base.EntLib.Caching.Cache(ht);
cache.ClearExdateCache();
CacheItem item = cache.GetItem(NamespaceClassnameAndPara, cache.DataDoing(new DataDelegate(GetDataByDataBase), forbase));
return item.Data;
//throw new NotImplementedException();
}
#endregion
object GetDataByDataBase(object forbase)
{
FileForBase fb = (FileForBase)forbase;
string t = ITA_File.ReadFile(fb.TrueFilePath, PathType.AbsolutePath, fb.Encode);
return t;
}
#region IDataHelper 成员
public object GetItem(IHelperPara NamespaceClassnameAndPara, System.Collections.Hashtable ht)
{
ICache cache = new ITA.Base.EntLib.Caching.Cache(ht);
cache.ClearExdateCache();
CacheItem item = cache.GetItem(NamespaceClassnameAndPara, cache.DataDoing(new DataDelegate(GetDataByDataBase), NamespaceClassnameAndPara.Para));
return item.Data;
}
#endregion
}
}