public static DataStoreEntryAttribute GetDataStoreEntry(this DataStoreKey value) { FieldInfo fi = value.GetType().GetField(value.ToString()); DataStoreEntryAttribute[] entryAttributes = (DataStoreEntryAttribute[])fi.GetCustomAttributes(typeof(DataStoreEntryAttribute), false); if (entryAttributes.Length > 0) { return(entryAttributes[0]); } return(null); }
public static string GetKey(this DataStoreKey value) { return(value.ToString("G")); }