Beispiel #1
0
 /// <summary>
 /// Convert a <see cref="Contracts.Uuid"/> to <see cref="Guid"/>.
 /// </summary>
 /// <param name="id"><see cref="Contracts.Uuid"/> to convert.</param>
 /// <returns>Converted <see cref="Guid"/>.</returns>
 public static Guid ToGuid(this Contracts.Uuid id) => new Guid(id.Value.ToByteArray());
Beispiel #2
0
 /// <summary>
 /// Convert a <see cref="ByteString"/> to a <see cref="ConceptAs{T}"/> of type <see cref="Guid"/>.
 /// </summary>
 /// <typeparam name="T">Type to convert to.</typeparam>
 /// <param name="id"><see cref="Contracts.Uuid"/> to convert.</param>
 /// <returns>Converted <see cref="ConceptAs{T}"/> of type <see cref="Guid"/>.</returns>
 public static T To <T>(this Contracts.Uuid id)
     where T : ConceptAs <Guid>, new() => new T
 {
     Value = id.ToGuid()
 };