Skip to content

Commit

Permalink
add .AsAsync() extension
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Nov 9, 2023
1 parent 8589edc commit 18a2002
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/_common/Results/Result.Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ namespace Skender.Stock.Indicators;

public static partial class ResultUtility
{
// not recommended, slower in multi-thread scenarios
public static Task<IEnumerable<TResult>> AsAsync<TResult>(
this IEnumerable<TResult> results)
where TResult : ISeries
=> Task.Run(() => results);

// CONDENSE (REMOVE null and NaN results)
/// <include file='./info.xml' path='info/type[@name="CondenseT"]/*' />
///
Expand Down

0 comments on commit 18a2002

Please sign in to comment.