2using System.Collections.Generic;
4using System.Text.RegularExpressions;
5using System.Threading.Tasks;
6using Nuke.Common.Utilities;
26 bool AllowMultiple =
false,
27 bool IsRawText = false
46 public override string ToString()
48 if (GetMeta().IsRawText)
return Name;
50 return string.IsNullOrWhiteSpace(Value)
51 ? Name : (Name + Setter + Value).DoubleQuoteIfNeeded();
54 [GeneratedRegex(
@"^(?<NAME>.*?)((?<SETTER>[:=])(?<VALUE>.*))?$")]
55 private static partial Regex ParseRegex();
76 var groups = ParseRegex().Match(input)?.Groups;
77 return groups?[
"NAME"] ==
null
80 groups?[
"NAME"]?.Value!,
81 groups?[
"VALUE"]?.Value,
82 (groups?[
"SETTER"]?.Value ??
"=").FirstOrDefault(
'='),
93 if (GetMeta().IsRawText)
return Name;
95 var compatibleName = ueVersion.SemanticalVersion.Major > 4
96 ? Name.Replace(
"UE4",
"Unreal")
98 return string.IsNullOrWhiteSpace(Value)
99 ? compatibleName : (compatibleName + Setter + Value).DoubleQuoteIfNeeded();
High level representation of an Unreal Engine version.
UnrealCompatibility
A flag enum representation for checking the Unreal version compatibility of various features....