// 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的加载的更多相关文章

  1. ASM:《X86汇编语言-从实模式到保护模式》第13章:保护模式下内核的加载,程序的动态加载和执行

    ★PART1:32位保护模式下内核简易模型 1. 内核的结构,功能和加载 每个内核的主引导程序都会有所不同,因为内核都会有不同的结构.有时候主引导程序的一些段和内核段是可以共用的(事实上加载完内核以后 ...

  2. 《Linux内核设计的艺术》学习笔记(一)从开机加电到加载三个汇编源码

      实验内核版本:0.11 ◆ 从开机到main函数的三步: ① 启动BIOS,准备实模式下的中断向量表和中断服务程序: ② 从启动盘加载OS程序到内存中,加载OS程序的工作就是利用第一步中的中断服务 ...

  3. dll的两种加载方式(pend)+ delayload

    看过关于动态库的调用例子,于是决定动手做一做:dll的对外接口声明头文件,Mydll.h: //Mydll.h #include <stdio.h> #include <stdlib ...

  4. ELF文件的加载过程(load_elf_binary函数详解)--Linux进程的管理与调度(十三)

    加载和动态链接 从编译/链接和运行的角度看,应用程序和库程序的连接有两种方式. 一种是固定的.静态的连接,就是把需要用到的库函数的目标代码(二进制)代码从程序库中抽取出来,链接进应用软件的目标映像中: ...

  5. Linux驱动之内核加载模块过程分析

    Linux内核支持动态的加载模块运行:比如insmod first_drv.ko,这样就可以将模块加载到内核所在空间供应用程序调用.现在简单描述下insmod first_drv.ko的过程 1.in ...

  6. 反射01 Class类的使用、动态加载类、类类型说明、获取类的信息

    0 Java反射机制 反射(Reflection)是 Java 的高级特性之一,是框架实现的基础. 0.1 定义 Java 反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法:对 ...

  7. module加载过程初步分析[更新中]【转】

    转自:http://blog.chinaunix.net/uid-1817735-id-2837068.html 分析这个过程可以有助于我们认识在加载模块时出现的问题大抵在哪里了. 直接从sys_in ...

  8. opengl加载多个3ds模型失败记

    VC6 下载 http://blog.csdn.net/bcbobo21cn/article/details/44200205 opengl环境配置 http://blog.csdn.net/bcbo ...

  9. Windows加载器与模块初始化

    本文是Matt Pietrek在1999年9月的MSJ杂志上发表的关于Windows加载器与模块初始化方面的文章.作者深入分析了LdrpRunInitialize璕outines例程的作用,用C语言写 ...

随机推荐

  1. L ==> E · L · K

    三剑客:Elastic Stack 在学习ELK前,先对 Lucene作基本了解. 今天才知道关系型数据库的索引是 B-Tree,罪过... 减少磁盘寻道次数 ---> 提高查询性能 Lucen ...

  2. 【视频】谷歌大佬30分钟让你入门机器学习(2019谷歌I/O资源分享)

    如果你是个谷粉,就一定会知道: 谷歌向来都很大胆.当所有的科技公司都在讲产品.讲利润的时候,2019年的谷歌开发者大会的主题却是:人文关怀.要知道,这是政府操心的事,而不是一家公司的任务. 谷歌敢这样 ...

  3. Mybatis.NET Oracle 线上神奇问题:Value does not fall within the expected range.

    1.错误现象 在向数据库查询一条数据的时候报如下错误: Value does not fall within the expected range. at Oracle.ManagedDataAcce ...

  4. Centos 6.x开机启动流程

    Centos 6.x开机启动流程 BIOS(COMS)检查 加载Bios,bios包含所有硬件信息(CPU,内存,硬盘,时钟,鼠标键盘等等) 读MBR 硬盘上第0磁道第一个扇区被称为MBR(maste ...

  5. JVM系列四:类加载

    类的生命周期 加载->验证->准备->解析->初始化->使用->卸载 类加载过程 类加载包括以上的前五个过程:加载,验证,准备,解析,初始化 加载 1.主要完成三个 ...

  6. VGG网络的Pytorch实现

    1.文章原文地址 Very Deep Convolutional Networks for Large-Scale Image Recognition 2.文章摘要 在这项工作中,我们研究了在大规模的 ...

  7. 【转】用 Consul 来做服务注册与服务发现

    原文:https://segmentfault.com/a/1190000018731395?utm_source=tag-newest ------------------------------- ...

  8. 数据库中聚合索引(MySQL和SQL Server区别)

    一.聚集索引和非聚集索引 聚集索引:类似字典的拼音目录.表中的数据按照聚集索引的规则来存储的.就像新华字典.整本字典是按照A-Z的顺序来排列.这也是一个表只能有一个聚集索引的原因.因为这个特点,具体索 ...

  9. vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.

    默认,webpack无法打包.vue文件,需要安装 相关的loader: cnpm i vue-loader vue-template-compiler -D 提示以下错误信息: Module Err ...

  10. shell 学习笔记2

    shell的常用处理:https://github.com/dylanaraps/pure-bash-bible -d作为分隔符:read xargs -t作为分隔符:sort -F作为分隔符:awk ...