presence_new/Presence.Desktop/ViewModels/MainWindowViewModel.cs

25 lines
816 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using domain.UseCase;
using Microsoft.Extensions.DependencyInjection;
using presence.data.RemoteData.RemoteDataBase;
using presence.domain.UseCase;
using ReactiveUI;
namespace Presence.Desktop.ViewModels
{
public class MainWindowViewModel: ViewModelBase, IScreen
{
public RoutingState Router { get; } = new RoutingState();
public MainWindowViewModel(IServiceProvider serviceProvider)
{
var iGroupUseCase = serviceProvider.GetRequiredService<IGroupUseCase>();
var presenceUseCase = serviceProvider.GetRequiredService<PresenceUseCase>();
Router.Navigate.Execute(new GroupViewModel(iGroupUseCase, presenceUseCase, this));
}
}
}