CSLA Config cleanup

This commit is contained in:
2026-08-28 11:15:35 -04:00
parent d0587706a2
commit f88f8a1c75
27 changed files with 566 additions and 2412 deletions
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
namespace VEPROMS.CSLA.Library
@@ -11,35 +9,23 @@ namespace VEPROMS.CSLA.Library
[TypeConverter(typeof(ExpandableObjectConverter))]
public class AnnotationConfig : ConfigDynamicTypeDescriptor, INotifyPropertyChanged
{
private XMLProperties _Xp;
private XMLProperties Xp
{
get { return _Xp; }
}
private readonly XMLProperties _Xp;
public AnnotationConfig(string xml)
{
if (xml == string.Empty) xml = "<Config/>";
_Xp = new XMLProperties(xml);
}
public AnnotationConfig()
{
_Xp = new XMLProperties();
}
public override string ToString()
public AnnotationConfig() => _Xp = new XMLProperties();
public override string ToString()
{
string s = _Xp.ToString();
if (s == "<Config/>" || s == "<Config></Config>") return string.Empty;
return s;
}
public string GetValue(string group, string item)
{
return _Xp[group, item];
}
public void SetValue(string group, string item, string newvalue)
{
_Xp[group, item] = newvalue;
}
public string GetValue(string group, string item) => _Xp[group, item];
public void SetValue(string group, string item, string newvalue) => _Xp[group, item] = newvalue;
}
}
}