コード例 #1
0
        private async Task <StorageChangingEventArgs> OnStorageChangingAsync(string key, object newValue)
        {
            var eventArgs = new StorageChangingEventArgs
            {
                Key           = key,
                PreviousValue = await GetAsync <object>(key),
                NewValue      = newValue
            };

            StorageChanging?.Invoke(this, eventArgs);
            return(eventArgs);
        }
コード例 #2
0
        private StorageChangingEventArgs OnStorageChanging(string key, object newValue)
        {
            var eventArgs = new StorageChangingEventArgs
            {
                Key           = key,
                PreviousValue = Get <object>(key),
                NewValue      = newValue
            };

            StorageChanging?.Invoke(this, eventArgs);
            return(eventArgs);
        }