XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.XApp

【DLL】XApp开发支持

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.XApp

修复转义问题

4f1730d
XFE工作室室长 <xfe18827675401@126.com>
提交于

代码差异

3 个文件 +10 -6
Modified XFEExtension.NetCore.XApp.Test/Program.cs +6 -4
@@ -1,5 +1,7 @@
1 using XFEExtension.NetCore.XApp.Core;
1 using XFEExtension.NetCore.StringExtension;
2 using XFEExtension.NetCore.XApp.Core;
2 3 using XFEExtension.NetCore.XApp.Extensions;
4 using XFEExtension.NetCore.XFETransform;
3 5
4 6 internal class Program
5 7 {
@@ -19,7 +21,7 @@ internal class Program
19 21
20 22 private static XApp CreateXApp()
21 23 {
22 var appInfo = new XAppInformation(string.Empty, "be98276c-48d6-451d-8a0a-a311d782d9d6", "第一个小程序", new Version(1, 0, 0), "这是第一个小程序", "XFE工作室室长", "4174240069", string.Empty, string.Empty, string.Empty, string.Empty);
24 var appInfo = new XAppInformation(string.Empty, "be98276c-48d6-451d-8a0a-a311d782d9d6", "第一个小程序", new Version(1, 0, 3), "这是第一个小程序", "XFE工作室室长", "4174240069", string.Empty, string.Empty, string.Empty, string.Empty);
23 25 var xApp = new XApp
24 26 {
25 27 AppInformation = appInfo
@@ -63,7 +65,7 @@ internal class Program
63 65 }
64 66 }
65 67 """"));
66 xApp.AppFiles.Add(XAppCode.FromCode(XAppFileType.CS, "MainPage.g.cs", """
68 xApp.AppFiles.Add(XAppCode.FromCode(XAppFileType.CS, "MainPage.g.cs", """"
67 69 namespace MyFirstXApp;
68 70
69 71 public partial class MainPage
@@ -73,7 +75,7 @@ internal class Program
73 75 this.LoadFromXaml(@"[XFMLTOLOAD]");
74 76 }
75 77 }
76 """));
78 """"));
77 79 xApp.AppFiles.Add(XAppCode.FromCode(XAppFileType.XFML, "MainPage.xfml", """
78 80 <?xml version="1.0" encoding="utf-8" ?>
79 81 <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
Modified XFEExtension.NetCore.XApp/XAppLoader.cs +3 -1
@@ -3,6 +3,7 @@ using Microsoft.CodeAnalysis.CSharp;
3 3 using System.Diagnostics;
4 4 using System.Reflection;
5 5 using XFEExtension.NetCore.XApp.Core;
6 using XFEExtension.NetCore.XFETransform;
6 7
7 8 namespace XFEExtension.NetCore.XApp;
8 9
@@ -45,8 +46,9 @@ public static class XAppLoader
45 46 if (autoGenCodeFile is not null && autoGenCodeFile.Length > 0)
46 47 {
47 48 var codeFile = autoGenCodeFile[0];
48 xAppCode.Code = xAppCode.Code?.Replace("[XFMLTOLOAD]", codeFile.Code);
49 xAppCode.Code = xAppCode.Code?.Replace("[XFMLTOLOAD]", codeFile.Code?.Replace("\"", "\"\""));
49 50 }
51 Console.WriteLine(xAppCode.Code);
50 52 }
51 53 syntaxTrees.Add(SyntaxFactory.ParseSyntaxTree(xAppCode.Code!));
52 54 }
Modified XFEExtension.NetCore.XApp/XFEExtension.NetCore.XApp.csproj +1 -1
@@ -17,7 +17,7 @@
17 17 <PackageTags>XApp;XFE</PackageTags>
18 18 <PackageReleaseNotes>优化程序解包结构</PackageReleaseNotes>
19 19 <PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
20 <Version>1.0.2</Version>
20 <Version>1.0.3</Version>
21 21 </PropertyGroup>
22 22
23 23 <ItemGroup>