Exemplo n.º 1
0
        private void OpenTextInNewTab(string text)
        {
            TempFileManager.PurgeOldTempFiles();
            var path = TempFileManager.GetTempFileFullPath();

            var formattedText = JsonFormatter.FormatIfPossible(text);

            File.WriteAllText(path, formattedText);

            VsExtensionHelper.OpenFile(path);
        }
Exemplo n.º 2
0
        private void OpenTextInNewTab(string text)
        {
            string errorMessage;
            var    formattedText = new JsonFormatter().FormatIfPossible(text, out errorMessage);

            TempFileManager.PurgeOldTempFiles();
            var path = TempFileManager.GetTempFileFullPath();

            File.WriteAllText(path, formattedText);

            DTEHelper.OpenFile(path);
        }