예제 #1
0
 static TestBase()
 {
     ConfigSettings.Initialize();
     InitializeENode();
     _commandService      = ObjectContainer.Resolve <ICommandService>();
     _sectionQueryService = ObjectContainer.Resolve <ISectionQueryService>();
     _postQueryService    = ObjectContainer.Resolve <IPostQueryService>();
     _replyQueryService   = ObjectContainer.Resolve <IReplyQueryService>();
     ObjectContainer.Resolve <ILockService>().AddLockKey(typeof(Account).Name);
 }
예제 #2
0
 static TestBase()
 {
     ConfigSettings.Initialize();
     InitializeENode();
     _commandService = ObjectContainer.Resolve<ICommandService>();
     _sectionQueryService = ObjectContainer.Resolve<ISectionQueryService>();
     _postQueryService = ObjectContainer.Resolve<IPostQueryService>();
     _replyQueryService = ObjectContainer.Resolve<IReplyQueryService>();
     ObjectContainer.Resolve<ILockService>().AddLockKey(typeof(Account).Name);
 }
예제 #3
0
 protected static void Initialize()
 {
     if (_enodeConfiguration == null)
     {
         ConfigSettings.Initialize();
         InitializeENode();
         _commandService      = ObjectContainer.Resolve <ICommandService>();
         _sectionQueryService = ObjectContainer.Resolve <ISectionQueryService>();
         _postQueryService    = ObjectContainer.Resolve <IPostQueryService>();
         _replyQueryService   = ObjectContainer.Resolve <IReplyQueryService>();
         _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(typeof(TestBase).Name);
         ObjectContainer.Resolve <ILockService>().AddLockKey(typeof(Account).Name);
     }
 }
예제 #4
0
        protected static void Initialize()
        {
            if (_enodeConfiguration != null)
            {
                CleanupEnode();
            }

            var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();

            ConfigSettings.ForumConnectionString = configuration.GetConnectionString("forum");
            ConfigSettings.ENodeConnectionString = configuration.GetConnectionString("enode");

            InitializeENode();

            _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(typeof(TestBase));
            _logger.Info("ENode initialized.");

            _commandService      = ObjectContainer.Resolve <ICommandService>();
            _sectionQueryService = ObjectContainer.Resolve <ISectionQueryService>();
            _postQueryService    = ObjectContainer.Resolve <IPostQueryService>();
            _replyQueryService   = ObjectContainer.Resolve <IReplyQueryService>();

            ObjectContainer.Resolve <ILockService>().AddLockKey(typeof(Account).Name);
        }
예제 #5
0
 public ReplyController(ICommandService commandService, IContextService contextService, IReplyQueryService queryService)
 {
     _commandService = commandService;
     _contextService = contextService;
     _queryService   = queryService;
 }
예제 #6
0
 public ReplyController(ICommandService commandService, IContextService contextService, IReplyQueryService queryService)
 {
     _commandService = commandService;
     _contextService = contextService;
     _queryService = queryService;
 }