void ProcessRemove(string val, CompilationSection section, SettingsMappingWhatContents how)
 {
     if (val == "assemblies")
     {
         RemoveAssembly(section, how);
     }
 }
예제 #2
0
 void ProcessAdd(string val, PagesSection section, SettingsMappingWhatContents how)
 {
     if (val == "controls")
     {
         AddControl(section, how);
     }
 }
예제 #3
0
 void ProcessClear(string val, PagesSection section, SettingsMappingWhatContents how)
 {
     if (val == "controls")
     {
         section.Controls.Clear();
     }
     else if (val == "tagMapping")
     {
         section.TagMapping.Clear();
     }
 }
        void RemoveAssembly(CompilationSection section, SettingsMappingWhatContents how)
        {
            Dictionary <string, string> attrs = how.Attributes;

            if (attrs == null || attrs.Count == 0)
            {
                return;
            }

            string assemblyName;

            if (!attrs.TryGetValue("assembly", out assemblyName))
            {
                return;
            }

            section.Assemblies.Remove(assemblyName);
        }
예제 #5
0
        void AddControl(PagesSection section, SettingsMappingWhatContents how)
        {
            Dictionary <string, string> attrs = how.Attributes;

            if (attrs == null || attrs.Count == 0)
            {
                return;
            }

            string tagPrefix, nameSpace, asm, tagName, source;

            if (!attrs.TryGetValue("tagPrefix", out tagPrefix))
            {
                tagPrefix = String.Empty;
            }
            if (!attrs.TryGetValue("namespace", out nameSpace))
            {
                nameSpace = String.Empty;
            }
            if (!attrs.TryGetValue("assembly", out asm))
            {
                asm = String.Empty;
            }
            if (!attrs.TryGetValue("tagName", out tagName))
            {
                tagName = String.Empty;
            }
            if (!attrs.TryGetValue("src", out source))
            {
                source = String.Empty;
            }

            TagPrefixInfo info = new TagPrefixInfo(tagPrefix, nameSpace, asm, tagName, source);

            section.Controls.Add(info);
        }