Beispiel #1
0
        internal static void ReadOptions(ElaOptions cls)
        {
            foreach (var k in ConfigurationManager.AppSettings.AllKeys)
            {
                var value = ConfigurationManager.AppSettings[k];

                if (value.Contains(";"))
                {
                    var arr = value.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);

                    foreach (var s in arr)
                        OptionMap<ElaOptions>.SetOption(k, s, cls);
                }
                else
                    OptionMap<ElaOptions>.SetOption(k, value, cls);
            }
        }
Beispiel #2
0
        internal static void ReadOptions(ElaOptions cls)
        {
            foreach (var k in ConfigurationManager.AppSettings.AllKeys)
            {
                var value = ConfigurationManager.AppSettings[k];

                if (value.Contains(";"))
                {
                    var arr = value.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);

                    foreach (var s in arr)
                    {
                        OptionMap <ElaOptions> .SetOption(k, s, cls);
                    }
                }
                else
                {
                    OptionMap <ElaOptions> .SetOption(k, value, cls);
                }
            }
        }
Beispiel #3
0
 internal CommandLineParser(ElaOptions cls)
 {
     this.cls = cls;
 }
Beispiel #4
0
 internal CommandLineParser(ElaOptions cls)
 {
     this.cls = cls;
 }
 internal InteractiveCommands(ElaMachine machine, MessageHelper helper, ElaOptions opts)
 {
     this.machine = machine;
     this.helper = helper;
     this.opts = opts;
 }
Beispiel #6
0
 private static bool ReadOptions(string[] args)
 {
     try
     {
         opt = new ElaOptions();
         ConfigReader.ReadOptions(opt);
         var clp = new CommandLineParser(opt);
         clp.Parse(args);
         return true;
     }
     catch (ElaOptionException ex)
     {
         helper = new MessageHelper(null);
         helper.PrintInvalidOption(ex);
         return false;
     }
 }