コード例 #1
0
        public Task <TenantCacheConfiguration> GetCacheConfiguration()
        {
            var config = new TenantCacheConfiguration
            {
                ConnectionString = this.configuration.TenantCache_DefaultConnectionString,
                DatabaseId       = this.configuration.TenantCache_DatabaseId
            };

            return(Task.FromResult(config));
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TenancyService"/> class.
 /// </summary>
 /// <param name="tenantStore">The tenant store.</param>
 /// <param name="propertyBagFactory">Provides property bag initialization and modification services.</param>
 /// <param name="tenantMapper">The mapper from tenants to tenant resources.</param>
 /// <param name="tenantCollectionResultMapper">The mapper from tenant collection results to the result resource.</param>
 /// <param name="linkResolver">The link resolver.</param>
 /// <param name="cacheConfiguration">Cache configuration.</param>
 /// <param name="logger">The logger for the service.</param>
 public TenancyService(
     ITenantStore tenantStore,
     IPropertyBagFactory propertyBagFactory,
     TenantMapper tenantMapper,
     TenantCollectionResultMapper tenantCollectionResultMapper,
     IOpenApiWebLinkResolver linkResolver,
     TenantCacheConfiguration cacheConfiguration,
     ILogger <TenancyService> logger)
 {
     this.tenantStore  = tenantStore ?? throw new ArgumentNullException(nameof(tenantStore));
     this.tenantMapper = tenantMapper ?? throw new ArgumentNullException(nameof(tenantMapper));
     this.tenantCollectionResultMapper = tenantCollectionResultMapper ?? throw new ArgumentNullException(nameof(tenantCollectionResultMapper));
     this.linkResolver       = linkResolver ?? throw new ArgumentNullException(nameof(linkResolver));
     this.cacheConfiguration = cacheConfiguration ?? throw new ArgumentNullException(nameof(cacheConfiguration));
     this.logger             = logger ?? throw new ArgumentNullException(nameof(logger));
     this.propertyBagFactory = propertyBagFactory;
 }