Beispiel #1
0
 public GithubReleaseSource(DatabaseContext database, IOptions <RadarrOptions> config)
 {
     _database     = database;
     _config       = config.Value;
     _gitHubClient = new GitHubClient(new ProductHeaderValue("RadarrAPI"));
     _httpClient   = new HttpClient();
 }
Beispiel #2
0
        public ReleaseService(
            IServiceScopeFactory serviceScopeFactory,
            IHub sentry,
            ILogger <ReleaseService> logger,
            IOptions <RadarrOptions> configOptions)
        {
            _serviceScopeFactory = serviceScopeFactory;
            _sentry = sentry;
            _logger = logger;

            _releaseBranches = new ConcurrentDictionary <Branch, Type>();
            _releaseBranches.TryAdd(Branch.Develop, typeof(GithubReleaseSource));
            _releaseBranches.TryAdd(Branch.Nightly, typeof(AppVeyorReleaseSource));
            _releaseBranches.TryAdd(Branch.Aphrodite, typeof(AzureReleaseSource));

            _config = configOptions.Value;
        }
Beispiel #3
0
 public WebhookController(IBackgroundTaskQueue queue, IOptions <RadarrOptions> optionsConfig)
 {
     _queue  = queue;
     _config = optionsConfig.Value;
 }
Beispiel #4
0
 public AppVeyorReleaseSource(DatabaseContext database, IHttpClientFactory httpClientFactory, IOptions <RadarrOptions> config)
 {
     _database   = database;
     _httpClient = httpClientFactory.CreateClient("AppVeyor");
     _config     = config.Value;
 }