Example #1
0
        protected virtual object DeserializeDefaultPrimitive(Type type, TDeserializeState state)
        {
            var matchedHandler = CustomPrimitiveHandlers.FirstOrDefault(x => x.PrimitiveChecker.IsPrimitive(type));

            if (matchedHandler == null)
            {
                throw new Exception($"The primitive matched has no handler: {type}");
            }
            return(matchedHandler.Deserialize(state, type));
        }