Ejemplo n.º 1
0
        /// <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();
        }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
        /// <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();
        }
Ejemplo n.º 4
0
        /// <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();
        }
Ejemplo n.º 5
0
		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());
			}
		}
Ejemplo n.º 6
0
        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());
            }
        }