コード例 #1
0
 public AddressInfoHandler(Repository repo, ResourceManager lang, TezosDataContext db,
                           TezosBotFacade botClient)
     : base(db, botClient)
 {
     _repo = repo;
     _lang = lang;
 }
コード例 #2
0
 private TOut RunIsolatedDb <TOut>(Func <TezosDataContext, TOut> action)
 {
     lock (_dbLock)
     {
         using var db = new TezosDataContext(_dbOptions);
         return(action(db));
     }
 }
コード例 #3
0
 private void RunIsolatedDb(Action <TezosDataContext> action)
 {
     lock (_dbLock)
     {
         using var db = new TezosDataContext(_dbOptions);
         action(db);
     }
 }
コード例 #4
0
 public NotifyDelegateInactive(ITzKtClient tzkt, IOptions <BotConfig> config, TezosDataContext db,
                               ResourceManager lang, AddressService addressService)
 {
     _db             = db;
     _tzkt           = tzkt;
     _lang           = lang;
     _config         = config;
     _addressService = addressService;
 }
コード例 #5
0
 public AddressTransactionListHandler(
     TezosDataContext db,
     TezosBotFacade botClient,
     ResourceManager lang,
     TokenService tokenService,
     AddressTransactionsRepository transactionsRepository
     )
     : base(db, botClient)
 {
     TokenService           = tokenService;
     TransactionsRepository = transactionsRepository;
     this.lang = lang;
 }
コード例 #6
0
 public ExcludeWhaleCommand(IOptions <BotConfig> config, TezosDataContext db, TezosBotFacade botClient)
     : base(db, botClient)
 {
     Config = config.Value;
 }
コード例 #7
0
 public LinkPayoutAddressCommand(TezosBotFacade bot, TezosDataContext data)
 {
     this.bot  = bot;
     this.data = data;
 }
コード例 #8
0
 public Repository(DbContextOptions dbOptions)
 {
     _dbOptions = dbOptions;
     _db        = new TezosDataContext(dbOptions);
 }
コード例 #9
0
 public BaseHandler(TezosDataContext db, TezosBotFacade botClient)
 {
     Db  = db;
     Bot = botClient;
 }
コード例 #10
0
 public TezosBotFacade(TezosDataContext db, TelegramBotClient client, IOptions <BotConfig> options)
 {
     this.db      = db;
     this.options = options;
     Client       = client;
 }
コード例 #11
0
 public void SaveMessage(Message message)
 {
     using var db = new TezosDataContext(_dbOptions);
     db.Add(message);
     db.SaveChanges();
 }
コード例 #12
0
 public TokenService(TezosDataContext db, IBetterCallDevClient bcd)
 {
     Db  = db;
     Bcd = bcd;
 }
コード例 #13
0
 public SyncPayoutAddressCommand(TezosDataContext dbContext, TezosBotFacade botClient)
 {
     DbContext = dbContext;
     Bot       = botClient;
 }
コード例 #14
0
 public AddressService(TezosDataContext data, ITzKtClient tzKtClient)
 {
     this.data       = data;
     this.tzKtClient = tzKtClient;
 }