示例#1
0
 public void DeletePara(string ParaName)
 {
     using (ReadWriteLock ReadWriteLock1 = new ReadWriteLock(this.readerWriterLockSlim, ReadWriteMode.Write))
     {
         参数Row 参数Row1 = this.FindPara(ParaName);
         if (参数Row1 != null)
         {
             this.Remove参数Row(参数Row1);
         }
     }
 }
示例#2
0
 public string GetParaValue(string ParaName, string DefaultValue)
 {
     using (ReadWriteLock ReadWriteLock1 = new ReadWriteLock(this.readerWriterLockSlim, ReadWriteMode.Read))
     {
         参数Row 参数Row1 = this.FindPara(ParaName);
         if (参数Row1 == null)
         {
             return(DefaultValue);
         }
         else
         {
             return(参数Row1.值);
         }
     }
 }
示例#3
0
 public void SetParaValue(string ParaName, string ParaValue)
 {
     using (ReadWriteLock ReadWriteLock1 = new ReadWriteLock(this.readerWriterLockSlim, ReadWriteMode.Write))
     {
         参数Row 参数Row1 = this.FindPara(ParaName);
         if (参数Row1 == null)
         {
             参数Row1   = this.New参数Row();
             参数Row1.项 = ParaName;
             参数Row1.值 = ParaValue;
             this.Add参数Row(参数Row1);
         }
         else
         {
             参数Row1.值 = ParaValue;
         }
     }
 }