Esempio n. 1
0
        /// <summary>
        /// Initializes the store for use.
        /// </summary>
        /// <returns>A task that completes when store has initialized.</returns>
        public virtual async Task InitializeAsync()
        {
            if (this.Initialized)
            {
                throw new InvalidOperationException(Resources.SyncStore_AlreadyInitialized);
            }

            MobileServiceLocalSystemTables.DefineAll(this);

            await this.OnInitialize();

            this.Initialized = true;
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes the store for use.
        /// </summary>
        /// <returns>A task that completes when store has initialized.</returns>
        public virtual async Task InitializeAsync()
        {
            if (this.Initialized)
            {
                throw new InvalidOperationException("The store is already initialized.");
            }

            MobileServiceLocalSystemTables.DefineAll(this);

            await this.OnInitialize();

            this.Initialized = true;
        }