Class DataLoader
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.UIGadget.dll
DataLoader performs tasks that the Gadget processes in parallel during the PreCreate state.
public abstract class DataLoader : IDisposable
- Inheritance
-
objectDataLoader
Constructors
View SourceDataLoader(string, bool)
Initializes the DataLoader.
Declaration
public DataLoader(string name, bool autoClose)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Unique identifier for the loader instance |
| bool | autoClose | Whether to automatically close the loader after execution |
Properties
View SourceAutoClose
Gets the AutoClose
Declaration
public bool AutoClose { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
This property is a variable as to whether to automatically make DataLoader Destroy after execution
Name
The name of the loader
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This property is the name(identifier)
of the worker thread on which
DataLoader operates.
State
Gets the current lifecycle state of DataLoader
Declaration
public DataLoaderLifecycleState State { get; }
Property Value
| Type | Description |
|---|---|
| DataLoaderLifecycleState |
Methods
View SourceDispose()
Releases all resources used by the DataLoader class.
Declaration
public void Dispose()
Dispose(bool)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | if true, dispose any disposable objets. If false, does not dispose disposable objects |
~DataLoader()
Finalizer of the DataLoader class.
Declaration
protected ~DataLoader()
OnCreate()
Override this method to define the behavior when the DataLoader is created. Calling 'base.OnCreate()' is necessary in order to emit the 'DataLoaderLifecycleState.Created` state
Declaration
protected virtual void OnCreate()
OnDestroy()
Override this method to define the behavior when the DataLoader is destroyed. Calling 'base.OnDestroy()' is necessary in order to emit the 'DataLoaderLifecycleState.Destroyed` state
Declaration
protected virtual void OnDestroy()
Quit(bool)
Stops the DataLoader execution and releases resources.
Declaration
public void Quit(bool waitForJoin)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | waitForJoin | Whether to wait for complete service termination |
Run()
Starts the DataLoader execution on a worker thread. Initializes the loader task and triggers the OnCreate event. If AutoClose is enabled, automatically destroys the loader after execution.
Declaration
public void Run()