1using System.Collections.Generic;
22 public string Link {
get;
set; }
35 base.ExportProperties(Message);
37 Dictionary<string, object> WebPushConfig =
new Dictionary<string, object>();
38 Dictionary<string, object> WebPushFcmOptions =
new Dictionary<string, object>();
40 if (!
string.IsNullOrEmpty(this.
Link))
41 WebPushFcmOptions[
"link"] = this.
Link;
43 if (WebPushFcmOptions.Count > 0)
44 WebPushConfig[
"webpush"] = WebPushFcmOptions;
49 foreach (KeyValuePair<string, object> P
in WebPushConfig2)
51 if (WebPushConfig.TryGetValue(P.Key, out
object Obj) &&
52 Obj is Dictionary<string, object> Obj1 &&
53 P.Value is Dictionary<string, object> Obj2)
55 foreach (KeyValuePair<string, object> P2
in Obj2)
56 Obj1[P2.Key] = P2.Value;
59 WebPushConfig[P.Key] = P.Value;
63 if (WebPushConfig.Count > 0)
64 Message[
"webpush"] = WebPushConfig;
78 this.Link = Value?.ToString();
82 this.WebPushSpecificDeliveryOptions = Value;
86 return base.TrySetProperty(Name, Value);
Base class for Notification messages
Notification message for Web
override void ExportProperties(Dictionary< string, object > Message)
Prepares the object to send to Firebase.
object WebPushSpecificDeliveryOptions
Web-Push-specific delivery options.
NotificationMessageWeb()
Notification message for Web
override bool TrySetProperty(string Name, object Value)
Tries to set a property value.