public void Sub(StatusCounts statusCounts) { presenceCounts.Sub(statusCounts.presenceCounts); errorCounts.Sub(statusCounts.errorCounts); if (presenceCounts.Total != errorCounts.Total) { throw new Exception("invalid status counts"); } }
/// <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; } }
public void Sub(StatusCounts statusCounts) { statusCountsChildren.Sub(statusCounts); statusCountsTotal.Sub(statusCounts); }
public void Add(StatusCounts statusCounts) { statusCountsChildren.Add(statusCounts); statusCountsTotal.Add(statusCounts); }