private void ValidateOptionsCanBeConstruted(ICollection <string> errors)
 {
     if (!_optionsFactory.CanCreateOptions())
     {
         errors.Add($"Cannot create an instance of type {typeof(TOptions)}. The options must be either a type with a parameterless constructor and public setters or a type with constructor parameters for all properties.");
     }
 }