예제 #1
0
 /// <summary>
 /// Determines whether the container is appropriate for the sopplied configuration.
 /// </summary>
 /// <param name="config">The configuration.</param>
 /// <returns>true if valid, otherwise false</returns>
 public bool IsMatchContainer(TruckConfiguration config)
 {
     return(EquipmentConfiguration.Container != null &&
            EquipmentConfiguration.ContainerOwner != null &&
            config.EquipmentConfiguration.Container != null &&
            config.EquipmentConfiguration.ContainerOwner != null &&
            EquipmentConfiguration.Container == config.EquipmentConfiguration.Container &&
            EquipmentConfiguration.ContainerOwner == config.EquipmentConfiguration.ContainerOwner);
 }
예제 #2
0
        /// <summary>
        /// Determines whether the chassis is appropriate for the supplied configuration.
        /// </summary>
        /// <param name="config">The configuration.</param>
        /// <returns>true if valid, otherwise false</returns>
        public bool IsMatchChassis(TruckConfiguration config)
        {
            if (EquipmentConfiguration.Chassis == null || config.EquipmentConfiguration.Chassis == null)
            {
                return(false);
            }

            return(EquipmentConfiguration.Chassis == config.EquipmentConfiguration.Chassis &&
                   EquipmentConfiguration.ChassisOwner == config.EquipmentConfiguration.ChassisOwner);
        }