示例#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);
 }
示例#3
0
 public ConfigurationsRequestServiceBase() : base()
 {
     UseNonAuthorization();
     _configurationsHost = ServerHostHelper.GetServerHostByName(ServerHostNameConts.ConfigurationApi);
 }
 public FileStreamRequestService(string user = null, string pasword = null) : base()
 {
     _fileStreamHost = ServerHostHelper.GetServerHostByName("FileStreamApi");
     UseBasicAuthorization(user ?? "AESAPI", pasword ?? "Sysadmin@2019$$");
 }