Example #1
0
        public async Task<TestDeviceState> GetState ()
        {
            var cache = _deviceState.GetCachePromise(0);

            if (cache == null)
            {
                return _initialState;
            }
            return await cache.GetValue(AcquireState);
        }
Example #2
0
        public async Task <LightStates> GetState()
        {
            var cache = _deviceState.GetCachePromise(0);

            if (cache == null)
            {
                return(_initialState);
            }
            return(await cache.GetValue(AcquireState));
        }