private void EnsureAttachedToProcess() { if(this.currentProcess == null) { throw new InvalidOperationException("Not attached to any process right now."); } } }