コード例 #1
0
ファイル: HookService.cs プロジェクト: oguzhankiyar/hookman
        public HookService(
            IHookRepository hookRepository,
            IEventRepository eventRepository,
            ISenderRepository senderRepository,
            IRequesterQueue requesterQueue,
            IMapper mapper,
            IServiceProvider serviceProvider) : base(serviceProvider)
        {
            _hookRepository   = hookRepository ?? throw new ArgumentNullException(nameof(hookRepository));
            _eventRepository  = eventRepository ?? throw new ArgumentNullException(nameof(eventRepository));
            _senderRepository = senderRepository ?? throw new ArgumentNullException(nameof(senderRepository));
            _requesterQueue   = requesterQueue ?? throw new ArgumentNullException(nameof(requesterQueue));

            _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
        }
コード例 #2
0
 public void MyTestInitialize()
 {
     hookRepository = HookHelper.GetRepository <IHook>();
 }
コード例 #3
0
ファイル: InvokeTest.cs プロジェクト: qinfengzhu/dI.Hook
 public void MyTestInitialize()
 {
     hookRepository = HookHelper.GetRepository <IHook>(true);
     hookRepository.Add(typeof(LogHook));
     hookRepository.Add(typeof(DiagnosticsHook));
 }
コード例 #4
0
 public void MyTestInitialize()
 {
     hookRepository = HookHelper.GetRepository <IHook>();
     hookRepository.Add(new IHook[] { new LogHook(), new DiagnosticsHook() });
 }
コード例 #5
0
 public StatService(IHookRepository hookRepository, IMapper mapper, IServiceProvider serviceProvider) :
     base(serviceProvider)
 {
     _hookRepository = hookRepository ?? throw new ArgumentNullException(nameof(hookRepository));
     _mapper         = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }