Exemplo n.º 1
0
        public CachedServiceFabricCaller(
            ILogger <CachedServiceFabricCaller> logger,
            IClock clock,
            IQueryClientWrapper queryClientWrapper,
            IServiceManagementClientWrapper serviceManagementClientWrapper,
            IPropertyManagementClientWrapper propertyManagementClientWrapper,
            IHealthClientWrapper healthClientWrapper)
        {
            _logger                          = logger ?? throw new ArgumentNullException(nameof(logger));
            _clock                           = clock ?? throw new ArgumentNullException(nameof(clock));
            _queryClientWrapper              = queryClientWrapper ?? throw new ArgumentNullException(nameof(queryClientWrapper));
            _serviceManagementClientWrapper  = serviceManagementClientWrapper ?? throw new ArgumentNullException(nameof(serviceManagementClientWrapper));
            _propertyManagementClientWrapper = propertyManagementClientWrapper ?? throw new ArgumentNullException(nameof(propertyManagementClientWrapper));
            _healthClientWrapper             = healthClientWrapper ?? throw new ArgumentNullException(nameof(healthClientWrapper));

            _applicationListCache     = new Cache <IEnumerable <ApplicationWrapper> >(_clock, CacheExpirationOffset);
            _serviceListCache         = new Cache <IEnumerable <ServiceWrapper> >(_clock, CacheExpirationOffset);
            _partitionListCache       = new Cache <IEnumerable <Guid> >(_clock, CacheExpirationOffset);
            _replicaListCache         = new Cache <IEnumerable <ReplicaWrapper> >(_clock, CacheExpirationOffset);
            _serviceManifestCache     = new Cache <string>(_clock, CacheExpirationOffset);
            _serviceManifestNameCache = new Cache <string>(_clock, CacheExpirationOffset);
            _propertiesCache          = new Cache <IDictionary <string, string> >(_clock, CacheExpirationOffset);
        }
 public ServiceFabricCaller(IQueryClientWrapper queryClientWrapper, IServiceManagementClientWrapper serviceManagementClientWrapper)
 {
     _queryClientWrapper             = queryClientWrapper;
     _serviceManagementClientWrapper = serviceManagementClientWrapper;
 }