Class BaseComponent
Definition
- Namespace:
- Tizen.Applications.ComponentBased.Common
- Assembly:
- Tizen.Applications.ComponentBased.dll
Represents the base class for components, providing common functionalities for both FrameComponent and ServiceComponent.
C#Copypublic abstract class BaseComponent
- Inheritance
-
objectBaseComponent
- Derived
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Properties
Declaration
C#Copypublic string ComponentId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Id
Gets the unique instance ID of the component. It will be created after OnCreate method is invoked.
Declaration
C#Copypublic string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic ComponentBasedApplication Parent { get; }
Property Value
| Type | Description |
|---|---|
| ComponentBasedApplication |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Methods
Declaration
C#Copypublic void Finish()
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
OnRestoreContents(Bundle)
Override this method to handle restoring the previous state of the component.
Declaration
C#Copypublic virtual void OnRestoreContents(Bundle c)
Parameters
| Type | Name | Description |
|---|---|---|
| Bundle | c | A bundle containing the saved state of the component. It can only be used within the callback. To use it outside, create a copy. |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
OnSaveContent(Bundle)
Override this method to handle saving the current state of the component.
Declaration
C#Copypublic virtual void OnSaveContent(Bundle c)
Parameters
| Type | Name | Description |
|---|---|---|
| Bundle | c | A bundle containing the current state of the component. It can only be used within the callback. To use it outside, create a copy. |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
SendLaunchRequestAsync(AppControl, AppControlReplyCallback)
Sends a launch request asynchronously.
Declaration
C#Copypublic Task<AppControlResult> SendLaunchRequestAsync(AppControl control, AppControlReplyCallback replyAfterLaunching)
Parameters
| Type | Name | Description |
|---|---|---|
| AppControl | control | The AppControl object representing the request details. |
| AppControlReplyCallback | replyAfterLaunching | The callback function to be invoked when the reply is received. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><AppControlResult> | A task representing the result of the launch request. |
Remarks
Use this method to send a launch request with group mode enabled. If group mode is not required, you can use SendLaunchRequestAsync() instead.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when failed because of the argument is invalid. |
| System.InvalidOperationException | Thrown when there is a failure in setting the component information in the AppControl. |
| AppNotFoundException | Thrown when the target application is not found. |
| LaunchRejectedException | Thrown when the launch request is rejected. |
Events
Declaration
C#Copypublic event EventHandler<DeviceOrientationEventArgs> DeviceOrientationChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><DeviceOrientationEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<LocaleChangedEventArgs> LocaleChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><LocaleChangedEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<LowBatteryEventArgs> LowBattery
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><LowBatteryEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<LowMemoryEventArgs> LowMemory
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><LowMemoryEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<RegionFormatChangedEventArgs> RegionFormatChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><RegionFormatChangedEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<SuspendedStateEventArgs> SuspendedStateChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><SuspendedStateEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.
Declaration
C#Copypublic event EventHandler<TimeZoneChangedEventArgs> TimeZoneChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<TEventArgs><TimeZoneChangedEventArgs> |
Remarks
This class cannot be registered directly by ComponentBased applications. It serves as a base class to be inherited by other components.