public static IIocService AddHttpClientHolder <TConfig>(this IIocService iocService) where TConfig : class, IGraphqlClientConfig
        {
            iocService.RegisterAccessToken();
            iocService.RegisterImplementation <IGraphqlClientConfig, TConfig>(IocLifetime.Singleton);
            iocService.RegisterImplementation <IHttpClientFactory, HttpClientHolder>(IocLifetime.Singleton);

            return(iocService);
        }
Exemple #2
0
 public static IIocService RegisterClientHttpService(this IIocService iocService)
 {
     iocService.RegisterAccessToken();
     Register(iocService);
     return(iocService);
 }