private AddEventToVentureHistory ( String eventType ) : void | ||
eventType | String | |
Результат | void |
public virtual IEnumerable<Venture> Split(TermsOfSplit termsOfSplit) { if(!IsStarted()){ throw new Exception("Cannot split a venture that is not started."); } // Splitting of OutLay var aVentures = new List<Venture>(); var aFirstVenture = new Venture(termsOfSplit.FirstVentureName,termsOfSplit.Ratio.Apply(Outlay)); var aSecondVenture = new Venture(termsOfSplit.SecondVentureName, termsOfSplit.Ratio.ApplyRemaining(Outlay)); // Splitting of Holding's Investments var holdings = Holding.Split(termsOfSplit.Ratio); aFirstVenture.holding = holdings[0]; aSecondVenture.holding = holdings[1]; AddEventToVentureHistory(VentureEvent.SPLIT); CloseTheVenture(); aFirstVenture.AddEventToVentureHistory(VentureEvent.SPLIT); aSecondVenture.AddEventToVentureHistory(VentureEvent.SPLIT); aFirstVenture.ChangeStateToStarted(); aSecondVenture.ChangeStateToStarted(); aVentures.Add(aFirstVenture); aVentures.Add(aSecondVenture); return aVentures; }