Generator Changes at 9/27/2025 10:36:00 AM
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using FrontOffice.BFF.Application.Common.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace FrontOffice.BFF.Infrastructure.Services;
|
||||
|
||||
public class ApplicationContractContext : IApplicationContractContext
|
||||
{
|
||||
#region members
|
||||
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region utilities
|
||||
|
||||
private T GetService<T>() where T : Grpc.Core.ClientBase<T>
|
||||
{
|
||||
return _serviceProvider.GetService<T>() ??
|
||||
throw new Exception($"requested service not registered: {typeof(T).FullName}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public ApplicationContractContext(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
#region FM
|
||||
|
||||
//public FileLogContract.FileLogContractClient FileManagements => GetService<FileLogContract.FileLogContractClient>();
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user