diff --git a/src/Jupyter/ConfigurationSource.cs b/src/Jupyter/ConfigurationSource.cs index 3ded3daaa3..ba0d2b7630 100644 --- a/src/Jupyter/ConfigurationSource.cs +++ b/src/Jupyter/ConfigurationSource.cs @@ -32,7 +32,27 @@ public interface IConfigurationSource /// void Persist(); - private T GetOptionOrDefault(string optionName, T defaultValue) => + /// + /// Given the name for a configuration and a default value, + /// returns the given option if it exists, or the default if the + /// user has not specified that option. + /// + /// + /// Name of the option to be retrieved. + /// + /// + /// Value to be returned when the option specified by + /// has not been set. + /// + /// + /// The expected type of the given option. + /// + /// + /// The value of the option specified by + /// if it exists, otherwise + /// the value of . + /// + public T GetOptionOrDefault(string optionName, T defaultValue) => Configuration.TryGetValue(optionName, out var token) ? token.ToObject() ?? defaultValue : defaultValue;