Skip to content

jhollingworth/Config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Config

Allows strongly typed configuration and validation of data using Castle’s Windsor

Example

public class Example
{
    [ValidateRange(0, 11)]
    public int LevelOfAwesome { get; set; }

    [ValidateLength(0, 50)]
    public string HowAwesome { get; set; }
    
    public bool IsAwesome { get; set; }
}

var container = new WindsorContainer();

container.Install(new ConfigurationInstaller());
container.RegisterConfigurationEntity<Example>();

var example = container.Resolve<Example>();

if(example.IsAwesome)
    Console.WriteLine("This is {0} awesome. Its level {1} awesome", example.HowAwesome, example.LevelOfAwesome);

About

Designed to simply hard coded configuration using Castle's Windsor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published