public InMemoryServiceBusApplicationCacheServiceTests()
        {
            _organizationRepository = Substitute.For <IOrganizationRepository>();
            _globalSettings         = new GlobalSettings();

            _sut = new InMemoryServiceBusApplicationCacheService(
                _organizationRepository,
                _globalSettings
                );
        }
Exemple #2
0
 public ApplicationCacheHostedService(
     IApplicationCacheService applicationCacheService,
     IOrganizationRepository organizationRepository,
     ILogger <ApplicationCacheHostedService> logger,
     GlobalSettings globalSettings)
 {
     _topicName = globalSettings.ServiceBus.ApplicationCacheTopicName;
     _subName   = CoreHelpers.GetApplicationCacheServiceBusSubcriptionName(globalSettings);
     _applicationCacheService = applicationCacheService as InMemoryServiceBusApplicationCacheService;
     _organizationRepository  = organizationRepository;
     _logger             = logger;
     _managementClient   = new ManagementClient(globalSettings.ServiceBus.ConnectionString);
     _subscriptionClient = new SubscriptionClient(globalSettings.ServiceBus.ConnectionString,
                                                  _topicName, _subName);
 }