예제 #1
0
        public string Get(ConfigurationParameter param)
        {
            string result = RealGet(param);

            if (result == null)
            {
                result = param.DefaultValue;
            }
            return(result);
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            ConfigurationParameter other = (ConfigurationParameter)obj;

            if ((GetUniqueName() == null && other.GetUniqueName() != null) ||
                !GetUniqueName().Equals(other.GetUniqueName()))
            {
                return(false);
            }
            return(true);
        }
예제 #3
0
 public void PutBool(ConfigurationParameter param, bool value)
 {
     Put(param, Convert.ToString(value));
 }
예제 #4
0
 public bool GetBool(ConfigurationParameter param)
 {
     return(Convert.ToBoolean(Get(param)));
 }
예제 #5
0
 public void PutInt(ConfigurationParameter param, int value)
 {
     Put(param, Convert.ToString(value));
 }
예제 #6
0
 public int GetInt(ConfigurationParameter param)
 {
     return(Convert.ToInt32(Get(param)));
 }
예제 #7
0
 protected abstract void RealPut(ConfigurationParameter param, string value);
예제 #8
0
 protected abstract string RealGet(ConfigurationParameter param);
예제 #9
0
 public void Put(ConfigurationParameter param, string value)
 {
     RealPut(param, value);
 }