Created
December 25, 2015 10:08
-
-
Save miensol/f5801742f7a039c820dc to your computer and use it in GitHub Desktop.
SimpleConfigSections samples
This file contains hidden or 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 PageAppearanceSection : ConfigurationSection<IPageAppearance> | |
{ | |
} | |
public interface IPageAppearance | |
{ | |
bool RemoteOnly { get; } | |
IFont Font { get; } | |
IColor Color { get; } | |
} | |
public interface IFont | |
{ | |
[DefaultValue("Arial")] | |
string Name { get; } | |
[DefaultValue(12)] | |
[Range(minimum:6, maximum:24)] | |
int Size { get; } | |
} | |
public interface IColor | |
{ | |
[DefaultValue("FFFFFF")] | |
[RegularExpression("[A-Fa-f0-9]{6}")] | |
string Background { get; } | |
[DefaultValue("000000")] | |
[RegularExpression("[A-Fa-f0-9]{6}")] | |
string Foreground { get; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment