internal ServerTree(StoredServerGroup rootGroup, List <ApplicationEntity> directoryServers) { LocalServer = new ServerTreeLocalServer(); //Create a copy because we will modify it. directoryServers = directoryServers == null ? new List <ApplicationEntity>() : new List <ApplicationEntity>(directoryServers); if (rootGroup == null) { InitializeRootGroup(); } else { //ToServerTreeGroup eliminates the items from the passed in list of //servers as the references are found in the tree. RootServerGroup = rootGroup.ToServerTreeGroup(directoryServers); } //rootGroup.ToServerTreeGroup above deletes the entries from the list of servers, //so if there are any left, that means there was no match in the tree. So, //we will just add those servers to the root. foreach (ApplicationEntity server in directoryServers) { RootServerGroup.Servers.Add(new ServerTreeDicomServer(server)); } InitializePaths(); CurrentNode = LocalServer; }
internal ServerTree(ServerTreeRoot legacyRoot) { LocalServer = new ServerTreeLocalServer(); if (legacyRoot == null) { InitializeRootGroup(); } else { RootServerGroup = legacyRoot.ServerGroupNode.ToServerTreeGroup(); } InitializePaths(); CurrentNode = LocalServer; }