Exemplo n.º 1
0
        public static TypeTarget ReadTypeTarget(XmlReader reader)
        {
            if (reader == null || reader.NodeType != XmlNodeType.Element)
            {
                return(null);
            }

            switch (reader.Name)
            {
            case "TypeTarget":
                TypeTarget typeTarget = new TypeTarget();
                typeTarget.ReadXml(reader);
                return(typeTarget);

            case "EnumerationTarget":
                EnumerationTarget enumTarget = new EnumerationTarget();
                enumTarget.ReadXml(reader);
                return(enumTarget);
            }

            return(null);
        }
Exemplo n.º 2
0
        public static Target ReadTarget(XmlReader reader)
        {
            if (reader == null || reader.NodeType != XmlNodeType.Element)
            {
                return(null);
            }

            switch (reader.Name)
            {
            case "Target":
                Target target = new Target();
                target.ReadXml(reader);
                return(target);

            case "NamespaceTarget":
                NamespaceTarget namespaceTarget = new NamespaceTarget();
                namespaceTarget.ReadXml(reader);
                return(namespaceTarget);

            case "TypeTarget":
                TypeTarget typeTarget = new TypeTarget();
                typeTarget.ReadXml(reader);
                return(typeTarget);

            case "EnumerationTarget":
                EnumerationTarget enumTarget = new EnumerationTarget();
                enumTarget.ReadXml(reader);
                return(enumTarget);

            case "MemberTarget":
                MemberTarget memberTarget = new MemberTarget();
                memberTarget.ReadXml(reader);
                return(memberTarget);

            case "ConstructorTarget":
                ConstructorTarget constructorTarget = new ConstructorTarget();
                constructorTarget.ReadXml(reader);
                return(constructorTarget);

            case "ProcedureTarget":
                ProcedureTarget procedTarget = new ProcedureTarget();
                procedTarget.ReadXml(reader);
                return(procedTarget);

            case "EventTarget":
                EventTarget eventTarget = new EventTarget();
                eventTarget.ReadXml(reader);
                return(eventTarget);

            case "PropertyTarget":
                PropertyTarget propertyTarget = new PropertyTarget();
                propertyTarget.ReadXml(reader);
                return(propertyTarget);

            case "MethodTarget":
                MethodTarget methodTarget = new MethodTarget();
                methodTarget.ReadXml(reader);
                return(methodTarget);
            }

            return(null);
        }