Exemple #1
0
 /// <summary>
 /// Deserializes from string.
 /// </summary>
 /// <typeparam name="To">The type of to.</typeparam>
 /// <param name="self">The self.</param>
 /// <param name="serializedText">The serialized text.</param>
 /// <returns>To.</returns>
 public static To DeserializeFromString <To>(this SerializerBase self, string serializedText)
 {
     return((To)self.DeserializeFromString(serializedText, typeof(To)));
 }
Exemple #2
0
 /// <summary>
 /// Gets the specified alias.
 /// </summary>
 /// <param name="alias">The alias.</param>
 /// <param name="serializer">SerializerBase</param>
 /// <returns>SerializerBase.</returns>
 public static bool TryGetValue(string alias, out SerializerBase serializer)
 {
     return(_objectSerializerCache.TryGetValue(alias, out serializer));
 }
Exemple #3
0
 /// <summary>
 /// Deserializes the specified stream.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="self">The self.</param>
 /// <param name="stream">The stream.</param>
 /// <returns>T.</returns>
 public static T Deserialize <T>(this SerializerBase self, Stream stream)
 {
     return((T)self.Deserialize(stream, typeof(T)));
 }