Show / Hide Table of Contents

Class Avg

Prefix operation that return the average of a set of numbers

Operand Count: 0 to infinite

Operand Type: number, if the operand count is 1, it can be an array

Output Type: double

Usage: avg(1, 2, 3, 4, 5) or avg(@(1, 2, 3, 4, 5))

Note: null value will not be counted, therefore avg(null, 2, 2, 2) should be 6/3 = 2 not 6/4 = 1.5; It will return null if the count is 0.

Inheritance
System.Object
PrefixOperationToken
Avg
Implements
IToken
Inherited Members
PrefixOperationToken.Operands
PrefixOperationToken.Match(String, Int32, Int32)
PrefixOperationToken.EvalText(String)
PrefixOperationToken.ToString()
PrefixOperationToken.Clone()
PrefixOperationToken.GetParamsOperands(Func<String, Object>, Type)
PrefixOperationToken.GetOperands(Func<String, Object>)
PrefixOperationToken.GetOperands(Func<String, Object>, Type)
PrefixOperationToken.GetOperands<T>(Func<String, Object>)
PrefixOperationToken.GetOperandText(Object, Int32, String)
Namespace: Albatross.Expression.Operations
Assembly: Albatross.Expression.dll
Syntax
public class Avg : PrefixOperationToken, IToken

Properties

MaxOperandCount

Declaration
public override int MaxOperandCount { get; }
Property Value
Type Description
System.Int32
Overrides
PrefixOperationToken.MaxOperandCount

MinOperandCount

Declaration
public override int MinOperandCount { get; }
Property Value
Type Description
System.Int32
Overrides
PrefixOperationToken.MinOperandCount

Name

Declaration
public override string Name { get; }
Property Value
Type Description
System.String
Overrides
PrefixOperationToken.Name

Symbolic

Declaration
public override bool Symbolic { get; }
Property Value
Type Description
System.Boolean
Overrides
PrefixOperationToken.Symbolic

Methods

EvalValue(Func<String, Object>)

Declaration
public override object EvalValue(Func<string, object> context)
Parameters
Type Name Description
System.Func<System.String, System.Object> context
Returns
Type Description
System.Object
Overrides
PrefixOperationToken.EvalValue(Func<String, Object>)

Implements

IToken

Extension Methods

Extensions.ConvertToBoolean(Object)
Extensions.IsVariable(IToken)
Back to top Generated by DocFX