示例#1
0
        public void DoAchieve(int gangId)
        {
            var achieves = GetUnCheckedAchieveList(gangId);

            foreach (var item in achieves)
            {
                item.MemberId = gangId;
                IDataExecutor <Achievement> executor = ExecutorFactory <Achievement> .Build(item.Executor);

                executor.Execute(item);
            }
        }
示例#2
0
        public DataProvider(string name)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            this.Name = name.Trim();

            _executor    = DataExecutor.Instance;
            _metadata    = new MetadataFileManager(this.Name);
            _multiplexer = new DataMultiplexer(this.Name);
        }
示例#3
0
        public RTask(ILifetimeScope autofac, IPostMaster postMaster, IRepository repository,
                     IClientControl monik, IMapper mapper, IArchiver archiver, ITelegramBotClient botClient,
                     int id, string reportName, string template, DtoSchedule schedule, string connStr, string query,
                     long chatId, RRecepientGroup sendAddress, int tryCount, int timeOut,
                     RReportType reportType, int reportId, bool htmlBody, bool jsonAttach)
        {
            Type = reportType;

            switch (Type)
            {
            case RReportType.Common:
                _dataEx = autofac.ResolveNamed <IDataExecutor>("commondataex");
                _viewEx = autofac.ResolveNamed <IViewExecutor>("commonviewex");
                break;

            case RReportType.Custom:
                _dataEx = autofac.ResolveNamed <IDataExecutor>(query);
                _viewEx = autofac.ResolveNamed <IViewExecutor>(template);
                break;

            default:
                throw new NotImplementedException();
            }

            _archiver         = archiver;
            _postMaster       = postMaster;
            Id                = id;
            ReportName        = reportName;
            Query             = query;
            ChatId            = chatId;
            ViewTemplate      = template;
            ReportId          = reportId;
            SendAddresses     = sendAddress;
            Schedule          = schedule;
            _repository       = repository;
            TryCount          = tryCount;
            QueryTimeOut      = timeOut;
            ConnectionString  = connStr;
            HasHtmlBody       = htmlBody;
            HasJsonAttachment = jsonAttach;
            _monik            = monik;
            _mapper           = mapper;
            _bot              = botClient;
        }
 public DatabaseKeyboards(IDataExecutor dataExecutor)
 {
     _dataExecutor = dataExecutor;
 }
 public DatabaseKeyboards()
 {
     _dataExecutor = new DataExecutor();
 }