Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Check"/> class.
 /// </summary>
 /// <param name="type">The type of check represented by this class.</param>
 /// <exception cref="ArgumentOutOfRangeException">
 /// Type must be a single flag in range of <see cref="CheckTypes"/>.
 /// </exception>
 protected Check(CheckTypes type)
 {
     if ((!type.IsInRange() || !type.IsSingleFlag()) && type != CheckTypes.None)
     {
         throw new ArgumentOutOfRangeException(nameof(type));
     }
     Type = type;
 }