OpenTAP 9.25
API Reference
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
OpenTap.Session Class Reference

A session represents a collection of data associated with running and configuring test plans: More...

Inherits IDisposable.

Public Member Functions

void Dispose ()
 Disposes the session.
 
void RunInSession (Action action)
 Synchronously runs the specified action in the context of the given session More...
 

Static Public Member Functions

static Session Create (SessionOptions options=SessionOptions.OverlayComponentSettings|SessionOptions.RedirectLogging, Guid? id=null)
 Creates a new session in the current TapThread context. The session lasts until the TapTread ends, or Dispose is called on the returned Session object. More...
 
static Session Create (SessionOptions options)
 Creates a new session in the current TapThread context. The session lasts until the TapTread ends, or Dispose is called on the returned Session object. More...
 
static void Start (Action action, SessionOptions options=SessionOptions.OverlayComponentSettings|SessionOptions.RedirectLogging)
 Creates a new session, and runs the specified action in the context of that session. When the acion completes, the session is Disposed automatically.
 

Public Attributes

readonly Session Parent
 The parent session of the current session. This marks the session that started it.
 

Static Public Attributes

static readonly Session RootSession
 The default/root session. This session is active when no other session is.
 

Properties

static Session Current [get]
 Gets the currently active session.
 
Guid Id [get]
 Gets the session ID for this session.
 
SessionOptions Options [get]
 Gets the flags used to create/start this session.
 

Detailed Description

A session represents a collection of data associated with running and configuring test plans:

Member Function Documentation

◆ Create() [1/2]

static Session OpenTap.Session.Create ( SessionOptions  options)
static

Creates a new session in the current TapThread context. The session lasts until the TapTread ends, or Dispose is called on the returned Session object.

Parameters
optionsFlags selected from the SessionOptions enum to customize the behavior of the session.
Returns
A disposable Session object.

◆ Create() [2/2]

static Session OpenTap.Session.Create ( SessionOptions  options = SessionOptions.OverlayComponentSettings | SessionOptions.RedirectLogging,
Guid?  id = null 
)
inlinestatic

Creates a new session in the current TapThread context. The session lasts until the TapTread ends, or Dispose is called on the returned Session object.

Parameters
optionsFlags selected from the SessionOptions enum to customize the behavior of the session.
idOption to specify the ID of the Session
Returns
A disposable Session object.

◆ RunInSession()

void OpenTap.Session.RunInSession ( Action  action)
inline

Synchronously runs the specified action in the context of the given session

Parameters
actionThe action to run.
Returns
The session in which the action is run

OpenTAP 9.25 API built Tue Aug 6 2024 07:49:24