From b7ef3c860375baea7b5db95940519ce0746b6ecc Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 1 Oct 2018 22:20:36 +0200 Subject: added Command Response Handling --- DSACore/Models/Network/CommandResponse.cs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 DSACore/Models/Network/CommandResponse.cs (limited to 'DSACore/Models/Network/CommandResponse.cs') 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 + } +} -- cgit v1.2.3-54-g00ecf