protected CustomFlightProperty PropertyWithValue(CustomPropertyType.KnownProperties id, string value)
        {
            if (String.IsNullOrEmpty(value))
            {
                return(null);
            }

            CustomFlightProperty cfp = new CustomFlightProperty(PropTypes.FirstOrDefault(cpt => cpt.PropTypeID == (int)id));

            cfp.InitFromString(value);
            return((cfp.IsDefaultValue) ? null : cfp);
        }
 protected CustomFlightProperty PropertyWithValue(CustomPropertyType.KnownProperties id, DateTime value, bool fUTC)
 {
     return((value.HasValue()) ? PropertyWithValue(id, fUTC ? value.FormatDateZulu() : value.ToString(CultureInfo.CurrentCulture)) : null);
 }
 protected CustomFlightProperty PropertyWithValue(CustomPropertyType.KnownProperties id, bool value)
 {
     return((value) ? PropertyWithValue(id, value.ToString(CultureInfo.CurrentCulture)) : null);
 }
 protected CustomFlightProperty PropertyWithValue(CustomPropertyType.KnownProperties id, decimal value)
 {
     return((value == 0) ? null : PropertyWithValue(id, value.ToString(CultureInfo.CurrentCulture)));
 }
示例#5
0
 public bool ContainsProperty(CustomPropertyType.KnownProperties kp)
 {
     return(m_propertyTypes.Contains((int)kp));
 }