16 using System.Collections.Generic;
19 using erminas.SmartAPI.Utils.CachedCollections;
21 namespace erminas.SmartAPI.CMS.ServerManagement
23 internal class Groups : NameIndexedRDList<IGroup>, IGroups
25 private readonly ISession _session;
27 public Groups(ISession session,
Caching caching) : base(caching)
30 RetrieveFunc = GetGroups;
33 public ISession Session
35 get {
return _session; }
38 private List<IGroup> GetGroups()
40 const string LIST_GROUPS =
@"<ADMINISTRATION><GROUPS action=""list""/></ADMINISTRATION>";
41 XmlDocument xmlDoc = _session.ExecuteRQL(LIST_GROUPS, RQL.IODataFormat.LogonGuidOnly);
43 (from XmlElement curGroup in xmlDoc.GetElementsByTagName(
"GROUP")
44 select (IGroup) new Group(_session, curGroup)).ToList();