public void Set(string key, string value) { AttributeInfo ai = new AttributeInfo(value, value); if (LoadAttributes.ContainsKey(key)) { ai.State = ParameterState.Changed; LoadAttributes[key] = ai; } else { ai.State = ParameterState.Added; LoadAttributes.Add(key, ai); } }
public void Flush() { foreach (KeyValuePair<string, AttributeInfo> kvp in InitAttributes) { if (!LoadAttributes.ContainsKey(kvp.Key)) { AttributeInfo ai = new AttributeInfo(kvp.Value.DefaultValue, kvp.Value.DefaultValue); ai.State = ParameterState.Added; LoadAttributes.Add(kvp.Key, ai); } } RewriteFile(); }