/// <summary> /// Initializes a new instance of the <see cref="BannerData" /> class. /// </summary> /// <param name="color">The color of the banner (required).</param> /// <param name="patterns">The patterns on the banner (required).</param> public BannerData(DyeColor color = default(DyeColor), List <PatternLayer> patterns = default(List <PatternLayer>)) { // to ensure "color" is required (not null) if (color == null) { throw new InvalidDataException("color is a required property for BannerData and cannot be null"); } else { this.Color = color; } // to ensure "patterns" is required (not null) if (patterns == null) { throw new InvalidDataException("patterns is a required property for BannerData and cannot be null"); } else { this.Patterns = patterns; } }
/// <summary> /// Initializes a new instance of the <see cref="PatternLayer" /> class. /// </summary> /// <param name="shape">The base shape of this pattern (required).</param> /// <param name="color">The color of the pattern (required).</param> public PatternLayer(CatalogType shape = default(CatalogType), DyeColor color = default(DyeColor)) { // to ensure "shape" is required (not null) if (shape == null) { throw new InvalidDataException("shape is a required property for PatternLayer and cannot be null"); } else { this.Shape = shape; } // to ensure "color" is required (not null) if (color == null) { throw new InvalidDataException("color is a required property for PatternLayer and cannot be null"); } else { this.Color = color; } }