public Type DeSerialize(string typeName)
        {
            if (_nameToType.TryGetValue(typeName, out var type))
            {
                return(type);
            }

            return(_defaultTypeNameSerializer.DeSerialize(typeName));
        }
Exemplo n.º 2
0
        public Type DeSerialize(string typeName)
        {
            if (typeName.Split('.').Length > 1)
            {
                typeName = typeName.Split('.')[1].Trim().Split(',').FirstOrDefault();
            }

            if (_nameToType.TryGetValue(typeName, out var type))
            {
                return(type);
            }

            return(_defaultTypeNameSerializer.DeSerialize(typeName));
        }