VirtualPropertyRegistry
StockSharp.Diagram
额外的属性登记。
方法
AddProperty
public static void AddProperty(Type entityType, EntityProperty property, Type propType, Func<object, object> getter)
VirtualPropertyRegistry.AddProperty(entityType, property, propType, getter)
增加属性.
- entityType
- 实体类型.
- property
- 财产信息.
- propType
- 属性类型
- getter
- 盖特
AddProperty``2
public static void AddProperty<TEntity, TValue>(EntityProperty property, Func<TEntity, TValue> getter)
VirtualPropertyRegistry.AddProperty(property, getter)
增加属性.
- property
- 财产信息.
- getter
- 盖特
GetVirtualProperties
public static IEnumerable<EntityProperty> GetVirtualProperties(Type entityType)
result = VirtualPropertyRegistry.GetVirtualProperties(entityType)
获取属性。
- entityType
- 实体类型.
返回值: 额外属性 。
TryGetVirtualPropertyType
public static bool TryGetVirtualPropertyType(Type entityType, string propName, Type propType)
result = VirtualPropertyRegistry.TryGetVirtualPropertyType(entityType, propName, propType)
试着找到属性类型 。
- entityType
- 实体类型.
- propName
- 地产名.
- propType
- 属性类型
返回值: 操作结果。
TryGetVirtualValue
public static bool TryGetVirtualValue(object entity, string propName, object value)
result = VirtualPropertyRegistry.TryGetVirtualValue(entity, propName, value)
试着获得属性值 。
- entity
- 实体。
- propName
- 地产名.
- value
- 价值.
返回值: 操作结果。