Table of Contents

Class CancellationTokenRegistry

Namespace
Ando.Server.BuildExecution
Assembly
Ando.Server.dll

Thread-safe registry for build cancellation tokens.

public class CancellationTokenRegistry
Inheritance
CancellationTokenRegistry
Inherited Members

Methods

IsRunning(int)

Checks if a build is currently registered (running).

public bool IsRunning(int buildId)

Parameters

buildId int

Returns

bool

Register(int, CancellationTokenSource)

Registers a cancellation token source for a build.

public void Register(int buildId, CancellationTokenSource cts)

Parameters

buildId int

The build ID.

cts CancellationTokenSource

The cancellation token source.

TryCancel(int)

Attempts to cancel a build.

public bool TryCancel(int buildId)

Parameters

buildId int

The build ID to cancel.

Returns

bool

True if the build was found and cancellation was requested.

Unregister(int)

Unregisters a cancellation token source when a build completes.

public void Unregister(int buildId)

Parameters

buildId int

The build ID.