Beispiel #1
0
        public override async Task OnActivateAsync()
        {
            this.State = await StateStore.GetByIdAsync(GrainId);

            if (this.State == null)
            {
                IsNew = true;
                await InitState();
            }
        }
Beispiel #2
0
 protected virtual async Task ReadSnapshotAsync()
 {
     this.State = await StateStore.GetByIdAsync(GrainId);
     if (this.State == null)
     {
         IsNew = true;
         await InitState();
     }
     storageVersion = this.State.Version;
 }
Beispiel #3
0
        protected virtual async Task ReadSnapshotAsync()
        {
            State = await StateStore.GetByIdAsync(GrainId);

            if (State == null)
            {
                IsNew = true;
                await CreateState();
            }
            StateStorageVersion = State.Version;
        }