Пример #1
0
 public ImportListModule(ImportListFactory importListFactory, ProfileExistsValidator profileExistsValidator)
     : base(importListFactory, "importlist", ResourceMapper)
 {
     SharedValidator.RuleFor(c => c.RootFolderPath).IsValidPath();
     SharedValidator.RuleFor(c => c.MinimumAvailability).NotNull();
     SharedValidator.RuleFor(c => c.QualityProfileId).ValidId();
     SharedValidator.RuleFor(c => c.QualityProfileId).SetValidator(profileExistsValidator);
 }
Пример #2
0
 public ImportListModule(ImportListFactory importListFactory, ProfileExistsValidator profileExistsValidator)
     : base(importListFactory, "netimport")
 {
     PostValidator.RuleFor(c => c.RootFolderPath).IsValidPath();
     PostValidator.RuleFor(c => c.MinimumAvailability).NotNull();
     SharedValidator.RuleFor(c => c.ProfileId).ValidId();
     SharedValidator.RuleFor(c => c.ProfileId).SetValidator(profileExistsValidator);
 }
Пример #3
0
 public ImportExclusionsModule(ImportListFactory importListFactory, IImportExclusionsService exclusionService)
     : base("exclusions")
 {
     _exclusionService = exclusionService;
     GetResourceAll    = GetAll;
     CreateResource    = AddExclusion;
     DeleteResource    = RemoveExclusion;
     GetResourceById   = GetById;
 }
Пример #4
0
        public ImportListModule(ImportListFactory importListFactory,
                                QualityProfileExistsValidator qualityProfileExistsValidator,
                                MetadataProfileExistsValidator metadataProfileExistsValidator)
            : base(importListFactory, "importlist", ResourceMapper)
        {
            Http.Validation.RuleBuilderExtensions.ValidId(SharedValidator.RuleFor(s => s.QualityProfileId));
            Http.Validation.RuleBuilderExtensions.ValidId(SharedValidator.RuleFor(s => s.MetadataProfileId));

            SharedValidator.RuleFor(c => c.RootFolderPath).IsValidPath();
            SharedValidator.RuleFor(c => c.QualityProfileId).SetValidator(qualityProfileExistsValidator);
            SharedValidator.RuleFor(c => c.MetadataProfileId).SetValidator(metadataProfileExistsValidator);
        }
        public ImportListModule(ImportListFactory importListFactory,
                                ProfileExistsValidator profileExistsValidator,
                                LanguageProfileExistsValidator languageProfileExistsValidator
                                )
            : base(importListFactory, "importlist", ResourceMapper)
        {
            Http.Validation.RuleBuilderExtensions.ValidId(SharedValidator.RuleFor(s => s.QualityProfileId));
            Http.Validation.RuleBuilderExtensions.ValidId(SharedValidator.RuleFor(s => s.LanguageProfileId));

            SharedValidator.RuleFor(c => c.RootFolderPath).IsValidPath();
            SharedValidator.RuleFor(c => c.QualityProfileId).SetValidator(profileExistsValidator);
            SharedValidator.RuleFor(c => c.LanguageProfileId).SetValidator(languageProfileExistsValidator);
        }
Пример #6
0
 public TagService(ITagRepository repo,
                   IEventAggregator eventAggregator,
                   IDelayProfileService delayProfileService,
                   ImportListFactory importListFactory,
                   INotificationFactory notificationFactory,
                   IReleaseProfileService releaseProfileService,
                   IArtistService artistService)
 {
     _repo                  = repo;
     _eventAggregator       = eventAggregator;
     _delayProfileService   = delayProfileService;
     _importListFactory     = importListFactory;
     _notificationFactory   = notificationFactory;
     _releaseProfileService = releaseProfileService;
     _artistService         = artistService;
 }