Click or drag to resize

MessageConverterHelperToEntitiesTMessage, TEntity Method

To convert messages into trading objects.

Namespace:  StockSharp.Algo
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.16.0 (4.4.16)
Syntax
C#
public static IEnumerable<TEntity> ToEntities<TMessage, TEntity>(
	this IEnumerable<TMessage> messages,
	Security security,
	IExchangeInfoProvider exchangeInfoProvider = null
)
where TMessage : Message

Parameters

messages
Type: System.Collections.GenericIEnumerableTMessage
Messages.
security
Type: StockSharp.BusinessEntitiesSecurity
Security.
exchangeInfoProvider (Optional)
Type: StockSharp.Algo.StoragesIExchangeInfoProvider
Exchanges and trading boards provider.

Type Parameters

TMessage
Message type.
TEntity
The type of trading object.

Return Value

Type: IEnumerableTEntity
Trading objects.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also