Table of Contents

Method Activate

Namespace
QueryGuard
Assembly
QueryGuard.Core.dll

Activate(QueryGuardSession)

Makes session current for the calling flow and everything it awaits.

IQueryGuardSessionActivation Activate(QueryGuardSession session)

Parameters

session QueryGuardSession

The session to activate.

Returns

IQueryGuardSessionActivation

A handle that restores the previously current session when disposed. Disposing it is mandatory; the previous session is not restored otherwise.

Remarks

Nesting is supported. Disposal restores the parent session rather than clearing the accessor, and it must do so on the exception path too: a scope that only unwinds cleanly on success corrupts every measurement taken after the first failing test.