示例#1
0
        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);
        }
示例#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);
        }
示例#3
0
 public static string ToString2(this apiVer enumVal)
 {
     return(enumVal.ToString().Replace("_", "-"));//for language_strings
 }
示例#4
0
 public apiVerAttribute(apiVer _apigroup)
 {
     this.value = _apigroup;
 }