Skip to content

Commit

Permalink
Added IScenarioContext.ScenarioCancellationToken
Browse files Browse the repository at this point in the history
  • Loading branch information
AntyaDev committed Jun 20, 2024
1 parent d2ce416 commit 1140785
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/NBomber.Contracts/Contracts.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ open System
open System.Collections.Generic
open System.Data
open System.Runtime.CompilerServices
open System.Threading
open System.Threading.Tasks
open Serilog
open Microsoft.Extensions.Configuration
Expand Down Expand Up @@ -99,6 +100,11 @@ type IScenarioContext =
abstract InvocationNumber: int64
abstract Data: Dictionary<string,obj>
abstract ScenarioInstanceData: Dictionary<string,obj>

/// Scenario Cancellation Token - indicates that scenario execution is finished or cancelled.
/// You can listen on changes via CancellationToken.IsCancellationRequested.
abstract ScenarioCancellationToken: CancellationToken

abstract Random: Random
abstract StopScenario: scenarioName:string * reason:string -> unit
abstract StopCurrentTest: reason:string -> unit
Expand Down

0 comments on commit 1140785

Please sign in to comment.