/// <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; }
/// <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); }