-
Notifications
You must be signed in to change notification settings - Fork 3
Component
a13782425 edited this page Jun 15, 2018
·
1 revision
组件中不允许有方法,只允许有字段或者属性
所有组件都要继承这个
- API
- Int64 CurrentId //该组件编号
public class TestComponent : IComponent
{
public Int64 CurrentId { get { return ComponentIds.TEST; } }
public string value;
}
修改数据通知系统的组件,需要给数据驱动字段或者属性添加DataDriven特性
public class TestComponent : IComponent,IReactiveComponent
{
public Int64 CurrentId { get { return ComponentIds.TEST; } }
[DataDriven]
public string value;
}
作为需要数据驱动的字段或者属性的标识符
public class TestComponent : IComponent,IReactiveComponent
{
public Int64 CurrentId { get { return ComponentIds.TEST; } }
[DataDriven]
public string value;
}
此表示符为在需要深拷贝Component的时候不拷贝对应字段或属性的值
public class TestComponent : IComponent
{
public Int64 CurrentId { get { return ComponentIds.TEST; } }
[DontCopy]
public string value;
}