Пример #1
0
        public override async Task OnActivateAsync()
        {
            this.State = await StateStore.GetByIdAsync(GrainId);

            if (this.State == null)
            {
                IsNew = true;
                await InitState();
            }
        }
Пример #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;
 }
Пример #3
0
        protected virtual async Task ReadSnapshotAsync()
        {
            State = await StateStore.GetByIdAsync(GrainId);

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