35 lines
759 B
C#
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>();
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|