Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
Created July 23, 2012 05:43
Show Gist options
  • Save sandrinodimattia/3162122 to your computer and use it in GitHub Desktop.
Save sandrinodimattia/3162122 to your computer and use it in GitHub Desktop.
ServerConfigurationSection
public class ServerConfigurationSection : ConfigurationSection, IServerConfiguration
{
[ConfigurationProperty("server", IsRequired = true)]
public string Server
{
get { return (string)this["server"]; }
set { this["server"] = value; }
}
[ConfigurationProperty("port", IsRequired = false)]
public int Port
{
get { return (int)this["port"]; }
set { this["port"] = value; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment