Exemplo n.º 1
0
        private void Add(string name, object oldval, object newval)
        {
            var log = new ValueLog()
            {
                Name     = name,
                OldValue = oldval,
                NewValue = newval
            };

            _oLog.Add(log);
        }
Exemplo n.º 2
0
        public DataChangeLog GetChangeLogs()
        {
            DataChangeLog dlog = new DataChangeLog();

            var changedProps = _tracker.GetChanges(this);

            foreach (var trackingMember in changedProps)
            {
                var log = new ValueLog();

                log.Name     = trackingMember.name;
                log.OldValue = _oldValues.ContainsKey(log.Name) ? _oldValues[log.Name] : null;
                log.NewValue = trackingMember.value;
                dlog.Add(log);
            }
            return(dlog);
        }