// With serviceType: collection.AddSingleton(); // Without serviceType: collection.AddSingleton();