Search Results for

    Show / Hide Table of Contents

    Class ComponentBasedApplication

    Definition

    Namespace:
    Tizen.Applications.ComponentBased.Common
    Assembly:
    Tizen.Applications.ComponentBased.dll

    Represents the base class for a multi-component based application. This class allows the creation and management of multiple application components, such as Frame, Service, and Widget components.

    [Obsolete("This has been deprecated in API14")]
    public abstract class ComponentBasedApplication : Application, IDisposable
    Inheritance
    object
    Application
    ComponentBasedApplication
    Implements
    IDisposable
    Remarks

    This abstract class provides the core structure for applications that consist of multiple components. Each component has its own lifecycle, and the framework handles these lifecycles independently.

    Constructors

    View Source

    ComponentBasedApplication(IDictionary<Type, string>)

    Initializes a new instance of the ComponentBasedApplication class with the specified component type information.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public ComponentBasedApplication(IDictionary<Type, string> typeInfo)
    Parameters
    Type Name Description
    IDictionary<Type, string> typeInfo

    A dictionary where the key is the component class type (FrameComponent, ServiceComponent or WidgetComponent subclass), and the value is the component ID defined in the tizen-manifest.xml file.

    Remarks

    This constructor sets up the necessary callbacks for the application lifecycle and registers the provided components.

    Examples
    IDictionary<Type, string> components = new Dictionary<Type, string>()
    {
        { typeof(MyFrameComponent), "frameComponentId" },
        { typeof(MyServiceComponent), "serviceComponentId" }
    };
    ComponentBasedApplication app = new MyApplication(components);
    app.Run(args);

    Methods

    View Source

    Exit()

    Exits the application's main loop.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public override void Exit()
    Overrides
    Application.Exit()
    View Source

    OnExit()

    Called to exit the main loop of the application.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    protected virtual void OnExit()
    Remarks

    Override this method to handle any logic needed before the application exits.

    View Source

    OnFinished()

    Called after the main loop exits.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    protected virtual void OnFinished()
    Remarks

    Override this method to handle any cleanup logic after the application has finished running.

    View Source

    OnInit(string[])

    Called before the main loop starts.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    protected virtual void OnInit(string[] args)
    Parameters
    Type Name Description
    string[] args

    The arguments passed from the command line.

    Remarks

    Override this method to handle any initialization logic before the application enters the main event loop.

    View Source

    OnRun()

    Called to start the main loop of the application.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    protected abstract void OnRun()
    Remarks

    This is an abstract method that must be implemented by derived classes to define the behavior when the application starts.

    View Source

    RegisterComponent(Type, string)

    Registers a component with the specified type and ID.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public void RegisterComponent(Type compType, string compId)
    Parameters
    Type Name Description
    Type compType

    The type of the component to register. Must be a subclass of FrameComponent, ServiceComponent, or WidgetComponent.

    string compId

    The ID of the component, defined in the tizen-manifest.xml file.

    Remarks

    This method ensures that only valid component types are registered. The component ID must be unique.

    Examples
    app.RegisterComponent(typeof(MyFrameComponent), "frameComponentId");
    Exceptions
    Type Condition
    ArgumentException

    Thrown when the component type is already registered or not sub-class of FrameComponent, ServiceComponent or WidgetComponent.

    View Source

    Run(string[])

    Runs the application's main loop.

    Declaration
    [Obsolete("This has been deprecated in API14")]
    public override void Run(string[] args)
    Parameters
    Type Name Description
    string[] args

    The arguments passed from the command line.

    Overrides
    Application.Run(string[])
    Examples
    app.Run(args);
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when component type is already added to the component.

    Implements

    IDisposable
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX