public PaymentsController(
     IPaymentManager paymentManager,
     IValidator <CreatePayment> createPaymentValidator,
     ITelemetrySubmitter telemetrySubmitter,
     ILogger <PaymentsController> logger)
 {
     _paymentManager         = paymentManager;
     _createPaymentValidator = createPaymentValidator;
     _telemetrySubmitter     = telemetrySubmitter;
     _logger = logger;
 }
Example #2
0
 public CreatePaymentManager(
     IPaymentRepository paymentRepository,
     IBankServiceClient bankServiceClient,
     ITelemetrySubmitter telemetrySubmitter,
     ILogger <CreatePaymentManager> logger)
 {
     _paymentRepository  = paymentRepository;
     _bankServiceClient  = bankServiceClient;
     _telemetrySubmitter = telemetrySubmitter;
     _logger             = logger;
 }
 /// <summary>
 /// Starts the timer
 /// </summary>
 /// <param name="telemetrySubmitter">The telemetry submitter.</param>
 /// <param name="message">The message.</param>
 public TimedOperation(ITelemetrySubmitter telemetrySubmitter, T message)
 {
     _telemetrySubmitter = telemetrySubmitter;
     _message            = message;
     _stopwatch          = Stopwatch.StartNew();
 }
Example #4
0
 public OrdersController(IOrderService orderService, ITelemetrySubmitter telemetrySubmitter)
 {
     _orderService       = orderService;
     _telemetrySubmitter = telemetrySubmitter;
 }
 /// <summary>
 /// Returns a new TimedOperation.
 /// </summary>
 /// <typeparam name="T">The type of telemetry message.</typeparam>
 /// <param name="submitter">The telemetry submitter.</param>
 /// <param name="message">The telemetry message.</param>
 /// <returns></returns>
 public static TimedOperation <T> BeginTimedOperation <T>(this ITelemetrySubmitter submitter, T message) where T : TimedOperationBase
 {
     return(new TimedOperation <T>(submitter, message));
 }