public SubTestService2(ISingletonService1 singleton) { if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } SingletonService1 = singleton; }
public TestService2(ISingletonService1 singleton, ISubTransientService2 subService1) { if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (subService1 == null) { throw new ArgumentNullException(nameof(subService1)); } SingletonService1 = singleton; SubTransientService1 = subService1; }
public TestService1(ISingletonService1 singleton, ITransientService2 service2) { if (singleton == null) { throw new ArgumentNullException(nameof(singleton)); } if (service2 == null) { throw new ArgumentNullException(nameof(service2)); } SingletonService1 = singleton; TransientService2 = service2; }