diff --git a/sdk/Managed/src/Microsoft.WindowsAzure.MobileServices/Extensions/MobileServiceSyncTableExtensions.cs b/sdk/Managed/src/Microsoft.WindowsAzure.MobileServices/Extensions/MobileServiceSyncTableExtensions.cs index efbe3efe6..1d314b3a3 100644 --- a/sdk/Managed/src/Microsoft.WindowsAzure.MobileServices/Extensions/MobileServiceSyncTableExtensions.cs +++ b/sdk/Managed/src/Microsoft.WindowsAzure.MobileServices/Extensions/MobileServiceSyncTableExtensions.cs @@ -80,23 +80,6 @@ public static Task PullAsync(this IMobileServiceSyncTable table, string return table.PullAsync(queryId, query, pushOtherTables: true, cancellationToken: cancellationToken); } - /// - /// Pulls all items that match the given query - /// from the associated remote table. - /// - /// The instance of table to execute pull on. - /// - /// An OData query that determines which items to - /// pull from the remote table. - /// - /// - /// A task that completes when pull operation has finished. - /// - public static Task PullAsync(this IMobileServiceSyncTable table, IMobileServiceTableQuery query) - { - return table.PullAsync(null, query, cancellationToken: CancellationToken.None); - } - /// /// Pulls all items that match the given query /// from the associated remote table. diff --git a/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/MobileServiceClient.Test.cs b/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/MobileServiceClient.Test.cs index 32b26df93..619fbb6de 100644 --- a/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/MobileServiceClient.Test.cs +++ b/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/MobileServiceClient.Test.cs @@ -257,7 +257,7 @@ public async Task PurgeAsync_Throws_WhenSyncContextIsNotInitialized() [TestMethod] public async Task PullAsync_Throws_WhenSyncContextIsNotInitialized() { - await this.TestSyncContextNotInitialized(table => table.PullAsync(table.Where(t => t.String == "abc"))); + await this.TestSyncContextNotInitialized(table => table.PullAsync(null, table.Where(t => t.String == "abc"))); } private async Task TestSyncContextNotInitialized(Func, Task> action) diff --git a/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/Table/Sync/MobileServiceSyncTable.Generic.Test.cs b/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/Table/Sync/MobileServiceSyncTable.Generic.Test.cs index c8a8e87e5..eba7850e0 100644 --- a/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/Table/Sync/MobileServiceSyncTable.Generic.Test.cs +++ b/sdk/Managed/test/Microsoft.WindowsAzure.MobileServices.Test/UnitTests/Table/Sync/MobileServiceSyncTable.Generic.Test.cs @@ -313,7 +313,7 @@ public async Task PullAsync_UsesSkipAndTakeThenFollowsLinkThenUsesSkipAndTake() Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); - await table.PullAsync(table.Take(51).Skip(3)); + await table.PullAsync(null, table.Take(51).Skip(3)); Assert.AreEqual(store.TableMap["stringId_test_table"].Count, 6); Assert.AreEqual(store.TableMap["stringId_test_table"]["abc"].Value("String"), "Hey"); @@ -440,7 +440,7 @@ public async Task PullAsync_UsesTopInQuery_IfLessThan50() Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); - await table.PullAsync(table.Take(49)); + await table.PullAsync(null, table.Take(49)); Assert.AreEqual(store.TableMap["stringId_test_table"].Count, 2); @@ -463,7 +463,7 @@ public async Task PullAsync_DefaultsTo50_IfGreaterThan50() Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); - await table.PullAsync(table.Take(51)); + await table.PullAsync(null, table.Take(51)); Assert.AreEqual(store.TableMap["stringId_test_table"].Count, 2); @@ -487,7 +487,7 @@ public async Task PullAsync_DoesNotFollowLink_IfMaxRecordsAreRetrieved() Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); - await table.PullAsync(table.Take(1)); + await table.PullAsync(null, table.Take(1)); Assert.AreEqual(store.TableMap["stringId_test_table"].Count, 1); } @@ -508,7 +508,7 @@ public async Task PullAsync_DoesNotFollowLink_IfResultIsEmpty() Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); - await table.PullAsync(table.Take(1)); + await table.PullAsync(null, table.Take(1)); Assert.IsFalse(store.TableMap.ContainsKey("stringId_test_table")); } @@ -574,7 +574,7 @@ public async Task PullAsync_Throws_WhenOrderByClauseIsSpecifiedAndOptionIsNotSet table.SupportedOptions &= ~MobileServiceRemoteTableOptions.OrderBy; var query = table.OrderBy(x => x.String); - var exception = await ThrowsAsync(() => table.PullAsync(query)); + var exception = await ThrowsAsync(() => table.PullAsync(null, query)); Assert.AreEqual(exception.ParamName, "query"); Assert.StartsWith(exception.Message, "The supported table options does not include orderby."); } @@ -589,7 +589,7 @@ public async Task PullAsync_Throws_WhenTopClauseIsSpecifiedAndOptionIsNotSet() table.SupportedOptions &= ~MobileServiceRemoteTableOptions.Top; var query = table.Take(30); - var exception = await ThrowsAsync(() => table.PullAsync(query)); + var exception = await ThrowsAsync(() => table.PullAsync(null, query)); Assert.AreEqual(exception.ParamName, "query"); Assert.StartsWith(exception.Message, "The supported table options does not include top."); } @@ -604,7 +604,7 @@ public async Task PullAsync_Throws_WhenSkipClauseIsSpecifiedAndOptionIsNotSet() table.SupportedOptions &= ~MobileServiceRemoteTableOptions.Skip; var query = table.Skip(30); - var exception = await ThrowsAsync(() => table.PullAsync(query)); + var exception = await ThrowsAsync(() => table.PullAsync(null, query)); Assert.AreEqual(exception.ParamName, "query"); Assert.StartsWith(exception.Message, "The supported table options does not include skip."); }