static FormatterCache() { var f = Resolver2GetFormatterHelper.GetFormatter(typeof(T)); if (f != null) { formatter = (global::Utf8Json.IJsonFormatter <T>)f; } }
public global::Utf8Json.IJsonFormatter GetFormatter(global::System.Type type) { if (!m_formatters.TryGetValue(type, out var formatter)) { formatter = (global::Utf8Json.IJsonFormatter)Resolver2GetFormatterHelper.GetFormatter(type); m_formatters.Add(type, formatter); } return(formatter); }