예제 #1
0
        public async Task InitializeAsync()
        {
            if (MobileService?.SyncContext?.IsInitialized ?? false)
            {
                return;
            }

            MobileService = new MobileServiceClient(PCL_AppConstants.sCurrentServiceURL);
            string path = "appX007.db";

            var store = new MobileServiceSQLiteStoreWithLogging(path, PCL_AppConstants.bLogSqlLite);

            store.DefineTable <TodoItem>();
            await MobileService.SyncContext.InitializeAsync(store);

            itemsTable = MobileService.GetSyncTable <T>();
        }
예제 #2
0
파일: DataStore.cs 프로젝트: sverma333/XDog
        public async Task InitializeAsync()
        {
            if (MobileService?.SyncContext?.IsInitialized ?? false)
            {
                return;
            }

            MobileService = new MobileServiceClient(PCL_AppConstants.sCurrentServiceURL)
            {
                SerializerSettings = new MobileServiceJsonSerializerSettings
                {
                    CamelCasePropertyNames = true
                }
            };

            string path = "local11.db";

            var store = new MobileServiceSQLiteStoreWithLogging(path, PCL_AppConstants.bLogSqlLite);

            store.DefineTable <T>();
            await MobileService.SyncContext.InitializeAsync(store);

            itemsTable = MobileService.GetSyncTable <T>();
        }