Beispiel #1
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as SolutionConfig;

            if (cfg == null)
            {
                return;
            }

            DocFolder = cfg.DocFolder;            //文档文件夹名称
            SrcFolder = cfg.SrcFolder;            //代码文件夹名称
            RootPath  = cfg.RootPath;             //解决方案根路径
            NameSpace = cfg.NameSpace;            //解决方案命名空间
            foreach (var item in cfg.DataTypeMap) //数据类型映射
            {
                var child = new DataTypeMapConfig();
                child.Copy(item);
                DataTypeMap.Add(child);
            }
            SolutionType   = cfg.SolutionType;   //解决方案类型
            IdDataType     = cfg.IdDataType;     //主键数据类型
            UserIdDataType = cfg.UserIdDataType; //用户标识数据类型
            WorkView       = cfg.WorkView;       //工作视角
            AdvancedView   = cfg.AdvancedView;   //高级视角
        }
Beispiel #2
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as PropertyConfig;

            if (cfg == null)
            {
                return;
            }
            CopyFrom(cfg);
        }
Beispiel #3
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as ClassifyConfig;

            if (cfg == null)
            {
                return;
            }

            Classify = cfg.Classify;//分类
        }
Beispiel #4
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as EnumItem;

            if (cfg == null)
            {
                return;
            }

            Value = cfg.Value;//值
        }
Beispiel #5
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as ProjectConfig;

            if (cfg == null)
            {
                return;
            }

            //foreach (var item in cfg.Classifies)//实体分组
            //{
            //    var child = new ClassifyItem<EntityConfig>();
            //    child.Copy(item);
            //    Classifies.Add(child);
            //}
            //foreach (var item in cfg.Entities)//实体集合
            //{
            //    var child = new EntityConfig();
            //    child.Copy(item);
            //    Add(child);
            //}
            //foreach (var item in cfg.ApiItems)//API节点集合
            //{
            //    var child = new ApiItem();
            //    child.Copy(item);
            //    Add(child);
            //}
            //ApiName = cfg.ApiName;//接口名称
            //foreach (var item in cfg.Enums)//枚举集合
            //{
            //    var child = new EnumConfig();
            //    child.Copy(item);
            //    Add(child);
            //}
            ApiFolder          = cfg.ApiFolder;          //接口代码主文件夹
            ModelFolder        = cfg.ModelFolder;        //模型代码主文件夹
            BranchFolder       = cfg.BranchFolder;       //子级文件夹
            PagePath           = cfg.PagePath;           //WEB页面(C#)
            MobileCsPath       = cfg.MobileCsPath;       //移动端(C#)
            CppCodePath        = cfg.CppCodePath;        //服务端(C++)
            BusinessPath       = cfg.BusinessPath;       //业务逻辑(C#)
            DbType             = cfg.DbType;             //数据库类型
            DbHost             = cfg.DbHost;             //数据库地址
            DbSoruce           = cfg.DbSoruce;           //数据库名称
            DbPassWord         = cfg.DbPassWord;         //数据库密码
            DbUser             = cfg.DbUser;             //数据库用户
            ProjectType        = cfg.ProjectType;        //项目类型
            ReadOnly           = cfg.ReadOnly;           //运行时只读
            NameSpace          = cfg.NameSpace;          //命名空间
            DataBaseObjectName = cfg.DataBaseObjectName; //数据项目名称
        }
Beispiel #6
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            var cfg = dest as EntityConfig;

            if (cfg == null)
            {
                base.CopyFrom(dest);
            }
            else
            {
                CopyFrom(cfg);
            }
        }
Beispiel #7
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as ConfigBase;

            if (cfg == null)
            {
                return;
            }

            Option.Copy(cfg.Option);                                                                                            //配置
            ExtendConfig       = cfg.ExtendConfig;                                                                              //扩展配置
            _extendDictionary  = cfg._extendDictionary.ToDictionary(p => p.Key, p => p.Value);                                  //扩展配置
            _extendDictionary2 = new ConfigItemDictionary(cfg._extendDictionary2.Items.ToDictionary(p => p.Key, p => p.Value)); //extendDictionary2
        }
Beispiel #8
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as UserCommandConfig;

            if (cfg == null)
            {
                return;
            }

            Button         = cfg.Button;         //按钮名称
            Icon           = cfg.Icon;           //按钮图标
            IsLocalAction  = cfg.IsLocalAction;  //本地操作
            IsSingleObject = cfg.IsSingleObject; //单对象操作
            Url            = cfg.Url;            //打开链接
        }
Beispiel #9
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as EntityReleationConfig;

            if (cfg == null)
            {
                return;
            }

            Parent     = cfg.Parent;     //上级
            ForeignKey = cfg.ForeignKey; //关联表的外键名称
            PrimaryKey = cfg.PrimaryKey; //与关联表的外键对应的字段名称
            Friend     = cfg.Friend;     //关联表
            Releation  = cfg.Releation;  //关系类型
            Condition  = cfg.Condition;  //扩展条件
        }
Beispiel #10
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as ApiItem;

            if (cfg == null)
            {
                return;
            }

            Method        = cfg.Method;        //Api调用方式(GET、POST)
            CallArg       = cfg.CallArg;       //请求参数名称
            ResultArg     = cfg.ResultArg;     //返回参数名称
            RoutePath     = cfg.RoutePath;     //路由路径
            IsUserCommand = cfg.IsUserCommand; //是否用户命令
            Argument      = cfg.Argument;      //参数实体
            Result        = cfg.Result;        //本地对象名称
        }
Beispiel #11
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as EnumConfig;

            if (cfg == null)
            {
                return;
            }

            IsFlagEnum = cfg.IsFlagEnum;    //是否位域
            foreach (var item in cfg.Items) //枚举节点
            {
                var child = new EnumItem();
                child.Copy(item);
                Items.Add(child);
            }
        }
Beispiel #12
0
        /// <summary>
        /// 字段复制
        /// </summary>
        /// <param name="dest"></param>
        /// <returns></returns>
        protected override void CopyFrom(SimpleConfig dest)
        {
            base.CopyFrom(dest);
            var cfg = dest as DataTypeMapConfig;

            if (cfg == null)
            {
                return;
            }

            Datalen    = cfg.Datalen;    //数据长度
            Scale      = cfg.Scale;      //存储精度
            CSharp     = cfg.CSharp;     //C#
            Cpp        = cfg.Cpp;        //C++
            Java       = cfg.Java;       //Java
            Golang     = cfg.Golang;     //Golang
            MySql      = cfg.MySql;      //MySql
            SqlServer  = cfg.SqlServer;  //SqlServer
            Oracle     = cfg.Oracle;     //Oracle
            JavaScript = cfg.JavaScript; //JavaScript
        }