Exemple #1
0
        public override object Update(Type type, object toUpdate)
        {
            toUpdate = DaoRepository.Update(type, toUpdate);
            FileInfo yamlFile = YamlDataDirectory.GetYamlFile(type, toUpdate);

            if (yamlFile != null)
            {
                YamlDataDirectory.Save(yamlFile, type, toUpdate);
            }
            return(toUpdate);
        }
Exemple #2
0
 private object GetLatest(object dao)
 {
     if (dao != null)
     {
         FileInfo yamlFile = YamlDataDirectory.GetYamlFile(dao.GetType(), dao);
         if (yamlFile != null)
         {
             YamlData data = new YamlData(dao);
             return(data.Newer(yamlFile));
         }
     }
     return(dao);
 }
Exemple #3
0
 public FileInfo GetYamlFile(Type type, object data)
 {
     return(YamlDataDirectory.GetYamlFile(type, data));
 }