5 types derived from BackgroundService
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesService.cs (1)
19internal sealed class TcpEndpointProbesService : BackgroundService
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
ResourceMonitorService.cs (1)
25internal sealed class ResourceMonitorService : BackgroundService, IResourceMonitor
Microsoft.Extensions.Hosting.Testing (1)
HostTerminatorService.cs (1)
16internal sealed partial class HostTerminatorService : BackgroundService
OrderProcessor (1)
OrderProcessingWorker.cs (1)
9public class OrderProcessingWorker : BackgroundService
TestProject.WorkerA (1)
Worker.cs (1)
6public class Worker : BackgroundService
27 references to BackgroundService
Aspire.Confluent.Kafka (1)
MetricsService.cs (1)
13internal sealed partial class MetricsService(MetricsChannel channel, ConfluentKafkaMetrics metrics, ILogger<MetricsService> logger) : BackgroundService
Aspire.Hosting (3)
Codespaces\CodespacesResourceUrlRewriterService.cs (1)
12internal sealed class CodespacesResourceUrlRewriterService(ILogger<CodespacesResourceUrlRewriterService> logger, IOptions<CodespacesOptions> options, CodespacesUrlRewriter codespaceUrlRewriter, ResourceNotificationService resourceNotificationService) : BackgroundService
DistributedApplicationRunner.cs (1)
11internal sealed class DistributedApplicationRunner(DistributedApplicationExecutionContext executionContext, DistributedApplicationModel model, IServiceProvider serviceProvider) : BackgroundService
Health\ResourceHealthCheckService.cs (1)
14internal class ResourceHealthCheckService(ILogger<ResourceHealthCheckService> logger, ResourceNotificationService resourceNotificationService, HealthCheckService healthCheckService, IServiceProvider services, IDistributedApplicationEventing eventing, TimeProvider timeProvider) : BackgroundService
Aspire.Hosting.Containers.Tests (1)
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
20: BackgroundService
Aspire.Hosting.Testing (1)
ResourceLoggerForwarderService.cs (1)
20: BackgroundService
Aspire.Hosting.Tests (1)
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
20: BackgroundService
CatalogDb (1)
CatalogDbInitializer.cs (1)
7: BackgroundService
Consumer (1)
ConsumerWorker.cs (1)
8internal sealed class ConsumerWorker(IConsumer<Ignore, string> consumer, ILogger<ConsumerWorker> logger) : BackgroundService
DaprServiceC (1)
Program.cs (1)
24public sealed class Worker(ILogger<Worker> logger, DaprClient dapr) : BackgroundService
DatabaseMigration.MigrationService (1)
ApiDbInitializer.cs (1)
15IHostApplicationLifetime hostApplicationLifetime) : BackgroundService
EventHubsConsumer (2)
Consumer.cs (1)
20internal sealed class Consumer(EventHubConsumerClient client, ILogger<Consumer> logger) : BackgroundService
Processor.cs (1)
24internal sealed class Processor(EventProcessorClient client, ILogger<Processor> logger) : BackgroundService
Microsoft.Extensions.Hosting (8)
BackgroundServiceExceptionBehavior.cs (5)
8/// unhandled exception occurs in one of its <see cref="BackgroundService"/> instances. 16/// If a <see cref="BackgroundService"/> throws an exception, the <see cref="IHost"/> instance stops, and the process continues. 21/// Ignore exceptions thrown in <see cref="BackgroundService"/>. 24/// If a <see cref="BackgroundService"/> throws an exception, the <see cref="IHost"/> will log the error, but otherwise ignore it. 25/// The <see cref="BackgroundService"/> is not restarted.
HostOptions.cs (1)
54/// its <see cref="BackgroundService"/> instances throw an unhandled exception.
Internal\Host.cs (2)
127if (service is BackgroundService backgroundService) 175private async Task TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
Producer (2)
ContinuousProducerWorker.cs (1)
8internal sealed class ContinuousProducerWorker(IProducer<Null, string> producer, ILogger<ContinuousProducerWorker> logger) : BackgroundService
IntermittentProducerWorker.cs (1)
8internal sealed class IntermittentProducerWorker(IProducer<string, string> producer, ILogger<IntermittentProducerWorker> logger) : BackgroundService
Stress.TelemetryService (2)
GaugeMetrics.cs (1)
9public class GaugeMetrics(ILogger<GaugeMetrics> logger, IMeterFactory meterFactory) : BackgroundService
TelemetryStresser.cs (1)
15public class TelemetryStresser(ILogger<TelemetryStresser> logger, IConfiguration config) : BackgroundService
TestProject.AppHost (1)
src\Aspire.Hosting.Testing\ResourceLoggerForwarderService.cs (1)
20: BackgroundService
WebPubSubWeb (1)
Program.cs (1)
77sealed class NotificationService([FromKeyedServices(Constants.NotificationHubName)] WebPubSubServiceClient service) : BackgroundService