RVectorExtensions
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| AllNothing | 1 | check all elements inside the given array is all nothing? |
| isVector | 1 | Object x is an array of T? |
| getFirst | 1 | Get first element in the input value sequence |
| single | 1 | Try get a single element |
| asVector | 2 | Ensure that the input value object is a sequence. |
| UnsafeTryCastGenericArray | 2 | Cast a possible object array to a generic type constrained array |
| isScalarVector | 1 | target value is nothing orelse is array with less than or equals to one element? |
| MeltArray | 1 | vector length = 0: means nothing vector length = 1: means scalar |
| TryCastGenericArray | 1 | This function make sure the return array is not a generic type array |
| asVector | 1 | 这个函数会确保返回的输出值都是一个数组 |
| castSingle | 1 | handling some special type cast situation |
| isVector | 1 | |
| CTypeOfList | 1 | |
| DirectCastGenericArray | 1 |
03 Members
Array)check all elements inside the given array is all nothing?
| Name | Type | Description |
|---|---|---|
v | Array | - |
Object)Object x is an array of T?
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
x | Object | - |
returns a logical value of this type test operation
Object, Boolean)Get first element in the input value sequence
| Name | Type | Description |
|---|---|---|
value | Object | - |
Object, Boolean)Try get a single element
这个函数只会在确认只有一个向量元素的情况下才会返回单个元素
| Name | Type | Description |
|---|---|---|
x | Object | If the input object x is an array with just one element, then the single value will be populate, otherwise will populate the input x |
forceSingle | Boolean | this function returns the first element in array/vector always if this parameter is set to true |
Ensure that the input value object is a sequence. (This method will decouple the object instance value from vbObject container unless the required type is vbObject.)
| Name | Type | Description |
|---|---|---|
value | Object | - |
type | Type | should be the element type of the target vector array |
如果执行出错,这个函数会返回一个错误消息
Array)Cast a possible object array to a generic type constrained array
| Name | Type | Description |
|---|---|---|
vec | Array | - |
propably returns an array with all element value is nothing
Array, Type)Cast a possible object array to a generic type constrained array
| Name | Type | Description |
|---|---|---|
vec | Array | - |
propably returns an array with all element value is nothing
Object)target value is nothing orelse is array with less than or equals to one element?
| Name | Type | Description |
|---|---|---|
xi | Object | - |
Does the input test object xi not contains multiple value?
Array)vector length = 0: means nothing vector length = 1: means scalar
| Name | Type | Description |
|---|---|---|
vec | Array | - |
Array, Environment)This function make sure the return array is not a generic type array
返回错误消息或者结果向量
| Name | Type | Description |
|---|---|---|
vec | Array | - |
env | Environment | - |
A class variant type: error message or a generic array.
Andalso this function will returns nothing if the input vec is nothing orelse is empty array.
Object)这个函数会确保返回的输出值都是一个数组
20210526 因为这个函数会涉及到转换类型的操作,所以性能损耗会非常严重
所以假若仅仅只需要转换数据对象为数组的话,请避免使用这个函数 应该手动编写代码以提升性能
在进行.NET语言编写相应的包的时候,尽量使用CLRVector模块之中 的类型转换函数以减少性能损失
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
value | Object | - |
this function returns an empty collection if the given value is nothing.
Type, Object)handling some special type cast situation
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
typeofT | Type | - |
o | Object | - |
Object)IDictionary, Environment)Object)