Exemple #1
0
        /// <summary>
        /// Adds a member to the enum being built.
        /// </summary>
        /// <exception cref="ArgumentNullException">
        /// The specified <paramref name="builder"/> is <c>null</c>.
        /// </exception>
        public EnumBuilder WithMember(EnumMemberBuilder builder)
        {
            if (builder is null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            _members.Add(builder);
            return(this);
        }
Exemple #2
0
 /// <summary>
 /// Adds a member to the enum being built.
 /// </summary>
 public EnumBuilder WithMember(EnumMemberBuilder builder)
 {
     _members.Add(builder);
     return(this);
 }