Exemplo n.º 1
0
        /// <summary>
        /// Reads the object as a map.
        /// </summary>
        /// <param name="type"></param>
        /// <param name="expectedType"></param>
        /// <returns></returns>
        public IDeserializer GetObjectDeserializer(String type, Type expectedType)
        {
            IDeserializer reader = GetObjectDeserializer(type);

            if (expectedType == null ||
                expectedType == reader.GetOwnType() ||
                expectedType.IsAssignableFrom(reader.GetOwnType()) ||
                reader.IsReadResolve() ||
                typeof(IHessianHandle).IsAssignableFrom(reader.GetOwnType()))
            {
                return(reader);
            }

            return(GetDeserializer(expectedType));
        }