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

GooglePushMessage 构造函数

定义

重载

GooglePushMessage()

初始化 类的新实例 GooglePushMessage ,以便创建面向 Chrome (GCM) 的 Google Cloud Messaging 的通知消息。在消息上设置适当的属性,并通过 提交 PushClient

GooglePushMessage(IDictionary<String,String>, Nullable<TimeSpan>)

使用给定的参数 GooglePushMessagedata 和可选的 timeToLive初始化 类的新实例。

GooglePushMessage(SerializationInfo, StreamingContext)

使用指定的序列化信息和流上下文初始化 GooglePushMessage 类的新实例。

GooglePushMessage()

初始化 类的新实例 GooglePushMessage ,以便创建面向 Chrome (GCM) 的 Google Cloud Messaging 的通知消息。在消息上设置适当的属性,并通过 提交 PushClient

public GooglePushMessage ();
Public Sub New ()

适用于

GooglePushMessage(IDictionary<String,String>, Nullable<TimeSpan>)

使用给定的参数 GooglePushMessagedata 和可选的 timeToLive初始化 类的新实例。

public GooglePushMessage (System.Collections.Generic.IDictionary<string,string> data, TimeSpan? timeToLive);
new Microsoft.WindowsAzure.Mobile.Service.GooglePushMessage : System.Collections.Generic.IDictionary<string, string> * Nullable<TimeSpan> -> Microsoft.WindowsAzure.Mobile.Service.GooglePushMessage
Public Sub New (data As IDictionary(Of String, String), timeToLive As Nullable(Of TimeSpan))

参数

timeToLive
Nullable<TimeSpan>

TimeSpan相对于当前时间的 。 此参数的值必须是 0 到 2,419,200 秒的持续时间 (28 天) ,它对应于 GCM 将存储和尝试传递消息的最长时间。 不包含此字段的请求默认为最长 4 周。

适用于

GooglePushMessage(SerializationInfo, StreamingContext)

使用指定的序列化信息和流上下文初始化 GooglePushMessage 类的新实例。

protected GooglePushMessage (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.WindowsAzure.Mobile.Service.GooglePushMessage : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.WindowsAzure.Mobile.Service.GooglePushMessage
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

一个 SerializationInfo,包含关于要初始化的 GooglePushMessage 的信息。

context
StreamingContext

一个 StreamingContext,指示序列化的流的源和目标以及上下文信息。

适用于