コード例 #1
0
        public AdminService(IRoadieSettings configuration,
                            IHttpEncoder httpEncoder,
                            IHttpContext httpContext,
                            data.IRoadieDbContext context,
                            ICacheManager cacheManager,
                            ILogger <ArtistService> logger,
                            IHubContext <ScanActivityHub> scanActivityHub
                            )
            : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
        {
            this.ScanActivityHub              = scanActivityHub;
            this.EventMessageLogger           = new EventMessageLogger();
            this.EventMessageLogger.Messages += EventMessageLogger_Messages;

            this.MusicBrainzProvider = new MusicBrainzProvider(configuration, cacheManager, MessageLogger);
            this.LastFmHelper        = new LastFmHelper(configuration, cacheManager, MessageLogger);
            this.FileNameHelper      = new FileNameHelper(configuration, cacheManager, MessageLogger);
            this.ID3TagsHelper       = new ID3TagsHelper(configuration, cacheManager, MessageLogger);

            this.ArtistLookupEngine  = new ArtistLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger);
            this.LabelLookupEngine   = new LabelLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger);
            this.ReleaseLookupEngine = new ReleaseLookupEngine(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.LabelLookupEngine);
            this.ImageFactory        = new ImageFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseLookupEngine);
            this.LabelFactory        = new LabelFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseLookupEngine);
            this.AudioMetaDataHelper = new AudioMetaDataHelper(configuration, httpEncoder, context, this.MusicBrainzProvider, this.LastFmHelper, cacheManager,
                                                               MessageLogger, this.ArtistLookupEngine, this.ImageFactory, this.FileNameHelper, this.ID3TagsHelper);
            this.ReleaseFactory = new ReleaseFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.LabelFactory, this.AudioMetaDataHelper, this.ReleaseLookupEngine);
            this.ArtistFactory  = new ArtistFactory(configuration, httpEncoder, context, cacheManager, MessageLogger, this.ArtistLookupEngine, this.ReleaseFactory, this.ImageFactory, this.ReleaseLookupEngine, this.AudioMetaDataHelper);
        }
コード例 #2
0
 public Audio(IRoadieSettings configuration, IHttpEncoder httpEncoder, ICacheManager cacheManager,
              ILogger logger, IArtistLookupEngine artistLookupEngine, IReleaseLookupEngine releaseLookupEngine,
              IAudioMetaDataHelper audioMetaDataHelper)
     : base(configuration, httpEncoder, cacheManager, logger, artistLookupEngine, releaseLookupEngine)
 {
     AudioMetaDataHelper = audioMetaDataHelper;
 }
コード例 #3
0
ファイル: EtagHelper.cs プロジェクト: jindal1979/roadie
 public static EntityTagHeaderValue GenerateETag(IHttpEncoder encoder, byte[] bytes)
 {
     if (encoder == null || bytes == null || !bytes.Any())
     {
         return(null);
     }
     return(new EntityTagHeaderValue($"\"{encoder.UrlEncodeBase64(HashHelper.CreateMD5(bytes))}\""));
 }
コード例 #4
0
 public PlayActivityService(IRoadieSettings configuration, IHttpEncoder httpEncoder, IHttpContext httpContext,
                            IRoadieDbContext dbContext, ICacheManager cacheManager, ILogger <PlayActivityService> logger,
                            IScrobbleHandler scrobbleHandler, IHubContext <PlayActivityHub> playActivityHub)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     PlayActivityHub  = playActivityHub;
     ScrobblerHandler = scrobbleHandler;
 }
コード例 #5
0
ファイル: LookupEngineBase.cs プロジェクト: liamdawson/roadie
 public LookupEngineBase(IRoadieSettings configuration, IHttpEncoder httpEncoder, IRoadieDbContext context, ICacheManager cacheManager, ILogger logger)
 {
     this.Configuration = configuration;
     this.HttpEncoder   = httpEncoder;
     this.DbContext     = context;
     this.CacheManager  = cacheManager;
     this.Logger        = logger;
 }
コード例 #6
0
 public LastFmHelper(IRoadieSettings configuration, ICacheManager cacheManager, ILogger logger,
                     data.IRoadieDbContext dbContext, IHttpEncoder httpEncoder)
     : base(configuration, cacheManager, logger)
 {
     this._apiKey = configuration.Integrations.ApiKeys.FirstOrDefault(x => x.ApiName == "LastFMApiKey") ?? new ApiKey();
     DbContext    = dbContext;
     HttpEncoder  = httpEncoder;
 }
コード例 #7
0
 public ArtistFactory(IRoadieSettings configuration, IHttpEncoder httpEncoder, IRoadieDbContext context,
                      ICacheManager cacheManager, ILogger logger, IArtistLookupEngine artistLookupEngine, IReleaseFactory releaseFactory, IImageFactory imageFactory, IReleaseLookupEngine releaseLookupEngine, IAudioMetaDataHelper audioMetaDataHelper)
     : base(configuration, context, cacheManager, logger, httpEncoder, artistLookupEngine, releaseLookupEngine)
 {
     this.ReleaseFactory      = releaseFactory;
     this.ImageFactory        = imageFactory;
     this.AudioMetaDataHelper = audioMetaDataHelper;
 }
コード例 #8
0
        public HtmlParser(IHtmlDocumentFactory htmlDocumentFactory, IHttpEncoder httpEncoder) : base(htmlDocumentFactory)
        {
            if (httpEncoder == null)
            {
                throw new ArgumentNullException(nameof(httpEncoder));
            }

            this.HttpEncoder = httpEncoder;
        }
コード例 #9
0
        public HtmlText(IHttpEncoder httpEncoder)
        {
            if (httpEncoder == null)
            {
                throw new ArgumentNullException(nameof(httpEncoder));
            }

            this.HttpEncoder = httpEncoder;
        }
コード例 #10
0
 public GenreService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     IRoadieDbContext dbContext,
                     ICacheManager cacheManager,
                     ILogger <GenreService> logger)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
 }
コード例 #11
0
 public LookupService(IRoadieSettings configuration,
                      IHttpEncoder httpEncoder,
                      IHttpContext httpContext,
                      data.IRoadieDbContext dbContext,
                      ICacheManager cacheManager,
                      ILogger <PlaylistService> logger)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
 }
コード例 #12
0
 public BookmarkService(IRoadieSettings configuration,
                        IHttpEncoder httpEncoder,
                        IHttpContext httpContext,
                        data.IRoadieDbContext context,
                        ICacheManager cacheManager,
                        ILogger <BookmarkService> logger)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
 }
コード例 #13
0
 public StatisticsService(IRoadieSettings configuration,
                          IHttpEncoder httpEncoder,
                          IHttpContext httpContext,
                          IRoadieDbContext context,
                          ICacheManager cacheManager,
                          ILogger <StatisticsService> logger)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
 }
コード例 #14
0
 public ArtistLookupEngine(IRoadieSettings configuration, IHttpEncoder httpEncoder, IRoadieDbContext context, ICacheManager cacheManager, ILogger logger)
     : base(configuration, httpEncoder, context, cacheManager, logger)
 {
     this.ITunesArtistSearchEngine      = new ITunesSearchEngine(this.Configuration, this.CacheManager, this.Logger);
     this.MusicBrainzArtistSearchEngine = new musicbrainz.MusicBrainzProvider(this.Configuration, this.CacheManager, this.Logger);
     this.LastFmArtistSearchEngine      = new lastfm.LastFmHelper(this.Configuration, this.CacheManager, this.Logger);
     this.SpotifyArtistSearchEngine     = new spotify.SpotifyHelper(this.Configuration, this.CacheManager, this.Logger);
     this.WikipediaArtistSearchEngine   = new wikipedia.WikipediaHelper(this.Configuration, this.CacheManager, this.Logger, this.HttpEncoder);
     this.DiscogsArtistSearchEngine     = new discogs.DiscogsHelper(this.Configuration, this.CacheManager, this.Logger);
 }
コード例 #15
0
ファイル: PluginBase.cs プロジェクト: jindal1979/roadie
 public PluginBase(IRoadieSettings configuration, IHttpEncoder httpEncoder, ICacheManager cacheManager, ILogger logger,
                   IArtistLookupEngine artistLookupEngine, IReleaseLookupEngine releaseLookupEngine)
 {
     Configuration       = configuration;
     HttpEncoder         = httpEncoder;
     CacheManager        = cacheManager;
     Logger              = logger;
     ArtistLookupEngine  = artistLookupEngine;
     ReleaseLookupEngine = releaseLookupEngine;
 }
コード例 #16
0
 public ServiceBase(IRoadieSettings configuration, IHttpEncoder httpEncoder, data.IRoadieDbContext context,
                    ICacheManager cacheManager, ILogger logger, IHttpContext httpContext)
 {
     _configuration = configuration;
     _httpEncoder   = httpEncoder;
     _dbContext     = context;
     _cacheManager  = cacheManager;
     _logger        = logger;
     _httpContext   = httpContext;
 }
コード例 #17
0
 public PlayActivityService(IRoadieSettings configuration,
                            IHttpEncoder httpEncoder,
                            IHttpContext httpContext,
                            data.IRoadieDbContext dbContext,
                            ICacheManager cacheManager,
                            ILogger <PlayActivityService> logger,
                            IHubContext <PlayActivityHub> playHubContext)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.PlayActivityHub = playHubContext;
 }
コード例 #18
0
ファイル: UserService.cs プロジェクト: liamdawson/roadie
 public UserService(IRoadieSettings configuration,
                    IHttpEncoder httpEncoder,
                    IHttpContext httpContext,
                    data.IRoadieDbContext context,
                    ICacheManager cacheManager,
                    ILogger <ArtistService> logger,
                    UserManager <ApplicationUser> userManager)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.UserManager = userManager;
 }
コード例 #19
0
ファイル: LabelService.cs プロジェクト: jindal1979/roadie
 public LabelService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <LabelService> logger,
                     IBookmarkService bookmarkService)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     BookmarkService = bookmarkService;
 }
コード例 #20
0
 public PlaylistService(IRoadieSettings configuration,
                        IHttpEncoder httpEncoder,
                        IHttpContext httpContext,
                        data.IRoadieDbContext dbContext,
                        ICacheManager cacheManager,
                        ILogger <PlaylistService> logger,
                        IBookmarkService bookmarkService)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
 }
コード例 #21
0
 public PluginBase(IRoadieSettings configuration, IHttpEncoder httpEncoder, IArtistFactory artistFactory, IReleaseFactory releaseFactory, IImageFactory imageFactory, ICacheManager cacheManager, ILogger logger, IArtistLookupEngine artistLookupEngine, IReleaseLookupEngine releaseLookupEngine)
 {
     this.Configuration       = configuration;
     this.HttpEncoder         = httpEncoder;
     this.ArtistFactory       = artistFactory;
     this.ReleaseFactory      = releaseFactory;
     this.ImageFactory        = imageFactory;
     this.CacheManager        = cacheManager;
     this.Logger              = logger;
     this.ArtistLookupEngine  = artistLookupEngine;
     this.ReleaseLookupEngine = releaseLookupEngine;
 }
コード例 #22
0
ファイル: LabelService.cs プロジェクト: liamdawson/roadie
 public LabelService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <LabelService> logger,
                     ICollectionService collectionService,
                     IPlaylistService playlistService,
                     IBookmarkService bookmarkService)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
 }
コード例 #23
0
 public ArtistLookupEngine(IRoadieSettings configuration, IHttpEncoder httpEncoder, IRoadieDbContext context,
                           ICacheManager cacheManager, ILogger <ArtistLookupEngine> logger, musicbrainz.IMusicBrainzProvider musicBrainzProvider,
                           lastfm.ILastFmHelper lastFmHelper, spotify.ISpotifyHelper spotifyHelper, wikipedia.IWikipediaHelper wikipediaHelper,
                           discogs.IDiscogsHelper discogsHelper, IITunesSearchEngine iTunesSearchEngine)
     : base(configuration, httpEncoder, context, cacheManager, logger)
 {
     ITunesArtistSearchEngine      = iTunesSearchEngine;
     MusicBrainzArtistSearchEngine = musicBrainzProvider;
     LastFmArtistSearchEngine      = lastFmHelper;
     SpotifyArtistSearchEngine     = spotifyHelper;
     WikipediaArtistSearchEngine   = wikipediaHelper;
     DiscogsArtistSearchEngine     = discogsHelper;
 }
コード例 #24
0
ファイル: TrackService.cs プロジェクト: liamdawson/roadie
 public TrackService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext dbContext,
                     ICacheManager cacheManager,
                     ILogger <TrackService> logger,
                     IBookmarkService bookmarkService,
                     IAdminService adminService)
     : base(configuration, httpEncoder, dbContext, cacheManager, logger, httpContext)
 {
     this.BookmarkService = bookmarkService;
     this.AdminService    = adminService;
 }
コード例 #25
0
ファイル: ImageService.cs プロジェクト: jindal1979/roadie
 public ImageService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <ImageService> logger,
                     IDefaultNotFoundImages defaultNotFoundImages,
                     IImageSearchManager imageSearchManager)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     DefaultNotFoundImages = defaultNotFoundImages;
     ImageSearchManager    = imageSearchManager;
 }
コード例 #26
0
 public ImageService(IRoadieSettings configuration,
                     IHttpEncoder httpEncoder,
                     IHttpContext httpContext,
                     data.IRoadieDbContext context,
                     ICacheManager cacheManager,
                     ILogger <ImageService> logger,
                     IDefaultNotFoundImages defaultNotFoundImages)
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     this.DefaultNotFoundImages = defaultNotFoundImages;
     this.BingSearchEngine      = new BingImageSearchEngine(configuration, logger, this.RequestIp, this.Referrer);
     this.ITunesSearchEngine    = new ITunesSearchEngine(configuration, cacheManager, logger, this.RequestIp, this.Referrer);
 }
コード例 #27
0
ファイル: FileProcessor.cs プロジェクト: jindal1979/roadie
        public FileProcessor(IRoadieSettings configuration, IHttpEncoder httpEncoder, ICacheManager cacheManager,
                             ILogger <FileProcessor> logger, IArtistLookupEngine artistLookupEngine, IReleaseLookupEngine releaseLookupEngine,
                             IAudioMetaDataHelper audioMetaDataHelper)
        {
            Configuration = configuration;
            HttpEncoder   = httpEncoder;
            CacheManager  = cacheManager;
            Logger        = logger;

            ArtistLookupEngine  = artistLookupEngine;
            ReleaseLookupEngine = releaseLookupEngine;
            AudioMetaDataHelper = audioMetaDataHelper;
        }
コード例 #28
0
ファイル: UserService.cs プロジェクト: jindal1979/roadie
 public UserService(IRoadieSettings configuration,
                    IHttpEncoder httpEncoder,
                    IHttpContext httpContext,
                    IRoadieDbContext context,
                    ICacheManager cacheManager,
                    ILogger <ArtistService> logger,
                    UserManager <Library.Identity.User> userManager,
                    ILastFmHelper lastFmHelper
                    )
     : base(configuration, httpEncoder, context, cacheManager, logger, httpContext)
 {
     UserManager  = userManager;
     LastFmHelper = lastFmHelper;
 }
コード例 #29
0
        public HtmlTag(IHttpEncoder httpEncoder, HtmlTextWriterTag tag)
        {
            if (httpEncoder == null)
            {
                throw new ArgumentNullException(nameof(httpEncoder));
            }

            if (tag == HtmlTextWriterTag.Unknown)
            {
                throw new ArgumentException("The tag cannot be unknown.", nameof(tag));
            }

            this.HttpEncoder = httpEncoder;
            this.Tag         = tag;
        }
コード例 #30
0
 public static bool CompareETag(IHttpEncoder encoder, EntityTagHeaderValue eTagLeft, EntityTagHeaderValue eTagRight)
 {
     if (eTagLeft == null && eTagRight == null)
     {
         return(true);
     }
     if (eTagLeft == null && eTagRight != null)
     {
         return(false);
     }
     if (eTagRight == null && eTagLeft != null)
     {
         return(false);
     }
     return(eTagLeft == eTagRight);
 }
コード例 #31
0
ファイル: HttpUtility.cs プロジェクト: UStack/UWeb
 public HttpUtility(IHttpEncoder httpEncoder)
 {
     this.httpEncoder = httpEncoder;
 }