//----< test stub >----------------------------------------------

#if (TEST_TYPETABLE)
        static void Main(string[] args)
        {
            Console.Write("\n  Testing TypeTable");
            Console.Write("\n ===================");

            TypeTable tt = new TypeTable();

            LocPair lp;

            lp.file      = "file1";
            lp.nameSpace = "namespace1";
            tt.add("fileA", lp);

            lp.file      = "file2";
            lp.nameSpace = "namespace2";
            tt.add("fileA", lp);

            lp.file      = "file3";
            lp.nameSpace = "namespace3";
            tt.add("fileB", lp);

            tt.show();
            Console.Write("\n\n");
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.Write("\n  Demonstrate how to build typetable");
            Console.Write("\n ====================================");
            // build demo table

            TypeTable tt = new TypeTable();

            tt.add("Type_X", "File_A", "Namespace_Test1");
            tt.add("Type_X", "File_B", "Namespace_Test2");
            tt.add("Type_Y", "File_A", "Namespace_Test1");
            tt.add("Type_Z", "File_C", "Namespace_Test3");

            tt.show();

            // access elements in table

            Console.Write("\n  TypeTable contains types: ");
            foreach (var elem in tt.table)
            {
                Console.Write("{0} ", elem.Key);
            }
            Console.Write("\n\n");
        }