using Newtonsoft.Json;

namespace InABox.Logikal
{
    public abstract class LogikalObject
    {
        public abstract LogikalMethod Method();
        
        public LogikalMessage ToMessage()
        {
            return new LogikalMessage()
            {
                Method = Method(),
                Payload = JsonConvert.SerializeObject(this)
            };
        }

    }
}