Beispiel #1
0
 public IndexModel(Service2 service2, Service3 service3,
                   IService service, IFoo foo, IBar bar,
                   INewService newService, IOtherService otherService, IOtherService2 otherService2)
 {
     Service2      = service2 ?? throw new System.ArgumentNullException(nameof(service2));
     Service3      = service3 ?? throw new System.ArgumentNullException(nameof(service3));
     Service       = service ?? throw new System.ArgumentNullException(nameof(service));
     Foo           = foo ?? throw new System.ArgumentNullException(nameof(foo));
     Bar           = bar ?? throw new System.ArgumentNullException(nameof(bar));
     NewService    = newService ?? throw new System.ArgumentNullException(nameof(newService));
     OtherService  = otherService ?? throw new System.ArgumentNullException(nameof(otherService));
     OtherService2 = otherService2 ?? throw new System.ArgumentNullException(nameof(otherService2));
 }
Beispiel #2
0
 private record Component(IOtherService service, IOtherService2 service2);