示例#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);
        }
示例#2
0
        public AppsIndex(IGrainFactory grainFactory, IReplicatedCache grainCache)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(grainCache, nameof(grainCache));

            this.grainFactory = grainFactory;
            this.grainCache   = grainCache;
        }
示例#3
0
        public SchemasIndex(IGrainFactory grainFactory, IReplicatedCache replicatedCache)
        {
            Guard.NotNull(grainFactory, nameof(grainFactory));
            Guard.NotNull(replicatedCache, nameof(replicatedCache));

            this.grainFactory    = grainFactory;
            this.replicatedCache = replicatedCache;
        }
示例#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);
        }
示例#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);
        }
示例#6
0
 public SchemasIndex(IGrainFactory grainFactory, IReplicatedCache grainCache)
 {
     this.grainFactory = grainFactory;
     this.grainCache   = grainCache;
 }
示例#7
0
 public DomainObject(IReplicatedCache cache)
 {
     this.cache = cache;
 }
示例#8
0
 public AppsIndex(IAppRepository appRepository, IGrainFactory grainFactory, IReplicatedCache grainCache)
 {
     this.appRepository = appRepository;
     this.grainFactory  = grainFactory;
     this.grainCache    = grainCache;
 }