Test additional content header

ValuesT Class

Represents both, a strongly typed read-ony list of Values, and a value that is Sum of all elements.

Definition

Namespace: Fluent.Calculations.Primitives.Collections
Assembly: Fluent.Calculations.Primitives (in Fluent.Calculations.Primitives.dll) Version: 1.1.0-aplha
public class Values<T> : IValuesProvider<T>, IReadOnlyCollection<T>, 
	IEnumerable<T>, IEnumerable, IValueProvider, IValue
where T : class, new(), IValueProvider
Inheritance
Object    ValuesT
Implements
IValue, IValueProvider, IValuesProviderT, IEnumerableT, IReadOnlyCollectionT, IEnumerable

Type Parameters

T
Type of collection element

Remarks

Usefull keep track of same kind of values while ussing aggregate functions results in calculations.

Constructors

ValuesT Initializes a new instance of the Value with provided values. Used in derived classes to initialize base class fields.

Properties

CountGets the number of elements contained in the Values collection.
ExpressionMetadata of expression that yielded this value.
NameName of values collection
OriginOrigin type of the value.
PrimitiveNumeric primitive representation of the sum of all Primitive values in the collection.
PrimitiveStringFormatted string representation of the Primitive value
ScopeNamed scope that this value is part of
TagsCustom tags associated with the collection.
TypeOriginal type of the the collection implementation.

Methods

AcceptAccepts Arguments visitor.
AddAdds a value to the end of the Values collection.
MakeDefaultReturns the default value empty collection of a concrete type.
MakeOfThisElementTypeInitializes a new instance of collection element type.
MakeOfThisTypeInitializes a new instance of the concrete Values collection.
ToStringReturns a string that represents the current collection object.
(Overrides ObjectToString)

Extension Methods

AverageTComputes the average of a values in a collection.
(Defined by ValuesLinqMathExtensions)
MaxTReturns the maximum of a values in a collection.
(Defined by ValuesLinqMathExtensions)
MinTReturns the minimum of a values in a collection.
(Defined by ValuesLinqMathExtensions)
SumTComputes the sum of a values in a collection.
(Defined by ValuesLinqMathExtensions)

See Also