routine的加载
// Hearthbuddy.Windows.MainWindow
// Token: 0x06000245 RID: 581 RVA: 0x0008C318 File Offset: 0x0008A518
[CompilerGenerated]
private void method_27()
{
List<IRoutine> routines = RoutineManager.Routines;
this.comboBox_1.ItemsSource = routines;
if (CommandLine.Arguments.Exists("routine"))
{
MainWindow.Class28 @class = new MainWindow.Class28();
@class.string_0 = CommandLine.Arguments.Single("routine");
IRoutine routine = routines.FirstOrDefault(new Func<IRoutine, bool>(@class.method_0));
if (routine != null)
{
this.comboBox_1.SelectedItem = routine;
}
}
else if (!string.IsNullOrEmpty(MainSettings.Instance.LastRoutine))
{
MainWindow.Class29 class2 = new MainWindow.Class29();
class2.string_0 = MainSettings.Instance.LastRoutine;
IRoutine routine2 = routines.FirstOrDefault(new Func<IRoutine, bool>(class2.method_0));
if (routine2 != null)
{
this.comboBox_1.SelectedItem = routine2;
}
}
if (this.comboBox_1.SelectedItem == null)
{
this.comboBox_1.SelectedItem = routines.FirstOrDefault<IRoutine>();
}
this.method_14();
}
// Triton.Bot.RoutineManager
// Token: 0x060011D3 RID: 4563 RVA: 0x000B7424 File Offset: 0x000B5624
public static bool Load()
{
try
{
string routinesPath = RoutineManager.RoutinesPath;
if (RoutineManager.Routines != null)
{
RoutineManager.ilog_0.ErrorFormat("[Load] This function can only be called once.", Array.Empty<object>());
return false;
}
if (!Directory.Exists(routinesPath))
{
Directory.CreateDirectory(routinesPath);
}
AssemblyLoader<IRoutine> assemblyLoader = new AssemblyLoader<IRoutine>(routinesPath, false);
RoutineManager.Routines = new List<IRoutine>();
foreach (IRoutine routine in assemblyLoader.Instances.AsReadOnly())
{
try
{
Utility.smethod_0(routine);
routine.Initialize();
RoutineManager.Routines.Add(routine);
}
catch (Exception exception)
{
RoutineManager.ilog_0.Debug("[Load] Exception thrown when initializing " + routine.Name + ". Routine will not be loaded.", exception);
Utility.smethod_1(routine);
routine.Deinitialize();
}
}
return true;
}
catch (Exception arg)
{
RoutineManager.ilog_0.ErrorFormat("[Load] An exception occurred: {0}.", arg);
}
return false;
}
routine的加载的更多相关文章
- ASM:《X86汇编语言-从实模式到保护模式》第13章:保护模式下内核的加载,程序的动态加载和执行
★PART1:32位保护模式下内核简易模型 1. 内核的结构,功能和加载 每个内核的主引导程序都会有所不同,因为内核都会有不同的结构.有时候主引导程序的一些段和内核段是可以共用的(事实上加载完内核以后 ...
- 《Linux内核设计的艺术》学习笔记(一)从开机加电到加载三个汇编源码
实验内核版本:0.11 ◆ 从开机到main函数的三步: ① 启动BIOS,准备实模式下的中断向量表和中断服务程序: ② 从启动盘加载OS程序到内存中,加载OS程序的工作就是利用第一步中的中断服务 ...
- dll的两种加载方式(pend)+ delayload
看过关于动态库的调用例子,于是决定动手做一做:dll的对外接口声明头文件,Mydll.h: //Mydll.h #include <stdio.h> #include <stdlib ...
- ELF文件的加载过程(load_elf_binary函数详解)--Linux进程的管理与调度(十三)
加载和动态链接 从编译/链接和运行的角度看,应用程序和库程序的连接有两种方式. 一种是固定的.静态的连接,就是把需要用到的库函数的目标代码(二进制)代码从程序库中抽取出来,链接进应用软件的目标映像中: ...
- Linux驱动之内核加载模块过程分析
Linux内核支持动态的加载模块运行:比如insmod first_drv.ko,这样就可以将模块加载到内核所在空间供应用程序调用.现在简单描述下insmod first_drv.ko的过程 1.in ...
- 反射01 Class类的使用、动态加载类、类类型说明、获取类的信息
0 Java反射机制 反射(Reflection)是 Java 的高级特性之一,是框架实现的基础. 0.1 定义 Java 反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法:对 ...
- module加载过程初步分析[更新中]【转】
转自:http://blog.chinaunix.net/uid-1817735-id-2837068.html 分析这个过程可以有助于我们认识在加载模块时出现的问题大抵在哪里了. 直接从sys_in ...
- opengl加载多个3ds模型失败记
VC6 下载 http://blog.csdn.net/bcbobo21cn/article/details/44200205 opengl环境配置 http://blog.csdn.net/bcbo ...
- Windows加载器与模块初始化
本文是Matt Pietrek在1999年9月的MSJ杂志上发表的关于Windows加载器与模块初始化方面的文章.作者深入分析了LdrpRunInitialize璕outines例程的作用,用C语言写 ...
随机推荐
- Haddop完全分布式集群搭建
hadoop完全分布式搭建 建议(遇到的坑): 如果自己用的操作系统就是linux,我本身是deepin系统,装了两台虚拟机,结果,用户名没有配置,导致启动不了,因为hadoop的master节点启动 ...
- 原生Ajax代码实现
Ajax Asynchronous JavaScript And XML 异步: 指一段程序执行时不会阻塞其他程序执行,其表现形式为程序的执行顺序不依赖程序本身的书写顺序 ,相反的则为同步, 自己 ...
- HTML&CSS基础-清除浮动
HTML&CSS基础-清除浮动 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看浮动效果 1>.HTML源代码 <!DOCTYPE html> &l ...
- 从excel 导入数据绘制 散点图
import xlrdimport matplotlib.pyplot as plt bok = xlrd.open_workbook(r'test.xls') sht = bok.sheets()[ ...
- java基础(1)----简介
基础语法. 面向对象. 字符串和集合. IO流. 接口. lambda. 方法引用. Stream. 模块化. 一.java的前世今生: J2SE:标准体验版.J2EE:企业版.J2ME:小型版(移动 ...
- Composer的安装以及替换为国内镜像
Composer的安装以及使用国内镜像 Composer 学习网址 Composer官网 https://getcomposer.org/ Composer中文网 http://www.phpcomp ...
- MySQL Navicat Premium 保存sql语句
一.新建查询 二.编写sql语句并保存 1.保存到内部 1.Ctrl+s保存当前查询文件 2.下次打开可点击查询点击上次保存的查询文件名打开上次查询的文件 2.保存到外部 1.默认保存至 C:\Use ...
- JSP数据交互(二)
Application:当前服务器(可以包含多个会话):当服务器启动后就会创建一个application对象,被所有用户共享page.request.session.application四个作用域对 ...
- 十四.自定义yum仓库、源码编译安装
pc7:192.168.4.7 1.自定义yum仓库1.1 源码仓库下:/root/tools/other]# createrepo .]# ls ntfs-3g-2014.2.15-6.el6.x8 ...
- 四十一.redis主从复制 RDB/AOF持久化 数据类型
把redis集群里的主机 恢复为独立的redis服务器(51-58) ]# redis-cli -h 192.168.4.51 -p 6351 shutdown ]# rm -rf /var/lib ...