Example #1
0
        public void Save(string path, GraphViewModel item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            var csv = item.ToCsv();

            File.WriteAllLines(path, csv);
        }
Example #2
0
        public void SaveToClipboard(GraphViewModel item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            var csv  = item.ToCsv();
            var text = string.Join(Environment.NewLine, csv);

            Clipboard.SetText(text);
        }