public static string GetVersion(this apiVer enumVal) { var typeInfo = enumVal.GetType().GetTypeInfo(); var v = typeInfo.DeclaredMembers.First(x => x.Name == enumVal.ToString()); string version = v.GetCustomAttribute <VersionAttribute>().Description.ToString("F1").Replace(",", "."); return(version); }
public static apiVer GetApiGroup(this suffix enumVal) { var typeInfo = enumVal.GetType().GetTypeInfo(); var v = typeInfo.DeclaredMembers.First(x => x.Name == enumVal.ToString()); apiVer y = v.GetCustomAttribute <apiVerAttribute>().ApiVer; return(y); }
public static string ToString2(this apiVer enumVal) { return(enumVal.ToString().Replace("_", "-"));//for language_strings }
public apiVerAttribute(apiVer _apigroup) { this.value = _apigroup; }