Skip to content

Commit f36ecd6

Browse files
committed
refactor(ProtoExport): 修改Post方法参数使用LauncherOptions对象
使用LauncherOptions对象替代单独的输出路径参数,提高代码可维护性和一致性
1 parent 3087742 commit f36ecd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ProtoExport/ProtoBuffTypeScriptHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static string ConvertType(string type)
157157
}
158158

159159

160-
public void Post(List<MessageInfoList> operationCodeInfo, string launcherOptionsOutputPath)
160+
public void Post(List<MessageInfoList> operationCodeInfo, LauncherOptions launcherOptions)
161161
{
162162
StringBuilder stringBuilder = new StringBuilder();
163163

@@ -193,7 +193,7 @@ public void Post(List<MessageInfoList> operationCodeInfo, string launcherOptions
193193
}
194194

195195
stringBuilder.Append(" }\n}\n");
196-
File.WriteAllText(launcherOptionsOutputPath + "/ProtoMessageRegister.ts", stringBuilder.ToString(), Encoding.UTF8);
196+
File.WriteAllText(launcherOptions.OutputPath + "/ProtoMessageRegister.ts", stringBuilder.ToString(), Encoding.UTF8);
197197
}
198198
}
199199
}

0 commit comments

Comments
 (0)