GetAllBelow => ThisAndBelow

This commit is contained in:
Rick Falkvinge
2015-05-01 17:24:38 +02:00
parent ed3d33064e
commit ae2966f8b5
10 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ namespace Swarmops.Logic.Structure
object testObject = GuidCache.Get(cacheKey);
if (testObject == null)
{
Geographies geographies = Geography.Root.GetAllBelow();
Geographies geographies = Geography.Root.ThisAndBelow();
Tree<Geography> geoTree = Tree<Geography>.FromCollection(geographies);
GuidCache.Set(cacheKey, geoTree);
+3 -3
View File
@@ -45,7 +45,7 @@ namespace Swarmops.Logic.Structure
{
People members =
People.FromMemberships (
Memberships.ForOrganizations (Organization.FromIdentity (orgId).GetAllBelow()));
Memberships.ForOrganizations (Organization.FromIdentity (orgId).ThisAndBelow()));
foreach (Person person in members)
{
@@ -88,11 +88,11 @@ namespace Swarmops.Logic.Structure
// Step 3 - add up the totals for every intermediate node (expensive!)
Geographies allGeographies = Geography.Root.GetAllBelow();
Geographies allGeographies = Geography.Root.ThisAndBelow();
foreach (Geography geography in allGeographies)
{
Geographies localTree = geography.GetAllBelow();
Geographies localTree = geography.ThisAndBelow();
int voterCount = 0;
GeographyOrganizationDataPoint[] tempOrgData = new GeographyOrganizationDataPoint[2]; // HACK
tempOrgData[0] = new GeographyOrganizationDataPoint();
+1 -1
View File
@@ -420,7 +420,7 @@ namespace Swarmops.Logic.Structure
//return Organizations.FromArray(SwarmDb.GetDatabaseForReading().GetOrganizationLine(Identity));
}
public Organizations GetAllBelow()
public Organizations ThisAndBelow()
{
return Organizations.FromArray (OrganizationCache.GetOrganizationTree (Identity));
//return Organizations.FromArray(SwarmDb.GetDatabaseForReading().GetOrganizationTree(Identity));