protected OfflineDataManager(
     IMobileServiceSyncContext mobileServiceSyncContext,
     IMobileServiceSyncTable <TModel> mobileServiceSyncTable)
 {
     _mobileServiceSyncTable   = mobileServiceSyncTable;
     _mobileServiceSyncContext = mobileServiceSyncContext;
 }
示例#2
0
 public AzureStoreServiceFixture()
 {
     _client     = Substitute.For <IMobileServiceClient>();
     _connection = Substitute.For <ISqlConnection>();
     _store      = Substitute.For <IMobileServiceLocalStore>();
     _context    = Substitute.For <IMobileServiceSyncContext>();
     _client.SyncContext.Returns(_context);
 }
 /// <summary>
 /// Initializes the sync context.
 /// </summary>
 /// <param name="context">An instance of <see cref="IMobileServiceSyncContext"/>.</param>
 /// <param name="store">An instance of <see cref="IMobileServiceLocalStore"/>.</param>
 /// <param name="trackingOptions">The traking options that should be enabled on this instance of <see cref="IMobileServiceSyncContext"/>.</param>
 /// <returns>A task that completes when the initialization when initialization has finished.</returns>
 public static Task InitializeAsync(this IMobileServiceSyncContext context, IMobileServiceLocalStore store, StoreTrackingOptions trackingOptions)
 => context.InitializeAsync(store, new MobileServiceSyncHandler(), trackingOptions);
 /// <summary>
 /// Initializes the sync context.
 /// </summary>
 /// <param name="context">An instance of <see cref="IMobileServiceSyncContext"/>.</param>
 /// <param name="store">An instance of <see cref="IMobileServiceLocalStore"/>.</param>
 public static Task InitializeAsync(this IMobileServiceSyncContext context, IMobileServiceLocalStore store)
 => context.InitializeAsync(store, new MobileServiceSyncHandler());
 /// <summary>
 /// Replays all pending local operations against the remote tables.
 /// </summary>
 public static Task PushAsync(this IMobileServiceSyncContext context)
 => context.PushAsync(CancellationToken.None);