Table of Contents

Class StopSource

Namespace
Hi.Native
Assembly
HiDisp.dll

Represents a source that can be used to create and control stop tokens.

public class StopSource : IDisposable
Inheritance
StopSource
Implements
Inherited Members
Extension Methods

Constructors

StopSource()

Initializes a new instance of the StopSource class.

public StopSource()

Properties

StopSourcePtr

Gets the pointer to the native stop source.

public nint StopSourcePtr { get; }

Property Value

nint

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~StopSource()

Finalizer for the StopSource class.

protected ~StopSource()

GetStopToken()

Gets a stop token from this source.

public StopToken GetStopToken()

Returns

StopToken

A new StopToken instance.

IsStopPossible()

Checks if stopping is possible for this source.

public bool IsStopPossible()

Returns

bool

True if stopping is possible; otherwise, false.

IsStopRequested()

Checks if stopping has been requested for this source.

public bool IsStopRequested()

Returns

bool

True if stopping has been requested; otherwise, false.

RequestStop()

Requests stopping of operations associated with this source.

public bool RequestStop()

Returns

bool

True if the stop request was successful; otherwise, false.