d_sms_service/APT.Utility/ServiceUtils.cs

30 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-10-28 13:45:58 +08:00
using APT.Infrastructure.Core;
namespace APT.Utility
{
public class ServiceUtils
{
///// <summary>
///// 获取接口的公共方法
///// </summary>
///// <typeparam name="T"></typeparam>
///// <returns></returns>
//public static ICommonService<T> GetCommonService<T>() where T : EntityBase<global::System.Guid>, new()
//{
// ServiceLocator serviceLocator = APT.Infrastructure.Api.ServiceLocator.Instance;
// serviceLocator.RegisterType(typeof(CommonService<T>), typeof(ICommonService<T>));
// return serviceLocator.GetService<ICommonService<T>>();
//}
///// <summary>
///// 获取接口的公共方法
///// </summary>
///// <typeparam name="T"></typeparam>
///// <returns></returns>
//public static ITreeCommonService<T> GetTreeCommonService<T>() where T : MesTreeEntityBase, new()
//{
// ServiceLocator serviceLocator = APT.Infrastructure.Api.ServiceLocator.Instance;
// serviceLocator.RegisterType(typeof(TreeCommonService<T>), typeof(ITreeCommonService<T>));
// return serviceLocator.GetService<ITreeCommonService<T>>();
//}
}
}