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.
C#Copypublic class ChannelSender : IDisposable
- Inheritance
-
objectChannelSender
- Implements
-
System.IDisposable
Methods
Declaration
C#Copypublic ChannelSender Clone()
Returns
| Type | Description |
|---|---|
| ChannelSender | A newly created channel sender instance. |
Examples
Copyvar 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. |
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | If true, disposes any disposable objects. If false, does not dispose disposable objects. |
Declaration
C#Copyprotected ~ChannelSender()
Declaration
C#Copypublic 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
Copyvar 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