Sha256: 0234530b9e5eaadbdffa15df86fe0b4ca1afa406ad78a643a975f71e05c06aa7

Contents?: true

Size: 1.27 KB

Versions: 114

Compression:

Stored size: 1.27 KB

Contents

using System;
using System.IO;
using CommandLine;

namespace Generators
{
    public class Options
    {
        private static string DefaultCanonicalDataDirectory
            => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "exercism", "problem-specifications");

        [Option('e', "exercise", Required = false, 
            HelpText = "Exercise to generate (defaults to all exercises).")]
        public string Exercise { get; set; }

        [Option('s', "status", Required = false,
            HelpText = "The generator status to filter on (defaults to exercises with generator).")]
        public GeneratorStatus Status { get; set; }

        [Option('d', "canonicaldatadirectory", Required = false,
            HelpText = "Canonical data directory. If the directory does not exist, the canonical data will be downloaded.")]
        public string CanonicalDataDirectory { get; set; }

        [Option('c', "cachecanonicaldata", Required = false, Default = false,
            HelpText = "Use the cached canonical data and don't update the data.")]
        public bool CacheCanonicalData { get; set; }

        public void Normalize()
        {
            CanonicalDataDirectory = CanonicalDataDirectory ?? DefaultCanonicalDataDirectory;
        }
    }
}

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/csharp/generators/Options.cs
trackler-2.2.1.118 tracks/csharp/generators/Options.cs
trackler-2.2.1.117 tracks/csharp/generators/Options.cs
trackler-2.2.1.116 tracks/csharp/generators/Options.cs
trackler-2.2.1.115 tracks/csharp/generators/Options.cs
trackler-2.2.1.114 tracks/csharp/generators/Options.cs
trackler-2.2.1.113 tracks/csharp/generators/Options.cs
trackler-2.2.1.111 tracks/csharp/generators/Options.cs
trackler-2.2.1.110 tracks/csharp/generators/Options.cs
trackler-2.2.1.109 tracks/csharp/generators/Options.cs
trackler-2.2.1.108 tracks/csharp/generators/Options.cs
trackler-2.2.1.107 tracks/csharp/generators/Options.cs
trackler-2.2.1.106 tracks/csharp/generators/Options.cs
trackler-2.2.1.105 tracks/csharp/generators/Options.cs
trackler-2.2.1.104 tracks/csharp/generators/Options.cs
trackler-2.2.1.103 tracks/csharp/generators/Options.cs
trackler-2.2.1.102 tracks/csharp/generators/Options.cs
trackler-2.2.1.101 tracks/csharp/generators/Options.cs
trackler-2.2.1.100 tracks/csharp/generators/Options.cs
trackler-2.2.1.99 tracks/csharp/generators/Options.cs