Notifications support
[StratumLibrary.git] / StratumLibrary / StratumNotification.cs
diff --git a/StratumLibrary/StratumNotification.cs b/StratumLibrary/StratumNotification.cs
new file mode 100644 (file)
index 0000000..9be11f4
--- /dev/null
@@ -0,0 +1,31 @@
+\feffusing Newtonsoft.Json;\r
+using Newtonsoft.Json.Linq;\r
+\r
+\r
+namespace Stratum\r
+{\r
+    /// <summary>\r
+    /// Represents a Stratum notification\r
+    /// </summary>\r
+    [JsonObject(MemberSerialization.OptIn)]\r
+    public class StratumNotification\r
+    {\r
+        /// <summary>\r
+        /// Response id, should be null\r
+        /// </summary>\r
+        [JsonProperty(PropertyName = "id")]\r
+        public object Id { get; set; }\r
+\r
+        /// <summary>\r
+        /// Method name\r
+        /// </summary>\r
+        [JsonProperty(PropertyName = "method")]\r
+        public string Method { get; set; }\r
+\r
+        /// <summary>\r
+        /// Notification data\r
+        /// </summary>\r
+        [JsonProperty(PropertyName = "params")]\r
+        public JArray Params { get; set; }\r
+    }\r
+}\r