示例#1
0
        private DtoKraken <T> CrearDto <T>(string target, string operation, List <T> data)
        {
            DtoKraken <T> dto = new DtoKraken <T>();

            dto.target    = target;
            dto.operation = operation;
            dto.data      = data;

            return(dto);
        }
示例#2
0
        private string SerializarDto <T>(DtoKraken <T> dto)
        {
            JsonSerializerSettings setting = new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            };

            string mensaje = JsonConvert.SerializeObject(dto, Formatting.None, setting);

            return(mensaje);
        }
示例#3
0
        string IKraken.CreateMessageKraken <T>(string target, string operation, List <T> data)
        {
            DtoKraken <T> dto = CrearDto <T>(target, operation, data);

            return(SerializarDto <T>(dto));
        }
示例#4
0
        string IKraken.CreateMessageAgrupadaKraken <T>(List <T> data)
        {
            DtoKraken <T> dto = CrearDto <T>("Contabilizar", "Enviar", data);

            return(SerializarDto <T>(dto));
        }