Esempio n. 1
0
        public BuildingPrivlidge GetDominatingBuildingPrivilege()
        {
            BuildingPrivlidge buildingPrivlidge = null;

            if (HasBuildingPrivileges())
            {
                for (int i = 0; i < buildingPrivileges.Count; i++)
                {
                    BuildingPrivlidge buildingPrivlidge2 = buildingPrivileges[i];
                    if (!(buildingPrivlidge2 == null) && buildingPrivlidge2.IsOlderThan(buildingPrivlidge))
                    {
                        buildingPrivlidge = buildingPrivlidge2;
                    }
                }
            }
            return(buildingPrivlidge);
        }
Esempio n. 2
0
        public BuildingPrivlidge GetDominatingBuildingPrivilege()
        {
            BuildingPrivlidge buildingPrivlidge = null;

            if (this.HasBuildingPrivileges())
            {
                for (int i = 0; i < this.buildingPrivileges.Count; i++)
                {
                    BuildingPrivlidge item = this.buildingPrivileges[i];
                    if (!(item == null) && item.IsOlderThan(buildingPrivlidge))
                    {
                        buildingPrivlidge = item;
                    }
                }
            }
            return(buildingPrivlidge);
        }
        public BuildingPrivlidge GetDominatingBuildingPrivilege()
        {
            BuildingPrivlidge buildingPrivlidge1 = (BuildingPrivlidge)null;

            if (this.HasBuildingPrivileges())
            {
                for (int index = 0; index < this.buildingPrivileges.get_Count(); ++index)
                {
                    BuildingPrivlidge buildingPrivlidge2 = this.buildingPrivileges.get_Item(index);
                    if (!Object.op_Equality((Object)buildingPrivlidge2, (Object)null) && buildingPrivlidge2.IsOlderThan((BaseEntity)buildingPrivlidge1))
                    {
                        buildingPrivlidge1 = buildingPrivlidge2;
                    }
                }
            }
            return(buildingPrivlidge1);
        }