public static bool GetServiceType(PortWareIdentifier wareType, out PortServiceTypes serviceType) { bool success = Enum.TryParse(wareType.ToString(), out serviceType); if (!success) { serviceType = PortServiceTypes.Null; } return(success); }
public static bool GetCargoType(PortWareIdentifier wareType, out StatelessCargoTypes cargoType) { bool success = Enum.TryParse(wareType.ToString(), out cargoType); if (!success) { cargoType = StatelessCargoTypes.Null; } return(success); }