Class ChannelObject

    Definition

    Namespace:
    Tizen.Core
    Assembly:
    Tizen.Core.dll

    Represents a channel object used for inter-task communication.

    public class ChannelObject : IDisposable
    Inheritance
    object
    ChannelObject
    Implements
    System.IDisposable
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    Constructors

    View Source

    ChannelObject(int, object)

    Constructor for creating a new channel object with specified ID and data.

    Declaration
    public ChannelObject(int id, object data)
    Parameters
    Type Name Description
    int id

    The ID.

    object data

    The data object.

    Remarks

    This constructor creates a new channel object with the specified ID and data. It throws an OutOfMemoryException if there isn't enough memory available to allocate the object. Additionally, it may throw an InvalidOperationException if the operation fails due to an invalid condition.

    Examples
    int id = 0;
    string message = "Test message";
    var channelObject = new ChannelObject(id++, message);
    Exceptions
    Type Condition
    System.OutOfMemoryException

    Thrown when out of memory.

    System.InvalidOperationException

    Thrown when failed because of an invalid operation.

    Properties

    View Source

    Data

    Gets and sets the data object.

    Declaration
    public object Data { get; set; }
    Property Value
    Type Description
    object
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    View Source

    Id

    Gets and sets the ID.

    Declaration
    public int Id { get; set; }
    Property Value
    Type Description
    int
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    View Source

    Sender

    Gets the name of the sender task.

    Declaration
    public string Sender { get; }
    Property Value
    Type Description
    string
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    Methods

    View Source

    Dispose()

    Release any unmanaged resources used by this object.

    Declaration
    public void Dispose()
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    View Source

    Dispose(bool)

    Release any unmanaged resources used by this object.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    If true, disposes any disposable objects. If false, does not dispose disposable objects.

    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    View Source

    ~ChannelObject()

    Finalizes an instance of the ChannelObject class.

    Declaration
    protected ~ChannelObject()
    Remarks

    A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. When you are done using the channel object, remember to dispose it properly to avoid resource leaks.

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX