/// <summary> /// Add the rule-agnostic fingerprint contributions for this element /// </summary> /// <param name="contributions">The set of contributions to update</param> /// <param name="element">Element under consideration</param> /// <param name="levelBaseName">The "base" to use when specifying contribution keys</param> /// <param name="ignoreNameProperty">If true, exclude the "Name" property from contributions</param> private static void AddRuleAgnosticContributions(IList <FingerprintContribution> contributions, A11yElement element, int level, bool ignoreNameProperty) { string levelBaseName = (level > 0) ? Invariant($"Ancestor{level}.") : string.Empty; AddValidContribution(contributions, levelBaseName, "AcceleratorKey", element.AcceleratorKey); AddValidContribution(contributions, levelBaseName, "AccessKey", element.AccessKey); AddValidContribution(contributions, levelBaseName, "AutomationId", element.AutomationId); AddValidContribution(contributions, levelBaseName, "ClassName", element.GetClassName()); AddValidContribution(contributions, levelBaseName, "ControlType", ControlType.GetInstance().GetNameById(element.ControlTypeId)); AddValidContribution(contributions, levelBaseName, "FrameworkId", element.GetUIFramework()); AddValidContribution(contributions, levelBaseName, "LocalizedControlType", element.LocalizedControlType); AddValidContribution(contributions, levelBaseName, "Name", ignoreNameProperty ? null : element.Name); }