Skip to content

Commit 9bb0cd1

Browse files
committed
[修改]1. 修改List的字段属性设置
1 parent ca46a05 commit 9bb0cd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ProtoExport/ProtoBuffServerHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
7373
sb.AppendLine($"\t\t[ProtoMember({operationField.Members})]");
7474
if (operationField.IsRepeated)
7575
{
76-
sb.AppendLine($"\t\tpublic List<{operationField.Type}> {operationField.Name} = new List<{operationField.Type}>();");
76+
sb.AppendLine($"\t\tpublic List<{operationField.Type}> {operationField.Name} {{ get; set; }} = new List<{operationField.Type}>();");
7777
}
7878
else
7979
{

ProtoExport/ProtoBuffUnityHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
7171
sb.AppendLine($"\t\t[ProtoMember({operationField.Members})]");
7272
if (operationField.IsRepeated)
7373
{
74-
sb.AppendLine($"\t\tpublic List<{operationField.Type}> {operationField.Name} = new List<{operationField.Type}>();");
74+
sb.AppendLine($"\t\tpublic List<{operationField.Type}> {operationField.Name} {{ get; set; }} = new List<{operationField.Type}>();");
7575
}
7676
else
7777
{

0 commit comments

Comments
 (0)