/// <summary> /// 获取信息 /// </summary> /// <param name="leaf"></param> /// <returns></returns> public static IExtInfoGetter GetInformations(this LeafExtensionBase leaf) { var filted = from wrapper in OpenFx.LibsManager.Wrappers() where wrapper.Info.ExtType == leaf.GetType() select wrapper; return(filted.First().Info); }
/// <summary> /// 获取图标数组 /// </summary> /// <param name="leaf"></param> /// <returns></returns> public static string GetName(this LeafExtensionBase leaf) { var filted = from wrapper in OpenFx.LibsManager.Wrappers() where wrapper.Info.ExtType == leaf.GetType() select wrapper; var result = filted.First(); return(result.Info.Name); }
/// <summary> /// 获取图标数组 /// </summary> /// <param name="leaf"></param> /// <returns></returns> public static byte[] GetIconBytes(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.Icon); }
public LeafEntryExecutor(LeafExtensionBase ext, ApiAllocator apiAllocator) { this.ext = ext ?? throw new ArgumentNullException(nameof(ext)); this.apiAllocator = apiAllocator ?? throw new ArgumentNullException(nameof(apiAllocator)); entry = FindEntry(); }
/// <summary> /// 通过抛出指定的异常中断模块主要流程 /// </summary> /// <exception cref="LeafTerminatedException"></exception> /// <param name="leaf"></param> /// <param name="exitCode"></param> public static void EndCurrentLeafThread(this LeafExtensionBase leaf, int exitCode = 0) { throw new LeafTerminatedException(exitCode); }
public ApiAllocator(LeafExtensionBase leafInstance) { this.leafInstance = leafInstance ?? throw new ArgumentNullException(nameof(leafInstance)); }
public LeafPropertyInjector(LeafExtensionBase ext, ApiAllocator apiAllocator) { this.ext = ext ?? throw new System.ArgumentNullException(nameof(ext)); this.apiAllocator = apiAllocator ?? throw new System.ArgumentNullException(nameof(apiAllocator)); }
public LSignalDistributor(LeafExtensionBase ext) { this.ext = ext ?? throw new ArgumentNullException(nameof(ext)); }