private async static Task AddScript(string filePath, string extension, IEnumerable <IntellisenseObject> list) { string resultPath = filePath + extension; if (!File.Exists(resultPath)) { return; } await IntellisenseWriter.Write(list, resultPath); var item = ProjectHelpers.AddFileToProject(filePath, resultPath); if (item == null) { return; } if (extension.Equals(IntellisenseParser.Ext.TypeScript, StringComparison.OrdinalIgnoreCase)) { item.Properties.Item("ItemType").Value = "TypeScriptCompile"; } else { item.Properties.Item("ItemType").Value = "None"; } }
private static void AddScript(string filePath, string extension, List<IntellisenseObject> list) { string resultPath = filePath + extension; if (!File.Exists(resultPath)) return; IntellisenseWriter writer = new IntellisenseWriter(); writer.Write(list, resultPath); var item = MarginBase.AddFileToProject(filePath, resultPath); if (extension.Equals(".d.ts", StringComparison.OrdinalIgnoreCase)) item.Properties.Item("ItemType").Value = "TypeScriptCompile"; else { item.Properties.Item("ItemType").Value = "None"; } }