void EnsureStateInitialized(IndexedGrainStateWrapper <TGrainState> wrappedState, bool forUpdate) { // State initialization is deferred as we must be in a transaction context to access it. wrappedState.EnsureNullValues(base._grainIndexes.PropertyNullValues); if (forUpdate) { // Apply the deferred BeforeImage update. _grainIndexes.UpdateBeforeImages(wrappedState.UserState, force: true); } }
public async Task ReadAsync() => this.wrappedState = await this.readGrainStateFunc();