你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MobileServiceClient 类

定义

提供对 Microsoft Azure 移动服务的基本访问。

public class MobileServiceClient : IDisposable, Microsoft.WindowsAzure.MobileServices.IMobileServiceClient
type MobileServiceClient = class
    interface IMobileServiceClient
    interface IDisposable
Public Class MobileServiceClient
Implements IDisposable, IMobileServiceClient
继承
MobileServiceClient
实现

构造函数

MobileServiceClient()

这仅适用于单元测试

MobileServiceClient(IMobileServiceClientOptions)

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(String)

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(String, HttpMessageHandler[])

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(String, String)

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(String, String, HttpMessageHandler[])

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(Uri)

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(Uri, HttpMessageHandler[])

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(Uri, String)

初始化 MobileServiceClient 类的新实例。

MobileServiceClient(Uri, String, HttpMessageHandler[])

初始化 MobileServiceClient 类的新实例。

属性

AlternateLoginHost

登录的备用 URI

ApplicationKey

获取通过调用 MobileServiceClient (...) 提供的移动服务应用程序的名称。

ApplicationUri

获取通过调用 MobileServiceClient (...) 提供的移动服务应用程序的 URI。

CurrentUser

成功调用 MobileServiceClient.Login () 后提供的当前经过身份验证的用户。

DefaultDatabasePath

需要为脱机同步创建的任何文件的位置

EventManager

事件管理器,用于公开和管理移动服务类型用于发布和使用事件的事件流。

InstallationId

用于标识此应用程序安装以提供遥测数据的 ID。

LoginUriPrefix

登录终结点的前缀。 如果未将默认设置为 /.auth/login

MobileAppUri

Microsoft Azure 移动应用的绝对 URI。

SerializerSettings

获取或设置用于序列化的设置。

SyncContext

实例 IMobileServiceSyncContext

方法

Dispose()

的 Implemenation IDisposable

Dispose(Boolean)

派生类要使用的 的 IDisposable 实现。

EnsureFileExists(String)

确保文件存在,并在必要时创建它

GetSyncTable(String)

返回一个 IMobileServiceSyncTable 实例,该实例为该表提供非类型化的数据操作。

GetSyncTable<T>()

返回一个 IMobileServiceSyncTable<T> 实例,该实例为本地表提供强类型数据操作。

GetTable(String)

返回一个 IMobileServiceTable 实例,该实例为该表提供非类型化的数据操作。

GetTable<T>()

返回一个 IMobileServiceTable<T> 实例,该实例为该表提供强类型的数据操作。

InvokeApiAsync(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

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

使用指定的 HttpMethod 调用 Windows Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

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

使用指定的 HttpMethod 调用 Windows Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 将通过查询字符串发送到的其他数据。

InvokeApiAsync(String, JToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

InvokeApiAsync(String, JToken, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API,并支持发送 HTTP 内容。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync<T,U>(String, T)

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

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

使用支持发送 HTTP 内容的 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 可通过 HTTP 内容或查询字符串发送其他数据。

InvokeApiAsync<T>(String)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

InvokeApiAsync<T>(String, CancellationToken)

使用 HTTP POST 调用 Microsoft Azure 移动服务的用户定义自定义 API。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

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

使用指定的 HTTP 方法调用 Microsoft Azure 移动服务的用户定义自定义 API。 使用查询字符串可传递其他数据。

LoginAsync(MobileServiceAuthenticationProvider, JObject)

使用提供程序和可选令牌对象将用户登录到 Windows Azure 移动服务。

LoginAsync(String, JObject)

使用提供程序和可选令牌对象将用户登录到 Microsoft Azure 移动服务。

Logout()

注销用户。

LogoutAsync()

注销用户。

RefreshUserAsync()

使用已登录用户的标识提供者刷新访问令牌。

扩展方法

LoginWithMicrosoftAccountAsync(MobileServiceClient, String)

在给定 Microsoft 帐户身份验证令牌的情况下,将用户登录到移动服务应用程序。

适用于