Beispiel #1
0
        public void UpdateColor(TagColor color)
        {
            if (color == null)
            {
                throw new ArgumentNullException(nameof(color));
            }

            Color = color;

            // Event
        }
Beispiel #2
0
        public Tag(Guid id, string name, string description, TagColor color)
            : base(id)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Value should not be empty!", nameof(name));
            }

            if (string.IsNullOrWhiteSpace(description))
            {
                throw new ArgumentException("Value should not be empty!", nameof(description));
            }

            if (color == null)
            {
                throw new ArgumentNullException(nameof(color));
            }

            Name        = name;
            Description = description;
            Color       = color;
        }