Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        public static async Task <T> Get <T>(string name)
        {
            await lazyInit();

            return(await Nativebase.Get <T>(name));
        }