public RepoHistoryContainer ToContainer() { var container = new RepoHistoryContainer(); container.Owners.AddRange(Owners); container.Repositories.AddRange(Repositories); container.Urls.AddRange(PullRequests.Select(p => p.ToUrl())); return(container); }
public void From(RepoHistoryContainer historyContainer) { Owners.Assign(RemoveIfExceedMax(historyContainer.Owners)); Repositories.Assign(RemoveIfExceedMax(historyContainer.Repositories)); PullRequests.Assign(RemoveIfExceedMax(historyContainer.Urls.Select(PullRequestLocator.FromUrl).ToList())); }