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; } }
public SomeClass() { m_handler = DefaultHandler.For <T>() ?? FALL_BACK_HANDLER; }