2020-12-28 14:55:48 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Hncore.Infrastructure.Extension
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 程序集扩展类
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public static class AssemblyExtension
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
///得到程序集友好名字
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="para"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public static string GetFriendName(this Assembly asm)
|
|
|
|
|
|
{
|
|
|
|
|
|
return asm.ManifestModule?.Name?.TrimEnd(".dll".ToCharArray());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-10-07 20:25:03 +08:00
|
|
|
|
}
|