Exemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public BusyGuard
        (
            [NotNull] BusyState state
        )
        {
            Sure.NotNull(state, "state");

            _state   = state;
            _timeout = TimeSpan.Zero;

            _Grab();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public BusyGuard
        (
            [NotNull] BusyState state,
            TimeSpan timeout
        )
        {
            Sure.NotNull(state, nameof(state));

            _state   = state;
            _timeout = timeout;

            _Grab();
        }