From ed3d33064e622d42b53c50fe471f400e91f2ba8b Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 1 May 2015 16:48:56 +0200 Subject: [PATCH] Refactor: GetTree => GetAllBelow, GetLine => GetRootLineage --- Console/Console.cs | 4 ++-- Logic/Cache/MailTemplateCache.cs | 2 +- .../DataObjects/GeographyWithPeopleDataObject.cs | 6 +++--- Logic/DataObjects/OrganizationDataObject.cs | 2 +- Logic/Financial/FinancialAccount.cs | 4 ++-- Logic/Financial/FinancialAccounts.cs | 8 ++++---- Logic/Security/Authority.cs | 4 ++-- Logic/Structure/Geographies.cs | 6 +++--- Logic/Structure/Geography.cs | 6 +++--- Logic/Structure/GeographyStatistics.cs | 6 +++--- Logic/Structure/Organization.cs | 10 +++++----- Logic/Structure/Organizations.cs | 10 +++++----- Logic/Swarm/Activists.cs | 4 ++-- Logic/Swarm/People.cs | 8 ++++---- Logic/Swarm/Roles.cs | 16 ++++++++-------- Site5/Automation/FieldValidation.aspx.cs | 2 +- .../v5/Admin/Hacks/PopulateCountry1.aspx.cs | 2 +- Site5/Pages/v5/Comms/SendMassMessage.aspx.cs | 4 ++-- Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs | 4 ++-- Utility/BotCode/InternalPollMaintenance.cs | 2 +- Utility/BotCode/MailResolver.cs | 4 ++-- Utility/BotCode/RosterHousekeeping.cs | 2 +- 22 files changed, 58 insertions(+), 58 deletions(-) diff --git a/Console/Console.cs b/Console/Console.cs index ec32ea6b..9572e40c 100644 --- a/Console/Console.cs +++ b/Console/Console.cs @@ -342,7 +342,7 @@ namespace Swarmops writer.WriteLine("Förening,Namn (medlemsnr),kön,födelsedatum,bidragsgrund,email,telefon"); - Organizations orgTree = Organization.FromIdentity(2).GetTree(); + Organizations orgTree = Organization.FromIdentity(2).GetAllBelow(); foreach (Organization org in orgTree) { @@ -905,7 +905,7 @@ namespace Swarmops { // For each suborg to UP, - Organizations orgs = Organization.FromIdentity (2).GetTree(); + Organizations orgs = Organization.FromIdentity (2).GetAllBelow(); foreach (Organization org in orgs) { diff --git a/Logic/Cache/MailTemplateCache.cs b/Logic/Cache/MailTemplateCache.cs index f79907d2..45af582b 100644 --- a/Logic/Cache/MailTemplateCache.cs +++ b/Logic/Cache/MailTemplateCache.cs @@ -51,7 +51,7 @@ namespace Swarmops.Logic.Cache { List tmplList = GetCachedTemplates (templateName); - Organizations orgLine = (org != null) ? org.GetLine() : new Organizations(); + Organizations orgLine = (org != null) ? org.GetRootLineage() : new Organizations(); int[] lineIDs = orgLine.Identities; List idlist = new List (lineIDs); diff --git a/Logic/DataObjects/GeographyWithPeopleDataObject.cs b/Logic/DataObjects/GeographyWithPeopleDataObject.cs index a868752d..db8efd9d 100644 --- a/Logic/DataObjects/GeographyWithPeopleDataObject.cs +++ b/Logic/DataObjects/GeographyWithPeopleDataObject.cs @@ -15,10 +15,10 @@ namespace Swarmops.Logic.DataObjects #endif public static GeographyWithPeople[] SelectSortedStatic (int orgId) { - Organizations orgs = Organization.FromIdentity (orgId).GetTree(); + Organizations orgs = Organization.FromIdentity (orgId).GetAllBelow(); List resList = new List(); - Geographies tree = Geography.Root.GetTree(); + Geographies tree = Geography.Root.GetAllBelow(); foreach (Geography geo in tree) { GeographyWithPeople row = new GeographyWithPeople(); @@ -29,7 +29,7 @@ namespace Swarmops.Logic.DataObjects row.LeadContent = ""; row.SecondsContent = ""; row.OrgId = orgId; - Geographies gTree = geo.GetTree(); + Geographies gTree = geo.GetAllBelow(); int[] members = SwarmDb.GetDatabaseForReading() .GetMembersForOrganizationsAndGeographies (orgs.Identities, gTree.Identities); } diff --git a/Logic/DataObjects/OrganizationDataObject.cs b/Logic/DataObjects/OrganizationDataObject.cs index 27046035..9a19baee 100644 --- a/Logic/DataObjects/OrganizationDataObject.cs +++ b/Logic/DataObjects/OrganizationDataObject.cs @@ -312,7 +312,7 @@ namespace Swarmops.Logic.DataObjects private static int FindDefaultCountry (Org org) { //Find default country = Country of anchor. - Geographies line = Geography.FromIdentity (org.AnchorGeographyId).GetLine(); + Geographies line = Geography.FromIdentity (org.AnchorGeographyId).GetRootLineage(); Geography[] arrLine = line.ToArray(); Array.Reverse (arrLine); Countries countries = Countries.All; diff --git a/Logic/Financial/FinancialAccount.cs b/Logic/Financial/FinancialAccount.cs index 08d08717..553f920b 100644 --- a/Logic/Financial/FinancialAccount.cs +++ b/Logic/Financial/FinancialAccount.cs @@ -418,9 +418,9 @@ namespace Swarmops.Logic.Financial return FromIdentityAggressive (accountId); } - public FinancialAccounts GetTree() + public FinancialAccounts GetAllBelow() { - return FinancialAccounts.GetTree (this); + return FinancialAccounts.GetAllBelow (this); } } } \ No newline at end of file diff --git a/Logic/Financial/FinancialAccounts.cs b/Logic/Financial/FinancialAccounts.cs index 5464eb3a..69700faa 100644 --- a/Logic/Financial/FinancialAccounts.cs +++ b/Logic/Financial/FinancialAccounts.cs @@ -116,11 +116,11 @@ namespace Swarmops.Logic.Financial } - public static FinancialAccounts GetTree (FinancialAccount rootAccount) + public static FinancialAccounts GetAllBelow (FinancialAccount rootAccount) { Dictionary nodes = GetHashedAccounts (rootAccount.Organization); - return GetTree (nodes, rootAccount.Identity, 0); + return GetAllBelow (nodes, rootAccount.Identity, 0); } @@ -140,7 +140,7 @@ namespace Swarmops.Logic.Financial }*/ - private static FinancialAccounts GetTree (Dictionary accounts, int startNodeId, + private static FinancialAccounts GetAllBelow (Dictionary accounts, int startNodeId, int generation) { FinancialAccounts result = new FinancialAccounts(); @@ -155,7 +155,7 @@ namespace Swarmops.Logic.Financial // Add recursively - FinancialAccounts children = GetTree (accounts, account.Identity, generation + 1); + FinancialAccounts children = GetAllBelow (accounts, account.Identity, generation + 1); if (children.Count > 0) { diff --git a/Logic/Security/Authority.cs b/Logic/Security/Authority.cs index 05c9681d..320744ad 100644 --- a/Logic/Security/Authority.cs +++ b/Logic/Security/Authority.cs @@ -329,7 +329,7 @@ namespace Swarmops.Logic.Security // Org lookup will always be needed. Geo lookup may be needed for case 3. - Organizations orgStructure = this.Organization.GetTree(); + Organizations orgStructure = this.Organization.GetAllBelow(); int[] orgIds = orgStructure.Identities; foreach (int orgId in orgIds) { @@ -395,7 +395,7 @@ namespace Swarmops.Logic.Security return new People(); // also return empty list } - Geographies geoStructure = this.Position.Geography.GetTree(); + Geographies geoStructure = this.Position.Geography.GetAllBelow(); int[] geoIds = geoStructure.Identities; foreach (int geoId in geoIds) { diff --git a/Logic/Structure/Geographies.cs b/Logic/Structure/Geographies.cs index 11aa4507..f0eb82ad 100644 --- a/Logic/Structure/Geographies.cs +++ b/Logic/Structure/Geographies.cs @@ -92,7 +92,7 @@ namespace Swarmops.Logic.Structure // Build lookup - Geographies filterLine = topGeography.GetLine(); + Geographies filterLine = topGeography.GetRootLineage(); Dictionary lineLookup = new Dictionary(); foreach (Geography node in filterLine) { @@ -135,7 +135,7 @@ namespace Swarmops.Logic.Structure foreach (Geography currentNode in this) { - Geographies currentLine = Geography.FromIdentity (currentNode.GeographyId).GetLine(); + Geographies currentLine = Geography.FromIdentity (currentNode.GeographyId).GetRootLineage(); foreach (Geography comparedNode in this) { @@ -278,7 +278,7 @@ namespace Swarmops.Logic.Structure object testObject = GuidCache.Get(cacheKey); if (testObject == null) { - Geographies geographies = Geography.Root.GetTree(); + Geographies geographies = Geography.Root.GetAllBelow(); Tree geoTree = Tree.FromCollection(geographies); GuidCache.Set(cacheKey, geoTree); diff --git a/Logic/Structure/Geography.cs b/Logic/Structure/Geography.cs index 6b703e0a..d3e45708 100644 --- a/Logic/Structure/Geography.cs +++ b/Logic/Structure/Geography.cs @@ -87,13 +87,13 @@ namespace Swarmops.Logic.Structure get { return FromIdentity (ParentIdentity); } } - public Geographies GetTree() + public Geographies GetAllBelow() { return Geographies.FromArray (GeographyCache.GetGeographyTree (Identity)); // return Geographies.FromArray(SwarmDb.GetDatabaseForReading().GetGeographyTree(Identity)); } - public Geographies GetLine() + public Geographies GetRootLineage() { return Geographies.FromArray (GeographyCache.GetGeographyLine (Identity)); //return Geographies.FromArray(SwarmDb.GetDatabaseForReading().GetGeographyLine(Identity)); @@ -108,7 +108,7 @@ namespace Swarmops.Logic.Structure { // Returns true if prospectiveParent is a parent of ours. - Geographies line = GetLine(); + Geographies line = GetRootLineage(); for (int index = 0; index < line.Count - 1; index++) { diff --git a/Logic/Structure/GeographyStatistics.cs b/Logic/Structure/GeographyStatistics.cs index 447c8c23..63909302 100644 --- a/Logic/Structure/GeographyStatistics.cs +++ b/Logic/Structure/GeographyStatistics.cs @@ -45,7 +45,7 @@ namespace Swarmops.Logic.Structure { People members = People.FromMemberships ( - Memberships.ForOrganizations (Organization.FromIdentity (orgId).GetTree())); + Memberships.ForOrganizations (Organization.FromIdentity (orgId).GetAllBelow())); 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.GetTree(); + Geographies allGeographies = Geography.Root.GetAllBelow(); foreach (Geography geography in allGeographies) { - Geographies localTree = geography.GetTree(); + Geographies localTree = geography.GetAllBelow(); int voterCount = 0; GeographyOrganizationDataPoint[] tempOrgData = new GeographyOrganizationDataPoint[2]; // HACK tempOrgData[0] = new GeographyOrganizationDataPoint(); diff --git a/Logic/Structure/Organization.cs b/Logic/Structure/Organization.cs index 82329af0..9c3ef33e 100644 --- a/Logic/Structure/Organization.cs +++ b/Logic/Structure/Organization.cs @@ -400,7 +400,7 @@ namespace Swarmops.Logic.Structure { // Returns true if prospectiveParent is a parent of ours. - Organizations line = GetLine(); + Organizations line = GetRootLineage(); for (int index = 0; index < line.Count - 1; index++) { @@ -413,14 +413,14 @@ namespace Swarmops.Logic.Structure return false; } - public Organizations GetLine() + public Organizations GetRootLineage() { return Organizations.FromArray (OrganizationCache.GetOrganizationLine (Identity)); //return Organizations.FromArray(SwarmDb.GetDatabaseForReading().GetOrganizationLine(Identity)); } - public Organizations GetTree() + public Organizations GetAllBelow() { return Organizations.FromArray (OrganizationCache.GetOrganizationTree (Identity)); //return Organizations.FromArray(SwarmDb.GetDatabaseForReading().GetOrganizationTree(Identity)); @@ -578,7 +578,7 @@ namespace Swarmops.Logic.Structure if (string.IsNullOrEmpty (this.mailPrefixInherited)) { - Organizations orgLine = GetLine(); + Organizations orgLine = GetRootLineage(); orgLine.Reverse(); @@ -858,7 +858,7 @@ namespace Swarmops.Logic.Structure public Person GetTreasurer() { - Organizations line = GetLine(); + Organizations line = GetRootLineage(); BasicPersonRole[] treasurers = SwarmDb.GetDatabaseForReading() .GetPeopleWithRoleType (RoleType.OrganizationTreasurer, line.Identities, new int[] {}); diff --git a/Logic/Structure/Organizations.cs b/Logic/Structure/Organizations.cs index 3f858bb1..cbca6b64 100644 --- a/Logic/Structure/Organizations.cs +++ b/Logic/Structure/Organizations.cs @@ -95,7 +95,7 @@ namespace Swarmops.Logic.Structure foreach (Organization currentOrg in this) { - Organizations currentLine = currentOrg.GetLine(); + Organizations currentLine = currentOrg.GetRootLineage(); foreach (Organization comparedOrg in this) { @@ -143,7 +143,7 @@ namespace Swarmops.Logic.Structure foreach (Organization orgMajor in this) { - Organizations orgTree = orgMajor.GetTree(); + Organizations orgTree = orgMajor.GetAllBelow(); foreach (Organization orgMinor in orgTree) { @@ -372,7 +372,7 @@ namespace Swarmops.Logic.Structure } // For each remaining organization, find the one with the longest organization line. - // This is slightly inefficient as the queries for Geography.GetLine() are repeated. + // This is slightly inefficient as the queries for Geography.GetRootLineage() are repeated. if (table.Count == 0) { @@ -391,7 +391,7 @@ namespace Swarmops.Logic.Structure { foreach (Geography uptakeGeo in org.UptakeGeographies) { - Geographies geoLine = Geography.FromIdentity (org.AnchorGeographyId).GetLine(); + Geographies geoLine = Geography.FromIdentity (org.AnchorGeographyId).GetRootLineage(); if (geoLine.Count > maxLength && org.AutoAssignNewMembers) { bestFit = org; @@ -399,7 +399,7 @@ namespace Swarmops.Logic.Structure } if (geoLine.Count == maxLength && org.AutoAssignNewMembers && bestFit != null) { - if (bestFit.GetLine().Count < org.GetLine().Count) + if (bestFit.GetRootLineage().Count < org.GetRootLineage().Count) { bestFit = org; maxLength = geoLine.Count; diff --git a/Logic/Swarm/Activists.cs b/Logic/Swarm/Activists.cs index a091a87d..0bf14a9d 100644 --- a/Logic/Swarm/Activists.cs +++ b/Logic/Swarm/Activists.cs @@ -41,14 +41,14 @@ namespace Swarmops.Logic.Swarm public static int GetCountForGeography (Geography geography) { - Geographies geographies = geography.GetTree(); + Geographies geographies = geography.GetAllBelow(); return SwarmDb.GetDatabaseForReading().GetActivistCountForGeographies (geographies.Identities); } public static Activists FromGeography (Geography geography) { - Geographies geographies = geography.GetTree(); + Geographies geographies = geography.GetAllBelow(); return new Activists (SwarmDb.GetDatabaseForReading().GetActivistPersonIds (geographies.Identities)); } diff --git a/Logic/Swarm/People.cs b/Logic/Swarm/People.cs index 0aa14f81..9babd6e8 100644 --- a/Logic/Swarm/People.cs +++ b/Logic/Swarm/People.cs @@ -257,7 +257,7 @@ namespace Swarmops.Logic.Swarm public static People FromOrganizationAndGeographyWithPattern (Organization organization, Geography geography, string pattern) { - Geographies geoTree = geography.GetTree(); + Geographies geoTree = geography.GetAllBelow(); pattern = pattern.Trim(); if (pattern.Length == 0) @@ -281,7 +281,7 @@ namespace Swarmops.Logic.Swarm public static People FromOrganizationAndGeography (Organization organization, Geography geography) { - Geographies geoTree = geography.GetTree(); + Geographies geoTree = geography.GetAllBelow(); // First, get list of people in the geography, then filter on memberships @@ -297,7 +297,7 @@ namespace Swarmops.Logic.Swarm { // Get the organization tree - Organizations orgTree = organization.GetTree(); + Organizations orgTree = organization.GetAllBelow(); // Build a lookup table of this organization tree. For each person in 'people' // that has at least one membership in an organization in the lookup table, @@ -344,7 +344,7 @@ namespace Swarmops.Logic.Swarm public static People FromGeography (int geographyId) { - Geographies geoTree = Geography.FromIdentity (geographyId).GetTree(); + Geographies geoTree = Geography.FromIdentity (geographyId).GetAllBelow(); // First, get list of people in the geography, then filter on memberships diff --git a/Logic/Swarm/Roles.cs b/Logic/Swarm/Roles.cs index 5a7db629..001182aa 100644 --- a/Logic/Swarm/Roles.cs +++ b/Logic/Swarm/Roles.cs @@ -49,8 +49,8 @@ namespace Swarmops.Logic.Swarm /// A list of person Ids that hold roles above this point. public static int[] GetAllUpwardRoles (int organizationId, int geographyId, RoleType[] roleTypes) { - Organizations orgLine = Organization.FromIdentity (organizationId).GetLine(); - Geographies nodeLine = Geography.FromIdentity (geographyId).GetLine(); + Organizations orgLine = Organization.FromIdentity (organizationId).GetRootLineage(); + Geographies nodeLine = Geography.FromIdentity (geographyId).GetRootLineage(); int[] nodeIds = nodeLine.Identities; @@ -92,10 +92,10 @@ namespace Swarmops.Logic.Swarm Organizations orgTree = null; Geographies nodeTree = null; int[] nodeIds; - orgTree = Organization.FromIdentity (organizationId).GetTree(); + orgTree = Organization.FromIdentity (organizationId).GetAllBelow(); if (geographyId > 0) { - nodeTree = Geography.FromIdentity (geographyId).GetTree(); + nodeTree = Geography.FromIdentity (geographyId).GetAllBelow(); nodeIds = nodeTree.Identities; } else @@ -137,12 +137,12 @@ namespace Swarmops.Logic.Swarm int[] nodeIds; int[] orgIds; - orgTree = Organization.FromIdentity (organizationId).GetTree(); + orgTree = Organization.FromIdentity (organizationId).GetAllBelow(); orgIds = orgTree.Identities; if (geographyId > 0) { - nodeTree = Geography.FromIdentity (geographyId).GetTree(); + nodeTree = Geography.FromIdentity (geographyId).GetAllBelow(); nodeIds = nodeTree.Identities; } else @@ -235,8 +235,8 @@ namespace Swarmops.Logic.Swarm // Expensive op: BasicPersonRole[] basicPersonRoles = - SwarmDb.GetDatabaseForReading().GetRolesForOrganizationsGeographies (organization.GetTree().Identities, - geography.GetTree().Identities); + SwarmDb.GetDatabaseForReading().GetRolesForOrganizationsGeographies (organization.GetAllBelow().Identities, + geography.GetAllBelow().Identities); Dictionary lookup = new Dictionary(); foreach (BasicPersonRole basicRole in basicPersonRoles) diff --git a/Site5/Automation/FieldValidation.aspx.cs b/Site5/Automation/FieldValidation.aspx.cs index b3e33bea..7a34a183 100644 --- a/Site5/Automation/FieldValidation.aspx.cs +++ b/Site5/Automation/FieldValidation.aspx.cs @@ -105,7 +105,7 @@ namespace Swarmops.Frontend.Automation cityArray.Add (dataPoint); } - Geographies geographies = Country.FromCode (countryCode).Geography.GetTree(); + Geographies geographies = Country.FromCode (countryCode).Geography.GetAllBelow(); foreach (Geography geography in geographies) { GeographyData dataPoint = new GeographyData diff --git a/Site5/Pages/v5/Admin/Hacks/PopulateCountry1.aspx.cs b/Site5/Pages/v5/Admin/Hacks/PopulateCountry1.aspx.cs index b6efdb0c..d5db77bc 100644 --- a/Site5/Pages/v5/Admin/Hacks/PopulateCountry1.aspx.cs +++ b/Site5/Pages/v5/Admin/Hacks/PopulateCountry1.aspx.cs @@ -129,7 +129,7 @@ namespace Swarmops.Frontend.Pages.v5.Admin.Hacks geoNameLookup[countryCode] = countryGeoId; } - Geographies countryGeographies = Geography.FromIdentity(countryGeoId).GetTree(); + Geographies countryGeographies = Geography.FromIdentity(countryGeoId).GetAllBelow(); foreach (Geography geography in countryGeographies) { diff --git a/Site5/Pages/v5/Comms/SendMassMessage.aspx.cs b/Site5/Pages/v5/Comms/SendMassMessage.aspx.cs index 5dd85636..7c2950f9 100644 --- a/Site5/Pages/v5/Comms/SendMassMessage.aspx.cs +++ b/Site5/Pages/v5/Comms/SendMassMessage.aspx.cs @@ -53,8 +53,8 @@ namespace Swarmops.Frontend.Pages.Comms AuthenticationData authData = GetAuthenticationDataAndCulture(); Geography geography = Geography.FromIdentity (geographyId); - Geographies geoTree = geography.GetTree(); - Organizations orgTree = authData.CurrentOrganization.GetTree(); + Geographies geoTree = geography.GetAllBelow(); + Organizations orgTree = authData.CurrentOrganization.GetAllBelow(); switch (recipientTypeId) { diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs index f0035308..b4d526fa 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx.cs @@ -115,7 +115,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers throw new UnauthorizedAccessException ("A million nopes"); } - FinancialAccounts accountTree = account.GetTree(); + FinancialAccounts accountTree = account.GetAllBelow(); int year = DateTime.Today.Year; JsonAccountData result = new JsonAccountData(); @@ -380,7 +380,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers newTreeBudget *= 100; // convert to cents int year = DateTime.Today.Year; - FinancialAccounts accountTree = account.GetTree(); + FinancialAccounts accountTree = account.GetAllBelow(); Int64 currentTreeBudget = accountTree.GetBudgetSumCents (year); Int64 currentSingleBudget = account.GetBudgetCents (year); Int64 suballocatedBudget = currentTreeBudget - currentSingleBudget; diff --git a/Utility/BotCode/InternalPollMaintenance.cs b/Utility/BotCode/InternalPollMaintenance.cs index 9eb9da24..9f1a1abc 100644 --- a/Utility/BotCode/InternalPollMaintenance.cs +++ b/Utility/BotCode/InternalPollMaintenance.cs @@ -52,7 +52,7 @@ namespace Swarmops.Utility.BotCode // Populate voters, then open for voting - Organizations orgTree = poll.Organization.GetTree(); + Organizations orgTree = poll.Organization.GetAllBelow(); Memberships memberships = Memberships.ForOrganizations (orgTree); diff --git a/Utility/BotCode/MailResolver.cs b/Utility/BotCode/MailResolver.cs index 31a3341e..050fb5ba 100644 --- a/Utility/BotCode/MailResolver.cs +++ b/Utility/BotCode/MailResolver.cs @@ -185,8 +185,8 @@ namespace Swarmops.Utility.BotCode { // for this person, iterate over all applicable geographies and organizations - Organizations orgLine = organization.GetLine(); - Geographies geoLine = person.Geography.GetLine(); + Organizations orgLine = organization.GetRootLineage(); + Geographies geoLine = person.Geography.GetRootLineage(); orgLine.Reverse(); // Start at the most local org diff --git a/Utility/BotCode/RosterHousekeeping.cs b/Utility/BotCode/RosterHousekeeping.cs index ffb0e89a..84adb71e 100644 --- a/Utility/BotCode/RosterHousekeeping.cs +++ b/Utility/BotCode/RosterHousekeeping.cs @@ -19,7 +19,7 @@ namespace Swarmops.Utility.BotCode public static string ExportMemberList (int organizationIdRoot, DateTime membersAfter, DateTime membersBefore) { - Organizations orgs = Organization.FromIdentity (organizationIdRoot).GetTree(); + Organizations orgs = Organization.FromIdentity (organizationIdRoot).GetAllBelow(); StringBuilder result = new StringBuilder(); result.Append (