Пример #1
0
 private void Init(JSONNode siNode)
 {
     Created     = AsDate(siNode[ApiConstants.Created]);
     Config      = new StreamConfiguration(siNode[ApiConstants.Config]);
     State       = StreamState.OptionalInstance(siNode[ApiConstants.State]);
     ClusterInfo = ClusterInfo.OptionalInstance(siNode[ApiConstants.Cluster]);
     MirrorInfo  = MirrorInfo.OptionalInstance(siNode[ApiConstants.Mirror]);
     SourceInfos = SourceInfo.OptionalListOf(siNode[ApiConstants.Sources]);
 }
Пример #2
0
 private void Init(JSONNode ciNode)
 {
     Stream = ciNode[ApiConstants.StreamName].Value;
     ConsumerConfiguration = new ConsumerConfiguration(ciNode[ApiConstants.Config]);
     Name           = ciNode[ApiConstants.Name].Value;
     Created        = AsDate(ciNode[ApiConstants.Created]);
     Delivered      = new SequenceInfo(ciNode[ApiConstants.Delivered]);
     AckFloor       = new SequenceInfo(ciNode[ApiConstants.AckFloor]);
     NumPending     = ciNode[ApiConstants.NumPending].AsUlong;
     NumWaiting     = ciNode[ApiConstants.NumWaiting].AsLong;
     NumAckPending  = ciNode[ApiConstants.NumAckPending].AsLong;
     NumRedelivered = ciNode[ApiConstants.NumRedelivered].AsLong;
     ClusterInfo    = ClusterInfo.OptionalInstance(ciNode[ApiConstants.Cluster]);
     PushBound      = ciNode[ApiConstants.PushBound].AsBool;
 }