//Rule to get Manual Maintaince And Declare Page
        public static BuilderPackageInterface getManualMaintainceAndDeclarePage()
        {
            if (userPreviousConfig.ContainsKey("getManualMaintainceAndDeclarePage"))
            {
                return(userPreviousConfig["getManualMaintainceAndDeclarePage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            Prolog                  myProlog            = new Prolog(ContextValues.prlg.Author, ContextValues.prlg.EmailID);
            PackageOperations       myPackageOperations = new PackageOperations(ContextValues.packageOps);
            BuilderPackageInterface _ManualPage         = new ManualPage(myProlog, myPackageOperations);

            ReqFiles       myReqFiles       = new ReqFiles(ContextValues.reqFiles);
            BuildProc      myBuildProc      = new BuildProc(ContextValues.buildProc);
            versionHistory myversionHistory = new versionHistory(ContextValues.version);
            Maintenance    _Maintenance     = new Maintenance(myReqFiles, myBuildProc, myversionHistory);

            DeclarClass  myClass  = new DeclarClass(ContextValues.ClassName);
            DeclarStruct myStruct = new DeclarStruct(ContextValues.Struct);
            DeclarDefine myDeclar = new DeclarDefine(null, myStruct);

            BuildPackage myContext = new BuildPackage();

            myContext.setBuildPackage(_ManualPage);
            myContext.setBuildPackage(_Maintenance);
            myContext.setBuildPackage(myDeclar);
            userPreviousConfig["getManualMaintainceAndDeclarePage"] = myContext;
            return(myContext);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("\n\n  Testing build Package \n\n");
            // Get Context from Xml file
            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            // GetRuleForCreation
            BuilderPackageInterface mybuildPkg_4 = BuilderPackagePrototype.getManualPageAndStruct();

            // Displaying to console
            Console.WriteLine(mybuildPkg_4.buildPackage(ContextValues));


            // GetRuleForCreation
            BuilderPackageInterface mybuildPkg_1 = BuilderPackagePrototype.getManualMaintainceAndDeclarePage();

            BuilderPackagePrototype.writeToFile(mybuildPkg_1.buildPackage(ContextValues), "TesetingInterpreter.cs");

            // cloning builder package
            BuilderPackageInterface mybuildPkg_2 = BuilderPackagePrototype.getManualMaintainceAndDeclarePage();

            BuilderPackagePrototype.writeToFile(mybuildPkg_2.buildPackage(ContextValues), "TesetingPrototype.cs");


            Console.WriteLine("\n");
        }
        //Rule to test class or TestStub Page
        public static BuilderPackageInterface getclassOrTestStubPage()
        {
            if (userPreviousConfig.ContainsKey("getclassOrTestStubPage"))
            {
                return(userPreviousConfig["getclassOrTestStubPage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            TestStub myTestStub = new TestStub(ContextValues.testStub);


            DeclarClass  myClass  = new DeclarClass(ContextValues.ClassName);
            DeclarStruct myStruct = new DeclarStruct(ContextValues.Struct);
            DeclarDefine myDeclar = new DeclarDefine(null, myStruct);


            OrExpression myContext = new OrExpression();

            myContext.setOrExpression(myTestStub);
            myContext.setOrExpression(myDeclar);

            userPreviousConfig["getclassOrTestStubPage"] = myContext;

            return(myContext);
        }
Пример #4
0
        // return Struct string within namespace
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "\n\n" +
                         "\t\tstruct " + ContextValues.Struct +
                         "\t\t{ \n\n\n\t\t}\n";

            return(tmp);
        }
Пример #5
0
        // Return test stub string
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "\n\n" +
                         "#if (" + ContextValues.testStub + ") \n" +
                         "\t\t\t\tstatic void Main(string[] args){\n\n \t\t\t\t}\n" +
                         "#endif\n\n";

            return(tmp);
        }
Пример #6
0
        // return class string
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "\n" +
                         "\t\tpublic class " + ContextValues.ClassName + "\n\t\t{\n\n\n" +
                         _myTestStub.buildPackage(ContextValues) +
                         "\t\t}";

            return(tmp);
        }
Пример #7
0
        // Returning Builder String
        public override string buildPackage(XMLReader ContextValues)
        {
            string strTmp = "\n";

            foreach (var pkgInterItr in _BuilderPackageAddExpression)
            {
                strTmp += "" + pkgInterItr.buildPackage(ContextValues) + "" + "\n";
            }

            return(strTmp);
        }
Пример #8
0
        // return Prolog string
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "/*\n" +
                         "//////////////////////////////////////////////\n" +
                         "                                              \n" +
                         "    Author:  " + ContextValues.prlg.Author + "\n" +
                         "             " + ContextValues.prlg.EmailID + "\n" +
                         "                                              \n" +
                         "//////////////////////////////////////////////\n*/\n";

            return(tmp);
        }
Пример #9
0
        // Return Module Operations string
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "/*\n" +
                         "*   Module Operations\n" +
                         "*   -----------------\n" +
                         "*   This module demonstrates ....... \n*\n" +
                         "*   Public Interface\n" +
                         "*   ---------------- \n" +
                         "*       " + ContextValues.packageOps + "\n" +
                         "* \n*/";

            return(tmp);
        }
Пример #10
0
        // Returning Required files String
        public override string buildPackage(XMLReader ContextValues)
        {
            List <String> Reqfile = ContextValues.reqFiles;
            string        strTmp  = "/*\n* \n" +
                                    "*   Required Files \n" +
                                    "*   ---------------- \n";

            foreach (var ReqfileItr in Reqfile)
            {
                strTmp += "*   " + ReqfileItr + "" + "\n";
            }
            strTmp += "*\n*/\n";
            return(strTmp);
        }
Пример #11
0
        // Returning Manual Page String
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "";

            if (_myProlog != null)
            {
                tmp += _myProlog.buildPackage(ContextValues);
            }
            if (_myPackageOperations != null)
            {
                tmp += _myPackageOperations.buildPackage(ContextValues);
            }
            return(tmp);
        }
Пример #12
0
        // Return Build Process String
        public override string buildPackage(XMLReader ContextValues)
        {
            List <String> Reqfile = ContextValues.reqFiles;
            string        tmp     = "/*\n" +
                                    "*   Build Process \n" +
                                    "*   -----------------\n" +
                                    "*   - Compiler command: " + ContextValues.buildProc;

            foreach (var ReqfileItr in Reqfile)
            {
                //  tmp += " " + ReqfileItr + "" ;
            }
            tmp += "\n* \n*/";
            return(tmp);
        }
Пример #13
0
        // Returning Maintenance History String
        public override string buildPackage(XMLReader ContextValues)
        {
            List <String> versionHistry = new List <String>();

            versionHistry.Add(ContextValues.version);
            string strTmp = "\n/*\n* \n" +
                            "*   Maintenance History \n" +
                            "*   ---------------- \n";

            foreach (var versionHistryItr in versionHistry)
            {
                strTmp += "*   " + versionHistryItr + "" + "\n";
            }
            strTmp += "*\n*/";
            return(strTmp);
        }
Пример #14
0
        // Returning PackageNameSpace String with class
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "\n\n\n" +
                         "namespace " + _packagenamspace + " \n{";

            if (_myClass != null)
            {
                tmp += _myClass.buildPackage(ContextValues);
            }
            if (_myStruct != null)
            {
                tmp += _myStruct.buildPackage(ContextValues);
            }
            tmp += "\n}\n";
            return(tmp);
        }
Пример #15
0
        // Returning Maintenance Page String
        public override string buildPackage(XMLReader ContextValues)
        {
            string tmp = "";

            if (_ReqFiles != null)
            {
                tmp += _ReqFiles.buildPackage(ContextValues);
            }
            if (_BuildProc != null)
            {
                tmp += _BuildProc.buildPackage(ContextValues);
            }
            if (_VersionHistory != null)
            {
                tmp += _VersionHistory.buildPackage(ContextValues);
            }
            return(tmp);
        }
        //Rule to get Define And TestStubPage
        public static BuilderPackageInterface getDefineAndTestStubPage()
        {
            if (userPreviousConfig.ContainsKey("getDefineAndTestStubPage"))
            {
                return(userPreviousConfig["getDefineAndTestStubPage"]);
            }

            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();

            TestStub myTestStub = new TestStub(ContextValues.testStub);

            AddExpression myContext = new AddExpression();

            myContext.setAddExpression(null);
            myContext.setAddExpression(myTestStub);
            userPreviousConfig["getDefineAndTestStubPage"] = myContext;
            return(myContext);
        }
 static void Main(string[] args)
 {
     XMLReader ContextValues = new XMLReader();
     ContextValues.parseXML();
 }
Пример #18
0
        static void Main(string[] args)
        {
            XMLReader ContextValues = new XMLReader();

            ContextValues.parseXML();
        }
Пример #19
0
 public abstract string buildPackage(XMLReader ContextValues);