public void SetProperty(TCProperty tcProperty, string value, bool merge, bool overrideParentValues) { if (tcProperty.PropertyType != "String" && tcProperty.PropertyType != "BigString" && tcProperty.PropertyType != "BiomesList" && tcProperty.PropertyType != "ResourceQueue" && String.IsNullOrWhiteSpace(value)) { value = null; } if (value != null) { value = value.Trim(); } Property property = PropertiesDict[tcProperty.Name]; property.Value = value; property.Merge = merge; property.OverrideParentValues = overrideParentValues; }
public bool GetPropertyOverrideParentValues(TCProperty property) { Property prop = PropertiesDict.ContainsKey(property.Name) ? PropertiesDict[property.Name] : null; return(prop != null ? prop.OverrideParentValues : false); }
public bool GetPropertyMerge(TCProperty property) { Property prop = PropertiesDict.ContainsKey(property.Name) ? PropertiesDict[property.Name] : null; return(prop != null ? prop.Merge : false); }
public string GetPropertyValueAsString(TCProperty property) { Property prop = PropertiesDict.ContainsKey(property.Name) ? PropertiesDict[property.Name] : null; return(prop != null ? prop.Value : null); }