public SchemasByAppIndexGrainTests()
        {
            A.CallTo(() => grainState.ClearAsync())
            .Invokes(() => grainState.Value = new SchemasByAppIndexGrain.GrainState());

            sut = new SchemasByAppIndexGrain(grainState);
            sut.ActivateAsync(appId.Id).Wait();
        }
Example #2
0
        public TagGrainTests()
        {
            A.CallTo(() => grainState.ClearAsync())
            .Invokes(() => grainState.Value = new TagGrain.State());

            sut = new TagGrain(grainState);
            sut.ActivateAsync(id).Wait();
        }
Example #3
0
        public IdsIndexGrainTests()
        {
            A.CallTo(() => grainState.ClearAsync())
            .Invokes(() => grainState.Value = new IdsIndexState <DomainId>());

            sut = new IdsIndexGrain <IdsIndexState <DomainId>, DomainId>(grainState);
        }
Example #4
0
        public UniqueNameIndexGrainTests()
        {
            A.CallTo(() => grainState.ClearAsync())
            .Invokes(() => grainState.Value = new UniqueNameIndexState <Guid>());

            sut = new UniqueNameIndexGrain <UniqueNameIndexState <Guid>, Guid>(grainState);
        }
Example #5
0
        public async Task ClearAsync()
        {
            foreach (var backup in state.Value.Jobs)
            {
                await backupArchiveStore.DeleteAsync(backup.Id, default);
            }

            TryDeactivateOnIdle();

            await state.ClearAsync();
        }
Example #6
0
        public async Task ClearAsync()
        {
            foreach (var backup in state.Value.Jobs)
            {
#pragma warning disable MA0040 // Flow the cancellation token
                await backupArchiveStore.DeleteAsync(backup.Id);

#pragma warning restore MA0040 // Flow the cancellation token
            }

            TryDeactivateOnIdle();

            await state.ClearAsync();
        }
        public Task ClearAsync()
        {
            TryDeactivateOnIdle();

            return(state.ClearAsync());
        }
Example #8
0
 public Task ClearAsync()
 {
     return(state.ClearAsync());
 }