summaryrefslogtreecommitdiff
path: root/Impostor-dev/src/Impostor.Hazel/DisconnectedEventArgs.cs
blob: d46df4b9c9a319e5ea4925eaf16fc2a53af83dcd (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
using System;
using Impostor.Api.Net.Messages;

namespace Impostor.Hazel
{
    public class DisconnectedEventArgs : EventArgs
    {
        /// <summary>
        /// Optional disconnect reason. May be null.
        /// </summary>
        public readonly string Reason;

        /// <summary>
        /// Optional data sent with a disconnect message. May be null. 
        /// You must not recycle this. If you need the message outside of a callback, you should copy it.
        /// </summary>
        public readonly IMessageReader Message;

        public DisconnectedEventArgs(string reason, IMessageReader message)
        {
            this.Reason = reason;
            this.Message = message;
        }
    }
}