private static List <Error> ValidateExercises(TrackConfigObjectTree trackConfigObjectTree) { var errors = trackConfigObjectTree.Exercises.Concept.Select(ex => ValidateExercise(ex)) .Where(exo => !string.IsNullOrWhiteSpace(exo)) .Select(exo => new Error(ErrorSource.Exercise, Severity.Error, exo)) .ToList(); return(errors); }
public string ToString(TrackConfigObjectTree trackConfigObjectTree) { var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true, WriteIndented = true, }; options.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); return(JsonSerializer.Serialize(trackConfigObjectTree, options)); }