Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new <see cref="OptionSet" /> that contains the changed value.
 /// </summary>
 internal OptionSet WithChangedOption(OptionKey2 optionAndLanguage, object?value)
 => WithChangedOption((OptionKey)optionAndLanguage, value);
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the value of the option, or the default value if not otherwise set.
 /// </summary>
 internal object?GetOption(OptionKey2 optionKey)
 => OptionsHelpers.GetOption <object?>(optionKey, _getOptionCore);
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the value of the option cast to type <typeparamref name="T"/>, or the default value if not otherwise set.
 /// </summary>
 internal T GetOption <T>(OptionKey2 optionKey)
 => OptionsHelpers.GetOption <T>(optionKey, _getOptionCore);
Ejemplo n.º 4
0
 public static T GetOption <T>(OptionKey2 optionKey, Func <OptionKey, object?> getOption)
 => GetOption <T>(new OptionKey(optionKey.Option, optionKey.Language), getOption);