예제 #1
0
        public async Task <bool> SyncAllAsync()
        {
            var list = new List <Task <bool> >();

            //list.Add(GroupsManager.SyncAsync());
            list.Add(PersonManager.SyncAsync());
            //list.Add(MembershipManager.SyncAsync());

            var successes = await Task.WhenAll(list).ConfigureAwait(false);

            //var count = MembershipManager.Table.ToListAsync().Result;
            return(successes.Any(x => !x));
        }
예제 #2
0
        public AzureService()
        {
            var url   = new Uri(Constants.ApplicationURL);
            var store = new MobileServiceSQLiteStore($"{url.Host}.db");

            store.DefineTable <Person>();
            store.DefineTable <Groups>();
            //store.DefineTable<Membership>();
            Client.SyncContext.InitializeAsync(store);

            PersonManager = new PersonManager();
            //MembershipManager = new MembershipManager();
            //GroupsManager = new GroupsManager();
        }