Exemplo n.º 1
0
        private static void AssertCache(IReplicatedCache cache, string key, object?expectedValue, bool expectedFound)
        {
            var found = cache.TryGetValue(key, out var value);

            Assert.Equal(expectedFound, found);
            Assert.Equal(expectedValue, value);
        }
Exemplo n.º 2
0
        public AppsIndex(IGrainFactory grainFactory, IReplicatedCache grainCache)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(grainCache, nameof(grainCache));

            this.grainFactory = grainFactory;
            this.grainCache   = grainCache;
        }
Exemplo n.º 3
0
        public SchemasIndex(IGrainFactory grainFactory, IReplicatedCache replicatedCache)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(replicatedCache, nameof(replicatedCache));

            this.grainFactory    = grainFactory;
            this.replicatedCache = replicatedCache;
        }
Exemplo n.º 4
0
        public AppStore(IAppRepository repository,
                        IServiceProvider serviceProvider, IReplicatedCache cache)
        {
            this.repository      = repository;
            this.serviceProvider = serviceProvider;
            this.cache           = cache;

            collector = new CounterCollector <string>(repository, 5000);
        }
Exemplo n.º 5
0
        public AppStore(IAppRepository repository,
                        IServiceProvider services, IReplicatedCache cache, IClock clock, ILogger <AppStore> log)
        {
            this.repository = repository;
            this.services   = services;
            this.cache      = cache;
            this.clock      = clock;

            collector = new CounterCollector <string>(repository, log, 5000);
        }
Exemplo n.º 6
0
 public SchemasIndex(IGrainFactory grainFactory, IReplicatedCache grainCache)
 {
     this.grainFactory = grainFactory;
     this.grainCache   = grainCache;
 }
Exemplo n.º 7
0
 public DomainObject(IReplicatedCache cache)
 {
     this.cache = cache;
 }
Exemplo n.º 8
0
 public AppsIndex(IAppRepository appRepository, IGrainFactory grainFactory, IReplicatedCache grainCache)
 {
     this.appRepository = appRepository;
     this.grainFactory  = grainFactory;
     this.grainCache    = grainCache;
 }