namespace Tizen.Applications.ComponentBased
{
/// <summary>
- /// This class provides methods and properties to get information of the component.
+ /// Provides methods and properties to retrieve information about a component in a Tizen application.
+ /// This class encapsulates details such as component ID, application ID, and other attributes.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public class ComponentInfo : IDisposable
}
/// <summary>
- /// A constructor of ComponentInfo that takes the component ID.
+ /// Initializes a new instance of the <see cref="ComponentInfo"/> class with the specified component ID.
/// </summary>
- /// <param name="componentId">Component ID.</param>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>>
+ /// <param name="componentId">The ID of the component.</param>
+ /// <exception cref="ArgumentException">Thrown when the component ID is invalid.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when memory allocation fails.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
/// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
/// <since_tizen> 6 </since_tizen>
public ComponentInfo(string componentId)
}
/// <summary>
- /// Destructor of the class.
+ /// Finalizes an instance of the <see cref="ComponentInfo"/> class.
/// </summary>
~ComponentInfo()
{
}
/// <summary>
- /// Gets the component ID.
+ /// Gets the ID of the component.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public string ComponentId
}
/// <summary>
- /// Gets the application ID of the component.
+ /// Gets the application ID associated with the component.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public string ApplicationId
}
/// <summary>
- /// Checks whether the icon of the component should be displayed or not.
+ /// Checks whether the icon of the component should be displayed.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public bool IsIconDisplayed
}
/// <summary>
- /// Checks whether the component should be managed by task-manager or not.
+ /// Checks whether the component is managed by the task manager.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public bool IsManagedByTaskManager
}
/// <summary>
- /// Gets the absolute path of the icon image.
+ /// Gets the absolute path of the component's icon image.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public string IconPath
}
/// <summary>
- /// Gets the localized label of the component for the given locale.
+ /// Gets the localized label of the component for a specified locale.
/// </summary>
- /// <param name="locale">Locale.</param>
- /// <remarks>The format of locale is language and country code. (available value: "[2-letter lowercase language code (ISO 639-1)]-[2-letter lowercase country code (ISO 3166-alpha-2)]")</remarks>
- /// <returns>The localized label.</returns>
+ /// <param name="locale">The locale in the format of language and country code (e.g., "en-US").</param>
+ /// <remarks>Available values are in the format "[2-letter lowercase language code (ISO 639-1)]-[2-letter lowercase country code (ISO 3166-alpha-2)]".</remarks>
+ /// <returns>The localized label corresponding to the specified locale.</returns>
/// <since_tizen> 6 </since_tizen>
public string GetLocalizedLabel(string locale)
{
}
/// <summary>
- /// Releases all resources used by the ComponentInfo class.
+ /// Releases all resources used by the <see cref="ComponentInfo"/> class.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public void Dispose()
}
/// <summary>
- /// Releases all resources used by the ComponentInfo class.
+ /// Releases resources used by the <see cref="ComponentInfo"/> class.
/// </summary>
/// <param name="disposing">Disposing</param>
/// <since_tizen> 6 </since_tizen>
public static class ComponentManager
{
private const string LogTag = "Tizen.Applications";
-
+
/// <summary>
- /// Gets the information of the installed components asynchronously.
+ /// Asynchronously retrieves a list of installed components.
/// </summary>
- /// <returns>The installed component info list.</returns>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the "component not exist" error or the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <returns>
+ /// A task that represents the asynchronous operation.
+ /// The task result contains an <see cref="IEnumerable{ComponentInfo}"/> of the installed component information.
+ /// </returns>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is provided.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the component does not exist or if a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when the system runs out of memory.</exception>
+ /// <exception cref="UnauthorizedAccessException"> Thrown when permission is denied to access the component information.</exception>
/// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
/// <since_tizen> 6 </since_tizen>
public static async Task<IEnumerable<ComponentInfo>> GetInstalledComponentsAsync()
}
/// <summary>
- /// Gets the information of the running components asynchronously.
+ /// Asynchronously retrieves a list of currently running components.
/// </summary>
- /// <returns>The component running context list.</returns>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the "component not exist" error or the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <returns>
+ /// A task that represents the asynchronous operation.
+ /// The task result contains an <see cref="IEnumerable{ComponentRunningContext}"/> of the running components.
+ /// </returns>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is provided.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the component does not exist or if a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when the system runs out of memory.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to access the running components.</exception>
/// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
/// <since_tizen> 6 </since_tizen>
public static async Task<IEnumerable<ComponentRunningContext>> GetRunningComponentsAsync()
}
/// <summary>
- /// Checks whether the component is running or not.
+ /// Checks if a specified component is currently running.
/// </summary>
- /// <param name="componentId">Component ID.</param>
- /// <returns>Returns true if the component is running, otherwise false.</returns>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the "component not exist" error or the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <param name="componentId">The unique identifier of the component.</param>
+ /// <returns>
+ /// True if the component is running; otherwise, false.
+ /// </returns>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is provided.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the component does not exist or if a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when the system runs out of memory.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to access the component status.</exception>
/// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
/// <since_tizen> 6 </since_tizen>
public static bool IsRunning(string componentId)
}
/// <summary>
- /// Terminates the component if it is running in the background.
+ /// Requests to terminate a specified component that is running in the background.
/// </summary>
- /// <param name="context">Component ID</param>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the "component not exist" error or the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <param name="context">The context of the running component to terminate.</param>
+ /// <exception cref="ArgumentException">Thrown when an invalid argument is provided.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the component does not exist or if a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when the system runs out of memory.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to terminate the component.</exception>
/// <privilege>http://tizen.org/privilege/appmanager.kill.bgapp</privilege>
/// <remarks>
- /// This function returns after it just sends a request for terminating a background component.
- /// Platform will decide if the target component could be terminated or not according to the state of the target component.
+ /// 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.
/// </remarks>
/// <since_tizen> 6 </since_tizen>
public static void TerminateBackgroundComponent(ComponentRunningContext context)
namespace Tizen.Applications.ComponentBased
{
/// <summary>
- /// This class provides methods and properties to get information of the running component.
+ /// Represents the context of a running component, providing methods and properties
+ /// to retrieve information about the component's state and behavior.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public class ComponentRunningContext : IDisposable
}
/// <summary>
- /// A constructor of ComponentRunningContext that takes the component ID.
+ /// Initializes a new instance of the <see cref="ComponentRunningContext"/> class
+ /// with a specified component ID, retrieving the context handle associated with it.
/// </summary>
- /// <param name="componentId">Component ID.</param>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the "component not exist" error or the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <param name="componentId">The ID of the component.</param>
+ /// <exception cref="ArgumentException">Thrown when the component ID is invalid.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the component does not exist or a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when memory allocation fails.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to access the component.</exception>
/// <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
/// <since_tizen> 6 </since_tizen>
public ComponentRunningContext(string componentId)
}
/// <summary>
- /// Destructor of the class.
+ /// Finalizes an instance of the <see cref="ComponentRunningContext"/> class.
/// </summary>
~ComponentRunningContext()
{
}
/// <summary>
- /// Enumeration for the component state.
+ /// Represents the possible states of a component.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public enum ComponentState
/// <summary>
/// Gets the ID of the component.
/// </summary>
+ /// <returns>The component ID as a string.</returns>
/// <since_tizen> 6 </since_tizen>
public string ComponentId
{
}
/// <summary>
- /// Gets the application ID of the component.
+ /// Gets the application ID associated with the component.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public string ApplicationId
return appId;
}
}
-
+
/// <summary>
/// Gets the instance ID of the component.
/// </summary>
}
/// <summary>
- /// Gets the state of the component.
+ /// Gets the current state of the component.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public ComponentState State
}
/// <summary>
- /// Checks whether the component is terminated or not.
+ /// Checks whether the component has been terminated.
/// </summary>
+ /// <returns><c>true</c> if the component is terminated; otherwise, <c>false</c>.</returns>
/// <since_tizen> 6 </since_tizen>
public bool IsTerminated
{
}
/// <summary>
- /// Checks whether the component is running as sub component of the group.
+ /// Checks whether the component is running as a sub-component of a group.
/// </summary>
+ /// <returns><c>true</c> if the component is a sub-component; otherwise, <c>false</c>.</returns>
/// <since_tizen> 6 </since_tizen>
public bool IsSubComponent
{
}
/// <summary>
- /// Resumes the running component.
+ /// Resumes the execution of the running component.
/// </summary>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <exception cref="ArgumentException">Thrown when the argument is invalid.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when memory allocation fails.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to resume the component.</exception>
/// <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
/// <since_tizen> 6 </since_tizen>
public void Resume()
Interop.ComponentManager.ErrorCode err = Interop.ComponentManager.ComponentManagerResumeComponent(_contextHandle);
if (err != Interop.ComponentManager.ErrorCode.None)
{
- throw ComponentManager.ComponentManagerErrorFactory.GetException(err, "Failed to Send the resume request.");
+ throw ComponentManager.ComponentManagerErrorFactory.GetException(err, "Failed to send the resume request.");
}
}
/// <summary>
- /// Pauses the running component.
+ /// Pauses the execution of the running component.
/// </summary>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <exception cref="ArgumentException">Thrown when the argument is invalid.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when memory allocation fails.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to pause the component.</exception>
/// <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
/// <since_tizen> 6 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
}
/// <summary>
- /// Terminates the running component.
+ /// Terminates the execution of the running component.
/// </summary>
- /// <exception cref="ArgumentException">Thrown when failed because of an invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of the system error.</exception>
- /// <exception cref="OutOfMemoryException">Thrown when failed because of out of memory.</exception>
- /// <exception cref="UnauthorizedAccessException">Thrown when failed because of permission denied.</exception>
+ /// <exception cref="ArgumentException">Thrown when the argument is invalid.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when a system error occurs.</exception>
+ /// <exception cref="OutOfMemoryException">Thrown when memory allocation fails.</exception>
+ /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied to terminate the component.</exception>
/// <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
/// <since_tizen> 6 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
}
/// <summary>
- /// Releases all resources used by the ComponentInfo class.
+ /// Releases all resources used by the <see cref="ComponentRunningContext"/> class.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public void Dispose()
}
/// <summary>
- /// Releases all resources used by the ComponentInfo class.
+ /// Releases all resources used by the <see cref="ComponentRunningContext"/> class.
/// </summary>
- /// <param name="disposing">Disposing</param>
+ /// <param name="disposing"><c>true</c> to release managed resources; otherwise, <c>false</c>.</param>
/// <since_tizen> 6 </since_tizen>
private void Dispose(bool disposing)
{