3 interfaces inheriting from IValueProvider
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\IBindingSourceValueProvider.cs (1)
15
public interface IBindingSourceValueProvider :
IValueProvider
ModelBinding\IEnumerableValueProvider.cs (1)
11
public interface IEnumerableValueProvider :
IValueProvider
ModelBinding\IKeyRewriterValueProvider.cs (1)
11
public interface IKeyRewriterValueProvider :
IValueProvider
5 implementations of IValueProvider
BasicWebSite (1)
ValueProviders\CustomValueProviderFactory.cs (1)
17
private class CustomValueProvider :
IValueProvider
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Binders\HeaderModelBinder.cs (1)
188
private sealed class HeaderValueProvider :
IValueProvider
ModelBinding\ElementalValueProvider.cs (1)
10
internal sealed class ElementalValueProvider :
IValueProvider
ModelBinding\FormFileValueProvider.cs (1)
18
public sealed class FormFileValueProvider :
IValueProvider
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
SimpleValueProvider.cs (1)
8
public sealed class SimpleValueProvider : Dictionary<string, object>,
IValueProvider
221 references to IValueProvider
Microsoft.AspNetCore.Mvc.Abstractions (13)
ModelBinding\BindingSource.cs (2)
142
/// For sources based on a <see cref="
IValueProvider
"/>, setting <see cref="IsGreedy"/> to <c>false</c>
151
/// and bind them individually using <see cref="
IValueProvider
"/>, then set <see cref="IsGreedy"/> to
ModelBinding\IValueProviderFactory.cs (3)
7
/// A factory for creating <see cref="
IValueProvider
"/> instances.
12
/// Creates a <see cref="
IValueProvider
"/> with values from the current request
16
/// <returns>A <see cref="Task"/> that when completed will add an <see cref="
IValueProvider
"/> instance
ModelBinding\ModelBindingContext.cs (3)
65
/// <see cref="
IValueProvider
"/> during model binding.
108
/// Gets or sets the <see cref="
IValueProvider
"/> associated with this context.
110
public abstract
IValueProvider
ValueProvider { get; set; }
ModelBinding\ValueProviderFactoryContext.cs (4)
28
/// Gets the list of <see cref="
IValueProvider
"/> instances.
30
/// <see cref="
IValueProvider
"/> instances to this list.
32
public IList<
IValueProvider
> ValueProviders { get; } = new List<
IValueProvider
>();
ModelBinding\ValueProviderResult.cs (1)
11
/// Result of an <see cref="
IValueProvider
.GetValue(string)"/> operation.
Microsoft.AspNetCore.Mvc.Core (81)
ControllerBase.cs (17)
2519
/// <see cref="
IValueProvider
"/>.
2536
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
2540
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
2569
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
2575
IValueProvider
valueProvider)
2594
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
2598
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
2632
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
2636
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
2675
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
2683
IValueProvider
valueProvider,
2710
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
2717
IValueProvider
valueProvider,
2738
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
2742
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
2779
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
2787
IValueProvider
valueProvider,
ModelBinding\Binders\CollectionModelBinder.cs (3)
24
private static readonly
IValueProvider
EmptyValueProvider = new CompositeValueProvider();
270
var
valueProvider = bindingContext.ValueProvider;
309
var
valueProvider = bindingContext.ValueProvider;
ModelBinding\BindingSourceValueProvider.cs (2)
15
/// A <see cref="BindingSourceValueProvider"/> is an <see cref="
IValueProvider
"/> base-implementation which
70
public virtual
IValueProvider
? Filter(BindingSource bindingSource)
ModelBinding\CompositeValueProvider.cs (20)
11
/// Represents a <see cref="
IValueProvider
"/> whose values come from a collection of <see cref="
IValueProvider
"/>s.
14
Collection<
IValueProvider
>,
29
/// <param name="valueProviders">The sequence of <see cref="
IValueProvider
"/> to add to this instance of
31
public CompositeValueProvider(IList<
IValueProvider
> valueProviders)
116
var
valueProvider = Items[i];
130
foreach (
var
valueProvider in this)
145
protected override void InsertItem(int index,
IValueProvider
item)
153
protected override void SetItem(int index,
IValueProvider
item)
161
public
IValueProvider
? Filter(BindingSource bindingSource)
168
var
valueProvider = Items[i];
182
var filteredValueProviders = new List<
IValueProvider
>();
185
var
valueProvider = Items[i];
188
var
result = bindingSourceValueProvider.Filter(bindingSource);
207
/// Value providers are included by default. If a contained <see cref="
IValueProvider
"/> does not implement
210
public
IValueProvider
? Filter()
215
var
valueProvider = Items[i];
229
var filteredValueProviders = new List<
IValueProvider
>();
232
var
valueProvider = Items[i];
235
var
result = keyRewriterValueProvider.Filter();
ModelBinding\DefaultModelBindingContext.cs (9)
18
private static readonly
IValueProvider
EmptyValueProvider = new CompositeValueProvider();
20
private
IValueProvider
_originalValueProvider = default!;
115
public
IValueProvider
OriginalValueProvider
126
public override
IValueProvider
ValueProvider
192
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> to use for binding.</param>
199
IValueProvider
valueProvider,
308
private static
IValueProvider
FilterValueProvider(
IValueProvider
valueProvider, BindingSource? bindingSource)
330
public
IValueProvider
ValueProvider;
ModelBinding\FormFileValueProvider.cs (2)
11
/// An <see cref="
IValueProvider
"/> adapter for data stored in an <see cref="IFormFileCollection"/>.
14
/// Unlike most <see cref="
IValueProvider
"/> instances, <see cref="FormFileValueProvider"/> does not provide any values, but
ModelBinding\FormValueProvider.cs (1)
12
/// An <see cref="
IValueProvider
"/> adapter for data stored in an <see cref="IFormCollection"/>.
ModelBinding\IBindingSourceValueProvider.cs (1)
25
IValueProvider
? Filter(BindingSource bindingSource);
ModelBinding\IEnumerableValueProvider.cs (1)
9
/// Interface representing an enumerable <see cref="
IValueProvider
"/>.
ModelBinding\IKeyRewriterValueProvider.cs (2)
18
/// <see cref="
IValueProvider
"/> will not match <c>Model[Property]</c> or <c>Collection.index</c>.
23
IValueProvider
? Filter();
ModelBinding\JQueryFormValueProvider.cs (1)
12
/// An <see cref="
IValueProvider
"/> for jQuery formatted form data.
ModelBinding\JQueryQueryStringValueProvider.cs (1)
12
/// An <see cref="
IValueProvider
"/> for jQuery formatted query string data.
ModelBinding\JQueryValueProvider.cs (3)
12
/// An <see cref="
IValueProvider
"/> for jQuery formatted data.
88
/// <see cref="
IValueProvider
"/> with rewritten keys (if original contains brackets) or duplicate keys
91
public
IValueProvider
? Filter()
ModelBinding\ModelBindingHelper.cs (10)
33
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
43
IValueProvider
valueProvider,
71
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
83
IValueProvider
valueProvider,
116
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
129
IValueProvider
valueProvider,
158
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
169
IValueProvider
valueProvider,
197
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
210
IValueProvider
valueProvider,
ModelBinding\ParameterBinder.cs (4)
59
/// <param name="valueProvider">The <see cref="
IValueProvider
"/>.</param>
67
IValueProvider
valueProvider,
78
/// <param name="valueProvider">The <see cref="
IValueProvider
"/>.</param>
87
IValueProvider
valueProvider,
ModelBinding\QueryStringValueProvider.cs (1)
12
/// An <see cref="
IValueProvider
"/> adapter for data stored in an <see cref="IQueryCollection"/>.
ModelBinding\QueryStringValueProviderFactory.cs (1)
11
/// A <see cref="IValueProviderFactory"/> that creates <see cref="
IValueProvider
"/> instances that
ModelBinding\RouteValueProvider.cs (1)
12
/// An <see cref="
IValueProvider
"/> adapter for data stored in an <see cref="RouteValueDictionary"/>.
MvcOptions.cs (1)
303
/// <see cref="CollectionModelBinder{TElement}"/> relies entirely on <see cref="
IValueProvider
"/>s, it cannot
Microsoft.AspNetCore.Mvc.Core.Test (90)
ControllerBaseTest.cs (20)
2613
var
valueProvider = Mock.Of<
IValueProvider
>();
2642
var
valueProvider = Mock.Of<
IValueProvider
>();
2669
var
valueProvider = Mock.Of<
IValueProvider
>();
2725
var
valueProvider = Mock.Of<
IValueProvider
>();
2758
var
valueProvider = Mock.Of<
IValueProvider
>();
2786
var valueProvider = new Mock<
IValueProvider
>();
2820
var valueProvider = new Mock<
IValueProvider
>();
2851
var valueProvider = new Mock<
IValueProvider
>();
2907
var
valueProvider = Mock.Of<
IValueProvider
>();
2938
var
valueProvider = Mock.Of<
IValueProvider
>();
2966
var
valueProvider = Mock.Of<
IValueProvider
>();
3194
private static ControllerBase GetController(IModelBinder binder,
IValueProvider
valueProvider = null)
Controllers\ControllerBinderDelegateProviderTest.cs (2)
1146
It.IsAny<
IValueProvider
>(),
1151
.Returns((ActionContext context, IModelBinder modelBinder,
IValueProvider
valueProvider, ParameterDescriptor descriptor, ModelMetadata metadata, object v, object c) =>
ModelBinding\Binders\ArrayModelBinderTest.cs (1)
220
private static DefaultModelBindingContext GetBindingContext(
IValueProvider
valueProvider)
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
81
ValueProvider = Mock.Of<
IValueProvider
>(),
ModelBinding\Binders\BodyModelBinderTests.cs (1)
699
ValueProvider = Mock.Of<
IValueProvider
>(),
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
103
private static DefaultModelBindingContext GetBindingContext(
IValueProvider
valueProvider, Type modelType)
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
477
IValueProvider
valueProvider,
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (6)
95
var valueProvider = new Mock<
IValueProvider
>(MockBehavior.Strict);
156
var valueProvider = new Mock<
IValueProvider
>();
184
var valueProvider = new Mock<
IValueProvider
>();
210
var valueProvider = new Mock<
IValueProvider
>();
248
var valueProvider = new Mock<
IValueProvider
>();
253
var originalValueProvider = new Mock<
IValueProvider
>();
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (8)
94
var valueProvider = new Mock<
IValueProvider
>(MockBehavior.Strict);
155
var valueProvider = new Mock<
IValueProvider
>();
183
var valueProvider = new Mock<
IValueProvider
>();
209
var valueProvider = new Mock<
IValueProvider
>();
247
var valueProvider = new Mock<
IValueProvider
>();
252
var originalValueProvider = new Mock<
IValueProvider
>();
283
var mockValueProvider = new Mock<
IValueProvider
>();
1007
var valueProvider = new Mock<
IValueProvider
>(MockBehavior.Strict);
ModelBinding\Binders\DictionaryModelBinderTest.cs (2)
636
private static
IValueProvider
CreateEnumerableValueProvider(
654
private static
IValueProvider
CreateTestValueProvider(string keyFormat, IDictionary<string, string> dictionary)
ModelBinding\Binders\FormFileModelBinderTest.cs (5)
53
Mock.Of<
IValueProvider
>(),
91
Mock.Of<
IValueProvider
>(),
133
Mock.Of<
IValueProvider
>(),
168
Mock.Of<
IValueProvider
>(),
204
Mock.Of<
IValueProvider
>(),
ModelBinding\Binders\HeaderModelBinderTests.cs (5)
237
var
expectedValueProvider = Mock.Of<
IValueProvider
>();
255
var testValueProvider = new Mock<
IValueProvider
>();
330
IValueProvider
valueProvider = null)
334
valueProvider = Mock.Of<
IValueProvider
>();
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (1)
214
IValueProvider
valueProvider,
ModelBinding\BindingSourceValueProviderTest.cs (2)
56
var
result = valueProvider.Filter(BindingSource.Body);
69
var
result = valueProvider.Filter(BindingSource.Query);
ModelBinding\CompositeValueProviderTest.cs (15)
28
var
result = provider.Filter(bindingSource);
69
var
provider1 = Mock.Of<
IValueProvider
>();
94
var
provider1 = Mock.Of<
IValueProvider
>();
95
var
provider2 = Mock.Of<
IValueProvider
>();
127
var
result = provider.Filter(metadata.BindingSource);
131
var
filteredProvider = Assert.Single(valueProvider);
169
var
result = provider.Filter();
184
var
result = provider.Filter();
200
var providers = new
IValueProvider
[]
209
var expectedProviders = new
IValueProvider
[]
220
var
result = provider.Filter();
233
valueProvider.Setup(vp => vp.Filter()).Returns<
IValueProvider
>(null);
ModelBinding\DefaultModelBindingContextTest.cs (1)
42
var
originalValueProvider = bindingContext.ValueProvider;
ModelBinding\EnumerableValueProviderTest.cs (2)
264
var
result = provider.Filter(bindingSource);
284
var
result = provider.Filter(bindingSource);
ModelBinding\JQueryFormValueProviderFactoryTest.cs (2)
112
var
valueProvider = Assert.Single(context.ValueProviders);
128
var
valueProvider = Assert.Single(context.ValueProviders);
ModelBinding\JQueryFormValueProviderTest.cs (1)
27
var
result = provider.Filter();
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (2)
78
var
valueProvider = Assert.Single(context.ValueProviders);
108
var
valueProvider = Assert.Single(context.ValueProviders);
ModelBinding\JQueryQueryStringValueProviderTest.cs (1)
30
var
result = provider.Filter();
ModelBinding\ModelBindingHelperTest.cs (6)
38
Mock.Of<
IValueProvider
>(),
143
Mock.Of<
IValueProvider
>(),
223
Mock.Of<
IValueProvider
>(),
473
valueProvider: Mock.Of<
IValueProvider
>(),
556
valueProvider: Mock.Of<
IValueProvider
>(),
627
Mock.Of<
IValueProvider
>(),
ModelBinding\ParameterBinderTest.cs (2)
803
private static
IValueProvider
CreateMockValueProvider()
805
var mockValueProvider = new Mock<
IValueProvider
>(MockBehavior.Strict);
ModelBinding\RouteValueProviderTests.cs (2)
244
var
result = provider.Filter(bindingSource);
265
var
result = provider.Filter(bindingSource);
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
SimpleValueProviderFactory.cs (2)
8
private readonly
IValueProvider
_valueProvider;
15
public SimpleValueProviderFactory(
IValueProvider
valueProvider)
Microsoft.AspNetCore.Mvc.RazorPages (33)
PageBase.cs (17)
1271
/// <see cref="
IValueProvider
"/>.
1287
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
1291
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
1319
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
1324
IValueProvider
valueProvider)
1343
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
1347
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
1380
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
1384
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
1422
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
1429
IValueProvider
valueProvider,
1456
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
1462
IValueProvider
valueProvider,
1483
/// <see cref="
IValueProvider
"/> and a <paramref name="prefix"/>.
1487
/// <param name="prefix">The prefix to use when looking up values in the current <see cref="
IValueProvider
"/>.
1523
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
1530
IValueProvider
valueProvider,
PageModel.cs (16)
180
/// <see cref="
IValueProvider
"/>.
195
/// <see cref="
IValueProvider
"/>.
224
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
229
IValueProvider
valueProvider)
248
/// <see cref="
IValueProvider
"/> and a <paramref name="name"/>.
252
/// <param name="name">The name to use when looking up values in the current <see cref="
IValueProvider
"/>.
285
/// <see cref="
IValueProvider
"/> and a <paramref name="name"/>.
289
/// <param name="name">The name to use when looking up values in the current <see cref="
IValueProvider
"/>.
327
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
334
IValueProvider
valueProvider,
361
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
367
IValueProvider
valueProvider,
388
/// <see cref="
IValueProvider
"/> and a <paramref name="name"/>.
392
/// <param name="name">The name to use when looking up values in the current <see cref="
IValueProvider
"/>.
428
/// <param name="valueProvider">The <see cref="
IValueProvider
"/> used for looking up values.</param>
435
IValueProvider
valueProvider,
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageBinderFactoryTest.cs (1)
824
IValueProvider
valueProvider,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
ControllerTest.cs (1)
428
private static Controller GetController(IModelBinder binder,
IValueProvider
valueProvider)