Пример #1
0
        public static People FromIdentities(int[] personIds, bool preserveOrder)
        {
            People set = People.FromIdentities(personIds);

            if (preserveOrder == false)
            {
                return(set);
            }

            Dictionary <int, Person> lookup = new Dictionary <int, Person>();

            foreach (Person person in set)
            {
                lookup[person.Identity] = person;
            }

            People result = new People();

            foreach (int identity in personIds)
            {
                result.Add(lookup[identity]);
            }

            return(result);
        }
Пример #2
0
        public new static OfficerChain FromOrganizationAndGeography(Organization org, Geography geo)
        {
            int[]  concernedPeopleId = Roles.GetAllUpwardRoles(org.Identity, geo.Identity);
            People concernedPeople   = People.FromIdentities(concernedPeopleId);

            return(new OfficerChain(concernedPeople, org.Identity));
        }
Пример #3
0
 public static People FromOptionalData(ObjectOptionalDataType dataType, string data)
 {
     return(People.FromIdentities(SwarmDb.GetDatabaseForReading().GetObjectsByOptionalData(ObjectType.Person, dataType, data)));
 }