public QuestionsController(ICommandBus commandBus,
     IQuestionManager questionManager)
 {
     _commandBus = commandBus;
     _questionManager = questionManager;
     _questionMapper = new QuestionToQuestionMapper();
 }
예제 #2
0
 public QuestionController(IQuestionManager manager)
 {
     this._manager = manager;
 }
예제 #3
0
 public QuestionController()
 {
     _manager = new QuestionManager();
 }
예제 #4
0
 public QuestionController()
 {
     QuestionManager = Site.QuestionManager;
 }
예제 #5
0
 private IQuestionManager CreateQuestionMgr(IConfigSetting setting)
 {
     if (this.questionMgr == null)
     {
         questionMgr = (IQuestionManager)this.setting.Property["type"].ToObject(typeof(IQuestionManager), true);
         questionMgr.Init(setting);
     }
     return this.questionMgr;
 }
예제 #6
0
 /// <summary>
 /// 初始化模块
 /// </summary>
 /// <param name="framework">IFramework</param>
 /// <param name="setting">对应的配置节</param>
 protected override void OnInit(IFramework framework, IConfigSetting setting)
 {
     base.OnInit(framework, setting);
     questionMgr = this.CreateQuestionMgr(this.setting);
 }
예제 #7
0
 public QuestionController(IQuestionManager questionManager)
 {
     _questionManager = questionManager;
 }
예제 #8
0
 public GameController(IAccountManager accountManager, IGameManager gameManager, IThemeManager themeManager, IQuestionManager questionManager)
 {
     _accountManager  = accountManager ?? throw new ArgumentNullException(nameof(accountManager));
     _gameManager     = gameManager ?? throw new ArgumentNullException(nameof(gameManager));
     _themeManager    = themeManager ?? throw new ArgumentNullException(nameof(themeManager));
     _questionManager = questionManager ?? throw new ArgumentNullException(nameof(questionManager));
 }