コード例 #1
0
        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);
        }
        private Task OutputTypeElementHandler(XElement xOutputType, ProjectFile projectFile, IMessageSink messageSink)
        {
            projectFile.OutputType = ProjectFileValues.ParseOutputType(xOutputType.Value);

            return(Task.CompletedTask);
        }