private AiModRuleset InstantiateRuleset(AiModRulesetAttribute info) { AppDomain appDomain; if (!appDomains.TryGetValue(info, out appDomain)) { appDomain = CreateAppDomain(info); appDomains[info] = appDomain; } return((AiModRuleset)appDomain.CreateInstanceAndUnwrap(info.RulesetName, info.EntryType)); }
private AppDomain CreateAppDomain(AiModRulesetAttribute info) { AppDomainSetup domainSetup = new AppDomainSetup() { ApplicationName = info.RulesetName, ConfigurationFile = info.RulesetName + ".dll.config", ApplicationBase = AppDomain.CurrentDomain.BaseDirectory, DisallowCodeDownload = true, PrivateBinPath = AIMOD_PLUGIN_DIRECTORY }; AppDomain appDomain = AppDomain.CreateDomain(domainSetup.ApplicationName, AppDomain.CurrentDomain.Evidence, domainSetup); return(appDomain); }
// Token: 0x06001A5B RID: 6747 // RVA: 0x00080EDC File Offset: 0x0007F0DC private AppDomain method_2(AiModRulesetAttribute aiModRulesetAttribute_0) { AppDomainSetup appDomainSetup = new AppDomainSetup { ApplicationName = aiModRulesetAttribute_0.RulesetName, ConfigurationFile = aiModRulesetAttribute_0.RulesetName + ".dll.config", ApplicationBase = AppDomain.CurrentDomain.BaseDirectory, DisallowCodeDownload = true, PrivateBinPath = "Plugins/AiMod" }; return AppDomain.CreateDomain(appDomainSetup.ApplicationName, AppDomain.CurrentDomain.Evidence, appDomainSetup); }
// Token: 0x06001A5C RID: 6748 // RVA: 0x00080F50 File Offset: 0x0007F150 private AiModRuleset method_3(AiModRulesetAttribute aiModRulesetAttribute_0) { AppDomain appDomain; if (!this.dictionary_0.TryGetValue(aiModRulesetAttribute_0, out appDomain)) { appDomain = this.method_2(aiModRulesetAttribute_0); this.dictionary_0[aiModRulesetAttribute_0] = appDomain; } return (AiModRuleset)appDomain.CreateInstanceAndUnwrap(aiModRulesetAttribute_0.RulesetName, aiModRulesetAttribute_0.EntryType); }