Ejemplo n.º 1
0
        public Contributor(GitHubContributor gitHubContributor)
            : this()
        {
            if (gitHubContributor == null)
                throw new ArgumentNullException("gitHubContributor");

            _id = Guid.NewGuid();
            GitHubId = gitHubContributor.Id;
            SynchronizeWith(gitHubContributor);
        }
Ejemplo n.º 2
0
        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;
        }