Пример #1
0
        public RollbarLoggerBlockingWrapper(RollbarLogger asyncLogger, TimeSpan timeout)
        {
            Assumption.AssertNotNull(asyncLogger, nameof(asyncLogger));

            this._asyncLogger = asyncLogger;
            this._timeout     = timeout;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PayloadQueue"/> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="client">The client.</param>
        public PayloadQueue(RollbarLogger logger, RollbarClient client)
        {
            Assumption.AssertNotNull(logger, nameof(logger));
            Assumption.AssertNotNull(client, nameof(client));
            Assumption.AssertTrue(object.ReferenceEquals(logger.Config, client.Config), nameof(client.Config));

            this._syncLock   = new object();
            this._queue      = new Queue <PayloadBundle>();
            this._logger     = logger;
            this._client     = client;
            this._isReleased = false;
        }