public ConsistencyStatus CheckForInConsistency(List <ConsistencyDataModel> _DepthOneChain, Quartet input) { ConsistencyStatus status = ConsistencyStatus.InConsistent; int pos1 = 0; int pos2 = 0; int pos3 = 0; int pos4 = 0; input._ConsistancyStatus = ConsistencyStatus.None; pos1 = getPosition(_DepthOneChain, input._First_Taxa_Value); pos2 = getPosition(_DepthOneChain, input._Second_Taxa_Value); pos3 = getPosition(_DepthOneChain, input._Third_Taxa_Value); pos4 = getPosition(_DepthOneChain, input._Fourth_Taxa_Value); if (pos1 != -1 && pos2 != -1 && pos3 != -1 && pos4 != -1) { if (pos1 == pos2 && pos2 < pos3 && pos3 == pos4) { status = ConsistencyStatus.Consistent; } else if (pos1 < pos2 && pos2 < pos3 && pos3 < pos4) { status = ConsistencyStatus.Consistent; } else if (pos1 < pos2 && pos2 < pos4 && pos4 < pos3) { status = ConsistencyStatus.Consistent; } else if (pos1 > pos2 && pos1 < pos3 && pos3 < pos4) { status = ConsistencyStatus.Consistent; } else if (pos1 > pos2 && pos1 < pos4 && pos4 < pos3) { status = ConsistencyStatus.Consistent; } else if (pos1 == pos2 && pos2 < pos4 && pos4 < pos3) { status = ConsistencyStatus.Consistent; } else if (pos1 == pos2 && pos2 < pos3 && pos4 > pos3) { status = ConsistencyStatus.Consistent; } else if (pos1 < pos2 && pos2 < pos3 && pos4 == pos3) { status = ConsistencyStatus.Consistent; } else if (pos1 > pos2 && pos1 < pos3 && pos4 == pos3) { status = ConsistencyStatus.Consistent; } else { status = ConsistencyStatus.InConsistent; } } else { status = ConsistencyStatus.InConsistent; } return(status); }
public ConsistencyEvent(ConsistencyError errorCode, ConsistencyStatus status) { ErrorCode = errorCode; Status = status; }