ValueProviderResult Struct¶
Result of an Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider.GetValue(System.String) operation.
- Namespace
Microsoft.AspNetCore.Mvc.ModelBinding- Assemblies
- Microsoft.AspNetCore.Mvc.Abstractions
Syntax¶
public struct ValueProviderResult : IEquatable<ValueProviderResult>, IEnumerable<string>, IEnumerable
-
struct
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult
Constructors¶
-
ValueProviderResult(Microsoft.Extensions.Primitives.StringValues)¶ Creates a new
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultusingSystem.Globalization.CultureInfo.InvariantCulture.Arguments: values (Microsoft.Extensions.Primitives.StringValues) – The submitted values. public ValueProviderResult(StringValues values)
-
ValueProviderResult(Microsoft.Extensions.Primitives.StringValues, System.Globalization.CultureInfo) Creates a new
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Arguments: - values (Microsoft.Extensions.Primitives.StringValues) – The submitted values.
- culture (System.Globalization.CultureInfo) – The
System.Globalization.CultureInfoassociated with this value.
public ValueProviderResult(StringValues values, CultureInfo culture)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Culture¶ Gets or sets the
System.Globalization.CultureInfoassociated with the values.Return type: System.Globalization.CultureInfo public CultureInfo Culture { get; }
-
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.FirstValue¶ Gets the first value based on the order values were provided in the request. Use
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.FirstValueto get a single value for processing regardless of whether a single or multiple values were provided in the request.Return type: System.String public string FirstValue { get; }
-
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Length¶ Gets the number of submitted values.
Return type: System.Int32 public int Length { get; }
-
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Values¶ Gets or sets the values.
Return type: Microsoft.Extensions.Primitives.StringValues public StringValues Values { get; }
-
Operators¶
-
Equality(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult)¶ Compares two
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultobjects for equality.Arguments: Return type: System.Boolean
Returns: <code>true</code> if the values are equal, otherwise <code>false</code>.
public static bool operator ==(ValueProviderResult x, ValueProviderResult y)
-
Explicit(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult to System.String)¶ Converts the provided
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultinto a comma-separated string containing all submitted values.Arguments: result (Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult) – The Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Return type: System.String public static explicit operator string (ValueProviderResult result)
-
Explicit(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult to System.String[]) Converts the provided
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultinto a an array ofSystem.Stringcontaining all submitted values.Arguments: result (Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult) – The Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Return type: System.String<System.String>[] public static explicit operator string[](ValueProviderResult result)
-
Inequality(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult, Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult)¶ Compares two
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultobjects for inequality.Arguments: Return type: System.Boolean
Returns: <code>false</code> if the values are equal, otherwise <code>true</code>.
public static bool operator !=(ValueProviderResult x, ValueProviderResult y)
-
Methods¶
-
Equals(Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult)¶ Return type: System.Boolean public bool Equals(ValueProviderResult other)
-
Equals(System.Object) Return type: System.Boolean public override bool Equals(object obj)
-
GetEnumerator()¶ Gets an
System.Collections.Generic.IEnumerator`1for thisMicrosoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult.Return type: System.Collections.Generic.IEnumerator<System.String> Returns: An System.Collections.Generic.IEnumerator`1.public IEnumerator<string> GetEnumerator()
-
GetHashCode()¶ Return type: System.Int32 public override int GetHashCode()
-
GetEnumerator() Return type: System.Collections.IEnumerator IEnumerator IEnumerable.GetEnumerator()
-
ToString()¶ Return type: System.String public override string ToString()
-
Fields¶
-
None()¶ A
Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResultthat represents a lack of data.Return type: Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult public static ValueProviderResult None
-