MobileServiceClient MobileServiceClient MobileServiceClient Class

Definition

Provides basic access to a Microsoft Azure Mobile Service.

public class MobileServiceClient : IDisposable, Microsoft.WindowsAzure.MobileServices.IMobileServiceClient
type MobileServiceClient = class
    interface IMobileServiceClient
    interface IDisposable
Public Class MobileServiceClient
Implements IDisposable, IMobileServiceClient
Inheritance
MobileServiceClientMobileServiceClientMobileServiceClient
Implements

Constructors

MobileServiceClient() MobileServiceClient() MobileServiceClient()

This is for unit testing only

MobileServiceClient(String, HttpMessageHandler[]) MobileServiceClient(String, HttpMessageHandler[]) MobileServiceClient(String, HttpMessageHandler[])

Initializes a new instance of the MobileServiceClient class.

MobileServiceClient(Uri, HttpMessageHandler[]) MobileServiceClient(Uri, HttpMessageHandler[]) MobileServiceClient(Uri, HttpMessageHandler[])

Initializes a new instance of the MobileServiceClient class.

Properties

AlternateLoginHost AlternateLoginHost AlternateLoginHost

Alternate URI for login

CurrentUser CurrentUser CurrentUser

The current authenticated user provided after a successful call to MobileServiceClient.Login().

DefaultDatabasePath DefaultDatabasePath DefaultDatabasePath

The location of any files we need to create for offline-sync

EventManager EventManager EventManager

The event manager that exposes and manages the event stream used by the mobile services types to publish and consume events.

InstallationId InstallationId InstallationId

The id used to identify this installation of the application to provide telemetry data.

LoginUriPrefix LoginUriPrefix LoginUriPrefix

Prefix for the login endpoints. If not set defaults to /.auth/login

MobileAppUri MobileAppUri MobileAppUri

Absolute URI of the Microsoft Azure Mobile App.

SerializerSettings SerializerSettings SerializerSettings

Gets or sets the settings used for serialization.

SyncContext SyncContext SyncContext

Instance of IMobileServiceSyncContext

Methods

Dispose() Dispose() Dispose()

Implemenation of IDisposable

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Implemenation of IDisposable for derived classes to use.

EnsureFileExists(String) EnsureFileExists(String) EnsureFileExists(String)

Ensures that a file exists, creating it if necessary

GetSyncTable(String) GetSyncTable(String) GetSyncTable(String)

Returns a IMobileServiceSyncTable instance, which provides untyped data operations for that table.

GetSyncTable<T>() GetSyncTable<T>() GetSyncTable<T>()

Returns a IMobileServiceSyncTable<T> instance, which provides strongly typed data operations for local table.

GetTable(String) GetTable(String) GetTable(String)

Returns a IMobileServiceTable instance, which provides untyped data operations for that table.

GetTable<T>() GetTable<T>() GetTable<T>()

Returns a IMobileServiceTable<T> instance, which provides strongly typed data operations for that table.

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>, CancellationToken)

Invokes a user-defined custom API of a Windows Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string.

InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>) InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>) InvokeApiAsync(String, HttpContent, HttpMethod, IDictionary<String,String>, IDictionary<String,String>)

Invokes a user-defined custom API of a Windows Azure Mobile Service using the specified HttpMethod. Additional data can be sent though the HTTP content or the query string.

InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, JToken, HttpMethod, IDictionary<String,String>, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP method. Additional data can be sent though the HTTP content or the query string.

InvokeApiAsync(String, JToken, CancellationToken) InvokeApiAsync(String, JToken, CancellationToken) InvokeApiAsync(String, JToken, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST, with support for sending HTTP content.

InvokeApiAsync(String, CancellationToken) InvokeApiAsync(String, CancellationToken) InvokeApiAsync(String, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.

InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync(String, HttpMethod, IDictionary<String,String>, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data will sent to through the query string.

InvokeApiAsync<T,U>(String, T, CancellationToken) InvokeApiAsync<T,U>(String, T, CancellationToken) InvokeApiAsync<T,U>(String, T, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST with support for sending HTTP content.

InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync<T,U>(String, T, HttpMethod, IDictionary<String,String>, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be sent though the HTTP content or the query string.

InvokeApiAsync<T>(String, CancellationToken) InvokeApiAsync<T>(String, CancellationToken) InvokeApiAsync<T>(String, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using an HTTP POST.

InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken) InvokeApiAsync<T>(String, HttpMethod, IDictionary<String,String>, CancellationToken)

Invokes a user-defined custom API of a Microsoft Azure Mobile Service using the specified HTTP Method. Additional data can be passed using the query string.

LoginAsync(MobileServiceAuthenticationProvider, JObject) LoginAsync(MobileServiceAuthenticationProvider, JObject) LoginAsync(MobileServiceAuthenticationProvider, JObject)

Logs a user into a Windows Azure Mobile Service with the provider and optional token object.

LoginAsync(String, JObject) LoginAsync(String, JObject) LoginAsync(String, JObject)

Logs a user into a Microsoft Azure Mobile Service with the provider and optional token object.

LogoutAsync() LogoutAsync() LogoutAsync()

Log a user out.

RefreshUserAsync() RefreshUserAsync() RefreshUserAsync()

Refreshes access token with the identity provider for the logged in user.

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

LoginWithMicrosoftAccountAsync(MobileServiceClient, String) LoginWithMicrosoftAccountAsync(MobileServiceClient, String) LoginWithMicrosoftAccountAsync(MobileServiceClient, String)

Log a user into a Mobile Services application given a Microsoft Account authentication token.

Applies to