Esempio n. 1
0
        /// <summary> Read state data function for this storage provider. </summary>
        /// <see cref="IStorageProvider.ReadStateAsync"/>
        public async Task ReadStateAsync(string grainType, GrainReference grainReference, IGrainState grainState)
        {
            var grainIdentity = GrainIdentity.FromGrainReference(grainType, grainReference);

            if (_ignore)
            {
                return;
            }

            var state = await _dataManager.ReadStateAsync(grainIdentity);

            if (state != null)
            {
                grainState.State = state;
            }
        }
Esempio n. 2
0
        async Task IStorageProvider.ReadStateAsync(string grainType, GrainReference grainReference, GrainState grainState)
        {
            var grainIdentity = GrainIdentity.FromGrainReference(grainType, grainReference);

            if (_ignore)
            {
                return;
            }

            var state = await _dataManager.ReadStateAsync(grainIdentity);

            if (null != state)
            {
                grainState.SetAll(state);
            }
        }