private static bool IsNCrunchAttributeIdentifier(string category) { var splitCategory = category.Split(':'); var attributeName = splitCategory.First(); var startsWithNCrunchAttributePrefix = attributeName.StartsWith(NCrunchAttributeNames.NCrunchAttributePrefix, StringComparison.OrdinalIgnoreCase); var allNcrunchAttributeNamesInSimpleForm = NCrunchAttributeNames.All().Select(NCrunchAttributeNames.RemovePrefixAndSuffix).ToList(); var attributeMatchesAnExistingNCrunchAttributeInSimpleForm = allNcrunchAttributeNamesInSimpleForm.Contains(attributeName); return(startsWithNCrunchAttributePrefix | attributeMatchesAnExistingNCrunchAttributeInSimpleForm); }
private static bool MatchesIdentifier(string nCrunchAttributeIdentifier, string nCrunchAttributeName) { return(nCrunchAttributeIdentifier == nCrunchAttributeName || nCrunchAttributeIdentifier == NCrunchAttributeNames.RemovePrefixAndSuffix(nCrunchAttributeName)); }