NewFailedToDeserializeMember() public static méthode

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that it is failed to deserialize member.
public static NewFailedToDeserializeMember ( Type targetType, string memberName, Exception inner ) : Exception
targetType System.Type Deserializing type.
memberName string The name of the deserializing member.
inner System.Exception The exception which caused current error.
Résultat System.Exception
Exemple #1
0
        public static byte[] UnpackBinaryValue(Unpacker unpacker, Type objectType, String memberName)
        {
            try
            {
                byte[] result;
                if (!unpacker.ReadBinary(out result))
                {
                    throw SerializationExceptions.NewFailedToDeserializeMember(objectType, memberName, null);
                }

                return(result);
            }
            catch (MessageTypeException ex)
            {
                throw SerializationExceptions.NewFailedToDeserializeMember(objectType, memberName, ex);
            }
        }
Exemple #2
0
        public static Boolean?UnpackNullableBooleanValue(Unpacker unpacker, Type objectType, String memberName)
        {
            try
            {
                Boolean?result;
                if (!unpacker.ReadNullableBoolean(out result))
                {
                    throw SerializationExceptions.NewFailedToDeserializeMember(objectType, memberName, null);
                }

                return(result);
            }
            catch (MessageTypeException ex)
            {
                throw SerializationExceptions.NewFailedToDeserializeMember(objectType, memberName, ex);
            }
        }