using System; namespace Volo.Docs { public class DocsUiOptions { private string _routePrefix = "documents"; /// /// Default value: "documents"; /// public string RoutePrefix { get => GetFormattedRoutePrefix(); set => _routePrefix = value; } /// /// Allows user to see a combobox in user interface for swapping across projects /// Default value: True; /// public bool ShowProjectsCombobox = true; /// /// If true, allows to create sections in document and show/hide sections according to user preferences. /// Default value: True; /// public bool SectionRendering = true; private string GetFormattedRoutePrefix() { if (string.IsNullOrWhiteSpace(_routePrefix)) { return "/"; } return _routePrefix.EnsureEndsWith('/').EnsureStartsWith('/'); } } }