예제 #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);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:NumericValue"/> class.
 /// </summary>
 /// <param name="value">The value.</param>
 public NumericFieldValue(decimal value, NumericFieldType type)
 {
     Value = value;
     _type = type;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:NumericValue"/> class.
 /// </summary>
 /// <param name="value">The value.</param>
 public NumericFieldValue(decimal value, NumericFieldType type)
 {
     Value = value;
     _type = type;
 }
        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;
        }