public FeatureListViewModel(string resourceKey, string path = null)
        {
            LoadCommand = ReactiveCommand.Create <Unit, IEnumerable <FeatureNode> >(_ =>
                                                                                    Load(resourceKey, path));

            OpenFeatureCommand = ReactiveCommand.CreateFromTask <FeatureNode, Unit>(async feature =>
            {
                await OpenFeature(feature, resourceKey);
                return(Unit.Default);
            });

            LoadCommand
            .ToPropertyEx(this, x => x.Tree);
        }
Exemple #2
0
 private void ConfigureLoadCommand()
 {
     LoadCommand = ReactiveCommand.CreateFromObservable(_cacheService.GetCurrentRepository);
     LoadCommand.ToPropertyEx(this, x => x.Repository);
 }