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

7 lines
156 B
C#
Raw Normal View History

2024-06-12 22:43:59 -07:00
// With serviceType:
collection.AddSingleton<ISingletonService, SingletonService>();
// Without serviceType:
collection.AddSingleton<SingletonService>();