Exemple #1
0
        public static ThreadSafeTypeKeyFormatterHashTable.Entry GetEntry <TTarget, TFormatter>()
        {
            var formatterType = typeof(TFormatter);
            var targetType    = typeof(TTarget);

            return(new ThreadSafeTypeKeyFormatterHashTable.Entry(targetType,
                                                                 StaticHelper.GetSerializeStatic(formatterType),
                                                                 StaticHelper.GetDeserializeStatic(formatterType),
                                                                 StaticHelper.GetCalcByteLengthForSerialization(formatterType),
                                                                 StaticHelper.GetSerializeSpan(formatterType)
                                                                 ));
        }
Exemple #2
0
 private static FP CreateFunctionPair(Type formatterType)
 {
     return(new FP(StaticHelper.GetSerializeStatic(formatterType), StaticHelper.GetDeserializeStatic(formatterType), default, default));