/// <summary> /// Creates a new instance of <see cref="UnorderedParser{TValue}"/>. /// </summary> /// <param name="mode">Parsing mode.</param> /// <param name="items">The item parsers. Not null. Not empty.</param> public UnorderedParser(UnorderedParsingMode mode = UnorderedParsingMode.FullSet, params IParser <TValue>[] items) { ArgumentCheck.NotNullOrEmptyOrWithNulls(items, nameof(items)); _mode = mode; _items = items; }
/// <summary> /// Creates a new instance of <see cref="UnorderedParser{TValue}"/>. /// </summary> /// <param name="separator">Item separator. Not null.</param> /// <param name="mode">Parsing mode.</param> /// <param name="items">The item parsers. Not null. Not empty.</param> public UnorderedParser(IGeneralParser separator, UnorderedParsingMode mode, params IParser <TValue>[] items) { ArgumentCheck.NotNullOrEmptyOrWithNulls(items, nameof(items)); _separator = separator ?? throw new ArgumentNullException(nameof(separator)); _mode = mode; _items = items; }
/// <summary> /// Creates a new instance of <see cref="UnorderedParser{TValue}"/>. /// </summary> /// <param name="mode">Parsing mode.</param> /// <param name="items">The item parsers. Not null. Not empty.</param> /// <returns>The new instance of <see cref="UnorderedParser{TValue}"/>. Not null.</returns> public static UnorderedParser <TValue> Unordered <TValue>(UnorderedParsingMode mode = UnorderedParsingMode.FullSet, params IParser <TValue>[] items) => new UnorderedParser <TValue>(mode, items);
/// <summary> /// Creates a new instance of <see cref="UnorderedParser{TValue}"/>. /// </summary> /// <param name="separator">Item separator. Not null.</param> /// <param name="items">The item parsers. Not null. Not empty.</param> /// <returns>The new instance of <see cref="UnorderedParser{TValue}"/>. Not null.</returns> public static UnorderedParser <TValue> Unordered <TValue>(IGeneralParser separator, UnorderedParsingMode mode, params IParser <TValue>[] items) => new UnorderedParser <TValue>(separator, mode, items);