Class ChannelSender
Definition
- 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
-
objectChannelSender
- Implements
-
System.IDisposable
Methods
View SourceClone()
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. |
Dispose()
Release any unmanaged resources used by this object.
Declaration
public void Dispose()
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. |
~ChannelSender()
Finalizes an instance of the ChannelSender class.
Declaration
protected ~ChannelSender()
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. |