private void CheckLocked() { if (this.isLocked) { throw new InvalidOperationException("You cannot alter the rewriter after Apply has been called"); } }