コード例 #1
0
 // Using DI to inject infrastructure persistence Repositories
 public CreateTraceCommandHandler(IMediator mediator, ITraceRepository traceRepository, IEventBus eventBus)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     //_identityService = identityService ?? throw new ArgumentNullException(nameof(identityService));
     _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _eventBus = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
 }
コード例 #2
0
 // costructor
 public TracesController(ITraceRepository traceRepository, IOriginsRepository originsRepository, ILogger <TracesController> logger, IMemoryCache cache)
 {
     _traceRepository   = traceRepository;
     _originsRepository = originsRepository;
     _logger            = logger;
     _cache             = cache;
 }
コード例 #3
0
ファイル: AppController.cs プロジェクト: kklldog/AgileTrace
 public AppController(IAppRepository appRepository,
                      ITraceRepository traceRepository,
                      IMemoryCache memoryCache)
 {
     _appRepository = appRepository;
     _memoryCache   = memoryCache;
 }
コード例 #4
0
 public TradeSignalUpdatedDomainEventHandler(
     ITraceRepository traceRepository,
     ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     this._traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     this._trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
コード例 #5
0
 public FakeDataController(IUserRepository userRepository, ILinkRepository linkRepository, ILogRepository logRepository,
                           ITraceRepository traceRepository)
 {
     _userRepository  = userRepository;
     _linkRepository  = linkRepository;
     _logRepository   = logRepository;
     _traceRepository = traceRepository;
 }
コード例 #6
0
ファイル: TraceManager.cs プロジェクト: OlegKi/relayserver
 public TraceManager(ITraceRepository traceRepository, ITraceFileWriter traceFileWriter, ITraceFileReader traceFileReader, IConfiguration configuration, ILogger logger)
 {
     _traceRepository = traceRepository;
     _traceFileWriter = traceFileWriter;
     _traceFileReader = traceFileReader;
     _configuration   = configuration;
     _logger          = logger;
 }
コード例 #7
0
 public Form1(IMapper mapper, IClientRepository clientRepository, ITraceRepository tracerepository, IPaiementRepository paiementRepository)
 {
     InitializeComponent();
     _mapper             = mapper;
     _clientRepository   = clientRepository;
     _tracerepository    = tracerepository;
     _paiementRepository = paiementRepository;
 }
コード例 #8
0
 public TraceEndpoint(ITraceOptions options, ITraceRepository traceRepository, ILogger <TraceEndpoint> logger = null) :
     base(options)
 {
     if (traceRepository == null)
     {
         throw new ArgumentNullException(nameof(traceRepository));
     }
     _logger    = logger;
     _traceRepo = traceRepository;
 }
コード例 #9
0
        public static void UseTraceActuator(IConfiguration configuration, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
        {
            var options = new TraceOptions(configuration);

            traceRepository = traceRepository ?? new TraceDiagnosticObserver(options, CreateLogger <TraceDiagnosticObserver>(loggerFactory));
            DiagnosticsManager.Instance.Observers.Add((IDiagnosticObserver)traceRepository);
            var ep      = new TraceEndpoint(options, traceRepository, CreateLogger <TraceEndpoint>(loggerFactory));
            var handler = new TraceHandler(ep, SecurityService, CreateLogger <TraceHandler>(loggerFactory));

            ConfiguredHandlers.Add(handler);
        }
コード例 #10
0
        private static void UseTraceActuatorComponents(IConfiguration configuration, ITraceRepository traceRepository, ILoggerFactory loggerFactory)
        {
            var options = new TraceEndpointOptions(configuration);

            _mgmtOptions.RegisterEndpointOptions(configuration, options);
            traceRepository = traceRepository ?? new TraceDiagnosticObserver(options, CreateLogger <TraceDiagnosticObserver>(loggerFactory));
            DiagnosticsManager.Instance.Observers.Add((IDiagnosticObserver)traceRepository);
            var ep      = new TraceEndpoint(options, traceRepository, CreateLogger <TraceEndpoint>(loggerFactory));
            var handler = new TraceHandler(ep, SecurityServices, _mgmtOptions, CreateLogger <TraceHandler>(loggerFactory));

            ConfiguredHandlers.Add(handler);
        }
コード例 #11
0
        private static IAppBuilder UseTraceActuatorComponents(this IAppBuilder builder, IConfiguration config, ITraceRepository traceRepository, ILoggerFactory loggerFactory)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            ITraceOptions options = new TraceEndpointOptions(config);

            var mgmtOptions = ManagementOptions.Get(config);

            foreach (var mgmt in mgmtOptions)
            {
                mgmt.EndpointOptions.Add(options);
            }

            traceRepository = traceRepository ?? new TraceDiagnosticObserver(options, loggerFactory?.CreateLogger <TraceDiagnosticObserver>());
            DiagnosticsManager.Instance.Observers.Add((IDiagnosticObserver)traceRepository);
            var endpoint = new TraceEndpoint(options, traceRepository, loggerFactory?.CreateLogger <TraceEndpoint>());
            var logger   = loggerFactory?.CreateLogger <TraceEndpointOwinMiddleware>();

            return(builder.Use <TraceEndpointOwinMiddleware>(endpoint, mgmtOptions, logger));
        }
コード例 #12
0
        public static IAppBuilder UseTraceActuator(this IAppBuilder builder, IConfiguration config, ITraceRepository traceRepository, ILoggerFactory loggerFactory, MediaTypeVersion version)
        {
            switch (version)
            {
            case MediaTypeVersion.V1:
                return(builder.UseTraceActuatorComponents(config, traceRepository, loggerFactory));

            default:
                return(builder.UseHttpTraceActuator(config, null, loggerFactory));
            }
        }
コード例 #13
0
 /// <summary>
 /// Add Request Trace actuator endpoint to OWIN Pipeline
 /// </summary>
 /// <param name="builder">OWIN <see cref="IAppBuilder" /></param>
 /// <param name="config"><see cref="IConfiguration"/> of application for configuring thread dump endpoint</param>
 /// <param name="traceRepository">repository to put traces in</param>
 /// <param name="loggerFactory">For logging within the middleware</param>
 /// <returns>OWIN <see cref="IAppBuilder" /> with Trace Endpoint added</returns>
 public static IAppBuilder UseTraceActuator(this IAppBuilder builder, IConfiguration config, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
 {
     return(builder.UseTraceActuator(config, traceRepository, loggerFactory, MediaTypeVersion.V1));
 }
コード例 #14
0
 public TraceAndGroupService(ITraceRepository traceRepository, IPageRepository pageRepository)
 {
     this.traceRepository = traceRepository;
     this.pageRepository  = pageRepository;
 }
コード例 #15
0
 public PaperTradeDataCreatedIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
コード例 #16
0
ファイル: TraceEndpoint.cs プロジェクト: winhu/Steeltoe
 public List <TraceResult> DoInvoke(ITraceRepository repo)
 {
     return(repo.GetTraces());
 }
 public BacktestingDataCreatedIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     this._traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     this._trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
 public RoundtripTargetPriceHitIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
コード例 #19
0
ファイル: TraceService.cs プロジェクト: randyrod/oss-traces
 public TraceService(ITraceRepository traceRepository, IRequestContext requestContext, IApaleoClientsFactory apaleoClientsFactory)
 {
     _traceRepository      = Check.NotNull(traceRepository, nameof(traceRepository));
     _requestContext       = Check.NotNull(requestContext, nameof(requestContext));
     _apaleoClientsFactory = Check.NotNull(apaleoClientsFactory, nameof(apaleoClientsFactory));
 }
コード例 #20
0
 public AddStrategiesCommandHandler(ITraceRepository traceRepository, IMediator mediator, IEventBus eventBus)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _mediator        = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _eventBus        = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
 }
コード例 #21
0
 public TestTraceEndpoint(ITraceOptions options, ITraceRepository traceRepository, ILogger <TraceEndpoint> logger = null)
     : base(options, traceRepository, logger)
 {
 }
コード例 #22
0
 public TraceAndPageService(IPageRepository pageRepository, ITraceRepository traceRepository, ILogRepository logRepository)
 {
     this.traceRepository = traceRepository;
     this.pageRepository  = pageRepository;
     this.logRepository   = logRepository;
 }
        /// <summary>
        /// Add Request Trace actuator endpoint to OWIN Pipeline
        /// </summary>
        /// <param name="builder">OWIN <see cref="IAppBuilder" /></param>
        /// <param name="config"><see cref="IConfiguration"/> of application for configuring thread dump endpoint</param>
        /// <param name="traceRepository">repository to put traces in</param>
        /// <param name="loggerFactory">For logging within the middleware</param>
        /// <returns>OWIN <see cref="IAppBuilder" /> with Trace Endpoint added</returns>
        public static IAppBuilder UseTraceActuator(this IAppBuilder builder, IConfiguration config, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            var options = new TraceOptions(config);

            traceRepository = traceRepository ?? new TraceDiagnosticObserver(options, loggerFactory?.CreateLogger <TraceDiagnosticObserver>());
            DiagnosticsManager.Instance.Observers.Add((IDiagnosticObserver)traceRepository);
            var endpoint = new TraceEndpoint(options, traceRepository, loggerFactory?.CreateLogger <TraceEndpoint>());
            var logger   = loggerFactory?.CreateLogger <EndpointOwinMiddleware <TraceEndpoint, List <TraceResult> > >();

            return(builder.Use <EndpointOwinMiddleware <List <TraceResult> > >(endpoint, new List <HttpMethod> {
                HttpMethod.Get
            }, true, logger));
        }
コード例 #24
0
 public static void UseTraceActuator(IConfiguration configuration, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
 {
     UseTraceActuator(configuration, MediaTypeVersion.V1, traceRepository, loggerFactory);
 }
コード例 #25
0
 public HarnessController(ITraceRepository repository, IHostingEnvironment app)
 {
     _app = app;
     tracesRepository = repository;
     tracesRepository.AddTrace(new AppTrace() { dt = DateTime.Now, text = "Initialized.." });
 }
コード例 #26
0
        public static void UseTraceActuator(IConfiguration configuration, MediaTypeVersion version, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
        {
            switch (version)
            {
            case MediaTypeVersion.V1:
                UseTraceActuatorComponents(configuration, traceRepository, loggerFactory);
                break;

            default:
                UseHttpTraceActuator(configuration, null, loggerFactory);
                break;
            }
        }
コード例 #27
0
 public TraceController(ITraceRepository traceRepository, ITraceManager traceManager, ITraceTransformation traceTransformation)
 {
     _traceRepository     = traceRepository;
     _traceManager        = traceManager;
     _traceTransformation = traceTransformation;
 }
コード例 #28
0
 public TraceService(ITraceRepository repository)
 {
     _repository = repository;
 }
コード例 #29
0
 public InvestmentCandleDataRequestedIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
コード例 #30
0
ファイル: ClientForm.cs プロジェクト: abderrahim1920/GPS
 public ClientForm(IMapper mapper, ITraceRepository traceRepository)
 {
     InitializeComponent();
     _mapper          = mapper;
     _traceRepository = traceRepository;
 }
 public InvestmentSettledIntegrationEventHandler(ITraceRepository traceRepository, IMediator mediator, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _mediator        = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }