예제 #1
0
파일: Program.cs 프로젝트: zyj0021/DbEntry
        //private static void GenerateAssembly(string fileName)
        //{
        //    ObjectInfo.GetInstance(typeof (LeafingEnum));
        //    ObjectInfo.GetInstance(typeof (LeafingLog));
        //    ObjectInfo.GetInstance(typeof (DbEntryMembershipUser));
        //    ObjectInfo.GetInstance(typeof (DbEntryRole));
        //    ObjectInfo.GetInstance(typeof (LeafingSetting));
        //    Helper.EnumTypes(fileName, true, t =>
        //    {
        //        ObjectInfo.GetInstance(t);
        //        return true;
        //    });
        //    MemoryAssembly.Instance.Save();
        //}

        private static void GenerateAspNetTemplate(string fileName, string className)
        {
            Helper.EnumTypes(fileName, t =>
            {
                if (t.FullName == className)
                {
                    var tb = new AspNetGenerator(t);
                    Console.WriteLine(tb.ToString());
                    return(false);
                }
                return(true);
            });
        }
예제 #2
0
        //private static void GenerateAssembly(string fileName)
        //{
        //    ObjectInfo.GetInstance(typeof (LeafingEnum));
        //    ObjectInfo.GetInstance(typeof (LeafingLog));
        //    ObjectInfo.GetInstance(typeof (DbEntryMembershipUser));
        //    ObjectInfo.GetInstance(typeof (DbEntryRole));
        //    ObjectInfo.GetInstance(typeof (LeafingSetting));
        //    Helper.EnumTypes(fileName, true, t =>
        //    {
        //        ObjectInfo.GetInstance(t);
        //        return true;
        //    });
        //    MemoryAssembly.Instance.Save();
        //}

        private static void GenerateAspNetTemplate(string fileName, string className)
        {
            Helper.EnumTypes(fileName, t =>
            {
                if (t.FullName == className)
                {
                    var tb = new AspNetGenerator(t);
                    Console.WriteLine(tb.ToString());
                    return false;
                }
                return true;
            });
        }