public GetCodeFragment ( int contextLines ) : List |
||
contextLines | int | |
리턴 | List |
private void PushContext(ProgramContext context) { SafeHouse.Logger.Log("Pushing context staring with: " + context.GetCodeFragment(0).FirstOrDefault()); SaveAndClearPointers(); contexts.Add(context); currentContext = contexts.Last(); if (contexts.Count > 1) { shared.Interpreter.SetInputLock(true); } }
private void PopContext() { SafeHouse.Logger.Log("Popping context " + contexts.Count); if (contexts.Any()) { // remove the last context ProgramContext contextRemove = contexts.Last(); contexts.Remove(contextRemove); contextRemove.DisableActiveFlyByWire(shared.BindingMgr); SafeHouse.Logger.Log("Removed Context " + contextRemove.GetCodeFragment(0).FirstOrDefault()); if (contexts.Any()) { currentContext = contexts.Last(); currentContext.EnableActiveFlyByWire(shared.BindingMgr); RestorePointers(); SafeHouse.Logger.Log("New current context " + currentContext.GetCodeFragment(0).FirstOrDefault()); } else { currentContext = null; } if (contexts.Count == 1) { shared.Interpreter.SetInputLock(false); } } }