Esempio n. 1
0
        public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
        {
            if ((value == null))
            {
                return(null);
            }
            ChargeKind valueCasted = ((ChargeKind)(value));

            if ((valueCasted == ChargeKind.AuxiliaryCharge))
            {
                return("auxiliaryCharge");
            }
            if ((valueCasted == ChargeKind.ConsumptionCharge))
            {
                return("consumptionCharge");
            }
            if ((valueCasted == ChargeKind.Other))
            {
                return("other");
            }
            if ((valueCasted == ChargeKind.DemandCharge))
            {
                return("demandCharge");
            }
            if ((valueCasted == ChargeKind.TaxCharge))
            {
                return("taxCharge");
            }
            throw new ArgumentOutOfRangeException("value");
        }
Esempio n. 2
0
 public static string Charge(string ship_ids, ChargeKind kind = ChargeKind.BOTH)
 {
     StringBuilder str = new StringBuilder();
     str.AppendFormat("api_verno={0}&", 1);
     str.AppendFormat("api_id_items={0}&", ship_ids);
     str.AppendFormat("api_onslot={0}&", 1);
     str.Append("api_token={0}&");
     str.AppendFormat("api_kind={0}", (int) kind);
     return str.ToString();
 }
Esempio n. 3
0
        public static string Charge(string ship_ids, ChargeKind kind = ChargeKind.BOTH)
        {
            StringBuilder str = new StringBuilder();

            str.AppendFormat("api_verno={0}&", 1);
            str.AppendFormat("api_id_items={0}&", ship_ids);
            str.AppendFormat("api_onslot={0}&", 1);
            str.Append("api_token={0}&");
            str.AppendFormat("api_kind={0}", (int)kind);
            return(str.ToString());
        }
Esempio n. 4
0
 public static string Charge(ChargeKind kind = ChargeKind.BOTH, params int[] ship_ids)
 {
     return(Charge(string.Join(",", ship_ids)));
 }
Esempio n. 5
0
 public static string Charge(ChargeKind kind = ChargeKind.BOTH, params int[] ship_ids)
 {
     return Charge(string.Join(",", ship_ids));
 }