Пример #1
0
        public static IServiceCollection TenantForHost(this ITenantIdentification identification, Action <HostTenantIdentificationOption> optionsBuilder)
        {
            var options = new HostTenantIdentificationOption();

            optionsBuilder?.Invoke(options);
            return(identification.Services.AddScoped <ITenantIdentificationService, HostTenantIdentificationService>(sp => new HostTenantIdentificationService(options)));
        }
Пример #2
0
 public HostTenantIdentificationService(HostTenantIdentificationOption options)
 {
     this._options = options;
 }
Пример #3
0
 public HostTenantIdentificationService(IConfiguration configuration)
 {
     this._options         = new HostTenantIdentificationOption();
     this._options.Mapping = configuration.GetTenantMapping();
 }