Пример #1
0
        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);
        }
Пример #2
0
        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);
        }