-
-
Save justinyoo/d398c32bd8e2c8582b67997c1bd923b2 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("status", IsRequired = true)] | |
[TypeConverter(typeof(CaseInsensitiveEnumConverter<ProductStatus>))] | |
public ProductStatus Status | |
{ | |
get { return (ProductStatus)this["status"]; } | |
set { this["status"] = value; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment