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); }
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); }
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); } }
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); }
public ReplyController(ICommandService commandService, IContextService contextService, IReplyQueryService queryService) { _commandService = commandService; _contextService = contextService; _queryService = queryService; }