Table of Contents

Class ProgressStatePS

Namespace
SunamoPS._public.SunamoInterfaces.Interfaces
Assembly
SunamoPS.dll

Tracks progress state for batch operations with event-based notifications.

public class ProgressStatePS
Inheritance
ProgressStatePS
Inherited Members
Extension Methods

Properties

Count

Gets or sets the current item count.

public int Count { get; set; }

Property Value

int

IsRegistered

Gets or sets whether this progress state has registered event handlers.

public bool IsRegistered { get; set; }

Property Value

bool

Methods

Init(Action<int>, Action<int>, Action)

Initializes the progress state with event handlers.

public void Init(Action<int> overallItems, Action<int> anotherItem, Action writeProgressBarEnd)

Parameters

overallItems Action<int>

Handler called with total item count.

anotherItem Action<int>

Handler called when another item is processed.

writeProgressBarEnd Action

Handler called when progress bar should end.

OnAnotherItem()

Increments count and raises the AnotherItem event.

public void OnAnotherItem()

OnAnotherItem(int)

Raises the AnotherItem event with the specified count.

public void OnAnotherItem(int count)

Parameters

count int

Current item count.

OnOverallItems(int)

Resets the count and raises the OverallItems event.

public void OnOverallItems(int totalCount)

Parameters

totalCount int

Total number of items to process.

OnWriteProgressBarEnd()

Raises the WriteProgressBarEnd event.

public void OnWriteProgressBarEnd()

Events

AnotherItem

Event raised when another item is processed.

public event Action<int>? AnotherItem

Event Type

Action<int>

OverallItems

Event raised to set the total number of items.

public event Action<int>? OverallItems

Event Type

Action<int>

WriteProgressBarEnd

Event raised when the progress bar should be closed.

public event Action? WriteProgressBarEnd

Event Type

Action