Ejemplo n.º 1
0
        private static void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (!AuditingManager.IsAuditingEnabled)
            {
                return;
            }

            var viewModel = (IViewModel)sender;

            object propertyValue = null;

            if (!string.IsNullOrEmpty(e.PropertyName) && !KnownIgnoredPropertyNames.Contains(e.PropertyName))
            {
                ObjectAdapter.GetMemberValue(viewModel, e.PropertyName, out propertyValue);
            }

            AuditingManager.OnPropertyChanged(viewModel, e.PropertyName, propertyValue);
        }
Ejemplo n.º 2
0
        private string GetPropertyValue(object obj, string propertyName)
        {
            _objectAdapter.GetMemberValue(obj, propertyName, out object value);

            return(ObjectToStringHelper.ToString(value));
        }