/// <summary> /// Create a new media renamer that uses a <see cref="IMediaNameGenerator{T}" /> to generate a filename (without /// extension) /// based on the media info extracted by the <see cref="IMediaInfoExtractor{T}" />. /// </summary> /// <param name="nameGenerator">The name generator that generates the new file names.</param> /// <param name="extractor">The extractor that extracts a media info from the file source.</param> /// <param name="override"><c>True</c>, if an existing destination should be overriden.</param> public MediaRenamer(IMediaNameGenerator <T> nameGenerator, IMediaInfoExtractor <T> extractor, bool @override = true) : base(@override) { NameGenerator = nameGenerator ?? throw new ArgumentNullException(nameof(nameGenerator)); MediaInfoExtractor = extractor ?? throw new ArgumentNullException(nameof(extractor)); NameProducer = ProduceName; }
/// <summary> /// Create a new media renamer that uses a <see cref="IMediaNameGenerator{T}" /> to generate a filename (without /// extension) /// based on the media info extracted by the <see cref="IMediaInfoExtractor{T}" />. /// A <see cref="PatternMediaNameGenerator{T}" /> is used as <see cref="IMediaNameGenerator{T}" />. /// </summary> /// <param name="pattern"> /// The pattern that is used to generate filenames. See <see cref="PatternMediaNameGenerator{T}" /> /// for more information.. /// </param> /// <param name="extractor">The extractor that extracts a media info from the file source.</param> /// <param name="override"><c>True</c>, if an existing destination should be overriden.</param> public MediaRenamer(string pattern, IMediaInfoExtractor <T> extractor, bool @override = true) : this( new PatternMediaNameGenerator <T>(pattern), extractor, @override) { }