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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<appSettings> | |
<add key="GateInvocationMax" value="10"/> | |
</appSettings> | |
</configuration> |
Remember to add System.Configuration to Project references !
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
using System.Configuration; | |
namespace Interlook.Common | |
{ | |
public class ConfigManager | |
{ | |
public static int GateInvocationMax | |
{ | |
get | |
{ | |
int gateInvocationMax = 10; | |
int.TryParse(ConfigurationManager.AppSettings["GateInvocationMax"], out gateInvocationMax); | |
return gateInvocationMax; | |
} | |
} | |
} | |
} |
No comments:
Post a Comment