Class CollectionPortfolioProvider
- Namespace
- StockSharp.Algo
- Assembly
- StockSharp.Algo.dll
Collection based implementation of IPortfolioProvider.
public class CollectionPortfolioProvider : IPortfolioProvider
- Inheritance
-
CollectionPortfolioProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
CollectionPortfolioProvider()
Initializes a new instance of the CollectionPortfolioProvider.
public CollectionPortfolioProvider()
CollectionPortfolioProvider(IEnumerable<Portfolio>)
Initializes a new instance of the CollectionPortfolioProvider.
public CollectionPortfolioProvider(IEnumerable<Portfolio> portfolios)
Parameters
portfolios
IEnumerable<Portfolio>The portfolios collection.
Properties
Portfolios
Get all portfolios.
public IEnumerable<Portfolio> Portfolios { get; }
Property Value
Methods
Add(Portfolio)
Add security.
public void Add(Portfolio portfolio)
Parameters
portfolio
PortfolioPortfolio.
LookupByPortfolioName(string)
To get the portfolio by the code name.
public Portfolio LookupByPortfolioName(string name)
Parameters
name
stringPortfolio code name.
Returns
Remove(Portfolio)
Remove security.
public bool Remove(Portfolio portfolio)
Parameters
portfolio
PortfolioPortfolio.
Returns
- bool
Check result.
Events
NewPortfolio
New portfolio received.
public event Action<Portfolio> NewPortfolio
Event Type
PortfolioChanged
Portfolio changed.
public event Action<Portfolio> PortfolioChanged