Back to Devexpress

XPObjectSource.DismissSession Event

xpo-devexpress-dot-xpo-dot-xpobjectsource-582f6b39.md

latest3.2 KB
Original Source

XPObjectSource.DismissSession Event

Occurs when the XPObjectSource no longer needs the Session it used to retrieve objects from the data store.

Namespace : DevExpress.Xpo

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
public event EventHandler<ResolveSessionEventArgs> DismissSession
vb
Public Event DismissSession As EventHandler(Of ResolveSessionEventArgs)

Event Data

The DismissSession event's data class is ResolveSessionEventArgs. The following properties provide information specific to this event:

PropertyDescription
SessionSpecifies the session to be used to load and save persistent objects.

Remarks

Handle this event to dispose of the Session manually created in the XPObjectSource.ResolveSession event handler. You can also access the object you have assigned to the XPObjectSource.Tag field in the XPObjectSource.ResolveSession event handler. If you did not handle the ResolveSession event, there is generally no need to handle the DismissSession event.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DismissSession event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-reporting-create-report-bound-to-xpobjectsource/CS/Form1.cs#L74

csharp
dataSource.ResolveSession += new EventHandler<ResolveSessionEventArgs>(OnResolveSession);
dataSource.DismissSession += new EventHandler<ResolveSessionEventArgs>(OnDismissSession);

winforms-reporting-create-report-bound-to-xpobjectsource/VB/Form1.vb#L73

vb
AddHandler dataSource.ResolveSession, AddressOf OnResolveSession
AddHandler dataSource.DismissSession, AddressOf OnDismissSession

See Also

XPObjectSource Class

XPObjectSource Members

DevExpress.Xpo Namespace