File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/ExchangeSharp/API/Exchanges/_Base Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -605,19 +605,20 @@ public static Task<IExchangeAPI> GetExchangeAPIAsync(string exchangeName)
605
605
/// <typeparam name="T">Type of exchange to get</typeparam>
606
606
/// <returns>Exchange API or null if not found</returns>
607
607
[ Obsolete ( "Use the async version" ) ]
608
- public static IExchangeAPI GetExchangeAPI < T > ( )
608
+ public static T GetExchangeAPI < T > ( )
609
609
where T : ExchangeAPI
610
610
{
611
611
return GetExchangeAPIAsync < T > ( ) . Result ;
612
612
}
613
613
614
- public static Task < IExchangeAPI > GetExchangeAPIAsync < T > ( )
614
+ public static async Task < T > GetExchangeAPIAsync < T > ( )
615
615
where T : ExchangeAPI
616
616
{
617
617
// note: this method will be slightly slow (milliseconds) the first time it is called due to cache miss and initialization
618
618
// subsequent calls with cache hits will be nanoseconds
619
619
Type type = typeof ( T ) ! ;
620
- return GetExchangeAPIAsync ( type ) ;
620
+
621
+ return ( T ) await GetExchangeAPIAsync ( type ) ;
621
622
}
622
623
623
624
/// <summary>
You can’t perform that action at this time.
0 commit comments