mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
WCFProtocol -> WCFBinding
More appropriate
This commit is contained in:
@@ -99,10 +99,10 @@ namespace ArchiSteamFarm {
|
||||
internal readonly EUpdateChannel UpdateChannel = EUpdateChannel.Stable;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly ushort WCFPort = DefaultWCFPort;
|
||||
internal readonly EWCFBinding WCFBinding = EWCFBinding.NetTcp;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly EWCFProtocol WCFProtocol = EWCFProtocol.NetTcp;
|
||||
internal readonly ushort WCFPort = DefaultWCFPort;
|
||||
|
||||
[JsonProperty]
|
||||
internal string WCFHost { get; set; } = "127.0.0.1";
|
||||
@@ -183,7 +183,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
internal enum EWCFProtocol : byte {
|
||||
internal enum EWCFBinding : byte {
|
||||
NetTcp,
|
||||
BasicHttp,
|
||||
WSHttp
|
||||
|
||||
@@ -167,8 +167,8 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static Binding GetTargetBinding() {
|
||||
Binding result;
|
||||
switch (Program.GlobalConfig.WCFProtocol) {
|
||||
case GlobalConfig.EWCFProtocol.NetTcp:
|
||||
switch (Program.GlobalConfig.WCFBinding) {
|
||||
case GlobalConfig.EWCFBinding.NetTcp:
|
||||
result = new NetTcpBinding {
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
@@ -176,10 +176,10 @@ namespace ArchiSteamFarm {
|
||||
};
|
||||
|
||||
break;
|
||||
case GlobalConfig.EWCFProtocol.BasicHttp:
|
||||
case GlobalConfig.EWCFBinding.BasicHttp:
|
||||
result = new BasicHttpBinding();
|
||||
break;
|
||||
case GlobalConfig.EWCFProtocol.WSHttp:
|
||||
case GlobalConfig.EWCFBinding.WSHttp:
|
||||
result = new WSHttpBinding {
|
||||
// We use SecurityMode.None for Mono compatibility
|
||||
// Yes, also on Windows, for Mono<->Windows communication
|
||||
@@ -188,8 +188,8 @@ namespace ArchiSteamFarm {
|
||||
|
||||
break;
|
||||
default:
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(Program.GlobalConfig.WCFProtocol), Program.GlobalConfig.WCFProtocol));
|
||||
goto case GlobalConfig.EWCFProtocol.NetTcp;
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(Program.GlobalConfig.WCFBinding), Program.GlobalConfig.WCFBinding));
|
||||
goto case GlobalConfig.EWCFBinding.NetTcp;
|
||||
}
|
||||
|
||||
result.SendTimeout = new TimeSpan(0, 0, Program.GlobalConfig.ConnectionTimeout);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"SteamOwnerID": 0,
|
||||
"SteamProtocol": 6,
|
||||
"UpdateChannel": 1,
|
||||
"WCFBinding": 0,
|
||||
"WCFHost": "127.0.0.1",
|
||||
"WCFPort": 1242,
|
||||
"WCFProtocol": 0
|
||||
"WCFPort": 1242
|
||||
}
|
||||
@@ -117,6 +117,10 @@ namespace ConfigGenerator {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public EUpdateChannel UpdateChannel { get; set; } = EUpdateChannel.Stable;
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public EWCFBinding WCFBinding { get; set; } = EWCFBinding.NetTcp;
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty]
|
||||
public string WCFHost { get; set; } = "127.0.0.1";
|
||||
@@ -125,10 +129,6 @@ namespace ConfigGenerator {
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public ushort WCFPort { get; set; } = DefaultWCFPort;
|
||||
|
||||
[LocalizedCategory("Access")]
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
public EWCFProtocol WCFProtocol { get; set; } = EWCFProtocol.NetTcp;
|
||||
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
private GlobalConfig() { }
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace ConfigGenerator {
|
||||
Experimental
|
||||
}
|
||||
|
||||
internal enum EWCFProtocol : byte {
|
||||
internal enum EWCFBinding : byte {
|
||||
NetTcp,
|
||||
BasicHttp,
|
||||
WSHttp
|
||||
|
||||
Reference in New Issue
Block a user