コード例 #1
0
 /// <summary>
 /// Creates a new instance of <see cref="IllegalComboRestriction"/>.
 /// </summary>
 /// <param name="firstGrouping">The first grouping.</param>
 /// <param name="secondGrouping">The second grouping.</param>
 public MandatedComboRestriction(ICommandLineGrouping firstGrouping, ICommandLineGrouping secondGrouping)
 {
     FirstGrouping  = firstGrouping;
     SecondGrouping = secondGrouping;
 }
コード例 #2
0
 /// <summary>
 /// Determines if the specified grouping is present.
 /// </summary>
 /// <param name="grouping">The grouping to check.</param>
 /// <param name="options">The flags which dictate what determines an argument as found.</param>
 /// <param name="comparer">The comparer to use when determining if a match was found.</param>
 /// <param name="argumentsToParse">
 /// The collection to search.
 /// Specifying null will default to <see cref="Arguments"/>.
 /// </param>
 /// <returns>
 /// Returns true if the apecified argument was found using the supplied flags; otherwise, returns false.
 /// </returns>
 /// <exception cref="System.ArgumentException">
 /// Throws when an invalid flag combination is given.
 /// </exception>
 public static bool Found(this ICommandLineGrouping grouping, CmdLineSearchOptions options, StringComparison?comparer = null, IEnumerable <string> argumentsToParse = null) => grouping.ParentCallChain.Concat(grouping.Children).Found(options, comparer, argumentsToParse);
コード例 #3
0
 /// <summary>
 /// Creates a new instance of <see cref="IllegalComboRestriction"/>.
 /// </summary>
 /// <param name="firstGrouping">The first grouping.</param>
 /// <param name="secondGrouping">The second grouping.</param>
 public IllegalComboRestriction(ICommandLineGrouping firstGrouping, ICommandLineGrouping secondGrouping)
 {
     FirstGrouping  = firstGrouping;
     SecondGrouping = secondGrouping;
 }