private static string GetTagForElement(ConfigurationElement element)
        {
            Type elementType = element.GetType();

            return(KnownValueElementTags.GetOrNull(elementType) ??
                   ExtensionElementMap.GetTagForExtensionElement(element));
        }
Exemplo n.º 2
0
 public void Then_PrefixedContainerConfiguringExtensionsWereAdded()
 {
     Assert.AreEqual(typeof(ContainerConfigElementOne),
                     ExtensionElementMap.GetContainerConfiguringElementType("ext2.configOne"));
     Assert.AreEqual(typeof(ContainerConfigElementTwo),
                     ExtensionElementMap.GetContainerConfiguringElementType("ext2.configTwo"));
 }
        private bool DeserializeExtensionValueElement(string elementName, XmlReader reader)
        {
            Type elementType = ExtensionElementMap.GetParameterValueElementType(elementName);

            if (elementType != null)
            {
                var element = (ParameterValueElement)Activator.CreateInstance(elementType);
                element.Deserialize(reader);
                parentElement.Value = element;
            }
            return(elementType != null);
        }
Exemplo n.º 4
0
 public void Then_InterceptionElementHasBeenAdded()
 {
     Assert.IsNotNull(ExtensionElementMap.GetContainerConfiguringElementType("interception"));
 }
Exemplo n.º 5
0
 public void Then_ValueElementWasAdded()
 {
     Assert.AreEqual(typeof(SeventeenValueElement),
                     ExtensionElementMap.GetParameterValueElementType("seventeen"));
 }