protected static List<ContentType> GetListOfEnabledElementsToClean(BinaryCleanActionPropertySet elementsToClean) { Dictionary<ContentType, string> fcsContentTypeDict = elementsToClean.GetFCSContentTypeDict(); List<ContentType> elements = new List<ContentType>(); elements.Add(ContentType.ContentRule);//we need this for multiple types to work correctly in cleaning foreach (KeyValuePair<string, IActionProperty> outerKvp in elementsToClean) { IActionProperty property = outerKvp.Value; foreach (KeyValuePair<ContentType, string> internalKvp in fcsContentTypeDict) { if (String.Compare(internalKvp.Value, outerKvp.Key, true, System.Globalization.CultureInfo.InvariantCulture) == 0 && ((bool)property.Value) == true && !elements.Contains(internalKvp.Key)) { elements.Add(internalKvp.Key); } } } return elements; }