28 references to Throw
Microsoft.Extensions.AI.Evaluation (28)
ChatMessageExtensions.cs (2)
114
_ =
Throw
.IfNull(message);
154
_ =
Throw
.IfNull(messages);
ChatResponseExtensions.cs (1)
36
_ =
Throw
.IfNull(response);
CompositeEvaluator.cs (2)
45
_ =
Throw
.IfNull(evaluators);
63
Throw
.ArgumentException(nameof(evaluators), $"Cannot add multiple evaluators for '{metricName}'.");
EvaluationMetricExtensions.cs (9)
25
_ =
Throw
.IfNull(metric);
26
_ =
Throw
.IfNull(context);
66
_ =
Throw
.IfNull(metric);
83
_ =
Throw
.IfNull(metric);
84
_ =
Throw
.IfNull(diagnostics);
115
_ =
Throw
.IfNull(metric);
129
_ =
Throw
.IfNull(metric);
130
_ =
Throw
.IfNull(metadata);
153
_ =
Throw
.IfNull(response);
EvaluationResult.cs (2)
57
_ =
Throw
.IfNull(metrics);
66
Throw
.ArgumentException(nameof(metrics), $"Cannot add multiple metrics with name '{metric.Name}'.");
EvaluationResultExtensions.cs (8)
28
_ =
Throw
.IfNull(result);
57
_ =
Throw
.IfNull(result);
95
_ =
Throw
.IfNull(result);
115
_ =
Throw
.IfNull(result);
116
_ =
Throw
.IfNull(interpretationProvider);
138
_ =
Throw
.IfNull(result);
158
_ =
Throw
.IfNull(result);
183
_ =
Throw
.IfNull(result);
EvaluatorExtensions.cs (4)
136
_ =
Throw
.IfNull(evaluator);
181
_ =
Throw
.IfNull(evaluator);
230
_ =
Throw
.IfNull(evaluator);
279
_ =
Throw
.IfNull(evaluator);