using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Edge.Core.Processor.Communicator
{
    public class CommunicatorEventArg<TRaw, TMessage> : EventArgs
    {
        public string SenderId { get; set; }

        /// <summary>
        /// could be used for passing anything
        /// </summary>
        public object GenericParameter { get; set; }
        public TRaw Data { get; set; }

        public TMessage Message { get; set; }

        public bool Continue { get; set; }
    }

    public class CommunicatorErrorMessageReadEventArg : EventArgs
    {
        public CommunicatorErrorMessageReadEventArg(byte[] rawData, string hint)
        {
            this.RawData = rawData;
            this.Hint = hint;
        }

        public byte[] RawData { get; set; }
        public string Hint { get; set; }
    }
}
