Class ComponentManager
Definition
- Namespace:
- Tizen.Applications.ComponentBased
- Assembly:
- Tizen.Applications.ComponentBased.ComponentManager.dll
This class has the methods and events of the ComponentManager.
public static class ComponentManager
- Inheritance
-
objectComponentManager
Methods
View SourceGetInstalledComponentsAsync()
Asynchronously retrieves a list of installed components.
Declaration
public static Task<IEnumerable<ComponentInfo>> GetInstalledComponentsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><ComponentInfo>> | A task that represents the asynchronous operation. The task result contains an System.Collections.Generic.IEnumerable<T> of the installed component information. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an invalid argument is provided. |
System.InvalidOperationException | Thrown when the component does not exist or if a system error occurs. |
System.OutOfMemoryException | Thrown when the system runs out of memory. |
System.UnauthorizedAccessException | Thrown when permission is denied to access the component information. |
GetRunningComponentsAsync()
Asynchronously retrieves a list of currently running components.
Declaration
public static Task<IEnumerable<ComponentRunningContext>> GetRunningComponentsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><ComponentRunningContext>> | A task that represents the asynchronous operation. The task result contains an System.Collections.Generic.IEnumerable<T> of the running components. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an invalid argument is provided. |
System.InvalidOperationException | Thrown when the component does not exist or if a system error occurs. |
System.OutOfMemoryException | Thrown when the system runs out of memory. |
System.UnauthorizedAccessException | Thrown when permission is denied to access the running components. |
IsRunning(string)
Checks if a specified component is currently running.
Declaration
public static bool IsRunning(string componentId)
Parameters
Type | Name | Description |
---|---|---|
string | componentId | The unique identifier of the component. |
Returns
Type | Description |
---|---|
bool | True if the component is running; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an invalid argument is provided. |
System.InvalidOperationException | Thrown when the component does not exist or if a system error occurs. |
System.OutOfMemoryException | Thrown when the system runs out of memory. |
System.UnauthorizedAccessException | Thrown when permission is denied to access the component status. |
TerminateBackgroundComponent(ComponentRunningContext)
Requests to terminate a specified component that is running in the background.
Declaration
public static void TerminateBackgroundComponent(ComponentRunningContext context)
Parameters
Type | Name | Description |
---|---|---|
ComponentRunningContext | context | The context of the running component to terminate. |
Remarks
This method sends a request to terminate a background component. The platform determines if the target component can be terminated based on its current state.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an invalid argument is provided. |
System.InvalidOperationException | Thrown when the component does not exist or if a system error occurs. |
System.OutOfMemoryException | Thrown when the system runs out of memory. |
System.UnauthorizedAccessException | Thrown when permission is denied to terminate the component. |