-
-
Save justinyoo/e108fef7e0bbb757a83c394be48668a2 to your computer and use it in GitHub Desktop.
Configuration Value Converter for enum and List<T>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProductElement : ConfigurationElement | |
{ | |
[ConfigurationProperty("types", IsRequired = true)] | |
[TypeConverter(typeof(PipeDelimitedFlaggedEnumConverter<ProductTypes>))] | |
public ProductTypes Types | |
{ | |
get { return (ProductTypes)this["types"]; } | |
set { this["types"] = value; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment