public override void UpdateVars() { entries = new SortedDictionary<string, BuildConfigEntry>(); if (m_Properties.Contains("buildSettings")) { var dict = m_Properties["buildSettings"].AsDict(); foreach (var key in dict.values.Keys) { var value = dict[key]; if (value is PBXElementString) { if (entries.ContainsKey(key)) entries[key].val.Add(value.AsString()); else entries.Add(key, BuildConfigEntry.FromNameValue(key, value.AsString())); } else if (value is PBXElementArray) { foreach (var pvalue in value.AsArray().values) { if (pvalue is PBXElementString) { if (entries.ContainsKey(key)) entries[key].val.Add(pvalue.AsString()); else entries.Add(key, BuildConfigEntry.FromNameValue(key, pvalue.AsString())); } } } } } }
public static BuildConfigEntry FromNameValue(string name, string value) { BuildConfigEntry ret = new BuildConfigEntry(); ret.name = name; ret.AddValue(value); return ret; }
public void SetProperty(string name, string value) { entries[name] = BuildConfigEntry.FromNameValue(name, EscapeWithQuotesIfNeeded(name, value)); }