Discord.Net/docs/guides/dependency_injection/samples/scoped.cs

7 lines
141 B
C#
Raw Permalink Normal View History

2024-06-12 22:43:59 -07:00
// With serviceType:
collection.AddScoped<IScopedService, ScopedService>();
// Without serviceType:
collection.AddScoped<ScopedService>();