Remove a Session Object.
Newlook Smartclient only.
Introduced in Version 11.1 for Smartclient.
Sessions.Remove(name)
name - (String, Required)
Name of the session to remove.
This method is useful if you have no further use for a session and you wish to remove it altogether.
If you attempt to remove a session which does not exist, a runtime error will be generated.
Newlook must always have at least one session running. For this reason, each time Newlook* starts, a new session is automatically created and any 'startup' logic present in the solution is automatically executed. This session, which can be returned by the Sessions.StartupSession property, cannot be removed at runtime and remains running until Newlook is shutdown.
*Newlook, in this context, can mean Smartclient, the Smartframe Newlook control, the embedded Newlook control, or the Newlook Developer runtime client.
Additional sessions that are created using the Add method, can be destroyed using the Remove method.
If the session you are closing has an active connection, you will need to handle the sign off and disconnection process, if required, before removing the session.
// Remove the session titled 'Session1'.
Sessions.Remove("Session1");
This method returns a boolean indicating whether the removal was successful or not.
Sessions Collection | Working with sessions | Session Object | ActiveSession Property | StartupSession Property | Add Method - Sessions | SetActiveSession Method
© 2004-2021 looksoftware. All rights reserved.