Currently, if MultiWindowLiveInspector.Close() is called, the instance of MultiWindowLiveInspector is left in an invalid state. We should refactor MultiWindowLiveInspector to always be in a valid state. Binding the lifetime of MultiWindowLiveInspector to the state of the windows doesn't seem to work well, so we probably want to support MultiWindowLiveInspector being in an uninitialized state (before Show is called or after Closed is called). For example we could move initialization of MultiWindowLiveInspector to its Show method and cleanup when its Close method is called.
Expected behavior:
Before Show is called, MultiWindowLiveInspector does nothing, no windows are shown.
Calling Show for the first time initializes services and shows all windows.
Calling Show after Show was called (without calling Close) is a no-op.
Calling Close after Show was called closes all windows and cleans up any subscriptions (mainly to global input).
Calling Close before Show is called or after Close was already called is a no-op.
Currently, if MultiWindowLiveInspector.Close() is called, the instance of MultiWindowLiveInspector is left in an invalid state. We should refactor MultiWindowLiveInspector to always be in a valid state. Binding the lifetime of MultiWindowLiveInspector to the state of the windows doesn't seem to work well, so we probably want to support MultiWindowLiveInspector being in an uninitialized state (before Show is called or after Closed is called). For example we could move initialization of MultiWindowLiveInspector to its Show method and cleanup when its Close method is called.
Expected behavior: