public void Compile(FileName fileName, TypeScriptProject project, TypeScriptContext context)
        {
            ReportCompileStarting(fileName);

            project.CreateOutputDirectory();

            var compiler = new LanguageServiceCompiler(context);

            UpdateFile(context, fileName);
            LanguageServiceCompilerResult result = compiler.Compile(fileName, project);

            if (result.HasErrors)
            {
                Report(result.GetError());
            }
            ReportCompileFinished(result.HasErrors);
        }
        void CompileFiles(TypeScriptProject project, FileName[] fileNames)
        {
            ReportCompileStarting(project);

            bool errors = false;
            TypeScriptContext context = TypeScriptService.ContextProvider.GetContext(fileNames.First());
            var compiler = new LanguageServiceCompiler(context);

            project.CreateOutputDirectory();

            foreach (FileName fileName in fileNames)
            {
                UpdateFile(context, fileName);
                LanguageServiceCompilerResult result = compiler.Compile(fileName, project);

                if (result.HasErrors)
                {
                    errors = true;
                    Report(result.GetError());
                }
            }
            ReportCompileFinished(errors);
        }