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); }
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); }
public FileInfo GetYamlFile(Type type, object data) { return(YamlDataDirectory.GetYamlFile(type, data)); }