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
IConnectionThe SLNet connection to use.
replyMessage
MessageThe 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
orreplyMessage
orknownTypes
isnull
.- 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
IConnectionThe SLNet connection to use.
replyMessage
MessageThe message to reply with.
serializer
ISerializerA 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
orreplyMessage
orserializer
isnull
.- 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
IConnectionThe SLNet connection to use.
replyMessage
MessageThe message to reply with.
timeout
TimeSpanThe 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
orreplyMessage
orknownTypes
isnull
.- 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
IConnectionThe SLNet connection to use.
replyMessage
MessageThe message to reply with.
timeout
TimeSpanThe maximum time to wait between each reply. Wait time resets each time a reply is received.
serializer
ISerializerA custom serializer.
Returns
- Message
The reply response to this command.
Exceptions
- ArgumentNullException
connection
orreplyMessage
orserializer
isnull
.- 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
.