Esempio n. 1
0
 public GitCommit(GitId id, string commitMessage, DateTime date, GitAuthor author)
 {
     Id            = id;
     CommitMessage = commitMessage ?? throw new ArgumentNullException(nameof(commitMessage));
     Date          = date;
     Author        = author ?? throw new ArgumentNullException(nameof(author));
 }
Esempio n. 2
0
        public GitCommit(GitId id, string commitMessage, DateTime date, GitAuthor author)
        {
            if (id.IsNull)
            {
                throw new ArgumentException("Commit id must not be empty", nameof(id));
            }

            Id            = id;
            CommitMessage = commitMessage ?? throw new ArgumentNullException(nameof(commitMessage));
            Date          = date;
            Author        = author ?? throw new ArgumentNullException(nameof(author));
        }