Class ChannelSender

    Definition

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

    Represents the channel sender used for inter-task communication. It provides methods to send messages between tasks in order to facilitate task coordination.

    public class ChannelSender : IDisposable
    Inheritance
    object
    ChannelSender
    Implements
    System.IDisposable

    Methods

    View Source

    Clone()

    Creates and returns a copy of the channel sender object.

    Declaration
    public ChannelSender Clone()
    Returns
    Type Description
    ChannelSender

    A newly created channel sender instance.

    Examples
    var channel = new Channel();
    var sender = channel.Sender;
    var clonedSender = sender.Clone();
    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when failed because of an invalid operation.

    System.OutOfMemoryException

    Thrown when out of memory.

    View Source

    Dispose()

    Release any unmanaged resources used by this object.

    Declaration
    public void Dispose()
    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.

    View Source

    ~ChannelSender()

    Finalizes an instance of the ChannelSender class.

    Declaration
    protected ~ChannelSender()
    View Source

    Send(ChannelObject)

    Sends the channel object to the receiver.

    Declaration
    public void Send(ChannelObject channelObject)
    Parameters
    Type Name Description
    ChannelObject channelObject

    The channel object instance.

    Remarks

    It's important to call the Dispose() method on the passed channel object to release resources.

    Examples
    var channel = new Channel();
    var sender = channel.Sender;
    string message = "Test";
    using (var channelObject = new ChannelObject(1, message))
    {
      sender.Send(channelObject);
    }
    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the argument is null.

    System.ArgumentException

    Thrown when the argument is invalid.

    System.InvalidOperationException

    Thrown when failed because of an invalid operation.

    Implements

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