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

AlertProperties 类

定义

“alert”属性包含在面向 Apple Push Notification Service (APNS) 的通知中特定于警报的属性。 它旨在从 ApplePushMessage 类中使用。

[System.Serializable]
public class AlertProperties : System.Collections.Generic.Dictionary<string,object>
[<System.Serializable>]
type AlertProperties = class
    inherit Dictionary<string, obj>
Public Class AlertProperties
Inherits Dictionary(Of String, Object)
继承
AlertProperties
属性

构造函数

AlertProperties()

初始化 AlertProperties 类的新实例。

AlertProperties(SerializationInfo, StreamingContext)

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

属性

ActionLocKey

如果指定了字符串,则系统将显示包含两个按钮的警报。 字符串用作键,用于获取当前本地化中要用于右侧按钮标题的本地化字符串,而不是“视图”。

Body

警报消息的文本。

LaunchImage

应用程序包中图像文件的文件名;它可能包含扩展或省略它。 当用户点击操作按钮或移动操作滑块时,图像将用作启动图像。 如果未指定此属性,则系统会使用以前的快照、使用应用程序Info.plist文件中的 UILaunchImageFile 键标识的图像,或者回退到 Default.png

LocKey

当前本地化 (的文件中警报消息字符串 Localizable.strings 的键,该字符串由用户的语言首选项) 设置。 可以使用 和 %n$@ 说明符设置键字符串的格式%@,以采用 中指定的loc-args变量。

LogArgs

要代替 中的 loc-key格式说明符显示的变量字符串值。

扩展方法

TryRemove<TKey,TValue>(Dictionary<TKey,TValue>, TKey, TValue)

删除与指定键关联的值。

适用于