diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java index fed9bd534..de4a8b797 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/SwitchDomain.java @@ -97,6 +97,8 @@ public class SwitchDomain implements Record, Cloneable { private String pushPythonVersion = "0.4.3"; private String pushCVersion = "1.0.12"; + + private String pushCSharpVersion = "0.9.0"; private boolean enableAuthentication = false; @@ -330,6 +332,14 @@ public class SwitchDomain implements Record, Cloneable { public void setPushGoVersion(String pushGoVersion) { this.pushGoVersion = pushGoVersion; } + + public String getPushCSharpVersion() { + return pushCSharpVersion; + } + + public void setPushCSharpVersion(String pushCSharpVersion) { + this.pushCSharpVersion = pushCSharpVersion; + } public String getPushJavaVersion() { return pushJavaVersion; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java index a7d1375c5..8a10102d9 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/push/PushService.java @@ -406,6 +406,9 @@ public class PushService implements ApplicationContextAware, ApplicationListener } else if (ClientInfo.ClientType.GO == clientInfo.type && clientInfo.version.compareTo(VersionUtil.parseVersion(switchDomain.getPushGoVersion())) >= 0) { return true; + } else if (ClientInfo.ClientType.CSHARP == clientInfo.type + && clientInfo.version.compareTo(VersionUtil.parseVersion(switchDomain.getPushCSharpVersion())) >= 0) { + return true; } return false;