public IDictionary <string, object> AsKeyValuePairs() { return(new Dictionary <string, object> { ["Date Earned"] = DateEarned.HasValue() ? DateEarned.YMDString() : null, ["Flight ID"] = FlightID.ToString(CultureInfo.InvariantCulture), ["Checkride Type"] = CheckrideType.ToString(), ["Privilege"] = Privilege, ["License Kind"] = LicenseKind.ToString(), ["Level"] = Level.ToString() }); }
public override int GetHashCode() { unchecked { var hashCode = -1114257941; hashCode = hashCode * -1521134295 + DateEarned.GetHashCode(); hashCode = hashCode * -1521134295 + FlightID.GetHashCode(); hashCode = hashCode * -1521134295 + CheckrideType.GetHashCode(); hashCode = hashCode * -1521134295 + LicenseKind.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(LicenseName); hashCode = hashCode * -1521134295 + CheckrideProperty.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Privilege); hashCode = hashCode * -1521134295 + Level.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(DisplayString); return(hashCode); } }
public static string Name(this CheckrideType ct) { return(ct == CheckrideType.NewRating ? Resources.Achievements.LicenseNewRating : Resources.Achievements.LicenseNewPrivilege); }
public override string ToString() { return(String.Format(CultureInfo.CurrentCulture, "{0:d} {1} {2} ({3})", DateEarned, LicenseName, CheckrideType.Name(), Privilege)); }