@@ -83,7 +83,7 @@ static async Task Main(string[] args)
83
83
84
84
public async Task MakeRequest ( [ FromService ] IConfiguration configuration , string endpoint_name = "wss://ws.coinapi.io/" ,
85
85
string subscribe_data_type = null , string asset = null , string symbol = null ,
86
- string exchange = null , string apikey = null , string type = "hello" , bool supress_hb = false , string latency_type = "ce" )
86
+ string exchange = null , string apikey = null , string type = "hello" , string supress_hb = " false" , string latency_type = "ce" )
87
87
{
88
88
var typeNames = Enum . GetNames < SubType > ( ) . ToList ( ) ;
89
89
if ( ! typeNames . Any ( x => x == subscribe_data_type ) )
@@ -115,10 +115,12 @@ public async Task MakeRequest([FromService] IConfiguration configuration, string
115
115
Serilog . Log . Error ( $ "Invalid latency_type, valid values: { string . Join ( "," , latencyTypes ) } ") ;
116
116
return ;
117
117
}
118
-
118
+ bool . TryParse ( supress_hb , out bool hb_supressed ) ;
119
+
119
120
using ( var wsClient = new CoinApiWsClient ( endpoint_name ) )
120
121
{
121
- wsClient . SupressHeartbeat ( supress_hb ) ;
122
+ wsClient . SupressHeartbeat ( hb_supressed ) ;
123
+
122
124
LatencyType latencyType = Enum . GetValues < LatencyType > ( ) . FirstOrDefault ( x => x . ToString ( ) == latency_type ) ;
123
125
124
126
wsClient . Error += WsClient_Error ;
@@ -165,7 +167,7 @@ public async Task MakeRequest([FromService] IConfiguration configuration, string
165
167
} ;
166
168
wsClient . SendHelloMessage ( hello ) ;
167
169
168
- _ = PrintingTaskLoopAsync ( wsClient , endpoint_name , subscribe_data_type , asset , symbol , exchange , supress_hb , latency_type ) ;
170
+ _ = PrintingTaskLoopAsync ( wsClient , endpoint_name , subscribe_data_type , asset , symbol , exchange , hb_supressed , latency_type ) ;
169
171
170
172
await Task . Run ( ( ) => Console . ReadKey ( ) ) ;
171
173
}
0 commit comments