Example #1
0
            static TypeAware()
            {
                var type = typeof(T);

                if (type == typeof(string))
                {
                    DEFAULT = a => DefaultHandler.StringHandler((dynamic)a);
                }
                else if (type == typeof(int))
                {
                    DEFAULT = a => DefaultHandler.IntHandler((dynamic)a);
                }
                else
                {
                    DEFAULT = null;
                }
            }
Example #2
0
 public SomeClass()
 {
     m_handler = DefaultHandler.For <T>() ?? FALL_BACK_HANDLER;
 }