Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Artwork"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="kind">The kind of art.</param>
        public Artwork(string path, ArtKind kind)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException(nameof(path));
            }

            Path = path;
            Kind = kind;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Artwork"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="kind">The kind of art.</param>
        /// <param name="owner">The owner.</param>
        public Artwork(string path, ArtKind kind, IHasArtwork owner)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException(nameof(path));
            }

            Path = path;
            Kind = kind;

            owner?.Artwork.Add(this);
        }