예제 #1
0
 public PathToProjProvider(
     IProjectPathConstructor pathConstructor,
     IPathToSolutionFileProvider solutionPathProvider,
     IProjectSubpathProvider subpathProvider)
 {
     _pathConstructor      = pathConstructor;
     _solutionPathProvider = solutionPathProvider;
     _subpathProvider      = subpathProvider;
 }
예제 #2
0
        public SelectedProjectInputVm(
            IProjectPathConstructor pathConstructor,
            ISolutionFilePathFollower solutionFilePathFollower)
        {
            Picker.Filters.Add(new CommonFileDialogFilter("Project", ".csproj"));

            this.WhenAnyValue(x => x.ProjectSubpath)
            // Need to filter nulls, as bindings flip to null temporarily, which we want to skip
            .NotNull()
            .DistinctUntilChanged()
            .CombineLatest(solutionFilePathFollower.Path.DistinctUntilChanged(),
                           (subPath, slnPath) => pathConstructor.Construct(slnPath, subPath))
            .Subscribe(p =>
            {
                Picker.TargetPath = p;
            })
            .DisposeWith(this);
        }