public bool AttachAddIn(string dllPath, string name = "", NativeApiEnums type = NativeApiEnums.OneScript) { if (type == NativeApiEnums.OneScript) { var assembly = System.Reflection.Assembly.LoadFrom(dllPath); EngineInstance.AttachExternalAssembly(assembly, EngineInstance.Environment); return(true); } else { if (!Utils.IsValidIdentifier(name)) { throw RuntimeException.InvalidArgumentValue(name); } return(NativeApiFactory.Register(dllPath, name)); } }
public void AttachAddIn(string dllPath) { var assembly = System.Reflection.Assembly.LoadFrom(dllPath); EngineInstance.AttachExternalAssembly(assembly, EngineInstance.Environment); }