/// <summary> /// Initializes a new instance of <c>MicroserviceApiController{TService}</c> class. /// </summary> /// <param name="configuration">The configuration instance of WeText application.</param> /// <param name="commandSender">The command sender instance.</param> /// <param name="tableGatewayRegistration">The table gateway registration.</param> protected MicroserviceApiController(WeTextConfiguration configuration, ICommandSender commandSender, IEnumerable <Lazy <ITableDataGateway, NamedMetadata> > tableGatewayRegistration) { this.configuration = configuration; this.commandSender = commandSender; this.tableDataGateway = tableGatewayRegistration.First(x => x.Metadata.Name == $"{typeof(TService).FullName}.TableDataGateway").Value; }
public DataSource(string con, ConnectionWay way) { connectionStr = con; switch (way) { case ConnectionWay.ADO: items = new ADOItemsGateway(connectionStr); itemGroups = new ADOItemGroupsGateway(connectionStr); suppliers = new ADOSuppliersGateway(connectionStr); break; case ConnectionWay.EF: items = new EFItemsGateway(connectionStr); itemGroups = new EFItemGroupsGateway(connectionStr); suppliers = new EFSuppliersGateway(connectionStr); break; } }
public TextingEventHandler(ITableDataGateway gateway) { this.gateway = gateway; }
public SocialEventHandler(IDomainRepository domainRepository, ITableDataGateway tableGateway, ICommandSender commandSender) { this.domainRepository = domainRepository; this.tableGateway = tableGateway; this.commandSender = commandSender; }
public AccountsEventHandler(ITableDataGateway gateway) { this.gateway = gateway; }