public static apiType GetApiType(this suffix enumVal) { var typeInfo = enumVal.GetType().GetTypeInfo(); var v = typeInfo.DeclaredMembers.First(x => x.Name == enumVal.ToString()); apiType a = v.GetCustomAttribute <ApiTypeAttribute>().ApiType; return(a); }
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); }