Exemplo n.º 1
0
        public static PropertyGroupXElement SetPropertyValue(this PropertyGroupXElement propertyGroup, string propertyElementName, string value)
        {
            var element = propertyGroup.Value.AcquireElement(propertyElementName);

            element.Value = value;

            return(propertyGroup);
        }
Exemplo n.º 2
0
        public static PropertyGroupXElement SetTargetFramework(this PropertyGroupXElement propertyGroup, TargetFramework targetFramework)
        {
            var standardString = targetFramework.ToStringStandard();

            propertyGroup.Value.AcquireElement(ProjectFileXmlElementNames.TargetFramework, standardString);

            return(propertyGroup);
        }
Exemplo n.º 3
0
        public static PropertyGroupXElement AddTargetFramework(this PropertyGroupXElement propertyGroup, TargetFramework targetFramework, out TypedXElement targetFrameworkElement)
        {
            var standardString = targetFramework.ToStringStandard();

            targetFrameworkElement = propertyGroup.Value.AddElement(ProjectFileXmlElementNames.TargetFramework, standardString).AsGeneralXElement();

            return(propertyGroup);
        }
Exemplo n.º 4
0
        public static PropertyGroupXElement AddProperty(this PropertyGroupXElement propertyGroup, string propertyElementName, string propertyElementValue)
        {
            propertyGroup.AddProperty(propertyElementName, out var propertyElement);

            propertyElement.Value.Value = propertyElementValue;

            return(propertyGroup);
        }
Exemplo n.º 5
0
        public static bool HasProperty(this PropertyGroupXElement propertyGroup, string propertyElementName)
        {
            var output = propertyGroup.Value.Elements()
                         .Where(x => x.Name == propertyElementName)
                         .Any();

            return(output);
        }
Exemplo n.º 6
0
        public static PropertyGroupXElement SetGenerateAssemblyInfo(this PropertyGroupXElement propertyGroup, bool generateAssemblyInfo)
        {
            var valueString = generateAssemblyInfo.ToString();

            propertyGroup.Value.AcquireElement(ProjectFileXmlElementNames.GenerateAssemblyInfo, valueString);

            return(propertyGroup);
        }
Exemplo n.º 7
0
        public static PropertyGroupXElement SetVersion(this PropertyGroupXElement propertyGroup, Version version)
        {
            var versionString = version.ToStringProjectFileStandard();

            propertyGroup.Value.AcquireElement(ProjectFileXmlElementNames.Version, versionString);

            return(propertyGroup);
        }
Exemplo n.º 8
0
        public static PropertyGroupXElement SetGenerateDocumentationFile(this PropertyGroupXElement propertyGroup, bool generateDocumentationFile)
        {
            var standardString = generateDocumentationFile.ToString().ToLowerInvariant();

            propertyGroup.Value.AcquireElement(ProjectFileXmlElementNames.GenerateDocumentationFile, standardString);

            return(propertyGroup);
        }
Exemplo n.º 9
0
        public static PropertyGroupXElement GetPropertyValue(this PropertyGroupXElement propertyGroup, string propertyElementName, out string value)
        {
            var element = propertyGroup.Value.Elements()
                          .Where(x => x.Name == propertyElementName)
                          .Single();

            value = element.Value;

            return(propertyGroup);
        }
Exemplo n.º 10
0
        public static PropertyGroupXElement AsPropertyGroup(this XElement xElement)
        {
            var propertyGroup = new PropertyGroupXElement(xElement);

            return(propertyGroup);
        }
Exemplo n.º 11
0
        public static PropertyGroupXElement AddTargetFramework(this PropertyGroupXElement propertyGroup, TargetFramework targetFramework)
        {
            propertyGroup.AddTargetFramework(targetFramework, out var _);

            return(propertyGroup);
        }
Exemplo n.º 12
0
        public static string GetPropertyValue(this PropertyGroupXElement propertyGroup, string propertyElementName)
        {
            propertyGroup.GetPropertyValue(propertyElementName, out var value);

            return(value);
        }
Exemplo n.º 13
0
        public static PropertyGroupXElement AddProperty(this PropertyGroupXElement propertyGroup, string propertyElementName)
        {
            propertyGroup.AddProperty(propertyElementName, out var _);

            return(propertyGroup);
        }
Exemplo n.º 14
0
        public static PropertyGroupXElement AddProperty(this PropertyGroupXElement propertyGroup, string propertyElementName, out TypedXElement element)
        {
            element = propertyGroup.Value.AddElement(propertyElementName).AsGeneralXElement();

            return(propertyGroup);
        }
Exemplo n.º 15
0
        public static PropertyGroupXElement SetNoWarnStandard(this PropertyGroupXElement propertyGroup)
        {
            propertyGroup.Value.AcquireElement(ProjectFileXmlElementNames.NoWarn, ProjectFileXmlValues.NoWarnStandard);

            return(propertyGroup);
        }
Exemplo n.º 16
0
        public static ProjectFileModel ProjectFile(this PropertyGroupXElement propertyGroup)
        {
            var projecFile = propertyGroup.ProjectElement.ProjectFile;

            return(projecFile);
        }