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)
605605 /// <typeparam name="T">Type of exchange to get</typeparam>
606606 /// <returns>Exchange API or null if not found</returns>
607607 [ Obsolete ( "Use the async version" ) ]
608- public static IExchangeAPI GetExchangeAPI < T > ( )
608+ public static T GetExchangeAPI < T > ( )
609609 where T : ExchangeAPI
610610 {
611611 return GetExchangeAPIAsync < T > ( ) . Result ;
612612 }
613613
614- public static Task < IExchangeAPI > GetExchangeAPIAsync < T > ( )
614+ public static async Task < T > GetExchangeAPIAsync < T > ( )
615615 where T : ExchangeAPI
616616 {
617617 // note: this method will be slightly slow (milliseconds) the first time it is called due to cache miss and initialization
618618 // subsequent calls with cache hits will be nanoseconds
619619 Type type = typeof ( T ) ! ;
620- return GetExchangeAPIAsync ( type ) ;
620+
621+ return ( T ) await GetExchangeAPIAsync ( type ) ;
621622 }
622623
623624 /// <summary>
You can’t perform that action at this time.
0 commit comments