public BuildInfo(BoundBuildId id, BuildState state, DateTimeOffset date, TimeSpan duration, string machineName) { Id = id; State = state; Date = date; Duration = duration; MachineName = machineName; }
internal static BuildInfo ParseBuildInfo(Uri host, JobId jobId, JObject build) { var id = build.Value <int>("id"); var duration = TimeSpan.FromMilliseconds(build.Value <int>("duration")); var state = ParseBuildInfoState(build); var date = JenkinsUtil.ConvertTimestampToDateTimeOffset(build.Value <long>("timestamp")); var buildId = new BoundBuildId(host, id, jobId); var machineName = build.Value <string>("builtOn"); return(new BuildInfo(buildId, state, date, duration, machineName)); }