添加项目文件。
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using GroupService.WebApi.Application.GroupInvitation;
|
||||
using GroupService.WebApi.Application.GroupMember;
|
||||
using GroupService.WebApi.Application.GroupRequest;
|
||||
using GroupService.WebApi.Application.IntegrationServices;
|
||||
using IM.Commons;
|
||||
using IM.Protocols.Grpc.User;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace GroupService.WebApi
|
||||
{
|
||||
public class ModuleInit : IModuleInitializer
|
||||
{
|
||||
public void Initialize(IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<WebApi.Application.Group.GroupService>();
|
||||
services.AddScoped<GroupMemberService>();
|
||||
services.AddScoped<GroupRequestService>();
|
||||
services.AddScoped<GroupInvitationService>();
|
||||
services.AddScoped<IIdentityIntegrationService, IDentityIntegrationService>();
|
||||
services.AddGrpcClient<UserInternal.UserInternalClient>((sp, o) =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptionsMonitor<GrpcOptions>>();
|
||||
o.Address = new Uri(options.CurrentValue.IdentityServiceUrl);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user