Skip to content

元数据定义文件

本项目使用的defineJSON Schema的变体

Tool.Config.props中启用<IsPluginLoader>后,会在生成时自动导出使用[ExportMeta]特性的类为plugin.d.json文件

例如:

json
{
  "Type": "ShadowExample.Core.Plugins.ExampleMetaData",
  "Properties": {
    "Authors": {
      "Type": "System.String[]",
      "Nullable": false,
      "Required": false,
      "PropertyGroupName": "Authors"
    },
    "Url": {
      "Type": "System.String",
      "Nullable": false,
      "Required": false,
      "PropertyGroupName": "Url"
    },
    "D": {
      "Type": "System.Double",
      "Nullable": false,
      "Required": false,
      "PropertyGroupName": "D"
    },
    "F": {
      "Type": "System.Single[]",
      "Nullable": false,
      "Required": false,
      "PropertyGroupName": "F"
    },
    "Id": {
      "Type": "System.String",
      "Nullable": false,
      "Required": true,
      "PropertyGroupName": "Id"
    },
    "Name": {
      "Type": "System.String",
      "Nullable": false,
      "Required": true,
      "PropertyGroupName": "Name"
    },
    "DllName": {
      "Type": "System.String",
      "Nullable": false,
      "Required": false,
      "PropertyGroupName": "DllName"
    },
    "Version": {
      "Type": "System.String",
      "Nullable": false,
      "Required": true,
      "PropertyGroupName": "Version"
    },
    "Dependencies": {
      "Type": "System.String[]",
      "Nullable": false,
      "Required": true,
      "PropertyGroupName": "Dependencies"
    }
  }
}
名称类型说明
Typestring元数据类名,支持的元数据项类型
PropertiesObject元数据项,具体可配置项可查阅[Meta]特性