mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-27 20:18:01 +02:00
Beef custom properties proof of concept implementation.
This commit is contained in:
parent
549c9c7d17
commit
803b9890e2
4 changed files with 120 additions and 1 deletions
|
@ -110,6 +110,7 @@ namespace BeefBuild
|
|||
{
|
||||
mWorkspace.mName = new String();
|
||||
Path.GetFileName(mWorkspace.mDir, mWorkspace.mName);
|
||||
LoadProperties();
|
||||
LoadWorkspace(mVerb);
|
||||
}
|
||||
else
|
||||
|
@ -303,6 +304,21 @@ namespace BeefBuild
|
|||
if (mPackMan.mCleanHashSet.TryAddAlt(value, var entryPtr))
|
||||
*entryPtr = new .(value);
|
||||
return true;
|
||||
case "-property":
|
||||
int splitIdx = (int)value.IndexOf('=');
|
||||
if (splitIdx != -1)
|
||||
{
|
||||
String propertyKey = new String();
|
||||
StringView propertyKeyView = value.Substring(0, splitIdx);
|
||||
propertyKeyView.ToString(propertyKey);
|
||||
|
||||
String propertyValue = new String();
|
||||
StringView propertyValueView = value.Substring(splitIdx + 1, value.Length - splitIdx - 1);
|
||||
propertyValueView.ToString(propertyValue);
|
||||
|
||||
mCustomProperties.Add(propertyKey, propertyValue);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue