public ClientDemoService( IIdentityUserAppService userAppService, IProductAppService productAppService, IIdentityModelAuthenticationService authenticator, IOptions <RemoteServiceOptions> remoteServiceOptions) { _userAppService = userAppService; _authenticator = authenticator; _remoteServiceOptions = remoteServiceOptions.Value; _productAppService = productAppService; }
public DynamicHttpProxyInterceptor( IDynamicProxyHttpClientFactory httpClientFactory, IOptions <AbpHttpClientOptions> clientOptions, IOptionsSnapshot <RemoteServiceOptions> remoteServiceOptions, IApiDescriptionFinder apiDescriptionFinder, IJsonSerializer jsonSerializer) { _httpClientFactory = httpClientFactory; _apiDescriptionFinder = apiDescriptionFinder; _jsonSerializer = jsonSerializer; _clientOptions = clientOptions.Value; _remoteServiceOptions = remoteServiceOptions.Value; }
public DynamicHttpProxyInterceptor( IDynamicProxyHttpClientFactory httpClientFactory, IOptions <AbpHttpClientOptions> clientOptions, IOptionsSnapshot <RemoteServiceOptions> remoteServiceOptions, IApiDescriptionFinder apiDescriptionFinder, IJsonSerializer jsonSerializer, IRemoteServiceHttpClientAuthenticator clientAuthenticator) { _httpClientFactory = httpClientFactory; _apiDescriptionFinder = apiDescriptionFinder; _jsonSerializer = jsonSerializer; _clientAuthenticator = clientAuthenticator; _clientOptions = clientOptions.Value; _remoteServiceOptions = remoteServiceOptions.Value; Logger = NullLogger <DynamicHttpProxyInterceptor <TService> > .Instance; }
public static IServiceCollection AddRemoteServices(this IServiceCollection services, Action <RemoteServiceOptions> configure = null) { var option = new RemoteServiceOptions(); configure?.Invoke(option); services.Configure <MvcOptions>(o => { o.Conventions.Add(new RemoteServiceApplicationModelConvention(option)); }); var partManager = services.Where(a => a.ServiceType == typeof(ApplicationPartManager)) .FirstOrDefault(); if (partManager == null) { throw new NullReferenceException("Please inject after the controllers"); } (partManager.ImplementationInstance as ApplicationPartManager) .FeatureProviders.Add(new RemoteServiceControllerFeatureProvider()); return(services); }