internal SettingsClassInfo(ISettings settingsObject, ParserInfo parserInfo)
        {
            this.Type       = settingsObject.GetType();
            this.ParserInfo = parserInfo;
            this.Instance   = settingsObject;

            this.Initialize();
        }
        //Note: No need to check that this type is ISettings, this should already be done.
        internal SettingsClassInfo(Type type, ParserInfo parserInfo)
        {
            this.Type       = type;
            this.ParserInfo = parserInfo;
            this.Instance   = GetInstance(this.Type);

            this.Initialize();
        }
Example #3
0
        public CommandLineParser(ISettings settingsObject, ParserInfo parserInfo)
        {
            this.ParserInfo   = parserInfo;
            this.SettingsInfo = new SettingsClassInfo(settingsObject, this.ParserInfo);

            if (Debugger.IsAttached)
            {
                ValidateSettingsClass();
            }
        }
Example #4
0
        public CommandLineParser(ParserInfo parserInfo)
        {
            this.ParserInfo   = parserInfo;
            this.SettingsInfo = new SettingsClassInfo(GetISettingsType(), this.ParserInfo);

            if (Debugger.IsAttached)
            {
                ValidateSettingsClass();
            }
        }
Example #5
0
        public CommandLineParser(Type settingsClassType, ParserInfo parserInfo)
        {
            if (!settingsClassType.ImplementsISettings())
            {
                throw Exception("The settings class type {0} does not implement the {1} interface.", settingsClassType, typeof(ISettings));
            }

            this.ParserInfo   = parserInfo;
            this.SettingsInfo = new SettingsClassInfo(settingsClassType, this.ParserInfo);

            if (Debugger.IsAttached)
            {
                ValidateSettingsClass();
            }
        }