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.139 tracks/csharp/generators/Options.cs
trackler-2.2.1.138 tracks/csharp/generators/Options.cs
trackler-2.2.1.137 tracks/csharp/generators/Options.cs
trackler-2.2.1.136 tracks/csharp/generators/Options.cs
trackler-2.2.1.135 tracks/csharp/generators/Options.cs
trackler-2.2.1.134 tracks/csharp/generators/Options.cs
trackler-2.2.1.133 tracks/csharp/generators/Options.cs
trackler-2.2.1.132 tracks/csharp/generators/Options.cs
trackler-2.2.1.131 tracks/csharp/generators/Options.cs
trackler-2.2.1.130 tracks/csharp/generators/Options.cs
trackler-2.2.1.129 tracks/csharp/generators/Options.cs
trackler-2.2.1.128 tracks/csharp/generators/Options.cs
trackler-2.2.1.127 tracks/csharp/generators/Options.cs
trackler-2.2.1.126 tracks/csharp/generators/Options.cs
trackler-2.2.1.125 tracks/csharp/generators/Options.cs
trackler-2.2.1.124 tracks/csharp/generators/Options.cs
trackler-2.2.1.123 tracks/csharp/generators/Options.cs
trackler-2.2.1.122 tracks/csharp/generators/Options.cs
trackler-2.2.1.121 tracks/csharp/generators/Options.cs
trackler-2.2.1.120 tracks/csharp/generators/Options.cs