元编程参考文档

动态操作

5 个节点

本页内容 5

获取所有属性

函数

Get names of public properties.

签名
获取所有属性(对象: 任意) -> 文本数组
string[] GetProperties(object obj)

参数

名称类型默认值说明
对象任意—

返回

结果文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
动态操作
所属包
标准库

获取属性值

函数

此节点没有文档说明。

签名
获取属性值(对象: 任意, 属性: 文本) -> 任意
object GetPropertyValue(object obj, string property)

参数

名称类型默认值说明
对象任意—
属性文本—

返回

结果任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
动态操作
所属包
标准库

创建动态对象

函数

此节点没有文档说明。

签名
创建动态对象(名称: 文本数组, 值: 任意数组) -> 任意
object MakeExpando(string[] names, object[] values)

参数

名称类型默认值说明
名称文本数组—
值任意数组—

返回

结果任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
动态操作
所属包
标准库

创建对象

函数

此节点没有文档说明。

重载 1/2

签名
创建对象 -> 任意
    属性: Type 数组
    属性名称: 文本数组
    初始值: 任意数组
object MakeObject(
    Type[] properties,
    string[] propertyNames,
    object[] initialValues)

参数

名称类型默认值说明
属性Type 数组—
属性名称文本数组—
初始值任意数组—

返回

结果任意

重载 2/2

签名
创建对象(属性: Type 数组, 初始值: 任意数组) -> 任意
object MakeObject(Type[] properties, object[] initialValues)

参数

名称类型默认值说明
属性Type 数组—
初始值任意数组—

返回

结果任意
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
动态操作
所属包
标准库

创建对象类型

函数

此节点没有文档说明。

重载 1/2

签名
创建对象类型 -> Type
    属性: Type 数组
    属性名称: 文本数组
    类型名称: 文本
    初始值: 任意数组
    使用缓存: 真否
Type MakeObjectType(
    Type[] properties,
    string[] propertyNames,
    string typeName,
    object[] initialValues,
    bool useCache = true)

参数

名称类型默认值说明
属性Type 数组—
属性名称文本数组—
类型名称文本—
初始值任意数组—
使用缓存真否True

返回

结果Type

备注

This generates a runtime assembly, and for Divooka purpose one should NOT directly save information on that type for it will not be available during (graph) loading type.
Instead, we should devise dedicated reflection helpers to deal with such generated types, e.g. devise an automatic dataflow node equivalent ReflectionPropertyAccessorNode or something like that which saves only the intended property to be accessed and thus do not require strongly typed Type or Assembly information

重载 2/2

签名
创建对象类型 -> Type
    属性: Type 数组
    初始值: 任意数组
    使用缓存: 真否
Type MakeObjectType(
    Type[] properties,
    object[] initialValues,
    bool useCache = true)

参数

名称类型默认值说明
属性Type 数组—
初始值任意数组—
使用缓存真否True

返回

结果Type
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
动态操作
所属包
标准库