Example #1
0
        static void Main(string[] args)
        {
            try
            {
                System.Collections.Hashtable HT = new System.Collections.Hashtable();
                HT["Canon Eos 5D Mark II body"] = 2176;
                HT["Nikon D700 body"]           = 1997;
                HT["Sony DSLR-A900 body"]       = 2345;


                System.Console.WriteLine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location));


                CoG C = new CoG();

                C.LoadTemplates(
                    System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) +
                    "\\..\\..\\..\\src\\sample_template.txt");

                C.EmitTemplate("sample_template", "HT=", HT);
                C.EmitTemplate("sample_template", "HT=", HT);

                System.Console.Write(C.GetOutputAndClear());
            }
            catch (Exception E)
            {
                System.Console.WriteLine("Exception: " + E.ToString());
            }

            return;
        }
Example #2
0
        public static CoG InitCoG()
        {
            CoG cog = new CoG();

            cog.AddReference((new SpecVars()).GetType().Assembly.Location);                   // add reference to this assembly
            cog.AddReference((new G25.CG.Shared.Util()).GetType().Assembly.Location);         // add reference for g25_cg_shared
            cog.AddReference((new G25.Tuple <string, string>()).GetType().Assembly.Location); // add reference for libg25

            cog.LoadTemplates(Properties.Resources.test_suite_templates, "test_suite_templates.txt");
            return(cog);
        }