Show / Hide Table of Contents

Class MathematicalExpression

The base-class for all mathematical expressions.

Inheritance
Object
QueryElement
Argument
MathematicalExpression
Add
Divide
Multiply
Subtract
Implements
ICloneable
Inherited Members
Argument.Equal(Argument)
Argument.UnEqual(Argument)
Argument.LessThan(Argument)
Argument.LessThanOrEqual(Argument)
Argument.GreaterThan(Argument)
Argument.GreaterThanOrEqual(Argument)
Argument.Like(Argument)
Argument.Like(String)
Argument.NotLike(Argument)
Argument.NotBetween(Argument, Argument)
Argument.Between(Argument, Argument)
Argument.In(Argument[])
Argument.HasAny(Argument[])
Argument.HasAll(Argument[])
Argument.MissingAny(Argument[])
Argument.MissingAll(Argument[])
Argument.IsNull()
Argument.IsNotNull()
Argument.NotIn(Argument[])
Argument.ToArgumentArray<T>(T[])
Argument.ToArgumentArray<T>(T[], Boolean)
Argument.GetSubElements()
Argument.Alias
Argument.DataType
Argument.Size
QueryElement.Clone()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Data.SQL
Assembly: SoDataBase.dll
Syntax
public abstract class MathematicalExpression : Argument, ICloneable

Constructors

MathematicalExpression(FieldDataType, Int32)

Initializes a new instance of the MathematicalExpression class, and takes datatype and length as in-parameters.

Declaration
public MathematicalExpression(FieldDataType dataType, int length)
Parameters
Type Name Description
FieldDataType dataType

Type of the data.

Int32 length

The length.

MathematicalExpression(Argument, Argument)

Initializes a new instance of the MathematicalExpression class, and takes left and right as in-parameters.

Declaration
public MathematicalExpression(Argument left, Argument right)
Parameters
Type Name Description
Argument left

The left-hand-side of the operation.

Argument right

The right-hand-side of the operation.

Remarks

Will validate that the incoming parameters are not null.

MathematicalExpression(Argument[])

Default constructor.

Declaration
public MathematicalExpression(params Argument[] arguments)
Parameters
Type Name Description
Argument[] arguments

Fields

_args

If Mathematical operation have several in-parameters,
an array of arguments is used to hold the parameters instead of the left and right class-variables.

Declaration
protected Argument[] _args
Field Value
Type Description
Argument[]

Properties

Arguments

Get method for the argument collection.

Declaration
public Argument[] Arguments { get; }
Property Value
Type Description
Argument[]

Left

The left hand side of the operation.

Declaration
public Argument Left { get; set; }
Property Value
Type Description
Argument

Right

The right hand side of the operation.

Declaration
public Argument Right { get; set; }
Property Value
Type Description
Argument

Methods

GetMainField()

Information about a database field.

Declaration
public override FieldInfo GetMainField()
Returns
Type Description
FieldInfo

Information about the database field

Overrides
Argument.GetMainField()

ToString()

String output.

Declaration
public override string ToString()
Returns
Type Description
String

a MATHOP b

Overrides
Object.ToString()

ValidateArgumentCollection()

Validates the class' argument-collection.

Declaration
protected virtual void ValidateArgumentCollection()
Remarks

The validation is common for Subtract, Multiply and Divide. Add needs to validate the collection itselves because of the functions possibility to do an add-operation on strings.

ValidateFieldInfoParameter(FieldInfo, Parameter)

ValidateFieldInfoParameter validates that the operation can be done on a FieldInfo and a Parameter.

Declaration
protected virtual void ValidateFieldInfoParameter(FieldInfo left, Parameter right)
Parameters
Type Name Description
FieldInfo left

The left-hand-side of the operation.

Parameter right

The right-hand-side of the operation.

Remarks

Validates that the Parameters is not 0 (zero).

ValidateParameterArgumentsForZeroValue(Parameter, Parameter)

ValidateParameterArguments validates that the operation can be done on two Parameters.

Declaration
protected virtual void ValidateParameterArgumentsForZeroValue(Parameter left, Parameter right)
Parameters
Type Name Description
Parameter left

The left-hand-side of the operation.

Parameter right

The right-hand-side of the operation.

Remarks

Validates that the value of both sides is not 0 (zero).

Implements

System.ICloneable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top