naming push service support CSharp client (#4670)

This commit is contained in:
Catcher Wong 2021-01-12 19:45:56 +08:00 committed by GitHub
parent e2f7796d3a
commit 7b81ea666e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -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;