public bool SetPropertyValue(SteamAppPropertyType type, object value, params string[] propertyPath) { SteamAppPropertyTable propertyTable = this; foreach (string text in propertyPath.Take(propertyPath.Length - 1)) { if (propertyTable.HasProperty(new string[] { text })) { propertyTable = propertyTable.GetPropertyValue <SteamAppPropertyTable>(text, null); } else { SteamAppPropertyTable propertyTable2 = new(); propertyTable.SetPropertyValue(text, SteamAppPropertyType.Table, propertyTable2); propertyTable = propertyTable2; } if (propertyTable == null) { return(false); } } return(propertyTable.SetPropertyValue(propertyPath.Last <string>(), type, value)); }
public void RemoveProperty(params string[] propertyPath) { SteamAppPropertyTable propertyTable = this; foreach (string text in propertyPath.Take(propertyPath.Length - 1)) { if (propertyTable.HasProperty(new string[] { text })) { propertyTable = propertyTable.GetPropertyValue <SteamAppPropertyTable>(text, null); } else { SteamAppPropertyTable propertyTable2 = new(); propertyTable.SetPropertyValue(text, SteamAppPropertyType.Table, propertyTable2); propertyTable = propertyTable2; } if (propertyTable == null) { return; } } RemoveProperty(propertyPath.Last <string>()); }