summaryrefslogtreecommitdiff
path: root/dsa/DSALib/Models/Network/CommandResponse.cs
blob: 0816e4aa02a8c554d8a07ccebc70d5c8b5117152 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;

namespace DSALib.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; }
        public ResponseType ResponseType { get; }

        public override string ToString()
        {
            return message;
        }
    }

    public enum ResponseType
    {
        Broadcast,
        Caller,
        Error
    }
}