public WpfClientSessionViewControllers(
     WpfMessageViewDelegate messageViewDelegate,
     WpfDialogMessageViewDelegate dialogMessageViewDelegate)
 {
     // Set up history. Don't provide any initial seed, History will load the saved history on its
     // own if the persist flag is true.
     ReplHistory     = new History(history: null, persist: Prefs.Repl.SaveHistory.GetValue());
     Messages        = new MessageViewController(messageViewDelegate, dialogMessageViewDelegate);
     WorkbookTargets = new WorkbookTargetsViewController();
     PreferenceStore.Default.Subscribe(ObservePreferenceChange);
 }
        AgentSessionWindow(ClientSessionUri clientSessionUri)
        {
            MessageViewDelegate       = new WpfMessageViewDelegate(this);
            DialogMessageViewDelegate = new WpfDialogMessageViewDelegate(this);

            Session = new ClientSession(clientSessionUri);
            Session.InitializeViewControllers(
                new WpfClientSessionViewControllers(MessageViewDelegate, DialogMessageViewDelegate));

            SessionController.AddSession(Session, this);

            InitializeComponent();
            DataContext = this;
            ViewModel   = new ViewInspectorViewModel <AgentSessionWindow> (Session, this);
            menuManager = new MenuManager(mainMenu, this, Session.SessionKind != ClientSessionKind.LiveInspection);

            replWebView.Loaded        += HandleWebViewControlLoaded;
            replWebView.LoadCompleted += HandleWebViewSourceLoadCompleted;

            propertyEditor.EditorProvider = new InteractiveEditorProvider(Session, new WpfPropertyViewHelper());
        }