Class Lifecycle
- Namespace
- Antithesis.SDK
- Assembly
- Antithesis.SDK.dll
The Lifecycle class contains methods used to inform Antithesis that particular test phases or milestones have been reached.
public static class Lifecycle
- Inheritance
-
Lifecycle
- Inherited Members
Properties
IsAntithesis
Determines if this code is executing within Antithesis according to the existence of an Antithesis environment variable as documented on our website.
public static bool IsAntithesis { get; }
Property Value
Methods
SendEvent(string?, JsonObject?)
Indicates to Antithesis that a certain event has been reached. It sends a structured log message to Antithesis that you may later use to aid debugging.
public static void SendEvent(string? name, JsonObject? details = null)
Parameters
name
stringThe name of the event being logged.
details
JsonObjectOptional additional details to provide greater context for this event. Evaluated at runtime.
SetupComplete(JsonObject?)
Indicates to Antithesis that setup has completed. Call this method when your system and workload are fully initialized. After this method is called, Antithesis will take a snapshot of your system and begin injecting faults. Calling this method multiple times or from multiple processes will have no effect. Antithesis will treat the first time any process called this method as the moment that the setup was completed.
public static void SetupComplete(JsonObject? details = null)
Parameters
details
JsonObjectOptional additional details to provide greater context for this event. Evaluated at runtime.