Esempio n. 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));
 }
Esempio n. 2
0
 // costructor
 public TracesController(ITraceRepository traceRepository, IOriginsRepository originsRepository, ILogger <TracesController> logger, IMemoryCache cache)
 {
     _traceRepository   = traceRepository;
     _originsRepository = originsRepository;
     _logger            = logger;
     _cache             = cache;
 }
Esempio n. 3
0
 public AppController(IAppRepository appRepository,
                      ITraceRepository traceRepository,
                      IMemoryCache memoryCache)
 {
     _appRepository = appRepository;
     _memoryCache   = memoryCache;
 }
Esempio n. 4
0
 public TradeSignalUpdatedDomainEventHandler(
     ITraceRepository traceRepository,
     ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     this._traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     this._trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
 public FakeDataController(IUserRepository userRepository, ILinkRepository linkRepository, ILogRepository logRepository,
                           ITraceRepository traceRepository)
 {
     _userRepository  = userRepository;
     _linkRepository  = linkRepository;
     _logRepository   = logRepository;
     _traceRepository = traceRepository;
 }
Esempio n. 6
0
 public TraceManager(ITraceRepository traceRepository, ITraceFileWriter traceFileWriter, ITraceFileReader traceFileReader, IConfiguration configuration, ILogger logger)
 {
     _traceRepository = traceRepository;
     _traceFileWriter = traceFileWriter;
     _traceFileReader = traceFileReader;
     _configuration   = configuration;
     _logger          = logger;
 }
Esempio n. 7
0
 public Form1(IMapper mapper, IClientRepository clientRepository, ITraceRepository tracerepository, IPaiementRepository paiementRepository)
 {
     InitializeComponent();
     _mapper             = mapper;
     _clientRepository   = clientRepository;
     _tracerepository    = tracerepository;
     _paiementRepository = paiementRepository;
 }
Esempio n. 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;
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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));
        }
Esempio n. 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));
            }
        }
Esempio n. 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));
 }
 public TraceAndGroupService(ITraceRepository traceRepository, IPageRepository pageRepository)
 {
     this.traceRepository = traceRepository;
     this.pageRepository  = pageRepository;
 }
Esempio n. 15
0
 public PaperTradeDataCreatedIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
Esempio n. 16
0
 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));
 }
Esempio n. 19
0
 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));
 }
Esempio n. 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));
 }
Esempio n. 21
0
 public TestTraceEndpoint(ITraceOptions options, ITraceRepository traceRepository, ILogger <TraceEndpoint> logger = null)
     : base(options, traceRepository, logger)
 {
 }
 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));
        }
Esempio n. 24
0
 public static void UseTraceActuator(IConfiguration configuration, ITraceRepository traceRepository = null, ILoggerFactory loggerFactory = null)
 {
     UseTraceActuator(configuration, MediaTypeVersion.V1, traceRepository, loggerFactory);
 }
Esempio n. 25
0
 public HarnessController(ITraceRepository repository, IHostingEnvironment app)
 {
     _app = app;
     tracesRepository = repository;
     tracesRepository.AddTrace(new AppTrace() { dt = DateTime.Now, text = "Initialized.." });
 }
Esempio n. 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;
            }
        }
Esempio n. 27
0
 public TraceController(ITraceRepository traceRepository, ITraceManager traceManager, ITraceTransformation traceTransformation)
 {
     _traceRepository     = traceRepository;
     _traceManager        = traceManager;
     _traceTransformation = traceTransformation;
 }
Esempio n. 28
0
 public TraceService(ITraceRepository repository)
 {
     _repository = repository;
 }
Esempio n. 29
0
 public InvestmentCandleDataRequestedIntegrationEventHandler(ITraceRepository traceRepository, ITrendAnalysisIntegrationEventService trendAnalysisIntegrationEventService)
 {
     _traceRepository = traceRepository ?? throw new ArgumentNullException(nameof(traceRepository));
     _trendAnalysisIntegrationEventService = trendAnalysisIntegrationEventService ?? throw new ArgumentNullException(nameof(trendAnalysisIntegrationEventService));
 }
Esempio n. 30
0
 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));
 }