示例#1
0
        /// <summary>
        /// Initializes a new instance of <see cref="CommitMessageHeader"/>
        /// </summary>
        /// <param name="type">The type of the change (see <see cref="Type"/> property).</param>
        /// <param name="description">The change's description (see <see cref="Description"/> property).</param>
        /// <param name="scope">The (optional) scope of the change (see <see cref="Scope"/> property).</param>
        /// <param name="isBreakingChange">Indicates whether the change is marked as a breaking change (see <see cref="IsBreakingChange"/> property).</param>
        public CommitMessageHeader(CommitType type, string description, string?scope, bool isBreakingChange)
        {
            if (String.IsNullOrWhiteSpace(description))
            {
                throw new ArgumentException("Value must not be null or whitespace", nameof(description));
            }

            Type             = type;
            Scope            = scope;
            IsBreakingChange = isBreakingChange;
            Description      = description;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of <see cref="CommitMessageHeader"/>
 /// </summary>
 /// <param name="type">The type of the change (see <see cref="Type"/> property).</param>
 /// <param name="description">The change's description (see <see cref="Description"/> property).</param>
 /// <param name="scope">The (optional) scope of the change (see <see cref="Scope"/> property).</param>
 public CommitMessageHeader(CommitType type, string description, string?scope) : this(type, description, scope, false)
 {
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of <see cref="CommitMessageHeader"/>
 /// </summary>
 /// <param name="type">The type of the change (see <see cref="Type"/> property).</param>
 /// <param name="description">The change's description (see <see cref="Description"/> property).</param>
 public CommitMessageHeader(CommitType type, string description) : this(type, description, null, false)
 {
 }