Exemple #1
0
        public static bool IsGenerateRequired(ref object data, string name)
        {
            //注意:数据为空必须返回真
            if (data == null)
            {
                return(true);
            }

            return(data switch
            {
                IModel model => model.HasChanges(name),
                IDataDictionary dictionary => dictionary.HasChanges(name),
                IDictionary <string, object> generic => generic.ContainsKey(name),
                IDictionary classic => classic.Contains(name),
                _ => true,
            });