示例#1
0
        public void saveFile()
        {
            var export = false;

            foreach (var ns in nsList)
            {
                foreach (var t in ns.types)
                {
                    if (t.CheckExport())
                    {
                        export = true;
                    }
                }
            }

            if (!export)
            {
                return;
            }

            if ((nsList.Count() > 0) && (nsList[0].types.Count() > 0))
            {
                var type        = nsList[0].types[0];
                var outFileName = Path.GetFileNameWithoutExtension(outFile);
                var typeName    = (type.isSupplemental()) ? type.getSupplementalName() : type.name;
                if (typeName != outFileName)
                {
                    outFile = Path.Combine(Path.GetDirectoryName(outFile), typeName) + ".as";
                }
            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            nsList.write(sb);
            LarneFunctions.StringSaveToFile(outFile, sb.ToString());
        }
示例#2
0
        public void write(string File)
        {
            StringBuilder sb = new StringBuilder();

            write(sb);
            LarneFunctions.StringSaveToFile(File, sb.ToString());
        }
示例#3
0
        public void saveFile()
        {
            var export = false;

            foreach (var ns in nsList)
            {
                foreach (var t in ns.types)
                {
                    if (t.CheckExport())
                    {
                        export = true;
                    }
                }
            }

            if (!export)
            {
                return;
            }

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            nsList.write(sb);
            LarneFunctions.StringSaveToFile(outFile, sb.ToString());
        }