ValueProviderResult Struct

Definition

Result of an GetValue(String) operation.

public value class ValueProviderResult : IEquatable<Microsoft::AspNetCore::Mvc::ModelBinding::ValueProviderResult>, System::Collections::Generic::IEnumerable<System::String ^>
public struct ValueProviderResult : IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult>, System.Collections.Generic.IEnumerable<string>
public readonly struct ValueProviderResult : IEquatable<Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult>, System.Collections.Generic.IEnumerable<string>
type ValueProviderResult = struct
    interface seq<string>
    interface IEnumerable
Public Structure ValueProviderResult
Implements IEnumerable(Of String), IEquatable(Of ValueProviderResult)
Inheritance
ValueProviderResult
Implements

Remarks

ValueProviderResult can represent a single submitted value or multiple submitted values.

Use FirstValue to consume only a single value, regardless of whether a single value or multiple values were submitted.

Treat ValueProviderResult as an IEnumerable<T> to consume all values, regardless of whether a single value or multiple values were submitted.

Constructors

ValueProviderResult(StringValues)

Creates a new ValueProviderResult using InvariantCulture.

ValueProviderResult(StringValues, CultureInfo)

Creates a new ValueProviderResult.

Fields

None

A ValueProviderResult that represents a lack of data.

Properties

Culture

Gets or sets the CultureInfo associated with the values.

FirstValue

Gets the first value based on the order values were provided in the request. Use FirstValue to get a single value for processing regardless of whether a single or multiple values were provided in the request.

Length

Gets the number of submitted values.

Values

Gets or sets the values.

Methods

Equals(Object)

Indicates whether this instance and a specified object are equal.

Equals(ValueProviderResult)

Indicates whether the current object is equal to another object of the same type.

GetEnumerator()

Gets an IEnumerator<T> for this ValueProviderResult.

GetHashCode()

Returns the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

Operators

Equality(ValueProviderResult, ValueProviderResult)

Compares two ValueProviderResult objects for equality.

Explicit(ValueProviderResult to String)

Converts the provided ValueProviderResult into a comma-separated string containing all submitted values.

Explicit(ValueProviderResult to String[])

Converts the provided ValueProviderResult into a an array of String containing all submitted values.

Inequality(ValueProviderResult, ValueProviderResult)

Compares two ValueProviderResult objects for inequality.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Extension Methods

ConvertTo(ValueProviderResult, Type)

Attempts to convert the values in result to the specified type.

ConvertTo<T>(ValueProviderResult)

Attempts to convert the values in result to the specified type.

Applies to