anchor.diff:    do IdeApp.Exited.Add  (fun _ -> Debug.WriteLine ("Interactive: app exited!!"))
     #endif
   
  -  let ensureCorrectDirectory() =
  -    if IdeApp.Workbench.ActiveDocument.FileName.FileName <> null then
  -      let path = Path.GetDirectoryName(IdeApp.Workbench.ActiveDocument.FileName.ToString())
  -      sendCommand ("#silentCd @\"" + path + "\";;")
  -
     member x.Shutdown()  = 
       do Debug.WriteLine (sprintf "Interactive: x.Shutdown()!")
       resetFsi Kill
  
positive.code:       elif killIntent = Restart then 
          DispatchService.GuiDispatch view.Clear
        killIntent <- NoIntent)
  
      ses.StartReceiving()
      ses
      
    let session = ref (Some(setupSession()))
  
negative.code:       view.Child.KeyPressEvent.Add(fun ea ->
          if ea.Event.State &&& ModifierType.ControlMask = ModifierType.ControlMask && ea.Event.Key = Key.period then
            !session |> Option.iter (fun s -> s.Interrupt()))
        activeDoc <- IdeApp.Workbench.ActiveDocumentChanged.Subscribe ensureCorrectDirectory |> Some
  
        x.UpdateFont()   
  
  