Beispiel #1
0
        public static T ReadFirstWithCache <T>() where T : BusinessObject
        {
            var cache = BizoCache.Instance;

            if (cache.Exists(typeof(T), null))
            {
                return((T)cache.Retrieve(typeof(T), null));
            }
            var fileNames = GetAllFileNames <T>();

            if (fileNames.Any())
            {
                var loadedBizo = VXMLReader.Read <T>(fileNames.First());
                cache.Add(loadedBizo);
                return(loadedBizo);
            }
            return(null);
        }
Beispiel #2
0
 public static T ReadFromXML <T>(string fileName) where T : BusinessObject
 {
     return(VXMLReader.Read <T>(fileName));
 }