ReadableStringCollectionValueProvider Class

Summary

An [Microsoft.AspNet.Mvc.ModelBinding.IValueProvider]() adapter for data stored in an @!:IReadableStringCollection-.

Syntax

public class ReadableStringCollectionValueProvider : BindingSourceValueProvider, IBindingSourceValueProvider, IEnumerableValueProvider, IValueProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.ReadableStringCollectionValueProvider

Constructors

ReadableStringCollectionValueProvider(Microsoft.AspNet.Mvc.ModelBinding.BindingSource, IReadableStringCollection, System.Globalization.CultureInfo)

Creates a provider for @!:IReadableStringCollection- wrapping an existing set of key value pairs.

Arguments:
  • bindingSource (Microsoft.AspNet.Mvc.ModelBinding.BindingSource) – The [Microsoft.AspNet.Mvc.ModelBinding.BindingSource]() for the data.
  • values (IReadableStringCollection) – The key value pairs to wrap.
  • culture (System.Globalization.CultureInfo) – The culture to return with ValueProviderResult instances.
public ReadableStringCollectionValueProvider(BindingSource bindingSource, IReadableStringCollection values, CultureInfo culture)
ReadableStringCollectionValueProvider(Microsoft.AspNet.Mvc.ModelBinding.BindingSource, System.Func<System.Threading.Tasks.Task<IReadableStringCollection>>, System.Globalization.CultureInfo)

Creates a provider for @!:IReadableStringCollection- wrapping an existing set of key value pairs provided by the delegate.

Arguments:
  • bindingSource (Microsoft.AspNet.Mvc.ModelBinding.BindingSource) – The [Microsoft.AspNet.Mvc.ModelBinding.BindingSource]() for the data.
  • valuesFactory (System.Func{System.Threading.Tasks.Task{IReadableStringCollection}}) –
  • culture (System.Globalization.CultureInfo) – The culture to return with ValueProviderResult instances.
public ReadableStringCollectionValueProvider(BindingSource bindingSource, Func<Task<IReadableStringCollection>> valuesFactory, CultureInfo culture)

Properties

Culture()
Return type:System.Globalization.CultureInfo
public CultureInfo Culture { get; }

Methods

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

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

public override Task<bool> ContainsPrefixAsync(string prefix)
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 override Task<ValueProviderResult> GetValueAsync(string key)