public void RunInitialisationScript() { if (runInitialization) { runInitialization = false; if (context != null) { context.Run(scriptLoader.GetMainScript()); } } }
public TypeScriptContext(IJavaScriptContext context, IScriptLoader scriptLoader, ILogger logger) { this.context = context; this.scriptLoader = scriptLoader; host = new LanguageServiceShimHost(logger); host.AddDefaultLibScript(new FileName(scriptLoader.LibScriptFileName), scriptLoader.GetLibScript()); if (context != null) { context.SetParameter("host", host); context.Run(scriptLoader.GetTypeScriptServicesScript()); } }