Exemplo n.º 1
0
        public static IServiceCollection AddConfigurationsRequestService(this IServiceCollection services, string apiServer)
        {
            ConfigurationsInjectionHelper.TryInit(ref services);
            ServerHostHelper.AddServerHostByName(ServerHostNameConts.ConfigurationApi, apiServer);
            #region Base
            services.TryAddSingleton <IHttpContextAccessor, HttpContextAccessor>();
            #endregion Base

            #region Location Services
            services.TryAddScoped <ILocationRequestService, LocationRequestService>();
            services.TryAddScoped <ICityRequestService, CityRequestService>();
            services.TryAddScoped <ICountryRequestService, CountryRequestService>();
            services.TryAddScoped <IZoneDistrictRequestService, ZoneDistrictRequestService>();
            #endregion Location Services

            services.TryAddScoped <ICurrencyRequestService, CurrencyRequestService>();
            services.TryAddScoped <ICommonValueRequestService, CommonValueRequestService>();
            services.TryAddScoped <ICommonResourceRequestService, CommonResourceRequestService>();
            services.TryAddScoped <IPortalLanguageRequestService, PortalLanguageRequestService>();
            services.TryAddScoped <IPortalLocationRequestService, PortalLocationRequestService>();
            services.TryAddScoped <ICommonLanguagesRequestServices, CommonLanguagesRequestServices>();
            services.TryAddScoped <IMultiLanguageService, MultiLanguageService>();

            return(services);
        }
 public static IServiceCollection AddFileStreamsRequestService(this IServiceCollection services, string apiServer)
 {
     ServerHostHelper.AddServerHostByName("FileStreamApi", apiServer);
     services.TryAddScoped <IFileStreamRequestService, FileStreamRequestService>();
     return(services);
 }