RTypeExtensions
01 Syntax
SMRUCC.Rsharp.Runtime.RTypeExtensions
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| GetRTypeCode | 2 | Get R type code from the type constraint expression value. |
| IsPrimitive | 2 | It is R# primitive type? (bool, double, int, string, list?) |
| IsNumeric | 1 | Target R type is a kind of numeric type? |
| GetType | 2 | Mapping R# TypeCodes to .net CLR object type |
03 Fields
| Name | Overloads | Summary |
|---|---|---|
| parseTypeCode | 1 | Converts the input string text to value TypeCodes |
04 Members
GetRTypeCode(
String)Get R type code from the type constraint expression value.
Parameters
| Name | Type | Description |
|---|---|---|
type$ | String | - |
GetRTypeCode(
Type)VB.NET CLR object type to R type code mapping
Parameters
| Name | Type | Description |
|---|---|---|
type | Type | - |
IsPrimitive(
Type, Boolean)It is R# primitive type?
Parameters
| Name | Type | Description |
|---|---|---|
type | Type | - |
IsPrimitive(TypeCodes,
Boolean)It is R# primitive type? (bool, double, int, string, list?)
Parameters
| Name | Type | Description |
|---|---|---|
type | TypeCodes | - |
IsNumeric(TypeCodes)
Target R type is a kind of numeric type?
Parameters
| Name | Type | Description |
|---|---|---|
type | TypeCodes | - |
Returns
this function returns true if the type is TypeCodes.double or TypeCodes.integer
GetType(
TypeCode)Mapping CLR TypeCode to .net CLR object type
Parameters
| Name | Type | Description |
|---|---|---|
type | TypeCode | - |
GetType(TypeCodes,
Boolean)Mapping R# TypeCodes to .net CLR object type
Parameters
| Name | Type | Description |
|---|---|---|
type | TypeCodes | - |
Returns
the function will returns nothing if the type mapping is not valid
parseTypeCode
Converts the input string text to value TypeCodes