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 PortWareIdentifier GetPortWareIdentifier(PortServiceTypes serviceType) { PortWareIdentifier identifier; return(Enum.TryParse(serviceType.ToString(), out identifier) ? identifier : PortWareIdentifier.Null); }
public float GetPrice(PortServiceTypes serviceType, float quantity, PortTradeDirection direction) { var identifier = PortHelper.GetPortWareIdentifier(serviceType); return(GetPrice(identifier, quantity, direction)); }
public PortService(PortServiceTypes serviceType, string name, int currentPrice) { ServiceType = serviceType; Name = name; CurrentPrice = currentPrice; }