Esempio 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);
Esempio 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);
Esempio 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);
 public static T GetOption <T>(OptionKey2 optionKey, Func <OptionKey, object?> getOption)
 => GetOption <T>(new OptionKey(optionKey.Option, optionKey.Language), getOption);