Following #4, this PR implements the support of passing custom IOptions to YoutubeDl.
This PR includes the following changes:
[x] IOption is now public and has the bool IsCustom { get; } property.
[x] Option includes an overload constructor which takes bool isCustom as an argument.
[x] OptionSet.Custom.cs adds the IOption[] CustomOptions { get; set; } property to OptionSet.
[x] OptionSet.GetOptionFlags includes the custom options.
[x] OptionSet.GetOptions has been renamed to GetKnownOptions.
[x] OptionSet.OverrideOptions combines the custom options of both old and new OptionSet using a custom IOption comparer (OptionComparer) which uses string comparison.
[x] OptionSet.FromString parses unknown options as custom options.
If the option contains a value (for example: "--my-option value") it is considered an IOption<string>.
If not (for example: "--my-option"), it is considered an IOption<bool>.
Following #4, this PR implements the support of passing custom
IOption
s to YoutubeDl.This PR includes the following changes:
IOption
is now public and has thebool IsCustom { get; }
property.Option
includes an overload constructor which takesbool isCustom
as an argument.OptionSet.Custom.cs
adds theIOption[] CustomOptions { get; set; }
property toOptionSet
.OptionSet.GetOptionFlags
includes the custom options.OptionSet.GetOptions
has been renamed toGetKnownOptions
.OptionSet.OverrideOptions
combines the custom options of both old and newOptionSet
using a customIOption
comparer (OptionComparer
) which uses string comparison.OptionSet.FromString
parses unknown options as custom options. If the option contains a value (for example:"--my-option value"
) it is considered anIOption<string>
. If not (for example:"--my-option"
), it is considered anIOption<bool>
.