/// <summary>获取被更改属性列表</summary>
        /// <param name="entity">要跟踪的实体</param>
        /// <param name="refer">用于参照的实体</param>
        /// <param name="param">参数</param>
        /// <returns>被更改的集合</returns>
        public static List <Change> GetChanges(T entity, T refer, Parameters param = null)
        {
            var als = FastReflection.FastGetAccessors <T>();
            var ls  = new List <Change>(als.Count);

            foreach (var a in als.Values)
            {
                if (param.IgnoreVirtual && (a.IsVirtual || (a.DataType.IsGenericType && a.DataType.GetGenericTypeDefinition() == typeof(List <>))))
                {
                    continue;
                }
                if (!a.CanRade)
                {
                    continue;
                }

                var v1 = a.GetValue(entity);
                var v2 = a.GetValue(refer);
                if (!AreEqual(v1, v2))
                {
                    ls.Add(new Change {
                        Name = a.Name, OldValue = v1, NewValue = v2
                    });
                }
            }

            return(ls);
        }
        private void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e)
        {
            var als = FastReflection.FastGetAccessors <T>();

            foreach (var a in als.Values)
            {
                if (PARAMS.IgnoreVirtual && (a.IsVirtual || (a.DataType.IsGenericType && a.DataType.GetGenericTypeDefinition() == typeof(List <>))))
                {
                    continue;
                }

                if (!a.CanRade)
                {
                    continue;
                }
                if (a.Name == e.PropertyName)
                {
                    var newValue = a.GetValue(sender);
                    if (dicChange.ContainsKey(a.Name))
                    {
                        dicChange.Remove(a.Name);
                    }
                    dicChange.Add(a.Name, new Change {
                        Name = a.Name, NewValue = newValue
                    });
                    break;
                }
            }
        }