コード例 #1
0
        public static Dictionary <string, object> ConvertAPI(object obj)
        {
            CompositeToRouteValues converter = new CompositeToRouteValues();

            converter.Convert(obj);
            return(converter._routeValues);
        }
コード例 #2
0
        public static void Case0()
        {
            Dictionary <string, object> dic1 = CompositeToRouteValues.ConvertAPI(new C1());
            Dictionary <string, object> dic2 = CompositeToRouteValues.ConvertAPI(new C2());
            Dictionary <string, object> dic3 = CompositeToRouteValues.ConvertAPI(new C3());

            //LLLC lllc = new LLLC();
            //lllc.Init();
            //Dictionary<string, object> dic4 = CompositeToRouteValues.ConvertAPI(lllc);

            Console.WriteLine(dic1);
            Console.WriteLine(dic2);
            Console.WriteLine(dic3);
            //Console.WriteLine(dic4);
        }