Ejemplo n.º 1
0
        private static void AddBaseType(Type type, SerializeMethod serializeMethod, ParseMethod parseMethod)
        {
            if (IsBaseType(type))
            {
                throw new Exception($"Type {type} is already a supported base type. You cannot re-add it.");
            }

            BaseSerializeMethods.Add(type, serializeMethod);
            BaseParseMethods.Add(type, parseMethod);
        }