mh_sms/APT.Utility/ServiceUtils.cs
2024-04-12 16:50:28 +08:00

30 lines
1.2 KiB
C#

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>>();
//}
}
}