Sha256: aaae201bb42e72eec2709c807f59933eb96d0cc526d5b5a3a2f685dc43790bad

Contents?: true

Size: 547 Bytes

Versions: 22

Compression:

Stored size: 547 Bytes

Contents

using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;

namespace Generators.Input
{
    public static class CanonicalDataParser
    {
        public static CanonicalData Parse(string exercise)
        {
            var canonicalDataJson = CanonicalDataFile.Contents(exercise);
            var canonicalData = JsonConvert.DeserializeObject<CanonicalData>(canonicalDataJson);
            
            Validator.ValidateObject(canonicalData, new ValidationContext(canonicalData));

            return canonicalData;
        }
    }
}

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
trackler-2.2.1.12 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.11 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.10 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.9 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.8 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.7 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.6 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.5 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.4 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.3 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.2 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.1 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.1.0 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.6 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.5 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.4 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.3 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.2 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.1 tracks/csharp/generators/Input/CanonicalDataParser.cs
trackler-2.2.0.0 tracks/csharp/generators/Input/CanonicalDataParser.cs