Example #1
0
 internal SourceInfoBase(JSONNode sourceInfoBaseNode)
 {
     Name   = sourceInfoBaseNode[ApiConstants.Name].Value;
     Lag    = sourceInfoBaseNode[ApiConstants.Lag].AsUlong;
     Active = JsonUtils.AsDuration(sourceInfoBaseNode, ApiConstants.Active, Duration.Zero);
     Error  = Error.OptionalInstance(sourceInfoBaseNode[ApiConstants.Error]);
 }
Example #2
0
 internal PeerInfo(JSONNode peerInfoNode)
 {
     Name    = peerInfoNode[ApiConstants.Name].Value;
     Current = peerInfoNode[ApiConstants.Current].AsBool;
     Offline = peerInfoNode[ApiConstants.Offline].AsBool;
     Active  = JsonUtils.AsDuration(peerInfoNode, ApiConstants.Active, Duration.Zero);
     Lag     = peerInfoNode[ApiConstants.Lag].AsLong;
 }