Struct ValueBuffer
- Namespace
- Microsoft.EntityFrameworkCore.Storage
- Assembly
- Microsoft.EntityFrameworkCore.dll
Represents a set of indexed values. Typically used to represent a row of data returned from a database.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public readonly struct ValueBuffer : IEquatable<ValueBuffer>
- Implements
- Inherited Members
Remarks
See Implementation of database providers and extensions for more information and examples.
Constructors
ValueBuffer(object?[])
Initializes a new instance of the ValueBuffer class.
public ValueBuffer(object?[] values)
Parameters
values
object[]The list of values for this buffer.
Fields
Empty
A buffer with no values in it.
public static readonly ValueBuffer Empty
Field Value
Properties
Count
Gets the number of values in this buffer.
public int Count { get; }
Property Value
IsEmpty
Gets a value indicating whether the value buffer is empty.
public bool IsEmpty { get; }
Property Value
this[int]
Gets the value at a requested index.
public object? this[int index] { get; set; }
Parameters
index
intThe index of the value to get.
Property Value
- object
The value at the requested index.
Methods
Equals(ValueBuffer)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ValueBuffer other)
Parameters
other
ValueBufferAn object to compare with this object.
Returns
Equals(object?)
Determines if this value buffer is equivalent to a given object (i.e. if they are both value buffers and contain the same values).
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare this value buffer to.
Returns
- bool
true if the object is a ValueBuffer and contains the same values, otherwise false.
GetHashCode()
Gets the hash code for the value buffer.
public override int GetHashCode()
Returns
- int
The hash code for the value buffer.