presence/Desktop.UI/DI/ServiceColletionExtensions.cs

23 lines
635 B
C#
Raw Normal View History

2025-04-30 01:13:44 +00:00
using Microsoft.Extensions.DependencyInjection;
using Desktop.UI.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using presence_client.ApiClients;
namespace Desktop.UI.DI;
public static class ServiceColletionExtensions
{
public static void AddCommonService(this IServiceCollection collection)
{
collection
.AddSingleton<GroupApiClient>()
.AddSingleton<UserApiClient>()
.AddSingleton<PresenceApiClient>()
.AddTransient<GroupWindowViewModel>();
}
}