/// <summary> /// Initializes a new instance of the <see cref="JSLintContext" /> class. /// </summary> /// <param name="javaScriptContextFactory">The JavaScript context factory.</param> /// <param name="jsonProvider">The JSON provider.</param> internal JSLintContext(Func <IJavaScriptContext> javaScriptContextFactory, IJsonProvider jsonProvider) { this.context = javaScriptContextFactory(); this.jsonProvider = jsonProvider; this.LoadJSLint(); }
/// <summary> /// Initializes a new instance of the <see cref="JSLintContext" /> class. /// </summary> /// <param name="javaScriptContextFactory">The JavaScript context factory.</param> /// <param name="jsonProvider">The JSON provider.</param> internal JSLintContext(Func<IJavaScriptContext> javaScriptContextFactory, IJsonProvider jsonProvider) { this.context = javaScriptContextFactory(); this.jsonProvider = jsonProvider; this.LoadJSLint(); }
/// <summary> /// Initializes a new instance of the <see cref="JSLintContext" /> class. /// </summary> /// <param name="abstractionFactory">The abstraction factory.</param> /// <param name="jsonProvider">The JSON provider.</param> /// <param name="fileSystemWrapper">The file system wrapper.</param> internal JSLintContext(IAbstractionFactory abstractionFactory, IJsonProvider jsonProvider, IFileSystemWrapper fileSystemWrapper) { this.context = abstractionFactory.CreateJavaScriptContext(); this.jsonProvider = jsonProvider; this.fileSystemWrapper = fileSystemWrapper; this.LoadJSLint(); }
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()); } }