Class VirtualListControl.AddRangeController<TSource>
Implements controller for the add range operation which is performed in the background thread. It allows to continue work with the control while new items are added to it.
public class VirtualListControl.AddRangeController<TSource> : DisposableObject, IBaseObjectWithId, IDisposableObject, IDisposable, IBaseObject
Type Parameters
TSource
Type of the source item.
- Inheritance
-
VirtualListControl.AddRangeController<TSource>
- Implements
Constructors
- AddRangeController(VirtualListControl, Func<IEnumerable<TSource>>, Func<TSource, ListControlItem?>, Func<bool>)
Initializes a new instance of the VirtualListControl.AddRangeController<TSource> class with the specified parameters.
Fields
- BufferSize
Gets or sets size of the items buffer. Default is 10.
- ContinueFunc
Gets or sets the function which is called to check whether to continue the conversion. You can return False to stop the conversion. This function is called from the main thread so it can access UI elements.
- ConvertItemFunc
Gets or sets the function which is called to convert source items to the items which can be used in this control. If this function returns Null, source item is ignored. This function is called from the thread that provides source items so do not access UI elements from it.
- IsDebugInfoLogged
Gets or sets whether debug information is logged.
- ListBox
Gets or sets control on which add range operation is performed.
- Name
Gets or sets object name for the debug purposes.
- SleepAfterBufferMsec
Gets or sets the value in milliseconds to wait after buffer is converted and all buffered items were added to the control. Default is 150.
- SourceFunc
Gets or sets the function which provides the IEnumerable<T> instance which is "yield" constructed in the another thread.
Properties
- SafeName
Gets name of the object safely so it will always be not empty.
Methods
- DisposeManaged()
Override to dispose managed resources. Here we dispose all used object references.
- Start()
Starts controller add range operation.
- Stop()
Stops controller add range operation.