protected void CheckNodeManagerState() { if (!NodeManager.HasLock()) { throw new InvalidOperationException("This method calls methods on the NodeManager which means the lock on the NodeManager must be acquired first."); } }