Skip to content

Commit

Permalink
List to IEnumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
MIDDLEEAST\v-moshaban committed Jun 11, 2021
1 parent 3667a8e commit c69448b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ public static SentimentConfidenceScores SentimentConfidenceScores(double positiv
/// <param name="sentenceSentiments">Sets the <see cref="DocumentSentiment.Sentences"/> property.</param>
/// <param name="warnings">Sets the <see cref="DetectedLanguage.Warnings"/> property.</param>
/// <returns>A new instance of <see cref="TextAnalytics.DocumentSentiment"/> for mocking purposes.</returns>
public static DocumentSentiment DocumentSentiment(TextSentiment sentiment, double positiveScore, double neutralScore, double negativeScore, List<SentenceSentiment> sentenceSentiments, IEnumerable<TextAnalyticsWarning> warnings = default)
public static DocumentSentiment DocumentSentiment(TextSentiment sentiment, double positiveScore, double neutralScore, double negativeScore, IEnumerable<SentenceSentiment> sentenceSentiments, IEnumerable<TextAnalyticsWarning> warnings = default)
{
warnings ??= new List<TextAnalyticsWarning>();
return new DocumentSentiment(sentiment, positiveScore, neutralScore, negativeScore, sentenceSentiments, warnings.ToList());
return new DocumentSentiment(sentiment, positiveScore, neutralScore, negativeScore, sentenceSentiments.ToList(), warnings.ToList());
}

/// <summary>
Expand Down

0 comments on commit c69448b

Please sign in to comment.