Skip to content

Commit

Permalink
Merge pull request #1700 from microsoft/staging
Browse files Browse the repository at this point in the history
Release - 10/17/23 - 2
  • Loading branch information
EricJohnson327 authored Oct 13, 2023
2 parents c7a1cb5 + f2af4c5 commit 8addd6c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
5 changes: 5 additions & 0 deletions src/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation and Contributors
// Licensed under the MIT license.

using System.Web.Services.Description;
using DevHome.Activation;
using DevHome.Common.Contracts;
using DevHome.Common.Contracts.Services;
Expand Down Expand Up @@ -55,6 +56,10 @@ public App()
Host = Microsoft.Extensions.Hosting.Host.
CreateDefaultBuilder().
UseContentRoot(AppContext.BaseDirectory).
UseDefaultServiceProvider((context, options) =>
{
options.ValidateOnBuild = true;
}).
ConfigureServices((context, services) =>
{
// Default Activation Handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ private static IServiceCollection AddAppManagement(this IServiceCollection servi
// View models
services.AddTransient<ShimmerSearchViewModel>();
services.AddTransient<SearchViewModel>();
services.AddTransient<PackageViewModel>();
services.AddTransient<PackageCatalogListViewModel>();
services.AddTransient<AppManagementViewModel>();
services.AddTransient<PackageCatalogViewModel>();
services.AddTransient<AppManagementReviewViewModel>();

// Services
Expand Down Expand Up @@ -96,7 +94,9 @@ private static IServiceCollection AddDevDrive(this IServiceCollection services)
{
// View models
services.AddTransient<DevDriveViewModel>();
services.AddTransient<DevDriveReviewViewModel>();

// TODO https://github.com/microsoft/devhome/issues/631
// services.AddTransient<DevDriveReviewViewModel>();

// Services
services.AddTransient<DevDriveTaskGroup>();
Expand All @@ -123,10 +123,9 @@ private static IServiceCollection AddMainPage(this IServiceCollection services)

private static IServiceCollection AddRepoConfig(this IServiceCollection services)
{
// View models
services.AddTransient<AddRepoViewModel>();
services.AddTransient<RepoConfigViewModel>();
services.AddTransient<RepoConfigReviewViewModel>();
// TODO https://github.com/microsoft/devhome/issues/631
// services.AddTransient<RepoConfigViewModel>();
// services.AddTransient<RepoConfigReviewViewModel>();

// Services
services.AddTransient<RepoConfigTaskGroup>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ public DevDriveTaskGroup(IHost host, ISetupFlowStringResource stringResource)
{
_host = host;

// TODO Remove `this` argument from CreateInstance since this task
// group is a registered type. This requires updating dependent classes
// correspondingly.
// https://github.com/microsoft/devhome/issues/631
_devDriveReviewViewModel = new (() => _host.CreateInstance<DevDriveReviewViewModel>(this));
// TODO https://github.com/microsoft/devhome/issues/631
_devDriveReviewViewModel = new (() => new DevDriveReviewViewModel(host, stringResource, this));
_stringResource = stringResource;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using DevHome.Common.Extensions;
using DevHome.Common.Services;
using DevHome.Common.TelemetryEvents.SetupFlow;
using DevHome.SetupFlow.Common.Helpers;
using DevHome.SetupFlow.Models;
using DevHome.SetupFlow.Services;
using DevHome.SetupFlow.ViewModels;
using DevHome.Telemetry;
using Microsoft.Extensions.Hosting;
using Microsoft.Windows.DevHome.SDK;

namespace DevHome.SetupFlow.TaskGroups;

Expand All @@ -28,17 +27,14 @@ public class RepoConfigTaskGroup : ISetupTaskGroup

private readonly ISetupFlowStringResource _stringResource;

public RepoConfigTaskGroup(IHost host, ISetupFlowStringResource stringResource, SetupFlowOrchestrator setupFlowOrchestrator)
public RepoConfigTaskGroup(IHost host, ISetupFlowStringResource stringResource, SetupFlowOrchestrator setupFlowOrchestrator, IDevDriveManager devDriveManager)
{
_host = host;
_stringResource = stringResource;

// TODO Remove `this` argument from CreateInstance since this task
// group is a registered type. This requires updating dependent classes
// correspondingly.
// https://github.com/microsoft/devhome/issues/631
_repoConfigViewModel = new (() => _host.CreateInstance<RepoConfigViewModel>(this));
_repoConfigReviewViewModel = new (() => _host.CreateInstance<RepoConfigReviewViewModel>(this));
// TODO https://github.com/microsoft/devhome/issues/631
_repoConfigViewModel = new (() => new RepoConfigViewModel(stringResource, setupFlowOrchestrator, devDriveManager, this, host));
_repoConfigReviewViewModel = new (() => new RepoConfigReviewViewModel(stringResource, this));
_activityId = setupFlowOrchestrator.ActivityId;
}

Expand Down

0 comments on commit 8addd6c

Please sign in to comment.