|
@@ -77,11 +77,17 @@ namespace InABox.Configuration
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public override Dictionary<string, T> LoadAll()
|
|
|
+ public override Dictionary<string, T> LoadAll(IEnumerable<string>? sections = null)
|
|
|
{
|
|
|
var result = new Dictionary<string, T>();
|
|
|
+ var filter = new Filter<UserSettings>(x => x.Section).IsEqualTo(typeof(T).Name)
|
|
|
+ .And(x => x.UserID).IsEqualTo(ClientFactory.UserID);
|
|
|
+ if (sections != null)
|
|
|
+ {
|
|
|
+ filter.And(x => x.Key).InList(sections.AsArray());
|
|
|
+ }
|
|
|
var data = new Client<UserSettings>().Query(
|
|
|
- new Filter<UserSettings>(x => x.Section).IsEqualTo(typeof(T).Name).And(x => x.UserID).IsEqualTo(ClientFactory.UserID),
|
|
|
+ filter,
|
|
|
new Columns<UserSettings>(x => x.Key, x => x.Contents),
|
|
|
new SortOrder<UserSettings>(x => x.Key)
|
|
|
);
|