コード例 #1
0
 /// <inheritdoc />
 public override void Validate(MatchSpecificationValidationContext context)
 {
     if (context.Repository.GetStudy(new StudyIdentity(StudyId)) == null)
     {
         context.AddError($"{StudyId} is not a valid study");
     }
 }
コード例 #2
0
 /// <inheritdoc />
 public override void Validate(MatchSpecificationValidationContext context)
 {
     foreach (var valueDto in Identifiers.Where(_ => !context.Registry.IsValidIdentifierType(_)))
     {
         context.AddError($"'{valueDto.SystemName}' is not a valid identifier name");
     }
 }
コード例 #3
0
 /// <inheritdoc />
 public override void Validate(MatchSpecificationValidationContext context)
 {
     if (context.Repository.GetAgency(Agency) == null)
     {
         context.AddError($"'{Agency}' is not a valid Agency");
     }
 }