///
<summary> /// Get the list of running domains /// </summary> public List<Domain> RunningDomains{
get{
if (_conn == IntPtr.Zero) return null; int nbRunningDomain = NumOfDomains(_conn); int[] runningDomainIds = new int[nbRunningDomain];ListDomains(_conn, runningDomainIds, nbRunningDomain);
return runningDomainIds.Select(id => new Domain(Domain.LookupByID(_conn, id), this)).ToList();}
}
So the property call "virConnectNumOfDomains" and "virConnectListDomains" each time the property is called. And I don't know if it is a good thing. The other way, is to keep the list in the Connect object and handle domain adding or removing in this via callbacks. This avoid multiple call to the librar.
Any advice ?
Regards,
Arnaud