Exemplo n.º 1
0
        private string WriteIvyFile(string outputPath, string filename, bool savePath)
        {
            if (filename == null)
            {
                filename = "ivy.xml";
            }
            if (!Directory.Exists(outputPath))
            {
                Directory.CreateDirectory(outputPath);
            }
            string text = Path.Combine(outputPath, filename);

            if (!savePath)
            {
                this.BasePath = (this.IvyFile = null);
            }
            string value = IvyParser.Serialize(this);

            using (StreamWriter streamWriter = File.CreateText(text))
            {
                streamWriter.Write(value);
            }
            this.BasePath = outputPath;
            this.IvyFile  = filename;
            return(text);
        }
Exemplo n.º 2
0
        public string WriteIvyFile(string outputPath, string filename)
        {
            if (filename == null)
            {
                filename = "ivy.xml";
            }
            if (!Directory.Exists(outputPath))
            {
                Directory.CreateDirectory(outputPath);
            }
            string path = Path.Combine(outputPath, filename);
            string str2 = IvyParser.Serialize(this);

            using (StreamWriter writer = File.CreateText(path))
            {
                writer.Write(str2);
            }
            return(path);
        }
Exemplo n.º 3
0
 public override string ToString()
 {
     return(IvyParser.Serialize(this));
 }
Exemplo n.º 4
0
 public override string ToString() =>
 IvyParser.Serialize(this);