20 references to IsCancellation
Microsoft.Extensions.AI.Evaluation.Console (6)
Utilities\LoggerExtensions.cs (6)
27
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
43
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
61
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
76
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
92
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
110
catch (Exception ex) when (!ex.
IsCancellation
() && logger.LogException(ex) && swallowUnhandledExceptions)
Microsoft.Extensions.AI.Evaluation.Console.Tests (14)
ExceptionUtilitiesTests.cs (14)
19
exception.
IsCancellation
().Should().BeFalse();
27
exception.
IsCancellation
().Should().BeTrue();
35
exception.
IsCancellation
().Should().BeTrue();
43
exception.
IsCancellation
().Should().BeTrue();
51
exception.
IsCancellation
().Should().BeTrue();
63
exception.
IsCancellation
().Should().BeTrue();
71
exception.
IsCancellation
().Should().BeFalse();
79
exception.
IsCancellation
().Should().BeFalse();
87
exception.
IsCancellation
().Should().BeFalse();
101
exception2.
IsCancellation
().Should().BeTrue();
110
exception2.
IsCancellation
().Should().BeFalse();
119
exception2.
IsCancellation
().Should().BeFalse();
129
exception3.
IsCancellation
().Should().BeTrue();
139
exception3.
IsCancellation
().Should().BeFalse();