/// <summary>
 /// Initializes a new instance of the <see cref="SubscriptionResponse"/> class.
 /// </summary>
 /// <param name="consentId">The optional <see cref="Contracts.Uuid"/> that represents the <see cref="ConsentId"/> for this subscription.</param>
 /// <param name="failure">The optional <see cref="Contracts.Failure"/> that occured during the subscription request.</param>
 public SubscriptionResponse(Contracts.Uuid consentId, Contracts.Failure failure)
 {
     if (consentId != null)
     {
         Consent = consentId.To <ConsentId>();
     }
     if (failure != null)
     {
         Failure = failure;
     }
 }
예제 #2
0
 /// <summary>
 /// Convert a <see cref="UuidContract"/> to <see cref="Guid"/>.
 /// </summary>
 /// <param name="id"><see cref="UuidContract"/> to convert.</param>
 /// <returns>Converted <see cref="Guid"/>.</returns>
 public static Guid ToGuid(this UuidContract id) => new(id.Value.ToByteArray());