Class VBTypedValueFactory
A utility factory for creating new VBTypedValue instances.
public static class VBTypedValueFactory
- Inheritance
-
VBTypedValueFactory
- Inherited Members
Methods
CreateBooleanValue(bool)
Creates a new VBBooleanValue with the specified value for the specified symbol.
public static VBBooleanValue CreateBooleanValue(bool value)
Parameters
valuebool
Returns
CreateBooleanValue(double)
Creates a new VBBooleanValue with the specified value for the specified symbol.
public static VBBooleanValue CreateBooleanValue(double numericValue)
Parameters
numericValuedouble
Returns
CreateNullValue()
Creates a new VBNullValue for the specified Symbol.
public static VBNullValue CreateNullValue()
Returns
CreateStringValue(string)
Creates a new VBStringValue with the specified value, for the specified symbol.
public static VBStringValue CreateStringValue(string stringValue)
Parameters
stringValuestringThe underlying (managed) string value being wrapped.
Returns
CreateValue(VBType)
Creates a new VBTypedValue of the specified VType
public static VBTypedValue? CreateValue(VBType type)
Parameters
typeVBTypeThe
VBTypeof the value to create.
Returns
CreateValue(VBType, double)
Creates a new VBNumericValue of the specified type, with the specified value, for the specified symbol.
public static VBTypedValue CreateValue(VBType type, double numericValue)
Parameters
typeVBTypeThe target numeric
VBType.numericValuedoubleThe underlying (managed) numeric value being wrapped.
Returns
CreateValue(VBTypeDescValue, VBNumericTypedValue)
Creates a new VBNumericValue of the specified described type, with the specified value, for the specified symbol.
public static VBTypedValue CreateValue(VBTypeDescValue typeDesc, VBNumericTypedValue source)
Parameters
typeDescVBTypeDescValueA
VBTypeDescValuedescribing the target numeric data type.sourceVBNumericTypedValueA VBNumericTypedValue source value.
Returns
Remarks
👉 Overloads taking a VBTypeDescValue type descriptor value parameter are intended for let-coercion semantics and may eventually need to be moved.
CreateValue(VBTypeDescValue, VBDateValue)
Creates a new VBNumericValue of the specified described type, with the specified value, for the specified symbol.
public static VBTypedValue CreateValue(VBTypeDescValue typeDesc, VBDateValue source)
Parameters
typeDescVBTypeDescValueA
VBTypeDescValuedescribing the target numeric data type.sourceVBDateValueA VBDateValue source value.
Returns
Remarks
👉 Overloads taking a VBTypeDescValue type descriptor value parameter are intended for let-coercion semantics and may eventually need to be moved.
CreateValue(VBTypeDescValue, IRuntimeValue)
Creates a new VBNumericValue of the specified described type, with the specified value, for the specified symbol.
public static VBTypedValue CreateValue(VBTypeDescValue typeDesc, IRuntimeValue managedValue)
Parameters
typeDescVBTypeDescValueA
VBTypeDescValuedescribing the target numeric data type.managedValueIRuntimeValueThe underlying (managed) numeric value being wrapped.
Returns
Remarks
👉 Overloads taking a VBTypeDescValue type descriptor value parameter are intended for let-coercion semantics and may eventually need to be moved.
CreateValue(VBTypeDescValue, double)
Creates a new VBNumericValue of the specified described type, with the specified value, for the specified symbol.
public static VBTypedValue CreateValue(VBTypeDescValue typeDesc, double numericValue)
Parameters
typeDescVBTypeDescValueA
VBTypeDescValuedescribing the target numeric data type.numericValuedoubleThe underlying (managed) numeric value being wrapped.
Returns
Remarks
👉 Overloads taking a VBTypeDescValue type descriptor value parameter are intended for let-coercion semantics and may eventually need to be moved.
CreateValue(bool)
Creates a new VBBooleanValue with the specified value for the specified symbol.
public static VBBooleanValue CreateValue(bool boolValue)
Parameters
boolValueboolThe underying (managed)
boolvalue being wrapped.
Returns
CreateValue(DateTime)
Creates a new VBDateValue with the specified value for the specified symbol.
public static VBDateValue CreateValue(DateTime dateTimeValue)
Parameters
dateTimeValueDateTimeThe underying (managed)
DateTimevalue being wrapped.
Returns
CreateVariant(VBTypedValue)
Creates a new Variant value wrapping the specified VBTypedValue.
public static VBVariantValue CreateVariant(VBTypedValue wrapped)
Parameters
wrappedVBTypedValueThe
VBTypedValueto be wrapped.into aVariant.
Returns
- VBVariantValue
A
VBVariantValuewith aSubTypematching the data type of thewrappedvalue.
DescribeType(VBType)
Creates a new VBTypeDescValue, which is a meta-VBTypedValue representing a VBType.
public static VBTypeDescValue DescribeType(VBType type)