Quellcode durchsuchen

Parse and read attachments attribute

Sebastián Katzer vor 8 Jahren
Ursprung
Commit
9c330b88d2

+ 10 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Options.cs

@@ -121,6 +121,11 @@ namespace LocalNotificationProxy.LocalNotification
                 options.Data = node.GetAttribute("data");
             }
 
+            if (node.GetAttributeNode("attachments") != null)
+            {
+                options.Attachments = node.GetAttribute("attachments").Split(',');
+            }
+
             if (node.GetAttributeNode("action") != null)
             {
                 options.Action = node.GetAttribute("action");
@@ -175,6 +180,11 @@ namespace LocalNotificationProxy.LocalNotification
                 node.SetAttribute("data", this.Data);
             }
 
+            if (this.Attachments != null)
+            {
+                node.SetAttribute("attachments", string.Join(",", this.Attachments));
+            }
+
             if (action != null)
             {
                 node.SetAttribute("action", action);