Loupe - Log - Monitor - Resolve
Loupe / Developer's Guide / Extending Loupe Server / Loupe Extensions - Session Views
In This Topic
    Loupe Extensions - Session Views
    In This Topic

    You can create custom user interface views that each get their own tab in the session viewer.  With this extension you can create your own custom displays of the data within your sessions yet have them seamlessly integrate into the Session Viewer.

    Once you've created your view, you can access it by clicking on the New View tab:

    Selection Header

    And then selecting your view from the list of additional views.  Note that the caption and description you assigned with the SessionViewAddIn attribute is used to describe to the user

    New Session View Dialog

    New Session View Dialog

    What You Need to Implement

    To create a Session View, you need to create a UserControl that:

    For more information on how classes are evaluated and loaded see Loupe Extensions - Deploying Extensions.

    Extension Lifecycle

    1. When the user selects your Extension view from the list a new instance of the user control. 
    2. The Initialize method will be called to provide the Session Context which provides access to all of the state needed for the display.
    3. Once initialization is complete the control is added to a new tab and displayed.
    4. If the session data is ever updated the RefreshData method will be called. The session itself will never change.
    5. When the tab is being requested to close by the end user the Close method will be called.  The control may chose to cancel the close, however in some cases the view may close anyway (such as when the session viewer is closing or the application is exiting) 

    Notes and Best Practices

    Many Copies

    A different copy of your session view is created whenever a user asks to create a new view.  This means an indefinite number of your view may be created at the same time.  If you need to coordinate data between multiple instances of your view use your Session Controller.

    Caching Information

    If it's useful to cache information to improve performance the best place to do this is in your Session Controller (for session-specific items) and Repository Controller (for repository items).  This allows the cache to be shared between all of the classes that make up your extension. 

     

    See Also