/// <summary> /// The post fixed attribute matcher. /// </summary> public static IEnumerable <AttributeComparison> Match(IDiffContext context, SourceMap controlSources, SourceMap testSources) { if (controlSources is null) { throw new ArgumentNullException(nameof(controlSources)); } if (testSources is null) { throw new ArgumentNullException(nameof(testSources)); } foreach (var control in controlSources.GetUnmatched()) { var ctrlName = control.Attribute.Name; if (!NameHasPostfixSeparator(ctrlName)) { continue; } ctrlName = RemovePostfixFromName(ctrlName); if (testSources.Contains(ctrlName) && testSources.IsUnmatched(ctrlName)) { yield return(new AttributeComparison(control, testSources[ctrlName])); } } yield break; }
/// <summary> /// Attribute name matcher strategy. /// </summary> public static IEnumerable <AttributeComparison> Match(IDiffContext context, SourceMap controlSources, SourceMap testSources) { if (controlSources is null) { throw new ArgumentNullException(nameof(controlSources)); } if (testSources is null) { throw new ArgumentNullException(nameof(testSources)); } foreach (var control in controlSources.GetUnmatched()) { if (testSources.Contains(control.Attribute.Name) && testSources.IsUnmatched(control.Attribute.Name)) { yield return(new AttributeComparison(control, testSources[control.Attribute.Name])); } } yield break; }