예제 #1
0
        static IFormatter ForceDynamicResolver(CerasSerializer ceras, Type type)
        {
            var r = ceras.GetFormatterResolver <DynamicObjectFormatterResolver>();

            return(r.GetFormatter(type));
        }
예제 #2
0
        static IFormatter ForceReinterpret(CerasSerializer ceras, Type typeToBeFormatted)
        {
            var formatterType = typeof(ReinterpretFormatter <>).MakeGenericType(typeToBeFormatted);

            return((IFormatter)Activator.CreateInstance(formatterType));
        }