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.180 tracks/csharp/generators/Options.cs
trackler-2.2.1.179 tracks/csharp/generators/Options.cs
trackler-2.2.1.178 tracks/csharp/generators/Options.cs
trackler-2.2.1.177 tracks/csharp/generators/Options.cs
trackler-2.2.1.176 tracks/csharp/generators/Options.cs
trackler-2.2.1.175 tracks/csharp/generators/Options.cs
trackler-2.2.1.174 tracks/csharp/generators/Options.cs
trackler-2.2.1.173 tracks/csharp/generators/Options.cs
trackler-2.2.1.172 tracks/csharp/generators/Options.cs
trackler-2.2.1.171 tracks/csharp/generators/Options.cs
trackler-2.2.1.170 tracks/csharp/generators/Options.cs
trackler-2.2.1.169 tracks/csharp/generators/Options.cs
trackler-2.2.1.167 tracks/csharp/generators/Options.cs
trackler-2.2.1.166 tracks/csharp/generators/Options.cs
trackler-2.2.1.165 tracks/csharp/generators/Options.cs
trackler-2.2.1.164 tracks/csharp/generators/Options.cs
trackler-2.2.1.163 tracks/csharp/generators/Options.cs
trackler-2.2.1.162 tracks/csharp/generators/Options.cs
trackler-2.2.1.161 tracks/csharp/generators/Options.cs
trackler-2.2.1.160 tracks/csharp/generators/Options.cs