示例#1
0
 /// <summary>
 /// Construct service with dependencies from database and other services.
 /// </summary>
 /// <param name="_context">
 /// Database context.
 /// </param>
 /// <param name="twilioService">
 /// Service for accessing SMS.
 /// </param>
 /// <param name="alpha">
 /// Service for getting prices.
 /// </param>
 /// <param name="limitCount">
 /// Service for limiting requests made by users.
 /// </param>
 public WatchService(IStockDbContext _context, ITwilioService twilioService, AlphaVantage alpha, ILimitCount limitCount)
 {
     context      = _context;
     twilio       = twilioService;
     alphaVantage = alpha;
     limit        = limitCount;
 }
示例#2
0
 /// <summary>
 /// Initialize the service with database and Twilio credentials
 /// </summary>
 /// <param name="_context">
 /// Database context for checking user records.
 /// </param>
 /// <param name="ACCT_SID">
 /// Account Service ID for API.
 /// </param>
 /// <param name="AUTH_TOKEN">
 /// Authentication Token for API.
 /// </param>
 /// <param name="SRV_SID">
 /// Service ID for Notifications.
 /// </param>
 public TwilioService(IStockDbContext _context, string ACCT_SID, string AUTH_TOKEN, string SRV_SID)
 {
     context    = _context;
     accountSid = ACCT_SID;
     authToken  = AUTH_TOKEN;
     serviceSid = SRV_SID;
 }
示例#3
0
 public StockRepository(IStockDbContext dbContext, IMapper mapper)
 {
     this.dbContext = dbContext;
     this.mapper    = mapper;
 }
 public StockActionUniqueChecker(IStockDbContext stockDbContext)
 {
     _stockDbContext = stockDbContext;
 }
示例#5
0
 public InitializeStockCommandHandler(IStockDbContext stockDbContext, IStockActionUniqueChecker stockActionUniqueChecker)
 {
     _stockDbContext           = stockDbContext;
     _stockActionUniqueChecker = stockActionUniqueChecker;
 }
示例#6
0
 public StockSnapshotUniqueChecker(IStockDbContext stockDbContext)
 {
     _stockDbContext = stockDbContext;
 }
 public CreateStockReadModelCommandHandler(IStockDbContext stockDbContext, IStockUniqueChecker stockUniqueChecker)
 {
     _stockDbContext     = stockDbContext;
     _stockUniqueChecker = stockUniqueChecker;
 }
 public QueryStockCommandHandler(IStockDbContext stockDbContext)
 {
     _stockDbContext = stockDbContext;
 }
示例#9
0
 public RemoveFromStockCommandHandler(IStockActionUniqueChecker stockActionUniqueChecker, IStockDbContext stockDbContext)
 {
     _stockActionUniqueChecker = stockActionUniqueChecker;
     _stockDbContext           = stockDbContext;
 }
示例#10
0
 public StockInitializedEvent_CreateStockSnapshot(IStockSnapshotUniqueChecker snapshotUniqueChecker, IStockDbContext stockDbContext)
 {
     _snapshotUniqueChecker = snapshotUniqueChecker;
     _stockDbContext        = stockDbContext;
 }
 public MockTwilioService(IStockDbContext context, string ACCT_SID, string AUTH_TOKEN, string SRV_SID) : base(context, ACCT_SID, AUTH_TOKEN, SRV_SID)
 {
 }
示例#12
0
 public StocksService(IStockDbContext liteDbContext)
 {
     _database = liteDbContext.Database;
 }
示例#13
0
 public UpdateAvailableStockCountReadModelCommandHandler(IStockDbContext stockDbContext)
 {
     _stockDbContext = stockDbContext;
 }
示例#14
0
 public QueryCompanyService(IStockDbContext _context)
 {
     context = _context;
 }
 public StockRepository(IStockDbContext context)
 {
     dbContext = context;
 }
示例#16
0
 public StockIncreasedEvent_UpdateStockSnapshot(IStockDbContext stockDbContext)
 {
     _stockDbContext = stockDbContext;
 }
示例#17
0
 public LimitCountService(IStockDbContext _context)
 {
     context = _context;
 }
示例#18
0
 public MockWatchService(IStockDbContext context, ITwilioService twilio, AlphaVantage alpha, ILimitCount limitCount) : base(context, twilio, alpha, limitCount)
 {
 }
 public AddToStockCommandHandler(IStockActionUniqueChecker stockActionUniqueChecker, IStockDbContext stockDbContext)
 {
     _stockActionUniqueChecker = stockActionUniqueChecker;
     _stockDbContext           = stockDbContext;
 }
 public RollbackDecreaseFromStockCommandHandler(IStockDbContext stockDbContext, IDomainMessageBroker domainMessageBroker)
 {
     _stockDbContext      = stockDbContext;
     _domainMessageBroker = domainMessageBroker;
 }