static void addItemDef(ProjectItemDefinitionGroupElement pidge, string toolName, bool isDebug, Blah3 blah3) { var avar = pidge.AddItemDefinition(toolName); if (blah3 != null) blah3(avar, isDebug); }
internal ProjectItemDefinitionElement LookupItemDefinition(ProjectItemDefinitionGroupElement parent, string itemType, string condition = null) { ProjectItemDefinitionElement itemDefinition = null; var label = Pivots.GetExpressionLabel(condition); if(string.IsNullOrEmpty(condition)) { itemDefinition = parent.ItemDefinitions.FirstOrDefault(each => itemType == each.ItemType && string.IsNullOrEmpty(each.Condition)); if(itemDefinition != null) { return itemDefinition; } return parent.AddItemDefinition(itemType); } var conditionExpression = Pivots.GetMSBuildCondition(Name, condition); itemDefinition = parent.ItemDefinitions.FirstOrDefault(each => itemType == each.ItemType && each.Condition == conditionExpression); if(itemDefinition != null) { return itemDefinition; } itemDefinition = parent.AddItemDefinition(itemType); itemDefinition.Label = label; itemDefinition.Condition = conditionExpression; return itemDefinition; }