1 \feffusing Newtonsoft.Json;
\r
6 /// Represents a Stratum Response
\r
8 [JsonObject(MemberSerialization.OptIn)]
\r
9 public class StratumResponse
\r
12 /// Response id, should be null or identical to request id
\r
14 [JsonProperty(PropertyName = "id")]
\r
15 public string Id { get; set; }
\r
20 [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "result")]
\r
21 public object Result { get; set; }
\r
26 [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "error")]
\r
27 public StratumException Error { get; set; }
\r
31 /// Represents a Stratum Response
\r
33 [JsonObject(MemberSerialization.OptIn)]
\r
34 public class StratumResponse<T>
\r
37 /// Response id, should be null or identical to request id
\r
39 [JsonProperty(PropertyName = "id")]
\r
40 public string Id { get; set; }
\r
45 [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "result")]
\r
46 public T Result { get; set; }
\r
51 [JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "error")]
\r
52 public StratumException Error { get; set; }
\r