Skip to content

TextStudioReactionBodyEventSession

StructTextStudioTextStudio
public readonly struct TextStudioReactionBodyEventSession

Session token for observing events from one released semantic body without consuming them.

TextStudioReactionBodyEventSession(ITextStudioReactionBodyEventSource, int, ulong)

Section titled “TextStudioReactionBodyEventSession(ITextStudioReactionBodyEventSource, int, ulong)”
public TextStudioReactionBodyEventSession(ITextStudioReactionBodyEventSource source, int bodyIndex, ulong sessionId)

Creates a session token for one body index and session identifier supplied by an event source.

Parameters

Name Type
source TextStudio.ITextStudioReactionBodyEventSource
bodyIndex System.Int32
sessionId System.UInt64

TryGetEvents(out TextStudioReactionActionEvents)

Section titled “TryGetEvents(out TextStudioReactionActionEvents)”
public bool TryGetEvents(out TextStudioReactionActionEvents events)

Reads this session’s non-consuming body events, or returns false when the session is invalid.

Parameters

Name Type
events TextStudio.TextStudioReactionActionEvents

Returns

System.Boolean

public void Release()

Ends this body-event session through its source when the session is valid.

public bool IsValid { get; }

Returns

System.Boolean