添加项目文件。

This commit is contained in:
2026-05-09 17:06:30 +08:00
parent c60f5fe117
commit 720ef957d4
378 changed files with 14843 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
using ContactService.WebApi.Application.Friend;
using ContactService.WebApi.Application.FriendRequest;
using ContactService.WebApi.Application.IntegrationServices;
using IM.Commons;
using IM.Protocols.Grpc.User;
using Microsoft.Extensions.Options;
namespace ContactService.WebApi
{
public class ModuleInit : IModuleInitializer
{
public void Initialize(IServiceCollection services)
{
services.AddScoped<FriendService>();
services.AddScoped<FriendRequestService>();
services.AddScoped<IIdentityIntegrationService, IdentityIntegrationService>();
services.AddGrpcClient<UserInternal.UserInternalClient>((sp, o) =>
{
var options = sp.GetRequiredService<IOptionsMonitor<GrpcOptions>>();
o.Address = new Uri(options.CurrentValue.IdentityServiceUrl);
});
}
}
}