Example #1
0
    public void NotifyBaseCalled(string methodKey) {
      if (_pendingKeys.Count == 0) {
        throw new BeginNotCalledException(methodKey);
      }

      _pendingCalls.Push(methodKey);

      var pendingKey = _pendingKeys.Peek();
      if (pendingKey != methodKey) {
        var wrongBaseException = new WrongBaseCalledException(methodKey, pendingKey);
        throw wrongBaseException;
      }
    }
Example #2
0
        public void NotifyBaseCalled(string methodKey)
        {
            if (_pendingKeys.Count == 0)
            {
                throw new BeginNotCalledException(methodKey);
            }

            _pendingCalls.Push(methodKey);

            var pendingKey = _pendingKeys.Peek();

            if (pendingKey != methodKey)
            {
                var wrongBaseException = new WrongBaseCalledException(methodKey, pendingKey);
                throw wrongBaseException;
            }
        }