summaryrefslogtreecommitdiff
path: root/DSACore/Models/Network/CommandResponse.cs
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-10-01 22:20:36 +0200
committerTrueDoctor <d-kobert@web.de>2018-10-01 22:20:36 +0200
commitb7ef3c860375baea7b5db95940519ce0746b6ecc (patch)
tree270b9f6ec1c58b153037738f6c6b2aa83205d9fc /DSACore/Models/Network/CommandResponse.cs
parenta5a5d368cddd6e8a15298002ccb3b10c90a33980 (diff)
added Command Response Handling
Diffstat (limited to 'DSACore/Models/Network/CommandResponse.cs')
-rw-r--r--DSACore/Models/Network/CommandResponse.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/DSACore/Models/Network/CommandResponse.cs b/DSACore/Models/Network/CommandResponse.cs
new file mode 100644
index 0000000..ed4b7d0
--- /dev/null
+++ b/DSACore/Models/Network/CommandResponse.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace DSACore.Models.Network
+{
+ public class CommandResponse
+ {
+ public CommandResponse(string message, ResponseType responseType= ResponseType.Broadcast)
+ {
+ this.message = message ?? throw new ArgumentNullException(nameof(message));
+ ResponseType = responseType;
+ }
+
+ public string message { get; private set; }
+ public ResponseType ResponseType { get; private set;}
+
+ public override string ToString()
+ {
+ return message;
+ }
+ }
+
+ public enum ResponseType
+ {
+ Broadcast,
+ Caller,
+ Error
+ }
+}