返回提交历史
Modified
XFEExtension.NetCore.AutoConfig.Analyzer/Generator/ProfilePropertyAutoGenerator.cs
+6
-6
Modified
XFEExtension.NetCore.AutoConfig/XFEExtension.NetCore.AutoConfig.csproj
+5
-2
XFEstudio/XFEExtension.NetCore.AutoConfig
更新命名空间和项目版本号
在`ProfilePropertyAutoGenerator.cs`文件中,我们将所有的`global::XFEExtension.NetCore.ProfileExtension`命名空间更改为`global::XFEExtension.NetCore.AutoConfig`。这包括了`ProfileFieldAutoGenerateAttribute`,`XFEProfile.SaveProfile`,`XFEProfile`和`ProfileInstanceAttribute`的引用。此外,我们还在`XFEExtension.NetCore.AutoConfig.csproj`项目文件中,将版本号从`1.0.3`更新为`1.0.4`。
9285351
代码差异
2 个文件
+11
-8
@@ -33,7 +33,7 @@ namespace XFEExtension.NetCore.AutoConfig.Generator
33
33
var className = classDeclaration.Identifier.ValueText;
34
34
var attributeSyntax = SyntaxFactory.AttributeList(
35
35
SyntaxFactory.SingletonSeparatedList(
36
SyntaxFactory.Attribute(SyntaxFactory.ParseName("global::XFEExtension.NetCore.ProfileExtension.ProfileFieldAutoGenerateAttribute"))));
36
SyntaxFactory.Attribute(SyntaxFactory.ParseName("global::XFEExtension.NetCore.AutoConfig.ProfileFieldAutoGenerateAttribute"))));
37
37
var properties = new List<PropertyDeclarationSyntax>();
38
38
var methods = new List<MethodDeclarationSyntax>();
39
39
foreach (var fieldDeclarationSyntax in fieldDeclarationSyntaxes)
@@ -136,10 +136,10 @@ namespace XFEExtension.NetCore.AutoConfig.Generator
136
136
/// ○ <seealso langword=""{fieldName}""/> = <seealso langword=""value""/>;<br/>";
137
137
#endregion
138
138
}
139
setExpressionStatements.Add(SyntaxFactory.ExpressionStatement(SyntaxFactory.ParseExpression($"global::XFEExtension.NetCore.ProfileExtension.XFEProfile.SaveProfile(typeof({className}))")));
139
setExpressionStatements.Add(SyntaxFactory.ExpressionStatement(SyntaxFactory.ParseExpression($"global::XFEExtension.NetCore.AutoConfig.XFEProfile.SaveProfile(typeof({className}))")));
140
140
#region Set方法中的保存方法的注释
141
141
triviaText += $@"
142
/// ○ <seealso cref=""global::XFEExtension.NetCore.ProfileExtension.XFEProfile.SaveProfile(ProfileInfo)""/>";
142
/// ○ <seealso cref=""global::XFEExtension.NetCore.AutoConfig.XFEProfile.SaveProfile(ProfileInfo)""/>";
143
143
#endregion
144
144
#region Trivia尾
145
145
triviaText += @"
@@ -215,12 +215,12 @@ namespace XFEExtension.NetCore.AutoConfig.Generator
215
215
/// <code><seealso cref=""{className}""/> 已自动实现以下属性:</code><br/>
216
216
/// <code>
217
217
";
218
triviaText += string.Join("<br/>\n", propertyDeclarationSyntaxes.Select(propertyDeclarationSyntax => $"/// ○ <seealso cref=\"{propertyDeclarationSyntax.Identifier}\"/>")) + "\n/// </code><br/>\n/// <code>来自<seealso cref=\"global::XFEExtension.NetCore.ProfileExtension.XFEProfile\"/></code>\n/// </remarks>\n";
218
triviaText += string.Join("<br/>\n", propertyDeclarationSyntaxes.Select(propertyDeclarationSyntax => $"/// ○ <seealso cref=\"{propertyDeclarationSyntax.Identifier}\"/>")) + "\n/// </code><br/>\n/// <code>来自<seealso cref=\"global::XFEExtension.NetCore.AutoConfig.XFEProfile\"/></code>\n/// </remarks>\n";
219
219
var memberDeclarations = new List<MemberDeclarationSyntax>
220
220
{
221
221
SyntaxFactory.PropertyDeclaration(SyntaxFactory.ParseTypeName(className), "Current")
222
222
.WithModifiers(SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.StaticKeyword)))
223
.AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(SyntaxFactory.Attribute(SyntaxFactory.ParseName("global::XFEExtension.NetCore.ProfileExtension.ProfileInstanceAttribute")))))
223
.AddAttributeLists(SyntaxFactory.AttributeList(SyntaxFactory.SingletonSeparatedList(SyntaxFactory.Attribute(SyntaxFactory.ParseName("global::XFEExtension.NetCore.AutoConfig.ProfileInstanceAttribute")))))
224
224
.WithAccessorList(SyntaxFactory.AccessorList(SyntaxFactory.List(
225
225
new[]
226
226
{
@@ -242,7 +242,7 @@ namespace XFEExtension.NetCore.AutoConfig.Generator
242
242
var staticConstructorSyntax = SyntaxFactory.ConstructorDeclaration(className)
243
243
.AddModifiers(SyntaxFactory.Token(SyntaxKind.StaticKeyword))
244
244
.WithBody(SyntaxFactory.Block(
245
SyntaxFactory.ParseStatement($"global::XFEExtension.NetCore.ProfileExtension.XFEProfile.LoadProfiles(typeof({className}));")));
245
SyntaxFactory.ParseStatement($"global::XFEExtension.NetCore.AutoConfig.XFEProfile.LoadProfiles(typeof({className}));")));
246
246
if (classDeclaration.AttributeLists.Any(IsAutoLoadProfileAttribute))
247
247
{
248
248
var autoLoadProfileAttribute = classDeclaration.AttributeLists.First(attributeList => IsAutoLoadProfileAttribute(attributeList)).Attributes.First();
@@ -15,9 +15,12 @@
15
15
<RepositoryUrl>https://github.com/XFEstudio/XFEExtension.NetCore.AutoConfig</RepositoryUrl>
16
16
<PackageProjectUrl>https://github.com/XFEstudio/XFEExtension.NetCore.AutoConfig</PackageProjectUrl>
17
17
<PackageTags>XFE;config;profile;auto</PackageTags>
18
<PackageReleaseNotes>更新引用包为3.0.*版本</PackageReleaseNotes>
18
<PackageReleaseNotes>更新命名空间和项目版本号
19
20
在`ProfilePropertyAutoGenerator.cs`文件中,我们将所有的`global::XFEExtension.NetCore.ProfileExtension`命名空间更改为`global::XFEExtension.NetCore.AutoConfig`。这包括了`ProfileFieldAutoGenerateAttribute`,`XFEProfile.SaveProfile`,`XFEProfile`和`ProfileInstanceAttribute`的引用。此外,我们还在`XFEExtension.NetCore.AutoConfig.csproj`项目文件中,将版本号从`1.0.3`更新为`1.0.4`。
21
</PackageReleaseNotes>
19
22
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
20
<Version>1.0.3</Version>
23
<Version>1.0.4</Version>
21
24
</PropertyGroup>
22
25
23
26
<ItemGroup>