private static async Task init() { var lastUpdatedRemote = DateTime.Parse(await Firebase.Get <string>("updated")); var lastUpdatedLocal = DateTime.Parse(await Nativebase.Get <string>("updated")); if (lastUpdatedRemote > lastUpdatedLocal) { foreach (var repo in _repos) { var data = await Firebase.Get(repo); var ok = await Nativebase.Put(repo, data); } await Nativebase.Put("updated", lastUpdatedRemote); } }
public static async Task <T> Get <T>(string name) { await lazyInit(); return(await Nativebase.Get <T>(name)); }