zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Unity/Assets/Hotfix/Logic/Model/Module/Data/DataTableHelper.cs

35 lines
759 B
C#

using ET;
#if !SERVER
using ET;
#endif
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace ET
{
public static class DataTableHelper
{
public static T Get<T>(long id) where T : class
{
var ret = ConfigComponent.Instance.Get<T>(id);
if (ret == null)
Log.Error($"{typeof(T).Name} == null where Id = {id}");
return ret;
}
public static T Get<T>(int id) where T : class
{
return Get<T>((long)id);
}
public static IEnumerable<T> GetAll<T>()where T : class
{
return ConfigComponent.Instance.GetAll<T>();
}
}
}