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
Type
public Type Type { get; }
Property Value
TypeName
public abstract string TypeName { get; }
Property Value
ValueObject
public abstract object? ValueObject { get; }
Property Value
Methods
Compare(ComparisonOperator, CValue)
public virtual bool Compare(ComparisonOperator function, CValue other)
Parameters
function
ComparisonOperatorother
CValue
Returns
Divide(CValue)
public virtual CValue Divide(CValue right)
Parameters
right
CValue
Returns
Execute(CContext, ICTerminal, IEnumerable<CValue?>)
public virtual CValue Execute(CContext context, ICTerminal terminal, IEnumerable<CValue?> arguments)
Parameters
context
CContextterminal
ICTerminalarguments
IEnumerable<CValue>
Returns
Falsey()
public virtual bool Falsey()
Returns
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
Plus(CValue)
public virtual CValue Plus(CValue right)
Parameters
right
CValue
Returns
Times(CValue)
public virtual CValue Times(CValue right)
Parameters
right
CValue
Returns
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
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn IFormatProvider interface implementation that supplies culture-specific formatting information.
Returns
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
IFormatProviderAn IFormatProvider interface implementation that supplies culture-specific formatting information.
Returns
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
IFormatProviderAn 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
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
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn 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
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
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn IFormatProvider interface implementation that supplies culture-specific formatting information.
Returns
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
TypeThe Type to which the value of this instance is converted.
provider
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn 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
IFormatProviderAn 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
UnaryMinus()
public virtual CValue UnaryMinus()
Returns
UnaryPlus()
public virtual CValue UnaryPlus()
Returns
UnaryTilde()
public virtual CValue UnaryTilde()
Returns
Operators
operator +(CValue, CValue)
public static CValue operator +(CValue a, CValue b)
Parameters
Returns
operator /(CValue, CValue)
public static CValue operator /(CValue a, CValue b)
Parameters
Returns
explicit operator bool(CValue)
public static explicit operator bool(CValue value)
Parameters
value
CValue
Returns
explicit operator int(CValue)
public static explicit operator int(CValue value)
Parameters
value
CValue
Returns
explicit operator float(CValue)
public static explicit operator float(CValue value)
Parameters
value
CValue
Returns
explicit operator string(CValue)
public static explicit operator string(CValue value)
Parameters
value
CValue
Returns
explicit operator CValue(bool)
public static explicit operator CValue(bool b)
Parameters
b
bool
Returns
explicit operator CValue(int)
public static explicit operator CValue(int i)
Parameters
i
int
Returns
explicit operator CValue(float)
public static explicit operator CValue(float f)
Parameters
f
float
Returns
explicit operator CValue(string)
public static explicit operator CValue(string s)
Parameters
s
string
Returns
operator *(CValue, CValue)
public static CValue operator *(CValue a, CValue b)
Parameters
Returns
operator ~(CValue)
public static CValue operator ~(CValue a)
Parameters
a
CValue
Returns
operator -(CValue, CValue)
public static CValue operator -(CValue a, CValue b)
Parameters
Returns
operator -(CValue)
public static CValue operator -(CValue a)
Parameters
a
CValue
Returns
operator +(CValue)
public static CValue operator +(CValue a)
Parameters
a
CValue