Exemplo n.º 1
0
 public AccountController(IAuthentication authentication, IDatabaseWorker databaseWorker, UserManager <User> userManager, EmailService emailService)
 {
     _authentication   = authentication;
     _databaseWorker   = databaseWorker;
     _userManager      = userManager;
     this.emailService = emailService;
 }
 public LoginController(Context context)
 {
     _databaseWorker = new UserDatabaseWorker(context);
     _tokenConverter = new TokenToUserIdConverter();
     _accountService = new AccountService(context);
     _tokenService   = new TokenService();
 }
Exemplo n.º 3
0
 public SubjectController(IDatabaseWorker databaseWorker, IAuthentication authentication, ISubjectService subjectService, ITaskService taskService)
 {
     _databaseWorker = databaseWorker;
     _authentication = authentication;
     _subjectService = subjectService;
     _taskService    = taskService;
 }
Exemplo n.º 4
0
 public TaskController(ITaskService taskService, IDatabaseWorker databaseWorker, IAuthentication authentication, IFileService fileService)
 {
     _taskService    = taskService;
     _databaseWorker = databaseWorker;
     _authentication = authentication;
     _fileService    = fileService;
 }
Exemplo n.º 5
0
 public AdminController(IAuthentication authentication, IDatabaseWorker databaseWorker, UserManager <User> userManager, DataBaseContext baseContext)
 {
     _authentication = authentication;
     _databaseWorker = databaseWorker;
     _userManager    = userManager;
     _baseContext    = baseContext;
 }
Exemplo n.º 6
0
 public SubjectService(DataBaseContext dataBaseContext, IAuthentication authentication, IDatabaseWorker databaseWorker, ITaskService taskService)
 {
     _dataBaseContext = dataBaseContext;
     _authentication  = authentication;
     _databaseWorker  = databaseWorker;
     _taskService     = taskService;
 }
Exemplo n.º 7
0
        public TeacherController(IAuthentication authentication, IDatabaseWorker databaseWorker, ISubjectService subjectService)
        {
            //   Console.WriteLine(" TEACHER CONTROLLER CONSTRUCTOR ");

            _authentication = authentication;
            _databaseWorker = databaseWorker;
            _subjectService = subjectService;
        }
Exemplo n.º 8
0
        public SubjectController(IDatabaseWorker databaseWorker, IAuthentication authentication, ISubjectService subjectService, ITaskService taskService)
        {
            _databaseWorker = databaseWorker;
            _authentication = authentication;
            _subjectService = subjectService;
            _taskService    = taskService;

            Console.WriteLine(" SUBJECT CONTROLLER CONSTRUCTOR ");
        }
        public UpdateDatabaseTask()
        {
            string connectionString = @"Data Source=VLAD191100\VLAD191100;Database=HyperWallet;User ID=vlad191100;Password=Vlad18201111;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";
            DbContextOptionsBuilder <Context> options = new DbContextOptionsBuilder <Context>();

            options.UseSqlServer(connectionString);
            Context context = new Context(options.Options);

            _databaseUserWorker    = new UserDatabaseWorker(context);
            _apiUserWorker         = new UserApiWorker();
            _databasePaymentWorker = new PaymentDatabaseWorker(context);
            _apiPaymentWorker      = new PaymentApiWorker();
        }
        public TransactionManager(
            GraftServiceConfiguration configuration,
            IWallet wallet,
            IDatabaseWorker databaseWorker,
            ILoggerFactory loggerFactory)
        {
            this.configuration  = configuration;
            this.wallet         = wallet;
            this.databaseWorker = databaseWorker;

            logger             = loggerFactory.CreateLogger <TransactionManager>();
            transactionQWorker = Task.Factory.StartNew(TaskBody);
        }
 public PublicAdapter()
 {
     _databaseWorker = LevelDBDatabaseWorker.GetInstance();
 }
Exemplo n.º 12
0
 public PickupUserController(IDatabaseWorker databaseWorker, IAuthentication authentication)
 {
     _databaseWorker = databaseWorker;
     _authentication = authentication;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Конструктор класса
 /// </summary>
 /// <param name="worker">объект IDatabaseWorker</param>
 public DatabaseWorkerHandler(IDatabaseWorker worker) => this.worker = worker;
 public UserService(Context context)
 {
     _databaseWorker = new UserDatabaseWorker(context);
     _apiWorker      = new UserApiWorker();
 }
Exemplo n.º 15
0
 public NewsController(DataBaseContext dataBaseContext, IDatabaseWorker databaseWorker, INewsService newsService)
 {
     _dataBaseContext = dataBaseContext;
     _databaseWorker  = databaseWorker;
     _newsService     = newsService;
 }
 public PaymentService(Context context)
 {
     _databaseWorker = new PaymentDatabaseWorker(context);
     _apiWorker      = new PaymentApiWorker();
 }
Exemplo n.º 17
0
 public NewController(DataBaseContext db, IDatabaseWorker databaseWorker, INewService newService)
 {
     _db             = db;
     _databaseWorker = databaseWorker;
     _newService     = newService;
 }