Ejemplo n.º 1
0
        string SerializeLogEntity(LogEntity logEntity, string format)
        {
            switch (format.ToLower())
            {
            case "json":
            {
                return(logEntity.ToJson());
            }

            case "yaml":
            {
                return(logEntity.ToYaml());
            }

            default: throw new NotSupportedException("Format not supported");
            }
        }