Beispiel #1
0
 public DraftControllerWorkerServices(OutgoingInvoiceCommands outgoingInvoiceDraftCommands, OutgoingCreditNoteCommands outgoingCreditNoteDraftCommands, IDatabase database, InvoicingSettings settings)
 {
     OutgoingInvoiceDraftCommands    = outgoingInvoiceDraftCommands ?? throw new ArgumentNullException(nameof(outgoingInvoiceDraftCommands));
     OutgoingCreditNoteDraftCommands = outgoingCreditNoteDraftCommands ?? throw new ArgumentNullException(nameof(outgoingCreditNoteDraftCommands));
     Database = database ?? throw new ArgumentNullException(nameof(database));
     Settings = settings ?? throw new ArgumentNullException(nameof(settings));
 }
Beispiel #2
0
        public AccountancyBoundedContextConfigurator(IConfiguration configuration, IServiceCollection services) : base(configuration, services)
        {
            var section = configuration.GetSection("Merp:Accountancy:InvoicingSettings");
            var config  = new InvoicingSettings();

            new ConfigureFromConfigurationOptions <InvoicingSettings>(section)
            .Configure(config);
            services.AddSingleton(config);
        }
 public InvoiceControllerWorkerServices(IBus bus, IDatabase database, InvoicingSettings invoicingSettings)
 {
     this.Bus      = bus ?? throw new ArgumentNullException(nameof(bus));
     this.Database = database ?? throw new ArgumentNullException(nameof(database));
     this.Settings = invoicingSettings ?? throw new ArgumentNullException(nameof(invoicingSettings));
 }