public TypeScriptContext CreateContext(FileName fileName, string text) { TypeScriptContext context = factory.CreateContext(); context.AddFile(fileName, text); context.RunInitialisationScript(); context.GetCompletionItemsForTheFirstTime(); cachedContexts.Add(fileName, context); return(context); }
public TypeScriptContext CreateProjectContext(TypeScriptProject project) { TypeScriptContext context = factory.CreateContext(); projectContexts.Add(context); foreach (FileName typeScriptFileName in project.GetTypeScriptFileNames()) { AddFileToProjectContext(context, typeScriptFileName); } context.RunInitialisationScript(); context.GetCompletionItemsForTheFirstTime(); return(context); }