/// <summary> /// 初始化佣金服务 /// </summary> public CommissionService(IAgentsUnitOfWork unitOfWork, ICommissionRepository commissionRepository, ICommissionManager commissionManager, IAgentManager agentManager) : base(unitOfWork, commissionRepository) { UnitOfWork = unitOfWork; CommissionRepository = commissionRepository; CommissionManager = commissionManager; AgentManager = agentManager; }
/// <summary> /// Initializes a new instance of the <see cref="PositionController"/>. /// </summary> /// <param name="portfolioName">Portfolio name.</param> /// <param name="commissionManager">Commission manager.</param> /// <param name="getSecurityDefinition">Handler to get security info.</param> /// <param name="getMarginPrice">Handler to get margin info.</param> public PositionController(string portfolioName, ICommissionManager commissionManager, Func <SecurityId, SecurityMessage> getSecurityDefinition, Func <SecurityId, Sides, decimal> getMarginPrice) { if (portfolioName.IsEmpty()) { throw new ArgumentNullException(nameof(portfolioName)); } _portfolioName = portfolioName; _commissionManager = commissionManager ?? throw new ArgumentNullException(nameof(commissionManager)); _getSecurityDefinition = getSecurityDefinition ?? throw new ArgumentNullException(nameof(getSecurityDefinition)); _getMarginPrice = getMarginPrice ?? throw new ArgumentNullException(nameof(getMarginPrice)); PnLManager = new PortfolioPnLManager(portfolioName); }
public GenerateBookCommission(ICommissionManager commissionCalc = null) { _generateCommission = new GenerateCommission(commissionCalc); }
public override void Dispose() { _commissionManager?.Dispose(); _commissionManager = null; }
public GenerateCommission(ICommissionManager commissionCalc = null) { _commissionManager = commissionCalc ?? new CommissionManager(); }
public GenerateCommission() { _commissionManager = new CommissionManager(); }