public static bool HasLanguageVersion(this PropertyGroupXElement propertyGroupXElement, out Version languageVersion) { var hasLanguageVersion = propertyGroupXElement.HasChild(ProjectFileXmlElementName.LanguageVersion, out var childXElement); if (hasLanguageVersion) { var languageVersionString = childXElement.Value; languageVersion = ProjectFileValues.ParseVersion(languageVersionString); } else { languageVersion = VersionHelper.None; } return(hasLanguageVersion); }
public static bool HasIsPackable(this PropertyGroupXElement propertyGroupXElement, out bool isPackable) { var hasIsPackable = propertyGroupXElement.HasChild(ProjectFileXmlElementName.IsPackable, out var childXElement); if (hasIsPackable) { var isPackableString = childXElement.Value; isPackable = ProjectFileValues.ParseBoolean(isPackableString); } else { isPackable = false; // Dummy value. } return(hasIsPackable); }
public static bool HasOutputType(this PropertyGroupXElement propertyGroupXElement, out OutputType outputType) { var hasOutput = propertyGroupXElement.HasChild(ProjectFileXmlElementName.OutputType, out var childXElement); if (hasOutput) { var outputTypeString = childXElement.Value; outputType = ProjectFileValues.ParseOutputType(outputTypeString); } else { outputType = OutputType.Unknown; } return(hasOutput); }