public void AddStat(IStat stat, NodeType nodeType = NodeType.Total) { var resultStat = new ResultStatViewModel(_nodeFactory.CreateResult(stat, nodeType), RemoveStat); Stats.Add(resultStat); AddAvailableStat(stat); }
protected override ResultNodeViewModel CreateViewModel(ICalculationNode?node, IStat stat) { var nodeType = ((ExplicitRegistrationType.IndependentResult)stat.ExplicitRegistrationType !).ResultType; return(_nodeFactory.CreateResult(stat, nodeType)); }