예제 #1
0
 /// <summary>
 /// Indicates whether the message contains duplicated serial numbers or not.
 /// </summary>
 public static bool AreThereDuplicatedSerialNumbers(this ICredentialsRequest request) => request.SerialNumbers().Distinct().Count() < request.SerialNumbers().Count();
예제 #2
0
 /// <summary>
 /// Is request for credential presentation only.
 /// </summary>
 public static bool IsPresentationOnlyRequest(this ICredentialsRequest request) => request.Delta < 0 && !request.Requested.Any();
예제 #3
0
 /// <summary>
 /// Serial numbers used in the credential presentations.
 /// </summary>
 public static IEnumerable <GroupElement> SerialNumbers(this ICredentialsRequest request) => request.Presented.Select(x => x.S);
예제 #4
0
 /// <summary>
 /// Is request for zero-value credentials only.
 /// </summary>
 public static bool IsNullRequest(this ICredentialsRequest request) => request.Delta == 0 && !request.Presented.Any();