Skip to content

Commit

Permalink
[增加]1. 增加枚举和枚举字段描述
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Feb 7, 2025
1 parent 2705148 commit 53f741a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ProtoExport/ProtoBuffServerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
sb.AppendLine($"\t/// <summary>");
sb.AppendLine($"\t/// {operationCodeInfo.Description}");
sb.AppendLine($"\t/// </summary>");
sb.AppendLine($"\t[System.ComponentModel.Description(\"{operationCodeInfo.Description}\")]");
sb.AppendLine($"\tpublic enum {operationCodeInfo.Name}");
sb.AppendLine("\t{");
foreach (var operationField in operationCodeInfo.Fields)
{
sb.AppendLine($"\t\t/// <summary>");
sb.AppendLine($"\t\t/// {operationField.Description}");
sb.AppendLine($"\t\t/// </summary>");
sb.AppendLine($"\t\t{operationField.Type} = {operationField.Members}, ");
sb.AppendLine($"\t\t[System.ComponentModel.Description(\"{operationField.Description}\")]");
sb.AppendLine($"\t\t{operationField.Type} = {operationField.Members},");
}

sb.AppendLine("\t}");
Expand Down

0 comments on commit 53f741a

Please sign in to comment.