Ejemplo n.º 1
0
 /// <summary>
 /// Creates a ShortGuid from a base64 encoded String
 /// </summary>
 /// <param name="value">The encoded guid as a
 /// base64 String</param>
 public ShortGuid(String value)
 {
     this.Value = value;
     this.Guid  = ShortGuid.Decode(value);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a ShortGuid from a Guid
 /// </summary>
 /// <param name="guid">The Guid to encode</param>
 public ShortGuid(Guid guid)
 {
     this.Guid  = guid;
     this.Value = ShortGuid.Encode(guid);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new instance of a Guid using the String value,
 /// then returns the base64 encoded version of the Guid.
 /// </summary>
 /// <param name="value">An actual Guid String (i.e. not a ShortGuid)</param>
 /// <returns></returns>
 public static String Encode(String value)
 => ShortGuid.Encode(new Guid(value));