protected void CheckConfiguration(CodeGeneratorConfigurationBase configuration) { var allowedChars = new AllowedCharactersBuilder().BuildFromConfiguration(configuration.AllowedCharacters); if (allowedChars == null || allowedChars.Length == 0) { throw new ConfigurationErrorsException("No allowed chars. Configuration resolves to empty list."); } if (configuration.CodeLength <= 0) { throw new ConfigurationErrorsException("Not allowed code length. Code length must be greater then zero."); } }
protected override char[] GetAllowedChars(CodeGeneratorConfigurationBase configuration) { return(new AllowedCharactersBuilder() .BuildFromConfiguration(configuration.AllowedCharacters)); //HACK load requirements from Identity and check it }
protected virtual char[] GetAllowedChars(CodeGeneratorConfigurationBase configuration) { return(new AllowedCharactersBuilder().BuildFromConfiguration(configuration.AllowedCharacters)); }
protected GeneratorBase(IGenericCodeGenerator genericCodeGenerator, CodeGeneratorConfigurationBase configuration) { m_genericCodeGenerator = genericCodeGenerator; m_configuration = configuration; CheckConfiguration(configuration); }