mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-24 04:25:35 +00:00
ref[csharp]: refactor generate csharp protocol
This commit is contained in:
@@ -27,7 +27,7 @@ public class NetConfig {
|
||||
/**
|
||||
* {@link GenerateOperation}
|
||||
*/
|
||||
private boolean mergerProtocol;
|
||||
private boolean mergeProtocol;
|
||||
/**
|
||||
* {@link GenerateOperation}
|
||||
*/
|
||||
@@ -81,12 +81,12 @@ public class NetConfig {
|
||||
this.protocolLocation = protocolLocation;
|
||||
}
|
||||
|
||||
public boolean isMergerProtocol() {
|
||||
return mergerProtocol;
|
||||
public boolean isMergeProtocol() {
|
||||
return mergeProtocol;
|
||||
}
|
||||
|
||||
public void setMergerProtocol(boolean mergerProtocol) {
|
||||
this.mergerProtocol = mergerProtocol;
|
||||
public void setMergeProtocol(boolean mergeProtocol) {
|
||||
this.mergeProtocol = mergeProtocol;
|
||||
}
|
||||
|
||||
public boolean isFoldProtocol() {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class PacketService implements IPacketService {
|
||||
var protocolLocation = netConfig.getProtocolLocation();
|
||||
|
||||
var generateOperation = new GenerateOperation();
|
||||
generateOperation.setMergeProtocol(netConfig.isMergerProtocol());
|
||||
generateOperation.setMergeProtocol(netConfig.isMergeProtocol());
|
||||
generateOperation.setFoldProtocol(netConfig.isFoldProtocol());
|
||||
generateOperation.setProtocolPath(netConfig.getProtocolPath());
|
||||
generateOperation.setProtocolParam(netConfig.getProtocolParam());
|
||||
|
||||
@@ -102,7 +102,7 @@ public class NetDefinitionParser implements BeanDefinitionParser {
|
||||
resolvePlaceholder("protocol-location", "protocolLocation", builder, element, parserContext);
|
||||
|
||||
// 协议文件是否生成在同一个协议文件中
|
||||
resolvePlaceholder("merger-protocol", "mergerProtocol", builder, element, parserContext);
|
||||
resolvePlaceholder("merge-protocol", "mergeProtocol", builder, element, parserContext);
|
||||
// 文件是否折叠
|
||||
resolvePlaceholder("fold-protocol", "foldProtocol", builder, element, parserContext);
|
||||
// 生成各种语言的协议列表
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="protocol-location" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="merger-protocol" type="xsd:boolean" default="false"/>
|
||||
<xsd:attribute name="merge-protocol" type="xsd:boolean" default="false"/>
|
||||
<xsd:attribute name="fold-protocol" type="xsd:boolean" default="false"/>
|
||||
<xsd:attribute name="code-languages" type="xsd:string"/>
|
||||
<xsd:attribute name="protocol-path" type="xsd:string"/>
|
||||
|
||||
Reference in New Issue
Block a user