Example #1
0
        public static bool GetServiceType(PortWareIdentifier wareType, out PortServiceTypes serviceType)
        {
            bool success = Enum.TryParse(wareType.ToString(), out serviceType);

            if (!success)
            {
                serviceType = PortServiceTypes.Null;
            }

            return(success);
        }
Example #2
0
        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));
        }
Example #4
0
 public PortService(PortServiceTypes serviceType, string name, int currentPrice)
 {
     ServiceType  = serviceType;
     Name         = name;
     CurrentPrice = currentPrice;
 }