public static List <TBD.dayType> DayTypes(this TBD.InternalCondition internalCondition) { if (internalCondition == null) { return(null); } List <TBD.dayType> result = new List <TBD.dayType>(); TBD.dayType dayType = internalCondition.GetDayType(result.Count); while (dayType != null) { result.Add(dayType); dayType = internalCondition.GetDayType(result.Count); } return(result); }
private static bool HasDayType(TBD.InternalCondition internalCondition, TBD.dayType dayType) { int aIndex = 0; TBD.dayType aDayType = internalCondition.GetDayType(aIndex); while (aDayType != null) { if (aDayType.name == dayType.name) { return(true); } aIndex++; aDayType = internalCondition.GetDayType(aIndex); } return(false); }