public GetStringList ( String key ) : List |
||
key | String | The key. |
return | List |
/// <summary> /// Initialize the template loader with a resources class. /// </summary> public override void Init(ExtendedProperties configuration) { object value = configuration["assembly"]; if (value is string) { assemblyNames = new List<string> { (string)configuration["assembly"] }; } else if (value is List<string>) { assemblyNames = configuration.GetStringList("assembly"); } else { throw new VelocityException("Expected property 'assembly' to be of type string or List<string>."); } }
/// <summary> /// Initialises the resource loader from the specified configuration. /// </summary> /// <param name="configuration">The configuration.</param> public override void Init(ExtendedProperties configuration) { var assemblies = configuration.GetStringList("assembly"); foreach (var assembly in assemblies) { try { _assemblies.Add(Assembly.Load(assembly)); } catch (Exception ex) { throw new ResourceNotFoundException(string.Format("Error when initializing NVelocity partial file resource loader: The assembly '{0}' could not be loaded.", assembly), ex); } } }