private TypeScriptCompilation(string inputFilePath, TypeScriptCompilationOptions options, ITypeScriptCompiler compiler)
 {
     _compiler      = compiler;
     _inputFilePath = inputFilePath;
     _options       = options;
 }
        public static async Task <TypeScriptCompilation> CompileAsync(string inputFile, TypeScriptCompilationOptions options, ITypeScriptCompiler compiler = null)
        {
            var compilation = new TypeScriptCompilation(inputFile, options, compiler ?? _defaultCompiler.Value);
            await compilation.CompileAsync();

            return(compilation);
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DynamicTypeScriptCompilerMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next.</param>
 /// <param name="compiler">The compiler.</param>
 public DynamicTypeScriptCompilerMiddleware(RequestDelegate next, ITypeScriptCompiler compiler)
 {
     _next     = next;
     _compiler = compiler;
 }