CompositeValueProvider Class

Summary

Represents a [Microsoft.AspNet.Mvc.ModelBinding.IValueProvider]() whose values come from a collection of [Microsoft.AspNet.Mvc.ModelBinding.IValueProvider]()s.

Inheritance Hierarchy

Syntax

public class CompositeValueProvider : Collection<IValueProvider>, IList<IValueProvider>, IList, IReadOnlyList<IValueProvider>, ICollection<IValueProvider>, ICollection, IReadOnlyCollection<IValueProvider>, IEnumerable<IValueProvider>, IEnumerable, IEnumerableValueProvider, IBindingSourceValueProvider, IValueProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider

Constructors

Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.CompositeValueProvider()

Initializes a new instance of [Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider](Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.yml).

public CompositeValueProvider()
CompositeValueProvider(System.Collections.Generic.IEnumerable<Microsoft.AspNet.Mvc.ModelBinding.IValueProvider>)

Initializes a new instance of [Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider](Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.yml).

Arguments:
  • valueProviders (System.Collections.Generic.IEnumerable{Microsoft.AspNet.Mvc.ModelBinding.IValueProvider}) – The sequence of [Microsoft.AspNet.Mvc.ModelBinding.IValueProvider]() to add to this instance of [Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider](Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.yml).
public CompositeValueProvider(IEnumerable<IValueProvider> valueProviders)

Methods

ContainsPrefixAsync(System.String)
Arguments:
  • prefix (System.String) –
Return type:

System.Threading.Tasks.Task{System.Boolean}

public virtual Task<bool> ContainsPrefixAsync(string prefix)
Create(System.Collections.Generic.IEnumerable<Microsoft.AspNet.Mvc.ModelBinding.IValueProviderFactory>, Microsoft.AspNet.Mvc.ModelBinding.ValueProviderFactoryContext)

Creates a new [Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider](Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.yml) from the provided <paramref name=”context” /> and <paramref name=”factories” />.

Arguments:
  • factories (System.Collections.Generic.IEnumerable{Microsoft.AspNet.Mvc.ModelBinding.IValueProviderFactory}) – The set of [Microsoft.AspNet.Mvc.ModelBinding.IValueProviderFactory]() instances.
  • context (Microsoft.AspNet.Mvc.ModelBinding.ValueProviderFactoryContext) – The [Microsoft.AspNet.Mvc.ModelBinding.ValueProviderFactoryContext]().
Return type:

Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider

Returns:

A [Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider](Microsoft.AspNet.Mvc.ModelBinding.CompositeValueProvider.yml) containing all [Microsoft.AspNet.Mvc.ModelBinding.IValueProvider]() instances created.

public static CompositeValueProvider Create(IEnumerable<IValueProviderFactory> factories, ValueProviderFactoryContext context)
Filter(Microsoft.AspNet.Mvc.ModelBinding.BindingSource)
Arguments:
Return type:

Microsoft.AspNet.Mvc.ModelBinding.IValueProvider

public IValueProvider Filter(BindingSource bindingSource)
GetKeysFromPrefixAsync(System.String)
Arguments:
  • prefix (System.String) –
Return type:

System.Threading.Tasks.Task{System.Collections.Generic.IDictionary{System.String,System.String}}

public virtual Task<IDictionary<string, string>> GetKeysFromPrefixAsync(string prefix)
GetValueAsync(System.String)
Arguments:
  • key (System.String) –
Return type:

System.Threading.Tasks.Task{Microsoft.AspNet.Mvc.ModelBinding.ValueProviderResult}

public virtual Task<ValueProviderResult> GetValueAsync(string key)
InsertItem(System.Int32, Microsoft.AspNet.Mvc.ModelBinding.IValueProvider)
Arguments:
protected override void InsertItem(int index, IValueProvider item)
SetItem(System.Int32, Microsoft.AspNet.Mvc.ModelBinding.IValueProvider)
Arguments:
protected override void SetItem(int index, IValueProvider item)