1using System.Collections.Generic;
24 public string Sound {
get;
set; }
33 public string Badge {
get;
set; }
87 base.ExportProperties(Message);
89 Dictionary<string, object> ApnsConfig =
new Dictionary<string, object>();
90 Dictionary<string, object> Payload =
new Dictionary<string, object>();
91 Dictionary<string, object> Aps =
new Dictionary<string, object>();
93 if (!
string.IsNullOrEmpty(this.
Sound))
94 Aps[
"sound"] = this.
Sound;
96 if (!
string.IsNullOrEmpty(this.
Badge))
97 Aps[
"badge"] = this.
Badge;
99 if (!
string.IsNullOrEmpty(this.
SubTitle))
119 Payload[
"aps"] = Aps;
121 if (Payload.Count > 0)
122 ApnsConfig[
"payload"] = Payload;
127 foreach (KeyValuePair<string, object> P
in ApnsConfig2)
129 if (ApnsConfig.TryGetValue(P.Key, out
object Obj) &&
130 Obj is Dictionary<string, object> Obj1 &&
131 P.Value is Dictionary<string, object> Obj2)
133 foreach (KeyValuePair<string, object> P2
in Obj2)
135 if (Obj1.TryGetValue(P2.Key, out
object Obj3) &&
136 Obj3 is Dictionary<string, object> Obj31 &&
137 P2.Value is Dictionary<string, object> Obj32)
139 foreach (KeyValuePair<string, object> P3
in Obj32)
141 Obj31[P3.Key] = P3.Value;
145 Obj1[P2.Key] = P2.Value;
149 ApnsConfig[P.Key] = P.Value;
153 if (ApnsConfig.Count > 0)
154 Message[
"apns"] = ApnsConfig;
168 this.Sound = Value?.ToString();
172 this.Badge = Value?.ToString();
176 this.SubTitle = Value?.ToString();
180 this.BodyLocalizationKey = Value?.ToString();
183 case "body_loc_args":
191 case "title_loc_key":
192 this.TitleLocalizationKey = Value?.ToString();
195 case "title_loc_args":
204 this.AppleSpecificDeliveryOptions = Value;
208 return base.TrySetProperty(Name, Value);
Notification message for Apple
string Sound
The sound to play when the device receives the notification.
string[] BodyLocalizationArguments
Variable string values to be used in place of the format specifiers in body_loc_key to use to localiz...
object AppleSpecificDeliveryOptions
Apple-specific delivery options.
string Badge
The value of the badge on the home screen app icon.
NotificationMessageApple()
Notification message for Apple
string BodyLocalizationKey
The key to the body string in the app's string resources to use to localize the body text to the user...
override void ExportProperties(Dictionary< string, object > Message)
Prepares the object to send to Firebase.
string TitleLocalizationKey
The key to the title string in the app's string resources to use to localize the title text to the us...
string[] TitleLocalizationArguments
Variable string values to be used in place of the format specifiers in title_loc_key to use to locali...
string SubTitle
The notification's subtitle.
override bool TrySetProperty(string Name, object Value)
Tries to set a property value.
Base class for Notification messages