예제 #1
0
        public bool ConsumeZonePointWith <T>(ZonePoint point)
            where T : IAreaConsumption
        {
            var result = Area
                         .ConsumeZoneAt(point.GetZoneInfoOn(Area).MatchingObject,
                                        _factories[typeof(T)]());

            return(result.Success);
        }
예제 #2
0
        public bool ConsumeZonePointWithNetwork <T>(ZonePoint point)
            where T : BaseInfrastructureNetworkZoneConsumption
        {
            var zoneInfo = point.GetZoneInfoOn(Area).MatchingObject;

            if (zoneInfo.ConsumptionState.GetIsNetworkMember <T>())
            {
                return(true);
            }

            return(ConsumeZonePointWith <T>(point));
        }