// 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. PCI总线学习

    PCI总线概述: 因为不实际操作了,所以就写一些方法论上的东西,纪念一下. PCI总线有三个非常显著的优点: 1. 在计算机和外设传输数据时具有更好的性能. 2. 能够尽量独立于具体的平台. 3. 可 ...

  2. MySQL binlog反解析

    反解析delete语句 背景:delete table忘了加条件导致整张表被删除 恢复方式:直接从binlog里反解析delete语句为insert进行恢复 导出删指定表的DELETE语句: # my ...

  3. 爬虫请求库 requests

    requests模块   阅读目录 一 介绍 二 基于GET请求 三 基于POST请求 四 响应Response 五 高级用法 一 介绍 #介绍:使用requests可以模拟浏览器的请求,比起之前用到 ...

  4. c# 字段成员

  5. linux alsa音频中采样率fs、比特率BCLK 、主时钟MCLK关系

    转:https://blog.csdn.net/lugandong/article/details/72468831 一.拿512fs说话: 看图知道采样的位深是32bit(位),左右声道各占了8*3 ...

  6. [nginx] nginx使用SNI功能的方法

    SNI是什么 在使用TLS的时候,http server希望根据HTTP请求中HOST的不同,来决定使用不同的证书. SNI细节 由于HTTP的HOST字段在HTTP GET中.而TLS的握手以及证书 ...

  7. jar命令详解

    原文链接:https://www.cnblogs.com/anyehome/p/9435371.html JAR包是Java中所特有一种压缩文档,其实大家就可以把它理解为.zip包.当然也是有区别的, ...

  8. Redis 从入门到放弃

    Redis 从入门到放弃 http://www.iocoder.cn/Fight/Redis-went-from-getting-started-to-quitting/

  9. Electron Apps Are Bad, So Now You Can Create Desktop Apps With HTML5 + Golang

    原文:https://www.phoronix.com/scan.php?page=news_item&px=HTML5-Golang-Desktop-Apps --------------- ...

  10. Spring Boot起步依赖:定制starter

    在定制我们自己的起步依赖--xxx.spring.boot.starter之前,我们先了解下什么是Spring Boot起步依赖. 起步依赖,是Spring Boot带给我们的一项重要的便利.要理解S ...