using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using yEd.XGML.IO;
namespace YED.Console.Test
{
/// <summary>
/// Проверка чтения записи yed XGML файла.
/// TestFile_Dst файл должен открываться в yed и должен быть схожим(одинаковым) с Src.
/// </summary>
public class Test1_ReadWrite
{
public void Test(bool OpenSrc = false, bool OpenDst = false)
{
string TestFile_Src = @"Documents\Document1.xgml";
string TestFile_Dst = @"Documents\Document1_Copy.xgml";
//Котыль
XGML_Reader.DropEncodingAttribute(TestFile_Src);
var xgml_model = new XGML_Reader().Read(TestFile_Src);
new XGML_Writer().Write(xgml_model, TestFile_Dst);
if (OpenSrc)
Process.Start(TestFile_Src);
if (OpenDst)
Process.Start(TestFile_Dst);
}
}
}