Ejemplo n.º 1
0
 /// <summary>
 ///     Reconstructs an object of the specified type from the specified serialized form by applying the values to an
 ///     existing instance of the type.</summary>
 /// <typeparam name="T">
 ///     Type of object to reconstruct.</typeparam>
 /// <param name="xml">
 ///     Serialized form to reconstruct object from.</param>
 /// <param name="intoObject">
 ///     Object to assign values to in order to reconstruct the original object.</param>
 /// <param name="options">
 ///     Options.</param>
 /// <param name="format">
 ///     Implementation of a Classify format. See <see cref="ClassifyXmlFormat"/> for an example.</param>
 public static void DeserializeIntoObject <T>(XElement xml, T intoObject, ClassifyOptions options = null, IClassifyFormat <XElement> format = null)
 {
     Classify.DeserializeIntoObject <XElement, T>(xml, intoObject, format ?? DefaultFormat, options);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Reconstructs an object of the specified type from the specified serialized form by applying the values to an
 ///     existing instance of the type.</summary>
 /// <typeparam name="T">
 ///     Type of object to reconstruct.</typeparam>
 /// <param name="binaryData">
 ///     Serialized form to reconstruct object from.</param>
 /// <param name="intoObject">
 ///     Object to assign values to in order to reconstruct the original object.</param>
 /// <param name="options">
 ///     Options.</param>
 public static void DeserializeIntoObject <T>(byte[] binaryData, T intoObject, ClassifyOptions options = null)
 {
     using (var mem = new MemoryStream(binaryData))
         Classify.DeserializeIntoObject(DefaultFormat.ReadFromStream(mem), intoObject, DefaultFormat, options);
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     Reconstructs an object of the specified type from the specified serialized form by applying the values to an
 ///     existing instance of the type.</summary>
 /// <typeparam name="T">
 ///     Type of object to reconstruct.</typeparam>
 /// <param name="json">
 ///     Serialized form to reconstruct object from.</param>
 /// <param name="intoObject">
 ///     Object to assign values to in order to reconstruct the original object.</param>
 /// <param name="options">
 ///     Options.</param>
 /// <param name="format">
 ///     Implementation of a Classify format. See <see cref="ClassifyJsonFormat"/> for an example.</param>
 public static void DeserializeIntoObject <T>(JsonValue json, T intoObject, ClassifyOptions options = null, IClassifyFormat <JsonValue> format = null)
 {
     Classify.DeserializeIntoObject(json, intoObject, format ?? DefaultFormat, options);
 }