private void RaiseOnChanging(string key, object data, out ChangingEventArgs e)
        {
            e = new ChangingEventArgs
            {
                Key      = key,
                OldValue = GetItem(key),
                NewValue = data
            };

            Changing?.Invoke(this, e);
        }
Example #2
0
        private ChangingEventArgs RaiseOnChangingSync(string key, object data)
        {
            var e = new ChangingEventArgs
            {
                Key      = key,
                OldValue = GetItemInternal <object>(key),
                NewValue = data
            };

            Changing?.Invoke(this, e);

            return(e);
        }
Example #3
0
        private async Task <ChangingEventArgs> RaiseOnChangingAsync(string key, object data)
        {
            var e = new ChangingEventArgs
            {
                Key      = key,
                OldValue = await GetItemInternalAsync <object>(key),
                NewValue = data
            };

            Changing?.Invoke(this, e);

            return(e);
        }
Example #4
0
        private ChangingEventArgs RaiseOnChangingSync(string key, object data)
        {
            var e = new ChangingEventArgs
            {
                Key      = key,
                OldValue = ((ISyncLocalStorageService)this).GetItem <object>(key),
                NewValue = data
            };

            Changing?.Invoke(this, e);

            return(e);
        }