Class TextDeltaThrottler
들쑥날쑥 들어오는 텍스트 조각을 내부 버퍼에 모아 고정 주기(기본 30Hz)로 합쳐 내보내는 스로틀러.
public sealed class TextDeltaThrottler
- Inheritance
-
objectTextDeltaThrottler
Constructors
TextDeltaThrottler(int)
public TextDeltaThrottler(int hz = 30)
Parameters
hzint방출 빈도(Hz). 10~240 권장. 기본 30.
Methods
Complete()
Call this when you are done enqueuing text to ensure all buffered text is processed and the throttler stops.
public void Complete()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Enqueue(string)
Call this to enqueue a new text chunk to be buffered and emitted later.
public void Enqueue(string delta)
Parameters
deltastring
FlushNow()
Call this to immediately flush the current buffer and emit its contents.
public void FlushNow()
SetRate(int)
동작 중 주파수 변경.
public void SetRate(int hz)
Parameters
hzint
Events
OnDequeue
주기마다 방출되는 텍스트 덩어리(증분 누적 아님).
public event Action<string> OnDequeue
Event Type
- Action<string>