public static void AddAllInterfaceServices(this ServiceContainer container, Assembly assembly = null) { if (assembly == null) { assembly = Assembly.GetExecutingAssembly(); } container.AddInterfaceServices <ISingletonService>(ServiceLifetime.Singleton, assembly); container.AddInterfaceServices <IScopedService>(ServiceLifetime.Scoped, assembly); container.AddInterfaceServices <ITransientService>(ServiceLifetime.Transient, assembly); }