Table of Contents

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 Type

Entity type.

property EntityProperty

Property info.

propType Type

Property 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 EntityProperty

Property 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 Type

Entity 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

entityType Type

Entity type.

propName string

Property name.

propType Type

Property type

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

entity object

Entity.

propName string

Property name.

value object

Value.

Returns

bool

Operation result.