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; } }