Table of Contents

Class CValue

Namespace
ReFuel.CVarScript
Assembly
ReFuel.dll
public abstract class CValue : IConvertible
Inheritance
CValue
Implements
Derived
Inherited Members

Constructors

CValue(Type)

public CValue(Type type)

Parameters

type Type

Properties

this[CValue?]

public virtual CValue? this[CValue? indexer] { get; }

Parameters

indexer CValue

Property Value

CValue

Type

public Type Type { get; }

Property Value

Type

TypeName

public abstract string TypeName { get; }

Property Value

string

ValueObject

public abstract object? ValueObject { get; }

Property Value

object

Methods

Compare(ComparisonOperator, CValue)

public virtual bool Compare(ComparisonOperator function, CValue other)

Parameters

function ComparisonOperator
other CValue

Returns

bool

Divide(CValue)

public virtual CValue Divide(CValue right)

Parameters

right CValue

Returns

CValue

Execute(CContext, ICTerminal, IEnumerable<CValue?>)

public virtual CValue Execute(CContext context, ICTerminal terminal, IEnumerable<CValue?> arguments)

Parameters

context CContext
terminal ICTerminal
arguments IEnumerable<CValue>

Returns

CValue

Falsey()

public virtual bool Falsey()

Returns

bool

GetTypeCode()

Returns the TypeCode for this instance.

public virtual TypeCode GetTypeCode()

Returns

TypeCode

The enumerated constant that is the TypeCode of the class or value type that implements this interface.

Minus(CValue)

public virtual CValue Minus(CValue right)

Parameters

right CValue

Returns

CValue

Plus(CValue)

public virtual CValue Plus(CValue right)

Parameters

right CValue

Returns

CValue

Times(CValue)

public virtual CValue Times(CValue right)

Parameters

right CValue

Returns

CValue

ToBoolean(IFormatProvider?)

Converts the value of this instance to an equivalent Boolean value using the specified culture-specific formatting information.

public virtual bool ToBoolean(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

bool

A Boolean value equivalent to the value of this instance.

ToByte(IFormatProvider?)

Converts the value of this instance to an equivalent 8-bit unsigned integer using the specified culture-specific formatting information.

public virtual byte ToByte(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

byte

An 8-bit unsigned integer equivalent to the value of this instance.

ToChar(IFormatProvider?)

Converts the value of this instance to an equivalent Unicode character using the specified culture-specific formatting information.

public virtual char ToChar(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

char

A Unicode character equivalent to the value of this instance.

ToDateTime(IFormatProvider?)

Converts the value of this instance to an equivalent DateTime using the specified culture-specific formatting information.

public virtual DateTime ToDateTime(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

DateTime

A DateTime instance equivalent to the value of this instance.

ToDecimal(IFormatProvider?)

Converts the value of this instance to an equivalent decimal number using the specified culture-specific formatting information.

public virtual decimal ToDecimal(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

decimal

A decimal number equivalent to the value of this instance.

ToDouble(IFormatProvider?)

Converts the value of this instance to an equivalent double-precision floating-point number using the specified culture-specific formatting information.

public virtual double ToDouble(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

double

A double-precision floating-point number equivalent to the value of this instance.

ToFloat()

public virtual float ToFloat()

Returns

float

ToInt16(IFormatProvider?)

Converts the value of this instance to an equivalent 16-bit signed integer using the specified culture-specific formatting information.

public virtual short ToInt16(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

short

An 16-bit signed integer equivalent to the value of this instance.

ToInt32(IFormatProvider?)

Converts the value of this instance to an equivalent 32-bit signed integer using the specified culture-specific formatting information.

public virtual int ToInt32(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

int

An 32-bit signed integer equivalent to the value of this instance.

ToInt64(IFormatProvider?)

Converts the value of this instance to an equivalent 64-bit signed integer using the specified culture-specific formatting information.

public virtual long ToInt64(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

long

An 64-bit signed integer equivalent to the value of this instance.

ToInteger()

public virtual int ToInteger()

Returns

int

ToSByte(IFormatProvider?)

Converts the value of this instance to an equivalent 8-bit signed integer using the specified culture-specific formatting information.

public virtual sbyte ToSByte(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

sbyte

An 8-bit signed integer equivalent to the value of this instance.

ToSingle(IFormatProvider?)

Converts the value of this instance to an equivalent single-precision floating-point number using the specified culture-specific formatting information.

public virtual float ToSingle(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

float

A single-precision floating-point number equivalent to the value of this instance.

ToString(IFormatProvider?)

Converts the value of this instance to an equivalent string using the specified culture-specific formatting information.

public virtual string ToString(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

string

A string instance equivalent to the value of this instance.

ToType(Type, IFormatProvider?)

Converts the value of this instance to an object of the specified Type that has an equivalent value, using the specified culture-specific formatting information.

public virtual object ToType(Type conversionType, IFormatProvider? provider)

Parameters

conversionType Type

The Type to which the value of this instance is converted.

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

object

An object instance of type conversionType whose value is equivalent to the value of this instance.

ToUInt16(IFormatProvider?)

Converts the value of this instance to an equivalent 16-bit unsigned integer using the specified culture-specific formatting information.

public virtual ushort ToUInt16(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

ushort

An 16-bit unsigned integer equivalent to the value of this instance.

ToUInt32(IFormatProvider?)

Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified culture-specific formatting information.

public virtual uint ToUInt32(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

uint

An 32-bit unsigned integer equivalent to the value of this instance.

ToUInt64(IFormatProvider?)

Converts the value of this instance to an equivalent 64-bit unsigned integer using the specified culture-specific formatting information.

public virtual ulong ToUInt64(IFormatProvider? provider)

Parameters

provider IFormatProvider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns

ulong

An 64-bit unsigned integer equivalent to the value of this instance.

Truthy()

public virtual bool Truthy()

Returns

bool

UnaryMinus()

public virtual CValue UnaryMinus()

Returns

CValue

UnaryPlus()

public virtual CValue UnaryPlus()

Returns

CValue

UnaryTilde()

public virtual CValue UnaryTilde()

Returns

CValue

Operators

operator +(CValue, CValue)

public static CValue operator +(CValue a, CValue b)

Parameters

a CValue
b CValue

Returns

CValue

operator /(CValue, CValue)

public static CValue operator /(CValue a, CValue b)

Parameters

a CValue
b CValue

Returns

CValue

explicit operator bool(CValue)

public static explicit operator bool(CValue value)

Parameters

value CValue

Returns

bool

explicit operator int(CValue)

public static explicit operator int(CValue value)

Parameters

value CValue

Returns

int

explicit operator float(CValue)

public static explicit operator float(CValue value)

Parameters

value CValue

Returns

float

explicit operator string(CValue)

public static explicit operator string(CValue value)

Parameters

value CValue

Returns

string

explicit operator CValue(bool)

public static explicit operator CValue(bool b)

Parameters

b bool

Returns

CValue

explicit operator CValue(int)

public static explicit operator CValue(int i)

Parameters

i int

Returns

CValue

explicit operator CValue(float)

public static explicit operator CValue(float f)

Parameters

f float

Returns

CValue

explicit operator CValue(string)

public static explicit operator CValue(string s)

Parameters

s string

Returns

CValue

operator *(CValue, CValue)

public static CValue operator *(CValue a, CValue b)

Parameters

a CValue
b CValue

Returns

CValue

operator ~(CValue)

public static CValue operator ~(CValue a)

Parameters

a CValue

Returns

CValue

operator -(CValue, CValue)

public static CValue operator -(CValue a, CValue b)

Parameters

a CValue
b CValue

Returns

CValue

operator -(CValue)

public static CValue operator -(CValue a)

Parameters

a CValue

Returns

CValue

operator +(CValue)

public static CValue operator +(CValue a)

Parameters

a CValue

Returns

CValue