using System.Runtime.Serialization; namespace Operation { public class OperationServerConfig { public string dbname; public string dbip; public string dbuser; public string dbpassword; public int startHttpserver; public string billdbname; public string imghttp; public string imgfliepath; public int HttpPortNumber; public int maxExchangeCodeCount; public int dbtype; public string codehttp; public string codefliepath; public string heroAppKey; public int pCode; public int currency; public bool isOnline; } public class OperationConfigDef { private const int DefaultMaxExchangeCodeCount = 200; public static int MaxExchangeCodeCount { get { var cfg = OperationServerUtils.GetServerConfig(); if(cfg != null && cfg.maxExchangeCodeCount > 0) { return cfg.maxExchangeCodeCount; } return OperationConfigDef.DefaultMaxExchangeCodeCount; } } } }