Exemplo n.º 1
0
        private static IResourceType LoadResourceField(System.Xml.XmlNode fieldNode)
        {
            IResourceType field = null;

            switch (fieldNode.Name)
            {
            case "text":
                field = new TextFieldType();
                break;

            case "internal_ref":
                field = new InternalRefFieldType();
                break;


            case "external_ref":
                field = new ExternalRefFieldType();
                break;

            case "numeric":
                field = new NumericFieldType();
                break;

            case "enum":
                field = new EnumFieldType();
                break;
            }

            if (field != null)
            {
                field.LoadFromXML(fieldNode);
            }

            return(field);
        }
        private static IResourceType LoadResourceField(System.Xml.XmlNode fieldNode)
        {
            IResourceType field = null;
            switch (fieldNode.Name)
            {
                case "text":
                    field = new TextFieldType();
                    break;

                case "internal_ref":
                    field = new InternalRefFieldType();
                    break;

                case "external_ref":
                    field = new ExternalRefFieldType();
                    break;

                case "numeric":
                    field = new NumericFieldType();
                    break;

                case "enum":
                    field = new EnumFieldType();
                    break;
            }

            if (field != null)
                field.LoadFromXML(fieldNode);

            return field;
        }