public static void UpdateInfos(this List <NeighborHourInfo> infos, object statContent, short hour) { if (statContent != null) { string[] fields = statContent.ToString().GetSplittedFields(';'); for (int i = 0; i < fields.Length; i++) { string[] subFields = fields[i].GetSplittedFields('_'); NeighborHourInfo neighborInfo = new NeighborHourInfo { Hour = hour }; neighborInfo.ImportCarrierInfo(subFields); if (subFields.Length > 6) { neighborInfo.NeighborInfo = subFields[5]; neighborInfo.Problem = subFields[6]; } infos.Add(neighborInfo); } } }
public static void UpdateInfos(this List<NeighborHourInfo> infos, object statContent, short hour) { if (statContent != null) { string[] fields = statContent.ToString().GetSplittedFields(';'); for (int i = 0; i < fields.Length; i++) { string[] subFields = fields[i].GetSplittedFields('_'); NeighborHourInfo neighborInfo = new NeighborHourInfo { Hour = hour }; neighborInfo.ImportCarrierInfo(subFields); if (subFields.Length > 6) { neighborInfo.NeighborInfo = subFields[5]; neighborInfo.Problem = subFields[6]; } infos.Add(neighborInfo); } } }