private Lazy <NotifyingTask <IReadOnlyList <ModifierNodeViewModel> > > CreateModifierNodes() => new Lazy <NotifyingTask <IReadOnlyList <ModifierNodeViewModel> > >( () => new NotifyingTask <IReadOnlyList <ModifierNodeViewModel> >( _modifierNodeFactory.CreateAsync(Stat, NodeType), ex => Log.Error(ex, $"Failed to create modifier nodes for {Stat} {NodeType}")) { Default = new ModifierNodeViewModel[0] });
private void ResetModifierNodes() { _modifierNodes = new Lazy <NotifyingTask <IReadOnlyList <ModifierNodeViewModel> > >( () => new NotifyingTask <IReadOnlyList <ModifierNodeViewModel> >( _modifierNodeFactory.CreateAsync(Node.Stat, Node.NodeType), ex => Log.Error($"Failed to create modifier nodes for {Node.Stat} {Node.NodeType}", ex)) { Default = new ModifierNodeViewModel[0] }); }
private void ResetModifierNodes() { _modifierNodes = new Lazy <NotifyingTask <IReadOnlyList <ModifierNodeViewModel> > >( () => new NotifyingTask <IReadOnlyList <ModifierNodeViewModel> >( _modifierNodeFactory.CreateAsync(Stat, NodeType), ex => Log.Error(ex, $"Failed to create modifier nodes for {Stat} {NodeType}")) { Default = new ModifierNodeViewModel[0] }); OnPropertyChanged(nameof(ModifierNodes)); }