コード例 #1
0
        private void GenerateCode()
        {
            var generatedCode = ToCodeTransformer.Transform(currentQuest);

            resultViewer.Text = generatedCode;
            Clipboard.SetText(generatedCode);
        }
コード例 #2
0
        private static CodeBulk CreateCode(Quest quest, Sector sector, EditingContext context)
        {
            var path = Path.Combine(
                context.Code.PathToProject,
                "Sectors",
                sector.Name,
                "Quests",
                CodeEditor.FormatQuestNameToFileName(quest.Name)
                );
            var tree = SyntaxFactory.ParseSyntaxTree(ToCodeTransformer.Transform(quest));

            return(new CodeBulk(CodeBulkType.Quest, tree, path));
        }