Example #1
0
 public QueryBus(
     IQueryLogger logger,
     IExceptionDialogService dialogService)
 {
     _logger        = logger;
     _dialogService = dialogService;
 }
        /// <summary>
        /// Adds an instance of <see cref="SentryCommandInterceptor"/> to <see cref="DbInterception"/>
        /// This is a static setup call, so make sure you only call it once for each <see cref="IQueryLogger"/> instance you want to register globally
        /// </summary>
        /// <param name="logger"></param>
        public static SentryCommandInterceptor UseBreadcrumbs(IQueryLogger logger = null)
        {
            logger = logger ?? new SentryQueryLogger();
            var interceptor = new SentryCommandInterceptor(logger);

            DbInterception.Add(interceptor);
            return(interceptor);
        }
 /// <summary>
 /// Creates a new instance of <see cref="SentryCommandInterceptor"/>.
 /// </summary>
 /// <param name="queryLogger"></param>
 public SentryCommandInterceptor(IQueryLogger queryLogger) => _queryLogger = queryLogger;
Example #4
0
 public HomeController(IQueryLogger queryLogger)
 {
     _queryLogger = queryLogger;
 }
Example #5
0
 public ExpensiveSqlLoggerInterceptor(IQueryLogger logger, int executionMillisecondThreshold, bool enableStackTrace = true)
 {
     _queryLogger = logger;
     _executionMillisecondThreshold = executionMillisecondThreshold;
     _includeStackTrace = enableStackTrace;
 }