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); } } }
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.值); } } }
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; } } }