示例#1
0
 private static void SetPostParsingStateIfNeeded(object options, PostParsingState state)
 {
     if (options is CommandLineOptionsBase)
     {
         ((CommandLineOptionsBase)options).LastPostParsingState = state;
     }
 }
示例#2
0
        private static void BuildAndSetPostParsingStateIfNeeded(object options, OptionInfo option, bool?required, bool?mutualExclusiveness)
        {
            if (options is CommandLineOptionsBase)
            {
                PostParsingState state = new PostParsingState();
                if (option != null)
                {
                    state.BadOptionInfo = option;
                }
                if (required != null)
                {
                    state.ViolatesRequired = required.Value;
                }
                if (mutualExclusiveness != null)
                {
                    state.ViolatesMutualExclusiveness = mutualExclusiveness.Value;
                }

                ((CommandLineOptionsBase)options).LastPostParsingState = state;
            }
        }
示例#3
0
        private static void BuildAndSetPostParsingStateIfNeeded(object options, OptionInfo option, bool? required, bool? mutualExclusiveness)
        {
            if (options is CommandLineOptionsBase)
            {
                PostParsingState state = new PostParsingState();
                if (option != null) state.BadOptionInfo = option;
                if (required != null) state.ViolatesRequired = required.Value;
                if (mutualExclusiveness != null) state.ViolatesMutualExclusiveness = mutualExclusiveness.Value;

                ((CommandLineOptionsBase)options).LastPostParsingState = state;
            }
        }
示例#4
0
 private static void SetPostParsingStateIfNeeded(object options, PostParsingState state)
 {
     if (options is CommandLineOptionsBase)
         ((CommandLineOptionsBase)options).LastPostParsingState = state;
 }