public Contributor(GitHubContributor gitHubContributor) : this() { if (gitHubContributor == null) throw new ArgumentNullException("gitHubContributor"); _id = Guid.NewGuid(); GitHubId = gitHubContributor.Id; SynchronizeWith(gitHubContributor); }
public void SynchronizeWith(GitHubContributor gitHubContributor) { if (gitHubContributor == null) throw new ArgumentNullException("gitHubContributor"); if (gitHubContributor.Id != GitHubId) throw new InvalidOperationException("The Id of the GitHubContributor does not match with the GitHubId of the Contributor"); Login = gitHubContributor.Login; AvatarUrl = gitHubContributor.AvatarUrl; Contributions = gitHubContributor.Contributions; }