Table of Contents

Class StackManager<TFrame>

Namespace
RDCore.SDK.Runtime.Shared
Assembly
RDCore.SDK.dll

A base service class for managing a stack of frames.

public abstract class StackManager<TFrame> where TFrame : IStackFrame, IEquatable<TFrame>

Type Parameters

TFrame

The type of IStackFrame managed frames being stacked.

Inheritance
StackManager<TFrame>
Derived
Inherited Members

Properties

Depth

Gets the current managed stack depth.

public int Depth { get; }

Property Value

int

Methods

Clear()

Clears the managed stack.

public void Clear()

OnBeforeTryPop()

🧩 override this method in a derived class to intercept and abort a frame pop.

protected virtual bool OnBeforeTryPop()

Returns

bool

true if the pop can proceed, false if it's aborted.

OnBeforeTryPush(TFrame)

🧩 override this method in a derived class to intercept and abort a frame push.

protected virtual bool OnBeforeTryPush(TFrame frame)

Parameters

frame TFrame

The stack frame to be pushed.

Returns

bool

true if the push can proceed, false if it's aborted.

OnFramePopped(TFrame?)

🧩 override this method in a derived class to inject behavior whenever a frame is successfully popped from the managed stack.

protected virtual void OnFramePopped(TFrame? frame)

Parameters

frame TFrame

The stack frame that was popped.

OnPushed(TFrame)

🧩 override this method in a derived class to inject behavior whenever a frame has been pushed onto the managed stack.

protected virtual void OnPushed(TFrame frame)

Parameters

frame TFrame

The stack frame that was pushed.

OnStackCleared()

🧩 override this method to clean up any instance state in a derived class when the managed stack is cleared..

protected virtual void OnStackCleared()

TryPop(out TFrame?)

Pops the top-most frame from the managed stack.

public bool TryPop(out TFrame? frame)

Parameters

frame TFrame

The retrieved stack frame, if successful.

Returns

bool

true if the frame was successfully popped, false otherwise.

TryPush(TFrame)

Pushes the specified frame to the managed stack.

public bool TryPush(TFrame frame)

Parameters

frame TFrame

The stack frame to be pushed.

Returns

bool

true if the frame was successfully pushed, false otherwise.