1
hutongqing
2024-12-18 70f22c9c06c7dfe2a2a83c0d2fcc79892dba7d8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace WIDESEA_Common.TaskEnum
{
    public static class TaskEnumHelper
    {
        public static List<int> GetEnumIndexList(this Type type)
        {
            if (type is null) throw new ArgumentNullException("type");
            if (!type.IsEnum) return new List<int>();
            return Enum.GetValues(type).Cast<int>().ToList();
        }
    }
}