DataValue Class

Spotfire 14.3 API Reference
An abstract base class for flyweight data value containers. More precisely, a DataValue instance contains a value of a particular DataType, and thus every DataValue has a corresponding DataType. (This is not necessarily true for the methods marked Obsolete in this class.) Instances of the generic subclass are normally used, often explicitly, and this non-generic base class is provided only for convenience in contexts where the generic type is not known, or variable. Note that this class is intended as a flyweight, that is, as a reusable container. This means that it is not optimized for memory and is unsuitable for representing arrays or matrices of data values, where a separate DataValue instance is used for each cell. Consider using a more compact representation of the values for such purposes. The DataValue class is not serializable and should not be used for persistent storage.
Inheritance Hierarchy

SystemObject
  Spotfire.Dxp.DataDataValue
    Spotfire.Dxp.DataDataValueT

Namespace:  Spotfire.Dxp.Data
Assembly:  Spotfire.Dxp.Data (in Spotfire.Dxp.Data.dll) Version: 65.0.19510.3242 (65.0.19510.3242)
Syntax

C#
public abstract class DataValue

The DataValue type exposes the following members.

Properties

  NameDescription
Public propertyDataType
Gets the data type corresponding to the runtime values that can be stored in this value container. The data type is fixed, since a data value cannot be used for values of varying types.
Public propertyErrorValue Obsolete.
Gets or sets the data error associated with this DataValue.
Public propertyHasValidValue
Gets a value indicating whether this DataValue contains a valid value. If HasValidValue is false, then either IsNullValue is true or HasDataError is true, but not both. If HasValidValue is true, the IsNullValue and HasDataError are both false.
Public propertyIndex Obsolete.
Gets the row index associated with this DataValue, if applicable.
Public propertyIsError Obsolete.
Gets a value indicating whether the DataValue represents an error.
Public propertyIsNullValue
Gets a value indicating whether this DataValue instance represents a null value, or, more precisely, an invalid value with a null data error.
Public propertyIsValid Obsolete.
Gets or sets a value indicating whether the contained data value is valid.
Public propertyValidValue
Gets or sets the runtime value contained in this DataValue instance, as a boxed value. The getter returns null for reference types and default(T) for value types, if the HasValidValue is false. After setting a valid value HasValidValue will be true, HasDataError and IsNullValue will be false, and DataError will return null.
Public propertyValue Obsolete.
Gets the value contained in this DataValue instance.
Top
Methods

  NameDescription
Public methodAssignFrom
Sets this DataValue instance equal to another DataValue instance.
Public methodClone
Creates a copy of this instance.
Public methodStatic memberCreate(DataType)
Creates a DataValue instance of a given data type.
Public methodStatic memberCreate(DataType, Object)
Creates a DataValue instance of a given data type and with a provided initial value.
Public methodStatic memberCreateT
Creates a DataValue instance of a given runtime type.
Public methodStatic memberCreateT(T)
Creates a DataValue instance of a given runtime type and with a provided initial value.
Public methodStatic memberCreateT(T, Boolean)
Creates a DataValue instance of a given runtime type and with a provided initial value. This method is redundant but useful in practice.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetNullValue
Makes this DataValue instance represent a null value. That is, an invalid value with a null data error. After the method call, HasValidValue will return false, IsNullValue will return true, and HasDataError will return false. The ValidValue property will be null or default(T).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference