private static IEnumerable<string> GetUsers(TeamCityTriggeredBy triggeredBy) { if (triggeredBy?.User == null) return Enumerable.Empty<string>(); return triggeredBy.User.Select(GetUsername).ToList(); }
private static DateTime GetDate(TeamCityTriggeredBy triggeredBy) { if (triggeredBy == null) return default(DateTime); // todo: parse time zones which don't use whole hours return DateTime.ParseExact(triggeredBy.Date, "yyyyMMddTHHmmsszz00", CultureInfo.InvariantCulture); }
private static IEnumerable <string> GetUsers(TeamCityTriggeredBy triggeredBy) { if (triggeredBy?.User == null) { return(Enumerable.Empty <string>()); } return(triggeredBy.User.Select(GetUsername).ToList()); }
private static DateTime GetDate(TeamCityTriggeredBy triggeredBy) { if (triggeredBy == null) { return(default(DateTime)); } // todo: parse time zones which don't use whole hours return(DateTime.ParseExact(triggeredBy.Date, "yyyyMMddTHHmmsszz00", CultureInfo.InvariantCulture)); }