浏览代码

Parse and read attachments attribute

Sebastián Katzer 8 年之前
父节点
当前提交
9c330b88d2
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Options.cs

+ 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);