void RemoveItemFromSolution(SolutionSectionItem item) { SD.SolutionSection section = GetExtensibilityGlobalsSection(); section.Remove(item.Name); nonPersistedSolutionItems.Add(item); solution.Save(); }
internal void RemoveItemFromSolution(string name) { SolutionSectionItem item = GetItemFromSolution(name); if (item != null) { RemoveItemFromSolution(item); } }
SolutionSectionItem GetItemFromSolutionOrNonPersistedItems(string name) { SolutionSectionItem item = GetNonPersistedSolutionItem(name); if (item != null) { return(item); } return(GetItemFromSolution(name)); }
bool UpdateItemInSolution(string name, string value) { SolutionSectionItem item = GetItemFromSolution(name); if (item != null) { item.Value = value; solution.Save(); return(true); } return(false); }
public object this[string name] { get { SolutionSectionItem item = GetItemFromSolutionOrNonPersistedItems(name); if (item == null) { ThrowNoVariableExistsException(name); } return(item.Value); } set { UpdateOrCreateSolutionItem(name, value as string); } }
void UpdateOrCreateNonPersistedSolutionItem(string name, string value) { SolutionSectionItem item = GetNonPersistedSolutionItem(name); if (item != null) { item.Value = value; } else { CreateNonPersistedSolutionItem(name, value); } }
internal void AddItemToSolution(string name) { if (ItemExistsInSolution(name)) { return; } SolutionSectionItem item = GetNonPersistedSolutionItem(name); nonPersistedSolutionItems.Remove(item); SD.SolutionSection section = GetOrCreateExtensibilityGlobalsSection(); section.Add(item.Name, item.Value); solution.Save(); }
void CreateNonPersistedSolutionItem(string name, string value) { var item = new SolutionSectionItem(name, value); nonPersistedSolutionItems.Add(item); }