Exemple #1
0
 public void Sub(StatusCounts statusCounts)
 {
     presenceCounts.Sub(statusCounts.presenceCounts);
     errorCounts.Sub(statusCounts.errorCounts);
     if (presenceCounts.Total != errorCounts.Total)
     {
         throw new Exception("invalid status counts");
     }
 }
Exemple #2
0
 /// <summary>
 /// Constructs a NodeStatus by comparing the presence of two objects
 /// it only sets the status.presence field
 /// </summary>
 /// <param name="objMono"></param>
 /// <param name="objMS"></param>
 public NodeStatus(Object objMono, Object objMS)
 {
     status.error         = ErrorTypes.OK;
     statusCountsChildren = statusCountsTotal = new StatusCounts();
     if (objMono == null)
     {
         status.presence = PresenceTypes.Missing;
     }
     else if (objMS == null)
     {
         status.presence = PresenceTypes.Extra;
     }
     else
     {
         status.presence = PresenceTypes.Present;
     }
 }
Exemple #3
0
 public void Sub(StatusCounts statusCounts)
 {
     statusCountsChildren.Sub(statusCounts);
     statusCountsTotal.Sub(statusCounts);
 }
Exemple #4
0
 public void Add(StatusCounts statusCounts)
 {
     statusCountsChildren.Add(statusCounts);
     statusCountsTotal.Add(statusCounts);
 }