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.98 tracks/csharp/generators/Options.cs
trackler-2.2.1.97 tracks/csharp/generators/Options.cs
trackler-2.2.1.96 tracks/csharp/generators/Options.cs
trackler-2.2.1.95 tracks/csharp/generators/Options.cs
trackler-2.2.1.94 tracks/csharp/generators/Options.cs
trackler-2.2.1.93 tracks/csharp/generators/Options.cs
trackler-2.2.1.92 tracks/csharp/generators/Options.cs
trackler-2.2.1.91 tracks/csharp/generators/Options.cs
trackler-2.2.1.90 tracks/csharp/generators/Options.cs
trackler-2.2.1.89 tracks/csharp/generators/Options.cs
trackler-2.2.1.88 tracks/csharp/generators/Options.cs
trackler-2.2.1.87 tracks/csharp/generators/Options.cs
trackler-2.2.1.86 tracks/csharp/generators/Options.cs
trackler-2.2.1.85 tracks/csharp/generators/Options.cs
trackler-2.2.1.84 tracks/csharp/generators/Options.cs
trackler-2.2.1.83 tracks/csharp/generators/Options.cs
trackler-2.2.1.82 tracks/csharp/generators/Options.cs
trackler-2.2.1.81 tracks/csharp/generators/Options.cs
trackler-2.2.1.80 tracks/csharp/generators/Options.cs
trackler-2.2.1.79 tracks/csharp/generators/Options.cs