/// <summary> /// 获取信息 /// </summary> /// <param name="leaf"></param> /// <returns></returns> public static IExtensionInfoDictionary GetInformations(this LeafExtensionBase leaf) { var filted = from wrapper in OpenFxLoader.LibsManager.Wrappers() where wrapper.Info.ExtType == leaf.GetType() select wrapper; return(filted.First().Info); }
/// <summary> /// 寻找一个LeafExtension的入口点函数 /// </summary> /// <param name="leaf"></param> /// <returns></returns> internal static MethodInfo FindEntryPoint(this LeafExtensionBase leaf) { if (leaf == null) { throw new System.ArgumentNullException(nameof(leaf)); } return(FindEntry(leaf.GetType())); }
/// <summary> /// 获取图标数组 /// </summary> /// <param name="leaf"></param> /// <returns></returns> public static string GetName(this LeafExtensionBase leaf) { var filted = from wrapper in OpenFxLoader.LibsManager.Wrappers() where wrapper.Info.ExtType == leaf.GetType() select wrapper; var result = filted.First(); return(result.Info.Name); }