コード例 #1
0
 void RemoveItemFromSolution(SolutionSectionItem item)
 {
     SD.SolutionSection section = GetExtensibilityGlobalsSection();
     section.Remove(item.Name);
     nonPersistedSolutionItems.Add(item);
     solution.Save();
 }
コード例 #2
0
        internal void RemoveItemFromSolution(string name)
        {
            SolutionSectionItem item = GetItemFromSolution(name);

            if (item != null)
            {
                RemoveItemFromSolution(item);
            }
        }
コード例 #3
0
        SolutionSectionItem GetItemFromSolutionOrNonPersistedItems(string name)
        {
            SolutionSectionItem item = GetNonPersistedSolutionItem(name);

            if (item != null)
            {
                return(item);
            }
            return(GetItemFromSolution(name));
        }
コード例 #4
0
        bool UpdateItemInSolution(string name, string value)
        {
            SolutionSectionItem item = GetItemFromSolution(name);

            if (item != null)
            {
                item.Value = value;
                solution.Save();
                return(true);
            }
            return(false);
        }
コード例 #5
0
 public object this[string name] {
     get {
         SolutionSectionItem item = GetItemFromSolutionOrNonPersistedItems(name);
         if (item == null)
         {
             ThrowNoVariableExistsException(name);
         }
         return(item.Value);
     }
     set {
         UpdateOrCreateSolutionItem(name, value as string);
     }
 }
コード例 #6
0
        void UpdateOrCreateNonPersistedSolutionItem(string name, string value)
        {
            SolutionSectionItem item = GetNonPersistedSolutionItem(name);

            if (item != null)
            {
                item.Value = value;
            }
            else
            {
                CreateNonPersistedSolutionItem(name, value);
            }
        }
コード例 #7
0
        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();
        }
コード例 #8
0
		void RemoveItemFromSolution(SolutionSectionItem item)
		{
			SD.SolutionSection section = GetExtensibilityGlobalsSection();
			section.Remove(item.Name);
			nonPersistedSolutionItems.Add(item);
			solution.Save();
		}
コード例 #9
0
		void CreateNonPersistedSolutionItem(string name, string value)
		{
			var item = new SolutionSectionItem(name, value);
			nonPersistedSolutionItems.Add(item);
		}
コード例 #10
0
        void CreateNonPersistedSolutionItem(string name, string value)
        {
            var item = new SolutionSectionItem(name, value);

            nonPersistedSolutionItems.Add(item);
        }