/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <param name="type"> /// Type of object to reconstruct.</param> /// <param name="binaryData"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <returns> /// A new instance of the requested type.</returns> public static object Deserialize(Type type, byte[] binaryData, ClassifyOptions options = null) { using (var mem = new MemoryStream(binaryData)) return(Classify.Deserialize(type, DefaultFormat.ReadFromStream(mem), DefaultFormat, options)); }
/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <typeparam name="T"> /// Type of object to reconstruct.</typeparam> /// <param name="binaryData"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <returns> /// A new instance of the requested type.</returns> public static T Deserialize <T>(byte[] binaryData, ClassifyOptions options = null) { using (var mem = new MemoryStream(binaryData)) return(Classify.Deserialize <node, T>(DefaultFormat.ReadFromStream(mem), DefaultFormat, options)); }
/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <param name="type"> /// Type of object to reconstruct.</param> /// <param name="xml"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <param name="format"> /// Implementation of a Classify format. See <see cref="ClassifyXmlFormat"/> for an example.</param> /// <returns> /// A new instance of the requested type.</returns> public static object Deserialize(Type type, XElement xml, ClassifyOptions options = null, IClassifyFormat <XElement> format = null) { return(Classify.Deserialize <XElement>(type, xml, format ?? DefaultFormat, options)); }
/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <typeparam name="T"> /// Type of object to reconstruct.</typeparam> /// <param name="xml"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <param name="format"> /// Implementation of a Classify format. See <see cref="ClassifyXmlFormat"/> for an example.</param> /// <returns> /// A new instance of the requested type.</returns> public static T Deserialize <T>(XElement xml, ClassifyOptions options = null, IClassifyFormat <XElement> format = null) { return(Classify.Deserialize <XElement, T>(xml, format ?? DefaultFormat, options)); }
/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <typeparam name="T"> /// Type of object to reconstruct.</typeparam> /// <param name="json"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <param name="format"> /// Implementation of a Classify format. See <see cref="ClassifyJsonFormat"/> for an example.</param> /// <returns> /// A new instance of the requested type.</returns> public static T Deserialize <T>(JsonValue json, ClassifyOptions options = null, IClassifyFormat <JsonValue> format = null) { return(Classify.Deserialize <JsonValue, T>(json, format ?? DefaultFormat, options)); }
/// <summary> /// Reconstructs an object of the specified type from the specified serialized form.</summary> /// <param name="type"> /// Type of object to reconstruct.</param> /// <param name="json"> /// Serialized form to reconstruct object from.</param> /// <param name="options"> /// Options.</param> /// <param name="format"> /// Implementation of a Classify format. See <see cref="ClassifyJsonFormat"/> for an example.</param> /// <returns> /// A new instance of the requested type.</returns> public static object Deserialize(Type type, JsonValue json, ClassifyOptions options = null, IClassifyFormat <JsonValue> format = null) { return(Classify.Deserialize(type, json, format ?? DefaultFormat, options)); }