/// <param name="portName">The name of the local message port.</param>
/// <param name="trusted">If true, it is the trusted message port of application, otherwise false.</param>
/// <exception cref="System.ArgumentException">Thrown when portName is null or empty.</exception>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// </code>
+ /// </example>
public MessagePort(string portName, bool trusted)
{
if (String.IsNullOrEmpty(portName))
/// <summary>
/// Called when a message is received.
/// </summary>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// messagePort.MessageReceived += MessageReceivedCallback;
/// }
/// }
/// </code>
+ /// </example>
public event EventHandler<MessageReceivedEventArgs> MessageReceived;
/// <summary>
/// <exception cref="System.InvalidOperationException">Thrown when portName is already used, when there is an I/O error.</exception>
/// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// messagePort.MessageReceived += MessageReceivedCallback;
/// messagePort.Listen();
/// </code>
+ /// </example>
public void Listen()
{
lock (s_lock)
/// <exception cref="System.InvalidOperationException">Thrown when messageport is already stopped, when there is an I/O error, when the port is not found.</exception>
/// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// messagePort.MessageReceived += MessageReceivedCallback;
/// }
/// messagePort.StopListening();
/// </code>
+ /// </example>
public void StopListening()
{
if (!_listening)
/// <exception cref="System.ArgumentException">Thrown when there is an invalid parameter.</exception>
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// messagePort.MessageReceived += MessageReceivedCallback;
/// messagePort.Send(message, "ReceiverAppID", "ReceiverPort");
/// }
/// </code>
+ /// </example>
public void Send(Bundle message, string remoteAppId, string remotePortName)
{
Send(message, remoteAppId, remotePortName, false);
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
/// <exception cref="System.ArgumentOutOfRangeException">Thrown when message has exceeded the maximum limit(4KB).</exception>
/// <exception cref="System.UnauthorizedAccessException">Thrown when the remote application is not signed with the same certificate.</exception>
+ /// <example>
/// <code>
/// MessagePort messagePort = new MessagePort("SenderPort", true);
/// messagePort.MessageReceived += MessageReceivedCallback;
/// messagePort.Send(message, "ReceiverAppID", "ReceiverPort", true);
/// }
/// </code>
+ /// </example>
public void Send(Bundle message, string remoteAppId, string remotePortName, bool trusted)
{
if (!_listening)
/// <param name="portName">The name of the remote message port</param>
/// <param name="trusted">If true is the trusted message port of application, otherwise false</param>
/// <exception cref="System.ArgumentException">Thrown when appId is null or empty, when portName is null or empty</exception>
+ /// <example>
/// <code>
/// RemotePort remotePort = new RemotePort("org.tizen.example.messageport", "SenderPort", false);
/// </code>
+ /// </example>
public RemotePort(String appId, string portName, bool trusted)
{
if (String.IsNullOrEmpty(appId) || String.IsNullOrEmpty(portName))
/// <since_tizen> 4 </since_tizen>
/// <exception cref="System.InvalidOperationException">Thrown when there is an I/O error</exception>
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+ /// <example>
/// <code>
/// Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
/// bool isRunning = remotePort.isRunning();
/// </code>
+ /// </example>
/// <returns> Return true if Remote Port is running </returns>
public bool IsRunning()
{
/// <since_tizen> 4 </since_tizen>
/// <exception cref="System.InvalidOperationException">Thrown when there is an I/O error</exception>
/// <exception cref="System.OutOfMemoryException">Thrown when out of memory.</exception>
+ /// <example>
/// <code>
/// Remote remotePort = new RemotePort("org.tizen.example", "SenderPort", true);
/// remotePort.RemotePortStateChanged += RemotePortStateChangedCallback;
/// }
/// }
/// </code>
+ /// </example>
public event EventHandler<RemotePortStateChangedEventArgs> RemotePortStateChanged
{
add