Partial ToolMode class implementing ICookieSource, providing a virtual CookiePrefix property that returns a string based on the runtime type name lowercased and prefixed with "tool.".
partial class ToolMode : ICookieSource
{
public virtual string CookiePrefix => $"tool.{GetType().Name.ToLowerInvariant()}";
}