public CommitCommand( int markId, string reference, AuthorCommand author, CommitterCommand committer, DataCommand commitInfo, CommitCommand fromCommit, IList<CommitCommand> mergeCommits, IList<FileCommand> fileCommands) { if (string.IsNullOrEmpty(reference)) throw new InvalidOperationException("The Reference for this commit must be valid."); if (committer == null) throw new InvalidOperationException("A committer must be specified for this commit."); if (commitInfo == null) throw new InvalidOperationException("Commit Information must be specified for this commit."); base.MarkId = markId; this.Reference = reference; this.Author = author; this.Committer = committer; this.CommitInfo = commitInfo; this.FromCommit = fromCommit; this.MergeCommits = (mergeCommits ?? new List<CommitCommand>()).ToList().AsReadOnly(); this.FileCommands = (fileCommands ?? new List<FileCommand>()).ToList().AsReadOnly(); }
public FileModifyCommand(string path, byte[] data) { base.Path = path; this.Data = new DataCommand(data); }