Example #1
0
 public SymbolServiceEventProcessor(
     IWebHostEnvironment environment,
     IMetricsPublisher metrics,
     IOptions <SymbolServiceOptions> options)
 {
     _environment = environment;
     _metrics     = metrics;
     _options     = options.Value;
 }
        public SymsorterBatchFinalizer(
            IOptions <SymbolServiceOptions> options,
            ISymbolGcsWriter gcsWriter,
            SuffixGenerator suffixGenerator,
            SuffixGenerator generator,
            ILogger <SymsorterBatchFinalizer> logger)
        {
            _options         = options?.Value ?? throw new ArgumentNullException(nameof(options));
            _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
            _generator       = generator;
            _gcsWriter       = gcsWriter ?? throw new ArgumentNullException(nameof(gcsWriter));
            _suffixGenerator = suffixGenerator ?? throw new ArgumentNullException(nameof(suffixGenerator));

            if (!File.Exists(_options.SymsorterPath))
            {
                throw new ArgumentException($"Symsorter not found at: {_options.SymsorterPath}");
            }

            _symsorterOutputPath = Path.Combine(_options.BaseWorkingPath, "symsorter_output");
            Directory.CreateDirectory(_symsorterOutputPath);
        }
        public SymsorterBatchFinalizer(
            IMetricsPublisher metrics,
            IOptions <SymbolServiceOptions> options,
            ISymbolGcsWriter gcsWriter,
            BundleIdGenerator bundleIdGenerator,
            IHub hub,
            ILogger <SymsorterBatchFinalizer> logger)
        {
            _options           = options?.Value ?? throw new ArgumentNullException(nameof(options));
            _metrics           = metrics;
            _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
            _gcsWriter         = gcsWriter ?? throw new ArgumentNullException(nameof(gcsWriter));
            _bundleIdGenerator = bundleIdGenerator;
            _hub = hub;
            if (!File.Exists(_options.SymsorterPath))
            {
                throw new ArgumentException($"Symsorter not found at: {_options.SymsorterPath}");
            }

            _symsorterOutputPath = Path.Combine(_options.BaseWorkingPath, "symsorter_output");
            Directory.CreateDirectory(_symsorterOutputPath);
        }