Table of Contents

Method Reply

Namespace
Skyline.DataMiner.Core.InterAppCalls.Common.CallSingle
Assembly
Skyline.DataMiner.Core.InterAppCalls.Common.dll

Reply(IConnection, Message, IEnumerable<Type>, TimeSpan?)

Sends a message as a reply to this message using a default serializer without waiting on a reply.

public void Reply(IConnection connection, Message replyMessage, IEnumerable<Type> knownTypes, TimeSpan? timeout = null)

Parameters

connection IConnection

The SLNet connection to use.

replyMessage Message

The message to reply with.

knownTypes IEnumerable<Type>

A list of all the possible Message classes, necessary for the default background serializer.

timeout TimeSpan?

(Optional) The maximum time a message can take to be sent. Only applies when the broker is used to reply.

Exceptions

ArgumentNullException

connection or replyMessage or knownTypes is null.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The message does not expect a reply.

InvalidOperationException

The state of the element specified by the return address is not "Active".

MessageTooBigException

The serialized size of the message is too big.

TimeoutException

The broker experienced a timeout while sending the reply.

Reply(IConnection, Message, ISerializer, TimeSpan?)

Sends a message as a reply to this message without waiting on a reply.

public void Reply(IConnection connection, Message replyMessage, ISerializer serializer, TimeSpan? timeout = null)

Parameters

connection IConnection

The SLNet connection to use.

replyMessage Message

The message to reply with.

serializer ISerializer

A custom serializer.

timeout TimeSpan?

(Optional) The maximum time a message can take to be sent. Only applies when the broker is used to reply.

Exceptions

ArgumentNullException

connection or replyMessage or serializer is null.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The message does not expect a reply.

InvalidOperationException

The state of the element specified by the return address is not "Active".

MessageTooBigException

The serialized size of the message is too big.

TimeoutException

The broker experienced a timeout while sending the reply.

Reply(IConnection, Message, TimeSpan, IEnumerable<Type>)

Sends a message as a reply to this message using a default serializer and waits on a reply.

public Message Reply(IConnection connection, Message replyMessage, TimeSpan timeout, IEnumerable<Type> knownTypes)

Parameters

connection IConnection

The SLNet connection to use.

replyMessage Message

The message to reply with.

timeout TimeSpan

The maximum time to wait between each reply. Wait time resets each time a reply is received.

knownTypes IEnumerable<Type>

A list of all the possible Message classes, necessary for the default background serializer.

Returns

Message

The reply response to this command.

Exceptions

ArgumentNullException

connection or replyMessage or knownTypes is null.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The message does not expect a reply.

InvalidOperationException

The state of the element specified by the return address is not "Active".

InvalidOperationException

ReturnAddress of replyMessage is not filled in.

MessageTooBigException

The serialized size of the message is too big.

TimeoutException

The broker experienced a timeout while sending the reply.

TimeoutException

No reply was received within the specified timeout.

Reply(IConnection, Message, TimeSpan, ISerializer)

Sends a message as a reply to this message and waits on a reply.

public Message Reply(IConnection connection, Message replyMessage, TimeSpan timeout, ISerializer serializer)

Parameters

connection IConnection

The SLNet connection to use.

replyMessage Message

The message to reply with.

timeout TimeSpan

The maximum time to wait between each reply. Wait time resets each time a reply is received.

serializer ISerializer

A custom serializer.

Returns

Message

The reply response to this command.

Exceptions

ArgumentNullException

connection or replyMessage or serializer is null.

ArgumentOutOfRangeException

timeout is negative.

InvalidOperationException

The message does not expect a reply.

InvalidOperationException

The state of the element specified by the return address is not "Active".

InvalidOperationException

ReturnAddress of replyMessage is not filled in.

MessageTooBigException

The serialized size of the message is too big.

TimeoutException

The broker experienced a timeout while sending the reply.

TimeoutException

No reply was received within the specified timeout.