10 references to TryAddModelException
Microsoft.AspNetCore.Mvc.Abstractions.Test (8)
ModelBinding\ModelStateDictionaryTest.cs (8)
293
dictionary.
TryAddModelException
("some key", exception);
791
result = dictionary.
TryAddModelException
("key2", new Exception());
794
result = dictionary.
TryAddModelException
("key3", new Exception());
966
dictionary.
TryAddModelException
("key", exception);
1079
dictionary.
TryAddModelException
("key", exception);
1213
dictionary.
TryAddModelException
("key", exception);
1231
dictionary.
TryAddModelException
("key", exception);
1652
var invalidException = Assert.Throws<InvalidOperationException>(() => dictionary.
TryAddModelException
(key, exception));
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\CompositeValueProvider.cs (1)
90
actionContext.ModelState.
TryAddModelException
(key: string.Empty, exception);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ModelStateDictionaryExtensions.cs (1)
60
modelState.
TryAddModelException
(GetExpressionText(expression), exception);