using DysonNetwork.Shared.Proto; using Microsoft.Extensions.DependencyInjection; namespace DysonNetwork.Shared.Registry; public static class ServiceInjectionHelper { extension(IServiceCollection services) { public IServiceCollection AddRingService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.ring", "RingService"); return services; } public IServiceCollection AddAuthService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "AuthService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "PermissionService"); return services; } public IServiceCollection AddAccountService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "AccountService"); services.AddSingleton(); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "BotAccountReceiverService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "ActionLogService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "PaymentService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "WalletService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "RealmService"); services.AddSingleton(); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "SocialCreditService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.pass", "ExperienceService"); return services; } public IServiceCollection AddDriveService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.drive", "FileService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.drive", "FileReferenceService"); return services; } public IServiceCollection AddSphereService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.sphere", "PostService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.sphere", "PublisherService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.sphere", "PollService"); services.AddSingleton(); return services; } public IServiceCollection AddDevelopService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.develop", "CustomAppService"); return services; } public IServiceCollection AddInsightService() { services.AddGrpcClientWithSharedChannel( "https://_grpc.insight", "WebFeedServiceClient"); services.AddGrpcClientWithSharedChannel( "https://_grpc.insight", "WebArticleService"); services.AddGrpcClientWithSharedChannel( "https://_grpc.insight", "WebReaderServiceClient"); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); return services; } } }