Ejemplo n.º 1
0
 /// <summary>
 /// Loads an object instance of the specified type from a base64 encoded string.
 /// </summary>
 /// <param name="type">The object type.</param>
 /// <param name="data">Base64 encoded string.</param>
 public static object FromBase64(Type type, string data)
 {
     return(Cementery.FromByteArray(type, Convert.FromBase64String(data)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Loads an object instance of the specified type from a base64 encoded string.
 /// </summary>
 /// <typeparam name="T">The object type.</typeparam>
 /// <param name="data">Base64 encoded string.</param>
 public static T FromBase64 <T>(string data)
 {
     return(Cementery.FromByteArray <T>(Convert.FromBase64String(data)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Serializes the specified object into a base64 encoded string.
 /// </summary>
 /// <param name="value">The object instance.</param>
 public static string ToBase64(object value)
 {
     return(Convert.ToBase64String(Cementery.ToByteArray(value)));
 }