Class VirtualPropertyRegistry
- Namespace
- StockSharp.Diagram
- Assembly
- StockSharp.Diagram.Core.dll
Extra properties registry.
public static class VirtualPropertyRegistry
- Inheritance
-
VirtualPropertyRegistry
- Inherited Members
Methods
AddProperty(Type, EntityProperty, Type, Func<object, object>)
Add property.
public static void AddProperty(Type entityType, EntityProperty property, Type propType, Func<object, object> getter)
Parameters
entityType
TypeEntity type.
property
EntityPropertyProperty info.
propType
TypeProperty type
getter
Func<object, object>Getter.
AddProperty<TEntity, TValue>(EntityProperty, Func<TEntity, TValue>)
Add property.
public static void AddProperty<TEntity, TValue>(EntityProperty property, Func<TEntity, TValue> getter)
Parameters
property
EntityPropertyProperty info.
getter
Func<TEntity, TValue>Getter.
Type Parameters
TEntity
Entity type.
TValue
Property type.
GetVirtualProperties(Type)
Get properties.
public static IEnumerable<EntityProperty> GetVirtualProperties(this Type entityType)
Parameters
entityType
TypeEntity type.
Returns
- IEnumerable<EntityProperty>
Extra properties.
TryGetVirtualPropertyType(Type, string, out Type)
Try get property type.
public static bool TryGetVirtualPropertyType(this Type entityType, string propName, out Type propType)
Parameters
Returns
- bool
Operation result.
TryGetVirtualValue(object, string, out object)
Try get property value.
public static bool TryGetVirtualValue(this object entity, string propName, out object value)
Parameters
Returns
- bool
Operation result.