/// <summary> /// Initializes a new instance of the <see cref="MediaFile"/> class. /// </summary> /// <param name="path">The path relative to the LibraryRoot.</param> /// <param name="kind">The file kind.</param> public MediaFile(string path, MediaFileKind kind) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); } Path = path; Kind = kind; MediaFileStreams = new HashSet <MediaFileStream>(); }
/// <summary> /// Initializes a new instance of the <see cref="MediaFile"/> class. /// </summary> /// <param name="path">The path relative to the LibraryRoot.</param> /// <param name="kind">The file kind.</param> /// <param name="release">The release.</param> public MediaFile(string path, MediaFileKind kind, Release release) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException(nameof(path)); } Path = path; Kind = kind; if (release == null) { throw new ArgumentNullException(nameof(release)); } release.MediaFiles.Add(this); MediaFileStreams = new HashSet <MediaFileStream>(); }