public IHttpActionResult GetScheme()
        {
            List <JsonMember> members   = (new MembersController()).GetAllMembers();
            GeneratorClass    generator = new GeneratorClass(members);
            JsonScheme        scheme    = generator.generate();

            if (scheme == null)
            {
                return(NotFound());
            }
            return(Ok(scheme));
        }
Example #2
0
        public GeneratorForm(Form parent, DBRegistrationClass drc, TreeNode tn, ContextMenuStrip cm)
        {
            InitializeComponent();
            MdiParent = parent;
            Tn        = tn;
            Cm        = cm;
            var tc = (GeneratorClass)tn.Tag;

            GeneratorObject = tc;
            _dbReg          = drc;
            _localNotify.Register4Error(Notify_OnRaiseErrorHandler);
            _localNotify.Register4Info(Notify_OnRaiseInfoHandler);
        }
Example #3
0
        public static string CreateAlterGeneratorDLL(GeneratorClass generator, eCreateMode cmode)
        {
            var sb = new StringBuilder();

            //CREATE GENERATOR TABRUFE4905_ID;
            //SET GENERATOR TABRUFE4905_ID TO 1;

            if (generator != null)
            {
                if ((cmode == eCreateMode.drop) || (cmode == eCreateMode.recreate))
                {
                    string cmd = SQLPatterns.DropGeneratorPattern.Replace(SQLPatterns.GeneratorKey, generator.Name);
                    sb.Append(cmd);
                    sb.Append($@"{SQLPatterns.Commit}{Environment.NewLine}{Environment.NewLine}");
                }
                if ((cmode == eCreateMode.create) || (cmode == eCreateMode.recreate))
                {
                    string cmd = SQLPatterns.AddGeneratorPattern.Replace(SQLPatterns.GeneratorKey, generator.Name).Replace(SQLPatterns.ValueKey, generator.InitValue.ToString());
                    sb.Append(cmd);
                }
            }
            return(sb.ToString());
        }
Example #4
0
 public void GenerateClassCheck()
 {
     var generator = new GeneratorClass();
 }
Example #5
0
        public static T CreateObjectCtorWithParam <T>(object[] paramList, string className, string nameSpace, string assembly, string assemblyDir) where T : class //此处提供的T为接口
        {
            GeneratorClass gc = new GeneratorClass();

            return(gc.BaseAutoCreateTypeWithCtorParam <T>(paramList, className, nameSpace, assembly, assemblyDir, ".dll"));
        }
Example #6
0
        public static T CreateObject <T>(string className, string nameSpace, string assembly, string assemblyDir) where T : class //此处提供的T为接口
        {
            GeneratorClass gc = new GeneratorClass();

            return(gc.BaseAutoCreateType <T>(className, nameSpace, assembly, assemblyDir, ".dll"));
        }